:root {
    color-scheme: dark;
    --bg: #0b1020;
    --panel: #11182a;
    --panel-2: #0f1728;
    --ink: #eef4ff;
    --muted: #9aa8bd;
    --line: #253149;
    --primary: #57a5ff;
    --primary-strong: #1267d8;
    --success: #52d39b;
    --warning: #f4b740;
    --danger: #f97066;
    --shadow: 0 20px 55px rgba(0,0,0,.32);
    --hero-shade: linear-gradient(90deg, rgba(3,6,13,.94) 0%, rgba(7,12,24,.8) 48%, rgba(7,12,24,.32) 100%);
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-2: #f9fbff;
    --ink: #162033;
    --muted: #667085;
    --line: #e4e9f2;
    --primary: #1267d8;
    --primary-strong: #0d4fa8;
    --success: #16845b;
    --warning: #b7791f;
    --danger: #c2413d;
    --shadow: 0 14px 35px rgba(21,27,43,.08);
    --hero-shade: linear-gradient(90deg, rgba(9,14,25,.92) 0%, rgba(9,14,25,.72) 42%, rgba(9,14,25,.16) 100%);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, sans-serif;
}

a { color: inherit; }
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px clamp(18px, 5vw, 64px);
    color: #fff;
}
.brand { font-weight: 900; font-size: 20px; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: rgba(255,255,255,.88); text-decoration: none; font-weight: 700; font-size: 14px; }
.nav a:hover { color: #fff; }
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.1);
    color: #fff;
    cursor: pointer;
}

.hero {
    min-height: 92vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 112px clamp(22px, 6vw, 88px) 56px;
}
.hero img, .hero::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.hero img { object-fit: cover; }
.hero::after { content: ""; background: var(--hero-shade); }
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    color: #fff;
}
.eyebrow {
    display: inline-block;
    color: #75d1ff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
h1 {
    font-size: clamp(44px, 8vw, 86px);
    line-height: .96;
    margin: 0 0 22px;
    font-weight: 900;
}
.hero p {
    color: rgba(255,255,255,.84);
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.45;
    margin: 0 0 28px;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 850;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary { background: var(--primary-strong); color: #fff; }
.btn-light { background: rgba(255,255,255,.92); color: #101624; }
.btn-outline { border-color: var(--line); color: var(--ink); background: transparent; }

.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 64px 22px;
}
.section-title { max-width: 740px; margin-bottom: 28px; }
.section h2 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 10px; }
.section p { color: var(--muted); font-size: 18px; line-height: 1.55; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 10px; font-size: 22px; }
.card p { font-size: 16px; }
.card-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.status.ok { color: var(--success); }
.status.warn { color: var(--warning); }
.client-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none;
    box-shadow: var(--shadow);
}
.client-card img { width: 56px; height: 56px; object-fit: contain; }
.client-card span { font-size: 11px; font-weight: 900; }

.login-page, .dashboard-page {
    min-height: 100vh;
    padding: 32px;
}
.login-page {
    display: grid;
    place-items: center;
}
.login-card {
    width: min(420px, 94vw);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    box-shadow: var(--shadow);
}
.login-card h1 { font-size: 28px; line-height: 1.1; }
label { display: block; color: var(--muted); font-weight: 800; font-size: 13px; margin-bottom: 6px; }
input {
    width: 100%;
    background: var(--panel-2);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    min-height: 44px;
    padding: 10px 12px;
    margin-bottom: 14px;
}
textarea {
    width: 100%;
    background: var(--panel-2);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 14px;
    resize: vertical;
}
input:focus, textarea:focus {
    outline: 2px solid color-mix(in srgb, var(--primary) 32%, transparent);
    border-color: var(--primary);
}
.alert {
    border: 1px solid rgba(249,112,102,.3);
    background: rgba(249,112,102,.12);
    color: var(--danger);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}
.alert-success {
    border-color: rgba(82,211,155,.32);
    background: rgba(82,211,155,.12);
    color: var(--success);
}
.alert-danger {
    border-color: rgba(249,112,102,.3);
    background: rgba(249,112,102,.12);
    color: var(--danger);
}
.contact-section { border-top: 1px solid var(--line); }
.contact-card {
    max-width: 780px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow);
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.dashboard-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: var(--panel);
    border-right: 1px solid var(--line);
    padding: 24px 16px;
}
.sidebar .brand { color: var(--ink); display: block; margin-bottom: 24px; }
.side-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 800;
}
.side-link:hover { background: var(--panel-2); color: var(--ink); }
.dashboard-main { padding: 28px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric strong { display: block; font-size: 32px; }
.footer {
    padding: 28px clamp(22px, 6vw, 88px);
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

@media (max-width: 900px) {
    .grid, .metrics, .dashboard-shell, .form-grid { grid-template-columns: 1fr; }
    .topbar { position: absolute; }
    .nav a:not(:last-child) { display: none; }
}
