/* ============================================================
   PSM B2B PROCUREMENT & SOURCING INTELLIGENCE
   Enterprise Ultra-Premium Design System (PT PROLED SUKSES MAKMUR)
   ============================================================ */

:root {
    color-scheme: dark;
    --bg-body: #070b14;
    --bg-surface: #0f172a;
    --bg-surface-elevated: #1e293b;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(16, 185, 129, 0.5);
    --border-accent: rgba(56, 189, 248, 0.4);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    /* Commercial & Procurement Palette */
    --accent: #10b981;          /* Emerald / Commercial */
    --accent-glow: rgba(16, 185, 129, 0.35);
    --accent-light: #34d399;
    --cyan: #38bdf8;
    --cyan-glow: rgba(56, 189, 248, 0.3);
    --gold: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.3);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --purple: #8b5cf6;

    /* Sektor Tags */
    --tag-tni: #059669;
    --tag-polri: #2563eb;
    --tag-bumn: #d97706;
    --tag-swasta: #64748b;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(56, 189, 248, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
}

/* ==================== AMBIENT & SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: #090d16;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* ==================== HEADER (ENTERPRISE DOCK - IDENTIK DENGAN ABSENSI & INVENTORY) ==================== */
header.app-header {
    background: linear-gradient(to right, #020617, #0f172a);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 18px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

/* --- LOGO SECTION --- */
.logo-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.brand-logo-floating {
    width: 68px;
    height: 68px;
    vertical-align: middle;
    border-radius: 0;
    mix-blend-mode: lighten;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.55));
    flex-shrink: 0;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.brand-logo-floating:hover {
    filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.85));
}

.logo-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.logo-title-container h1 {
    font-size: 22px;
    color: #38bdf8; /* Glowing Electric Cyan identik ABSENSI & INVENTORY */
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
    letter-spacing: -0.3px;
}

.badge-flag {
    display: inline-flex;
    align-items: center;
    background: #f59e0b;
    color: #0f172a;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 10px;
    transform: skewX(-20deg);
    margin-left: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.badge-flag span {
    transform: skewX(20deg);
    display: block;
    color: #0f172a;
    font-weight: 900;
}

.brand-subtitle {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 1px;
}

/* --- HEADER RIGHT SECTION --- */
.header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: auto;
    justify-content: flex-end;
    position: relative;
    z-index: 20;
    flex-wrap: nowrap;
}

/* Portal Back Button */
.btn-portal-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-portal-back:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

/* Unified Status Bar - Box Shape (32px Height) */
.unified-status-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0;
    gap: 0;
    cursor: default;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 32px;
    overflow: hidden;
}

.status-indicator,
.sync-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    padding: 0 8px;
    height: 100%;
    cursor: pointer;
    transition: background 0.2s;
}

.status-indicator:hover,
.sync-indicator:hover {
    background: rgba(255, 255, 255, 0.08);
}

.status-divider {
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
}

.online-dot-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    position: relative;
    display: inline-block;
}

#onlineCountText {
    color: #22c55e;
    font-size: 11px;
    font-weight: 600;
}

.sync-indicator i {
    font-size: 10px;
    color: #38bdf8;
    transition: transform 0.5s;
}

#unifiedText {
    letter-spacing: 0.5px;
    color: #22c55e;
    font-weight: 700;
}

.chip-time {
    font-size: 9px;
    opacity: 0.7;
    font-weight: 500;
    color: #cbd5e1;
    margin-left: 2px;
}

/* Auto Backup Status (32px Height) */
.backup-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 8px;
    height: 32px;
    border-radius: 4px;
    font-size: 9px;
    font-family: 'Roboto Mono', monospace, -apple-system, sans-serif;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    flex-shrink: 0;
}

.backup-status.inactive {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.backup-status.inactive i {
    color: #f87171;
}

.backup-status.active {
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.backup-status.active i {
    color: #34d399;
}

.backup-status:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

/* User Badge - Royal Gold Ghost Style (32px Height) */
.user-badge-elegant {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
    height: 32px;
    border-radius: 4px;
    font-size: 9px;
    font-family: 'Roboto Mono', monospace, -apple-system, sans-serif;
    font-weight: 700;
    white-space: nowrap;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    flex-shrink: 0;
}

.user-badge-elegant.admin-root-gold,
.user-badge-elegant.badge-admin-root-gold {
    background: linear-gradient(135deg, #020617 0%, #1e1b4b 100%) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.8) !important;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3) !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-badge-elegant.admin-root-gold i,
.user-badge-elegant.badge-admin-root-gold i {
    color: #fbbf24 !important;
}

.header-username {
    color: #fef3c7;
    font-weight: 800;
    font-size: 10px;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.25);
}

.header-role-tag {
    display: inline-flex;
    align-items: center;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 2.5px 7px;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.35) 0%, rgba(245, 158, 11, 0.25) 50%, rgba(251, 191, 36, 0.35) 100%);
    border: 1px solid rgba(251, 191, 36, 0.6);
    color: #fde68a;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
    white-space: nowrap;
}

.user-badge-elegant.admin {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.user-badge-elegant.supervisor {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.user-badge-elegant:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
}

/* Logout Button (32px Height) */
.logout-btn-elegant {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logout-btn-elegant:hover {
    background: rgba(239, 68, 68, 0.22);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.5);
    transform: scale(1.04);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.logout-btn-elegant i {
    font-size: 12px;
}

/* ==================== NAVIGATION BAR (COMPACT ENTERPRISE DOCK - 1 BALANCED SINGLE ROW) ==================== */
nav.app-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 10px;
    flex-wrap: nowrap;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.nav-tab {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 6px 3px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
    box-sizing: border-box;
}

.nav-tab i {
    font-size: 10px;
    color: #38bdf8; /* Bright electric cyan identik ABSENSI & INVENTORY */
    opacity: 0.85;
    transition: color 0.2s, transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.nav-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.nav-tab:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.22) !important;
    font-weight: 800 !important;
}

.nav-tab.active i {
    color: #38bdf8 !important;
    opacity: 1 !important;
}

.nav-tab .badge-count {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 8px;
    font-weight: 800;
    padding: 0.5px 4px;
    border-radius: 6px;
    margin-left: 2px;
    font-variant-numeric: tabular-nums;
    transition: all 0.2s;
    flex-shrink: 0;
}

.nav-tab:hover .badge-count {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.nav-tab.active .badge-count {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

@media (max-width: 1100px) {
    .nav-tab {
        padding: 5px 2px;
        font-size: 8.5px;
        gap: 3px;
        letter-spacing: 0;
    }
    .nav-tab i {
        font-size: 9px;
    }
    .nav-tab .badge-count {
        padding: 0 3px;
        font-size: 7.5px;
    }
}

/* ==================== MAIN CONTENT LAYOUT ==================== */
main.app-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 24px 60px 24px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}
.tab-pane.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== STATS ROW ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, border-color 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.stat-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-light); border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-icon.cyan    { background: rgba(56, 189, 248, 0.15); color: var(--cyan); border: 1px solid rgba(56, 189, 248, 0.3); }
.stat-icon.gold    { background: rgba(245, 158, 11, 0.15); color: var(--gold); border: 1px solid rgba(245, 158, 11, 0.3); }
.stat-icon.purple  { background: rgba(139, 92, 246, 0.15); color: var(--purple); border: 1px solid rgba(139, 92, 246, 0.3); }

.stat-info .stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.stat-info .stat-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 3px;
}

/* ==================== ACTION TOOLBAR ==================== */
.toolbar-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    flex: 1;
    min-width: 240px;
    max-width: 480px;
}
.search-box i {
    color: var(--text-dim);
}
.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 12.5px;
    width: 100%;
    outline: none;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-select {
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
    color: #041f16;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

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

.btn-cyan {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
}
.btn-cyan:hover {
    filter: brightness(1.1);
}

.btn-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a;
}

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

/* ==================== TABLES ==================== */
.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

table.enterprise-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

table.enterprise-table thead th {
    background: rgba(2, 6, 23, 0.85);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table.enterprise-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background-color 0.15s;
}
table.enterprise-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

table.enterprise-table tbody td {
    padding: 12px 14px;
    color: var(--text-main);
    vertical-align: middle;
}

/* ==================== TAGS & PILLS ==================== */
.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tag-tni     { background: rgba(5, 150, 105, 0.18); color: #34d399; border: 1px solid rgba(5, 150, 105, 0.35); }
.tag-polri   { background: rgba(37, 99, 235, 0.18); color: #60a5fa; border: 1px solid rgba(37, 99, 235, 0.35); }
.tag-bumn    { background: rgba(217, 119, 6, 0.18); color: #fbbf24; border: 1px solid rgba(217, 119, 6, 0.35); }
.tag-energi  { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.tag-tol     { background: rgba(14, 165, 233, 0.18); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.35); }
.tag-pemda   { background: rgba(168, 85, 247, 0.18); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); }
.tag-swasta  { background: rgba(100, 116, 139, 0.18); color: #cbd5e1; border: 1px solid rgba(100, 116, 139, 0.35); }

.tag-tkdn    { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 800; display: inline-flex; align-items: center; gap: 3px; }
.tag-atex    { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.4); font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 800; display: inline-flex; align-items: center; gap: 3px; }
.tag-sni     { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 800; display: inline-flex; align-items: center; gap: 3px; }

.tag-status-deal   { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.tag-status-quote  { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.tag-status-review { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.tag-status-reject { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

.tag-create   { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 4px; }
.tag-update   { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 4px; }
.tag-delete   { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 4px; }
.tag-system   { background: rgba(168, 85, 247, 0.18); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 4px; }

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.settings-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.danger-card {
    border-color: rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(15, 23, 42, 0.9));
}

/* ==================== SOURCING COMPARATOR CARD ==================== */
.compare-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.compare-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    position: relative;
    transition: all 0.2s;
}
.compare-card.recommended {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}
.compare-card.recommended::before {
    content: "REKOMENDASI TERBAIK";
    position: absolute;
    top: -10px;
    right: 14px;
    background: var(--accent);
    color: #041f16;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ==================== MODAL STYLES ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-overlay.active {
    display: flex;
}

.modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-dialog.modal-lg {
    max-width: 950px;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 5;
}
.modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
}
.btn-close-modal:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: var(--bg-surface);
}

/* Form Controls */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group.col-full {
    grid-column: span 2;
}
.form-group label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
}
.form-control {
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 9px 12px;
    color: #fff;
    font-size: 12.5px;
    outline: none;
    transition: border-color 0.2s;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* ==================== LOGIN SCREEN OVERLAY (HARMONIS, ELEGAN & MINIMALIS) ==================== */
@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes logoBreathe {
    0%, 100% {
        transform: scale(1) translateY(0);
        filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.35));
    }
    50% {
        transform: scale(1.03) translateY(-7px);
        filter: drop-shadow(0 0 24px rgba(16, 185, 129, 0.75));
    }
}

#loginScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-card {
    background: var(--bg-card);
    padding: 36px 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

.login-logo-container {
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.login-logo-glow {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.45) 0%, transparent 70%);
    filter: blur(14px);
    z-index: 0;
}

.login-logo-animated {
    width: 180px;
    height: 180px;
    border-radius: 0;
    object-fit: contain;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.65));
    mix-blend-mode: screen;
    animation: logoEntrance 1s ease-out forwards, logoBreathe 4s ease-in-out infinite 1s;
}

.login-title {
    color: white;
    margin-bottom: 4px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-top: 10px;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 11px;
    margin-bottom: 24px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-version-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--accent);
}

.login-version-tag {
    color: var(--accent);
    font-weight: 700;
}

/* Minimalist Integrated Input Groups (With Subtle Icon & Eye Toggle) */
.login-field-group {
    position: relative;
    width: 100%;
    margin-bottom: 12px;
}

.login-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 13px;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 2;
}

.login-field-group input {
    width: 100%;
    height: 42px;
    padding: 0 40px 0 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #020617;
    color: white;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.login-field-group:focus-within .login-field-icon {
    color: var(--accent);
}

.login-toggle-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s;
    z-index: 2;
}

.login-toggle-eye:hover {
    color: #ffffff;
}

.caps-warning-pill {
    font-size: 10.5px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 6px;
    padding: 4px 10px;
    margin-bottom: 10px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: modalIn 0.2s ease;
}

.login-btn-clean {
    width: 100%;
    height: 42px;
    justify-content: center;
    padding: 0 16px;
    background: var(--accent);
    color: #041f16;
    border: none;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.login-btn-clean:hover:not(:disabled) {
    background: #34d399;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.login-btn-clean:active:not(:disabled) {
    transform: translateY(1px);
}

.login-btn-clean:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-error-clean {
    color: var(--danger);
    font-size: 11px;
    margin-top: 12px;
    display: none;
    background: rgba(239, 68, 68, 0.1);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    text-align: left;
    line-height: 1.4;
}

.login-footer-clean {
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-portal-back {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.login-portal-back i {
    font-size: 11px;
    transition: transform 0.2s ease;
    color: var(--accent);
}

.login-portal-back:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.login-portal-back:hover i {
    transform: translateX(-3px);
}

/* ==================== PRINTABLE SPH SHEET ==================== */
@media print {
    body * {
        visibility: hidden;
    }
    #sphPrintPreview, #sphPrintPreview * {
        visibility: visible;
    }
    #sphPrintPreview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff !important;
        color: #000 !important;
        padding: 20mm;
    }
    header, nav, .toolbar-panel, .btn, .modal-footer {
        display: none !important;
    }
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast-item {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--accent);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px rgba(16, 185, 129, 0.25);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}
.toast-item.warning {
    border-color: var(--gold);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px rgba(245, 158, 11, 0.25);
}
.toast-item.error {
    border-color: var(--danger);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px rgba(239, 68, 68, 0.25);
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

