:root {
    /* Colors */
    --primary: #0F766E;
    --primary-hover: #0D9488;
    --primary-light: #CCFBF1;
    --sidebar-bg: #0F172A;
    --sidebar-active: #134E4A;
    --sidebar-hover: #1E293B;
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    
    /* Text */
    --text-dark: #0F172A;
    --text-normal: #334155;
    --text-muted: #64748B;
    
    /* Status */
    --success: #16A34A;
    --success-bg: #DCFCE7;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --danger: #DC2626;
    --danger-bg: #FEE2E2;
    --info: #2563EB;
    
    /* Layout & Shadows */
    --font-family: 'Inter', 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    --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);
    --radius-md: 10px;
    --radius-lg: 14px;
}

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-normal);
    font-size: 15px;
    line-height: 1.5;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-width: 260px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 20;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0F766E, #14B8A6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand h2 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #F8FAFC;
    margin: 0;
    line-height: 1.2;
}

.brand span {
    font-size: 0.75rem;
    color: #94A3B8;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-icon svg,
.stat-icon svg,
.btn-icon svg,
.toast-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.nav-btn .nav-icon {
    color: #CBD5E1;
    display: flex;
    align-items: center;
}

.nav-btn:hover {
    background-color: var(--sidebar-hover);
    color: #F1F5F9;
}

.nav-btn.active {
    background-color: var(--sidebar-active);
    color: #FFFFFF;
    border-left: 4px solid var(--primary-hover);
}

.nav-btn.active .nav-icon {
    color: #FFFFFF;
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    background-color: var(--bg-color);
    padding: 24px;
}

.page-section {
    width: 100%;
    max-width: 100%;
    display: none;
    animation: fadeSlideUp 0.4s ease-out;
}

.page-section.active {
    display: block;
}

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

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

/* ==========================================================================
   CARDS & DASHBOARD
   ========================================================================== */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 24px;
    min-width: 0;
    overflow: visible;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 4px solid transparent;
}

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

.stat-card.primary-top { border-top-color: var(--primary); }
.stat-card.success-top { border-top-color: var(--success); }
.stat-card.warning-top { border-top-color: var(--warning); }
.stat-card.danger-top { border-top-color: var(--danger); }
.stat-card.info-top { border-top-color: var(--info); }

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

.stat-header h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #CCFBF1;
    color: #0F766E;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon.primary { background-color: var(--primary-light); color: var(--primary); }
.stat-icon.success { background-color: var(--success-bg); color: var(--success); }
.stat-icon.warning { background-color: var(--warning-bg); color: var(--warning); }
.stat-icon.danger { background-color: var(--danger-bg); color: var(--danger); }
.stat-icon.info { background-color: #DBEAFE; color: var(--info); }

.stat-card p {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.1;
}

.text-primary { color: var(--primary) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.fw-bold { font-weight: 700; }

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-card {
    padding: 32px;
    overflow: visible;
}

.form-card h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 24px;
    font-weight: 600;
}

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

.single-col {
    grid-template-columns: 1fr !important;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-normal);
    margin-bottom: 8px;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

input, select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: #fff;
    height: 46px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

input::placeholder, select::placeholder {
    color: var(--text-muted);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

input.readonly, input[readonly] {
    background-color: #F1F5F9;
    cursor: not-allowed;
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Custom Searchable Dropdown */
.searchable-field {
    position: relative;
    width: 100%;
    overflow: visible;
    z-index: 99;
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    z-index: 99999;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}
.search-dropdown.hidden {
    display: none !important;
}
.search-option {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    color: #0F172A;
}
.search-option:hover,
.search-option.active {
    background: #ECFDF5;
    color: #0F766E;
}
.option-title {
    font-weight: 600;
    font-size: 14px;
}
.option-meta {
    margin-top: 3px;
    font-size: 12px;
    color: #64748B;
}
.search-empty {
    padding: 12px;
    font-size: 14px;
    color: #64748B;
}

.card,
.form-card,
.grid-form,
.page-section {
    overflow: visible;
}

.main-content {
    overflow-y: auto;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    align-items: center;
}

/* Split Layout for Inward */
.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 20px;
    align-items: start;
    overflow: visible;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-normal);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
}

.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.refresh-spin .btn-icon svg {
    animation: spinRefresh 0.8s linear infinite;
}

@keyframes spinRefresh {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.btn-sm { 
    padding: 6px 16px; 
    font-size: 0.85rem; 
    height: 34px;
    border-radius: 6px;
}

.btn-primary { 
    background-color: var(--primary); 
    color: white; 
    box-shadow: 0 2px 4px rgba(15, 118, 110, 0.2);
}
.btn-primary:hover { 
    background-color: var(--primary-hover); 
    box-shadow: 0 4px 6px rgba(15, 118, 110, 0.3);
}

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

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

.btn-secondary { background-color: #E2E8F0; color: var(--text-dark); }
.btn-secondary:hover { background-color: #CBD5E1; }

.btn-accent { background-color: var(--info); color: white; }
.btn-accent:hover { background-color: #1D4ED8; }

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-card {
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.table-toolbar {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg);
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.table-toolbar input,
.table-toolbar select {
    min-width: 180px;
    flex: 0 1 220px;
}

.ms-auto { margin-left: auto; }

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 520px;
}

table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

thead th {
    background-color: #F8FAFC;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

tbody td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-normal);
    vertical-align: middle;
    white-space: nowrap;
}

td.wrap,
.details-cell {
    white-space: normal;
    min-width: 220px;
    max-width: 420px;
}

tbody tr {
    transition: background-color 0.15s ease;
}

tbody tr:hover { background-color: #F1F5F9; }

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

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.row-check {
    display: inline-block;
}

/* Empty State */
.empty-state {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}
.empty-state svg {
    width: 48px;
    height: 48px;
    color: #CBD5E1;
    margin-bottom: 16px;
}
.empty-state h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* ==========================================================================
   BADGES & MESSAGES
   ========================================================================== */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}
.badge-normal { background-color: var(--success-bg); color: #166534; }
.badge-low { background-color: var(--warning-bg); color: #92400E; }
.badge-out { background-color: var(--danger-bg); color: #991B1B; }
.badge-info { background-color: #DBEAFE; color: #1E40AF; }
.empty-cell {
    padding: 18px;
    text-align: center;
    color: var(--text-muted);
}

.inline-msg {
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.small-msg { font-size: 0.85rem; }

.toast {
    position: fixed;
    top: 24px;
    right: 32px;
    padding: 16px 24px;
    background-color: var(--card-bg);
    color: var(--text-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 6px solid var(--primary);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    transform: translateX(0);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.text-success { border-left-color: var(--success); }
.toast.text-danger { border-left-color: var(--danger); }
.toast.text-warning { border-left-color: var(--warning); }

.toast.hidden {
    opacity: 0;
    transform: translateX(50px);
    pointer-events: none;
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    width: 440px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content h3 {
    margin-bottom: 16px;
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 700;
}

.modal-content p {
    color: var(--text-normal);
    margin-bottom: 28px;
    line-height: 1.6;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

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

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

/* ==========================================================================
   UTILITIES & RESPONSIVE
   ========================================================================== */
.hidden { display: none !important; }
.mt-3 { margin-top: 24px; }
.filter-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.text-center { text-align: center; }

@media (max-width: 1100px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        height: auto;
        max-height: 220px;
    }

    .main-content {
        height: calc(100vh - 220px);
        padding: 16px;
    }

    .dashboard-cards,
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-toolbar input,
    .table-toolbar select,
    .table-toolbar button {
        width: 100%;
        flex: none;
    }

    .table-toolbar .ms-auto {
        margin-left: 0;
    }
}

/* ==========================================================================
   CHARTS
   ========================================================================== */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-card {
    min-height: 360px;
    min-width: 0;
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

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

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

.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
}

canvas {
    max-width: 100%;
}

.chart-empty {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    border-radius: 12px;
    text-align: center;
}

@media (max-width: 1100px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   NEW ADDITIONS: Login, Search, Notifications, Modal, Print
   ========================================================================== */

/* Login Screen */
.login-screen {
    min-height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #0F172A 0%, #134E4A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-screen.hidden {
    display: none !important;
}

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

.app-container.hidden {
    display: none !important;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(135deg, #0F172A, #1E293B);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.login-box {
    background: #fff;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 400px;
}
.login-header {
    text-align: center;
    margin-bottom: 24px;
}
.login-header h2 {
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* Global Search */
.top-header {
    background: #fff;
    padding: 16px 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.global-search-container {
    position: relative;
    width: 300px;
}
.global-search-container .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
#global-search-input {
    width: 100%;
    padding: 10px 10px 10px 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    font-family: var(--font-family);
    transition: all 0.2s;
}
#global-search-input:focus {
    border-color: var(--primary);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-light);
}
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
}
.search-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-color);
    cursor: pointer;
    transition: background 0.2s;
}
.search-item:last-child {
    border-bottom: none;
}
.search-item:hover {
    background: var(--bg-color);
}
.search-item h4 {
    color: var(--text-dark);
    margin-bottom: 4px;
    font-size: 14px;
}
.search-item p {
    color: var(--text-muted);
    font-size: 12px;
}
.search-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--primary-light);
    color: var(--primary);
    margin-bottom: 4px;
}

/* Dashboard Notifications */
.notification-item {
    padding: 12px 16px;
    border-left: 4px solid var(--primary);
    background: var(--bg-color);
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notification-item.warning { border-color: var(--warning); background: var(--warning-bg); }
.notification-item.danger { border-color: var(--danger); background: var(--danger-bg); }
.notification-item.success { border-color: var(--success); background: var(--success-bg); }

/* Report Print Modal */
.report-preview-container {
    background: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.report-preview-toolbar {
    padding: 16px 24px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.print-page {
    padding: 40px;
    background: #fff;
    overflow-y: auto;
    flex: 1;
    color: #000;
}
.print-page h2, .print-page h3 {
    text-align: center;
    margin-bottom: 16px;
    color: #000;
}
.print-page table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.print-page th, .print-page td {
    border: 1px solid #000;
    padding: 8px 12px;
    text-align: left;
    font-size: 12px;
}
.print-page th {
    background: #f0f0f0;
    font-weight: bold;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .no-print, .no-print * {
        display: none !important;
    }
    #report-print-area, #report-print-area * {
        visibility: visible;
    }
    #report-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
}

/* --- New Layouts for Inward --- */
.inward-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 20px;
    align-items: start;
    overflow: visible;
}

@media (max-width: 1100px) {
    .inward-layout {
        grid-template-columns: 1fr;
    }
}

.quick-add-panel {
    background: #f8fafc;
    border-left: 4px solid #0f766e;
}

.quick-add-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 15px;
}

.quick-add-tabs .tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.quick-add-tabs .tab-btn.active {
    color: #0f766e;
    border-bottom-color: #0f766e;
}

.quick-add-tabs .tab-btn:hover:not(.active) {
    color: #334155;
    background: #f1f5f9;
}

/* --- Custom Dropdown --- */
.custom-dropdown {
    position: relative;
    width: 100%;
    z-index: 99;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dropdown-list .dd-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-list .dd-item:hover, .dropdown-list .dd-item.selected {
    background: #f0fdfa;
}

.dropdown-list .dd-title {
    font-weight: 600;
    color: #1e293b;
    display: block;
}

.dropdown-list .dd-desc {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
}

/* --- Charts Layout --- */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-card {
    min-height: 360px;
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

@media (max-width: 1100px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}
