/* --- PREMIUM TECH TEAL SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #080a0c;
    border-left: 1px solid rgba(0, 168, 181, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-teal);
    border-radius: 5px;
    border: 2px solid #080a0c;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-teal) #080a0c;
}

:root {
    --bg: #ffffff;
    --text-dark: #111111;
    --accent-blue: #004a80; 
    --accent-teal: #00a8b5; 
    --accent-teal-dim: rgba(0, 168, 181, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-exo: 'Exo 2', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --border-color: #e2e8f0;
}

body {
    background: var(--bg);
    background-image: 
        linear-gradient(rgba(0, 168, 181, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 168, 181, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    color: var(--text-dark);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

/* Help System */
.help-system {
    position: relative;
    display: flex;
    align-items: center;
}

.help-trigger {
    background: transparent;
    border: none;
    color: var(--accent-teal);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    padding: 5px;
}

.help-trigger:hover {
    opacity: 1;
    transform: scale(1.1);
}

.help-popout {
    position: absolute;
    top: calc(100% + 20px);
    right: 0;
    width: 320px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 74, 128, 0.1);
    padding: 2rem;
    display: none; /* Controlled by JS */
    z-index: 1000;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.help-popout.active {
    display: block;
}

.help-content p {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-weight: 600;
}

.help-detail {
    font-size: 0.8rem !important;
    color: #64748b !important;
    font-weight: 400 !important;
}

.help-link {
    display: inline-block;
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: var(--accent-teal);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.help-link:hover {
    color: var(--accent-blue);
    transform: translateX(5px);
}

@keyframes popIn {
    0% { opacity: 0; transform: translateY(-10px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Watermark */
.watermark {
    position: fixed; 
    bottom: -10vh; 
    left: -20vw;
    width: 50vw; 
    opacity: 0.4; 
    pointer-events: none;
    z-index: 0; 
    transform: rotate(15deg);
    filter: saturate(2.5) contrast(1.1);
}

/* Navbar */
.navbar {
    width: 100%;
    padding: 3rem 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    background: transparent;
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-link {
    text-decoration: none;
}
.logo-lockup { display: flex; align-items: center; gap: 15px; }
.chevron-logo {
    display: flex;
    gap: 4px;
    font-family: var(--font-exo);
    font-weight: 900;
    font-size: 2.2rem;
    color: var(--accent-blue);
}
.chevron-teal { color: var(--accent-teal); }
.logo-text {
    font-family: var(--font-exo);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    line-height: 1;
}
.logo-sub { color: var(--accent-teal); font-weight: 600; font-size: 1rem; }

/* Buttons */
.btn {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 1.5rem 3rem;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.btn:hover {
    background: var(--accent-teal);
    transform: translateY(-2px);
}
.btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* Shared Layout Components */
.bento-box {
    background: transparent;
    border: none;
    border-radius: 40px;
    padding: 4rem;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.6s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Global Buttons and Actions */
.btn-action {
    background: #ffffff;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 1rem 2rem;
    font-size: 0.9rem;
    font-family: var(--font-main);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 74, 128, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action:hover:not(:disabled) {
    background: var(--accent-blue);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 74, 128, 0.15);
}

.btn-action:disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

#unlock-btn {
    border-color: #64748b;
    color: #64748b;
}

#unlock-btn:hover {
    background: #64748b;
    color: #ffffff;
    border-color: #64748b;
}

#print-btn {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

#print-btn:hover {
    background: var(--accent-teal);
    color: #ffffff;
    border-color: var(--accent-teal);
}

/* Security Status Badge */
.status-badge {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transform-origin: right center;
}

.status-badge:not(.badge-awaiting) {
    transform: scale(1.05);
}

.badge-awaiting {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.badge-error {
    background: #ff4444;
    color: #ffffff;
    border: 1px solid #dc2626;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
}

.badge-secured {
    background: var(--accent-teal);
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 168, 181, 0.2);
}

.badge-secured::before {
    content: "✓";
    font-weight: 900;
}

.badge-error::before {
    content: "!";
    font-weight: 900;
}

@keyframes badgePop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1.05); opacity: 1; }
}

/* Session Inactivity Overlay */
#inactivity-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.security-pulse-ring {
    width: 120px;
    height: 120px;
    border: 2px solid var(--accent-teal);
    border-radius: 50%;
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0, 168, 181, 0.2);
}

.security-pulse-ring::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent-teal);
    border-radius: 50%;
    animation: securityPulse 2s infinite;
}

@keyframes securityPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.security-header {
    font-family: var(--font-exo);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.security-sub {
    font-family: var(--font-main);
    font-size: 1rem;
    color: #94a3b8;
    max-width: 450px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

/* User Profile Bar */
.user-profile-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--accent-teal-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.user-info {
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: #475569;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.user-info strong {
    color: var(--text-dark);
    font-weight: 800;
}

/* Audit-Trail Watermark */
.audit-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    font-family: var(--font-exo);
    font-weight: 900;
    font-size: 8vw;
    color: rgba(0, 74, 128, 0.03);
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
    user-select: none;
    transition: all 1s ease;
    text-transform: uppercase;
}

.audit-watermark.certified {
    color: rgba(0, 168, 181, 0.08);
}

/* Field-Level Validation */
.validation-cue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--accent-teal);
    color: #000;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 900;
    margin-left: 10px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0.5);
}

.validation-cue.active {
    opacity: 1;
    transform: scale(1);
}

/* Verification Transition Overlay */
#verification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 3000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scan-line {
    width: 100%;
    height: 4px;
    background: var(--accent-teal);
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 0 20px var(--accent-teal);
    animation: scanningLine 2s ease-in-out infinite;
}

@keyframes scanningLine {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

.verify-text {
    font-family: var(--font-exo);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-blue);
    letter-spacing: 5px;
    text-transform: uppercase;
}

/* Dynamic Branding */
#branding-watermark {
    position: fixed;
    bottom: -50px;
    right: -50px;
    width: 500px;
    height: 500px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: saturate(2.5) contrast(1.1);
    mix-blend-mode: multiply;
    transition: opacity 1s ease;
}

.theme-toggle-btn {
    font-family: var(--font-main);
    font-size: 0.85rem;
    padding: 8px 16px;
    border: 1px solid rgba(0, 168, 181, 0.2);
    background: rgba(0, 168, 181, 0.05);
    color: var(--accent-teal);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.client-avatar-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    padding: 4px;
    border: 1px solid var(--accent-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.client-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- SUBTLE SIDE SCROLL INDICATOR --- */
.side-scroll-indicator {
    position: fixed;
    right: 2.5rem;
    bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.6; /* More subtle starting opacity */
    transition: opacity 0.5s ease;
}

.indicator-arrow {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 168, 181, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-teal);
    font-size: 1rem;
    background: transparent;
    animation: indicatorPulse 2.5s infinite;
}

.indicator-text { display: none; } /* Removed text for subtlety */

@keyframes indicatorPulse {
    0% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(8px); opacity: 0.8; }
    100% { transform: translateY(0); opacity: 0.4; }
}

/* --- SITE FOOTER --- */
.site-footer {
    background: #0a0a0a;
    padding: 100px 5vw 60px;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}

.footer-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-exo);
    font-weight: 900;
    font-size: 30vw;
    line-height: 1;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    user-select: none;
    z-index: 1;
    white-space: nowrap;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
}

.footer-brand-cell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.brand-mission {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 320px;
    margin: 0;
}

.system-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 168, 181, 0.1);
    border: 1px solid rgba(0, 168, 181, 0.2);
    padding: 10px 20px;
    border-radius: 100px;
    font-family: var(--font-main);
    font-size: 13px;
    color: var(--accent-teal);
    font-weight: 700;
    width: fit-content;
}

.status-pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent-teal);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-teal);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}

.footer-nav-cell {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-label {
    display: block;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 900;
    color: var(--accent-teal);
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.footer-nav-cell a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.footer-nav-cell a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.footer-bottom-bar {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.technical-hash { 
    font-family: var(--font-main); 
    opacity: 0.5; 
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 60px 8vw 40px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand-cell, .system-status-pill {
        align-items: center;
        margin: 0 auto;
    }
    .footer-bottom-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
