/* ============================================
   ERP Importa - Premium Dark Theme
   ============================================ */

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

/* ---- CSS Variables ---- */
:root {
    /* Backgrounds */
    --bg-primary: #0a0a14;
    --bg-secondary: #111128;
    --bg-card: #161632;
    --bg-card-hover: #1c1c3c;
    --bg-sidebar: #0d0d20;
    --bg-input: #1a1a38;
    --bg-modal: #12122a;
    
    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1, #a855f7);
    --accent-gradient-hover: linear-gradient(135deg, #818cf8, #c084fc);
    --accent-glow: rgba(99, 102, 241, 0.3);
    
    /* Text Colors */
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #55557a;
    --text-accent: #a5b4fc;
    
    /* Status Colors */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-color-hover: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(99, 102, 241, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 65px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Light Theme overrides */
html[data-theme="light"] {
    /* Backgrounds */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-input: #f8fafc;
    --bg-modal: #ffffff;
    
    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-accent: #4f46e5;
    
    /* Borders */
    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;
    --border-accent: rgba(99, 102, 241, 0.2);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    animation: floatGlow 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1), transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
    animation: floatGlow 10s ease-in-out infinite reverse;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 6px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all var(--transition-normal);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-secondary);
}

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

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all var(--transition-normal);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888a8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.input-icon-wrapper .form-control {
    padding-left: 44px;
}

.form-check-input {
    background-color: var(--bg-input);
    border-color: var(--border-color);
}

.form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
    color: white;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

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

.btn-success:hover {
    background: #16a34a;
    color: white;
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

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

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

.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--topbar-height);
}

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

.sidebar-brand-text h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.sidebar-brand-text span {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

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

.sidebar-nav-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 16px 12px 8px;
}

.sidebar-nav-item {
    margin-bottom: 2px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.sidebar-nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav-link.active {
    color: white;
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.sidebar-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    flex-shrink: 0;
}

.sidebar-nav-link .badge {
    margin-left: auto;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    background: var(--danger);
    color: white;
    font-weight: 600;
}

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

.sidebar-footer .sidebar-nav-link {
    color: var(--danger);
}

.sidebar-footer .sidebar-nav-link:hover {
    background: var(--danger-bg);
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 999;
    transition: left var(--transition-normal);
}

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

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

.topbar-title h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-title p {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.topbar-user:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-card-hover);
}

.topbar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
}

.topbar-user-info {
    text-align: left;
}

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

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

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 28px;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left var(--transition-normal);
}

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

.card:hover {
    border-color: var(--border-color-hover);
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.stat-card-icon.blue {
    background: var(--info-bg);
    color: var(--info);
}

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

.stat-card-icon.yellow {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-card-icon.red {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-card-icon.purple {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-secondary);
}

.stat-card-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

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

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: rgba(0, 0, 0, 0.2);
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}

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

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

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

/* DataTables overrides */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 12px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
    outline: none !important;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    color: var(--text-secondary) !important;
    font-size: 13px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-secondary) !important;
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    margin: 0 2px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color-hover) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--accent-primary) !important;
    color: white !important;
    border-color: var(--accent-primary) !important;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

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

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

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.badge-purple {
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-secondary);
}

/* ============================================
   MODALS
   ============================================ */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.modal-header .modal-title {
    font-weight: 700;
    color: var(--text-primary);
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.5;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.2);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.2);
}

/* ============================================
   PAGE HEADER  
   ============================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header-title h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.page-header-actions {
    display: flex;
    gap: 10px;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb-container {
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    font-size: 13px;
    color: var(--text-secondary);
}

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

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

.breadcrumb li + li::before {
    content: '/';
    margin-right: 8px;
    color: var(--text-muted);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-secondary) !important; }
.text-accent { color: var(--accent-primary) !important; }

.bg-success { background: var(--success-bg) !important; }
.bg-danger { background: var(--danger-bg) !important; }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.currency-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.3s ease forwards;
}

/* Staggered animation for cards */
.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.3s; }

/* ============================================
   LOADER
   ============================================ */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 20, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease forwards;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
}

.toast.toast-success::before { background: var(--success); }
.toast.toast-error::before { background: var(--danger); }
.toast.toast-warning::before { background: var(--warning); }
.toast.toast-info::before { background: var(--info); }

.toast-message {
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .topbar {
        left: 0;
    }
    
    .topbar-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stat-card-value {
        font-size: 22px;
    }

    .topbar-user-info {
        display: none;
    }
}

@media (max-width: 576px) {
    .login-card {
        margin: 16px;
        padding: 32px 24px;
    }
}

/* ============================================
   DASHBOARD SPECIFIC
   ============================================ */
.welcome-banner {
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.welcome-banner h2 {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.welcome-banner p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Row gaps for Bootstrap grid */
.row.g-4 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }

/* Tab navigation for permissions */
.permission-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.permission-tab {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    background: none;
}

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

.permission-tab.active {
    background: var(--accent-primary);
    color: white;
}

/* Switch toggle for permissions */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    transition: all var(--transition-fast);
}

.switch-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.switch input:checked + .switch-slider {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.switch input:checked + .switch-slider::before {
    background: white;
    transform: translateX(18px);
}
