/* ─── Soulife Select — Design System ─────────────────────────────── */
/* Aesthetic: Refined editorial with warm undertones, sharp geometry */

:root {
    /* Core Palette - Warm slate with amber accent */
    --primary: #c47a2a;
    --primary-light: #d4943e;
    --primary-dark: #a86420;
    --primary-subtle: #fdf6ee;
    --primary-muted: #f5e6d0;

    --surface: #ffffff;
    --surface-raised: #fafaf8;
    --surface-sunken: #f5f4f2;
    --surface-overlay: rgba(255, 255, 255, 0.96);

    --text: #1a1814;
    --text-secondary: #6b6560;
    --text-tertiary: #9c958e;
    --text-inverse: #ffffff;

    --border: #e8e5e1;
    --border-strong: #d1ccc6;
    --border-subtle: #f0eeeb;

    --success: #3a8a5c;
    --success-bg: #ecf7f0;
    --warning: #c47a2a;
    --warning-bg: #fdf6ee;
    --error: #c44a3a;
    --error-bg: #fdf0ee;
    --info: #3a6ec4;
    --info-bg: #eef3fd;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(26, 24, 20, 0.04);
    --shadow-sm: 0 2px 8px rgba(26, 24, 20, 0.06);
    --shadow-md: 0 4px 16px rgba(26, 24, 20, 0.08);
    --shadow-lg: 0 8px 32px rgba(26, 24, 20, 0.1);
    --shadow-xl: 0 16px 48px rgba(26, 24, 20, 0.14);

    /* Spacing */
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Transitions */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --duration: 200ms;
}

[data-theme="dark"] {
    --primary: #d4943e;
    --primary-light: #e0a854;
    --primary-dark: #c47a2a;
    --primary-subtle: #2a2318;
    --primary-muted: #382d1e;

    --surface: #1a1814;
    --surface-raised: #22201c;
    --surface-sunken: #141210;
    --surface-overlay: rgba(26, 24, 20, 0.96);

    --text: #f0eeeb;
    --text-secondary: #a8a29c;
    --text-tertiary: #706a64;
    --text-inverse: #1a1814;

    --border: #2e2c28;
    --border-strong: #3e3c38;
    --border-subtle: #242220;

    --success-bg: #1a2e22;
    --warning-bg: #2a2318;
    --error-bg: #2a1a18;
    --info-bg: #1a2238;
}

/* ─── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: var(--surface-sunken);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }

/* ─── App Container ─────────────────────────────────────────────── */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s var(--ease);
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(196, 122, 42, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
}

.logo-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sidebar-close {
    display: none;
    color: var(--text-tertiary);
    font-size: 18px;
    padding: 4px;
}

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

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

.nav-section-title {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-tertiary);
    padding: 12px 12px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--duration) var(--ease);
    position: relative;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity var(--duration);
}

.nav-link:hover {
    background: var(--surface-sunken);
    color: var(--text);
}

.nav-link:hover i { opacity: 1; }

.nav-link.active {
    background: var(--primary-subtle);
    color: var(--primary-dark);
    font-weight: 600;
}

.nav-link.active i {
    opacity: 1;
    color: var(--primary);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-subtle);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: var(--surface-sunken);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
}

.logout-btn {
    padding: 6px;
    color: var(--text-tertiary);
    transition: color var(--duration);
    font-size: 14px;
}

.logout-btn:hover { color: var(--error); }

/* ─── Main Content ───────────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Topbar ─────────────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    color: var(--text-secondary);
    font-size: 18px;
    padding: 4px;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

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

.topbar-search {
    position: relative;
    display: flex;
    align-items: center;
}

.topbar-search i {
    position: absolute;
    left: 12px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.topbar-search input {
    width: 220px;
    padding: 8px 12px 8px 36px;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
    transition: all var(--duration);
    outline: none;
}

.topbar-search input::placeholder { color: var(--text-tertiary); }
.topbar-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 122, 42, 0.1);
}

.topbar-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--duration);
}

.topbar-btn:hover {
    background: var(--surface-sunken);
    color: var(--text);
}

/* ─── Content Area ───────────────────────────────────────────────── */
.content-area {
    flex: 1;
    padding: 24px;
}

/* ─── Alerts ─────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    margin: 0 24px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    animation: slideDown 0.3s var(--ease);
}

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

.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-close {
    color: inherit;
    opacity: 0.5;
    transition: opacity var(--duration);
    padding: 2px;
}

.alert-close:hover { opacity: 1; }

.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info); }

/* ─── Cards ──────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow var(--duration);
}

.card:hover { box-shadow: var(--shadow-sm); }

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

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
}

.card-body { padding: 20px; }
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-raised);
}

/* ─── Stat Cards ─────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all var(--duration) var(--ease);
}

.stat-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-subtle); color: var(--primary); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.error { background: var(--error-bg); color: var(--error); }
.stat-icon.info { background: var(--info-bg); color: var(--info); }

.stat-content { flex: 1; }

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ─── Status Badges ──────────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.status-pending { background: #fef3cd; color: #856404; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-revision { background: #fff3cd; color: #856404; }
.status-default { background: var(--surface-sunken); color: var(--text-secondary); }

/* Role badges */
.badge-admin { color: #7c3aed; }
.badge-finder { color: var(--primary); }
.badge-designer { color: #2563eb; }
.badge-buying { color: #059669; }
.badge-quality { color: #dc2626; }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease);
    border: 1px solid transparent;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(196, 122, 42, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--surface-sunken);
    border-color: var(--border-strong);
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #2d7a4d; }

.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { background: #b03a2d; }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: var(--surface-sunken);
    color: var(--text);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }

/* ─── Forms ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-label .required { color: var(--error); }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 9px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--text);
    transition: all var(--duration);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 122, 42, 0.1);
}

.form-input::placeholder { color: var(--text-tertiary); }

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-help {
    font-size: 11.5px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ─── Tables ─────────────────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text);
}

.data-table tbody tr:hover {
    background: var(--surface-raised);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ─── Product Grid ───────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--duration) var(--ease);
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    height: 200px;
    background: var(--surface-sunken);
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 48px;
}

.product-statuses {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.product-like-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 16px;
    transition: all var(--duration);
    border: none;
    cursor: pointer;
}

.product-like-btn:hover { background: white; color: var(--error); transform: scale(1.1); }
.product-like-btn.liked { color: var(--error); }
.product-like-btn.liked i { font-weight: 900; }

.product-info {
    padding: 14px 16px;
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-code {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--border-subtle);
}

.product-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
}

.product-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.product-stats i { margin-right: 3px; }

/* ─── Filters Bar ────────────────────────────────────────────────── */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--surface);
    transition: all var(--duration);
}

.filter-chip:hover, .filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ─── Modal ──────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s;
}

.modal-backdrop.show { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.3s var(--ease);
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.modal-close {
    color: var(--text-tertiary);
    font-size: 18px;
    padding: 4px;
    transition: color var(--duration);
}

.modal-close:hover { color: var(--text); }

.modal-body { padding: 0 24px 20px; }

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

/* ─── Comments ───────────────────────────────────────────────────── */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-sm);
}

.comment.system-comment {
    background: var(--info-bg);
    border-left: 3px solid var(--info);
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.comment-content { flex: 1; }

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
}

.comment-time {
    font-size: 11px;
    color: var(--text-tertiary);
}

.comment-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ─── Charts Container ───────────────────────────────────────────── */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* ─── Login Page ─────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1814 0%, #2a2318 50%, #1a1814 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 122, 42, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 122, 42, 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
}

.login-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    font-size: 24px;
}

.login-logo .logo-title {
    font-size: 24px;
    color: #f0eeeb;
}

.login-logo .logo-subtitle {
    font-size: 12px;
    letter-spacing: 3px;
}

.login-card .form-label { color: #a8a29c; }

.login-card .form-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f0eeeb;
    padding: 12px 16px;
}

.login-card .form-input::placeholder { color: rgba(255, 255, 255, 0.3); }

.login-card .form-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.login-card .btn-primary {
    width: 100%;
    padding: 13px;
    font-size: 14px;
    margin-top: 8px;
}

.login-error {
    background: rgba(196, 74, 58, 0.15);
    border: 1px solid rgba(196, 74, 58, 0.3);
    color: #f0aaaa;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Empty State ────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    max-width: 300px;
    margin: 0 auto;
}

/* ─── Workflow Pipeline ──────────────────────────────────────────── */
.pipeline {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
}

.pipeline-step {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-sunken);
    color: var(--text-tertiary);
}

.pipeline-step.active { background: var(--primary-subtle); color: var(--primary); }
.pipeline-step.completed { background: var(--success-bg); color: var(--success); }
.pipeline-step.failed { background: var(--error-bg); color: var(--error); }

.pipeline-arrow {
    color: var(--text-tertiary);
    font-size: 10px;
}

/* ─── Loading ────────────────────────────────────────────────────── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.loading-overlay {
    position: absolute;
    inset: 0;
    background: var(--surface-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-close { display: block; }
    
    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle { display: flex; }
    
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 99;
        display: none;
    }
    
    .sidebar-overlay.show { display: block; }
}

@media (max-width: 768px) {
    .content-area { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-grid { grid-template-columns: 1fr; }
    .chart-grid { grid-template-columns: 1fr; }
    .topbar-search { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .filters-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
    .pipeline { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 22px; }
    .login-card { padding: 32px 24px; }
}

/* ─── Utility Classes ────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-tertiary); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
