:root {
    color-scheme: dark;
    --bg: #080a0f;
    --panel: #121722;
    --panel-2: #182130;
    --line: #293244;
    --text: #f3f6fb;
    --muted: #9aa8bd;
    --accent: #39d98a;
    --accent-2: #4f8cff;
    --danger: #ff5d66;
    --warn: #ffb84d;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(79, 140, 255, .16), transparent 32rem), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar, .footer {
    border-bottom: 1px solid var(--line);
    background: rgba(8, 10, 15, .86);
    backdrop-filter: blur(12px);
}
.footer { border-top: 1px solid var(--line); border-bottom: 0; margin-top: auto; }
.footer a:hover { color: var(--accent); }
.footer-grid {
    min-height: 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}
.footer-left, .footer-middle, .footer-clock { min-width: 0; }
.footer-middle { text-align: center; }
.footer-clock {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; flex-direction: column; line-height: 1.05; font-weight: 800; letter-spacing: .02em; }
.brand span { color: var(--accent); font-size: .76rem; text-transform: uppercase; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-weight: 650; }
.nav-links a:hover { color: var(--text); }
.language-form select, .input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0d121b;
    color: var(--text);
    padding: 11px 12px;
}
.button, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 16px;
    color: #06100b;
    background: var(--accent);
    font-weight: 800;
    cursor: pointer;
}
.button.secondary { background: transparent; border-color: var(--line); color: var(--text); }
.button.danger { background: var(--danger); color: #fff; }
.hero { padding: 76px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center; }
.hero h1 { margin: 0 0 16px; font-size: clamp(2.5rem, 7vw, 5.7rem); line-height: .94; letter-spacing: 0; }
.hero p { max-width: 620px; color: var(--muted); font-size: 1.12rem; line-height: 1.7; }
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.panel, .card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(24, 33, 48, .95), rgba(18, 23, 34, .95));
    box-shadow: 0 18px 60px rgba(0, 0, 0, .25);
}
.panel { padding: 22px; }
.card { padding: 18px; }
.section { padding: 34px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
h2, h3 { margin: 0 0 10px; letter-spacing: 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.muted { color: var(--muted); }
.badge { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 10px; background: rgba(79, 140, 255, .15); color: #b9d0ff; font-size: .82rem; font-weight: 800; }
.badge.online { background: rgba(57, 217, 138, .15); color: #9af5c6; }
.badge.offline { background: rgba(255, 93, 102, .15); color: #ffc0c4; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field label { display: block; margin: 0 0 6px; color: var(--muted); font-weight: 700; }
.alert { border: 1px solid var(--line); border-radius: 8px; margin: 16px 0; padding: 12px 14px; background: rgba(79, 140, 255, .12); }
.alert.error { background: rgba(255, 93, 102, .14); border-color: rgba(255, 93, 102, .35); }
.panel-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { border-right: 1px solid var(--line); background: #090c12; padding: 24px; }
.sidebar .nav-links { display: grid; gap: 8px; align-items: stretch; margin-top: 28px; }
.sidebar .nav-links a { padding: 10px 12px; border-radius: 8px; }
.sidebar .nav-links a:hover { background: var(--panel); }
.panel-main { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.content { flex: 1; padding: 28px; }
.equipment { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.slot { min-height: 54px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); }

@media (max-width: 860px) {
    .hero-grid, .grid, .grid.two, .grid.four, .form-grid, .panel-layout { grid-template-columns: 1fr; }
    .nav { align-items: flex-start; flex-direction: column; padding: 18px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
    .footer-middle, .footer-clock { text-align: left; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .content { padding: 18px; }
}
