/* ============================================================
   PropSquare AI Ops Monitor — shared design tokens & shell
   Matches PropSquare Photo Tools (dark navy + brand red).
   Deploy this file alongside the HTML pages.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand red (official PropSquare palette) */
  --ps-red:        #E32024;
  --ps-red-bright: #E52B2B;
  --ps-red-deep:   #C60E1C;
  --ps-red-soft:   rgba(227, 32, 36, 0.16);
  --ps-red-line:   rgba(229, 43, 43, 0.36);
  --ps-grad:       linear-gradient(135deg, #E52B2B 0%, #C60E1C 100%);

  /* Brand anchors */
  --ps-navy:  #182B3A;
  --ps-ice:   #EBF5F5;

  /* Surfaces — navy scale built on #182B3A */
  --bg-0: #0A1722;
  --bg-1: #0E2030;
  --bg-2: #16293A;
  --bg-3: #1B3344;
  --bg-4: #264158;

  /* Lines */
  --line:        #24425B;
  --line-soft:   #173142;
  --line-strong: #37597A;

  /* Text */
  --tx-0: #F4F8FB;
  --tx-1: #AFC4D3;
  --tx-2: #7B95A7;
  --tx-3: #566F81;

  --white: #FFFFFF;
  --ok:    #2BD17E;
  --warn:  #F5B43B;
  --info:  #6FA8DC;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Shadows */
  --sh-1: 0 1px 2px rgba(5,15,25,.5);
  --sh-2: 0 8px 28px rgba(5,15,25,.45);
  --sh-3: 0 24px 60px rgba(3,10,18,.6);
  --glow: 0 10px 32px rgba(227,32,36,.42);

  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, sans-serif;

  /* Theme plumbing (night = default) */
  --mark-ink: #F6F8FA;
  --topbar-bg: rgba(10,23,34,.72);
}

/* ============================================================
   DAY THEME — bright, brand colors (Grey-White / Ice Blue / Navy)
   Sidebar + hero stay navy for brand contrast.
   ============================================================ */
[data-theme="light"] {
  --bg-0: #F6F7F7;
  --bg-1: #FFFFFF;
  --bg-2: #FFFFFF;
  --bg-3: #F0F5F6;
  --bg-4: #E2EBED;

  --line:        #D9E2E7;
  --line-soft:   #E7EDF0;
  --line-strong: #BFD0D8;

  --tx-0: #182B3A;
  --tx-1: #3E5668;
  --tx-2: #66808F;
  --tx-3: #93A8B3;

  --ok:   #17935B;
  --warn: #B07C08;
  --info: #2A6FDB;

  --sh-1: 0 1px 2px rgba(24,43,58,.07);
  --sh-2: 0 8px 28px rgba(24,43,58,.10);
  --sh-3: 0 24px 60px rgba(24,43,58,.18);
  --glow: 0 10px 28px rgba(227,32,36,.28);

  --mark-ink: #182B3A;
  --topbar-bg: rgba(255,255,255,.8);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(227,32,36,.20), transparent 62%),
    radial-gradient(820px 480px at -5% 108%, rgba(198,14,28,.14), transparent 58%),
    radial-gradient(700px 500px at 50% 50%, rgba(24,43,58,.55), transparent 70%),
    var(--bg-0);
  color: var(--tx-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

[data-theme="light"] body {
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(227,32,36,.07), transparent 62%),
    radial-gradient(820px 480px at -5% 108%, rgba(24,43,58,.06), transparent 58%),
    radial-gradient(700px 500px at 50% 60%, rgba(235,245,245,.9), transparent 75%),
    var(--bg-0);
}

/* Dark islands in day mode: sidebar + hero keep the navy palette */
[data-theme="light"] .sidebar,
[data-theme="light"] .hero {
  --bg-1: #0E2030;
  --bg-2: #16293A;
  --bg-3: #1B3344;
  --bg-4: #264158;
  --line: #24425B;
  --line-soft: #173142;
  --line-strong: #37597A;
  --tx-0: #F4F8FB;
  --tx-1: #AFC4D3;
  --tx-2: #7B95A7;
  --tx-3: #566F81;
  --ok: #2BD17E;
  --warn: #F5B43B;
  --mark-ink: #F6F8FA;
  --sh-1: 0 1px 2px rgba(5,15,25,.5);
  --glow: 0 10px 32px rgba(227,32,36,.42);
  color: var(--tx-0);
}

/* Brand mark ink follows theme */
.brand__mark, .fb2 svg { color: var(--mark-ink); }

/* Brand logo images (official assets) */
.brand-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.brand-img, .fb2 img { display: block; max-width: 100%; height: auto; }
.logo-day { display: none; }
[data-theme="light"] .logo-day { display: block; }
[data-theme="light"] .logo-night { display: none; }

/* Day-mode contrast fixes for hardcoded accent tints */
[data-theme="light"] .sv.r { color: var(--ps-red-deep); }
[data-theme="light"] .alert-err { color: #A50D14; }
[data-theme="light"] .INCIDENT { color: #C60E1C; background: rgba(227,32,36,.08); }
[data-theme="light"] .MAINTENANCE_OBS { color: #2A6FDB; background: rgba(42,111,219,.10); border-color: rgba(42,111,219,.3); }
[data-theme="light"] .OPERATIONAL_UPDATE { color: #6D4FC4; background: rgba(109,79,196,.10); border-color: rgba(109,79,196,.3); }
[data-theme="light"] .count-pill,
[data-theme="light"] .auth-link a { color: var(--ps-red-deep); }

/* Theme toggle button (sun in night / moon in day = what you switch to) */
.theme-btn svg { width: 15px; height: 15px; }
.theme-btn .ic-moon, .theme-btn .t-night { display: none; }
[data-theme="light"] .theme-btn .ic-sun,
[data-theme="light"] .theme-btn .t-day { display: none; }
[data-theme="light"] .theme-btn .ic-moon { display: inline-block; }
[data-theme="light"] .theme-btn .t-night { display: inline; }
.theme-fab { position: fixed; top: 18px; right: 18px; z-index: 60; }

::selection { background: var(--ps-red); color: #fff; }

*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-thumb {
  background: var(--bg-4); border-radius: 20px;
  border: 3px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--line-strong); background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: 284px 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  background: linear-gradient(180deg, #11283A 0%, #0A1925 100%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  gap: 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .04em;
  line-height: 1;
}
.brand__word .p { color: var(--ps-red); }
.brand__word .s { color: var(--tx-0); }
.brand__sub {
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--tx-2);
  font-weight: 700;
  margin-top: 5px;
}

.nav-label {
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--tx-3);
  font-weight: 700;
  padding: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  color: var(--tx-1);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  text-decoration: none;
  transition: background .16s, color .16s, border-color .16s;
}
.nav-item:hover { background: var(--bg-3); color: var(--tx-0); }
.nav-item__ic {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--bg-3);
  color: var(--tx-1);
  border: 1px solid var(--line);
  transition: background .16s, color .16s, border-color .16s;
}
.nav-item__ic svg { width: 18px; height: 18px; }
.nav-item.is-active {
  background: linear-gradient(135deg, rgba(227,32,36,.22), rgba(198,14,28,.10));
  color: #fff;
  border-color: var(--ps-red-line);
}
.nav-item.is-active .nav-item__ic {
  background: var(--ps-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow);
}
.nav-item.is-active::before {
  content: "";
  position: absolute; left: -16px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--ps-red);
}
.nav-item__meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nav-item__meta > span { white-space: nowrap; }
.nav-item__meta small { font-size: 11px; color: var(--tx-2); font-weight: 500; white-space: nowrap; margin-top: 2px; }

.sidebar__spacer { flex: 1; }

.local-card {
  margin: 8px 6px 4px;
  padding: 13px 14px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.local-card svg { width: 18px; height: 18px; color: var(--ok); flex: none; margin-top: 1px; }
.local-card b { font-size: 12.5px; color: var(--tx-0); font-weight: 700; }
.local-card p { margin: 3px 0 0; font-size: 11.5px; color: var(--tx-2); line-height: 1.45; }

.user-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 8px 4px; margin-top: 6px;
  border-top: 1px solid var(--line-soft);
}
.user-row .av {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ps-red), var(--ps-red-deep));
  display: grid; place-items: center; color: #fff; font-weight: 700;
  font-size: 13px; flex: none;
}
.user-row .nm { font-size: 13px; font-weight: 700; color: var(--tx-0); line-height: 1.2; }
.user-row .rl { font-size: 11px; color: var(--tx-2); text-transform: capitalize; }
.user-row .out {
  margin-left: auto; width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center; cursor: pointer; color: var(--tx-2);
  background: var(--bg-3); border: 1px solid var(--line);
  transition: background .15s, color .15s;
}
.user-row .out:hover { background: var(--bg-4); color: var(--ps-red-bright); }
.user-row .out svg { width: 16px; height: 16px; }

/* ---------- Main ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 64px; flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.crumb { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--tx-2); font-weight: 600; white-space: nowrap; }
.crumb b { color: var(--tx-0); }
.crumb svg { width: 14px; height: 14px; opacity: .5; }
.topbar__spacer { flex: 1; }
.tb-btn {
  height: 38px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--r-sm);
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--tx-1); font-weight: 600; font-size: 13px; cursor: pointer;
  font-family: var(--font-ui); text-decoration: none;
  transition: background .15s, color .15s;
}
.tb-btn:hover { background: var(--bg-4); color: var(--tx-0); }
.tb-btn svg { width: 15px; height: 15px; }

.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 999px;
  background: rgba(43,209,126,.10); border: 1px solid rgba(43,209,126,.28);
  font-size: 12px; font-weight: 700; color: var(--ok); white-space: nowrap;
}
.live-pill .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.live-pill .clk { color: var(--tx-1); font-weight: 600; }

.canvas {
  padding: 30px 32px 56px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

/* ---------- Page hero ---------- */
.hero {
  position: relative;
  border-radius: var(--r-xl);
  padding: 26px 30px;
  margin-bottom: 24px;
  background:
    radial-gradient(460px 240px at 90% -30%, rgba(229,43,43,.45), transparent 68%),
    radial-gradient(520px 280px at 100% 130%, rgba(198,14,28,.30), transparent 70%),
    linear-gradient(120deg, #1C3346 0%, #142838 58%);
  border: 1px solid var(--line);
  box-shadow: inset 0 3px 0 0 var(--ps-red);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(105deg, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero__tag {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ps-red-bright);
  background: var(--ps-red-soft);
  border: 1px solid var(--ps-red-line);
  padding: 5px 11px; border-radius: 999px;
  margin-bottom: 13px; position: relative; z-index: 1;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800; font-size: 27px; letter-spacing: -.01em;
  margin: 0 0 8px; position: relative; z-index: 1;
}
.hero h1 .arrow { color: var(--ps-red); margin: 0 4px; }
.hero p {
  margin: 0; max-width: 560px; color: var(--tx-1);
  font-size: 14px; line-height: 1.6; position: relative; z-index: 1;
}
.hero__tag, .hero h1, .hero p { padding-right: 96px; }
.hero__icon {
  position: absolute; right: 28px; top: 50%; transform: translateY(-50%);
  width: 80px; height: 80px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--ps-grad);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255,255,255,.25); z-index: 1;
}
.hero__icon svg { width: 40px; height: 40px; color: #fff; }

/* ---------- Card ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.card__hd {
  display: flex; align-items: center; gap: 11px;
  padding: 15px 20px; border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.card__hd h3 { margin: 0; font-size: 14.5px; font-weight: 700; font-family: var(--font-display); letter-spacing: .01em; }
.card__hd .cic {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  background: var(--ps-red-soft); color: var(--ps-red-bright);
  display: grid; place-items: center;
  border: 1px solid var(--ps-red-line);
}
.card__hd .cic svg { width: 16px; height: 16px; }
.card__hd .hint { margin-left: auto; font-size: 12px; color: var(--tx-2); font-weight: 500; }
.card__bd { padding: 20px; }

.count-pill {
  font-size: 11.5px; font-weight: 700; color: var(--ps-red-bright); white-space: nowrap;
  background: var(--ps-red-soft); border: 1px solid var(--ps-red-line);
  padding: 3px 9px; border-radius: 999px;
}

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label {
  font-size: 12px; font-weight: 700; color: var(--tx-1);
  letter-spacing: .02em;
}
.input {
  height: 42px; padding: 0 13px;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--tx-0);
  font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
  width: 100%;
}
.input:focus {
  border-color: var(--ps-red-line);
  box-shadow: 0 0 0 3px var(--ps-red-soft);
  background: var(--bg-2);
}
.input::placeholder { color: var(--tx-3); font-weight: 500; }
.input:disabled { color: var(--tx-2); background: var(--bg-1); cursor: not-allowed; }
.field .hint { font-size: 11.5px; color: var(--tx-3); font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  height: 44px; padding: 0 20px; border: none; cursor: pointer;
  border-radius: var(--r-sm); font-family: var(--font-ui);
  font-weight: 700; font-size: 14px; letter-spacing: .01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  white-space: nowrap; text-decoration: none;
  transition: transform .12s, box-shadow .15s, background .15s, opacity .15s;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--ps-grad); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 40px rgba(227,32,36,.5); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--bg-3); color: var(--tx-1); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-4); color: var(--tx-0); }
.btn-danger {
  background: var(--ps-red-soft); color: var(--ps-red-bright);
  border: 1px solid var(--ps-red-line);
}
.btn-danger:hover { background: rgba(227,32,36,.26); color: #fff; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Alerts ---------- */
.alert {
  font-size: 12.5px; font-weight: 600; line-height: 1.5;
  padding: 10px 13px; border-radius: var(--r-sm); margin-bottom: 14px;
  display: none;
}
.alert a { font-weight: 700; }
.alert-err {
  color: #FF8A8D; background: var(--ps-red-soft);
  border: 1px solid var(--ps-red-line);
}
.alert-ok {
  color: var(--ok); background: rgba(43,209,126,.10);
  border: 1px solid rgba(43,209,126,.3);
}
.alert-ok a { color: var(--ok); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.sc {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 15px 17px;
  box-shadow: var(--sh-1);
}
.sl {
  font-size: 10.5px; color: var(--tx-2); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px;
}
.sv {
  font-family: var(--font-display); font-size: 28px; font-weight: 800;
  line-height: 1; color: var(--tx-0);
}
.sv.r { color: #FF5C5F; }
.sv.a { color: var(--warn); }
.sv.g { color: var(--ok); }

/* ---------- Chips / filters ---------- */
.fb {
  font-size: 11.5px; font-weight: 700; padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-3); color: var(--tx-1); cursor: pointer;
  font-family: var(--font-ui); white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.fb:hover { background: var(--bg-4); color: var(--tx-0); }
.fb.on {
  background: var(--ps-red-soft); color: var(--ps-red-bright);
  border-color: var(--ps-red-line);
}
.filter-input {
  font-size: 12px; font-weight: 600; padding: 0 10px; height: 32px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-3); color: var(--tx-0);
  font-family: var(--font-ui); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.filter-input:focus { border-color: var(--ps-red-line); box-shadow: 0 0 0 3px var(--ps-red-soft); }
.filter-input::placeholder { color: var(--tx-3); }
.filter-input::-webkit-calendar-picker-indicator { filter: invert(.7); }

/* ---------- Badges ---------- */
.cb {
  font-size: 10px; padding: 2.5px 8px; border-radius: 5px;
  font-weight: 700; white-space: nowrap; letter-spacing: .03em;
  border: 1px solid transparent;
}
.INCIDENT          { background: var(--ps-red-soft); color: #FF8A8D; border-color: var(--ps-red-line); }
.CLIENT_GRIEVANCE  { background: rgba(245,180,59,.13); color: var(--warn); border-color: rgba(245,180,59,.3); }
.SLA_BREACH        { background: rgba(245,180,59,.13); color: var(--warn); border-color: rgba(245,180,59,.3); }
.MAINTENANCE_OBS   { background: rgba(111,168,220,.13); color: #8FBCE6; border-color: rgba(111,168,220,.3); }
.SHIFT_REPORT      { background: rgba(43,209,126,.12); color: var(--ok); border-color: rgba(43,209,126,.3); }
.OPERATIONAL_UPDATE{ background: rgba(167,139,250,.13); color: #B7A6F8; border-color: rgba(167,139,250,.3); }
.NOISE             { background: var(--bg-4); color: var(--tx-2); border-color: var(--line); }

/* ---------- Table ---------- */
.ps-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ps-table th {
  text-align: left; padding: 11px 18px;
  font-size: 10.5px; color: var(--tx-2); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  white-space: nowrap;
}
.ps-table td { padding: 13px 18px; border-bottom: 1px solid var(--line-soft); color: var(--tx-1); }
.ps-table tr:last-child td { border-bottom: none; }
.ps-table tbody tr { transition: background .15s; }
.ps-table tbody tr:hover td { background: var(--bg-3); }
.ps-table td b { color: var(--tx-0); font-weight: 700; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5,12,20,.7);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  z-index: 1000; display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; width: 360px; max-width: 100%;
  box-shadow: var(--sh-3);
}
.modal-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--tx-0); }
.modal-body { font-size: 13px; color: var(--tx-1); margin-bottom: 20px; line-height: 1.6; }
.modal-btns { display: flex; gap: 9px; justify-content: flex-end; }
.modal-btns .btn { height: 38px; font-size: 13px; padding: 0 16px; }

/* ---------- Empty state ---------- */
.empty {
  padding: 30px 20px; text-align: center; color: var(--tx-3);
  font-size: 13px; font-weight: 500;
}

/* ---------- Footer ---------- */
.foot {
  margin-top: 38px; padding: 22px 32px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  color: var(--tx-2); font-size: 12px;
}
.foot .fb2 { display: flex; align-items: center; gap: 9px; }
.foot .fb2 svg { width: 22px; height: 22px; }
.foot .fb2 b { color: var(--tx-1); font-weight: 700; }
.foot .sp { flex: 1; }

/* ---------- Auth pages ---------- */
.auth {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-3);
  padding: 30px 30px 26px; width: 400px; max-width: 100%;
}
.auth-brand {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 18px; margin-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}
.auth-brand .brand__mark { width: 44px; height: 44px; }
.auth-sub { font-size: 13px; color: var(--tx-1); line-height: 1.55; margin: 0 0 20px; }
.auth-link { font-size: 13px; color: var(--tx-2); margin: 18px 0 0; text-align: center; font-weight: 500; }
.auth-link a { color: var(--ps-red-bright); font-weight: 700; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

/* fade in */
@keyframes rise { from { transform: translateY(12px); } to { transform: none; } }
.rise { animation: rise .42s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }

/* ============================================================
   Responsive
   ============================================================ */
.menu-btn, .drawer-close, .nav-backdrop { display: none; }

@media (max-width: 1024px) {
  .canvas { padding: 26px 24px 48px; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 120;
    width: 290px; max-width: 86vw; height: 100dvh;
    transform: translateX(-105%);
    transition: transform .28s cubic-bezier(.4,.1,.2,1);
  }
  .sidebar.is-open { transform: none; box-shadow: var(--sh-3); }

  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 110;
    background: rgba(5,12,20,.62);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .28s;
  }
  .app.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

  .menu-btn {
    display: inline-grid; place-items: center; flex: none;
    width: 40px; height: 40px; margin-right: 2px;
    border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line);
    color: var(--tx-1); cursor: pointer; transition: background .15s, color .15s;
  }
  .menu-btn:hover { background: var(--bg-4); color: var(--tx-0); }
  .menu-btn svg { width: 21px; height: 21px; }

  .drawer-close {
    display: grid; place-items: center; flex: none; margin-left: auto;
    width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
    background: var(--bg-3); border: 1px solid var(--line); color: var(--tx-1);
  }
  .drawer-close svg { width: 18px; height: 18px; }
  .drawer-close:hover { background: var(--bg-4); color: var(--tx-0); }

  .topbar { padding: 0 16px; gap: 10px; }
  .canvas { padding: 20px 16px 40px; }
}

@media (max-width: 620px) {
  .crumb > span, .crumb > svg { display: none; }
  .crumb b { font-size: 16px; }

  .hero { padding: 22px 18px; margin-bottom: 20px; border-radius: var(--r-lg); }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 13px; }
  .hero__tag, .hero h1, .hero p { padding-right: 0; }
  .hero__icon { display: none; }
  .hero::after { mask-image: linear-gradient(120deg, #000 10%, transparent 60%); }

  .card__hd { padding: 14px 16px; }
  .card__bd { padding: 16px; }

  .foot { flex-wrap: wrap; gap: 6px 14px; padding: 18px 16px; margin-top: 26px; }
  .foot span { width: 100%; order: 3; }
  .foot .sp { display: none; }
}
