/* ================================================
   GRAND MARK — Design System
   Premium Dark Glassmorphism Theme
   ================================================ */

/* ---- CSS Variables ---- */
:root {
    --bg-main: #0B0E14;
    --bg-surface: #111827;
    --bg-card: rgba(20, 24, 34, 0.6);
    --bg-card-hover: rgba(30, 35, 48, 0.8);
    --bg-input: rgba(0, 0, 0, 0.25);
    --bg-input-focus: rgba(0, 0, 0, 0.45);

    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
    --primary-gradient-hover: linear-gradient(135deg, #6366F1 0%, #22D3EE 100%);

    --secondary: #10B981;
    --secondary-light: #34D399;
    --danger: #EF4444;
    --danger-light: #FCA5A5;
    --warning: #F59E0B;
    --warning-light: #FBBF24;
    --info: #38BDF8;
    --info-light: #7DD3FC;

    --text-main: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-dim: #64748B;

    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.15);
    --border-focus: rgba(79, 70, 229, 0.5);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(79, 70, 229, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(16px);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    --sidebar-width: 270px;
    --topbar-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.12), transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1), transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05), transparent 50%);
    background-attachment: fixed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.25; color: var(--text-main); }
h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; }

p { color: var(--text-muted); line-height: 1.7; }

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

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

.main-content {
    flex: 1;
    padding: 1.75rem 2rem;
    overflow-y: auto;
    height: 100vh;
    margin-left: var(--sidebar-width);
}

/* ---- Page Header ---- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.page-header p {
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ---- Glassmorphism Panels ---- */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.glass-panel.interactive {
    cursor: pointer;
}

.glass-panel.interactive:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* ---- Stat Cards ---- */
.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    transition: var(--transition);
}

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

.stat-card .stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card .stat-change {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ---- Forms & Inputs ---- */
.input-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

input, select, textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-light);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

input::placeholder, textarea::placeholder {
    color: var(--text-dim);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

select option {
    background: var(--bg-surface);
    color: var(--text-main);
}

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

.input-inline {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    gap: 1rem;
}

.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}
.btn-primary:hover {
    background: var(--primary-gradient-hover);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--border-light);
}

.btn-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--secondary-light);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.btn-success:hover { background: rgba(16, 185, 129, 0.3); }

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.3); }

.btn-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.btn-warning:hover { background: rgba(245, 158, 11, 0.3); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 1.75rem; font-size: 1.05rem; }
.btn-icon { padding: 0.5rem; width: 36px; height: 36px; }
.btn-icon.lg { width: 44px; height: 44px; font-size: 1.1rem; }

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 18, 28, 0.95);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
}

.brand {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 0.75rem;
    letter-spacing: -0.02em;
}

.brand i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

.nav-section {
    margin-bottom: 0.5rem;
}

.nav-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    padding: 0.5rem 1rem 0.4rem;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: var(--transition-fast);
    cursor: pointer;
}

.nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    font-weight: 600;
}

.nav-item .badge-count {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.sidebar-user .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user .user-info {
    min-width: 0;
}

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Tables ---- */
.table-container {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    background: rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

tr { transition: var(--transition-fast); }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Excel-style table */
.excel-table th, .excel-table td {
    border: 1px solid rgba(71, 85, 105, 0.6);
    padding: 0.4rem 0.5rem;
    text-align: center;
    white-space: nowrap;
    font-size: 0.82rem;
}
.excel-table th {
    background: #1e293b;
    color: #e2e8f0;
    font-size: 0.72rem;
}
.excel-table td {
    background: rgba(15, 23, 42, 0.8);
}
.excel-table input {
    background: transparent;
    border: none;
    color: white;
    text-align: center;
    padding: 0.2rem;
    width: 38px;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
}
.excel-table input:focus {
    background: rgba(79, 70, 229, 0.15);
    box-shadow: inset 0 0 0 1px var(--primary-light);
    border-radius: 2px;
}
.excel-table .cell-absent { color: #EF4444; font-weight: 600; }
.excel-table .cell-ot { color: #FBBF24; font-weight: 600; }
.excel-table .cell-off { color: var(--text-dim); font-style: italic; font-size: 0.7rem; }
.excel-table .col-total {
    background: rgba(6, 78, 59, 0.6) !important;
    font-weight: 700;
    color: #34D399;
}
.excel-table .col-name {
    text-align: left;
    min-width: 160px;
    color: #FBBF24;
    font-weight: 500;
}
.excel-table .col-fixed {
    position: sticky;
    z-index: 2;
    background: #1e293b !important;
}

/* ---- Badges ---- */
.badge {
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.25); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; border: 1px solid rgba(239, 68, 68, 0.25); }
.badge-info { background: rgba(56, 189, 248, 0.15); color: #7DD3FC; border: 1px solid rgba(56, 189, 248, 0.25); }
.badge-primary { background: rgba(79, 70, 229, 0.15); color: #A5B4FC; border: 1px solid rgba(79, 70, 229, 0.25); }
.badge-neutral { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); border: 1px solid var(--border); }

/* ---- Upload Area ---- */
.upload-area {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.1);
}
.upload-area:hover {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.05);
    transform: translateY(-2px);
}
.upload-area i {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 0.75rem;
}
.upload-area h4 {
    margin-bottom: 0.25rem;
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition-fast);
    white-space: nowrap;
}
.tab:hover { color: var(--text-main); }
.tab.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
    font-weight: 600;
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
    animation: fadeOverlay 0.2s ease;
}

.modal-content {
    max-width: 650px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-content.wide {
    max-width: 900px;
}

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

.modal-header h3 {
    margin: 0;
}

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 380px;
}

.toast {
    background: rgba(30, 35, 48, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.35s ease;
    min-width: 300px;
}

.toast.toast-success { border-left: 3px solid var(--secondary); }
.toast.toast-error { border-left: 3px solid var(--danger); }
.toast.toast-info { border-left: 3px solid var(--info); }
.toast.toast-warning { border-left: 3px solid var(--warning); }

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.toast-success .toast-icon { color: var(--secondary-light); }
.toast-error .toast-icon { color: var(--danger-light); }
.toast-info .toast-icon { color: var(--info-light); }
.toast-warning .toast-icon { color: var(--warning-light); }

.toast-message {
    font-size: 0.88rem;
    color: var(--text-main);
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    flex-shrink: 0;
}

/* ---- Progress Bar ---- */
.progress-bar-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.4s ease;
    border-radius: var(--radius-sm);
}

/* ---- Rating Stars ---- */
.rating-stars {
    display: flex;
    gap: 0.25rem;
}

.rating-star {
    cursor: pointer;
    color: var(--text-dim);
    font-size: 1.3rem;
    transition: var(--transition-fast);
}

.rating-star.active, .rating-star:hover {
    color: var(--warning);
}

/* ---- Search Bar ---- */
.search-bar {
    position: relative;
    max-width: 300px;
}

.search-bar input {
    padding-left: 2.5rem;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.88rem;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ---- Filter Bar ---- */
.filter-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.filter-bar select, .filter-bar input[type="month"] {
    width: auto;
    max-width: 220px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
}

/* ---- Pipeline Status ---- */
.pipeline {
    display: flex;
    gap: 0;
    margin-bottom: 0.5rem;
}

.pipeline-stage {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: var(--transition-fast);
}

.pipeline-stage:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.pipeline-stage:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.pipeline-stage.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pipeline-stage.completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--secondary-light);
    border-color: rgba(16, 185, 129, 0.3);
}

.pipeline-stage.rejected {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-light);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-dim);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h4 {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ---- Utility Classes ---- */
.text-center { text-align: center; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-success { color: var(--secondary-light) !important; }
.text-danger { color: var(--danger-light) !important; }
.text-warning { color: var(--warning-light) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-dim) !important; }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.w-full { width: 100%; }
.flex-1 { flex: 1; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.hidden { display: none !important; }

/* ---- Grid System ---- */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

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

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

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

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

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

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

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

.fade-in { animation: fadeIn 0.4s ease forwards; }
.fade-in-delay-1 { animation: fadeIn 0.4s ease 0.1s forwards; opacity: 0; }
.fade-in-delay-2 { animation: fadeIn 0.4s ease 0.2s forwards; opacity: 0; }
.fade-in-delay-3 { animation: fadeIn 0.4s ease 0.3s forwards; opacity: 0; }

/* ---- Responsive ---- */
@media (max-width: 1280px) {
    .grid-cols-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
    .form-row.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .main-content {
        margin-left: 0;
        height: auto;
        padding: 1rem;
    }

    .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-5 {
        grid-template-columns: 1fr;
    }

    .form-row.cols-2, .form-row.cols-3, .form-row.cols-4 {
        grid-template-columns: 1fr;
    }

    .col-span-2, .col-span-3 { grid-column: span 1; }

    .page-header { flex-direction: column; }
    .page-actions { width: 100%; }

    .nav-menu { flex-direction: row; overflow-x: auto; }
    .brand { margin-bottom: 0.5rem; }
    .sidebar-footer { display: none; }
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---- Print Styles ---- */
@media print {
    .sidebar, .topbar, .page-actions, .btn { display: none !important; }
    .main-content { margin-left: 0; padding: 0; }
    body { background: white; color: black; }
    .glass-panel { background: white; border: 1px solid #ddd; box-shadow: none; }
    table th, table td { border: 1px solid #ccc; }
}
