/*
 * SPDX-License-Identifier: Apache-2.0
 * SPDX-FileCopyrightText: 2025,2026 ndaal Gesellschaft für Sicherheit in der Informationstechnik mbH & Co KG, Cologne
 * SPDX-FileCopyrightText: Author: Pierre Gronau <Pierre.Gronau@ndaal.eu>
 */

/* Design system carried over from vulnlookup.ndaal.eu / gspp.ndaal.eu
   so this app shares the same visual language as ndaal's other
   security tools. Self-hosted fonts — see static/VENDORED_ASSETS.md. */

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/roboto/roboto-variable.ttf') format('truetype-variations');
}

@font-face {
    font-family: 'Roboto Mono';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/roboto-mono/roboto-mono-variable.ttf') format('truetype-variations');
}

:root {
    --vl-accent: #0d6efd;
    --vl-critical: #dc3545;
    --vl-high: #fd7e14;
    --vl-medium: #ffc107;
    --vl-low: #198754;
    --vl-info: #0dcaf0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

main {
    flex: 1;
}

code, pre, .mono {
    font-family: 'Roboto Mono', 'Courier New', Courier, monospace;
}

/* Navbar — translucent, blurred, matching the reference sites. */
.navbar-blur {
    background-color: rgba(var(--bs-body-bg-rgb), 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--vl-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Hero pattern: icon + H1 + subtitle + search/upload control below. */
.page-hero {
    padding: 2rem 0;
    text-align: center;
}

.page-hero .hero-icon {
    font-size: 2.5rem;
    color: var(--vl-accent);
}

.page-hero h1 {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* Stat cards — icon + big value + label, used on the dashboard. */
.stat-card {
    border: none;
    border-radius: 0.75rem;
    transition: transform 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.6;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Threat-level badges — same palette as the WSTG/ASVS work. */
.badge-critical { background-color: var(--vl-critical) !important; color: #fff !important; }
.badge-high     { background-color: var(--vl-high) !important; color: #000 !important; }
.badge-medium   { background-color: var(--vl-medium) !important; color: #000 !important; }
.badge-low      { background-color: var(--vl-info) !important; color: #000 !important; }
.badge-safe     { background-color: var(--vl-low) !important; color: #fff !important; }

/* Table headers — uppercase, small, muted, matching the reference. */
.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    border-bottom-width: 2px;
}

/* File-upload dropzone (scan/analyze page). */
.upload-dropzone {
    border: 2px dashed var(--bs-border-color);
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--vl-accent);
    background-color: var(--bs-tertiary-bg);
}

.upload-dropzone .upload-icon {
    font-size: 3rem;
    color: var(--vl-accent);
    opacity: 0.8;
}

/* Footer — single centered line, matching the reference. */
footer {
    font-size: 0.85rem;
}

/* Small helpers still used across templates. */
.btn-unstyled {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
