/**
 * NSRP — LOGIN ULTRA COMMAND CENTER
 * National Security Response Platform · Republika e Kosovës
 * CSRP v5.0 Ultra — Cyber Command Center Login
 * Dizajn: CISA.gov / NATO NCSC / NCCIC portal 2026 level
 */

:root {
    --bg: #0a1628;
    --bg-2: #06101f;
    --surface: #12243e;
    --surface-2: #162a47;
    --primary: #002395;          /* Blu kombëtar */
    --primary-2: #1d3ea8;
    --primary-3: #3b5bc9;
    --accent: #e9b949;           /* Ari oficial */
    --accent-2: #c99324;
    --alert: #dc2626;
    --alert-2: #991b1b;
    --success: #16a34a;
    --text: #f1f5f9;
    --text-dim: #cbd5e1;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --border: rgba(233, 185, 73, 0.22);
    --border-dim: rgba(148, 163, 184, 0.14);
    --focus: rgba(233, 185, 73, 0.35);
    --glass: rgba(18, 36, 62, 0.72);
    --glass-strong: rgba(22, 42, 71, 0.88);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body { height: 100%; }

body.nsrp-cmd {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ===================================================
   KOSOVO MAP BACKGROUND + GRADIENT OVERLAY
   =================================================== */
.nsrp-map-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.nsrp-map-bg svg.kosova-map {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(1200px, 95vw);
    height: auto;
    opacity: 0.14;
    filter: drop-shadow(0 0 40px rgba(0, 35, 149, 0.4));
}

.nsrp-map-bg svg.kosova-map .kosova-shape {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(233, 185, 73, 0.4));
}

.nsrp-map-bg svg.kosova-map .kosova-fill {
    fill: rgba(0, 35, 149, 0.12);
    stroke: rgba(233, 185, 73, 0.4);
    stroke-width: 1.5;
}

.nsrp-map-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 30%, rgba(0, 35, 149, 0.45) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 85% 80%, rgba(220, 38, 38, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 35% 25% at 15% 85%, rgba(233, 185, 73, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, #0a1628 0%, #06101f 100%);
}

.nsrp-map-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(233, 185, 73, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(233, 185, 73, 0.03) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 85%);
}

/* Pulse markers mbi hartë — 7 qendra kryesore */
.nsrp-marker {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 185, 73, 0.25), 0 0 12px rgba(233, 185, 73, 0.9);
    transform: translate(-50%, -50%);
}

.nsrp-marker.is-alert {
    background: var(--alert);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25), 0 0 12px rgba(220, 38, 38, 0.9);
}

.nsrp-marker::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid currentColor;
    color: var(--accent);
    animation: nsrp-ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.9;
}

.nsrp-marker.is-alert::after { color: var(--alert); }

@keyframes nsrp-ping {
    0% { transform: scale(1); opacity: 0.9; }
    75%, 100% { transform: scale(3.6); opacity: 0; }
}

.nsrp-marker-label {
    position: absolute;
    transform: translate(-50%, -200%);
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

/* ===================================================
   CLASSIFICATION STRIP
   =================================================== */
.nsrp-classif {
    position: relative;
    z-index: 10;
    background: repeating-linear-gradient(
        135deg,
        var(--alert) 0,
        var(--alert) 14px,
        var(--alert-2) 14px,
        var(--alert-2) 28px
    );
    color: #fff;
    font-family: "SF Mono", "Cascadia Code", "Courier New", monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.25em;
    text-align: center;
    padding: 7px 16px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.nsrp-classif .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    margin: 0 14px;
    vertical-align: middle;
    animation: nsrp-blink 1.6s ease-in-out infinite;
}

@keyframes nsrp-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===================================================
   MAIN SHELL — Full-screen
   =================================================== */
.nsrp-shell {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.nsrp-shell-inner {
    width: 100%;
    max-width: 1320px;
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 48px;
    align-items: center;
}

/* ===================================================
   LEFT: BRAND + MISSION + STATS
   =================================================== */
.nsrp-brand {
    position: relative;
    padding: 0 8px;
}

.nsrp-brand-head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.nsrp-crest {
    width: 72px;
    height: 80px;
    flex-shrink: 0;
    filter: drop-shadow(0 8px 28px rgba(233, 185, 73, 0.35));
}

.nsrp-brand-titles strong {
    display: block;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.nsrp-brand-titles em {
    display: block;
    font-style: normal;
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    margin-top: 4px;
}

.nsrp-brand-titles span {
    display: block;
    font-size: 10.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    margin-top: 6px;
}

.nsrp-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: "SF Mono", monospace;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 22px;
    box-shadow: 0 4px 14px rgba(0, 35, 149, 0.5);
}

.nsrp-version-badge .vb-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: nsrp-blink 2s ease-in-out infinite;
}

.nsrp-hero h1 {
    font-size: clamp(34px, 4.2vw, 52px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: #ffffff;
    margin-bottom: 18px;
}

.nsrp-hero h1 .accent {
    color: var(--accent);
    display: block;
}

.nsrp-hero p {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 560px;
    margin-bottom: 36px;
}

/* Stats grid — scenarët / incidentët / simulimet */
.nsrp-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 620px;
    margin-bottom: 32px;
}

.nsrp-stat {
    padding: 16px 14px;
    background: var(--glass);
    border: 1px solid var(--border-dim);
    border-top: 2px solid var(--accent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.nsrp-stat:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.nsrp-stat .stat-num {
    font-family: "SF Mono", "Cascadia Code", monospace;
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    display: block;
    margin-bottom: 6px;
}

.nsrp-stat .stat-label {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    display: block;
}

/* Agency / footer badges */
.nsrp-agencies {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-dim);
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    max-width: 620px;
}

.nsrp-agencies span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nsrp-agencies .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px rgba(22, 163, 74, 0.8);
    animation: nsrp-blink 2s ease-in-out infinite;
}

.nsrp-agencies svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
}

/* ===================================================
   RIGHT: FORM CARD (glassmorphism + gradient border)
   =================================================== */
.nsrp-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nsrp-card {
    width: 100%;
    max-width: 460px;
    position: relative;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.55),
        0 4px 24px rgba(0, 35, 149, 0.35);
}

.nsrp-card-inner {
    background: linear-gradient(180deg, var(--glass-strong) 0%, rgba(10, 22, 40, 0.95) 100%);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    padding: 40px 38px 30px;
}

.nsrp-card-header {
    text-align: center;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-dim);
}

.nsrp-card-header .seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    border: 2px solid var(--accent);
    margin-bottom: 14px;
    box-shadow: 0 6px 20px rgba(0, 35, 149, 0.5);
}

.nsrp-card-header .seal svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.nsrp-card-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.nsrp-card-header p {
    font-size: 11.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* Tabs */
.nsrp-tabs {
    display: flex;
    gap: 2px;
    background: rgba(6, 16, 31, 0.7);
    border: 1px solid var(--border-dim);
    padding: 3px;
    margin-bottom: 22px;
}

.nsrp-tab {
    flex: 1;
    padding: 10px 12px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nsrp-tab:hover { color: #fff; }

.nsrp-tab.is-active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 35, 149, 0.5);
}

.nsrp-tab-pane { display: none; }
.nsrp-tab-pane.is-active { display: block; animation: nsrp-fade 0.25s ease; }

@keyframes nsrp-fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Alerts */
.nsrp-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 18px;
    border-left: 3px solid;
}

.nsrp-alert.is-error {
    background: rgba(220, 38, 38, 0.12);
    border-left-color: var(--alert);
    color: #fecaca;
}

.nsrp-alert.is-success {
    background: rgba(22, 163, 74, 0.12);
    border-left-color: var(--success);
    color: #bbf7d0;
}

.nsrp-alert svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Fields */
.nsrp-field { margin-bottom: 16px; }

.nsrp-field label {
    display: block;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 7px;
}

.nsrp-input-wrap { position: relative; }

.nsrp-input-wrap svg.icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
    transition: color 0.18s ease;
}

.nsrp-field input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: rgba(6, 16, 31, 0.8);
    border: 1px solid var(--border-dim);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    min-height: 44px;
}

.nsrp-field input::placeholder { color: var(--muted-2); }

.nsrp-field input:hover { border-color: rgba(148, 163, 184, 0.32); }

.nsrp-field input:focus {
    border-color: var(--accent);
    background: rgba(6, 16, 31, 0.95);
    box-shadow: 0 0 0 3px var(--focus), 0 0 20px rgba(233, 185, 73, 0.15);
}

.nsrp-input-wrap:focus-within svg.icon-left {
    color: var(--accent);
}

/* Submit button — gold primary with shift microinteraction */
.nsrp-submit {
    width: 100%;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 50%, var(--primary-3) 100%);
    color: #fff;
    border: 1px solid rgba(233, 185, 73, 0.45);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-position 0.4s ease;
    box-shadow: 0 8px 24px rgba(0, 35, 149, 0.45);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    min-height: 48px;
    position: relative;
    overflow: hidden;
    background-size: 200% 100%;
    background-position: 0% 50%;
}

.nsrp-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(233, 185, 73, 0.18), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.nsrp-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 35, 149, 0.6), 0 0 20px rgba(233, 185, 73, 0.2);
    background-position: 100% 50%;
}

.nsrp-submit:hover::before { transform: translateX(100%); }

.nsrp-submit:active { transform: translateY(0); }

.nsrp-submit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.nsrp-submit svg { width: 14px; height: 14px; }

.nsrp-card-disclaimer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-dim);
    text-align: center;
    font-size: 10px;
    color: var(--muted);
    line-height: 1.7;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nsrp-card-disclaimer strong { color: var(--accent); font-weight: 700; }

/* ===================================================
   FOOTER STRIP
   =================================================== */
.nsrp-foot {
    position: relative;
    z-index: 2;
    padding: 14px 32px;
    border-top: 1px solid var(--border-dim);
    background: rgba(6, 16, 31, 0.92);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.06em;
    font-family: "SF Mono", "Cascadia Code", monospace;
}

.nsrp-foot .foot-left,
.nsrp-foot .foot-right {
    display: flex;
    gap: 10px 22px;
    flex-wrap: wrap;
    align-items: center;
}

.nsrp-foot strong { color: var(--accent); font-weight: 700; }

.nsrp-foot a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.18s ease;
}

.nsrp-foot a:hover { color: var(--accent); }

/* ===================================================
   A11Y + RESPONSIVE
   =================================================== */
.nsrp-tab:focus-visible,
.nsrp-field input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 1100px) {
    .nsrp-shell-inner {
        grid-template-columns: 1fr;
        max-width: 620px;
        gap: 32px;
    }
    .nsrp-stats { grid-template-columns: repeat(4, 1fr); max-width: 100%; }
    .nsrp-hero h1 { text-align: left; }
}

@media (max-width: 768px) {
    .nsrp-shell { padding: 24px 16px; }
    .nsrp-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .nsrp-card-inner { padding: 30px 24px 22px; }
    .nsrp-agencies { gap: 12px 18px; }
    .nsrp-map-bg svg.kosova-map { opacity: 0.08; }
    .nsrp-marker-label { display: none; }
}

@media (max-width: 480px) {
    .nsrp-classif { font-size: 9px; letter-spacing: 0.18em; }
    .nsrp-classif .dot { margin: 0 8px; }
    .nsrp-foot {
        flex-direction: column;
        text-align: center;
        padding: 12px 16px;
    }
    .nsrp-brand-head { flex-wrap: wrap; gap: 14px; }
    .nsrp-crest { width: 58px; height: 64px; }
    .nsrp-brand-titles strong { font-size: 16px; }
    .nsrp-hero h1 { font-size: 30px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .nsrp-marker::after { display: none; }
}

/* High contrast safeguard */
@media (prefers-contrast: more) {
    .nsrp-field input { border-color: var(--accent); }
    .nsrp-card-inner { background: #0a1628; }
}
