/* ---- Hero ---- */
.san-hero {
    position: relative;
    text-align: center;
    /* padding: 7rem 1.5rem 3rem; */
    overflow: hidden;
    background: linear-gradient(180deg, rgba(163,230,53,0.04) 0%, transparent 55%);
}

/* ---- Trust badges ---- */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(163,230,53,0.08);
    border: 1px solid rgba(163,230,53,0.2);
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    color: var(--tlb-accent, #16a34a);
}

/* ---- Meta detection tags (red — things being removed) ---- */
.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: 99px;
    font-size: 10px;
    font-weight: 600;
    color: #f87171;
}

/* ============================================================
   STEP BAR
   ============================================================ */
.step-bar {
    display: flex;
    align-items: center;
    background: var(--tlb-surface, #ffffff);
    border: 1px solid var(--tlb-border2, #e2e8f0);
    border-radius: 16px;
    padding: 14px 20px;
    justify-content: space-between;
    gap: 0;
}

.step-bar .step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    position: relative;
    opacity: 0.35;
    transition: opacity 0.3s ease;
}

/* connector line between steps */
.step-bar .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 1px;
    background: var(--tlb-border2, #e2e8f0);
}

.step-bar .step-item.active,
.step-bar .step-item.done {
    opacity: 1;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--tlb-border2, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--tlb-text-muted, #64748b);
    transition: all 0.35s ease;
    background: transparent;
    position: relative;
    z-index: 1;
}

.step-bar .step-item.active .step-num {
    background: rgba(163,230,53,0.12);
    color: #a3e635;
    border-color: #a3e635;
    box-shadow: 0 0 0 4px rgba(163,230,53,0.12);
}

.step-bar .step-item.done .step-num {
    background: #a3e635;
    color: #040f0f;
    border-color: #a3e635;
}

.step-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tlb-text-muted, #64748b);
    transition: color 0.3s;
}

.step-bar .step-item.active .step-label,
.step-bar .step-item.done .step-label {
    color: #a3e635;
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 48px 24px;
    background: var(--tlb-surface, #ffffff);
    border: 2px dashed rgba(163,230,53,0.2);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 220px;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: rgba(163,230,53,0.45);
    background: rgba(163,230,53,0.03);
}

.upload-zone.dragover {
    border-color: #a3e635;
    background: rgba(163,230,53,0.06);
    transform: scale(1.005);
    box-shadow: 0 0 50px rgba(163,230,53,0.12);
}

/* Progress overlay inside upload zone */
.upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4,15,15,0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(6px);
    border-radius: 22px;
    z-index: 20;
}

.upload-ring {
    line-height: 0;
}

.upload-ring__track {
    fill: none;
    stroke: rgba(255,255,255,0.08);
    stroke-width: 4;
}

.upload-ring__fill {
    fill: none;
    stroke: #a3e635;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 164;
    stroke-dashoffset: 164;
    transform: rotate(-90deg);
    transform-origin: 30px 30px;
    transition: stroke-dashoffset 0.12s linear;
}

/* Animated icon ring */
.upload-icon-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(163,230,53,0.1);
    border: 1.5px solid rgba(163,230,53,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #a3e635;
    animation: pulse-icon 3s ease-in-out infinite;
    pointer-events: none;
}

/* ============================================================
   FILE QUEUE
   ============================================================ */
.file-queue {
    background: var(--tlb-surface, #ffffff);
    border: 1px solid var(--tlb-border2, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
    list-style: none;
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: rgba(255,255,255,0.02); }

.file-type-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(163,230,53,0.12);
    display: flex; align-items: center; justify-content: center;
    color: #a3e635;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.file-type-icon.pdf  { background: rgba(239,68,68,0.12);  color: #f87171; }
.file-type-icon.webp { background: rgba(59,130,246,0.12); color: #60a5fa; }

.file-meta { flex: 1; min-width: 0; }
.file-name {
    font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-size { font-size: 11px; color: var(--tlb-text-muted, #64748b); margin-top: 2px; }

.btn-remove {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.15);
    color: #f87171;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.btn-remove:hover {
    background: rgba(239,68,68,0.22);
    transform: scale(1.1);
}

/* ============================================================
   SCANNING PANEL
   ============================================================ */
.scan-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    background: var(--tlb-surface, #ffffff);
    border: 1px solid var(--tlb-border2, #e2e8f0);
    border-radius: 24px;
    padding: 40px 24px;
}

/* Radar SVG spinner */
.scan-radar {
    animation: radar-spin 2s linear infinite;
    transform-origin: center;
    filter: drop-shadow(0 0 12px rgba(163,230,53,0.3));
}

.scan-file-list {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--tlb-border2, #e2e8f0);
    border-radius: 12px;
    padding: 8px;
    max-height: 180px;
    overflow-y: auto;
    text-align: left;
}

.scan-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12px;
}

.scan-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #a3e635;
    flex-shrink: 0;
    animation: blink-dot 1.1s ease-in-out infinite;
}

/* ============================================================
   RESULTS: SUMMARY CARDS
   ============================================================ */
.results-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.summary-card {
    background: var(--tlb-surface, #ffffff);
    border: 1px solid var(--tlb-border2, #e2e8f0);
    border-radius: 16px;
    padding: 18px 12px;
    text-align: center;
    transition: border-color 0.3s;
}
.summary-card.safe   { border-color: rgba(163,230,53,0.15); }
.summary-card.threat { border-color: rgba(239,68,68,0.15); }

.summary-num {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}
.summary-label {
    font-size: 11px;
    color: var(--tlb-text-muted, #64748b);
    margin-top: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================================
   RESULTS: FILE CARDS
   ============================================================ */
.result-file-card {
    background: var(--tlb-surface, #ffffff);
    border: 1px solid var(--tlb-border2, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s;
}
.result-file-card.has-threats {
    border-color: rgba(239,68,68,0.2);
}
.result-file-card.is-safe {
    border-color: rgba(163,230,53,0.1);
}

.result-file-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}
.result-file-header:hover { background: rgba(255,255,255,0.02); }

/* Status dot colour set by JS via inline style, defaults: */
.result-file-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #a3e635;      /* safe default */
    flex-shrink: 0;
    transition: background 0.3s, box-shadow 0.3s;
}
.result-file-card.has-threats .result-file-status-dot {
    background: #ef4444;
}

.result-file-name {
    font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-file-size { font-size: 11px; color: var(--tlb-text-muted, #64748b); white-space: nowrap; }

/* Threat detail toggle (animated chevron handled by JS inline style) */
.threat-detail-list {
    background: rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.04);
}

.threat-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
}
.threat-row:last-child { border-bottom: none; }
.threat-row:hover { background: rgba(255,255,255,0.02); }

.threat-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.threat-icon.critical { background: rgba(239,68,68,0.15);  color: #ef4444; }
.threat-icon.high     { background: rgba(249,115,22,0.15); color: #f97316; }
.threat-icon.medium   { background: rgba(234,179,8,0.15);  color: #eab308; }
.threat-icon.low      { background: rgba(59,130,246,0.15); color: #60a5fa; }

.threat-type   { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.threat-detail { font-size: 11px; color: var(--tlb-text-muted, #64748b); line-height: 1.55; }

/* Severity badges */
.sev-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.07em;
    white-space: nowrap;
    border: 1px solid transparent;
}
.sev-badge.critical { background: rgba(239,68,68,0.14);  color: #ef4444; border-color: rgba(239,68,68,0.22); }
.sev-badge.high     { background: rgba(249,115,22,0.14); color: #f97316; border-color: rgba(249,115,22,0.22); }
.sev-badge.medium   { background: rgba(234,179,8,0.14);  color: #eab308; border-color: rgba(234,179,8,0.22); }
.sev-badge.low      { background: rgba(59,130,246,0.14); color: #60a5fa; border-color: rgba(59,130,246,0.22); }
.sev-badge.safe     { background: rgba(163,230,53,0.1);  color: #a3e635; border-color: rgba(163,230,53,0.2); }

/* Checkbox to include/exclude file */
.file-include-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-top: 1px solid rgba(255,255,255,0.04);
    font-size: 12px;
    color: #9ca3af;
    background: rgba(0,0,0,0.08);
}
.file-include-toggle input[type="checkbox"] {
    accent-color: #a3e635;
    width: 14px; height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}
.file-include-toggle label { cursor: pointer; user-select: none; }

/* ============================================================
   PROCESS ACTION BAR
   ============================================================ */
.process-action-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--tlb-surface, #ffffff);
    border: 1px solid var(--tlb-border2, #e2e8f0);
    border-radius: 16px;
    padding: 16px;
}

@media (min-width: 480px) {
    .process-action-bar {
        flex-direction: row;
        align-items: center;
    }
    .process-action-bar p { flex: 1; }
}

/* ============================================================
   DOWNLOAD PANEL
   ============================================================ */
.download-card {
    background: linear-gradient(135deg, #0b2323 0%, #071a1a 100%);
    border: 1px solid rgba(163,230,53,0.2);
    border-radius: 24px;
    padding: 40px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.download-card::before {
    content: '';
    position: absolute;
    top: -60px; left: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(163,230,53,0.06), transparent 70%);
    pointer-events: none;
}

/* ============================================================
   ALERT
   ============================================================ */
.alert-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.22);
    border-radius: 14px;
    color: #fca5a5;
    font-size: 13px;
    line-height: 1.55;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.san-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    backdrop-filter: blur(12px);
    z-index: 9999;
    max-width: 320px;
    animation: san-toast-in 0.3s ease, san-toast-out 0.4s ease 3.4s forwards;
}
.san-toast.error   { background: rgba(25,8,8,0.95);  border: 1px solid rgba(239,68,68,0.3);   color: #fca5a5; }
.san-toast.success { background: rgba(8,25,8,0.95);  border: 1px solid rgba(163,230,53,0.3);  color: #a3e635; }
.san-toast.info    { background: rgba(8,15,30,0.95); border: 1px solid rgba(59,130,246,0.3);  color: #93c5fd; }

/* ============================================================
   UTILITY
   ============================================================ */
.spin {
    animation: san-spin 0.65s linear infinite;
    display: inline-block;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse-icon {
    0%, 100% { box-shadow: 0 0 0 0   rgba(163,230,53,0.2); }
    50%       { box-shadow: 0 0 0 14px rgba(163,230,53,0);   }
}

@keyframes radar-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.15; }
}

/* Used by animateProcessing() in sanitizer.js */
@keyframes blink-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.3; transform: scale(0.7); }
}

@keyframes san-toast-in {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@keyframes san-toast-out {
    to { opacity: 0; transform: translateY(-6px); }
}

@keyframes san-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 480px) {
    .san-hero { padding: 6rem 1rem 2rem; }
    .results-summary { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .summary-num { font-size: 1.5rem; }
    .san-toast { bottom: 12px; right: 12px; left: 12px; max-width: none; }
}