/* ==========================================================================
   SmartHome — tema gelap
   ========================================================================== */

:root {
    color-scheme: dark;

    --bg: #070b14;
    --bg-soft: #0b1220;
    --surface: rgba(16, 24, 39, .82);
    --surface-solid: #101827;
    --border: rgba(148, 163, 184, .14);
    --border-strong: rgba(148, 163, 184, .26);

    --text: #e6edf3;
    --muted: #8b9bb0;
    --faint: #64748b;

    --accent: #35d0a5;
    --accent-strong: #4ce3b4;
    --accent-ink: #04231b;
    --info: #58a6ff;
    --warn: #f5a524;
    --danger: #f85149;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 18px 40px rgba(0, 0, 0, .35);
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { 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:
        radial-gradient(900px 500px at 8% -12%, rgba(53, 208, 165, .12), transparent 60%),
        radial-gradient(800px 420px at 95% 0%, rgba(88, 166, 255, .10), transparent 55%),
        var(--bg);
    background-attachment: fixed;
}

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.02em; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
code, .mono { font-family: var(--mono); font-size: .92em; }
code {
    background: rgba(148, 163, 184, .12);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 6px;
}
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { color: var(--faint); font-size: 12.5px; line-height: 1.5; margin: 6px 0 0; }
.break { word-break: break-all; }
.nowrap { white-space: nowrap; }
.ta-right { text-align: right; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- Topbar ------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 12px clamp(16px, 4vw, 40px);
    background: rgba(7, 11, 20, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    flex: none;
}
.brand:hover { color: var(--text); }
.brand strong { display: block; font-size: 16px; letter-spacing: -.01em; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .01em; }

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent-strong), #1ea87c);
    box-shadow: 0 6px 18px rgba(53, 208, 165, .28);
}
.brand-mark .ico { width: 20px; height: 20px; }

.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(148, 163, 184, .08); color: var(--text); }
.nav a.active { background: rgba(53, 208, 165, .12); color: var(--accent-strong); }

.userbox { display: flex; align-items: center; gap: 10px; flex: none; }
.avatar {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-strong);
    background: rgba(53, 208, 165, .14);
    border: 1px solid rgba(53, 208, 165, .28);
}
.who { display: flex; flex-direction: column; line-height: 1.2; }
.who strong { font-size: 13.5px; }
.who small { font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.icon-btn {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    border-radius: 9px;
    color: var(--muted);
    border: 1px solid transparent;
}
.icon-btn:hover { color: var(--danger); background: rgba(248, 81, 73, .1); }

/* ---------- Halaman ------------------------------------------------------ */
.page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px clamp(16px, 4vw, 40px) 48px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-head p { margin: 4px 0 0; font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 6px; }

.footer {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px clamp(16px, 4vw, 40px) 34px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--faint);
    border-top: 1px solid var(--border);
}

/* ---------- Tombol ------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    background: rgba(148, 163, 184, .1);
    border: 1px solid var(--border-strong);
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .05s, filter .15s;
    white-space: nowrap;
}
.btn:hover { background: rgba(148, 163, 184, .16); border-color: rgba(148, 163, 184, .38); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-primary {
    color: var(--accent-ink);
    background: linear-gradient(135deg, var(--accent-strong), #22b98a);
    border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.07); color: var(--accent-ink); }
.btn-danger { color: #ffb3ae; background: rgba(248, 81, 73, .12); border-color: rgba(248, 81, 73, .38); }
.btn-danger:hover { background: rgba(248, 81, 73, .2); color: #ffd1ce; }
.btn-small { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

.link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--accent);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}
.link:hover { color: var(--accent-strong); text-decoration: underline; }

.inline-form { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Flash / badge / pill ---------------------------------------- */
.flash {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border-strong);
    background: rgba(148, 163, 184, .08);
}
.flash-success { color: #b8f5e4; background: rgba(53, 208, 165, .1); border-color: rgba(53, 208, 165, .35); }
.flash-error   { color: #ffb3ae; background: rgba(248, 81, 73, .1); border-color: rgba(248, 81, 73, .35); }
.flash-warning { color: #ffe0a3; background: rgba(245, 165, 36, .1); border-color: rgba(245, 165, 36, .35); }

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-ink);
    background: var(--accent);
    vertical-align: middle;
}
.badge[hidden] { display: none; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .01em;
    border: 1px solid transparent;
    white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-online  { color: #63e6be; background: rgba(53, 208, 165, .12); border-color: rgba(53, 208, 165, .3); }
.pill-offline { color: #ff9a94; background: rgba(248, 81, 73, .1);  border-color: rgba(248, 81, 73, .3); }
.pill-pending { color: #ffd48a; background: rgba(245, 165, 36, .1); border-color: rgba(245, 165, 36, .3); }
.pill-muted   { color: var(--muted); background: rgba(148, 163, 184, .1); border-color: var(--border-strong); }

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--muted);
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, .05);
}
.live-badge i {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(53, 208, 165, .6);
    animation: pulse 2.2s infinite;
}
.live-badge.is-stale i { background: var(--warn); animation: none; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(53, 208, 165, .5); }
    70%  { box-shadow: 0 0 0 8px rgba(53, 208, 165, 0); }
    100% { box-shadow: 0 0 0 0 rgba(53, 208, 165, 0); }
}

/* ---------- Statistik ---------------------------------------------------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}
.stat {
    position: relative;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
}
.stat::after {
    content: "";
    position: absolute;
    inset: auto -30% -70% auto;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(53, 208, 165, .16), transparent 70%);
}
.stat-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat-value { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin: 4px 0 2px; }
.stat-value small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-value.stat-text { font-size: 18px; font-family: var(--mono); }
.stat-sub { font-size: 12px; color: var(--faint); }
.stat-ok .stat-value { color: var(--accent-strong); }
.stat-warn .stat-value { color: #ffc061; }
.stat-info .stat-value { color: #8ecbff; }

/* ---------- Layout 2 kolom ---------------------------------------------- */
.layout-2col {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, .9fr);
    gap: 18px;
    align-items: start;
}
.layout-settings { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .85fr); }
.stack { display: grid; gap: 18px; }

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.section-head h2 { display: flex; align-items: center; gap: 9px; }
.page > section > .section-head { margin-top: 0; }

/* ---------- Kartu perangkat --------------------------------------------- */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.device-card {
    display: flex;
    flex-direction: column;
    padding: 17px 18px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: border-color .15s, transform .15s;
}
.device-card:hover { border-color: rgba(53, 208, 165, .3); transform: translateY(-1px); }
.device-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.device-title h3 { font-size: 16px; }
.device-title small { color: var(--faint); font-size: 11.5px; font-family: var(--mono); }

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 14px; }
.metric-label { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.metric-label .ico { width: 14px; height: 14px; }
.metric-value { display: block; font-size: 25px; font-weight: 700; letter-spacing: -.03em; margin: 2px 0 7px; }
.metric-value small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.bar { height: 5px; border-radius: 999px; background: rgba(148, 163, 184, .14); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22b98a, var(--accent-strong)); }
.bar-hum i { background: linear-gradient(90deg, #2f81f7, #7cc0ff); }

.device-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 11px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--faint);
}
.device-foot > span { display: inline-flex; align-items: center; gap: 5px; }
.device-foot .ico { width: 14px; height: 14px; }

/* ---------- Panel -------------------------------------------------------- */
.panel {
    padding: 20px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 18px;
}
.page > .panel:last-child { margin-bottom: 0; }

/* ---------- Alert -------------------------------------------------------- */
.alert-row {
    display: flex;
    gap: 11px;
    padding: 11px 0;
    border-top: 1px solid var(--border);
}
.alert-row:first-child { border-top: 0; padding-top: 0; }
.alert-row p { margin: 0 0 3px; font-size: 13.5px; line-height: 1.45; }
.alert-row small { font-size: 11.5px; color: var(--faint); text-transform: capitalize; }
.alert-row.is-read { opacity: .55; }
.alert-icon {
    display: grid; place-items: center;
    width: 30px; height: 30px; flex: none;
    border-radius: 9px;
    background: rgba(148, 163, 184, .1);
}
.alert-icon .ico { width: 16px; height: 16px; }
.level-danger  .alert-icon { color: #ff9a94; background: rgba(248, 81, 73, .14); }
.level-warn    .alert-icon { color: #ffd48a; background: rgba(245, 165, 36, .14); }
.level-info    .alert-icon { color: #8ecbff; background: rgba(88, 166, 255, .14); }

/* ---------- Tabel -------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--faint);
    font-weight: 600;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:target td { background: rgba(53, 208, 165, .07); }
.table .btn + .btn { margin-left: 5px; }

.copy {
    background: none;
    border: 1px dashed var(--border-strong);
    border-radius: 7px;
    padding: 3px 8px;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
}
.copy:hover { color: var(--accent-strong); border-color: rgba(53, 208, 165, .5); }

/* ---------- Form --------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: #b9c7d6; }
.field input,
.field select {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: rgba(7, 11, 20, .65);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus {
    border-color: rgba(53, 208, 165, .65);
    box-shadow: 0 0 0 3px rgba(53, 208, 165, .14);
}
.field input[readonly] { color: var(--muted); }
.form-actions { display: flex; gap: 10px; align-items: center; }

.key-row { display: flex; gap: 8px; margin: 10px 0 14px; }
.key-row input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text);
    background: rgba(7, 11, 20, .65);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
}

.room-form { margin-bottom: 14px; }
.room-form input {
    flex: 1;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: rgba(7, 11, 20, .65);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    outline: none;
}
.room-form input:focus { border-color: rgba(53, 208, 165, .65); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px 5px 11px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(148, 163, 184, .1);
    border: 1px solid var(--border);
}
.chip-x {
    display: grid; place-items: center;
    width: 21px; height: 21px;
    border-radius: 50%;
    border: 0;
    background: rgba(148, 163, 184, .14);
    color: var(--muted);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}
.chip-x:hover { background: rgba(248, 81, 73, .25); color: #ffb3ae; }

.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.danger-zone strong { font-size: 14px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; }

/* ---------- Grafik ------------------------------------------------------- */
.chart-wrap { position: relative; min-height: 300px; }
.chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--faint);
    font-size: 14px;
    margin: 0;
}
.chart-empty[hidden] { display: none; }
.segmented {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border-radius: 9px;
    background: rgba(148, 163, 184, .09);
    border: 1px solid var(--border);
}
.segmented button {
    padding: 5px 11px;
    border: 0;
    border-radius: 7px;
    background: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.segmented button.active { background: rgba(53, 208, 165, .16); color: var(--accent-strong); }

/* ---------- Kosong ------------------------------------------------------- */
.empty {
    padding: 26px;
    border-radius: var(--radius);
    border: 1px dashed var(--border-strong);
    background: rgba(148, 163, 184, .04);
}
.empty h3 { margin-bottom: 6px; }
.empty ol { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
.empty li { margin-bottom: 5px; }

/* ---------- Toast -------------------------------------------------------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 16px);
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-ink);
    background: var(--accent-strong);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s, transform .18s;
    z-index: 90;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Halaman auth ------------------------------------------------ */
.auth-body { display: grid; place-items: center; padding: 24px; }
.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    width: min(1000px, 100%);
    min-height: 560px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.auth-aside {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(53, 208, 165, .18), transparent 65%),
        linear-gradient(160deg, #0d1a2b, #0a1220);
}
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; margin-bottom: 30px; }
.auth-aside h1 { font-size: clamp(24px, 3vw, 31px); margin-bottom: 12px; }
.auth-aside > p { color: var(--muted); font-size: 14.5px; line-height: 1.65; max-width: 40ch; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: #c3d0de; }
.auth-points span {
    display: grid; place-items: center;
    width: 25px; height: 25px; flex: none;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-strong);
    background: rgba(53, 208, 165, .13);
    border: 1px solid rgba(53, 208, 165, .3);
}
.auth-panel { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h2 { font-size: 22px; margin-bottom: 4px; }
.auth-form > p { margin-bottom: 20px; font-size: 14px; }
.auth-form label { display: block; font-size: 12.5px; font-weight: 600; color: #b9c7d6; margin: 16px 0 6px; }
.auth-form input {
    width: 100%;
    padding: 11px 13px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: rgba(7, 11, 20, .65);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    outline: none;
}
.auth-form input:focus { border-color: rgba(53, 208, 165, .65); box-shadow: 0 0 0 3px rgba(53, 208, 165, .14); }
.auth-form .btn { margin-top: 24px; }
.auth-foot { margin: 22px 0 0; text-align: center; font-size: 12px; color: var(--faint); }

/* ---------- Responsif ---------------------------------------------------- */
@media (max-width: 1000px) {
    .layout-2col, .layout-settings { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

@media (max-width: 760px) {
    .topbar { gap: 12px; flex-wrap: wrap; padding: 10px 16px; }
    .brand small { display: none; }
    .nav { order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: 2px; }
    .nav a span { display: none; }
    .nav a { padding: 9px 11px; }
    .userbox .who { display: none; }
    .page { padding-top: 20px; }
    h1 { font-size: 23px; }
    .form-grid { grid-template-columns: 1fr; }
    .metrics { gap: 10px; }
    .stat-value { font-size: 26px; }
    .auth-shell { grid-template-columns: 1fr; min-height: 0; }
    .auth-aside { padding: 28px; }
    .auth-aside h1 { font-size: 23px; }
    .auth-points { display: none; }
    .auth-panel { padding: 28px; }
    .page-actions { width: 100%; }
    .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
