/* ============================================================================
   Energy Tech Inventory — Premium admin UI
   Industrial navy / electric blue · hand-written CSS, no framework
   ============================================================================ */

:root {
  /* Brand navy ramp */
  --navy-950: #050d1c;
  --navy-900: #081427;
  --navy-850: #0a1a33;
  --navy-800: #0c1f3d;
  --navy-700: #122c52;
  --navy-600: #1a3a66;

  /* Electric blue ramp */
  --blue-700: #173fb0;
  --blue-600: #1b4dd8;
  --blue-500: #2f6bf0;
  --blue-400: #5b8cff;
  --blue-300: #9bb8ff;

  /* Neutral surface ramp */
  --bg:        #eef2f8;
  --bg-deep:   #e7edf6;
  --surface:   #ffffff;
  --surface-2: #f1f5fb;
  --surface-3: #e8eef7;
  --line:      #e3e9f2;
  --line-soft: #edf1f8;

  --text:        #0c1a2e;
  --text-soft:   #2c3b50;
  --muted:       #5c6b81;
  --muted-light: #93a3bb;

  /* Semantic */
  --green:    #15a04a;
  --green-bg: #e6f7ed;
  --green-line:#bfe8cd;
  --red:      #dc2b34;
  --red-bg:   #fdebec;
  --red-line: #f5c6c9;
  --amber:    #b4690e;
  --amber-bg: #fdf3e3;
  --amber-line:#f3d8a8;

  /* Geometry */
  --radius-xs: 7px;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  /* Elevation — soft, layered, premium */
  --shadow-xs:   0 1px 2px rgba(8, 20, 39, 0.06);
  --shadow-soft: 0 6px 18px -10px rgba(13, 30, 60, 0.20), 0 2px 6px -3px rgba(13, 30, 60, 0.10);
  --shadow-card: 0 22px 50px -28px rgba(10, 26, 55, 0.45), 0 6px 16px -10px rgba(10, 26, 55, 0.22);
  --shadow-pop:  0 30px 70px -30px rgba(5, 13, 28, 0.55);
  --ring: 0 0 0 4px rgba(47, 107, 240, 0.16);

  --sidebar-w: 270px;
  --font:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-600); text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: -0.018em; font-weight: 700; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82em; background: var(--surface-3); color: var(--text-soft);
  padding: 0.12em 0.45em; border-radius: 6px; border: 1px solid var(--line);
}
::selection { background: rgba(47, 107, 240, 0.22); }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 2px; border-radius: 5px; }
.muted { color: var(--muted); font-weight: 400; }
.link { color: var(--blue-600); font-weight: 600; display: inline-flex; align-items: center; gap: 0.25rem; transition: color 0.15s var(--ease); }
.link:hover { color: var(--blue-700); }
.bare { margin: 0; padding-left: 1.1rem; }

/* Custom scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--muted-light) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(120, 140, 170, 0.4); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(120, 140, 170, 0.65); background-clip: content-box; }

/* ============================================================================
   Layout
   ============================================================================ */
.layout { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.content {
  padding: clamp(1.2rem, 2.5vw, 2.2rem);
  flex: 1;
  background:
    radial-gradient(140% 90% at 100% 0%, rgba(47, 107, 240, 0.05), transparent 55%),
    radial-gradient(120% 80% at 0% 0%, rgba(8, 20, 39, 0.035), transparent 50%);
}
.content > * { animation: rise 0.5s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================================
   Sidebar
   ============================================================================ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(47, 107, 240, 0.22), transparent 60%),
    linear-gradient(185deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #c3d2e8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 70%);
  opacity: 0.5;
}
.sidebar__brand {
  position: relative; z-index: 1;
  padding: 1.4rem 1.4rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex; flex-direction: column; gap: 0.7rem; align-items: flex-start;
}
.sidebar__logo-plate {
  display: block; width: 100%;
  background: #fff; border-radius: 12px; padding: 0.7rem 0.85rem;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.sidebar__logo { width: 100%; height: auto; display: block; }
.sidebar__sub {
  font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--blue-300); font-weight: 700; padding-left: 0.15rem;
}
.sidebar__nav { position: relative; z-index: 1; padding: 0.85rem 0.8rem; overflow-y: auto; flex: 1; }
.sidebar__group {
  display: block; font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted-light); opacity: 0.65; margin: 1.15rem 0.7rem 0.45rem; font-weight: 700;
}
.sidebar__group:first-child { margin-top: 0.3rem; }
.sidebar__link {
  position: relative;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.62rem 0.75rem; margin: 0.12rem 0;
  border-radius: var(--radius-sm);
  color: #b7c6dd; font-weight: 500; font-size: 0.91rem;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}
.sidebar__link svg { width: 19px; height: 19px; flex-shrink: 0; opacity: 0.78; transition: opacity 0.18s var(--ease); }
.sidebar__link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sidebar__link:hover svg { opacity: 1; }
.sidebar__link.is-active {
  background: linear-gradient(100deg, rgba(47, 107, 240, 0.95), rgba(27, 77, 216, 0.95));
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(27, 77, 216, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.sidebar__link.is-active svg { opacity: 1; }
.sidebar__link.is-active::before {
  content: ""; position: absolute; left: -0.8rem; top: 50%; transform: translateY(-50%);
  width: 4px; height: 60%; border-radius: 0 4px 4px 0; background: var(--blue-300);
  box-shadow: 0 0 12px var(--blue-400);
}
.sidebar__foot {
  position: relative; z-index: 1;
  padding: 1rem 1.5rem; font-size: 0.74rem; color: var(--muted-light);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex; align-items: center; gap: 0.5rem;
}
.sidebar__foot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(21,160,74,0.25); }
.sidebar-backdrop { display: none; }

/* ============================================================================
   Topbar
   ============================================================================ */
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem clamp(1.2rem, 2.5vw, 2.2rem);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar__title { min-width: 0; }
.topbar__title h1 { font-size: 1.22rem; font-weight: 700; line-height: 1.2; }
.topbar__title p { margin: 0.1rem 0 0; font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 0.85rem; }

/* Language switcher (segmented pill) */
.lang-switch {
  display: inline-flex; align-items: center; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.lang-switch a {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.66rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700;
  color: var(--muted); letter-spacing: 0.03em; transition: all 0.18s var(--ease);
}
.lang-switch a .flag { width: 18px; height: 12px; border-radius: 2.5px; display: block; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.is-active { background: var(--surface); color: var(--blue-600); box-shadow: var(--shadow-xs); }

.topbar__divider { width: 1px; height: 30px; background: var(--line); }

.topbar__user { display: flex; align-items: center; gap: 0.7rem; }
.topbar__user-meta { text-align: right; line-height: 1.2; display: flex; flex-direction: column; }
.topbar__user-name { font-weight: 700; font-size: 0.88rem; }
.topbar__user-role { font-size: 0.72rem; color: var(--muted); }
.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.86rem;
  font-family: var(--font-display);
  background: linear-gradient(140deg, var(--navy-700), var(--navy-900));
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.topbar__menu {
  display: none; flex-direction: column; gap: 4px; width: 42px; height: 42px;
  align-items: center; justify-content: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.topbar__menu span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

/* ============================================================================
   Buttons
   ============================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font: inherit; font-weight: 650; font-size: 0.88rem;
  padding: 0.62rem 1.15rem; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.14s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600)); color: #fff;
  box-shadow: 0 12px 24px -12px rgba(27, 77, 216, 0.85), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn--primary:hover { box-shadow: 0 16px 30px -12px rgba(27, 77, 216, 0.95), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn--success {
  background: linear-gradient(135deg, #1cb457, var(--green)); color: #fff;
  box-shadow: 0 12px 24px -12px rgba(21, 160, 74, 0.8), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn--danger {
  background: linear-gradient(135deg, #ee4b53, var(--red)); color: #fff;
  box-shadow: 0 12px 24px -12px rgba(220, 43, 52, 0.8), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn--ghost { background: var(--surface); color: var(--text-soft); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn--ghost:hover { border-color: var(--blue-400); color: var(--blue-600); background: var(--surface); }
.btn--danger-ghost { background: transparent; color: var(--red); border-color: transparent; }
.btn--danger-ghost:hover { background: var(--red-bg); }
.btn--danger-ghost[disabled] { color: var(--muted-light); cursor: not-allowed; background: transparent; }
.btn--block { width: 100%; }
.btn--sm { padding: 0.45rem 0.85rem; font-size: 0.82rem; }
.btn--xs { padding: 0.34rem 0.65rem; font-size: 0.78rem; border-radius: 8px; }
.btn[disabled] { transform: none; }

/* ============================================================================
   Page actions / toolbar
   ============================================================================ */
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-bottom: 1.4rem; }
.page-actions > .btn { margin-left: auto; }
.page-actions form + .btn { margin-left: auto; }
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.5rem; box-shadow: var(--shadow-xs);
}
.toolbar .input { border-color: transparent; background: var(--surface-2); }
.toolbar .input:focus { border-color: var(--blue-500); background: var(--surface); }
.toolbar--wrap { flex: 1; }

/* ============================================================================
   KPI Cards
   ============================================================================ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.1rem; margin-bottom: 1.5rem; }
.card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.25rem; display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--blue-400), var(--blue-600)); opacity: 0.9;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: #d3def0; }
.card--alert { border-color: var(--amber-line); background: linear-gradient(180deg, #fff, var(--amber-bg)); }
.card--alert::before { background: linear-gradient(#f0b25a, var(--amber)); }
.card__icon {
  width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px;
  font-size: 1.3rem; font-weight: 700; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}
.card__icon svg { width: 24px; height: 24px; }
.card__icon--blue  { background: rgba(47, 107, 240, 0.12); color: var(--blue-600); }
.card__icon--navy  { background: rgba(8, 20, 39, 0.08); color: var(--navy-800); }
.card__icon--green { background: var(--green-bg); color: var(--green); }
.card__icon--red   { background: var(--red-bg); color: var(--red); }
.card__icon--amber { background: var(--amber-bg); color: var(--amber); }
.card__body { min-width: 0; }
.card__value { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.card__label { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }

/* ============================================================================
   Panels
   ============================================================================ */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); margin-bottom: 1.5rem; overflow: hidden;
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.3rem; border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}
.panel__head h2 { font-size: 1.04rem; font-weight: 700; display: flex; align-items: center; gap: 0.55rem; }
.panel__head h2 .dot-accent { width: 9px; height: 9px; border-radius: 3px; background: var(--blue-500); }
.with-accent { padding-left: 0.75rem; border-left: 4px solid var(--blue-500); }
.with-accent--in { border-color: var(--green); }
.with-accent--out { border-color: var(--red); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.grid-2--wide-right { grid-template-columns: 380px 1fr; }

/* ============================================================================
   Tables
   ============================================================================ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { padding: 0.78rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table thead th {
  position: sticky; top: 0;
  background: var(--surface-2); font-size: 0.7rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.table tbody tr { transition: background 0.12s var(--ease); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(47, 107, 240, 0.045); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .empty { text-align: center; color: var(--muted); padding: 2.4rem 1rem; }
.actions-col { text-align: right; white-space: nowrap; }
.row--low td { background: linear-gradient(90deg, rgba(180,105,14,0.08), rgba(180,105,14,0.045)) !important; }
.row--low:hover td { background: rgba(180, 105, 14, 0.12) !important; }
.table-note { padding: 0.85rem 1.3rem; margin: 0; font-size: 0.82rem; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line-soft); }
.table strong { font-weight: 650; color: var(--text); }

/* ============================================================================
   Badges
   ============================================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.16rem 0.55rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.02em; border: 1px solid transparent;
}
.badge--in  { background: var(--green-bg); color: #0f7a37; border-color: var(--green-line); }
.badge--out { background: var(--red-bg); color: #b21d24; border-color: var(--red-line); }
.badge--ok  { background: rgba(47, 107, 240, 0.1); color: var(--blue-600); border-color: rgba(47,107,240,0.2); }
.badge--low { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.badge--muted { background: var(--surface-3); color: var(--muted); border-color: var(--line); }

/* ============================================================================
   Forms
   ============================================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.3rem; padding: 1.4rem; }
.form-grid--single { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.span-2 { grid-column: 1 / -1; }
.field__label { font-size: 0.82rem; font-weight: 650; color: var(--text-soft); }
.field__hint { font-size: 0.74rem; color: var(--muted); }
.input {
  font: inherit; width: 100%; padding: 0.66rem 0.8rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
}
.input::placeholder { color: var(--muted-light); }
.input:hover { border-color: #cdd8ea; }
.input:focus { outline: none; border-color: var(--blue-500); box-shadow: var(--ring); }
.input[readonly] { background: var(--surface-2); color: var(--muted); cursor: default; }
.input--sm { padding: 0.42rem 0.6rem; font-size: 0.85rem; }
textarea.input { resize: vertical; min-height: 70px; }
select.input { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235c6b81' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center; padding-right: 2.1rem;
}
.form-actions { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }
.form-actions.span-2 { grid-column: 1 / -1; padding-top: 0.4rem; border-top: 1px solid var(--line-soft); margin-top: 0.2rem; }
.inline { display: inline; }

/* ============================================================================
   Alerts
   ============================================================================ */
.alert {
  position: relative; padding: 0.85rem 1.05rem 0.85rem 2.7rem; border-radius: var(--radius-sm);
  margin-bottom: 1rem; font-size: 0.9rem; border: 1px solid transparent; box-shadow: var(--shadow-xs);
}
.alert::before {
  content: ""; position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; background-repeat: no-repeat; background-position: center; background-size: contain;
}
.alert--success { background: var(--green-bg); color: #11602f; border-color: var(--green-line); }
.alert--success::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311602f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.alert--error { background: var(--red-bg); color: #8e1c1c; border-color: var(--red-line); }
.alert--error::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e1c1c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E"); }
.alert--warn { background: var(--amber-bg); color: #7a4708; border-color: var(--amber-line); }
.alert--warn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a4708' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E"); }
.alert ul { margin: 0; }
.alert--plain { padding-left: 1.05rem; }
.alert--plain::before { display: none; }

/* ============================================================================
   Login / setup
   ============================================================================ */
.login-body {
  min-height: 100vh; margin: 0; display: grid; grid-template-columns: 1.05fr 1fr;
  background:
    radial-gradient(120% 100% at 80% -10%, var(--navy-700) 0%, var(--navy-950) 60%),
    var(--navy-950);
  color: #fff;
}
/* Brand panel (left) */
.login-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(2rem, 4vw, 3.5rem);
}
.login-brand::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px; mask-image: radial-gradient(120% 100% at 30% 20%, #000, transparent 75%);
}
.login-brand::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  right: -160px; bottom: -160px;
  background: radial-gradient(circle, rgba(47,107,240,0.5), transparent 65%); filter: blur(10px);
}
.login-brand__top { position: relative; z-index: 1; display: flex; align-items: center; gap: 0.8rem; }
.login-logo-plate {
  display: inline-block; background: #fff; border-radius: 14px; padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.login-logo-plate img { height: 30px; width: auto; display: block; }
.login-card__logo { height: 26px; width: auto; margin-bottom: 1rem; }
.login-brand__center { position: relative; z-index: 1; }
.login-brand__center h2 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; color: #fff; max-width: 14ch;
}
.login-brand__center p { color: #aebfd8; margin: 1rem 0 0; font-size: 1.02rem; max-width: 38ch; }
.login-features { position: relative; z-index: 1; list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 0.8rem; }
.login-features li { display: flex; align-items: center; gap: 0.7rem; color: #cdd9ec; font-size: 0.94rem; }
.login-features svg { width: 20px; height: 20px; color: var(--blue-300); flex-shrink: 0; }
.login-brand__foot { position: relative; z-index: 1; color: #8499b8; font-size: 0.8rem; }

/* Form panel (right) */
.login-panel { display: grid; place-items: center; padding: 1.5rem; }
.login-card {
  width: 100%; max-width: 408px;
  background: var(--surface); color: var(--text); border-radius: var(--radius-lg);
  padding: 2.2rem 2rem; box-shadow: var(--shadow-pop);
  border: 1px solid rgba(255,255,255,0.6);
}
.login-card__head { margin-bottom: 1.6rem; }
.login-card__head h1 { font-size: 1.55rem; font-weight: 800; }
.login-card__head p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.92rem; }
.login-card__brand { text-align: center; margin-bottom: 1.6rem; }
.login-card__brand img { height: 34px; width: auto; margin: 0 auto 0.6rem; }
.login-card__sub { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.login-form { display: flex; flex-direction: column; gap: 1.05rem; }
.login-form .field__label { margin-bottom: 0.32rem; }
.login-form .input { padding: 0.74rem 0.85rem; }
.login-card__note { text-align: center; font-size: 0.78rem; color: var(--muted-light); margin: 1.3rem 0 0; }
.login-card code { background: var(--surface-2); }
.login-lang { display: flex; justify-content: center; margin-top: 1.2rem; }

/* Centered variant (used by setup) */
.login-body--center { grid-template-columns: 1fr; place-items: center; padding: 1.5rem; }
.login-body--center .login-card { max-width: 560px; }

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 1024px) {
  .login-body { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; }
}
@media (max-width: 900px) {
  .grid-2, .grid-2--wide-right { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60;
    transform: translateX(-100%); transition: transform 0.28s var(--ease);
    box-shadow: var(--shadow-pop);
  }
  .layout.nav-open .sidebar { transform: translateX(0); }
  .layout.nav-open .sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(5, 13, 28, 0.55);
    backdrop-filter: blur(2px); z-index: 50; animation: fade 0.2s var(--ease);
  }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .topbar__menu { display: flex; }
  .topbar__title h1 { font-size: 1.06rem; }
  .topbar__title p { display: none; }
  .topbar__divider, .topbar__user-meta { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .lang-switch a span.label { display: none; }
}

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