/* ==========================================================================
   Tasks_bot_TG — Liquid Glass (iOS 26) stylesheet
   Dark-only. Cormorant Garamond display + system-ui body.
   Every surface is frosted glass with layered rim highlights.
   Reference: design/liquid-glass/variant-pure.jsx
   ========================================================================== */

/* -- tokens ---------------------------------------------------------------- */
:root {
  /* Accent tints (OKLCH) */
  --tint-mint:    #00dd97;
  --tint-mint-50: rgba(0, 221, 151, 0.5);
  --tint-mint-35: rgba(0, 221, 151, 0.35);

  --tint-rose:    #a10128;
  --tint-rose-50: rgba(161, 1, 40, 0.55);
  --tint-rose-35: rgba(161, 1, 40, 0.4);

  --tint-blue:    #27a3ff;
  --tint-blue-50: rgba(39, 163, 255, 0.5);
  --tint-blue-35: rgba(39, 163, 255, 0.35);

  --tint-emerald:    #31d96d;
  --tint-emerald-50: rgba(49, 217, 109, 0.5);
  --tint-emerald-35: rgba(49, 217, 109, 0.35);

  --tint-amber:    #ffbd3e;
  --tint-amber-50: rgba(255, 189, 62, 0.5);
  --tint-amber-35: rgba(255, 189, 62, 0.35);

  /* Italic lavender used on display accents ("на уме", "CEO") */
  --ink-accent: #b1d9ff;
  --ink-amber:  #ffcc79;

  /* Ink */
  --ink:        #ffffff;
  --ink-muted:  rgba(255, 255, 255, 0.60);
  --ink-faint:  rgba(255, 255, 255, 0.45);
  --ink-deep:   rgba(255, 255, 255, 0.80);

  /* Surfaces (translucent — background bleeds through) */
  --glass-card-bg:      rgba(255, 255, 255, 0.05);
  --glass-card-bg-up:   rgba(255, 255, 255, 0.08);
  --glass-chip-bg:      rgba(255, 255, 255, 0.07);
  --glass-field-bg:     rgba(255, 255, 255, 0.04);
  --glass-border:       rgba(255, 255, 255, 0.18);
  --glass-border-soft:  rgba(255, 255, 255, 0.10);
  --glass-border-field: rgba(255, 255, 255, 0.08);

  /* Radii */
  --r-card:   30px;
  --r-field:  20px;
  --r-pill:   22px;
  --r-chip:   99px;
  --r-bubble: 13px;

  /* Spacing */
  --pad:    18px;
  --gap:    12px;

  /* Motion */
  --ease:   cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur:    250ms;
  --dur-sm: 120ms;

  /* Fonts */
  --font-display: "Cormorant Garamond", ui-serif, Georgia, "Times New Roman", serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

/* -- reset & base ---------------------------------------------------------- */
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

html {
  margin: 0;
  background: #07081A;
}
body {
  /* body transparent so .aurora-bg (z-index: -1) can be seen through cards.
     isolation: isolate forces body as a stacking-context root so z-index:-1
     children stay within body (painted above html canvas bg). */
  margin: 0;
  background: transparent;
  isolation: isolate;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.4;
}

body {
  min-height: 100dvh;
  padding-bottom: calc(env(safe-area-inset-bottom, 0) + 40px);
  /* keep scroll on body — aurora is fixed underneath */
}

[x-cloak] { display: none !important; }

main { padding: 0 var(--pad); }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35), 0 0 0 4px var(--tint-blue-35);
  border-radius: 4px;
}

button { font-family: inherit; }

/* -- aurora background ----------------------------------------------------- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora-layer {
  position: absolute;
  filter: blur(50px);
}
.aurora-1 {
  top: -20%; left: -35%;
  width: 130%; height: 95%;
  background: radial-gradient(circle, rgba(82, 76, 255, 0.8), transparent 65%);
}
.aurora-2 {
  top: 10%; right: -45%;
  width: 130%; height: 85%;
  background: radial-gradient(circle, rgba(0, 153, 186, 0.75), transparent 65%);
  filter: blur(55px);
}
.aurora-3 {
  bottom: -25%; left: -25%;
  width: 125%; height: 80%;
  background: radial-gradient(circle, rgba(178, 43, 188, 0.7), transparent 65%);
  filter: blur(55px);
}
.aurora-4 {
  top: 45%; left: -10%;
  width: 100%; height: 55%;
  background: radial-gradient(circle, rgba(17, 173, 50, 0.5), transparent 65%);
  filter: blur(55px);
}
.aurora-5 {
  top: 5%; right: -5%;
  width: 75%; height: 45%;
  background: radial-gradient(circle, rgba(243, 131, 0, 0.45), transparent 65%);
}
.aurora-grain {
  position: absolute; inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* -- typographic scale ----------------------------------------------------- */
.t-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 54px;
  line-height: 1.0;
  letter-spacing: -1px;
  color: var(--ink);
}
.t-screen-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 0;
}
.t-section {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.t-numeric {
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
}
.t-label {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.t-meta {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.4;
}
.t-body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-deep);
}

/* screen-level italic display accent ("Что на уме?", "CEO" и т.п.) */
h1 em, h2 em, .tile-title em {
  font-style: italic;
  color: var(--ink-accent);
  font-weight: inherit;
}

/* -- header (PureTop — 2 glass chips) -------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad) 8px;
  gap: 8px;
  background: transparent;
}
.app-header .brand-chip {
  padding: 7px 14px;
}
.app-header .brand-name,
.app-header .today-chip {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--ink-deep);
}
.app-header .brand-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6ed889;
  box-shadow: 0 0 8px #6ed889;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1;   }
}

/* -- glass primitives ------------------------------------------------------ */

/* GlassChip — small pill */
.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-chip);
  background: var(--glass-chip-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border-soft);
  color: var(--ink-deep);
  font-size: 12px;
  letter-spacing: 0.3px;
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.20),
    inset 0 -1px 0 rgba(0,0,0,0.20),
    0 2px 8px rgba(0,0,0,0.30);
  cursor: default;
  white-space: nowrap;
}

/* GlassCard — main content surface. Rim lights + floor shadow + 2 specular pseudos. */
.glass-card {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--glass-card-bg);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.40),
    inset 0 -1px  0 rgba(0,0,0,0.30),
    inset 1.5px 0 0 rgba(255,255,255,0.15),
    inset -1px  0 0 rgba(255,255,255,0.08),
    0 1px 2px  rgba(0,0,0,0.10),
    0 20px 50px rgba(0,0,0,0.45),
    0 4px 12px  rgba(0,0,0,0.25);
  transition: transform var(--dur) var(--ease), filter var(--dur-sm) var(--ease);
}
.glass-card::before,
.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
.glass-card::before {
  /* TL specular sweep */
  background: radial-gradient(130% 65% at 15% -10%, rgba(255,255,255,0.22), transparent 55%);
}
.glass-card::after {
  /* BR soft glow */
  background: radial-gradient(80% 40% at 90% 110%, rgba(255,255,255,0.07), transparent 55%);
}
.glass-card > * { position: relative; }
.glass-card:active { transform: scale(0.98); filter: brightness(0.95); }

.glass-card.elevated { background: var(--glass-card-bg-up); }

/* GlassField — input/textarea surface */
.glass-field {
  position: relative;
  border-radius: var(--r-field);
  overflow: hidden;
  background: var(--glass-field-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border-field);
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 4px 12px rgba(0,0,0,0.20);
}
.glass-field::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(100% 60% at 20% 0%, rgba(255,255,255,0.10), transparent 60%);
}

/* GlassShape — SVG silhouette. Glass depth into center, aurora halo outside. */
.glass-shape {
  display: inline-block;
  position: relative;
  width: 56px; height: 56px;
  flex-shrink: 0;
}
.glass-shape::before {
  /* floor shadow — darkens bg under the icon so it "sits" on the glass */
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse 60% 55% at 50% 55%, rgba(0,0,0,0.5), transparent 70%);
  filter: blur(4px);
  pointer-events: none;
  z-index: 0;
}
.glass-shape svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* -- screen shell (each <main>) ------------------------------------------- */
main.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px var(--pad) 40px;
}
/* Generic .stack (used for inner card containers) — picks up --gap inline var
   so markup like <div class="stack" style="--gap: 18px"> actually spaces children. */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 16px);
}
.stack > * + * { margin-top: 0; } /* we use gap instead */
.stack-sm { display: flex; flex-direction: column; gap: 10px; }

/* -- back link (glass chip with chevron) ---------------------------------- */
.back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-chip);
  background: var(--glass-chip-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border-soft);
  color: var(--ink-deep);
  font-family: var(--font-body);
  font-size: 14px;
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.20),
    inset 0 -1px 0 rgba(0,0,0,0.20),
    0 2px 8px rgba(0,0,0,0.30);
  cursor: pointer;
  transition: transform var(--dur-sm) var(--ease), filter var(--dur-sm) var(--ease);
}
.back-link:active { transform: scale(0.97); filter: brightness(0.9); }
.back-link svg    { width: 14px; height: 14px; stroke-width: 1.7; }

/* -- hero tile on Home / meetings_home ------------------------------------ */
.hero-tile {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 18px 18px 22px;
  text-align: left;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  background: var(--glass-card-bg);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.40),
    inset 0 -1px  0 rgba(0,0,0,0.30),
    inset 1.5px 0 0 rgba(255,255,255,0.15),
    inset -1px  0 0 rgba(255,255,255,0.08),
    0 1px 2px  rgba(0,0,0,0.10),
    0 20px 50px rgba(0,0,0,0.45),
    0 4px 12px  rgba(0,0,0,0.25);
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), filter var(--dur-sm) var(--ease);
}
.hero-tile::before,
.hero-tile::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
}
.hero-tile::before {
  background: radial-gradient(130% 65% at 15% -10%, rgba(255,255,255,0.22), transparent 55%);
}
.hero-tile::after {
  background: radial-gradient(80% 40% at 90% 110%, rgba(255,255,255,0.07), transparent 55%);
}
.hero-tile > * { position: relative; }
.hero-tile:active { transform: scale(0.98); filter: brightness(0.95); }

/* accent rail (left edge 2.5px colored bar with tinted glow) */
.hero-tile .accent-rail {
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 2.5px;
  background: var(--rail, var(--tint-blue));
  box-shadow:
    0 0 20px var(--rail, var(--tint-blue)),
    0 0 40px var(--rail-50, var(--tint-blue-50));
  border-radius: 0;
}
.hero-tile.rail-mint    { --rail: var(--tint-mint);    --rail-50: var(--tint-mint-50);    }
.hero-tile.rail-rose    { --rail: var(--tint-rose);    --rail-50: var(--tint-rose-50);    }
.hero-tile.rail-blue    { --rail: var(--tint-blue);    --rail-50: var(--tint-blue-50);    }
.hero-tile.rail-emerald { --rail: var(--tint-emerald); --rail-50: var(--tint-emerald-50); }
.hero-tile.rail-amber   { --rail: var(--tint-amber);   --rail-50: var(--tint-amber-50);   }

/* chromatic rim hint — faint diagonal tint inside card */
.hero-tile.rail-mint    { background-image: linear-gradient(135deg, var(--tint-mint-35),    transparent 40%); }
.hero-tile.rail-rose    { background-image: linear-gradient(135deg, var(--tint-rose-35),    transparent 40%); }
.hero-tile.rail-blue    { background-image: linear-gradient(135deg, var(--tint-blue-35),    transparent 40%); }
.hero-tile.rail-emerald { background-image: linear-gradient(135deg, var(--tint-emerald-35), transparent 40%); }
.hero-tile.rail-amber   { background-image: linear-gradient(135deg, var(--tint-amber-35),   transparent 40%); }

.hero-tile .glass-shape { width: 56px; height: 56px; }

.hero-tile .tile-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hero-tile .tile-kicker {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 3px;
}
.hero-tile .tile-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.hero-tile .tile-sub {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.35;
  margin-top: 4px;
}
.hero-tile .tile-count-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.hero-tile .tile-count {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}
.hero-tile .tile-count-wrap .unit {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* -- inputs (glass-field'ed) ---------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field > label.t-label { margin: 0; }

.input,
.textarea,
input[type="text"],
input[type="date"],
input[type="datetime-local"] {
  width: 100%;
  padding: 16px 18px;
  background: var(--glass-field-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border-field);
  border-radius: var(--r-field);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 4px 12px rgba(0,0,0,0.20);
  -webkit-appearance: none;
  appearance: none;
  min-height: 52px;
  transition: border-color var(--dur-sm) var(--ease), box-shadow var(--dur-sm) var(--ease);
}
.textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
  /* lighter glass + thicker bevel for a "bulging" cabochon feel */
  background: rgba(255, 255, 255, 0.10);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0  2px 0 rgba(255,255,255,0.30),
    inset 0 -2px 0 rgba(0,0,0,0.25),
    inset 1.5px 0 0 rgba(255,255,255,0.12),
    inset -1.5px 0 0 rgba(255,255,255,0.06),
    0 8px 24px rgba(0,0,0,0.30),
    0 2px 6px rgba(0,0,0,0.20);
}
.input::placeholder,
.textarea::placeholder { color: rgba(255,255,255,0.35); }
.input:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.3);
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.20),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 0 0 3px var(--tint-blue-35);
}
/* date/datetime pickers — dark scheme */
input[type="date"],
input[type="datetime-local"] { color-scheme: dark; }

/* -- chips (selectable) ---------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  min-height: 38px;
  background: var(--glass-chip-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border-soft);
  border-radius: var(--r-chip);
  color: var(--ink-deep);
  font-family: var(--font-body);
  font-size: 13.5px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.20),
    inset 0 -1px 0 rgba(0,0,0,0.20),
    0 2px 8px rgba(0,0,0,0.30);
  transition: transform var(--dur-sm) var(--ease), background var(--dur-sm) var(--ease);
}
.chip:active { transform: scale(0.96); }
.chip svg { width: 14px; height: 14px; flex-shrink: 0; }

.chip-on {
  background: rgba(255,255,255,0.20);
  color: var(--ink);
  border-color: rgba(255,255,255,0.35);
}

.chip-accent-on {
  background: linear-gradient(135deg, var(--tint-blue-50), var(--tint-blue-35));
  border-color: rgba(255,255,255,0.35);
  color: var(--ink);
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.20),
    0 2px 10px rgba(39, 163, 255, 0.35);
}

.chip-amber-on {
  background: linear-gradient(135deg, rgba(255, 189, 62, 0.55), rgba(230, 95, 42, 0.45));
  border-color: rgba(255,255,255,0.35);
  color: var(--ink);
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.20),
    0 2px 10px rgba(243, 131, 0, 0.35);
}

/* scroll-row (deadline presets) */
.scroll-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 2px 0 6px;
  margin: 0 calc(-1 * var(--pad));
  padding-left: var(--pad);
  padding-right: var(--pad);
  scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row > * { scroll-snap-align: start; flex-shrink: 0; }

/* -- assignee picker ------------------------------------------------------- */
.assignee-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 38px;
}
.assignee-input {
  flex: 1 1 160px;
  min-width: 120px;
  height: 36px;
  padding: 0 14px;
  background: var(--glass-field-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px dashed rgba(255,255,255,0.25);
  border-radius: var(--r-chip);
  color: var(--ink);
  font: 14px/1.2 var(--font-body);
  outline: none;
  transition: border-color var(--dur-sm) var(--ease), background var(--dur-sm) var(--ease);
}
.assignee-input::placeholder { color: var(--ink-faint); font-style: italic; }
.assignee-input:focus {
  border-style: solid;
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
}

/* -- primary button / liquid pill ----------------------------------------- */
.btn-primary {
  position: relative;
  width: 100%;
  min-height: 66px;
  padding: 0 24px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, rgba(87, 155, 255, 0.85), rgba(145, 114, 254, 0.85));
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.45),
    inset 0 -1.5px 0 rgba(0,0,0,0.25),
    inset 1px 0 0 rgba(255,255,255,0.15),
    0 14px 40px rgba(83, 88, 238, 0.55),
    0 4px 12px rgba(0,0,0,0.30);
  transition: transform var(--dur-sm) var(--ease), filter var(--dur-sm) var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.btn-primary::before {
  /* top specular — wet-glass reflection */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 55%;
  border-radius: 22px 22px 60% 60%;
  background: radial-gradient(100% 100% at 50% 0%, rgba(255,255,255,0.40), transparent 60%);
  pointer-events: none;
}
.btn-primary > * { position: relative; }
.btn-primary:active { transform: scale(0.98); filter: brightness(0.95); }
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 2px 10px rgba(0,0,0,0.2);
}
.btn-primary .pill-plus {
  width: 30px; height: 30px;
  border-radius: 15px;
  background: rgba(255,255,255,0.22);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 300; line-height: 1;
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.40),
    inset 0 -1px 0 rgba(0,0,0,0.20);
}

/* liquid-pill variants (color accents) */
.liquid-pill-emerald {
  background: linear-gradient(135deg, rgba(110, 216, 137, 0.9), rgba(0, 199, 147, 0.9));
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.45),
    inset 0 -1.5px 0 rgba(0,0,0,0.25),
    0 12px 30px rgba(0, 191, 118, 0.5);
  color: #03180E;
}
/* emerald variant — used for "Создать задачу" / "Отметить готово" CTAs */
.btn-primary.variant-emerald {
  background: linear-gradient(135deg, rgba(49, 217, 109, 0.92), rgba(0, 199, 147, 0.92));
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.45),
    inset 0 -1.5px 0 rgba(0,0,0,0.25),
    inset 1px 0 0 rgba(255,255,255,0.15),
    0 14px 40px rgba(0, 199, 130, 0.55),
    0 4px 12px rgba(0,0,0,0.30);
}

/* ghost button (secondary) — styled as glass-field */
.btn-ghost {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  background: var(--glass-field-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border-field);
  border-radius: var(--r-field);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  cursor: pointer;
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 4px 12px rgba(0,0,0,0.20);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--dur-sm) var(--ease), filter var(--dur-sm) var(--ease);
}
.btn-ghost:active { transform: scale(0.98); filter: brightness(0.95); }
.btn-ghost svg    { width: 16px; height: 16px; }

/* -- card (generic) -------------------------------------------------------- */
.card {
  position: relative;
  background: var(--glass-card-bg);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.40),
    inset 0 -1px  0 rgba(0,0,0,0.30),
    0 20px 50px rgba(0,0,0,0.45),
    0 4px 12px  rgba(0,0,0,0.25);
}
.card::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(130% 65% at 15% -10%, rgba(255,255,255,0.22), transparent 55%);
}
.card > * { position: relative; }

/* -- open tasks list ------------------------------------------------------ */
.task-row {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 22px;
  background: var(--glass-card-bg);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.40),
    inset 0 -1px 0 rgba(0,0,0,0.30),
    0 20px 50px rgba(0,0,0,0.45),
    0 4px 12px rgba(0,0,0,0.25);
  overflow: hidden;
}
.task-row::before {
  content: "";
  position: absolute; left: 0; top: 10px; bottom: 10px; width: 2.5px;
  background: var(--tint-emerald);
  box-shadow: 0 0 20px var(--tint-emerald), 0 0 40px var(--tint-emerald-50);
  pointer-events: none;
}
.task-row::after {
  /* specular sweep */
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(130% 65% at 15% -10%, rgba(255,255,255,0.22), transparent 55%);
}
.task-row > * { position: relative; }

.task-row .prio-dot {
  width: 26px; height: 26px;
  border-radius: var(--r-bubble);
  background: var(--glass-field-bg);
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.20),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 2px 6px rgba(0,0,0,0.30);
}
.task-row .prio-dot.high {
  background: linear-gradient(135deg, var(--tint-amber-50), var(--tint-amber-35));
  border-color: rgba(255,255,255,0.35);
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.40),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 0 12px rgba(255, 189, 62, 0.55);
}
/* CEO bubble — bordeaux/rose so CEO tasks pop visually even at a glance */
.task-row .prio-dot.ceo {
  background: linear-gradient(135deg, rgba(161, 1, 40, 0.70), rgba(220, 70, 110, 0.50));
  border-color: rgba(220, 70, 110, 0.60);
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.35),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 0 14px rgba(220, 70, 110, 0.55);
}
.task-row .task-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: var(--ink);
  word-break: break-word;
}
.task-row .task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.task-row .meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--glass-chip-bg);
  border: 1px solid var(--glass-border-soft);
  border-radius: var(--r-chip);
  font-size: 11px;
  color: var(--ink-muted);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
}
.task-row .meta-pill svg { width: 11px; height: 11px; }
.task-row .meta-pill.deadline-due {
  color: #ffcc79;
  background: rgba(255, 189, 62, 0.15);
  border-color: rgba(255, 189, 62, 0.35);
}
/* CEO badge — bordeaux/rose pill so CEO tasks visually stand out in the list */
.task-row .meta-pill.ceo-pill {
  color: #ffd1dc;
  background: linear-gradient(135deg, rgba(161, 1, 40, 0.55), rgba(220, 70, 110, 0.40));
  border-color: rgba(220, 70, 110, 0.55);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-size: 10px;
  padding: 4px 9px;
  box-shadow: 0 2px 8px rgba(161, 1, 40, 0.30);
}

.task-row .close-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: #77eb94;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 2px 6px rgba(0,0,0,0.30);
  transition: transform var(--dur-sm) var(--ease), filter var(--dur-sm) var(--ease);
}
.task-row .close-btn:active { transform: scale(0.92); filter: brightness(0.9); }
.task-row .close-btn svg    { width: 18px; height: 18px; stroke-width: 1.8; }

/* -- meeting card (archive list) ------------------------------------------ */
.meeting-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 14px 18px 14px 22px;
  text-align: left;
  background: var(--glass-card-bg);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-card);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.40),
    inset 0 -1px 0 rgba(0,0,0,0.30),
    0 20px 50px rgba(0,0,0,0.45),
    0 4px 12px rgba(0,0,0,0.25);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-sm) var(--ease), filter var(--dur-sm) var(--ease);
}
.meeting-card::before {
  content: "";
  position: absolute; left: 0; top: 10px; bottom: 10px; width: 2.5px;
  background: var(--tint-mint);
  box-shadow: 0 0 20px var(--tint-mint), 0 0 40px var(--tint-mint-50);
  pointer-events: none;
}
.meeting-card::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(130% 65% at 15% -10%, rgba(255,255,255,0.22), transparent 55%);
}
.meeting-card > * { position: relative; }
.meeting-card:active { transform: scale(0.98); filter: brightness(0.95); }

.meeting-card .supplier {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: var(--ink);
}
.meeting-card .date-line {
  font-family: var(--font-display);
  font-variant-numeric: oldstyle-nums;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-muted);
  margin-top: 3px;
  display: inline-flex;
  padding: 3px 9px;
  border-radius: var(--r-chip);
  background: var(--glass-chip-bg);
  border: 1px solid var(--glass-border-soft);
  float: right;
  margin-left: 10px;
}
.meeting-card .excerpt {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.45;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  clear: both;
}

/* -- draft-task row (inside meeting form) --------------------------------- */
.draft-row {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--glass-field-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border-field);
  border-radius: var(--r-field);
  cursor: pointer;
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 2px 8px rgba(0,0,0,0.20);
  transition: background var(--dur-sm) var(--ease);
}
.draft-row:active { background: rgba(255,255,255,0.06); }
.draft-row .draft-body { flex: 1; min-width: 0; }
.draft-row .draft-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
  word-break: break-word;
}
.draft-row .draft-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 6px;
}
.draft-row .draft-bullet {
  font-size: 11px;
  color: var(--ink-faint);
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--glass-chip-bg);
  padding: 3px 10px;
  border-radius: var(--r-chip);
  border: 1px solid var(--glass-border-soft);
}
.draft-row .draft-bullet svg { width: 11px; height: 11px; flex-shrink: 0; }
.draft-row .draft-remove {
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 4px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.draft-row .draft-remove:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
.draft-row .draft-remove svg { width: 14px; height: 14px; }

/* -- modal (bottom-sheet on mobile) --------------------------------------- */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(7, 8, 26, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 40;
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.modal-scrim.is-open { opacity: 1; }

.modal-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: rgba(10, 11, 35, 0.85);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1);
  border: 1px solid var(--glass-border);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  padding: 14px var(--pad) calc(env(safe-area-inset-bottom, 0) + 20px);
  max-height: 92dvh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 240ms var(--ease);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,0.40),
    0 -12px 40px rgba(0,0,0,0.50);
}
.modal-sheet.is-open { transform: translateY(0); }

.modal-grip {
  width: 40px; height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.25);
  margin: 2px auto 14px;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 4px;
}

/* -- entry animation ------------------------------------------------------- */
@keyframes fade-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.enter { animation: fade-rise 280ms var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: 0ms;   }
.stagger > *:nth-child(2) { animation-delay: 60ms;  }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }
.stagger > *:nth-child(n+7) { animation-delay: 360ms; }

/* -- empty state ----------------------------------------------------------- */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-muted);
}
.empty .empty-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 56px;
  color: rgba(255,255,255,0.20);
  line-height: 1;
  margin-bottom: 10px;
}

/* -- helpers --------------------------------------------------------------- */
.divider-rule {
  height: 1px;
  background: var(--glass-border-soft);
  margin: 20px 0 16px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 6px 0 10px;
}
.section-head .t-section { color: var(--ink); }

/* icon-button (chrome, subtle) */
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--glass-chip-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border-soft);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow:
    inset 0  1px 0 rgba(255,255,255,0.20),
    inset 0 -1px 0 rgba(0,0,0,0.20),
    0 2px 8px rgba(0,0,0,0.30);
  transition: transform var(--dur-sm) var(--ease);
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; stroke-width: 1.6; }

/* -- dropdown (supplier/assignee search) ---------------------------------- */
.dropdown-wrap { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 50;
  padding: 4px;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(10, 11, 35, 0.85);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 12px 30px rgba(0,0,0,0.50);
}
.dropdown-item {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font: 14px/1.3 var(--font-body);
  color: var(--ink-deep);
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: background 120ms;
}
.dropdown-item:hover,
.dropdown-item:active {
  background: rgba(255,255,255,0.08);
  color: var(--ink);
}
.dropdown-more {
  padding: 8px 12px;
  font: italic 12px/1.2 var(--font-body);
  color: var(--ink-faint);
  text-align: center;
  border-top: 1px dashed var(--glass-border-soft);
  margin-top: 4px;
}

/* -- Cormorant: make italic Cormorant on inputs too, for consistency ----- */
.glass-chip em,
.tile-title em,
h1 em, h2 em { font-family: var(--font-display); }

/* Telegram WebApp may inject theme vars — we intentionally ignore them.
   The design is dark-only per brand decision (see bot/Wiki/decisions.md ADR-009). */
