/* ==========================================================================
   WASTE TRACKING PoC — FLAT SIMPLE DESIGN SYSTEM (styles.css)
   ========================================================================== */

/* --- 1. DESIGN TOKENS & VARIABLES (Corporate Minimalist / Clean SaaS) --- */
:root {
    /* Luxury Palette - Sesuai Aturan Kernel Modul 2 */
    --bg-modern: hsl(40, 20%, 96%);        /* Ivory/Cream */
    --surface-modern: hsl(40, 15%, 100%);  /* Pure White */
    --accent-flat: hsl(45, 65%, 52%);      /* Gold */
    --accent-flat-dark: hsl(45, 65%, 42%); /* Dark Gold */
    --accent-flat-light: hsl(45, 45%, 75%);/* Light Gold */
    --accent-flat-glow: rgba(212, 175, 55, 0.15); /* Gold glow */
    
    /* Functional Colors */
    --text-primary: hsl(220, 15%, 12%);    /* Near Black */
    --text-secondary: hsl(220, 8%, 50%);   /* Warm Gray */
    --text-muted: hsl(220, 6%, 70%);       /* Dimmed text */
    --border-modern: hsl(40, 15%, 88%);    /* Warm Light Gray */
    --border-modern-active: hsl(45, 65%, 52%); /* Gold active border */
    
    --success: hsl(145, 60%, 40%);         /* Modern emerald green */
    --success-light: hsl(145, 65%, 96%);
    --danger: hsl(355, 75%, 50%);          /* Modern bright red */
    --danger-light: hsl(355, 80%, 97%);
    
    /* Clean Flat Shadows (Linear/Stripe style) */
    --shadow-premium: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04); /* Barely-there shadow */
    --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-inner: none;
    
    /* Typography & Boundaries */
    --font-heading: 'Cormorant Garamond', 'Inter', -apple-system, sans-serif; /* Serif — elegant luxury */
    --font-body: 'Inter', -apple-system, sans-serif;
    --border-radius: 4px; /* Refined, subtle. Sesuai Aturan Kernel Modul 2 */
    --transition-smooth: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 100ms ease;
}

/* --- 2. BASE RESET & BODY STYLING --- */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Mencegah scrolling di level html/body */
    touch-action: pan-y; /* Hanya izinkan vertical pan/scroll, nonaktifkan pinch-zoom dan double-tap zoom */
    user-select: none; /* Mencegah seleksi teks global agar terasa native */
    -webkit-user-select: none;
}

input, textarea, [contenteditable="true"] {
    user-select: text !important;
    -webkit-user-select: text !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-modern);
    color: var(--text-primary);
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}

/* Super Subtle Modern Background Orbs */
.modern-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background-color: hsl(220, 90%, 90%);
    top: -200px;
    left: -200px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background-color: hsl(260, 80%, 92%);
    bottom: -150px;
    right: -150px;
}

/* --- 3. PREMIUM SMARTPHONE DEVICE FRAME --- */
.app-container {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}

/* Flat Sleek Bezel */
.device-frame {
    position: relative;
    width: 400px;
    height: 820px;
    background-color: var(--surface-modern);
    border: 10px solid hsl(220, 15%, 15%); /* Slate black solid bezel */
    border-radius: 36px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05), 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-smooth);
}

/* Bezel inner border */
.device-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 26px;
    pointer-events: none;
}

/* Speaker & Notch Mock */
.device-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 24px;
    background-color: hsl(220, 15%, 15%);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    z-index: 999;
}

.device-speaker {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 3px;
    background-color: hsl(220, 10%, 25%);
    border-radius: 1.5px;
    z-index: 1000;
}

/* Home Indicator */
.device-home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: hsla(220, 15%, 12%, 0.1);
    border-radius: 2px;
    z-index: 999;
    pointer-events: none;
}

/* Responsive collapse on mobile */
@media (max-width: 640px) {
    body {
        background-color: var(--surface-modern);
        align-items: stretch;
    }
    
    .app-container {
        padding: 0;
    }
    
    .device-frame {
        width: 100vw;
        height: 100vh;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    
    .device-notch, 
    .device-speaker, 
    .device-home-indicator {
        display: none;
    }
    
    .device-status-bar {
        padding-top: 12px;
    }
}

/* --- 4. PHONE STATUS BAR --- */
.device-status-bar {
    height: 34px;
    padding: 6px 20px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--surface-modern);
    z-index: 990;
    user-select: none;
}

.status-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-primary);
}

.status-icon {
    width: 13px;
    height: 13px;
    stroke-width: 2.2px;
}

.status-network {
    font-size: 9px;
    font-weight: 800;
    margin-right: 1px;
    letter-spacing: 0.05em;
}

/* --- 5. APP HEADER --- */
.app-header {
    height: 50px;
    border-bottom: 1px solid var(--border-modern);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--surface-modern);
    z-index: 980;
}

.header-title {
    font-family: var(--font-body); /* flattened */
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-transform: uppercase;
    text-align: center;
    flex-grow: 1;
}

.back-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.back-btn:hover {
    background-color: var(--bg-modern);
}

.back-btn:active {
    transform: scale(0.96);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--success-light);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid hsla(145, 60%, 40%, 0.15);
}

.sync-dot {
    width: 5px;
    height: 5px;
    background-color: var(--success);
    border-radius: 50%;
}

.sync-text {
    font-size: 8px;
    font-weight: 800;
    color: var(--success);
    letter-spacing: 0.05em;
}

/* Pulsing state */
.pulsing {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
    }
}

/* --- 6. SCROLLABLE APP MAIN CONTENT --- */
.app-content {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden; /* Tambahkan untuk mengunci scroll horizontal */
    background-color: var(--bg-modern);
    position: relative;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.app-content::-webkit-scrollbar {
    display: none;
}

/* View Switcher */
.app-view {
    display: none;
    flex-direction: column;
    flex-grow: 1;
    animation: fadeSlideIn 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-view.active {
    display: flex;
}

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

/* --- 7. BOTTOM NAVIGATION BAR (TAB BAR) --- */
.app-nav {
    height: 60px;
    border-top: 1px solid var(--border-modern);
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--surface-modern);
    padding: 0 8px constant(safe-area-inset-bottom) 8px; /* Safe area support */
    padding: 0 8px env(safe-area-inset-bottom) 8px;
    z-index: 980;
    container-type: inline-size; /* Enable container queries for fluid scaling */
}

.nav-item {
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-grow: 1;
    max-width: 90px;
    padding: 6px 4px;
    border-radius: var(--border-radius);
    outline: none;
}

.nav-item i {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
    transition: var(--transition-smooth);
}

.nav-item span {
    font-size: clamp(8px, 2.3cqi, 10px); /* Fluid typography */
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
    transition: var(--transition-smooth);
}

.nav-item:hover, .nav-item:focus {
    color: var(--text-primary);
    background-color: var(--accent-flat-glow);
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-item.active {
    color: var(--accent-flat);
}

.nav-item.active i {
    color: var(--accent-flat);
    transform: translateY(-1px);
}

/* --- 8. GLOBAL FLAT FORM & ELEMENTS --- */
.section-header {
    margin-bottom: 20px;
}

.section-tag {
    font-size: 9px;
    font-weight: 800;
    color: var(--accent-flat);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 2px;
}

.section-header h2 {
    font-family: var(--font-body); /* flattened */
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

/* Forms */
.luxury-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Crisp Flat Inputs */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

.input-modern, .select-modern, .textarea-modern {
    width: 100%;
    padding: 14px 16px 14px 42px; font-size: 15px;
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition-fast);
    box-shadow: none;
}

.select-modern {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='hsl(220, 12%25, 46%25)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px;
}

.textarea-modern {
    resize: none;
    height: 80px;
    padding-left: 38px;
    line-height: 1.4;
}

/* Hover & Focus states */
.input-modern:hover, .select-modern:hover, .textarea-modern:hover {
    border-color: var(--text-secondary);
}

.input-modern:focus, .select-modern:focus, .textarea-modern:focus {
    border-color: var(--accent-flat);
    box-shadow: 0 0 0 2px var(--accent-flat-glow);
}

.input-modern:focus + .input-icon, .select-modern:focus + .input-icon, .textarea-modern:focus + .input-icon {
    color: var(--accent-flat);
}

/* Premium Flat Buttons (SaaS Solid Style) */
.btn {
    border: none;
    border-radius: var(--border-radius);
    padding: 16px 24px; font-size: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-smooth);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn-small {
    padding: 6px 12px;
    font-size: 10px;
    border-radius: 4px;
}

/* Flat High-Contrast Solid Primary Button (Linear style) */
.btn-primary {
    background-color: var(--accent-flat); /* Modern Emerald Green */
    color: var(--surface-modern);
    border: 1px solid var(--accent-flat);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background-color: var(--accent-flat-dark);
    border-color: var(--accent-flat-dark);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.96); /* Emil active press feedback */
}

.btn-primary:disabled {
    background: hsl(220, 8%, 90%);
    border-color: hsl(220, 8%, 88%);
    color: hsl(220, 5%, 65%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* No golden shine */
.btn-primary-flat::after {
    display: none;
}

/* Secondary Crisp Outline Button */
.btn-secondary {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background-color: var(--bg-modern);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: scale(0.96);
}

.btn-outline-flat {
    border-color: var(--border-modern);
}

.btn-outline-flat:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* --- 9. VIEW: LOGIN --- */
.login-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    padding: 5px 0;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.brand-logo-flat {
    width: 52px;
    height: 52px;
    background-color: var(--text-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    color: var(--surface-modern);
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.brand-logo-flat i {
    width: 24px;
    height: 24px;
}

.login-brand h2 {
    font-family: var(--font-body); /* flattened */
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.brand-subtitle {
    font-size: 9px;
    font-weight: 800;
    color: var(--accent-flat);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.demo-divider {
    text-align: center;
    margin: 20px 0 10px 0;
    position: relative;
}

.demo-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--border-modern);
    z-index: 1;
}

.demo-divider span {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    background-color: var(--bg-modern);
    padding: 0 8px;
    position: relative;
    z-index: 2;
}

/* Expandable Quick Demo Dropdown style */
.demo-quick-login-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#btn-toggle-demo-roles {
    width: 100%;
    justify-content: center;
    gap: 8px;
    border-color: var(--border-modern);
    background: transparent;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    cursor: pointer;
}

#btn-toggle-demo-roles:hover {
    background-color: var(--bg-modern);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

#btn-toggle-demo-roles:active {
    transform: scale(0.98);
}

.demo-role-item-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}

.demo-role-item-btn:hover {
    background-color: var(--bg-modern);
}

.demo-role-item-btn:active {
    transform: scale(0.98);
}

/* --- 10. VIEW: SCAN HUB & SIMULATED CAMERA --- */
.scan-hub-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Camera viewport simulation */
.camera-viewport-card {
    background-color: hsl(220, 15%, 8%);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-modern);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-premium);
}

.scanner-frame {
    height: 180px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.3)), 
                radial-gradient(ellipse at center, rgba(16, 24, 40, 0.3) 0%, rgba(10, 12, 15, 0.8) 100%);
}

/* Flat Neon Laser Scan Line */
.scanner-laser {
    position: absolute;
    width: 80%;
    height: 2px;
    background: var(--accent-flat);
    box-shadow: 0 0 8px 1px rgba(37, 99, 235, 0.6);
    top: 15%;
    animation: laserScan 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes laserScan {
    0% { top: 15%; }
    50% { top: 85%; }
    100% { top: 15%; }
}

/* Viewfinder Target corners (Minimalist Thin) */
.scanner-target-corners {
    position: absolute;
    width: 120px;
    height: 120px;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent-flat);
}

.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

.scanner-overlay-icon {
    position: absolute;
    opacity: 0.1;
    color: var(--surface-modern);
}

.scanner-overlay-icon i {
    width: 56px;
    height: 56px;
}

.scanner-instruction {
    padding: 10px;
    background-color: hsl(220, 15%, 5%);
    color: hsla(0, 0%, 100%, 0.6);
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Simulator Helper Panel */
.scanner-simulation-panel {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}

.scanner-simulation-panel .panel-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.scanner-simulation-panel .panel-header i {
    width: 14px;
    height: 14px;
    color: var(--accent-flat);
}

.scanner-simulation-panel .panel-header span {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.qr-tags-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 2px;
}

.qr-tag-btn {
    border: 1px solid var(--border-modern);
    background-color: var(--bg-modern);
    border-radius: 4px;
    padding: 8px 10px;
    text-align: left;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qr-tag-btn:hover {
    border-color: var(--text-secondary);
    background-color: var(--surface-modern);
    transform: translateX(1px);
}

.qr-tag-btn:active {
    transform: scale(0.98);
}

.qr-tag-btn .info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.qr-tag-btn .title {
    font-weight: 700;
    color: var(--text-primary);
}

.qr-tag-btn .sub {
    font-size: 9px;
    color: var(--text-secondary);
}

.qr-tag-btn .scan-action {
    font-size: 8px;
    font-weight: 800;
    color: var(--accent-flat);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 2px;
}

.manual-input-divider {
    text-align: center;
    margin: 8px 0 12px 0;
    position: relative;
}

.manual-input-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--border-modern);
    z-index: 1;
}

.manual-input-divider span {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    background-color: var(--bg-modern);
    padding: 0 8px;
    position: relative;
    z-index: 2;
}

.manual-input-group {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.input-manual {
    flex-grow: 1;
    padding: 10px 12px;
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    outline: none;
    font-size: 12px;
    transition: var(--transition-fast);
}

.input-manual:focus {
    border-color: var(--accent-flat);
}

.btn-manual-submit {
    padding: 0 14px;
}

.status-sync-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-modern);
}

.sync-time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 10px;
}

.sync-time i {
    width: 10px;
    height: 10px;
}

.online-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 800;
    color: var(--success);
}

.badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--success);
}

/* --- 11. PHYSICAL STICKER QR VIEW MOCKUP (Minimalist Flat) --- */
.qr-sticker-mockup {
    background-color: var(--surface-modern);
    border: 1px solid var(--text-primary); /* Solid flat borders */
    padding: 16px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 280px;
    margin: 8px auto 20px auto;
    position: relative;
}

.sticker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid var(--border-modern);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.sticker-brand {
    font-family: var(--font-body); /* flattened */
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.sticker-badge {
    font-size: 8px;
    font-weight: 800;
    color: var(--surface-modern);
    background-color: var(--text-primary);
    padding: 1px 5px;
    border-radius: 2px;
}

.sticker-qr-container {
    width: 130px;
    height: 130px;
    background-color: #fff;
    border: 1px solid var(--border-modern);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.sticker-id {
    font-family: var(--font-body); /* flattened */
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.sticker-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 12px;
    width: 100%;
    padding-top: 8px;
    border-top: 1px dashed var(--border-modern);
}

.sticker-detail-item {
    display: flex;
    flex-direction: column;
}

.sticker-detail-item .label {
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.sticker-detail-item .val {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Success ring badge (Flat) */
.success-badge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 8px 0 16px 0;
}

.success-icon-flat {
    width: 48px;
    height: 48px;
    background-color: var(--text-primary);
    color: var(--surface-modern);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: none;
}

.success-icon-flat i {
    width: 22px;
    height: 22px;
    stroke-width: 2.8px;
}

.success-title {
    font-family: var(--font-body); /* flattened */
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.result-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}

/* --- 12. VIEW: MANIFEST DETAIL --- */
.manifest-info-card {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.card-glow {
    display: none; /* Hide flashy glow effects */
}

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

.manifest-header h3 {
    font-family: var(--font-body); /* flattened */
    font-size: 18px;
    font-weight: 800;
}

.badge-status {
    font-size: 8px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 2px;
}

.badge-status.ready {
    background-color: var(--accent-flat-glow);
    color: var(--accent-flat-dark);
    border: 1px solid hsla(220, 90%, 56%, 0.15);
}

.manifest-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-modern);
    padding-bottom: 10px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.meta-row .label {
    color: var(--text-muted);
}

.meta-row .value {
    font-weight: 700;
    color: var(--text-primary);
}

.manifest-stats {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-box .num {
    font-family: var(--font-body); /* flattened */
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-box .lbl {
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.stat-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-modern);
}

.packages-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.packages-list-header h4 {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.packages-scroll-area {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.empty-packages-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 8px;
    color: var(--text-muted);
}

.empty-packages-state i {
    width: 28px;
    height: 28px;
    margin-bottom: 6px;
}

.empty-packages-state p {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.empty-packages-state .sub {
    font-size: 9px;
}

.package-list-item {
    background-color: var(--bg-modern);
    border: 1px solid var(--border-modern);
    padding: 8px 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.package-list-item:hover {
    border-color: var(--text-secondary);
}

.package-list-item .left-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.package-list-item .left-info .pkg-id {
    font-family: var(--font-body); /* flattened */
    font-weight: 800;
    font-size: 13px;
    color: var(--text-primary);
}

.package-list-item .left-info .pkg-type {
    font-size: 9px;
    font-weight: 800;
    color: var(--accent-flat);
}

.package-list-item .pkg-weight {
    font-weight: 700;
    font-size: 11px;
}

.manifest-actions {
    margin-top: auto;
}

/* --- 13. STEPPER PROGRESS (OUTBOUND/INBOUND) --- */
.stepper-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.stepper-bullets {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0 20px 0;
}

.stepper-bullets .bullet {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border-modern);
    background-color: var(--surface-modern);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    z-index: 2;
}

.stepper-bullets .bullet.active {
    background-color: var(--text-primary);
    color: var(--surface-modern);
    border-color: var(--text-primary);
    box-shadow: none;
}

.stepper-bullets .bullet.completed {
    background-color: var(--accent-flat);
    color: var(--surface-modern);
    border-color: var(--accent-flat);
}

.stepper-bullets .line {
    flex-grow: 1;
    max-width: 40px;
    height: 1px;
    background-color: var(--border-modern);
    z-index: 1;
}

.step-card {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
    flex-grow: 1;
    justify-content: center;
}

.step-icon-glow {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--accent-flat-glow);
    color: var(--accent-flat);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.step-icon-glow i {
    width: 24px;
    height: 24px;
}

.step-headline {
    font-family: var(--font-body); /* flattened */
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.step-desc {
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 250px;
    margin-bottom: 20px;
}

.verified-summary-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.summary-item {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-item .icon {
    width: 16px;
    height: 16px;
}

.summary-item .details {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex-grow: 1;
}

.summary-item .details .lbl {
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 800;
}

.summary-item .details .val {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-item .check-icon {
    width: 14px;
    height: 14px;
    color: var(--success);
}

/* --- 14. OUTBOUND/INBOUND REVIEW --- */
.review-card {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
}

.review-card h3 {
    font-family: var(--font-body); /* flattened */
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-modern);
    padding-bottom: 6px;
}

.review-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.review-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.review-item i {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.review-item .details {
    display: flex;
    flex-direction: column;
}

.review-item label {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.review-item span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.checkbox-container-modern {
    display: block;
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    user-select: none;
    text-align: left;
}

.checkbox-container-modern input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-container-modern .checkmark {
    position: absolute;
    top: 1px;
    left: 0;
    height: 16px;
    width: 16px;
    border-radius: 4px;
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    transition: var(--transition-fast);
}

.checkbox-container-modern:hover input ~ .checkmark {
    border-color: var(--text-secondary);
}

.checkbox-container-modern input:checked ~ .checkmark {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
}

.checkbox-container-modern .checkmark::after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container-modern input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-container-modern .checkmark::after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 7px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Photo upload mock */
.photo-upload-container {
    border: 1px dashed var(--border-modern);
    border-radius: var(--border-radius);
    padding: 18px;
    text-align: center;
    background-color: var(--surface-modern);
    margin-bottom: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.photo-upload-container:hover {
    border-color: var(--text-secondary);
    background-color: var(--bg-modern);
}

.photo-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.photo-upload-placeholder i {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.photo-upload-placeholder span {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.photo-preview-box {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    max-height: 120px;
}

.photo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-photo {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* --- 15. INBOUND LANDFILL COMPARISON VIEW --- */
.inbound-comparison-card {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
}

.comparison-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 12px;
}

.comparison-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comparison-box .num {
    font-family: var(--font-body); /* flattened */
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
}

.comparison-box .lbl {
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 800;
}

.comparison-divider {
    color: var(--text-muted);
}

.comparison-divider i {
    width: 20px;
    height: 20px;
}

.discrepancy-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
}

.discrepancy-status-badge.success {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid hsla(145, 60%, 40%, 0.15);
}

.manifest-summary-panel {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    padding: 12px;
    margin-bottom: 16px;
}

.manifest-summary-panel h3 {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-modern);
    padding-bottom: 4px;
    margin-bottom: 8px;
}

/* --- 16. VIEW: CLOSE DELIVERY DO INFO --- */
.info-tag-do {
    background-color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--text-primary);
}

.info-tag-do .lbl {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-muted);
}

.info-tag-do .val {
    font-family: var(--font-body); /* flattened */
    font-size: 14px;
    font-weight: 800;
    color: var(--surface-modern);
}

/* --- 17. FLAT INVOICE/RECEIPT DOCUMENT (Monochrome SaaS Style) --- */
.flat-receipt-card {
    background: var(--surface-modern);
    border: 1px solid var(--text-primary); /* Solid outline border */
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    position: relative;
}

.receipt-glow {
    display: none; /* Hide glow */
}

/* Crisp monochrome borders instead of gold foil */
.receipt-border-top, .receipt-border-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
}

.receipt-border-top { top: 0; }
.receipt-border-bottom { bottom: 0; }

.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-top: 4px;
}

.receipt-header .logo {
    font-family: var(--font-body); /* flattened */
    font-size: 11px;
    font-weight: 800;
    color: var(--text-primary);
}

.badge-status-delivered {
    font-size: 8px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 2px;
    background-color: var(--success);
    color: #fff;
}

.receipt-title {
    font-family: var(--font-body); /* flattened */
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    margin-bottom: 14px;
}

.receipt-divider-dash {
    height: 1px;
    border-top: 1px dashed var(--border-modern);
    margin: 12px 0;
}

.receipt-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 11px;
}

.receipt-row .lbl {
    color: var(--text-secondary);
}

.receipt-row .val {
    font-weight: 700;
    color: var(--text-primary);
}

.font-mono {
    font-family: monospace;
}

.receipt-barcode-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
}

.barcode-sim {
    font-size: 16px;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: -1.5px;
    color: var(--text-primary);
}

.barcode-num {
    font-size: 8px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* --- 18. VIEW: TASKS QUEUE --- */
.tasks-queue-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tasks-scroll-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.empty-tasks-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
}

.empty-tasks-state i {
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.empty-tasks-state p {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
}

.empty-tasks-state .sub {
    font-size: 10px;
    max-width: 220px;
}

/* Flat Task Cards */
.task-card {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    padding: 14px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

/* No left-accent borders on task cards to maintain pure minimal flat design */
/* .task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
}
.task-card.in-transit::before { background-color: var(--accent-flat); }
.task-card.arrived::before { background-color: var(--success); } */

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-status-tag {
    font-size: 8px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 2px;
}

.task-status-tag.transit {
    background-color: var(--accent-flat-glow);
    color: var(--accent-flat-dark);
}

.task-status-tag.arrived {
    background-color: var(--success-light);
    color: var(--success);
}

.task-card h3 {
    font-family: var(--font-body); /* flattened */
    font-size: 15px;
    font-weight: 800;
}

.task-card-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    color: var(--text-secondary);
}

.task-card-details .row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-card-details i {
    width: 12px;
    height: 12px;
}

/* --- 19. VIEW: HISTORY & TIMELINE --- */
.history-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.history-filters {
    margin-bottom: 12px;
}

.filter-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-icon {
    position: absolute;
    left: 10px;
    width: 12px;
    height: 12px;
    color: var(--text-muted);
}

.filter-select {
    width: 100%;
    padding: 8px 10px 8px 30px;
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    outline: none;
}

.history-scroll-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* History Item Card */
.history-item-card {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    padding: 10px 12px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.history-item-card:hover {
    border-color: var(--text-secondary);
}

.history-item-card:active {
    transform: scale(0.98);
}

.history-item-card .left {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.history-item-card .do-id {
    font-family: var(--font-body); /* flattened */
    font-weight: 800;
    font-size: 13px;
    color: var(--text-primary);
}

.history-item-card .meta {
    font-size: 10px;
    color: var(--text-muted);
}

.history-item-card .right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.history-item-card .status-pill {
    font-size: 8px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 2px;
}

.status-pill.created { background-color: #f1f3f5; color: #495057; }
.status-pill.transit { background-color: var(--accent-flat-glow); color: var(--accent-flat-dark); }
.status-pill.arrived { background-color: hsla(200, 70%, 50%, 0.1); color: hsl(200, 70%, 40%); }
.status-pill.delivered { background-color: var(--success-light); color: var(--success); }

.history-item-card .time {
    font-size: 9px;
    color: var(--text-muted);
}

/* Timeline detail */
.timeline-header-card {
    background-color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 12px;
    border: 1px solid var(--text-primary);
    color: #fff;
    margin-bottom: 16px;
}

.timeline-header-card h3 {
    font-family: var(--font-body); /* flattened */
    font-size: 18px;
    color: var(--surface-modern);
}

.timeline-header-card .sub-info {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    gap: 4px;
}

.timeline-section-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Vertical Timeline Line */
.vertical-timeline {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vertical-timeline::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 5px;
    width: 1px; /* Super thin flat line */
    height: calc(100% - 16px);
    background-color: var(--border-modern);
}

.timeline-event {
    position: relative;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    left: -18px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--bg-modern);
    border: 2px solid var(--text-muted);
    z-index: 2;
}

.timeline-event.active .timeline-dot {
    background-color: var(--accent-flat);
    border-color: var(--accent-flat);
}

.timeline-event-content {
    display: flex;
    flex-direction: column;
}

.timeline-event-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-event-meta {
    font-size: 9px;
    color: var(--text-muted);
}

/* --- 20. VIEW: PROFILE / CONFIG --- */
.profile-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.profile-card {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    border-radius: var(--border-radius);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}

.profile-avatar-flat {
    width: 48px;
    height: 48px;
    background-color: var(--bg-modern);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    color: var(--text-primary);
    border: 1px solid var(--border-modern);
}

.profile-avatar-flat i {
    width: 20px;
    height: 20px;
}

.profile-card h3 {
    font-family: var(--font-body); /* flattened */
    font-size: 15px;
    font-weight: 800;
}

.profile-role {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: block;
    margin-top: 1px;
}

.profile-org {
    font-size: 10px;
    color: var(--text-muted);
}

.settings-menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.menu-item-group h4 {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.menu-item {
    background-color: var(--surface-modern);
    border: 1px solid var(--border-modern);
    padding: 10px 12px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-primary);
}

.menu-item i {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
}

.menu-item.action-item {
    cursor: pointer;
    transition: var(--transition-fast);
}

.menu-item.action-item:hover {
    border-color: var(--text-secondary);
    background-color: var(--bg-modern);
}

.menu-item.action-item:active {
    transform: scale(0.98);
}

.logout-btn {
    margin-top: auto;
}

.text-danger { color: var(--danger) !important; }

/* --- 21. ERROR / EDGE CASE MODAL (Flat Modern Overlay) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.3); /* Slate transparent backdrop */
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1100;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background-color: var(--surface-modern);
    border: 1px solid var(--text-primary);
    border-radius: var(--border-radius);
    padding: 20px;
    max-width: 280px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-modal-card {
    border: 1px solid var(--text-primary);
}

.error-badge-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--danger-light);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.error-badge-ring i {
    width: 24px;
    height: 24px;
}

.modal-title {
    font-family: var(--font-body); /* flattened */
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.modal-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 16px;
}

.modal-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
}

/* Custom transitions */
.animate-scale-in {
    animation: scaleIn 180ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleIn {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-bounce-in {
    animation: bounceIn 300ms cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

@keyframes bounceIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- 22. TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: calc(100% - 32px);
    max-width: 280px;
    pointer-events: none;
}

.toast {
    background-color: var(--text-primary);
    border: 1px solid var(--text-primary);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--border-radius);
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-premium);
    pointer-events: auto;
    animation: toastIn 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast i {
    width: 14px;
    height: 14px;
    color: var(--accent-flat-light);
}

.toast.toast-success i { color: #4caf50; }
.toast.toast-error i { color: #ef4444; }

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

.toast.toast-out {
    animation: toastOut 150ms cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes toastOut {
    to { transform: translateY(-12px); opacity: 0; }
}

/* --- 23. DYNAMIC QUANTITATIVE DASHBOARD STYLING --- */
.dashboard-wrapper {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-panel {
    background-color: var(--surface-modern);
    border: 1px solid var(--text-primary);
    border-radius: var(--border-radius);
    padding: 14px;
}

.filter-title {
    font-family: var(--font-body); /* flattened */
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-modern);
    padding-bottom: 6px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.filter-grid .form-group {
    margin: 0;
}

.filter-grid label {
    font-size: 9px;
    font-weight: 800;
    margin-bottom: 3px;
    color: var(--text-muted);
}

.filter-grid .input-modern, .filter-grid .select-modern {
    padding: 6px 8px;
    font-size: 11px;
    height: 30px;
    background-color: var(--bg-modern);
}

/* Metrics Grid & Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.metric-card {
    background-color: var(--surface-modern);
    border: 1px solid var(--text-primary);
    border-radius: var(--border-radius);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-icon-flat {
    width: 32px;
    height: 32px;
    background-color: var(--bg-modern);
    border: 1.5px solid var(--accent-flat);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.metric-icon-flat i {
    width: 14px;
    height: 14px;
    color: var(--accent-flat);
}

.metric-info {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.metric-value {
    font-family: var(--font-body); /* flattened */
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 2px 0 0 0;
}

/* Recap panel & formal spreadsheet table */
.rekap-panel {
    background-color: var(--surface-modern);
    border: 1px solid var(--text-primary);
    border-radius: var(--border-radius);
    padding: 14px;
}

.rekap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
    min-width: 600px;
}

.rekap-table th {
    background-color: var(--text-primary);
    color: #fff;
    font-weight: bold;
    padding: 6px 8px;
    border: 1px solid var(--text-primary);
    font-size: 9px;
    text-align: center;
}

.rekap-table td {
    padding: 6px 8px;
    border: 1px solid var(--border-modern);
    color: var(--text-primary);
    font-family: inherit;
    text-align: left;
}

.rekap-table tbody tr:nth-child(even) {
    background-color: rgba(0,0,0,0.015);
}

.rekap-table tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.03);
}

.tfoot-grand-total {
    background-color: var(--bg-modern);
    border-top: 2px solid var(--text-primary);
    font-weight: bold;
}

.tfoot-grand-total td {
    font-weight: bold;
    border-top: 1.5px solid var(--text-primary);
    text-align: center;
}

/* Manifest log rows styles */
.manifest-row-item:hover {
    background: rgba(212, 175, 55, 0.03) !important;
    border-color: var(--accent-flat) !important;
}

/* --- 24. PHYSICAL NOTA BECIS DIGITAL PRINT SCAN FEEL --- */
.becis-scan-document {
    background-color: #e5e5e5 !important;
    background-image: radial-gradient(circle, rgba(0,0,0,0.05) 1px, transparent 1px) !important;
    background-size: 15px 15px !important;
}

.becis-inner-paper {
    position: relative;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.15) !important;
    background-image: linear-gradient(rgba(0,0,0,0.01) 1px, transparent 1px) !important;
    background-size: 100% 12px !important;
}

.becis-security-stamp::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg, rgba(217,30,24,0.04), rgba(217,30,24,0.04) 2px, transparent 2px, transparent 4px);
    pointer-events: none;
}

/* ==========================================================================
   25. RESPONSIVE MOBILE FIXES & REFINEMENTS (max-width: 640px)
   ========================================================================== */
@media (max-width: 640px) {
    /* Fluid scale headings and titles */
    .header-title {
        font-size: clamp(12px, 3.8vw, 15px) !important;
        font-family: var(--font-heading) !important;
        letter-spacing: -0.01em !important;
    }
    
    .section-header h2 {
        font-size: clamp(16px, 5vw, 20px) !important;
        letter-spacing: -0.02em !important;
    }
    
    /* Metrics grid adjustment for tight screens */
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        gap: 8px !important;
    }
    
    .metric-card {
        padding: 8px 10px !important;
        gap: 8px !important;
    }
    
    .metric-value {
        font-size: clamp(13px, 4vw, 15px) !important;
    }
    
    /* Table horizontal scroll indicators */
    .rekap-table-container {
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 4px;
        background: linear-gradient(to right, white 30%, rgba(255,255,255,0)),
                    linear-gradient(to right, rgba(255,255,255,0), white 70%) 0 100%,
                    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,0.1), rgba(0,0,0,0)),
                    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.1), rgba(0,0,0,0)) 0 100%;
        background-repeat: no-repeat;
        background-color: var(--surface-modern);
        background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
        background-attachment: local, local, scroll, scroll;
    }
    
    /* Elegant thin scrollbar for horizontal table */
    .rekap-table-container::-webkit-scrollbar {
        height: 4px;
    }
    .rekap-table-container::-webkit-scrollbar-track {
        background: var(--bg-modern);
    }
    .rekap-table-container::-webkit-scrollbar-thumb {
        background: var(--accent-flat-light);
        border-radius: 2px;
    }
    
    /* Padding adjustments to maximize screen space */
    .dashboard-wrapper, .profile-wrapper, .timeline-detail-wrapper, .scan-hub-wrapper {
        padding: 12px 14px !important;
    }
    
    .card-modern {
        padding: 12px !important;
        border-radius: 4px !important;
    }
}

@media (max-width: 480px) {
    /* Stack elements vertically instead of horizontal collision */
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .section-header button, .section-header .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .panel-header-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .action-buttons-group {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }
    
    .action-buttons-group > * {
        flex: 1 1 auto !important;
        justify-content: center !important;
        font-size: 11px !important;
        padding: 8px !important;
    }
    
    /* Layout details in profile Settings Menu */
    .menu-item {
        font-size: 11px !important;
        padding: 8px 10px !important;
    }
}
