﻿:root {
    color-scheme: dark;
    --bg: #080d1d;
    --panel: rgba(20, 30, 56, 0.72);
    --border: rgba(151, 173, 255, 0.16);
    --text: #f0f5ff;
    --muted: #9caecb;
    --blue: #38bdf8;
    --violet: #8b5cf6;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font: 16px "Segoe UI", system-ui, sans-serif;
    background:
        radial-gradient(ellipse at 15% 5%, rgba(56,189,248,.17), transparent 40%),
        radial-gradient(ellipse at 90% 15%, rgba(139,92,246,.20), transparent 42%),
        var(--bg);
}

header {
    padding: 24px max(24px, calc((100% - 1200px)/2));
    background: rgba(12, 18, 36, .75);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

header strong {
    font-size: 22px;
    letter-spacing: -.5px;
}

header a {
    color: var(--muted);
    margin-left: 24px;
    text-decoration: none;
}

header a:hover, a:hover { color: var(--blue); }

main {
    max-width: 1200px;
    margin: 48px auto;
    padding: 0 24px;
}

h1 {
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -1.5px;
}

h2 { font-size: 22px; }

.panel {
    padding: 28px;
    margin: 22px 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--panel);
    backdrop-filter: blur(20px);
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
}

input, select, button {
    font: inherit;
    padding: 12px 16px;
    border-radius: 10px;
}

input, select {
    max-width: 100%;
    color: var(--text);
    background: rgba(8,13,29,.72);
    border: 1px solid var(--border);
}

input:focus, select:focus {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

button {
    color: white;
    background: linear-gradient(120deg, #2563eb, #7c3aed);
    border: 0;
    cursor: pointer;
    font-weight: 600;
    transition: transform .2s, box-shadow .2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91,91,246,.3);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
}

th { color: var(--muted); }

tr:hover { background: rgba(255,255,255,.035); }

a { color: var(--blue); }

label { display: block; margin: 16px 0 8px; }

small, .muted { color: var(--muted); }

.error { color: #fda4af; }

.inline { display: inline; }

code { overflow-wrap: anywhere; }

@media (max-width: 700px) {
    header { padding: 20px; }
    header a { margin-left: 12px; }
    main { padding: 0 14px; margin: 26px auto; }
    .panel { padding: 18px; overflow-x: auto; }
    th, td { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    button { transition: none; }
}

/* FileVault login page enhancements */

body:has(form[action="/login"]) main {
    max-width: 460px;
    margin: 65px auto;
}

body:has(form[action="/login"]) h1 {
    text-align: center;
    font-size: 38px;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #38bdf8, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body:has(form[action="/login"]) .panel {
    padding: 38px;
    border-radius: 24px;
    background: rgba(20, 30, 56, 0.68);
    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.35),
        0 0 45px rgba(56, 189, 248, 0.05);
}

body:has(form[action="/login"]) input {
    display: block;
    width: 100%;
    margin-bottom: 20px;
}

body:has(form[action="/login"]) button {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    font-weight: 700;
}

body:has(form[action="/login"]) label {
    font-size: 14px;
    color: #cbd5e1;
}

@media (max-width: 600px) {
    body:has(form[action="/login"]) main {
        margin: 35px auto;
    }

    body:has(form[action="/login"]) .panel {
        padding: 24px;
    }
}


/* Premium FileVault login experience */

body:has(form[action="/login"]) {
    background:
        radial-gradient(ellipse at 50% 25%, rgba(59,130,246,.22), transparent 48%),
        radial-gradient(ellipse at 75% 80%, rgba(124,58,237,.16), transparent 42%),
        #080d1d;
}

body:has(form[action="/login"]) main {
    max-width: 480px;
    margin: 70px auto;
}

body:has(form[action="/login"]) h1 {
    text-align: center;
    font-size: 36px;
    font-weight: 750;
    letter-spacing: -1px;
    margin-bottom: 30px;
}

body:has(form[action="/login"]) .panel {
    padding: 42px;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 24px;
    background: rgba(19,29,54,.65);
    backdrop-filter: blur(24px);
    box-shadow:
        0 25px 80px rgba(0,0,0,.4),
        0 0 60px rgba(59,130,246,.08);
}

body:has(form[action="/login"]) input:not([type="hidden"]) {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(7,13,29,.75);
    border: 1px solid rgba(148,163,184,.22);
}

body:has(form[action="/login"]) input:focus {
    border-color: #38bdf8;
    outline: 2px solid rgba(56,189,248,.25);
}

body:has(form[action="/login"]) button {
    width: 100%;
    padding: 16px;
    margin-top: 12px;
    border-radius: 12px;
    background: linear-gradient(110deg,#2563eb,#7c3aed);
    font-weight: 700;
}

body:has(form[action="/login"]) label {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
}

@media(max-width:600px) {
    body:has(form[action="/login"]) main {
        margin: 32px auto;
    }

    body:has(form[action="/login"]) .panel {
        padding: 25px;
    }
}


/* FileVault login branding */

body:has(form[action="/login"]) h1::before {
    content: "FV";
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin: 0 auto 24px;
    border-radius: 20px;
    background: linear-gradient(135deg,#38bdf8,#6366f1,#9333ea);
    box-shadow: 0 0 40px rgba(99,102,241,.35);
    color: white;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -1px;
    -webkit-text-fill-color: white;
}

body:has(form[action="/login"]) h1::after {
    content: "Secure access to your files";
    display: block;
    margin-top: 12px;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    -webkit-text-fill-color: #94a3b8;
}


/* FileVault premium login layout correction */

body:has(form[action="/login"]) {
    min-height: 100vh;
    overflow-x: hidden;
}

body:has(form[action="/login"]) main {
    width: min(100% - 32px, 520px) !important;
    max-width: 520px !important;
    min-width: 0 !important;
    margin: 70px auto 100px !important;
    padding: 0 !important;
    position: relative;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

body:has(form[action="/login"]) main > * {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body:has(form[action="/login"]) .panel {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 38px !important;
    margin: 24px 0 !important;
    box-sizing: border-box;
}

body:has(form[action="/login"]) form {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
}

body:has(form[action="/login"]) input:not([type="hidden"]) {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

body:has(form[action="/login"]) button {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal;
}

body:has(form[action="/login"]) h1,
body:has(form[action="/login"]) h2,
body:has(form[action="/login"]) p,
body:has(form[action="/login"]) label {
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
}

@media (max-width: 600px) {
    body:has(form[action="/login"]) main {
        margin: 32px auto 70px !important;
    }

    body:has(form[action="/login"]) .panel {
        padding: 24px !important;
    }
}

