/* ================================================================
   NPP System - Design System
   Based on UI_DESIGN.md specifications
   ================================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ================================================================
   CSS Variables - Design Tokens
   ================================================================ */
:root {
    /* Primary Colors */
    --primary: #4A90D9;
    --primary-hover: #3a7bc8;
    --primary-light: rgba(74, 144, 217, 0.1);
    --primary-gradient: linear-gradient(135deg, #4A90D9 0%, #357ABD 100%);

    /* Sidebar */
    --sidebar-bg: #1a1f36;
    --sidebar-hover: #252b48;
    --sidebar-active: rgba(74, 144, 217, 0.15);
    --sidebar-text: #8a8fa8;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;

    /* Background */
    --bg-main: #f0f2f8;
    --bg-card: #ffffff;
    --bg-hover: #f8f9fc;

    /* Semantic Colors */
    --success: #2ecc71;
    --success-bg: rgba(46, 204, 113, 0.1);
    --warning: #f39c12;
    --warning-bg: rgba(243, 156, 18, 0.1);
    --danger: #e74c3c;
    --danger-bg: rgba(231, 76, 60, 0.1);
    --info: #3498db;
    --info-bg: rgba(52, 152, 219, 0.1);

    /* Text */
    --text-primary: #1a1f36;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-white: #ffffff;

    /* Borders & Shadows */
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Top Bar */
    --topbar-height: 64px;
}

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

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* ================================================================
   Layout Structure
   ================================================================ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-slow);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

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

.sidebar-logo {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity var(--transition-normal);
}

.sidebar.collapsed .sidebar-brand {
    opacity: 0;
    width: 0;
}

.sidebar-brand h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.3px;
}

.sidebar-brand span {
    font-size: 11px;
    color: var(--sidebar-text);
    font-weight: 400;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

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

.nav-section-title {
    padding: 8px 14px 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--sidebar-text);
    opacity: 0.5;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 13.5px;
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    margin-bottom: 2px;
}

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

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

.nav-item.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;
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.nav-item .nav-text {
    transition: opacity var(--transition-normal);
}

.sidebar.collapsed .nav-item .nav-text {
    opacity: 0;
    width: 0;
}

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

.sidebar.collapsed .nav-item .nav-badge {
    display: none;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-toggle {
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--sidebar-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

/* ---- Main Content Area ---- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-slow);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ---- Top Bar ---- */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

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

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    color: var(--text-muted);
    font-size: 11px;
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

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

.topbar-notification {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--bg-main);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
}

.topbar-notification:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.topbar-notification .notif-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.topbar-user:hover {
    background: var(--bg-main);
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
}

.topbar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ---- Page Content ---- */
.page-content {
    padding: 24px 28px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

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

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

/* ================================================================
   Cards
   ================================================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

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

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

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 22px;
}

.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-hover);
}

/* ================================================================
   Stats Cards (Dashboard)
   ================================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 22px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.stat-card.stat-primary::before { background: var(--primary-gradient); }
.stat-card.stat-warning::before { background: linear-gradient(90deg, var(--warning), #e67e22); }
.stat-card.stat-success::before { background: linear-gradient(90deg, var(--success), #27ae60); }
.stat-card.stat-danger::before { background: linear-gradient(90deg, var(--danger), #c0392b); }

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

.stat-info h3 {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

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

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

.stat-primary .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-warning .stat-icon { background: var(--warning-bg); color: var(--warning); }
.stat-success .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-danger .stat-icon { background: var(--danger-bg); color: var(--danger); }

/* ================================================================
   Data Tables
   ================================================================ */
.table-wrapper {
    overflow-x: auto;
}

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

.data-table thead th {
    background: var(--bg-hover);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

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

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

/* ================================================================
   Status Badges
   ================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pending {
    background: var(--warning-bg);
    color: #d68910;
}

.badge-approved {
    background: var(--success-bg);
    color: #1e8449;
}

.badge-rejected {
    background: var(--danger-bg);
    color: #c0392b;
}

.badge-processing {
    background: var(--info-bg);
    color: #2471a3;
}

.badge-exported {
    background: rgba(142, 68, 173, 0.1);
    color: #7d3c98;
}

.badge-completed {
    background: rgba(46, 204, 113, 0.15);
    color: #196f3d;
}

.badge-cancelled {
    background: rgba(149, 165, 166, 0.15);
    color: #717d7e;
}

.badge-tnt {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.badge-pharmacy {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info);
}

.badge-supermarket {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
}

.badge-other {
    background: rgba(149, 165, 166, 0.1);
    color: #717d7e;
}

.badge-verified {
    background: var(--success-bg);
    color: #1e8449;
}

.badge-active {
    background: var(--success-bg);
    color: #1e8449;
}

.badge-inactive {
    background: var(--danger-bg);
    color: #c0392b;
}

/* ================================================================
   Buttons
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #3a7bc8 0%, #2d6aad 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #27ae60);
    color: white;
}

.btn-success:hover {
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #c0392b);
    color: white;
}

.btn-danger:hover {
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #e67e22);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

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

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* ================================================================
   Forms
   ================================================================ */
.form-group {
    margin-bottom: 18px;
}

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

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

/* ================================================================
   Filter Bar
   ================================================================ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.filter-bar .form-control {
    max-width: 200px;
}

.filter-bar .search-input {
    max-width: 260px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    padding-left: 36px;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-main);
    border-radius: var(--border-radius-sm);
}

.filter-tab {
    padding: 6px 14px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-tab:hover {
    color: var(--text-primary);
}

.filter-tab.active {
    background: var(--bg-card);
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.filter-tab .tab-count {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.7;
}

/* ================================================================
   Progress Bar (Inventory)
   ================================================================ */
.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-main);
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width var(--transition-slow);
}

.progress-bar-fill.level-safe {
    background: linear-gradient(90deg, var(--success), #27ae60);
}

.progress-bar-fill.level-warning {
    background: linear-gradient(90deg, var(--warning), #e67e22);
}

.progress-bar-fill.level-danger {
    background: linear-gradient(90deg, var(--danger), #c0392b);
}

.progress-value {
    font-size: 12px;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

/* ================================================================
   Modal
   ================================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

.modal {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

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

.modal-title {
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-main);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

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

/* ================================================================
   Alerts / Flash Messages
   ================================================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: var(--success-bg);
    color: #1e8449;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.alert-danger {
    background: var(--danger-bg);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.alert-warning {
    background: var(--warning-bg);
    color: #d68910;
    border: 1px solid rgba(243, 156, 18, 0.2);
}

.alert-info {
    background: var(--info-bg);
    color: #2471a3;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

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

/* ================================================================
   Grid Layouts
   ================================================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ================================================================
   Detail Info List
   ================================================================ */
.info-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ================================================================
   Empty State
   ================================================================ */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

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

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

.empty-state p {
    font-size: 13px;
}

/* ================================================================
   Animations
   ================================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ================================================================
   Login Page
   ================================================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1f36 0%, #2d3561 50%, #4A90D9 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 144, 217, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(46, 204, 113, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 48px 40px;
    width: 420px;
    max-width: 90%;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease;
}

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

.login-logo .logo-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(74, 144, 217, 0.3);
}

.login-logo h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.login-logo p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-control {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 10px;
}

.login-form .btn {
    width: 100%;
    padding: 12px;
    font-size: 14.5px;
    border-radius: 10px;
    margin-top: 8px;
}

/* ================================================================
   Order Detail
   ================================================================ */
.order-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.order-status-flow {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    padding: 20px 22px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.flow-step.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.flow-step.completed {
    color: var(--success);
}

.flow-arrow {
    color: var(--text-muted);
    margin: 0 4px;
    font-size: 14px;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-2, .info-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    .sidebar .sidebar-brand,
    .sidebar .nav-text,
    .sidebar .nav-badge,
    .sidebar .nav-section-title {
        display: none;
    }
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
    .page-content {
        padding: 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar .form-control,
    .filter-bar .search-input {
        max-width: 100%;
    }
    .topbar {
        padding: 0 16px;
    }
    .topbar-user-info {
        display: none;
    }
}

/* ================================================================
   Utility Classes
   ================================================================ */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-mono { font-family: 'Courier New', monospace; }
.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; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }
