/* ==========================================================================
   Star Hire - design system
   Dark futuristic StarCitizen HUD style. Cyan/orange accents, panels,
   responsive, no external dependencies.
   ========================================================================== */

:root {
    --bg: #080b11;
    --bg-2: #0d131c;
    --panel: #111a26;
    --panel-2: #0f1622;
    --line: #1e2a3a;
    --text: #d7e2ee;
    --muted: #7f93a8;
    --cyan: #35d6ff;
    --cyan-dim: #1a7f9c;
    --orange: #ff8a1e;
    --red: #ff4d5e;
    --green: #3ddc84;
    --amber: #ffc23d;

    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
    --glow-cyan: 0 0 0 1px rgba(53, 214, 255, 0.35), 0 0 18px rgba(53, 214, 255, 0.22);
    --glow-orange: 0 0 0 1px rgba(255, 138, 30, 0.35), 0 0 18px rgba(255, 138, 30, 0.22);

    --font: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", "Menlo", monospace;

    --nav-height: 64px;
}

/* Reset ------------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 12% -10%, rgba(53, 214, 255, 0.10), transparent 42%),
        radial-gradient(circle at 92% 0%, rgba(255, 138, 30, 0.08), transparent 38%),
        linear-gradient(rgba(30, 42, 58, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 42, 58, 0.35) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 42px 42px, 42px 42px;
    background-attachment: fixed;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #7fe4ff;
}

h1, h2, h3, h4 {
    margin: 0 0 0.5em;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: #eaf3fb;
    line-height: 1.2;
}

h1 { font-size: 1.85rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }

hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 1.25rem 0;
}

code, .mono {
    font-family: var(--mono);
    font-size: 0.92em;
}

::selection {
    background: rgba(53, 214, 255, 0.28);
}

:focus-visible {
    outline: none;
    box-shadow: var(--glow-cyan);
    border-radius: var(--radius-sm);
}

/* Layout ------------------------------------------------------------------ */

.container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 18px;
}

.page {
    padding: 26px 18px 60px;
}

.page-head {
    margin-bottom: 22px;
}

.hero {
    position: relative;
    padding: 40px 30px;
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(53, 214, 255, 0.10), transparent 55%),
        linear-gradient(315deg, rgba(255, 138, 30, 0.08), transparent 55%),
        var(--panel);
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        0deg,
        rgba(53, 214, 255, 0.05) 0,
        rgba(53, 214, 255, 0.05) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
}

.hero h1 {
    font-size: 2.3rem;
    margin-bottom: 0.3em;
}

.hero-sub {
    max-width: 60ch;
    margin: 0;
}

.hud-scanline {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(53, 214, 255, 0.035),
        transparent
    );
    background-size: 100% 8px;
    animation: scan 8s linear infinite;
    opacity: 0.5;
}

@keyframes scan {
    from { background-position-y: 0; }
    to { background-position-y: 100vh; }
}

/* Navigation -------------------------------------------------------------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(8, 11, 17, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 16px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eaf3fb;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.nav-brand:hover { color: var(--cyan); }

.nav-logo { width: 32px; height: 32px; }

.nav-brand-name { white-space: nowrap; }

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.beta-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--amber);
    background: rgba(255, 194, 61, 0.12);
    border: 1px solid rgba(255, 194, 61, 0.45);
    border-radius: 999px;
    white-space: nowrap;
    cursor: help;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.nav-spacer { flex: 1; }

.nav-link {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 550;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(53, 214, 255, 0.06);
}

.nav-link.is-active {
    color: var(--cyan);
    border-color: rgba(53, 214, 255, 0.35);
    background: rgba(53, 214, 255, 0.08);
}

.nav-logout {
    display: flex;
}

.nav-link-button {
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-link-button:hover {
    color: var(--text);
    background: rgba(53, 214, 255, 0.06);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--cyan);
    border-radius: 2px;
}

/* Buttons ----------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:hover {
    color: #eaf3fb;
    border-color: var(--cyan-dim);
    box-shadow: var(--glow-cyan);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    color: #04121a;
    background: linear-gradient(135deg, var(--cyan), #1ba6cc);
    border-color: transparent;
}

.btn-primary:hover {
    color: #04121a;
    background: linear-gradient(135deg, #6fe2ff, var(--cyan));
    box-shadow: 0 0 22px rgba(53, 214, 255, 0.35);
}

.btn-outline {
    background: transparent;
    border-color: var(--cyan-dim);
    color: var(--cyan);
}

.btn-danger {
    background: transparent;
    border-color: rgba(255, 77, 94, 0.55);
    color: var(--red);
}

.btn-danger:hover {
    color: #fff;
    background: rgba(255, 77, 94, 0.16);
    box-shadow: 0 0 18px rgba(255, 77, 94, 0.3);
    border-color: var(--red);
}

.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-block { display: flex; width: 100%; }

.btn[disabled],
.btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Forms ------------------------------------------------------------------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 11px 13px;
    font: inherit;
    color: var(--text);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder,
.textarea::placeholder {
    color: #55697e;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.textarea {
    min-height: 140px;
    resize: vertical;
}

.select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--cyan) 50%),
        linear-gradient(135deg, var(--cyan) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 38px;
}

.hint {
    font-size: 0.78rem;
    color: var(--muted);
}

.error {
    font-size: 0.8rem;
    color: var(--red);
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
    border-color: var(--red);
    box-shadow: 0 0 0 1px rgba(255, 77, 94, 0.35);
}

/* Panels ------------------------------------------------------------------ */

.panel {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent 60%, var(--orange));
    opacity: 0.85;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-2);
}

.panel-header h1,
.panel-header h2,
.panel-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.panel-body {
    padding: 18px;
}

.panel-body > :last-child { margin-bottom: 0; }

/* HUD corner ornaments ---------------------------------------------------- */

.hud-corner::after,
.hud-corner::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--cyan);
    opacity: 0.6;
    pointer-events: none;
}

.hud-corner::before {
    top: 6px;
    left: 6px;
    border-top: 2px solid var(--cyan);
    border-left: 2px solid var(--cyan);
}

.hud-corner::after {
    bottom: 6px;
    right: 6px;
    border-bottom: 2px solid var(--cyan);
    border-right: 2px solid var(--cyan);
}

/* Grids ------------------------------------------------------------------- */

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Dashboard panels: latest contracts (wide) / citizens online (narrow) ------ */

.dash-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }

/* Cards ------------------------------------------------------------------- */

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.card:hover {
    border-color: var(--cyan-dim);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.2s ease;
}

.user-card:hover {
    border-color: var(--cyan-dim);
    box-shadow: var(--glow-cyan);
}

.user-card-avatar {
    position: relative;
    flex: 0 0 auto;
}

.user-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-card-name {
    font-weight: 650;
    font-size: 1.02rem;
    color: #eaf3fb;
}

.user-card-name:hover { color: var(--cyan); }

.job-card {
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.job-card:hover {
    border-color: var(--cyan-dim);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.job-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.job-card-title {
    font-size: 1.12rem;
    font-weight: 650;
    color: #eaf3fb;
}

.job-card-title:hover { color: var(--cyan); }

.job-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

/* Avatars ----------------------------------------------------------------- */

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--panel-2);
}

.avatar-sm { width: 30px; height: 30px; }
.avatar-lg { width: 64px; height: 64px; }

/* Contract rank images ---------------------------------------------------- */

.rank-img {
    display: inline-block;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--panel-2);
    vertical-align: middle;

    /* Sci-fi HUD ring + pulse. --rank-* are overridden per tier (r0..r7). */
    --rank-ring: var(--line);
    --rank-glow: rgba(127, 147, 168, 0.28);
    --rank-glow-strong: rgba(127, 147, 168, 0.42);
    --rank-blur: 8px;
    box-shadow:
        0 0 0 1px var(--rank-ring),
        0 0 var(--rank-blur) 1px var(--rank-glow);
    animation: rank-pulse 3.6s ease-in-out infinite;
}

.rank-img-sm { width: 26px; height: 26px; border-radius: 4px; }
.rank-img-md { width: 40px; height: 40px; }
.rank-img-lg { width: 96px; height: 96px; border-radius: var(--radius); }

.rank-img-0 {
    background: var(--line);
    border-color: var(--muted);
    background-image: none;
}

/* Rank tiers: stronger glow and a cyan -> amber -> orange progression. */
.rank-img-r0 {
    --rank-ring: var(--muted);
    --rank-glow: rgba(127, 147, 168, 0.30);
    --rank-glow-strong: rgba(127, 147, 168, 0.46);
    --rank-blur: 7px;
    animation-duration: 4s;
}

.rank-img-r1 {
    --rank-ring: var(--cyan);
    --rank-glow: rgba(53, 214, 255, 0.32);
    --rank-glow-strong: rgba(53, 214, 255, 0.54);
    --rank-blur: 9px;
    animation-duration: 3.6s;
}

.rank-img-r2 {
    --rank-ring: var(--cyan);
    --rank-glow: rgba(53, 214, 255, 0.40);
    --rank-glow-strong: rgba(53, 214, 255, 0.62);
    --rank-blur: 11px;
    animation-duration: 3.4s;
}

.rank-img-r3 {
    --rank-ring: #6fe2ff;
    --rank-glow: rgba(53, 214, 255, 0.48);
    --rank-glow-strong: rgba(53, 214, 255, 0.72);
    --rank-blur: 13px;
    animation-duration: 3.2s;
}

.rank-img-r4 {
    --rank-ring: var(--amber);
    --rank-glow: rgba(255, 194, 61, 0.42);
    --rank-glow-strong: rgba(255, 194, 61, 0.64);
    --rank-blur: 14px;
    animation-duration: 3s;
}

.rank-img-r5 {
    --rank-ring: var(--amber);
    --rank-glow: rgba(255, 194, 61, 0.50);
    --rank-glow-strong: rgba(255, 194, 61, 0.74);
    --rank-blur: 16px;
    animation-duration: 2.9s;
}

.rank-img-r6 {
    --rank-ring: var(--orange);
    --rank-glow: rgba(255, 138, 30, 0.50);
    --rank-glow-strong: rgba(255, 138, 30, 0.74);
    --rank-blur: 18px;
    animation-duration: 2.8s;
}

.rank-img-r7 {
    --rank-ring: var(--orange);
    --rank-glow: rgba(255, 138, 30, 0.58);
    --rank-glow-strong: rgba(255, 138, 30, 0.84);
    --rank-blur: 20px;
    animation-duration: 2.6s;
}

@keyframes rank-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 1px var(--rank-ring),
            0 0 var(--rank-blur) 1px var(--rank-glow);
    }
    50% {
        box-shadow:
            0 0 0 2px var(--rank-ring),
            0 0 calc(var(--rank-blur) + 6px) 3px var(--rank-glow-strong);
    }
}

@media (prefers-reduced-motion: reduce) {
    .rank-img { animation: none; }
}

@media (max-width: 480px) {
    .rank-img-lg { width: 72px; height: 72px; }
}

/* Status dot -------------------------------------------------------------- */

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--muted);
    flex: 0 0 auto;
}

.user-card-avatar .dot {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--panel);
}

.dot-online {
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55);
    animation: pulse 2s infinite;
}

.dot-offline {
    background: #55697e;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); }
    100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

/* Badges and tags --------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--muted);
    white-space: nowrap;
}

.badge-open {
    color: #8fe6ff;
    border-color: rgba(53, 214, 255, 0.45);
    background: rgba(53, 214, 255, 0.10);
}

.badge-accepted {
    color: #ffd28a;
    border-color: rgba(255, 194, 61, 0.45);
    background: rgba(255, 194, 61, 0.10);
}

.badge-done {
    color: #9df0c2;
    border-color: rgba(61, 220, 132, 0.45);
    background: rgba(61, 220, 132, 0.10);
}

.badge-cancelled {
    color: #ff9aa5;
    border-color: rgba(255, 77, 94, 0.45);
    background: rgba(255, 77, 94, 0.10);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    font-size: 0.74rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--text);
    white-space: nowrap;
}

/* Category accents -------------------------------------------------------- */

.cat-transport     { color: #8fd0ff; border-color: rgba(143, 208, 255, 0.5); background: rgba(143, 208, 255, 0.10); }
.cat-mining        { color: #ffcf8a; border-color: rgba(255, 207, 138, 0.5); background: rgba(255, 207, 138, 0.10); }
.cat-combat        { color: #ff9aa5; border-color: rgba(255, 154, 165, 0.5); background: rgba(255, 154, 165, 0.10); }
.cat-exploration   { color: #a8b8ff; border-color: rgba(168, 184, 255, 0.5); background: rgba(168, 184, 255, 0.10); }
.cat-medical       { color: #8ff0e6; border-color: rgba(143, 240, 230, 0.5); background: rgba(143, 240, 230, 0.10); }
.cat-engineering   { color: #d7b3ff; border-color: rgba(215, 179, 255, 0.5); background: rgba(215, 179, 255, 0.10); }
.cat-misc          { color: #b6c4d4; border-color: rgba(182, 196, 212, 0.5); background: rgba(182, 196, 212, 0.10); }

/* Tables ------------------------------------------------------------------ */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.table th,
.table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.table th {
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--panel-2);
}

.table tbody tr:hover {
    background: rgba(53, 214, 255, 0.04);
}

/* Alerts ------------------------------------------------------------------ */

.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--muted);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text);
}

.alert-success { border-left-color: var(--green); background: rgba(61, 220, 132, 0.08); }
.alert-error   { border-left-color: var(--red); background: rgba(255, 77, 94, 0.08); }
.alert-info    { border-left-color: var(--cyan); background: rgba(53, 214, 255, 0.08); }
.alert-warning { border-left-color: var(--amber); background: rgba(255, 194, 61, 0.08); }

/* KPI --------------------------------------------------------------------- */

.kpi {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.kpi-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--cyan);
    line-height: 1;
}

.kpi-label {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.stat-row:last-child { border-bottom: none; }

/* Tabs -------------------------------------------------------------------- */

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
    overflow-x: auto;
}

.tab {
    padding: 9px 14px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.tab:hover { color: var(--text); }

.tab.is-active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

/* Pagination -------------------------------------------------------------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--muted);
    font-size: 0.85rem;
}

.pagination a:hover { color: var(--cyan); border-color: var(--cyan-dim); }
.pagination .is-current { color: var(--cyan); border-color: var(--cyan-dim); background: rgba(53, 214, 255, 0.08); }

/* Empty state ------------------------------------------------------------- */

.empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--panel-2);
}

/* Auth / error panels ----------------------------------------------------- */

.auth {
    display: flex;
    justify-content: center;
    padding-top: 20px;
}

.auth-panel {
    width: 100%;
    max-width: 420px;
}

.error-page {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.error-panel {
    width: 100%;
    max-width: 560px;
    text-align: center;
}

.error-code {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--cyan);
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 22px rgba(53, 214, 255, 0.4);
}

.error-heading { margin-bottom: 10px; }

/* Toasts ------------------------------------------------------------------ */

.toast-root {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 36px));
}

.toast {
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--cyan);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text);
    box-shadow: var(--shadow);
    animation: toast-in 0.2s ease;
}

.toast-success { border-left-color: var(--green); }
.toast-error   { border-left-color: var(--red); }
.toast-info    { border-left-color: var(--cyan); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Footer ------------------------------------------------------------------ */

.footer {
    border-top: 1px solid var(--line);
    background: var(--bg-2);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 18px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0 18px 16px;
}

.footer-links a {
    color: var(--muted);
    font-size: 0.82rem;
    text-decoration: none;
    letter-spacing: 0.03em;
}

.footer-links a:hover {
    color: var(--cyan);
    text-decoration: underline;
}

/* Language switcher ------------------------------------------------------- */

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
}

.lang-switch-label {
    margin-right: 2px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.lang-option {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
}

.lang-option:hover {
    color: var(--text);
    border-color: var(--cyan-dim);
}

.lang-option.is-active {
    color: var(--cyan);
    border-color: rgba(53, 214, 255, 0.5);
    background: rgba(53, 214, 255, 0.08);
}

/* Cookie notice ----------------------------------------------------------- */

.cookie-notice {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9500;
    background: rgba(13, 19, 28, 0.97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
}

.cookie-notice[hidden] {
    display: none;
}

.cookie-notice-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 12px 18px;
}

.cookie-notice-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    max-width: 70ch;
}

.cookie-notice-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-notice-link {
    color: var(--muted);
    text-decoration: underline;
}

.cookie-notice-link:hover {
    color: var(--cyan);
}

/* Legal pages ------------------------------------------------------------- */

.legal {
    max-width: 78ch;
    margin: 0 auto;
}

.legal .panel-body {
    padding: 26px 28px;
}

.prose {
    line-height: 1.7;
}

.prose h2 {
    font-size: 1.12rem;
    margin: 1.8em 0 0.55em;
    padding-bottom: 0.25em;
    border-bottom: 1px solid var(--line);
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
    font-size: 1rem;
    margin: 1.4em 0 0.4em;
}

.prose p,
.prose ul,
.prose ol {
    margin: 0 0 1em;
}

.prose ul,
.prose ol {
    padding-left: 1.3em;
}

.prose li { margin-bottom: 0.35em; }

.prose a { text-decoration: underline; }

.legal-facts {
    margin: 0 0 1.4em;
}

.legal-facts dt {
    margin-top: 1em;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.legal-facts dt:first-child { margin-top: 0; }

.legal-facts dd {
    margin: 0.2em 0 0;
}

.legal-address {
    font-style: normal;
    margin: 0 0 1.4em;
}

.legal-updated {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid var(--line);
}

.legal-cookie-table td,
.legal-cookie-table th {
    vertical-align: top;
}

.legal-empty {
    padding: 16px 18px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
}

.legal-note {
    margin: 1em 0;
    padding: 14px 16px;
    border: 1px solid rgba(255, 138, 30, 0.25);
    border-left: 3px solid var(--orange);
    border-radius: var(--radius-sm);
    background: rgba(255, 138, 30, 0.07);
    font-size: 0.92rem;
}

@media (max-width: 720px) {
    .legal .panel-body { padding: 18px; }
}

/* Utilities --------------------------------------------------------------- */

.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap { gap: 12px; }
.gap-sm { gap: 6px; }
.wrap { flex-wrap: wrap; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }

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

/* Anti-bot honeypot ------------------------------------------------------- */

.bot-trap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.bot-trap input {
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .grid-2,
    .grid-3,
    .dash-grid { grid-template-columns: minmax(0, 1fr); }

    .nav-toggle { display: flex; }

    .nav-left { gap: 8px; }

    .beta-badge {
        padding: 2px 6px;
        font-size: 0.62rem;
        letter-spacing: 0.1em;
    }

    .nav-links {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 18px 18px;
        background: rgba(8, 11, 17, 0.98);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.15s ease, transform 0.15s ease;
    }

    .nav-links.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-spacer { display: none; }

    .nav-link {
        padding: 12px;
        border: 1px solid transparent;
    }

    .lang-switch {
        margin: 6px 0 0;
        padding: 8px 12px;
    }

    .hero { padding: 28px 20px; }
    .hero h1 { font-size: 1.8rem; }

    .footer-inner { flex-direction: column; align-items: flex-start; }

    .cookie-notice-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ==========================================================================
   Live updates - pinned active-contract bar and refreshed feeds
   ========================================================================== */

.active-contract {
    position: sticky;
    top: var(--nav-height);
    z-index: 90;
    background: rgba(13, 19, 28, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.active-contract[hidden] {
    display: none;
}

.active-contract-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    min-height: 40px;
    padding: 6px 0;
}

.active-contract-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan);
    white-space: nowrap;
}

.active-contract-title {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(100%, 48ch);
}

.active-contract-title:hover {
    color: var(--cyan);
}

.active-contract-role {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.active-contract .badge {
    flex: 0 0 auto;
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55);
    animation: live-dot-pulse 2s infinite;
}

@keyframes live-dot-pulse {
    0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); }
    100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

[data-live-feed].is-refreshed {
    animation: live-feed-pulse 1s ease;
}

@keyframes live-feed-pulse {
    0% { box-shadow: 0 0 0 0 rgba(53, 214, 255, 0); }
    30% { box-shadow: 0 0 0 2px rgba(53, 214, 255, 0.35); }
    100% { box-shadow: 0 0 0 0 rgba(53, 214, 255, 0); }
}

@media (max-width: 720px) {
    .active-contract-inner { gap: 6px 8px; }
    .active-contract-label { font-size: 0.66rem; }
    .active-contract-title { max-width: 100%; }
}

.mfa-qr {
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    width: max-content;
    margin-bottom: 0.75rem;
}

.mfa-qr:empty {
    display: none;
}

.mfa-qr canvas,
.mfa-qr img {
    display: block;
    image-rendering: pixelated;
}

/* ==========================================================================
   Complaints and Discord help
   ========================================================================== */

.discord-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 12px 14px;
    background: rgba(53, 214, 255, 0.06);
    border: 1px solid var(--line);
    border-left: 3px solid var(--cyan-dim);
    border-radius: var(--radius-sm);
}

.discord-box-text {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    max-width: 60ch;
}

.discord-box-btn {
    flex: 0 0 auto;
}

.complaint-form {
    max-width: 100%;
}

.complaint-against {
    font-weight: 600;
}

/* Admin complaints table --------------------------------------------------- */

.admin-complaints-table td {
    vertical-align: top;
}

.admin-complaint-message {
    max-width: 280px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.admin-complaint-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

@media (max-width: 720px) {
    .discord-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-complaint-actions {
        justify-content: flex-start;
    }
}
