/* sentinel.css - AuditBerry Export Shield Sovereign Styles [v61.23.26] */

/* --- 1. THEME CORE --- */
:root {
    --primary: #bfff00; /* Sovereign Lime */
    --primary-glow: rgba(191, 255, 0, 0.4);
    --fruit-bg: url('assets/strawberry.png');
    --master-bg: url('assets/raspberry.png');
    --bg: #0a0a0a;
    --surface: #121212;
    --surface-light: #1e1e1e;
    --border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-dim: #a0a0a0;
    --success: #00ff88;
    --danger: #ff3131;
    --brand-primary: #27ae60; /* Official AuditBerry Green */
    --warning: #f59e0b;
    --fresa-red: #ff3131;
    --fresa-glow: rgba(255, 49, 49, 0.4);
    
    /* [v61.20.12] UNIFIED FROSTED GLASS SYSTEM */
    --glass-frost: rgba(255, 255, 255, 0.15);
    --glass-dark: rgba(0, 0, 0, 0.4);
    --glass-blur: blur(15px);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* [v61.26.9] SOVEREIGN VISUAL ANCHOR */
body.force-orange-theme,
.force-orange-theme :root {
    --primary: #ff9500 !important;
    --primary-glow: rgba(255, 149, 0, 0.45) !important;
}

/* [v61.25.0] DATA LINK TOGGLE - JARVIS AESTHETICS */
.data-link-container {
    background: rgba(191, 255, 0, 0.05);
    border: 1px solid rgba(191, 255, 0, 0.15);
    border-radius: 12px;
    padding: 12px 18px;
    margin: 10px 15px 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.data-link-container:hover {
    background: rgba(191, 255, 0, 0.08);
    border-color: var(--primary);
}

.data-link-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.data-link-label {
    font-size: 0.65rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.data-link-status {
    font-size: 0.55rem;
    font-family: 'JetBrains Mono';
    color: var(--text-dim);
    text-transform: uppercase;
}

/* Premium Switch v61.25.2 */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:focus + .slider {
    box-shadow: 0 0 10px var(--primary-glow);
}

input:checked + .slider:before {
    transform: translateX(18px);
    background-color: #000;
}

.brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(39, 174, 96, 0.2);
    text-align: center;
    position: relative;
    overflow: visible;
}

/* Aura Background for Main Shield */
.brand-header::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.25;
    filter: blur(25px);
    z-index: 0;
    pointer-events: none;
    animation: aura-pulse 4s infinite alternate ease-in-out;
}

@keyframes aura-pulse {
    0% { transform: scale(1); opacity: 0.15; }
    100% { transform: scale(1.4); opacity: 0.35; }
}

.brand-logo-container {
    width: 105px;
    height: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.brand-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Sovereign Multi-Layered Glow */
    filter: 
        drop-shadow(0 0 10px rgba(191, 255, 0, 0.45)) 
        drop-shadow(0 0 25px rgba(191, 255, 0, 0.25));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: logo-shimmer 6s infinite ease-in-out;
}
.brand-logo-container:hover img { 
    transform: scale(1.08) rotate(1deg); 
    filter: 
        drop-shadow(0 0 15px rgba(191, 255, 0, 0.6)) 
        drop-shadow(0 0 35px rgba(191, 255, 0, 0.35));
}

@keyframes logo-shimmer {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(191, 255, 0, 0.45)) drop-shadow(0 0 25px rgba(191, 255, 0, 0.25)); }
    50% { filter: drop-shadow(0 0 18px rgba(191, 255, 0, 0.55)) drop-shadow(0 0 32px rgba(191, 255, 0, 0.35)); }
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 5px 0 0 0;
    display: flex;
    gap: 0;
    line-height: normal;
    position: relative;
    z-index: 1;
}
.audit-text { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.berry-text { color: var(--brand-primary) !important; text-shadow: 0 0 12px rgba(39, 174, 96, 0.4); }

.brand-subname {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 20px var(--primary-glow), 0 0 10px rgba(191, 255, 0, 0.3);
    margin-top: 6px;
    opacity: 1;
    position: relative;
    z-index: 1;
}

.brand-version {
    font-size: 0.62rem;
    color: var(--text-dim);
    margin-top: 10px;
    font-family: 'JetBrains Mono';
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* [v5.6.5] SENTINEL SIDEBAR WIDGET */
.sentinel-widget {
    margin: 30px 0 20px 0; /* Increased top margin for separation */
    padding: 20px 15px;
    background: rgba(191, 255, 0, 0.03);
    border: 1px solid rgba(191, 255, 0, 0.2);
    border-radius: 15px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    min-height: 140px; /* Restored height presence */
    flex-shrink: 0; /* Ensure it's not crushed in flex layout */
    display: flex;
    flex-direction: column;
    position: relative; /* Anchor for satellite icon */
}

/* [v61.20.6] TACTICAL SATELLITE INDICATOR */
.sentinel-satellite {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.1rem;
    color: var(--primary);
    opacity: 0.8;
    filter: drop-shadow(0 0 10px var(--primary-glow));
    animation: satellitePulse 2s infinite ease-in-out;
}

@keyframes satellitePulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; filter: drop-shadow(0 0 15px var(--primary)); }
}

/* [v61.20.4] SENTINEL INTELLIGENCE FEED */
.sentinel-intel-feed {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed rgba(191, 255, 0, 0.2);
    min-height: 35px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}

#sentinel-live-msg {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    animation: slideUpFade 0.5s ease-out;
    opacity: 0.8;
}

@keyframes slideUpFade {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 0.8; }
}

.sentinel-widget:hover {
    background: rgba(191, 255, 0, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--primary-glow);
}

.sentinel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sentinel-logo {
    width: 32px;
    height: 32px;
    background: var(--bg);
    border: 1px solid var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
    position: relative;
}

.sentinel-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: 1px solid var(--primary);
    animation: sentinel-ping 2s infinite;
}

@keyframes sentinel-ping {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.sentinel-title-box { flex: 1; }

.sentinel-title {
    font-size: 10px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 1px;
    display: block;
}

.sentinel-status {
    font-size: 9px;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: scanning 3s linear infinite;
    opacity: 0.5;
}

@keyframes scanning {
    0% { top: -10%; }
    100% { top: 110%; }
}

.sentinel-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    border-top: 1px solid rgba(191, 255, 0, 0.1);
    padding-top: 10px;
}

.s-metric { display: flex; flex-direction: column; }
.s-metric label { font-size: 7px; color: var(--text-dim); text-transform: uppercase; }
.s-metric span { font-size: 10px; font-weight: 800; color: #fff; }

/* [v5.6.5] DEEP SCAN MODAL */
.deep-scan-modal { max-width: 900px !important; background: #050505 !important; }
.deep-scan-grid { display: grid; grid-template-columns: 350px 1fr; gap: 30px; text-align: left; margin-top: 20px; }
.scan-terminal {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    height: 400px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--primary);
}

.terminal-line { margin-bottom: 5px; display: flex; gap: 10px; }
.terminal-time { color: var(--text-dim); }
.terminal-cmd { color: #fff; }
.scan-details { display: flex; flex-direction: column; gap: 20px; }
.scan-card { background: #0f0f0f; border: 1px solid var(--border); border-radius: 15px; padding: 20px; }
.risk-meter { height: 10px; background: #222; border-radius: 5px; overflow: hidden; margin-top: 10px; }
.risk-fill { height: 100%; background: var(--primary); width: 0%; transition: width 1s ease; }

body { 
    font-family: 'Outfit', sans-serif; 
    /* [v61.21.16] MASTER BACKGROUND ARCHITECTURE */
    background: linear-gradient(rgba(10, 10, 10, 0.9), rgba(10, 10, 10, 0.95)), var(--master-bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff; 
    margin: 0; 
    display: flex; 
    height: 100vh; 
    overflow: hidden; 
}

/* --- 2. SIDEBAR --- */
.sidebar { 
    width: 320px; 
    background: var(--surface); 
    border-right: 1px solid var(--border); 
    display: flex; 
    flex-direction: column; 
    padding: 30px 20px; 
    box-sizing: border-box; 
    overflow-y: auto; /* ENABLE SCROLL */
    overflow-x: hidden;
    height: 100vh;
}

/* Custom Jarvis Scrollbar [v61.22.4.21 ERGONOMICS] */
.sidebar::-webkit-scrollbar { width: 12px; }
.sidebar::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(191, 255, 0, 0.2); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--primary); background-clip: border-box; }

.nav-item { 
    padding: 18px; 
    border-radius: 15px; 
    cursor: pointer; 
    margin-bottom: 10px; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    font-size: 1rem; 
    font-weight: 800; 
    color: var(--text-dim); 
    transition: 0.3s; 
    text-transform: uppercase; 
    flex-shrink: 0; /* Prevent icons from flattening */
}
.nav-item:hover, .nav-item.active { background: rgba(191, 255, 0, 0.15); color: var(--primary); }
.search-container { margin-top: auto; padding-top: 25px; border-top: 1px solid var(--border); }
.search-input { background: #000; border: 1px solid var(--border); color: #fff; padding: 12px; border-radius: 12px; font-family: 'Outfit'; width: 100%; box-sizing: border-box; }

/* --- 3. MAIN LAYOUT --- */
.main-content { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}
.top-bar { padding: 25px 40px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: #000; min-height: 100px; }
.view-pane { flex: 1; padding: 40px; overflow-y: auto; display: none; }
.view-pane.active { display: block; }

/* --- 4. DATA CARDS --- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 25px; padding: 35px; margin-bottom: 30px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.grid-header { display: grid; grid-template-columns: 2.2fr 0.8fr 1.3fr 1.3fr 1.3fr 1.1fr 1.1fr; padding: 15px 25px; border-bottom: 1px solid var(--border); font-size: 0.65rem; font-weight: 900; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.grid-row { display: grid; grid-template-columns: 2.2fr 0.8fr 1.3fr 1.3fr 1.3fr 1.1fr 1.1fr; padding: 25px; border-bottom: 1px solid rgba(255,255,255,0.05); align-items: center; transition: 0.3s; position: relative; }
.input-box { 
    background: var(--glass-dark); border: 1px solid var(--glass-border); color: #fff; 
    padding: 0 45px 0 15px; border-radius: 12px; font-family: 'JetBrains Mono'; font-weight: 700; 
    width: 100%; box-sizing: border-box; height: 55px; line-height: normal !important;
    overflow: visible !important; display: inline-flex; align-items: center;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' fill='%23bfff00' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s ease;
}
.input-box:focus { border-color: var(--primary); background: rgba(0,0,0,0.6); box-shadow: 0 0 20px var(--primary-glow); }
select.input-box { padding-right: 40px !important; cursor: pointer; }

@keyframes pulse-red { 0%, 100% { box-shadow: 0 0 0px var(--danger); border-color: var(--border); } 50% { box-shadow: 0 0 15px var(--danger); border-color: var(--danger); } }
.alert-pulse { animation: pulse-red 1.5s infinite; color: var(--danger) !important; }

/* --- 5. LOGISTICS UI --- */
.lomos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.spine-label { 
    width: 1.5in; height: 8in; 
    background: rgba(255,255,255,0.03); 
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex; flex-direction: column; justify-content: space-between; 
    align-items: center; 
    padding: 30px 10px; 
    position: relative; 
    box-shadow: 0 0 20px rgba(191,255,0,0.1); 
    overflow: hidden; 
    transition: 0.3s;
}
.spine-label:hover { transform: scale(1.02); background: rgba(255,255,255,0.06); border-color: var(--primary); }
.spine-label::before { content: ''; position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.02), transparent); }
.spine-tag { 
    writing-mode: horizontal-tb; 
    font-size: 0.7rem; 
    font-weight: 900; 
    color: var(--primary); 
    letter-spacing: 1px; 
    text-align: center;
    line-height: 1.1;
    margin-bottom: 20px;
    opacity: 0.9;
}
.spine-month { 
    writing-mode: vertical-rl; 
    text-orientation: mixed; 
    font-size: 4.8rem; 
    font-weight: 900; 
    color: #fff; 
    margin: 10px 0; 
    transform: rotate(180deg); 
    text-shadow: 0 0 20px rgba(191,255,0,0.3); 
    letter-spacing: 5px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}
.spine-month.long-month { font-size: 3.7rem !important; letter-spacing: 1px !important; }

.spine-qr { 
    width: 90px; 
    height: 90px; 
    border: 3px solid var(--primary); 
    padding: 8px; 
    background: rgba(191,255,0,0.05); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 10px; 
    box-shadow: 0 0 20px rgba(191,255,0,0.15); 
    flex-shrink: 0; 
    margin-top: auto; 
}
.spine-qr canvas { display: none !important; } /* Fix QRCode.js duplication */
.spine-qr img { 
    width: 100% !important; 
    height: 100% !important; 
    display: block !important; 
    filter: drop-shadow(0 0 5px var(--primary)); 
}
.spine-qr .qr-print-grid { display: none; } /* Hide simulations in Vault UI */
.spine-year { font-size: 2.3rem; font-weight: 900; color: var(--primary); font-family: 'JetBrains Mono'; margin: 10px 0 0 0; text-shadow: 0 0 15px rgba(191,255,0,0.2); flex-shrink: 0; }

/* --- 6. PRINT STYLES (Audit High Contrast Restore v6.15.6) --- */
@media print {
    body { background: #fff !important; color: #000 !important; margin: 0; padding: 0; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    body > *:not(#print-bridge) { display: none !important; }
    #print-bridge { 
        display: block !important; 
        width: 100%; 
        background: #fff !important; padding: 0.25in !important;
        visibility: visible !important;
    }
    .spine-label { 
        width: 1.5in !important; 
        height: 8in !important; 
        min-height: 8in !important; /* FORCE PHYSICAL LENGTH */
        background: #fff !important; border: 4px solid #000 !important;
        box-shadow: none !important; color: #000 !important;
        display: inline-flex !important; flex-direction: column !important;
        justify-content: space-between !important; align-items: center !important;
        padding: 40px 5px !important; margin: 0 10px 10px 0 !important;
        page-break-inside: avoid !important;
        box-sizing: border-box !important;
        position: relative !important;
        overflow: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .spine-tag { 
        writing-mode: horizontal-tb !important; 
        color: #000 !important;
        font-size: 0.7rem !important;
        font-weight: 900 !important;
        flex-shrink: 0 !important;
        margin-bottom: 25px !important;
        line-height: 1.1 !important;
        text-align: center !important;
    }
    .spine-month { 
        writing-mode: vertical-rl !important; 
        transform: rotate(180deg) !important; 
        color: #000 !important;
        text-orientation: mixed !important;
        font-size: 4.8rem !important; 
        margin: 5px 0 !important; 
        font-weight: 950 !important; 
        letter-spacing: 4px !important;
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
        min-height: 0 !important;
        max-height: 5in !important;
    }
    .spine-month.long-month { font-size: 3.7rem !important; letter-spacing: 1px !important; }
    
    .spine-qr { 
        border: 4px solid #000 !important;
        background: transparent !important; 
        width: 0.9in !important; 
        height: 0.9in !important; 
        padding: 5px !important; 
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        margin-top: auto !important;
        position: relative !important;
    }
    /* TRUE QR STYLE IN PRINT */
    .spine-qr img, .spine-qr canvas { 
        display: block !important; 
        width: 100% !important; 
        height: 100% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .spine-qr .qr-print-grid { display: none !important; }
    .spine-qr svg { display: none !important; }

    .spine-year { 
        color: #000 !important; 
        font-size: 2.3rem !important; 
        margin: 10px 0 0 0 !important; 
        font-weight: 950 !important; 
        font-family: 'JetBrains Mono' !important; 
        flex-shrink: 0 !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Folio Preview Parity */
    .folios-grid { display: grid !important; grid-template-columns: repeat(10, 1fr) !important; gap: 5px !important; width: 100% !important; border: none !important; }
    .sticker { 
        background: #fff !important; border: 2px solid #000 !important; color: #000 !important; 
        width: 1.5cm !important; height: 1.5cm !important; margin: 1px !important; 
        display: flex !important; align-items: center !important; justify-content: center !important;
        font-weight: 900 !important; font-size: 0.8rem !important;
    }
    .sticker.occupied { background: #000 !important; color: #fff !important; }
    .page-break { page-break-after: always; }
}

.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.evidence-card { background: var(--surface-light); border-radius: 25px; overflow: hidden; border: 1px solid var(--border); transition: 0.3s; position: relative; }
.evidence-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.evidence-card.analyzing::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--primary); box-shadow: 0 0 15px var(--primary); animation: scan-loop 2s linear infinite; z-index: 10; }
@keyframes scan-loop { from { top: 0; } to { top: 100%; } }

.evidence-icon { height: 250px; background: rgba(191,255,0,0.05); display: flex; align-items: center; justify-content: center; font-size: 5rem; color: var(--primary); opacity: 0.2; }
.evidence-check { position: absolute; top: 20px; right: 20px; transform: scale(1.8); accent-color: var(--primary); z-index: 20; cursor: pointer; }

.folios-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; background: rgba(255,255,255,0.05); padding: 30px; border-radius: 15px; width: 100%; box-sizing: border-box; border: 1px solid var(--border); overflow: visible !important; }
.sticker { 
    aspect-ratio: 1; background: #fff; border: 1.5px solid #000; font-size: 0.8rem; font-weight: 900; color: #000; 
    display: flex !important; align-items: center !important; justify-content: center !important; font-family: 'JetBrains Mono'; border-radius: 4px; transition: 0.3s; line-height: normal !important;
    height: 50px !important; width: 60px !important;
}
.sticker.occupied { background: var(--primary) !important; color: #000 !important; border-color: var(--primary) !important; font-weight: 900; box-shadow: 0 0 10px var(--primary-glow); }
.sticker:hover { transform: scale(1.1); box-shadow: 0 5px 15px rgba(191,255,0,0.4); z-index: 10; border-color: var(--primary); }

/* --- 6. BUTTONS & TAGS --- */
.btn-master { background: var(--primary); color: #000; border: none; padding: 16px 30px; border-radius: 15px; font-weight: 900; cursor: pointer; text-transform: uppercase; font-size: 0.9rem; transition: 0.3s; }
.btn-master:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(191,255,0,0.4); }
.tag { font-size: 0.8rem; font-weight: 900; padding: 12px 24px; border-radius: 12px; }
.tag-green { background: rgba(0,255,136,0.1); color: var(--success); border: 1px solid var(--success); }
.tag-red { background: rgba(255,0,0,0.1); color: var(--danger); border: 1px solid var(--danger); }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); display: none; align-items: center; justify-content: center; z-index: 5000; }

/* --- 7. PRINT ENGINE (CLEANUP v6.15.6) --- */

.pulse-green { animation: pulse-green 2s infinite; }
.pulse-red { animation: pulse-red 1.5s infinite; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255,0,0,0.7); } 70% { box-shadow: 0 0 0 20px rgba(255,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(255,0,0,0); } }

.tag-cyan { background: var(--primary); color: #000; font-weight: 900; box-shadow: 0 0 15px var(--primary-glow); }

/* [v5.6.6] REFACTORING INLINE STYLES */
.flex-center-between { display: flex; justify-content: space-between; align-items: center; }
.label-poi { font-size: 0.72rem; color: #fff; display: block; margin-bottom: 8px; font-weight: 950; text-transform: uppercase; letter-spacing: 1.2px; text-shadow: 0 2px 4px rgba(0,0,0,1); }
.input-group { background: var(--glass-frost); padding: 12px; border-radius: 12px; border: 2px solid var(--glass-border); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.unit-cost-val { font-size: 1.4rem; font-weight: 900; color: #fff; }
.unit-cost-label { font-size: 0.6rem; color: var(--text-dim); text-transform: uppercase; }

/* Purged Redundant Card Definition */ 
.variety-row-entry { 
    display: grid; grid-template-columns: auto 100px 1.5fr; gap: 15px; align-items: center; 
    background: var(--glass-frost); padding: 15px; border-radius: 12px; 
    border: 1px solid var(--glass-border); margin-bottom: 12px; min-height: 55px; 
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.variety-chip { 
    padding: 10px 18px; border-radius: 20px; background: var(--glass-frost); 
    border: 1px solid var(--glass-border); cursor: pointer; font-size: 0.72rem; 
    font-weight: 800; transition: 0.2s; color: #fff; 
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.variety-chip.active { background: var(--primary); color: #000; border-color: var(--primary); box-shadow: 0 0 20px var(--primary-glow); }
.variety-row { display: grid; grid-template-columns: 80px 40px 180px; gap: 15px; align-items: center; margin-bottom: 25px; animation: slideDown 0.3s ease-out; min-height: 60px; overflow: visible !important; }

/* [v61.21.0] FRUIT SELECTOR TACTICAL */
.fruit-btn {
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.fruit-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.fruit-btn img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.fruit-btn:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px var(--primary));
}

.fruit-btn:active {
    transform: scale(0.9);
}

.fruit-btn::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.fruit-btn:hover::after {
    width: 60%;
}
.variety-row select { 
    height: 48px; font-size: 0.85rem; padding: 0 40px 0 15px; box-sizing: border-box; 
    background: #000; color: #fff; border: 1px solid var(--border); border-radius: 12px; 
    overflow: visible !important; line-height: normal; appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23bfff00' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.btn-asistente { background: #111; color: var(--primary); border: 1px solid var(--primary); }
.sync-active-badge { display: flex; align-items: center; gap: 6px; font-size: 0.6rem; color: var(--success); border: 1px solid var(--success); padding: 4px 10px; border-radius: 30px; background: rgba(0,255,136,0.1); }

/* [v5.7.0] SIMULATION MODE */
.simulation-on { border: 2px solid var(--primary) !important; box-shadow: 0 0 20px rgba(191,255,0,0.2); }
.sim-badge { background: #ff00ff; color: #fff; font-size: 0.5rem; padding: 2px 5px; border-radius: 3px; font-weight: 900; position: absolute; top: 5px; right: 5px; }
.sim-card { border: 1px dashed #ff00ff !important; background: rgba(255,0,255,0.05) !important; }
.btn-sim { background: #ff00ff; color: #fff; border: none; font-weight: 800; cursor: pointer; transition: 0.3s; }
.btn-sim:hover { filter: brightness(1.2); transform: scale(1.05); }

.modal-content { 
    background: #000; border: 1px solid var(--border); border-radius: 35px; 
    box-shadow: 0 0 50px rgba(0,0,0,0.8); width: 95%; max-width: 1200px !important; 
    max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; 
}

.split-screen-ocr { display: grid; grid-template-columns: 1fr 1fr; height: calc(90vh - 120px); overflow: hidden; }
.ocr-preview-panel { background: #050505; border-right: 1px solid var(--border); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.ocr-form-panel { background: #000; padding: 35px 45px; overflow-y: auto; }

.label-poi { font-size: 0.85rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: block; }

.ocr-amount-input {
    background: transparent; border: none; color: var(--primary); font-size: 3.5rem; font-weight: 900; 
    text-align: center; width: 100%; font-family: 'Outfit', sans-serif; outline: none; transition: 0.3s;
}
.ocr-amount-input:focus { text-shadow: 0 0 15px var(--primary-glow); }
.ocr-preview-img { max-width: 85%; max-height: 85%; filter: drop-shadow(0 0 20px rgba(191,255,0,0.2)); border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); }

.input-box { min-width: 80px; background: rgba(255,255,255,0.05); border: 1px solid rgba(191,255,0,0.1); color: #fff; border-radius: 12px; font-family: 'JetBrains Mono'; padding: 12px; transition: 0.3s; }
.input-box:focus { border-color: var(--primary); box-shadow: 0 0 10px var(--primary-glow); outline: none; }
select.input-box option { background: #111; color: #fff; }
#voice-select { color: var(--primary); font-weight: 800; background: rgba(0,0,0,0.5); }

/* [v61.20.1] REFINED SURVEILLANCE & CONTEXT OVERLAYS - STABILIZATION REPAIR */
.filter-card {
    position: relative;
    overflow: hidden !important;
    z-index: 1;
    display: grid; 
    grid-template-columns: 1fr 1fr 1.2fr; 
    gap: 30px; 
    align-items: start; 
    margin-bottom: 30px;
    background: rgba(10, 10, 10, 0.4) !important;
    border: 1px solid rgba(191, 255, 0, 0.2);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.6);
}

.filter-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* [v61.21.16] LOCAL DYNAMIC OVERLAY */
    background-image: var(--fruit-bg);
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    z-index: -1;
    filter: saturate(0.8) contrast(1.1);
    pointer-events: none;
    transition: background-image 0.5s ease-in-out;
}

/* SIDEBAR IDENTITY CARD */
.sidebar-context-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 20px 22px; /* Compacted to avoid overlap [v61.21.4] */
    margin: 10px 15px 15px 15px; /* Reduced bottom margin */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    overflow: visible !important;
}

.context-icon-box {
    width: 80px; /* Industrial Dimension */
    height: 80px;
    background: #000; /* Solid Black Base [v61.21.6] */
    border: 2px solid var(--primary); /* Neon Structural Frame */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    padding: 0; /* Flush Integration */
    position: relative;
    box-shadow: 0 0 35px var(--primary-glow); /* Outer Projection */
    overflow: hidden;
}

.context-icon-box img {
    display: block;
    width: 80%; /* Optimal Centering on Black Panel */
    height: 80%;
    object-fit: contain;
    filter: none; /* Light comes from the frame, not the image */
    pointer-events: none;
}

/* Square Neon Container for Fruit */
.neon-fruit-box {
    width: 65px;
    height: 65px;
    background: linear-gradient(145deg, #0f0f0f, #000);
    border: 2px solid var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 0 25px var(--primary-glow);
    margin: 10px 0;
    overflow: hidden;
}

.neon-fruit-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.context-orchard-name {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}

.context-responsible {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 15px;
    opacity: 0.8;
}

.context-crop-badge {
    padding: 6px 22px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 12px;
    border: 1.5px solid transparent;
    transition: all 0.4s ease;
    text-transform: uppercase;
}

.context-lote {
    font-size: 1rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

@keyframes strawberry-glow-pulse {
    0%, 100% { 
        background: rgba(255, 49, 49, 0.15); 
        box-shadow: 0 0 8px rgba(255, 49, 49, 0.3);
        transform: scale(1);
    }
    50% { 
        background: rgba(255, 49, 49, 0.35); 
        box-shadow: 0 0 20px rgba(255, 49, 49, 0.6);
        transform: scale(1.05);
    }
}

/* [v61.20.4] GLOBAL INTELLIGENCE SOURCES PANEL */
.intel-tracker-panel {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(191, 255, 0, 0.15);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

.intel-sources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.source-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    transition: 0.3s;
}

.source-item:hover {
    background: rgba(191, 255, 0, 0.05);
    border-color: rgba(191, 255, 0, 0.2);
}

.source-item i {
    font-size: 1.4rem;
    color: var(--primary);
    opacity: 0.7;
}

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

.source-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
}

.source-status {
    font-family: 'JetBrains Mono';
    font-size: 11px;
    color: var(--text-dim);
}

.tracking-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 12px;
    right: 12px;
    box-shadow: 0 0 8px var(--primary);
    animation: trackingPulse 1.5s infinite;
}

@keyframes trackingPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.radar-vortex {
    width: 120px;
    height: 120px;
    border: 1px solid rgba(191, 255, 0, 0.2);
    border-radius: 50%;
    margin: 10px auto;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle, rgba(191, 255, 0, 0.05) 0%, transparent 70%);
}

.radar-sweep {
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, transparent, rgba(191, 255, 0, 0.4));
    animation: radarSweep 4s linear infinite;
    transform-origin: center;
}

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

.data-source-badge {
    font-size: 8px;
    font-family: 'JetBrains Mono';
    background: rgba(191, 255, 0, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    font-weight: 900;
}

.realtime-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #00ff00;
    border-radius: 50%;
    margin-right: 5px;
    box-shadow: 0 0 5px #00ff00;
}
/* [v66.3.8] VAULT EXPLORER & GALLERY THUMBNAILS */
.vault-explorer {
    display: grid;
    grid-template-columns: var(--gallery-left-width, 400px) 5px 1fr;
    height: 100%;
    overflow: hidden;
    position: relative;
}

#gallery-resizer {
    background: rgba(191, 255, 0, 0.1);
    cursor: col-resize;
    transition: background 0.3s;
    z-index: 10;
}

#gallery-resizer:hover {
    background: var(--primary);
}

#mock-gallery-container, #confirmed-gallery-container {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    align-content: flex-start;
}

.thumb-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    aspect-ratio: 0.85;
}

.thumb-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--primary-glow);
}

.thumb-card.active {
    border-color: var(--primary);
    background: rgba(191, 255, 0, 0.05);
    box-shadow: 0 0 15px var(--primary-glow);
}

.thumb-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}

.thumb-icon-box {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.5;
}

.thumb-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.thumb-name {
    font-size: 10px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumb-amount {
    font-size: 12px;
    font-weight: 900;
    color: var(--primary);
}

.sim-card {
    border-style: dashed !important;
    border-color: #ff00ff !important;
}

.sim-card:hover {
    box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3) !important;
}

.sim-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff00ff;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    padding: 2px 5px;
    border-radius: 4px;
    z-index: 2;
}
