/* assets/css/app.css */
/* DropShip Manager — Dark industrial SaaS aesthetic */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* =============================================
   CSS VARIABLES
============================================= */
:root {
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    /* Light theme */
    --bg-page: #f4f5f8;
    --bg-surface: #ffffff;
    --bg-surface-2: #f8f9fc;
    --bg-surface-3: #eef0f6;
    --border: #e2e5ef;
    --border-strong: #cdd1df;

    --text-primary: #0f1117;
    --text-secondary: #4b5168;
    --text-muted: #8b91a7;
    --text-inverse: #ffffff;

    --sidebar-bg: #0d0f17;
    --sidebar-text: rgba(255,255,255,0.75);
    --sidebar-text-active: #ffffff;
    --sidebar-active-bg: rgba(255,255,255,0.1);
    --sidebar-hover-bg: rgba(255,255,255,0.06);
    --sidebar-border: rgba(255,255,255,0.08);
    --sidebar-label: rgba(255,255,255,0.35);
    --sidebar-width: 240px;

    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4338ca;
    --accent-bg: rgba(99,102,241,0.1);
    --accent-bg-strong: rgba(99,102,241,0.2);

    --success: #10b981;
    --success-bg: rgba(16,185,129,0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245,158,11,0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239,68,68,0.1);
    --info: #3b82f6;
    --info-bg: rgba(59,130,246,0.1);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-xl: 0 24px 64px rgba(0,0,0,0.16), 0 8px 24px rgba(0,0,0,0.08);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --topbar-height: 60px;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-page: #0a0b10;
    --bg-surface: #12141e;
    --bg-surface-2: #181b27;
    --bg-surface-3: #1e2130;
    --border: #2a2f45;
    --border-strong: #363c56;
    --text-primary: #eef0f8;
    --text-secondary: #9ba0b8;
    --text-muted: #5c6280;
    --sidebar-bg: #080910;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
input, select, textarea { font-family: var(--font-body); }

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

/* =============================================
   SIDEBAR
============================================= */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

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

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 10px;
}

.brand-icon {
    width: 32px; height: 32px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: white;
    letter-spacing: -0.02em;
}

.sidebar-toggle-btn {
    display: none;
    color: var(--sidebar-text);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.sidebar-toggle-btn:hover { background: var(--sidebar-hover-bg); color: white; }

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

.nav-section {
    padding: 8px 0;
}

.nav-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-label);
    padding: 6px 16px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 0;
    transition: all var(--transition);
    position: relative;
    margin: 1px 8px;
    border-radius: var(--radius-sm);
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-hover-bg); color: white; }
.nav-item.active {
    background: var(--sidebar-active-bg);
    color: white;
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 25%; bottom: 25%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
    margin-left: -8px;
}
.nav-item--danger { color: rgba(239,68,68,0.7); }
.nav-item--danger:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

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

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

.user-avatar {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-avatar.sm { width: 28px; height: 28px; font-size: 12px; }

.user-info { overflow: hidden; }
.user-name { display: block; font-size: 13px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 11px; color: var(--sidebar-label); text-transform: capitalize; }

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

/* =============================================
   TOPBAR
============================================= */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-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;
    gap: 12px;
}

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

.menu-btn {
    display: none;
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.menu-btn:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.menu-btn svg { width: 18px; height: 18px; }

.page-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.icon-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition);
    border: 1px solid var(--border);
}
.icon-btn:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.icon-btn svg { width: 16px; height: 16px; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* =============================================
   PAGE CONTENT
============================================= */
.page-content {
    flex: 1;
    padding: 24px;
    overflow-x: hidden;
}

/* =============================================
   STATS CARDS
============================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--card-accent, var(--accent));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card--green { --card-accent: var(--success); }
.stat-card--yellow { --card-accent: var(--warning); }
.stat-card--red { --card-accent: var(--danger); }
.stat-card--blue { --card-accent: var(--info); }
.stat-card--purple { --card-accent: #8b5cf6; }

.stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius);
    background: var(--bg-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--card-accent, var(--accent));
}
.stat-icon svg { width: 18px; height: 18px; }

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-change.neutral { color: var(--text-muted); }

/* =============================================
   CARDS / PANELS
============================================= */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.card-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.card-body { padding: 20px; }

/* =============================================
   TABLES
============================================= */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

thead th {
    background: var(--bg-surface-2);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

tbody tr:hover { background: var(--bg-surface-2); }
tbody tr:last-child { border-bottom: none; }

tbody td {
    padding: 12px 16px;
    color: var(--text-primary);
    vertical-align: middle;
}

.td-muted { color: var(--text-muted); font-size: 12px; }

/* =============================================
   BADGES
============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.badge-green { background: var(--success-bg); color: var(--success); }
.badge-yellow { background: var(--warning-bg); color: var(--warning); }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-blue { background: var(--info-bg); color: var(--info); }
.badge-purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.badge-orange { background: rgba(249,115,22,0.1); color: #f97316; }
.badge-gray { background: var(--bg-surface-3); color: var(--text-muted); }
.badge-indigo { background: var(--accent-bg); color: var(--accent); }

/* =============================================
   BUTTONS
============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: var(--font-body);
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

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

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-surface-2); border-color: var(--border-strong); }

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

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

.btn-warning { background: var(--warning); color: white; }
.btn-ghost { color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-surface-2); color: var(--text-primary); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-sm svg { width: 12px; height: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-icon { padding: 7px; width: 34px; height: 34px; justify-content: center; }
.btn-icon.sm { width: 28px; height: 28px; padding: 5px; }

/* =============================================
   FORMS
============================================= */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-label span { color: var(--danger); margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-body);
    transition: all var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity: 0.6; cursor: not-allowed; }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-grid { display: grid; gap: 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); flex: 1; }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; border-left: none; }

/* =============================================
   SEARCH BAR
============================================= */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    min-width: 280px;
}
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); background: var(--bg-surface); }
.search-bar svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.search-bar input { flex: 1; border: none; background: none; outline: none; color: var(--text-primary); font-size: 13.5px; font-family: var(--font-body); }

/* =============================================
   FILTER BAR
============================================= */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    background: var(--bg-surface);
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* =============================================
   MODAL
============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 150ms ease;
}

.modal {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: slideUp 200ms cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.modal-lg { max-width: 780px; }
.modal-xl { max-width: 960px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-header h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.modal-close {
    width: 30px; height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* =============================================
   PAGINATION
============================================= */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
}
.pagination-btns { display: flex; gap: 4px; }
.page-btn {
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all var(--transition);
    background: var(--bg-surface);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

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

.chart-container { position: relative; }

/* =============================================
   TOAST
============================================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 360px;
    animation: slideInRight 200ms ease;
    font-size: 13.5px;
}
.toast-icon { flex-shrink: 0; width: 18px; height: 18px; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info { border-left: 3px solid var(--info); }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }

/* =============================================
   EMPTY STATE
============================================= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    color: var(--text-muted);
    text-align: center;
}
.empty-state svg { width: 48px; height: 48px; opacity: 0.3; }
.empty-state h4 { font-size: 16px; font-weight: 600; color: var(--text-secondary); }
.empty-state p { font-size: 13px; max-width: 300px; }

/* =============================================
   LOGIN PAGE
============================================= */
.login-page body, body.login-page {
    background: var(--sidebar-bg);
}
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0f17;
    background-image: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.15) 0%, transparent 50%),
                      radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.1) 0%, transparent 50%);
    padding: 20px;
}

.login-card {
    background: #12141e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
}

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

.login-logo {
    width: 52px; height: 52px;
    background: var(--accent);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 16px;
}
.login-logo svg { width: 24px; height: 24px; }

.login-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
}

.login-subtitle {
    font-size: 13.5px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
}

.login-card .form-label { color: rgba(255,255,255,0.5); }
.login-card .form-control {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: white;
}
.login-card .form-control:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.07);
}
.login-card .form-control::placeholder { color: rgba(255,255,255,0.25); }

.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

.login-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 20px;
}

/* =============================================
   ORDER DETAIL
============================================= */
.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-group { display: flex; flex-direction: column; gap: 4px; }
.detail-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.detail-value { font-size: 14px; color: var(--text-primary); font-weight: 500; }

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    position: relative;
}
.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 30px;
    bottom: -10px;
    width: 1px;
    background: var(--border);
}
.timeline-dot {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--accent-bg);
    border: 2px solid var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}
.timeline-content { flex: 1; }
.timeline-action { font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.timeline-time { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-surface-3);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.tag-urgent { background: rgba(239,68,68,0.1); color: var(--danger); border-color: rgba(239,68,68,0.3); }
.tag-risky { background: rgba(245,158,11,0.1); color: var(--warning); border-color: rgba(245,158,11,0.3); }
.tag-high-value { background: rgba(16,185,129,0.1); color: var(--success); border-color: rgba(16,185,129,0.3); }

/* =============================================
   ANIMATIONS
============================================= */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }

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

@media (max-width: 768px) {
    :root { --sidebar-width: 240px; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
    .sidebar-toggle-btn { display: flex; }
    .main-wrapper { margin-left: 0; }
    .menu-btn { display: flex; }
    .page-content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .filter-bar { gap: 8px; }
    .order-detail-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 16px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .search-bar { min-width: 0; flex: 1; }
    .modal { margin: 0 8px; }
    .login-card { padding: 28px 20px; }
}

/* =============================================
   UTILITIES
============================================= */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.font-display { font-family: var(--font-display); }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.cursor-pointer { cursor: pointer; }
.checkbox { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Bulk action bar */
.bulk-bar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: var(--accent-bg);
    border-bottom: 1px solid var(--accent-bg-strong);
}
.bulk-bar.show { display: flex; }
.bulk-count { font-size: 13px; font-weight: 600; color: var(--accent); }
