/* ==================== PROFESSIONAL DASHBOARD STYLES ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0052CC;
    --primary-dark: #003d99;
    --primary-light: #e6f0ff;
    --success: #00875A;
    --success-light: #e3fcef;
    --warning: #FF991F;
    --warning-light: #fff7e6;
    --danger: #DE350B;
    --danger-light: #ffebe6;
    --purple: #6554C0;
    --purple-light: #EAE6FF;
    --neutral-900: #091E42;
    --neutral-800: #172B4D;
    --neutral-700: #253858;
    --neutral-600: #344563;
    --neutral-500: #5E6C84;
    --neutral-400: #7A869A;
    --neutral-300: #97A0AF;
    --neutral-200: #C1C7D0;
    --neutral-100: #DFE1E6;
    --neutral-50: #F4F5F7;
    --neutral-25: #FAFBFC;
    --white: #FFFFFF;
    --sidebar-bg: #0E1624;
    --sidebar-hover: #1C2A3F;
    --sidebar-active: #0052CC;
    --border: #E4E7EB;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --sidebar-width: 240px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #F8FAFC;
    color: var(--neutral-800);
    font-size: 14px;
    line-height: 1.5;
}

/* ==================== DASHBOARD LAYOUT ==================== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo svg {
    color: var(--white);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--neutral-400);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--neutral-300);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--white);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--white);
}

.nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item:hover svg,
.nav-item.active svg {
    opacity: 1;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 11px;
    color: var(--neutral-400);
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--neutral-400);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

/* ==================== MAIN WRAPPER ==================== */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==================== TOP HEADER ==================== */
.top-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--neutral-900);
    margin: 0;
}

.page-subtitle {
    font-size: 13px;
    color: var(--neutral-500);
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--neutral-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    width: 280px;
}

.search-box svg {
    color: var(--neutral-400);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--neutral-800);
    width: 100%;
}

.search-box input::placeholder {
    color: var(--neutral-400);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    padding: 24px;
}

/* ==================== STATS ROW ==================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-blue {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon-green {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon-purple {
    background: var(--purple-light);
    color: var(--purple);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--neutral-900);
    line-height: 1.2;
}

.stat-value-sm {
    font-size: 14px;
    font-weight: 600;
}

.stat-label {
    font-size: 12px;
    color: var(--neutral-500);
    margin-top: 2px;
}

/* ==================== FILTERS BAR ==================== */
.filters-bar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.filters-left, .filters-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--neutral-700);
    background: var(--white);
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.product-count {
    font-size: 13px;
    color: var(--neutral-500);
    margin-right: 8px;
}

.product-count span {
    font-weight: 600;
    color: var(--neutral-800);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--neutral-200);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover:not(:disabled) {
    background: #006644;
}

.btn-warning {
    background: var(--warning);
    color: var(--neutral-900);
}

.btn-warning:hover:not(:disabled) {
    background: #e68a00;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover:not(:disabled) {
    background: #bf2600;
}

.btn-ghost {
    background: transparent;
    color: var(--neutral-600);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--neutral-50);
    color: var(--neutral-800);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

/* ==================== QUICK FILTERS ==================== */
.quick-filters {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-filter-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--neutral-600);
}

.quick-filter-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.quick-filter-btn {
    padding: 5px 12px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--neutral-600);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quick-filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ==================== BULK ACTIONS PANEL ==================== */
.bulk-actions-panel {
    background: var(--primary);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.bulk-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bulk-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}

.bulk-modes {
    display: flex;
    gap: 20px;
}

.bulk-mode-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-mode-option label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--white);
    font-size: 13px;
    cursor: pointer;
}

.bulk-inputs {
    display: flex;
    gap: 6px;
    align-items: center;
}

.bulk-inputs input[type="number"] {
    width: 80px;
    padding: 6px 8px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.checkbox-sm {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--white);
    font-size: 12px;
    cursor: pointer;
}

.bulk-actions-btns {
    display: flex;
    gap: 6px;
}

/* ==================== TABLE CARD ==================== */
.table-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--neutral-50);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--neutral-700);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--neutral-25);
}

.data-table tbody tr.selected {
    background: var(--primary-light);
}

.empty-state {
    text-align: center;
    padding: 48px !important;
    color: var(--neutral-400);
}

.empty-icon {
    margin-bottom: 12px;
    color: var(--neutral-300);
}

.empty-state-sm {
    text-align: center;
    padding: 24px;
    color: var(--neutral-400);
    font-size: 13px;
}

/* ==================== TABLE ELEMENTS ==================== */
.product-image {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--neutral-100);
}

.product-name {
    font-weight: 500;
    color: var(--neutral-900);
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--neutral-100);
    color: var(--neutral-600);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
}

.status-badge.status-active {
    background: var(--success-light);
    color: var(--success);
}

.status-badge.status-draft {
    background: var(--warning-light);
    color: var(--warning);
}

.variant-count-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary);
    color: var(--white);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.price-range {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mrp-range {
    font-size: 11px;
    color: var(--neutral-400);
    text-decoration: line-through;
}

.sp-range {
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
}

.price-input {
    width: 80px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: right;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
}

.price-changed {
    border-color: var(--warning) !important;
    background: var(--warning-light);
}

.price-preview {
    border-color: var(--success) !important;
    background: var(--success-light);
}

/* ==================== PARENT/VARIANT ROWS ==================== */
.parent-row {
    background: var(--neutral-25);
    cursor: pointer;
}

.parent-row:hover {
    background: var(--neutral-50) !important;
}

.parent-row.expanded {
    background: var(--success-light);
}

.expand-icon {
    font-size: 11px;
    color: var(--neutral-400);
}

.expand-text {
    font-size: 11px;
    color: var(--neutral-400);
}

.variant-row {
    border-left: 3px solid var(--primary-light);
}

.variant-row:hover {
    background: var(--neutral-50) !important;
}

.variant-row.selected {
    background: var(--primary-light) !important;
}

.variant-title-cell {
    padding-left: 28px !important;
}

.variant-indent {
    color: var(--primary);
    margin-right: 6px;
    font-size: 11px;
}

.variant-name {
    font-weight: 500;
    color: var(--neutral-600);
}

.sku-badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--neutral-100);
    color: var(--neutral-500);
    border-radius: 3px;
    font-size: 10px;
    font-family: monospace;
}

.variant-prices-display {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.current-mrp {
    font-size: 11px;
    color: var(--neutral-400);
    text-decoration: line-through;
}

.current-sp {
    font-size: 13px;
    font-weight: 500;
    color: var(--neutral-800);
}

.variant-price-inputs {
    display: flex;
    gap: 4px;
}

.variant-price-inputs .price-input {
    width: 75px;
    padding: 4px 6px;
    font-size: 12px;
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 30, 66, 0.54);
}

.modal-content {
    background: var(--white);
    margin: 40px auto;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    max-height: calc(100vh - 80px);
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.2s ease;
    display: flex;
    flex-direction: column;
}

.modal-lg {
    max-width: 640px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--neutral-900);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--neutral-400);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--neutral-700);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--neutral-800);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* ==================== INFO BANNER ==================== */
.info-banner {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.info-banner-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.info-banner ul {
    margin: 6px 0 0 16px;
    font-size: 13px;
    color: var(--neutral-700);
}

.info-banner li {
    margin-bottom: 4px;
}

.info-banner-light {
    background: var(--neutral-50);
}

.info-banner-light p {
    font-size: 13px;
    color: var(--neutral-600);
    margin: 0;
}

/* ==================== SALE MODE ==================== */
.sale-stats {
    text-align: center;
    padding: 16px;
    background: var(--neutral-50);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.sale-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.sale-stat-label {
    font-size: 14px;
    color: var(--neutral-500);
}

.sale-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
}

.sale-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sale-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.sale-card-icon {
    color: var(--primary);
    margin-bottom: 12px;
}

.sale-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 4px;
}

.sale-card-desc {
    font-size: 13px;
    color: var(--neutral-500);
    margin-bottom: 12px;
}

.sale-card .btn {
    width: 100%;
}

.sale-card .btn:disabled {
    background: var(--neutral-200);
    color: var(--neutral-500);
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider span {
    padding: 0 12px;
    font-size: 12px;
    color: var(--neutral-400);
    text-transform: uppercase;
}

.backup-section {
    text-align: center;
    padding: 16px;
    background: var(--neutral-50);
    border-radius: var(--radius-sm);
}

.backup-section p {
    font-size: 13px;
    color: var(--neutral-600);
    margin-bottom: 12px;
}

/* ==================== BACKUPS LIST ==================== */
.backups-list {
    max-height: 400px;
    overflow-y: auto;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 12px;
}

.backup-info { flex: 1; min-width: 200px; }

.backup-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--neutral-900);
}

.backup-meta {
    font-size: 12px;
    color: var(--neutral-500);
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.backup-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 6px;
}

.backup-status.status-active {
    background: var(--success-light);
    color: var(--success);
}

.backup-status.status-restored {
    background: var(--purple-light);
    color: var(--purple);
}

.backup-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-restore {
    background: var(--warning);
    color: var(--neutral-900);
}

.btn-restore:hover {
    background: #e68a00;
}

.btn-delete {
    background: var(--danger-light);
    color: var(--danger);
}

.btn-delete:hover {
    background: var(--danger);
    color: var(--white);
}

.no-backups {
    text-align: center;
    padding: 32px;
    color: var(--neutral-500);
}

.no-backups p {
    margin: 4px 0;
}

/* ==================== LOGS ==================== */
.logs-list {
    max-height: 400px;
    overflow-y: auto;
}

.log-item {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.log-product {
    font-weight: 600;
    color: var(--neutral-900);
    font-size: 13px;
}

.log-time {
    font-size: 11px;
    color: var(--neutral-400);
}

.log-changes {
    display: flex;
    gap: 16px;
    margin-bottom: 6px;
}

.log-change {
    font-size: 12px;
    color: var(--neutral-600);
}

.log-user {
    font-size: 11px;
    color: var(--neutral-400);
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--neutral-900);
    color: var(--white);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.2s ease;
    font-size: 14px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: var(--neutral-900); }

/* ==================== LOADING ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-card {
    text-align: center;
    padding: 32px 48px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 16px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-card p {
    margin: 0;
    font-size: 14px;
    color: var(--neutral-600);
}

/* ==================== LOGIN SCREEN ==================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.login-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
    overflow: hidden;
}

.login-header {
    background: var(--primary);
    padding: 36px 32px;
    text-align: center;
}

.login-logo {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.login-logo svg {
    color: var(--white);
}

.login-header h1 {
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px;
}

.login-header p {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin: 0;
}

.login-form {
    padding: 32px;
    text-align: center;
}

.login-error {
    background: var(--danger-light);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--neutral-800);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-google:hover {
    background: var(--neutral-50);
    box-shadow: var(--shadow-sm);
}

.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.google-icon {
    width: 18px;
    height: 18px;
}

.login-note {
    margin-top: 14px;
    color: var(--neutral-400);
    font-size: 12px;
}

.login-footer {
    padding: 14px 32px;
    background: var(--neutral-50);
    text-align: center;
    border-top: 1px solid var(--border);
}

.login-footer p {
    color: var(--neutral-400);
    font-size: 12px;
    margin: 0;
}

.spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--neutral-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .sale-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 64px;
    }

    .sidebar-title,
    .nav-item span,
    .nav-section-title,
    .user-details {
        display: none;
    }

    .sidebar-header {
        justify-content: center;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .user-card {
        justify-content: center;
    }

    .main-wrapper {
        margin-left: 64px;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-left, .filters-right {
        flex-wrap: wrap;
    }

    .search-box {
        width: 100%;
    }

    .bulk-actions-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-modes {
        flex-direction: column;
        gap: 12px;
    }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}
