/* =========================================================
   FRONT. HUB — Modernised POC stylesheet
   Brand colours preserved (FRONT. Red, Charcoal, Accents)
   but delivered with soft shadows, generous whitespace,
   Inter typography, and a left-sidebar shell.
   ========================================================= */

@import url("https://rsms.me/inter/inter.css");

:root {
  /* Brand */
  --red: #e3241e;
  --red-600: #d01b15;
  --red-50: #fef2f1;
  --red-100: #fde4e2;
  --charcoal: #1a1a1a;
  --ink: #0b0b0d;
  --ink-2: #242427;

  /* Surfaces & borders */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --sidebar-bg: #0e0e10;
  --sidebar-hover: #1a1a1e;
  --sidebar-active: #24242a;

  --border: #e8eaed;
  --border-strong: #d5d8dd;
  --divider: #eef0f3;

  /* Text */
  --text: #111317;
  --text-2: #3c4047;
  --text-3: #6b707a;
  --text-4: #9097a1;

  /* Accents */
  --blue: #2563eb;
  --blue-50: #eaf1ff;
  --green: #16a34a;
  --green-50: #ebfaef;
  --amber: #d97706;
  --amber-50: #fef5e7;
  --purple: #7c3aed;
  --purple-50: #f3eefe;

  /* Shape */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(17, 19, 23, 0.04);
  --shadow-sm: 0 1px 2px rgba(17, 19, 23, 0.06), 0 1px 3px rgba(17, 19, 23, 0.04);
  --shadow-md: 0 4px 12px rgba(17, 19, 23, 0.06), 0 1px 2px rgba(17, 19, 23, 0.04);
  --shadow-lg: 0 18px 40px rgba(17, 19, 23, 0.10), 0 2px 6px rgba(17, 19, 23, 0.06);
  --ring: 0 0 0 3px rgba(227, 36, 30, 0.18);

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --sidebar-w: 240px;
  --topbar-h: 64px;
}

@supports (font-variation-settings: normal) {
  :root { --font-sans: "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss01", "ss03";
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; }
img, svg { display: block; }
svg.icon { width: 18px; height: 18px; flex-shrink: 0; color: currentColor; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }

/* Scrollbar (webkit) — minimal */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d3d7dc; border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: #b5bac1; }

/* ---------- Brand marque ---------- */
.brand-front {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--red);
}
.brand-hub {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.005em;
}

/* =========================================================
   LOGIN — split-panel with subtle brand gradient
   ========================================================= */
.login-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
}
@media (max-width: 900px) {
  .login-body { grid-template-columns: 1fr; }
  .login-panel { display: none; }
}

.login-panel {
  position: relative;
  padding: 48px;
  color: var(--surface);
  background:
    radial-gradient(1200px 600px at 10% 110%, rgba(227,36,30,0.40), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(227,36,30,0.20), transparent 55%),
    linear-gradient(160deg, #18181b 0%, #0b0b0d 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.1));
}
.login-panel .mark {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.95;
  position: relative;
  z-index: 1;
}
.login-panel .mark .brand-front { color: var(--red); font-size: 34px; }
.login-panel .mark .brand-hub   { color: var(--surface); font-size: 24px; margin-top: -2px; }

.login-panel .hero {
  position: relative;
  z-index: 1;
  max-width: 440px;
}
.login-panel .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.login-panel .hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(227,36,30,0.25); }
.login-panel h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.1;
}
.login-panel p.sub {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
  margin: 0;
  max-width: 420px;
}
.login-panel .tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  position: relative;
  z-index: 1;
  max-width: 520px;
}
.login-panel .tile {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(6px);
  padding: 14px;
  border-radius: var(--r-md);
}
.login-panel .tile .k { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); text-transform: uppercase; margin-bottom: 6px; }
.login-panel .tile .v { font-size: 14px; color: rgba(255,255,255,0.92); font-weight: 500; }

.login-form-side {
  display: grid;
  place-items: center;
  padding: 48px 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-card h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.login-card .subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin: 0 0 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.field input {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:hover { border-color: var(--border-strong); }
.field input:focus { outline: none; border-color: var(--red); box-shadow: var(--ring); }

.login-btn {
  margin-top: 6px;
  background: var(--red);
  color: var(--surface);
  border: none;
  padding: 11px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, transform 0.05s ease;
  box-shadow: var(--shadow-sm);
}
.login-btn:hover { background: var(--red-600); }
.login-btn:active { transform: translateY(1px); }

.login-error {
  min-height: 18px;
  margin: 0;
  font-size: 13px;
  color: var(--red);
}
.login-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-3);
  background: var(--red-50);
  border: 1px solid var(--red-100);
  padding: 10px 12px;
  border-radius: var(--r-sm);
}
.login-hint strong { color: var(--red); font-weight: 600; }

.login-footnote {
  margin-top: 22px;
  font-size: 11px;
  color: var(--text-4);
}

/* =========================================================
   APP SHELL — left sidebar + topbar
   ========================================================= */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar-bg);
  color: #e6e7eb;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 6px;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.sidebar .mark {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.95;
  padding: 6px 10px 18px;
}
.sidebar .mark .brand-front { font-size: 22px; }
.sidebar .mark .brand-hub   { color: #e6e7eb; font-size: 16px; margin-top: -2px; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  padding: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: #cfd2d8;
  background: transparent;
  border: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.nav-item .icon { width: 18px; height: 18px; flex-shrink: 0; color: currentColor; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.is-active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--red);
}
.nav-item .badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  background: var(--red);
  color: #fff;
  padding: 2px 7px;
  border-radius: var(--r-pill);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-footer .avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, #e3241e 0%, #ff6a65 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.sidebar-footer .who {
  flex: 1;
  min-width: 0;
}
.sidebar-footer .who .name { font-size: 13px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer .who .role { font-size: 11px; color: rgba(255,255,255,0.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer .logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-sm);
  color: rgba(255,255,255,0.7);
  padding: 6px 8px;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  display: grid;
  place-items: center;
}
.sidebar-footer .logout:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.2); }
.sidebar-footer .logout svg { width: 16px; height: 16px; }

/* ---------- Main column ---------- */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--topbar-h);
  background: rgba(246, 247, 249, 0.85);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 18px;
}
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.crumbs > svg { width: 16px; height: 16px; flex-shrink: 0; }
.crumbs span { white-space: nowrap; }
.crumbs .sep { color: var(--text-4); }
.crumbs .current { color: var(--text); font-weight: 600; }

.sub-tabs {
  display: flex;
  gap: 2px;
  background: rgba(15,15,17,0.04);
  padding: 3px;
  border-radius: var(--r-md);
}
.sub-tabs { flex-shrink: 0; }
.sub-tabs button {
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}
.sub-tabs button:hover { color: var(--text); }
.sub-tabs button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.topbar .spacer { flex: 1; }
.topbar .search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 7px 10px;
  width: 240px;
  color: var(--text-3);
  font-size: 13px;
}
.topbar .search svg { width: 15px; height: 15px; }
.topbar .search kbd {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 10.5px;
  color: var(--text-3);
  background: #f1f2f4;
  padding: 2px 6px;
  border-radius: 4px;
}

.page {
  padding: 28px 28px 48px;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
}
.page-header .desc {
  color: var(--text-3);
  font-size: 14px;
  margin: 0;
}
.page-header .actions { display: flex; gap: 8px; align-items: center; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* =========================================================
   SHARED — cards, tags, buttons, tables
   ========================================================= */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  padding: 18px;
}
.card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card h3 .count {
  background: var(--red-50);
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.card h3 .link {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
}
.card h3 .link:hover { color: var(--red); }

.divider { height: 1px; background: var(--divider); border: 0; margin: 18px 0; }

.muted { color: var(--text-3); }
.tiny { font-size: 12px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn:hover { background: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--red); border-color: var(--red); }
.btn.primary:hover { background: var(--red-600); border-color: var(--red-600); }
.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn.ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  border-radius: var(--r-md);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--red); box-shadow: var(--ring);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='12' height='12' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b707a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* Tags / pills */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--r-pill);
  background: #eef0f3;
  color: var(--text-2);
}
.tag.red    { background: var(--red-50);    color: var(--red-600); }
.tag.green  { background: var(--green-50);  color: var(--green); }
.tag.blue   { background: var(--blue-50);   color: var(--blue); }
.tag.amber  { background: var(--amber-50);  color: var(--amber); }
.tag.purple { background: var(--purple-50); color: var(--purple); }
.tag.dark   { background: var(--ink); color: #fff; }
.tag.ghost  { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }
.tag .dot   { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }

/* =========================================================
   OVERVIEW
   ========================================================= */
.hero-card {
  background:
    radial-gradient(800px 300px at -10% 0%, rgba(227,36,30,0.22), transparent 60%),
    radial-gradient(600px 260px at 110% 110%, rgba(227,36,30,0.16), transparent 60%),
    linear-gradient(135deg, #15151a 0%, #0c0c0e 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 26px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
}
.hero-card h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 8px 0 0;
}
.hero-card .eyebrow { color: rgba(255,255,255,0.55); }
.hero-card .meta {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
  text-align: right;
  position: relative;
  z-index: 1;
}
.hero-card .meta .row { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; white-space: nowrap; }
.hero-card .meta .row svg { width: 15px; height: 15px; opacity: 0.7; }
.hero-card .meta strong { color: #fff; font-weight: 600; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}
.stat .stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--red-50);
  color: var(--red);
}
.stat .stat-icon.blue   { background: var(--blue-50);   color: var(--blue); }
.stat .stat-icon.green  { background: var(--green-50);  color: var(--green); }
.stat .stat-icon.purple { background: var(--purple-50); color: var(--purple); }
.stat .stat-icon svg { width: 18px; height: 18px; }
.stat .stat-label { font-size: 11px; color: var(--text-3); font-weight: 500; letter-spacing: 0.02em; }
.stat .stat-value { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; margin-top: 2px; }

.task-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 13.5px;
}
.task-row:last-child { border-bottom: none; }
.task-row input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--red);
}
.task-row.done .task-title { text-decoration: line-through; color: var(--text-4); }
.task-title { min-width: 0; }

.project-row {
  display: grid;
  grid-template-columns: 1fr 90px 1.2fr;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 13.5px;
}
.project-row:last-child { border-bottom: none; }
.project-row .pname { font-weight: 600; color: var(--text); }
.project-row .plead { color: var(--text-3); font-size: 12px; margin-top: 2px; }
.progress-bar {
  height: 6px;
  background: var(--divider);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), #ff6a65);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.quick-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.12s ease, border-color 0.12s ease;
}
.quick-links a:hover { background: var(--surface); border-color: var(--border-strong); }
.quick-links a .ql-icon {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: var(--red-50); color: var(--red);
  display: grid; place-items: center; flex-shrink: 0;
}
.quick-links a .ql-icon.blue   { background: var(--blue-50);   color: var(--blue); }
.quick-links a .ql-icon.purple { background: var(--purple-50); color: var(--purple); }
.quick-links a .ql-icon.green  { background: var(--green-50);  color: var(--green); }
.quick-links a .ql-icon svg { width: 14px; height: 14px; }

.notice-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 13px;
}
.notice-row:last-child { border-bottom: none; }
.notice-row .dot-wrap { padding-top: 5px; flex-shrink: 0; }
.notice-row .notice-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(227,36,30,0.15);
}
.notice-row .notice-dot.grey { background: var(--text-4); box-shadow: 0 0 0 3px rgba(144,151,161,0.15); }
.notice-row .n-body { flex: 1; }
.notice-row .n-time { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* =========================================================
   DESK BOOKING
   ========================================================= */
.booking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}
.segmented {
  display: flex;
  gap: 2px;
  background: rgba(15,15,17,0.04);
  padding: 3px;
  border-radius: var(--r-md);
}
.segmented button {
  background: transparent;
  border: none;
  padding: 7px 12px;
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
  border-radius: var(--r-sm);
}
.segmented button:hover { color: var(--text); }
.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .location-grid { grid-template-columns: repeat(2, 1fr); } }

.location-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-xs);
}
.location-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.location-card.is-selected {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227,36,30,0.12), var(--shadow-sm);
}
.location-card.is-full { opacity: 0.55; cursor: not-allowed; }
.location-card .loc-icon {
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--red-50); color: var(--red);
  display: grid; place-items: center; margin-bottom: 10px;
}
.location-card .loc-icon.blue   { background: var(--blue-50);   color: var(--blue); }
.location-card .loc-icon.purple { background: var(--purple-50); color: var(--purple); }
.location-card .loc-icon.green  { background: var(--green-50);  color: var(--green); }
.location-card .loc-icon svg { width: 16px; height: 16px; }
.location-card .loc-title { font-size: 14.5px; font-weight: 600; }
.location-card .loc-meta { font-size: 12px; color: var(--text-3); margin-bottom: 14px; }
.location-card .loc-capacity {
  font-size: 11.5px; color: var(--text-2);
  display: flex; justify-content: space-between; margin-bottom: 6px;
}
.location-card .loc-capacity strong { color: var(--text); font-weight: 600; }
.location-card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 14px; right: 14px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.team-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.team-table th, .team-table td { text-align: left; padding: 11px 14px; }
.team-table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
  text-transform: uppercase;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.team-table thead th:first-child { border-top-left-radius: var(--r-sm); }
.team-table thead th:last-child  { border-top-right-radius: var(--r-sm); }
.team-table tbody tr { border-bottom: 1px solid var(--divider); }
.team-table tbody tr:last-child { border-bottom: none; }
.team-table tbody tr:hover td { background: var(--surface-2); }

.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: var(--r-pill);
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #3c4047 0%, #1a1a1a 100%);
  flex-shrink: 0;
}
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.md { width: 32px; height: 32px; font-size: 12px; }
.avatar.me { background: linear-gradient(135deg, #e3241e 0%, #ff6a65 100%); }
.name-cell { display: flex; align-items: center; gap: 10px; }

/* =========================================================
   CALENDAR
   ========================================================= */
.week-view {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .week-view { grid-template-columns: 1fr; } }
.day-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  min-height: 240px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
}
.day-col .day-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 10px; margin-bottom: 10px;
  border-bottom: 1px solid var(--divider);
}
.day-col .day-name { font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.day-col .day-num { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.day-col.today .day-num { color: var(--red); }
.day-col.today { border-color: rgba(227,36,30,0.25); box-shadow: 0 0 0 3px rgba(227,36,30,0.08), var(--shadow-xs); }

.calendar-event {
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 12.5px;
  line-height: 1.35;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-3);
}
.calendar-event.task { border-left-color: var(--blue); background: var(--blue-50); border-color: rgba(37,99,235,0.15); }
.calendar-event.leave { border-left-color: var(--amber); background: var(--amber-50); border-color: rgba(217,119,6,0.18); }
.calendar-event.desk  { border-left-color: var(--red); background: var(--red-50); border-color: rgba(227,36,30,0.15); }
.calendar-event .ev-label { font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 2px; }

/* Leave section */
.leave-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .leave-wrap { grid-template-columns: 1fr; } }
.balance-display {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 16px;
}
.balance-display .num {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
  letter-spacing: -0.02em;
}
.balance-display .lbl { font-size: 11px; color: var(--text-3); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.balance-display .right { flex: 1; }

.leave-row {
  display: grid;
  grid-template-columns: 2fr 1.4fr 90px auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
  align-items: center;
  font-size: 13.5px;
}
.leave-row:last-child { border-bottom: none; }
.leave-row .l-actions { display: flex; gap: 6px; grid-column: 1 / -1; margin-top: 6px; }

/* =========================================================
   TOOLS / REGS CHAT
   ========================================================= */
.tools-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; }
@media (max-width: 900px) { .tools-layout { grid-template-columns: 1fr; } }

.regs-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  max-height: 660px;
  overflow: auto;
  box-shadow: var(--shadow-xs);
}
.regs-sidebar h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 10px;
  padding: 0 8px;
}
.regs-sidebar button {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 2px;
  transition: background 0.12s ease, color 0.12s ease;
}
.regs-sidebar button:hover { background: var(--surface-2); color: var(--text); }
.regs-sidebar button.is-active {
  background: var(--red-50);
  color: var(--red-600);
  font-weight: 500;
}

.chat-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  height: 660px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.chat-pane .chat-head {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.chat-pane .chat-head .title {
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-pane .chat-head .title .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.18);
}
.chat-pane .chat-head .badge {
  font-size: 11px; font-weight: 500;
  color: var(--text-3);
  padding: 3px 8px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}
.chat-msg {
  max-width: 78%;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  border-radius: var(--r-lg);
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--ink);
  color: #fff;
  border-bottom-right-radius: var(--r-sm);
}
.chat-msg.bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  border-bottom-left-radius: var(--r-sm);
}
.chat-msg .cite {
  margin-top: 8px;
  font-size: 11px;
  color: var(--red);
  font-weight: 600;
  letter-spacing: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.chat-suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.chat-suggestions button {
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: var(--r-pill);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.chat-suggestions button:hover { background: var(--red-50); color: var(--red-600); border-color: var(--red-100); }

.chat-composer {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.chat-composer input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13.5px;
  background: var(--surface-2);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.chat-composer input:focus { outline: none; background: var(--surface); border-color: var(--red); box-shadow: var(--ring); }

.tool-placeholder {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 56px 24px;
  text-align: center;
  box-shadow: var(--shadow-xs);
}
.tool-placeholder .phicon {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  border-radius: var(--r-lg);
  background: var(--red-50); color: var(--red);
  display: grid; place-items: center;
}
.tool-placeholder .phicon svg { width: 22px; height: 22px; }
.tool-placeholder h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.01em; font-weight: 700; }
.tool-placeholder p { color: var(--text-3); max-width: 500px; margin: 0 auto; }

/* =========================================================
   FEEDBACK
   ========================================================= */
.feedback-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .feedback-wrap { grid-template-columns: 1fr; } }

.feedback-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}
.feedback-card .fh {
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}
.feedback-card .fh-icon {
  width: 32px; height: 32px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--red-50); color: var(--red);
}
.feedback-card .fh-icon.blue { background: var(--blue-50); color: var(--blue); }
.feedback-card .fh-icon svg { width: 16px; height: 16px; }
.feedback-card h2 { font-size: 16.5px; font-weight: 600; margin: 0; }
.feedback-card .sub { font-size: 13px; color: var(--text-3); margin: 0 0 18px; }
.feedback-card label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  margin: 14px 0 6px;
}
.feedback-card label:first-of-type { margin-top: 4px; }
.feedback-card .btn { margin-top: 16px; }

.submission {
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  font-size: 13.5px;
}
.submission:last-child { margin-bottom: 0; }
.submission .sub-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px; gap: 8px; flex-wrap: wrap;
}
.submission .sub-time { color: var(--text-3); font-size: 11.5px; }
.submission .title { font-weight: 600; margin-bottom: 2px; }
.submission .body { color: var(--text-2); }
.submission .ctx { color: var(--text-3); font-size: 12px; margin-top: 6px; }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  font-size: 13px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 50;
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.25);
}
.toast.show { opacity: 1; transform: translateY(0); }
