/* =====================================================================
   Class grouping site — "soft navy" design system
   Soft grey canvas, large-radius white cards, deep-navy hero cards,
   light-blue stat cards, two-tone headings, line icons, round arrow
   buttons and a floating pill dock.
   ===================================================================== */

@font-face { font-family: "Peyda"; src: url("../fonts/peyda-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Peyda"; src: url("../fonts/peyda-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Peyda"; src: url("../fonts/peyda-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Peyda"; src: url("../fonts/peyda-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Peyda"; src: url("../fonts/peyda-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Peyda"; src: url("../fonts/peyda-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --canvas: #eceff3;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #f4f6f9;
  --line: #e7ebf0;
  --text: #0d1729;
  --text-2: #3d4659;
  --muted: #8b93a3;
  --navy: #0a1a33;
  --navy-2: #172a4d;
  --navy-3: #22396a;
  --tone: #a8c1ec;          /* the light-blue second line on navy */
  --blue: #2f5aa8;          /* links / accents on light backgrounds */
  --blue-soft: #d6e2f4;
  --blue-soft-2: #e7eef9;
  --ok: #1f8a63;   --ok-soft: #e1f3eb;
  --warn: #a8670c; --warn-soft: #fbf0dd;
  --bad: #c2413a;  --bad-soft: #fbe7e5;
  --r-xl: 30px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 14px;
  --shadow: 0 1px 2px rgba(14, 26, 48, .04), 0 10px 30px rgba(14, 26, 48, .06);
  --shadow-lift: 0 2px 6px rgba(14, 26, 48, .06), 0 18px 40px rgba(14, 26, 48, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Peyda", Tahoma, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy-3); }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .5rem; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .7rem; }
small { font-size: 12.5px; }
.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.i { flex-shrink: 0; vertical-align: middle; }
.tone { color: var(--tone); }
.tone-blue { color: var(--blue); }
.nowrap { white-space: nowrap; }
.mt { margin-top: 14px; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- shell */
.shell { max-width: 1180px; margin: 0 auto; padding: 22px 20px 130px; }

.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.topbar .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar .who .greet { font-size: 13px; color: var(--muted); line-height: 1.3; }
.topbar .who .name { font-size: 1.25rem; font-weight: 700; line-height: 1.35; }
.topbar .brandline { margin-inline-start: auto; text-align: left; line-height: 1.35; }
.topbar .brandline b { display: block; font-size: 14px; }
.topbar .brandline span { font-size: 12px; color: var(--muted); }
.topbar .acts { display: flex; gap: 10px; }
@media (max-width: 720px) { .topbar .brandline { display: none; } .topbar .acts { margin-inline-start: auto; } }

.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 17px;
  background: linear-gradient(145deg, var(--blue-soft), #f3f7fd); color: var(--navy-2);
  box-shadow: inset 0 0 0 3px #fff, 0 4px 14px rgba(14, 26, 48, .08);
}
.avatar.sm { width: 38px; height: 38px; font-size: 14px; box-shadow: inset 0 0 0 2px #fff; }
.avatar.navy { background: linear-gradient(145deg, var(--navy-2), var(--navy)); color: #fff; box-shadow: none; }
.avatar.has-photo { padding: 2px; background: #fff; overflow: hidden; }
.avatar.has-photo.navy { background: var(--navy); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar.xl { width: 96px; height: 96px; font-size: 38px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); }
.avatar.xl.has-photo { padding: 3px; }
.topbar .avatar.has-photo { padding: 3px; }

/* round icon buttons */
.circle {
  width: 46px; height: 46px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  background: var(--surface); color: var(--text); border: 0; cursor: pointer; position: relative;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.circle:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); color: var(--text); }
.circle.sm { width: 38px; height: 38px; }
.circle.glass { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; backdrop-filter: blur(6px); }
.circle.glass:hover { background: rgba(255, 255, 255, .18); }
.circle.navy { background: var(--navy); color: #fff; }
.circle .dot {
  position: absolute; top: -2px; left: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px;
  background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
  box-shadow: 0 0 0 3px var(--bg);
}

/* floating dock (bottom navigation) */
/* Solid page-coloured band from under the dock to the very bottom edge. Without it, content scrolls
   visibly between the dock and Safari's floating address bar, and Safari tints its toolbar from
   that content, so the bar and the page don't match. */
.dock-fade {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 29; pointer-events: none;
  height: calc(52px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(243, 245, 247, 0), var(--bg) 60%);
}
.dock {
  position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 4px; padding: 7px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px);
  border-radius: 999px; box-shadow: 0 10px 40px rgba(14, 26, 48, .14), 0 0 0 1px rgba(14, 26, 48, .04);
  max-width: calc(100vw - 24px);
}
.dock a {
  display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 16px; border-radius: 999px;
  color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; position: relative;
  transition: background .15s ease, color .15s ease;
}
.dock a:hover { background: var(--surface-2); color: var(--text); }
.dock a.on { background: var(--navy); color: #fff; padding: 0 20px; }
.dock a .dot {
  position: absolute; top: 6px; left: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad);
  box-shadow: 0 0 0 2px #fff;
}
.dock a.on .dot { box-shadow: 0 0 0 2px var(--navy); }
@media (max-width: 820px) {
  /* Equal-width cells with the same gap between items and at both edges; label always under the icon. */
  .dock { bottom: calc(12px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); gap: 6px; padding: 6px; border-radius: 28px; }
  .dock a {
    flex: 1 1 0; min-width: 0; height: 58px; padding: 0 2px; border-radius: 22px;
    flex-direction: column; justify-content: center; gap: 3px; font-size: 11.5px; line-height: 1.2;
  }
  .dock a.on { padding: 0 2px; }
  .dock a .lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .dock a .dot { top: 7px; left: calc(50% - 16px); }
  .dock-fade { height: calc(48px + env(safe-area-inset-bottom)); }
}

/* ---------------------------------------------------------------- navy hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 140% at 0% 0%, var(--navy-3) 0%, var(--navy-2) 28%, var(--navy) 70%);
  color: #fff; border-radius: var(--r-xl); padding: 26px 28px; margin-bottom: 18px;
}
.hero::after { /* soft glow, like the light on the reference cards */
  content: ""; position: absolute; z-index: -1; width: 380px; height: 380px; left: -120px; bottom: -220px;
  background: radial-gradient(circle, rgba(168, 193, 236, .28), transparent 65%);
}
.hero h1 { color: #fff; font-size: 1.85rem; margin: 0; line-height: 1.4; }
.hero h1 .tone { display: block; font-weight: 600; }
.hero p { color: rgba(255, 255, 255, .72); margin: 8px 0 0; }
.hero .hero-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 10px; }
.hero .hero-row { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.profile-head { display: flex; align-items: center; gap: 18px; }
.profile-head h1 { margin: 0; }
.photo-pick { position: relative; cursor: pointer; flex-shrink: 0; border-radius: 50%; }
.photo-pick .cam {
  position: absolute; bottom: 0; left: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--navy); box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}
.photo-pick:hover .cam { transform: scale(1.08); }
@media (max-width: 520px) { .avatar.xl { width: 78px; height: 78px; font-size: 30px; } .profile-head { gap: 14px; } }
.hero .hero-art { position: absolute; left: 90px; bottom: -70px; color: rgba(168, 193, 236, .12); z-index: -1; }
@media (max-width: 720px) { .hero { padding: 22px 20px; border-radius: 26px; } .hero h1 { font-size: 1.5rem; } .hero .hero-art { display: none; } }

/* search pill + round filter button */
.search { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 240px; }
.search-pill {
  flex: 1; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 999px;
  padding: 0 18px; height: 50px; color: var(--muted);
}
.search-pill input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); flex: 1; min-width: 0; height: 100%; }
.search-pill input::placeholder { color: #a3aab7; }

/* segmented pill switch */
.seg { display: inline-flex; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 4px; gap: 2px; }
.seg a { padding: 7px 16px; border-radius: 999px; color: rgba(255, 255, 255, .75); font-size: 13.5px; font-weight: 500; }
.seg a:hover { color: #fff; }
.seg a.on { background: #fff; color: var(--navy); }
.seg.light { background: var(--surface); box-shadow: var(--shadow); }
.seg.light a { color: var(--text-2); }
.seg.light a.on { background: var(--navy); color: #fff; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--surface); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head .more { font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }

.card-blue { background: linear-gradient(180deg, var(--blue-soft) 0%, var(--blue-soft-2) 100%); box-shadow: none; }
.card-navy {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background: radial-gradient(130% 150% at 100% 0%, var(--navy-3) 0%, var(--navy-2) 30%, var(--navy) 75%);
}
.card-navy::after {
  content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; left: -90px; top: -150px;
  background: radial-gradient(circle, rgba(168, 193, 236, .22), transparent 65%);
}
.card-navy .muted, .card-navy small { color: rgba(255, 255, 255, .66); }
.card-navy h2, .card-navy h3 { color: #fff; }
.card-navy .label { font-size: 13.5px; color: rgba(255, 255, 255, .78); }
.card-navy .big { font-size: 3rem; font-weight: 700; line-height: 1.15; margin: 8px 0 2px; letter-spacing: -.02em; }
.card-navy .art { position: absolute; left: 18px; bottom: 10px; color: rgba(168, 193, 236, .2); z-index: -1; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.split { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

/* metrics row with thin dividers (the "Health Overview" card) */
.metrics { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.metric { padding: 2px 16px; border-inline-start: 1px solid rgba(13, 23, 41, .1); min-width: 0; }
.metric:first-child { border-inline-start: 0; padding-inline-start: 0; }
.metric .k { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.metric .v { font-size: 1.75rem; font-weight: 700; line-height: 1.3; margin: 4px 0; }
.metric .u { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.metric .u .i { color: var(--blue); }
@media (max-width: 560px) { .metric { padding: 2px 10px; } .metric .v { font-size: 1.4rem; } }

/* quick access circles */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; }
.quick a { color: var(--text); font-size: 13.5px; font-weight: 500; line-height: 1.4; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.quick .q {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--navy-2); transition: background .15s ease, transform .15s ease;
}
.quick a:hover .q { background: var(--blue-soft); transform: translateY(-2px); }
.quick a.on .q { background: var(--blue-soft); color: var(--blue); }

/* call-to-action bar ("Book Consultation") */
.cta {
  display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--r-lg); color: #fff;
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy-2) 60%, #2d4677 100%);
  box-shadow: 0 14px 30px rgba(10, 26, 51, .22); margin-bottom: 18px; border: 0; width: 100%; font: inherit; text-align: right; cursor: pointer;
}
.cta:hover { color: #fff; filter: brightness(1.06); }
.cta .t { font-weight: 600; font-size: 1.02rem; display: block; }
.cta .s { color: rgba(255, 255, 255, .7); font-size: 13px; display: block; }
.cta .go { margin-inline-start: auto; }
.go {
  width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(10, 26, 51, .18); transition: transform .15s ease;
}
a:hover .go, button:hover .go { transform: translateX(-3px); }
.go.sm { width: 38px; height: 38px; }

/* soft info strip ("Talk to a Specialist") */
.strip {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--blue-soft-2), var(--blue-soft)); margin-bottom: 18px; color: var(--text);
}
.strip .t { font-weight: 600; display: block; }
.strip .s { font-size: 13px; color: var(--text-2); display: block; }
.strip .go { margin-inline-start: auto; }
.strip.warn { background: linear-gradient(90deg, #fdf6ea, var(--warn-soft)); }
.strip.ok { background: linear-gradient(90deg, #eef9f4, var(--ok-soft)); }
.strip.bad { background: linear-gradient(90deg, #fdf1f0, var(--bad-soft)); }
.strip .ic { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .75); display: grid; place-items: center; flex-shrink: 0; color: var(--navy-2); }

/* stacked avatars */
.stack { display: flex; }
.stack .avatar { width: 36px; height: 36px; font-size: 13px; margin-inline-start: -10px; box-shadow: 0 0 0 3px #fff; }
.stack .avatar:first-child { margin-inline-start: 0; }

/* "image" tiles — gradient cards with a big faded icon (the treatment tiles) */
.tile {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); padding: 20px; min-height: 190px;
  display: flex; flex-direction: column; color: #fff;
  background: radial-gradient(130% 130% at 100% 0%, var(--navy-3), var(--navy) 70%);
  box-shadow: var(--shadow);
}
.tile.alt { background: radial-gradient(130% 130% at 100% 0%, #b9c8de, #6f84a6 75%); }
.tile.alt2 { background: radial-gradient(130% 130% at 100% 0%, #31507f, #1b2f55 75%); }
.tile .art { position: absolute; left: -10px; top: -14px; color: rgba(255, 255, 255, .12); z-index: -1; }
.tile .tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tile .tile-body { margin-top: auto; padding-top: 18px; display: flex; align-items: flex-end; gap: 12px; }
.tile .tile-body .txt { flex: 1; min-width: 0; }
.tile h3 { color: #fff; font-size: 1.12rem; margin: 0; }
.tile .sub { color: rgba(255, 255, 255, .75); font-size: 13px; }
.tile .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tile .chip { background: rgba(255, 255, 255, .14); color: #fff; border: 0; }
.tile .chip.lead { background: #fff; color: var(--navy); }
.tile .meter { height: 5px; background: rgba(255, 255, 255, .18); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.tile .meter i { display: block; height: 100%; background: var(--tone); border-radius: 99px; }
.tile.mine { box-shadow: 0 0 0 3px var(--tone), var(--shadow); }

/* ---------------------------------------------------------------- lists */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rows li:last-child { border-bottom: 0; padding-bottom: 2px; }
.rows li:first-child { padding-top: 2px; }
.rows .main { flex: 1; min-width: 150px; line-height: 1.5; }
.rows .main b { font-weight: 600; }
.rows .main small { color: var(--muted); display: block; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 11px; border-radius: 999px; font-size: 12.5px;
  background: var(--surface-2); color: var(--text-2); font-weight: 500; white-space: nowrap;
}
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; line-height: 1.6;
}
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.info { background: var(--blue-soft-2); color: var(--blue); }
.tag.navy { background: var(--navy); color: #fff; }
.tag.glass { background: rgba(255, 255, 255, .14); color: #fff; }

.table-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
th, td { padding: 13px 10px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfd; }

.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.empty .ei {
  width: 66px; height: 66px; border-radius: 50%; background: var(--surface-2); color: var(--navy-2);
  display: grid; place-items: center; margin: 0 auto 12px;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); color: var(--text); transition: filter .15s ease, background .15s ease, transform .15s ease;
}
.btn:hover { background: #e9edf3; color: var(--text); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-soft { background: var(--blue-soft-2); color: var(--blue); }
.btn-soft:hover { background: var(--blue-soft); color: var(--blue); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: var(--ok); filter: brightness(1.08); color: #fff; }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-danger:hover { background: #f8d9d6; color: var(--bad); }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: #fff; filter: brightness(.97); color: var(--navy); }
.btn-glass { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-glass:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15px; font-weight: 600; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 34px; padding: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline { display: inline; margin: 0; }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 500; font-size: 13.5px; margin-bottom: 7px; color: var(--text-2); }
.field .help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field .error { font-size: 12.5px; color: var(--bad); margin-top: 5px; }
.field.check-field label { display: flex; gap: 10px; align-items: center; font-weight: 500; color: var(--text); }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid transparent; background: var(--surface-2); color: var(--text);
  border-radius: var(--r-sm); padding: 0 16px; height: 50px; font: inherit; font-size: 15px;
  transition: border-color .15s ease, background .15s ease;
}
textarea.input { height: auto; padding: 13px 16px; line-height: 1.8; resize: vertical; }
select.input { 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='%238b93a3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 16px center; padding-left: 38px; }
.input:focus { outline: 0; border-color: var(--navy-3); background: #fff; }
input[type=file].input { padding: 11px 14px; height: auto; }
input[type=file].input::file-selector-button {
  font: inherit; font-size: 13px; border: 0; border-radius: 99px; padding: 6px 14px; margin-inline-end: 10px;
  background: var(--navy); color: #fff; cursor: pointer;
}
.check { width: 20px; height: 20px; accent-color: var(--navy); }
.form-row { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.errorlist { margin: 0 0 14px; padding: 12px 16px; list-style: none; background: var(--bad-soft); color: var(--bad); border-radius: var(--r-sm); }

/* ---------------------------------------------------------------- flash messages */
.flash { display: grid; gap: 8px; margin-bottom: 18px; }
.flash div { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--r-md); background: var(--blue-soft-2); color: var(--navy-2); font-weight: 500; }
.flash .success { background: var(--ok-soft); color: var(--ok); }
.flash .error { background: var(--bad-soft); color: var(--bad); }
.flash .warning { background: var(--warn-soft); color: var(--warn); }

/* ---------------------------------------------------------------- auth pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); }
.auth-side {
  position: relative; overflow: hidden; isolation: isolate; margin: 16px; border-radius: 34px; padding: 44px;
  background: radial-gradient(120% 120% at 100% 0%, var(--navy-3) 0%, var(--navy-2) 30%, var(--navy) 72%);
  color: #fff; display: flex; flex-direction: column;
}
.auth-side::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; left: -200px; bottom: -260px; background: radial-gradient(circle, rgba(168, 193, 236, .3), transparent 65%); }
.auth-side .art { position: absolute; left: 40px; top: 46%; color: rgba(168, 193, 236, .1); z-index: -1; }
.auth-side h1 { font-size: 2.5rem; color: #fff; line-height: 1.35; margin: auto 0 12px; }
.auth-side h1 .tone { display: block; font-weight: 600; }
.auth-side p { color: rgba(255, 255, 255, .7); max-width: 420px; }
.auth-side .features { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.auth-side .features div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255, 255, 255, .8); text-align: center; width: 82px; }
.auth-side .features .fi { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: grid; place-items: center; color: #fff; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .input { background: #fff; box-shadow: 0 1px 2px rgba(14, 26, 48, .05); }
.auth-card .input:focus { border-color: var(--navy-3); }
.auth-card h2 { font-size: 1.55rem; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.brandmark {
  width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .12); margin-bottom: 18px;
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { margin: 12px 12px 0; padding: 28px 24px 30px; border-radius: 28px; }
  .auth-side h1 { font-size: 1.75rem; margin-top: 8px; }
  .auth-side .features, .auth-side .art { display: none; }
  .auth-main { padding: 24px 16px 40px; align-items: start; }
}

/* ---------------------------------------------------------------- workspace */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 22px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; white-space: nowrap;
  color: rgba(255, 255, 255, .75); font-size: 14px; font-weight: 500; background: rgba(255, 255, 255, .08);
}
.tabs a:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.tabs a.on { background: #fff; color: var(--navy); }

.progress { height: 8px; border-radius: 99px; background: rgba(13, 23, 41, .08); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--navy-3), var(--navy)); }

.board { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.column { background: #e9edf2; border-radius: var(--r-lg); padding: 14px; min-height: 140px; }
.column-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px 12px; font-weight: 600; }
.column-head .count { min-width: 28px; height: 28px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 13px; }
.column.doing { background: linear-gradient(180deg, var(--blue-soft), var(--blue-soft-2)); }
.column.done { background: #e6f2ec; }
.task { background: #fff; border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(14, 26, 48, .05); }
.task:last-child { margin-bottom: 0; }
.task-title { font-weight: 600; line-height: 1.5; }
.column.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 8px; }
.task-meta span { display: inline-flex; align-items: center; gap: 4px; }
.task p { font-size: 13.5px; color: var(--text-2); margin-bottom: 10px; white-space: pre-line; }
.task .actions { gap: 6px; }
.task select.input { height: 34px; font-size: 13px; width: auto; padding: 0 12px 0 32px; border-radius: 99px; background-position: left 12px center; }

.chat { display: flex; flex-direction: column; height: calc(100vh - 470px); min-height: 380px; padding: 0; overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, #fafbfd, #f4f6f9); }
.msg { max-width: 76%; display: flex; flex-direction: row-reverse; gap: 10px; align-items: flex-end; align-self: flex-end; }
.msg .bubble { background: #fff; padding: 9px 15px; border-radius: 20px 20px 20px 6px; box-shadow: 0 1px 2px rgba(14, 26, 48, .06); }
.msg.mine { align-self: flex-start; flex-direction: row; }
.msg.mine .bubble { background: var(--navy); color: #fff; border-radius: 20px 20px 6px 20px; }
.msg .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.msg.mine .meta { color: rgba(255, 255, 255, .6); }
.msg .body { white-space: pre-wrap; word-wrap: break-word; line-height: 1.75; }
.msg.mine .body a { color: var(--tone); }
.chat-form { display: flex; gap: 10px; padding: 14px; background: #fff; align-items: center; }
.chat-form textarea { flex: 1; resize: none; height: 50px; border-radius: 999px; padding: 12px 20px; overflow: hidden; }
@media (max-width: 820px) { .chat { height: calc(100vh - 400px); } }

.file-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--blue-soft-2); color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-inline-start: 46px; padding-bottom: 16px; }
.steps li::before {
  content: counter(s, persian); position: absolute; right: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); color: var(--navy-2); display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; right: 15.5px; top: 36px; bottom: 4px; width: 1px; background: var(--line); }
.steps li.done::before { content: "✓"; background: var(--navy); color: #fff; }

.prose { white-space: pre-line; color: var(--text-2); line-height: 1.95; }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 22px 0 0; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 4px 14px; }
.section-title h2 { margin: 0; }

/* =====================================================================
   Motion
   - Page and tab changes use cross-document View Transitions: the page
     cross-fades while the dock pill, the workspace tab pill and the
     panel switch slide to their new position.
   - Content enters with a short staggered rise; numbers count up;
     bars fill; flash messages slide in and dismiss themselves.
   ===================================================================== */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: vt-out .18s ease both; }
::view-transition-new(root) { animation: vt-in .32s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

.topbar { view-transition-name: topbar; }
.dock { view-transition-name: dock; }
.dock a.on { view-transition-name: dock-pill; }
.tabs a.on { view-transition-name: tab-pill; }
.seg.light a.on { view-transition-name: seg-pill; }
.hero { view-transition-name: hero; }
::view-transition-group(dock-pill),
::view-transition-group(tab-pill),
::view-transition-group(seg-pill),
::view-transition-group(hero) { animation-duration: .38s; animation-timing-function: cubic-bezier(.3, .8, .2, 1); }
::view-transition-old(dock-pill), ::view-transition-new(dock-pill),
::view-transition-old(tab-pill), ::view-transition-new(tab-pill),
::view-transition-old(seg-pill), ::view-transition-new(seg-pill) { height: 100%; animation-duration: .38s; }
::view-transition-group(topbar), ::view-transition-group(dock) { animation: none; }

/* staggered entrance of page content */
.rise { animation: rise .5s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 55ms + 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.pop { animation: pop .35s cubic-bezier(.2, .9, .3, 1.3) backwards; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }

/* hover & press feedback */
a.card, a.tile, a.cta, a.strip, .tile { transition: transform .22s cubic-bezier(.2, .7, .2, 1), box-shadow .22s ease; }
a.card:hover, a.tile:hover, .tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
a.cta:hover, button.cta:hover { transform: translateY(-2px); }
a.strip:hover { transform: translateY(-2px); }
.btn:active, .circle:active, .cta:active, .go:active, .dock a:active { transform: scale(.96); }
.quick a .q { transition: background .2s ease, transform .25s cubic-bezier(.2, .9, .3, 1.4), color .2s ease; }
.quick a:hover .q { transform: translateY(-4px) scale(1.05); }
.rows li { transition: background .2s ease; border-radius: 12px; }
.task { transition: transform .2s ease, box-shadow .2s ease; }
.task:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(14, 26, 48, .08); }
.tabs a, .seg a, .dock a { transition: background .2s ease, color .2s ease, transform .15s ease; }

/* decorative drift of the big faded icons and glow */
.hero .hero-art, .card-navy .art, .tile .art, .auth-side .art { animation: drift 9s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(-10px, -8px) rotate(-4deg); } }
.hero::after, .card-navy::after, .auth-side::after { animation: glow 6s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .7; } to { opacity: 1; transform: scale(1.12); } }

/* bars fill in (RTL: grow from the right) */
.progress > i, .tile .meter i { transform-origin: right center; animation: fill 1s cubic-bezier(.2, .7, .2, 1) .25s both; }
@keyframes fill { from { transform: scaleX(0); } }

/* notification badges breathe */
.circle .dot, .dock a .dot { animation: ping 2.4s ease-in-out infinite; }
@keyframes ping { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* flash messages */
.flash div { animation: flash-in .45s cubic-bezier(.2, .9, .3, 1.2) backwards; transition: opacity .4s ease, transform .4s ease, max-height .4s ease, margin .4s ease, padding .4s ease; max-height: 200px; overflow: hidden; }
.flash div.out { opacity: 0; transform: translateY(-8px); max-height: 0; padding-top: 0; padding-bottom: 0; margin: 0; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-12px) scale(.98); } }

/* chat bubbles */
.msg.new { animation: msg-in .35s cubic-bezier(.2, .9, .3, 1.2) backwards; }
.msg.new.mine { transform-origin: right bottom; }
@keyframes msg-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.chat-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.chat-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(31, 138, 99, .5); animation: live 2s infinite; }
.chat-status.off i { background: var(--muted); animation: none; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(31, 138, 99, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 138, 99, 0); } }

/* submit buttons show a spinner while the request is in flight */
.is-loading { pointer-events: none; opacity: .8; }
.is-loading::after {
  content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite; margin-inline-start: 4px;
}
.cta.is-loading::after, .circle.is-loading::after { display: none; }
.cta.is-loading .go > *, .circle.is-loading > * { opacity: 0; }
.cta.is-loading .go, .circle.is-loading { position: relative; }
.cta.is-loading .go::after, .circle.is-loading::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

details[open] > form, details[open] > div { animation: rise .35s cubic-bezier(.2, .7, .2, 1) backwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  @view-transition { navigation: none; }
}
