:root {
    --bg-base: #06090e;
    --bg-surface: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(56, 189, 248, 0.3);
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-purple: #8b5cf6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    padding: 14px 20px;
}

.container {
    max-width: 1840px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.brand-title { display: flex; align-items: center; gap: 12px; }
.logo-box {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px; color: #fff;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

h1 { font-size: 19px; font-weight: 800; letter-spacing: -0.5px; margin: 0; }

/* Navigation Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #e2e8f0 !important;
    text-decoration: none !important;
    padding: 0 14px;
    height: 34px;
    box-sizing: border-box;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}
.nav-btn:visited {
    color: #e2e8f0 !important;
    text-decoration: none !important;
}
.nav-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #ffffff !important;
    border-color: #38bdf8;
}
.nav-btn.active {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff !important;
    border-color: #60a5fa;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    padding: 0 14px;
    height: 34px;
    box-sizing: border-box;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
    border-color: #ef4444;
}

/* Toolbar */
.toolbar {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
}
.filter-group { display: flex; gap: 6px; align-items: center; }
.toolbar-label { font-size: 13px; font-weight: 800; color: #cbd5e1; margin-right: 4px; }
.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

/* Search Bar (Dark Styled) */
.search-wrap {
    display: flex;
    align-items: center;
    position: relative;
}
.search-icon {
    position: absolute;
    left: 10px;
    font-size: 13px;
    color: #94a3b8;
    pointer-events: none;
}
.search-wrap input {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #f8fafc;
    border-radius: 6px;
    padding: 6px 12px 6px 32px;
    font-size: 12.5px;
    width: 250px;
    outline: none;
    transition: all 0.15s ease;
}
.search-wrap input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
    width: 280px;
}
.search-wrap input::placeholder {
    color: #64748b;
}

/* ========================================================
   📱 Mobile & Tablet Universal Responsive Design Standards
   ======================================================== */

/* Tablet Responsive (max-width: 1024px) */
@media (max-width: 1024px) {
    body {
        padding: 10px 14px;
    }
    .container {
        gap: 10px;
    }
    header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 16px;
    }
    .brand-title {
        justify-content: flex-start;
    }
    .brand-title h1 {
        font-size: 17px;
    }
    .nav-right {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    .nav-btn {
        padding: 0 11px;
        height: 32px;
        font-size: 12px;
    }
    .portal-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .search-wrap input {
        width: 100% !important;
    }
}

/* Mobile Phone Responsive (max-width: 768px) */
@media (max-width: 768px) {
    body {
        padding: 6px 8px;
    }
    .container {
        padding: 4px 6px !important;
        gap: 8px;
    }
    header {
        padding: 10px 12px;
        border-radius: 6px;
    }
    .logo-box {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .brand-title h1 {
        font-size: 15px;
    }
    .brand-title p {
        font-size: 10px !important;
    }
    .nav-right {
        gap: 5px;
        scrollbar-width: thin;
    }
    .nav-btn {
        padding: 0 9px;
        height: 30px;
        font-size: 11.5px;
        border-radius: 5px;
    }
    .nav-user-badge {
        padding: 4px 8px !important;
        font-size: 11.5px !important;
    }
    .btn-logout {
        height: 30px;
        padding: 0 10px;
        font-size: 11.5px;
    }
    .portal-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .portal-card {
        padding: 13px 14px !important;
    }
    .filter-group {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .filter-btn {
        padding: 4px 9px;
        font-size: 11px;
    }
    /* Smooth Touch Scrolling on all overflow tables */
    .alloc-table-wrap, .bar-chart-wrapper {
        -webkit-overflow-scrolling: touch;
    }
}

/* Small Smartphone Responsive (max-width: 480px) */
@media (max-width: 480px) {
    .brand-title h1 {
        font-size: 14px;
    }
    .nav-btn {
        padding: 0 7px;
        font-size: 11px;
    }
}

