/* =============================================================================
   VideoHub — Global UI  ·  style.css
   Place this file in: public/assets/style.css
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..900;1,9..40,300..900&family=Space+Grotesk:wght@300..700&family=Syne:wght@400..800&display=swap');

/* ── CUSTOM PROPERTIES ───────────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Backgrounds */
  --bg:            #060810;
  --bg-2:          #090c18;
  --surface:       rgba(14, 20, 40, 0.76);
  --surface-2:     rgba(26, 36, 58, 0.70);
  --surface-3:     rgba(44, 58, 88, 0.58);
  --surface-solid: #0f1425;

  /* Text */
  --text:          #f1f5ff;
  --text-soft:     #c7d4f0;
  --muted:         #7e90b5;
  --hint:          #4e607a;

  /* Brand / Accent */
  --primary:       #7c4dff;
  --primary-2:     #00d4f5;
  --primary-3:     #ff4daa;
  --primary-dark:  #5c35cc;
  --primary-soft:  rgba(124, 77, 255, 0.18);

  /* Status */
  --ok:            #22d3a0;
  --ok-soft:       rgba(34, 211, 160, 0.13);
  --danger:        #ff4d6d;
  --danger-soft:   rgba(255, 77, 109, 0.13);
  --warning:       #ffb830;

  /* Borders */
  --border:        rgba(140, 160, 210, 0.13);
  --border-strong: rgba(200, 215, 255, 0.22);
  --ring:          rgba(124, 77, 255, 0.38);

  /* Radii */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius:    18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Shadows */
  --shadow-sm:   0 8px 28px rgba(0, 0, 0, 0.28);
  --shadow:      0 22px 64px rgba(0, 0, 0, 0.42);
  --shadow-glow: 0 0 70px rgba(124, 77, 255, 0.16);
  --shadow-cyan: 0 0 60px rgba(0, 212, 245, 0.12);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:  cubic-bezier(0.64, 0, 0.78, 0);

  /* Layout */
  --container: 1240px;
  --header-h:  68px;

  /* Typography */
  --font-ui:      'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Syne', 'DM Sans', sans-serif;
  --font-mono:    'DM Mono', 'Fira Code', ui-monospace, monospace;
}

/* ── RESET ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

/* ── BODY & BACKGROUND ───────────────────────────────────────────────────── */
body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 60% at 10%  -8%, rgba(124, 77, 255, 0.28), transparent),
    radial-gradient(ellipse 60% 50% at 94%   4%, rgba(0, 212, 245, 0.16),  transparent),
    radial-gradient(ellipse 70% 55% at 78% 110%, rgba(255, 77, 170, 0.12), transparent),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, #040611 100%);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle grid texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, transparent 78%);
  pointer-events: none;
}

/* Grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.4;
  pointer-events: none;
}

/* ── SELECTION & SCROLLBAR ───────────────────────────────────────────────── */
::selection {
  color: #fff;
  background: rgba(124, 77, 255, 0.55);
}

::-webkit-scrollbar            { width: 10px; height: 10px; }
::-webkit-scrollbar-track      { background: rgba(4, 6, 18, 0.7); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(124, 77, 255, 0.60), rgba(0, 212, 245, 0.40));
  border: 3px solid rgba(4, 6, 18, 0.85);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(124, 77, 255, 0.80), rgba(0, 212, 245, 0.60));
}

/* ── GLOBALS ─────────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }
img, video { max-width: 100%; }

video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020510;
}

a {
  color: var(--text-soft);
  text-decoration: none;
  transition:
    color 0.18s var(--ease-out),
    opacity 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out),
    background 0.18s var(--ease-out);
}
a:hover { color: #fff; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
}

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid var(--border);
  background: rgba(6, 8, 16, 0.68);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

/* Glowing bottom line */
.header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(124, 77, 255, 0.75) 35%,
    rgba(0, 212, 245, 0.65) 65%,
    transparent 100%
  );
  opacity: 0.7;
}

/* ── BRAND ───────────────────────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.brand:hover { color: #fff; text-decoration: none; }

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.9), transparent 0.22rem),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  box-shadow:
    0 10px 26px rgba(124, 77, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.brand:hover .brand-icon {
  transform: scale(1.06) rotate(-3deg);
  box-shadow: 0 14px 36px rgba(124, 77, 255, 0.48);
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid rgba(124, 77, 255, 0.36);
  border-radius: 999px;
  color: #b8a6ff;
  background: rgba(124, 77, 255, 0.12);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── NAVIGATION ──────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link,
.nav-user {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    color 0.16s var(--ease-out),
    background 0.16s var(--ease-out),
    border-color 0.16s var(--ease-out),
    transform 0.14s var(--ease-out);
}

.nav-link:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border);
  transform: translateY(-1px);
}

.nav-link-muted { color: var(--hint); }

.nav-link-primary {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.28), rgba(0, 212, 245, 0.14));
  border-color: rgba(124, 77, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 4px 16px rgba(124, 77, 255, 0.14);
}
.nav-link-primary:hover {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.42), rgba(0, 212, 245, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 22px rgba(124, 77, 255, 0.24);
}

.nav-user {
  padding-left: 7px;
  background: rgba(14, 20, 40, 0.48);
  border-color: var(--border);
}

.avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(0, 212, 245, 0.20);
}

/* ── LAYOUT ──────────────────────────────────────────────────────────────── */
.container {
  width: min(var(--container), calc(100% - 32px));
  margin: clamp(28px, 4vw, 54px) auto;
}

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  margin-bottom: 32px;
  padding: clamp(28px, 4.5vw, 52px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.022)),
    radial-gradient(ellipse 60% 80% at 15% -5%, rgba(124, 77, 255, 0.22), transparent),
    radial-gradient(ellipse 50% 70% at 95% 105%, rgba(0, 212, 245, 0.14), transparent);
  box-shadow: var(--shadow), var(--shadow-glow);
  overflow: hidden;
  animation: hero-in 0.7s var(--ease-out) both;
}

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

/* Sheen */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    118deg,
    transparent 0%,
    rgba(255, 255, 255, 0.10) 48%,
    transparent 100%
  );
  transform: translateX(-80%);
  opacity: 0.4;
  animation: sheen 7s ease-in-out 1.2s infinite;
  pointer-events: none;
}

@keyframes sheen {
  0%   { transform: translateX(-80%); opacity: 0.4; }
  50%  { transform: translateX(80%);  opacity: 0.2; }
  100% { transform: translateX(80%);  opacity: 0.4; }
}

/* Decorative floating orb */
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 245, 0.10), transparent 70%);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  max-width: 900px;
  margin: 0 0 12px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.hero h1::after {
  content: "";
  display: block;
  width: min(180px, 46%);
  height: 3px;
  margin-top: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), transparent);
  animation: line-grow 0.8s var(--ease-out) 0.4s both;
}

@keyframes line-grow {
  from { width: 0; opacity: 0; }
  to   { width: min(180px, 46%); opacity: 1; }
}

.hero p {
  position: relative;
  max-width: 760px;
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  font-weight: 400;
  line-height: 1.7;
}

/* ── SURFACES ─────────────────────────────────────────────────────────────── */
.card,
.auth-card,
.admin-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0.022) 100%),
    rgba(14, 20, 40, 0.68);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

/* ── VIDEO GRID ───────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}

.card {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition:
    transform 0.24s var(--ease-out),
    border-color 0.24s var(--ease-out),
    box-shadow 0.24s var(--ease-out);
}

/* Inner glow on hover */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(124, 77, 255, 0.14), transparent 20rem);
  opacity: 0;
  transition: opacity 0.28s var(--ease-out);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px) scale(1.008);
  border-color: rgba(124, 77, 255, 0.30);
  box-shadow:
    var(--shadow),
    0 0 40px rgba(124, 77, 255, 0.12),
    0 0 1px rgba(124, 77, 255, 0.20);
}
.card:hover::before { opacity: 1; }

/* ── VIDEO FRAME ──────────────────────────────────────────────────────────── */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(14, 20, 40, 0.85), #020510 70%);
}

/* Bottom fade */
.video-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(4, 6, 18, 0.65), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Play overlay on hover */
.video-frame::before {
  content: "▶";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 2.4rem;
  background: rgba(4, 6, 18, 0.32);
  opacity: 0;
  transition: opacity 0.22s var(--ease-out);
  z-index: 2;
  pointer-events: none;
}
.card:hover .video-frame::before { opacity: 1; }

/* ── CARD BODY ─────────────────────────────────────────────────────────────── */
.card-body {
  position: relative;
  padding: 18px 20px 22px;
}

.video-title {
  margin: 0 0 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.28;
  transition: color 0.16s var(--ease-out);
}
.card:hover .video-title { color: #c7b8ff; }

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(14, 20, 40, 0.55);
  font-size: 0.83rem;
  font-weight: 600;
  transition:
    color 0.16s var(--ease-out),
    border-color 0.16s var(--ease-out),
    background 0.16s var(--ease-out),
    transform 0.14s var(--ease-out);
}
.download-link::before { content: "↧"; opacity: 0.88; }
.download-link:hover {
  color: #fff;
  text-decoration: none;
  border-color: rgba(124, 77, 255, 0.48);
  background: rgba(124, 77, 255, 0.15);
  transform: translateY(-1px);
}

/* ── EMPTY STATE ──────────────────────────────────────────────────────────── */
.empty {
  padding: clamp(42px, 8vw, 80px) 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(140, 160, 210, 0.24);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(14, 20, 40, 0.44);
}

.empty-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 22px;
  background: rgba(124, 77, 255, 0.13);
  border: 1px solid rgba(124, 77, 255, 0.22);
  font-size: 2rem;
  animation: float 3.2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(-6px); }
}

.empty p         { margin: 0; }
.empty p + p     { margin-top: 8px; }

/* ── AUTH ─────────────────────────────────────────────────────────────────── */
.auth-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: 36px 16px;
}

.auth-card {
  position: relative;
  width: min(460px, 100%);
  padding: clamp(28px, 4.5vw, 44px);
  overflow: hidden;
  animation: auth-in 0.5s var(--ease-out) both;
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1);       }
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 0% 0%, rgba(124, 77, 255, 0.18), transparent 18rem);
  pointer-events: none;
}
.auth-card > * { position: relative; }

.auth-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.28), rgba(0, 212, 245, 0.16));
  border: 1px solid rgba(124, 77, 255, 0.30);
  font-size: 1.7rem;
  box-shadow: 0 8px 24px rgba(124, 77, 255, 0.16);
}

.auth-card h1 {
  margin: 0 0 26px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.048em;
  line-height: 1.08;
}

.auth-footer {
  margin: 24px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ── FORMS ────────────────────────────────────────────────────────────────── */
.form-row { margin-bottom: 18px; }

label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"] {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  background: rgba(4, 6, 18, 0.50);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  font: inherit;
  font-size: 0.96rem;
  outline: none;
  transition:
    border-color 0.18s var(--ease-out),
    box-shadow   0.18s var(--ease-out),
    background   0.18s var(--ease-out);
}

input:hover  { border-color: rgba(140, 160, 210, 0.24); }
input:focus  {
  border-color: rgba(124, 77, 255, 0.70);
  background: rgba(4, 6, 18, 0.64);
  box-shadow: 0 0 0 4px var(--ring), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
input::placeholder { color: var(--hint); }

.hint {
  display: block;
  margin-top: 7px;
  color: var(--hint);
  font-size: 0.81rem;
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow:
    0 12px 30px rgba(92, 53, 204, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    transform 0.14s var(--ease-out),
    filter    0.14s var(--ease-out),
    box-shadow 0.14s var(--ease-out),
    background 0.14s var(--ease-out);
}

.btn:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  filter: brightness(1.10);
  box-shadow:
    0 18px 42px rgba(92, 53, 204, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn:active  { transform: translateY(0) scale(0.98); filter: brightness(0.96); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  filter: grayscale(0.5) !important;
}

.btn.btn-full  { width: 100%; min-height: 50px; font-size: 1rem; }

.btn.secondary {
  color: var(--text-soft);
  background: rgba(26, 36, 58, 0.80);
  border-color: var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.btn.secondary:hover {
  background: rgba(44, 58, 88, 0.82);
  border-color: var(--border-strong);
  filter: none;
}

.btn.danger {
  color: #fff;
  background: linear-gradient(135deg, #ff4d6d, #c1121f);
  box-shadow: 0 12px 30px rgba(255, 77, 109, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn.danger:hover { filter: brightness(1.07); }

/* ── ALERTS ───────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  animation: alert-in 0.3s var(--ease-out) both;
}

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

.alert.error {
  color: #ffc4ce;
  background: var(--danger-soft);
  border: 1px solid rgba(255, 77, 109, 0.28);
}
.alert.ok {
  color: #b6ffec;
  background: var(--ok-soft);
  border: 1px solid rgba(34, 211, 160, 0.26);
}

/* ── BADGES ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  white-space: nowrap;
}

.badge.ok {
  color: #aafce7;
  background: rgba(34, 211, 160, 0.13);
  border: 1px solid rgba(34, 211, 160, 0.24);
}
.badge.off {
  color: #ffc4ce;
  background: rgba(255, 77, 109, 0.11);
  border: 1px solid rgba(255, 77, 109, 0.22);
}

/* ── FOOTER ───────────────────────────────────────────────────────────────── */
.footer {
  width: min(var(--container), calc(100% - 32px));
  margin: 72px auto 0;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--hint);
  text-align: center;
  font-size: 0.83rem;
}

/* ── UTILITIES ────────────────────────────────────────────────────────────── */
.small { color: var(--muted); font-size: 0.83rem; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  :root { --header-h: auto; }

  .header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-link,
  .nav-user {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 0.83rem;
  }

  .container { width: min(100% - 20px, var(--container)); }
  .hero      { border-radius: 22px; }
  .grid      { gap: 14px; }
  .card-body { padding: 15px; }
}

/* ── REDUCED MOTION ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}