@font-face { font-family: 'Ray'; src: url('/fonts/Ray-Light.woff') format('woff'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Ray'; src: url('/fonts/Ray-Regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Ray'; src: url('/fonts/Ray-Medium.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Ray'; src: url('/fonts/Ray-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Ray'; src: url('/fonts/Ray-ExtraBold.woff') format('woff'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Ray'; src: url('/fonts/Ray-Black.woff') format('woff'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Ray'; src: url('/fonts/Ray-ExtraBlack.woff') format('woff'); font-weight: 950; font-display: swap; }

:root {
  --brand: #1C1887; --brand-strong: #141163; --brand-mid: #4B47C2; --brand-soft: #ECEBFA; --brand-on: #ffffff;
  --bg: #F6F6FB; --surface: #FFFFFF; --surface-2: #F1F0F9; --border: #E3E2F0; --border-strong: #CBC9E2;
  --text: #16153A; --text-2: #5C5B80; --text-3: #8F8EAD;
  --urgent: #D93A40; --urgent-soft: #FCE8E9; --high: #C76A12; --high-soft: #FBEFDF; --ok: #1F8A5B; --ok-soft: #E2F4EB; --warn-soft: #FFF6D6;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(22,21,58,.06), 0 4px 16px rgba(22,21,58,.06);
  --font: 'Ray', Tahoma, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --brand: #8E8BEA; --brand-strong: #A9A6F2; --brand-mid: #8E8BEA; --brand-soft: #24214F; --brand-on: #0E0D24;
  --bg: #0E0D24; --surface: #16143A; --surface-2: #1D1B47; --border: #2A2850; --border-strong: #3B3870;
  --text: #E8E7FA; --text-2: #A4A2D4; --text-3: #6F6D9C;
  --urgent: #FF6B70; --urgent-soft: #3A1A2A; --high: #F0A050; --high-soft: #3A2A1A; --ok: #4FCF95; --ok-soft: #133A2C; --warn-soft: #3A3418;
  --shadow: none; color-scheme: dark;
} }
:root[data-theme="dark"] {
  --brand: #8E8BEA; --brand-strong: #A9A6F2; --brand-mid: #8E8BEA; --brand-soft: #24214F; --brand-on: #0E0D24;
  --bg: #0E0D24; --surface: #16143A; --surface-2: #1D1B47; --border: #2A2850; --border-strong: #3B3870;
  --text: #E8E7FA; --text-2: #A4A2D4; --text-3: #6F6D9C;
  --urgent: #FF6B70; --urgent-soft: #3A1A2A; --high: #F0A050; --high-soft: #3A2A1A; --ok: #4FCF95; --ok-soft: #133A2C; --warn-soft: #3A3418;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.i { width: 1.15em; height: 1.15em; vertical-align: -.22em; flex: none; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-mid); text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.4; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
.muted { color: var(--text-2); } .tiny { font-size: 12px; } .small { font-size: 13px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--text-2); }
.boot img { margin: 0 auto 8px; }

/* layout */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 14px; height: calc(100vh - 28px); margin: 14px 14px 14px 0; background: var(--surface); border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); border-radius: 24px; box-shadow: 0 1px 2px rgba(28,24,135,.05), 0 10px 32px rgba(28,24,135,.09); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; z-index: 21; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-name { font-weight: 900; color: var(--brand); }
.brand b { font-size: 19px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--text-2); font-weight: 600; position: relative; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand); color: var(--brand-on); box-shadow: 0 6px 16px rgba(28,24,135,.25); }
.nav-item.active .nav-badge { background: #fff; color: var(--brand); }
.nav-item svg { width: 20px; height: 20px; flex: none; }
.nav-badge { margin-inline-start: auto; background: var(--urgent); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.sidebar .spacer { flex: 1; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--surface-2); }
.me-card:hover { background: var(--surface-2); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--border); }
.topbar .title { font-weight: 700; font-size: 17px; flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.search-box { position: relative; width: min(320px, 40vw); }
.search-box input[type=search] { width: 100%; padding-inline-start: 34px; }
.search-box svg { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--text-3); }
.content { padding: 24px; max-width: 1180px; width: 100%; margin: 0 auto; flex: 1; }
.bottom-nav { display: none; }
.offline-bar { background: var(--warn-soft); color: var(--text); text-align: center; font-size: 13px; padding: 6px; border-bottom: 1px solid var(--border); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
  .search-box { display: none; }
  .content { padding: 14px; padding-bottom: 96px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--text-3); padding: 4px 8px; position: relative; min-width: 56px; }
  .bottom-nav a.active { color: var(--brand); }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav .nav-badge { position: absolute; top: -2px; inset-inline-end: 6px; min-width: 18px; height: 18px; font-size: 10px; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 901px) { .show-mobile { display: none !important; } }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); padding: 8px 14px; cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.btn.primary:hover { background: var(--brand-strong); }
.btn.danger { color: var(--urgent); border-color: color-mix(in srgb, var(--urgent) 40%, transparent); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.icon { padding: 7px; }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .55; cursor: default; }
input[type=text], input[type=password], input[type=search], input[type=date], input:not([type]), select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-mid); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-mid) 20%, transparent); }
textarea { resize: vertical; min-height: 80px; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand-mid); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: var(--text-2); font-weight: 500; font-size: 14px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.err { color: var(--urgent); font-size: 13px; min-height: 1em; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.empty { text-align: center; color: var(--text-3); padding: 28px 12px; font-size: 14px; }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px; }
.stat b { display: block; font-size: 24px; color: var(--brand); }

/* hero */
.hero { background: #1C1887; color: #fff; border-radius: 18px; padding: 24px; display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; position: relative; overflow: hidden; }
:root[data-theme="dark"] .hero { background: #1E1B55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: #1E1B55; } }
.hero::after { content: ''; position: absolute; inset-inline-start: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(255,255,255,.07); }
.hero h1 { font-size: 26px; }
.hero .dates { color: #C9C7F2; font-size: 14px; margin-top: 4px; }
.hero .clock { font-size: 36px; font-weight: 700; letter-spacing: 1px; direction: ltr; position: relative; z-index: 1; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.quick button { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; text-align: start; box-shadow: var(--shadow); }
.quick button:hover { border-color: var(--brand-mid); }
.quick .qi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.quick .qi svg { width: 20px; height: 20px; }

/* tasks */
.task { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 8px; cursor: pointer; transition: border-color .15s; }
.task:hover { border-color: var(--border-strong); }
.task .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; display: grid; place-items: center; background: transparent; cursor: pointer; margin-top: 2px; padding: 0; }
.task .tick:hover { border-color: var(--brand-mid); }
.task.done .tick { background: var(--brand-mid); border-color: var(--brand-mid); color: #fff; }
.task.done .t-title { text-decoration: line-through; color: var(--text-3); }
.task .tick svg { width: 14px; height: 14px; }
.task .t-body { flex: 1; min-width: 0; }
.t-title { font-weight: 600; }
.t-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; color: var(--text-2); margin-top: 3px; align-items: center; }
.t-meta svg { width: 13px; height: 13px; vertical-align: -2px; }
.p-1 { border-inline-start: 4px solid var(--urgent); } .p-2 { border-inline-start: 4px solid var(--high); } .p-3 { border-inline-start: 4px solid var(--brand-mid); } .p-4 { border-inline-start: 4px solid var(--border-strong); }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill.urgent { background: var(--urgent-soft); color: var(--urgent); } .pill.high { background: var(--high-soft); color: var(--high); }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.brand { background: var(--brand-soft); color: var(--brand); } .pill.warn { background: var(--warn-soft); color: var(--high); }
.group-h { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 18px 0 8px; display: flex; gap: 8px; align-items: center; }
.group-h:first-child { margin-top: 0; }
.overdue { color: var(--urgent); }
.fab { position: fixed; inset-inline-end: 24px; bottom: 24px; width: 56px; height: 56px; border-radius: 18px; background: var(--brand); color: var(--brand-on); border: 0; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(28,24,135,.35); cursor: pointer; z-index: 25; }
.fab svg { width: 26px; height: 26px; }
@media (max-width: 900px) { .fab { bottom: calc(80px + env(safe-area-inset-bottom)); inset-inline-end: 16px; } }
.checklist-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.checklist-item input[type=text] { flex: 1; }
.suggest { position: absolute; z-index: 5; inset-inline: 0; top: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); margin-top: 4px; overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: start; padding: 8px 12px; border: 0; background: transparent; cursor: pointer; }
.suggest button:hover, .suggest button.hl { background: var(--brand-soft); }
.date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.comment { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.comment:first-child { border-top: 0; }

/* avatars */
.av { display: inline-grid; position: relative; flex: none; border-radius: 50%; }
.av svg { display: block; border-radius: 50%; }
.av .dot { position: absolute; bottom: 0; inset-inline-end: 0; width: 28%; height: 28%; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; max-height: 250px; overflow-y: auto; padding: 4px; }
.avatar-pick button { border: 2px solid transparent; border-radius: 50%; padding: 2px; background: transparent; cursor: pointer; }
.avatar-pick button.on { border-color: var(--brand-mid); }

/* chat */
.chat { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 61px); margin: -24px; }
.chat-list { border-left: 1px solid var(--border); background: var(--surface); overflow-y: auto; display: flex; flex-direction: column; }
.chat-list .head { padding: 14px; display: flex; gap: 8px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.conv { display: flex; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
.conv:hover { background: var(--surface-2); } .conv.active { background: var(--brand-soft); }
.conv .c-body { flex: 1; min-width: 0; }
.conv .c-name { font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.conv .c-last { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread { background: var(--brand-mid); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.group-ic { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.group-ic svg { width: 22px; height: 22px; }
.thread { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.thread-h { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.thread-h .who { flex: 1; min-width: 0; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: min(72%, 560px); padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); align-self: flex-end; position: relative; overflow-wrap: anywhere; }
.msg .m-text { white-space: pre-wrap; }
.msg.mine { align-self: flex-start; background: var(--brand); color: var(--brand-on); border-color: var(--brand); border-start-start-radius: 4px; }
.msg:not(.mine) { border-start-end-radius: 4px; }
.msg .m-sender { font-size: 12px; font-weight: 700; color: var(--brand-mid); margin-bottom: 2px; }
.msg .m-foot { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; opacity: .75; margin-top: 2px; direction: ltr; }
.msg .m-foot svg { width: 16px; height: 16px; }
.msg .ticks.read { color: #7EE2FF; opacity: 1; }
.msg:not(.mine) .ticks { display: none; }
.msg .m-reply { font-size: 12px; border-inline-start: 3px solid currentColor; padding: 2px 8px; margin-bottom: 4px; opacity: .85; border-radius: 4px; background: rgba(127,127,160,.12); cursor: pointer; }
.msg .m-actions { position: absolute; top: -12px; inset-inline-end: 6px; display: none; gap: 2px; }
.msg:hover .m-actions { display: flex; }
.msg .m-actions button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; display: grid; place-items: center; padding: 0; }
.msg .m-actions svg { width: 14px; height: 14px; }
.msg.pending { opacity: .7; }
.msg.flash { outline: 3px solid var(--brand-mid); }
.msg-file { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: rgba(127,127,160,.14); color: inherit; min-width: 200px; }
.msg-file .fi { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: #2B579A; flex: none; }
.msg-file.img { padding: 0; background: none; display: block; }
.msg-file.img img { max-width: 260px; max-height: 260px; border-radius: 10px; display: block; }
.msg-system { align-self: center; font-size: 12px; color: var(--text-2); background: var(--surface-2); padding: 4px 12px; border-radius: 999px; margin: 6px 0; }
.msg-task { align-self: center; width: min(420px, 92%); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin: 6px 0; box-shadow: var(--shadow); }
.msg-task .mt-h { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.msg-task .mt-h svg { width: 16px; height: 16px; color: var(--brand-mid); }
.day-sep { align-self: center; font-size: 12px; color: var(--text-3); margin: 10px 0 4px; }
.composer { background: var(--surface); border-top: 1px solid var(--border); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.composer .reply-bar { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); background: var(--surface-2); padding: 6px 10px; border-radius: 8px; margin-bottom: 8px; border-inline-start: 3px solid var(--brand-mid); }
.composer .reply-bar span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 140px; resize: none; border-radius: 20px; padding: 9px 16px; }
.composer .btn { border-radius: 50%; width: 42px; height: 42px; padding: 0; flex: none; }
.side-panel { width: 300px; border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; }
.thread-wrap { display: flex; min-width: 0; height: 100%; }
.thread-wrap .thread { flex: 1; }
@media (max-width: 900px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 57px - 70px - env(safe-area-inset-bottom)); margin: -14px; }
  .chat.has-thread .chat-list { display: none; }
  body.in-thread .topbar { display: none; }
  body.in-thread .content { padding: 0; }
  body.in-thread .chat { margin: 0; height: 100dvh; }
  body.in-thread .bottom-nav { display: none; }
  .chat:not(.has-thread) .thread-wrap { display: none; }
  .msg { max-width: 85%; }
  .msg .m-actions { display: flex; position: static; justify-content: flex-end; margin-top: 2px; }
  .side-panel { position: absolute; inset: 0; width: auto; z-index: 3; }
  .thread-wrap { position: relative; }
}

/* calendar */
.cal-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-h h2 { flex: 1; min-width: 160px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .wd { text-align: center; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 4px 0; }
.cal .day { min-height: 96px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; overflow: hidden; }
.cal .day:hover { border-color: var(--brand-mid); }
.cal .day.out { opacity: .4; }
.cal .day.today { border: 2px solid var(--brand-mid); }
.cal .day.fri .dn { color: var(--urgent); }
.cal .dn { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
.cal .dn small { font-weight: 400; color: var(--text-3); font-size: 11px; }
.cal .ev { font-size: 11px; background: var(--brand-soft); color: var(--brand); border-radius: 4px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.urgent { background: var(--urgent-soft); color: var(--urgent); } .cal .ev.done { text-decoration: line-through; opacity: .6; }
.cal .ev.content { background: var(--ok-soft); color: var(--ok); }
.cal .more { font-size: 11px; color: var(--text-3); }
@media (max-width: 700px) { .cal { gap: 3px; } .cal .day { min-height: 64px; padding: 4px; } .cal .ev { font-size: 0; height: 5px; padding: 0; } .cal .dn small { display: none; } }

/* tables, reports */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 8px; text-align: start; border-bottom: 1px solid var(--border); }
.tbl th { font-size: 12px; color: var(--text-2); font-weight: 600; }
.tbl-wrap { overflow-x: auto; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 16px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .bar { width: 100%; max-width: 38px; background: var(--brand-mid); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bars .bv { font-size: 12px; font-weight: 700; }
.bars .bl { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress > div { height: 100%; background: var(--brand-mid); border-radius: 999px; }

/* notes */
.notes { display: grid; grid-template-columns: 280px 1fr; gap: 16px; min-height: 60vh; }
.note-item { padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.note-item:hover { background: var(--surface-2); } .note-item.active { background: var(--brand-soft); border-color: var(--border); }
.note-editor input { font-size: 20px; font-weight: 700; border: 0; padding: 4px 0; background: transparent; }
.note-editor input:focus, .note-editor textarea:focus { box-shadow: none; }
.note-editor textarea { border: 0; padding: 4px 0; min-height: 50vh; background: transparent; line-height: 1.9; }
@media (max-width: 800px) { .notes { grid-template-columns: 1fr; } }

/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(10,9,30,.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 16px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: pop .18s; }
.modal.wide { width: min(760px, 100%); }
.modal-h { display: flex; align-items: center; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-h h2 { flex: 1; }
.modal-b { padding: 20px; }
.modal-f { padding: 12px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 600px) { .modal-bg { align-items: flex-end; padding: 0; } .modal { border-radius: 18px 18px 0 0; max-height: 92vh; } }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(10px); opacity: 0; } }
#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #16153A; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: pop .2s; pointer-events: auto; cursor: pointer; max-width: 90vw; }
.toast.error { background: var(--urgent); }
@media (max-width: 900px) { #toast-root { bottom: calc(90px + env(safe-area-inset-bottom)); } }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.auth .card { width: min(420px, 100%); padding: 28px; }
.auth .logo { width: 110px; height: 110px; object-fit: contain; display: block; margin: 0 auto 4px; }
.auth h1 { text-align: center; margin-bottom: 4px; }

/* notifications dropdown */
.notif-panel { position: absolute; top: 52px; inset-inline-end: 16px; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.18); z-index: 50; max-height: 70vh; overflow-y: auto; }
.notif { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 14px; }
.notif.unread-n { background: var(--brand-soft); }
.bell { position: relative; }
.bell .nav-badge { position: absolute; top: -4px; inset-inline-end: -4px; margin: 0; min-width: 18px; height: 18px; font-size: 10px; }

/* ---------- home dashboard ---------- */
body.on-home { background: #E9E8F8; }
body.on-home .topbar { background: color-mix(in srgb, #E9E8F8 88%, transparent); }
:root[data-theme="dark"] body.on-home, :root[data-theme="dark"] body.on-home .topbar { background: #0B0A1F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.on-home, :root:not([data-theme="light"]) body.on-home .topbar { background: #0B0A1F; } }
body.on-home .content { max-width: 1320px; }
.dash { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(280px, 330px); gap: 18px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dash-card { background: var(--surface); border-radius: 22px; padding: 18px; box-shadow: 0 1px 2px rgba(28,24,135,.05), 0 8px 28px rgba(28,24,135,.07); border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.dash-right .dash-panel { position: sticky; top: 80px; display: flex; flex-direction: column; min-height: calc(100vh - 120px); max-height: calc(100vh - 110px); padding: 14px; }
.dp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.dp-tabs button { border: 0; border-radius: 14px; padding: 10px; font-weight: 700; cursor: pointer; background: var(--surface-2); color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 6px; }
.dp-tabs button.on { background: var(--brand); color: var(--brand-on); }
.dp-tabs:has(> :only-child) { grid-template-columns: 1fr; }
.dp-body { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.dp-empty { height: 100%; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.dp-empty-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 6px; }
.dp-empty-ic svg { width: 30px; height: 30px; }
.dp-add { display: flex; gap: 8px; margin-top: 10px; }
.dp-add input { border-radius: 14px; background: var(--surface-2); border-color: transparent; padding: 10px 14px; }
.dp-add .btn { border-radius: 14px; width: 44px; flex: none; }
.dp-more { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 8px; }
.dp-more button { border: 0; background: none; color: var(--brand-mid); cursor: pointer; font-size: 12px; padding: 0; }
.dash-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; }
.dlink { position: relative; background: var(--surface); border-radius: 20px; padding: 16px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 13px; text-align: center; box-shadow: 0 1px 2px rgba(28,24,135,.05), 0 8px 24px rgba(28,24,135,.07); border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); cursor: pointer; transition: transform .15s, box-shadow .15s; font-family: inherit; }
.dlink:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(28,24,135,.14); }
.dl-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.dl-ic svg { width: 28px; height: 28px; }
.dlink-add .dl-ic { background: var(--surface-2); color: var(--text-2); border: 2px dashed var(--border-strong); }
.dl-edit { position: absolute; top: 6px; inset-inline-start: 6px; width: 26px; height: 26px; border-radius: 8px; border: 0; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; opacity: 0; cursor: pointer; padding: 0; }
.dl-edit svg { width: 14px; height: 14px; }
.dlink:hover .dl-edit, .dlink:focus-within .dl-edit { opacity: 1; }
@media (hover: none) { .dl-edit { opacity: .8; } }
.dash-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-quick button { flex: 1; min-width: 120px; border: 0; border-radius: 14px; padding: 12px; background: var(--surface); color: var(--brand); font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 1px 2px rgba(28,24,135,.05); }
.dash-quick button:hover { background: var(--brand-soft); }
.link-ic-pick { width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--text); }
.link-ic-pick.on { border-color: var(--brand-mid); background: var(--brand-soft); color: var(--brand); }
.color-pick { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; }
.color-pick.on { box-shadow: 0 0 0 2px var(--brand-mid); }
.clock-card { background: #1C1887; color: #fff; text-align: center; padding: 22px 18px; border: 0; position: relative; overflow: hidden; }
.clock-card::after { content: ''; position: absolute; inset-inline-end: -50px; top: -50px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(255,255,255,.07); }
:root[data-theme="dark"] .clock-card { background: #1E1B55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .clock-card { background: #1E1B55; } }
.cc-greet { font-size: 14px; color: #C9C7F2; }
.cc-time { font-size: 64px; font-weight: 900; line-height: 1.15; letter-spacing: 1px; direction: ltr; margin: 4px 0; }
.cc-day { font-size: 20px; font-weight: 800; }
.cc-sub { font-size: 12px; color: #C9C7F2; margin-top: 4px; }
.mini-cal { padding: 16px 14px 0; overflow: hidden; }
.mc-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mc-title { font-size: 20px; font-weight: 900; color: var(--brand); }
.mc-sub { font-size: 12px; color: var(--text-3); }
.mc-nav { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px 2px; justify-items: center; }
.mc-wd { font-size: 12px; color: var(--text-3); font-weight: 700; padding-bottom: 2px; }
.mc-day { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; position: relative; font-family: inherit; }
.mc-day:hover { background: var(--surface-2); }
.mc-day.fri { color: var(--urgent); background: var(--urgent-soft); }
.mc-day.today { background: var(--brand); color: var(--brand-on); }
.mc-day.busy::after { content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--brand-mid); }
.mc-day.today.busy::after { background: var(--brand-on); }
.mc-foot { display: flex; align-items: stretch; margin: 14px -14px 0; border-top: 1px solid var(--border); }
.mc-foot button { flex: 1; border: 0; background: var(--surface-2); padding: 12px 6px; font-weight: 700; color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit; }
.mc-foot button:hover { color: var(--brand); }
.mc-sep { width: 1px; background: var(--border); }
@media (max-width: 1150px) {
  .dash { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); }
  .dash-right { grid-column: 1; grid-row: 1 / span 2; }
  .dash-mid { grid-column: 1; }
  .dash-left { grid-column: 2; grid-row: 1 / span 2; }
  .dash-right .dash-panel { position: static; min-height: 0; max-height: none; }
  .dp-body { max-height: 420px; }
}
@media (max-width: 760px) {
  .dash { grid-template-columns: 1fr; }
  .dash-right, .dash-mid, .dash-left { grid-column: auto; grid-row: auto; }
  .dash-col { display: contents; }
  .clock-card { order: 1; } .dash-panel { order: 2; } .dash-links { order: 3; } .dash-quick { order: 4; } .mini-cal { order: 5; } .dash-mid > .dash-card { order: 6; }
  .cc-time { font-size: 54px; }
  .dash-links { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .dlink { padding: 12px 4px 10px; border-radius: 16px; font-size: 11px; }
  .dl-ic { width: 44px; height: 44px; border-radius: 14px; }
}

@media print {
  .sidebar, .topbar, .bottom-nav, .fab, .no-print { display: none !important; }
  .shell { display: block; } .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ccc; }
  body { background: #fff; color: #000; }
  .show-print { display: block !important; margin-bottom: 12px; }
}

:root[data-theme="dark"] .brand img, :root[data-theme="dark"] .auth .logo, :root[data-theme="dark"] .boot img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img, :root:not([data-theme="light"]) .auth .logo, :root:not([data-theme="light"]) .boot img { filter: brightness(0) invert(1); } }

/* ---------- date picker ---------- */
.dp-field { position: relative; display: flex; flex-direction: column; gap: 4px; }
.field-l { font-size: 13px; color: var(--text-2); font-weight: 500; }
.dp-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; text-align: start; font-family: inherit; color: var(--text); }
.dp-btn:hover { border-color: var(--brand-mid); }
.dp-btn > svg:first-child { width: 22px; height: 22px; color: var(--brand); flex: none; }
.dp-val { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.dp-chev { transform: rotate(90deg); color: var(--text-3); }
.dp-pop { position: absolute; top: calc(100% - 40px); inset-inline: 0; z-index: 30; max-width: 340px; background: var(--surface); border-radius: 18px; padding: 14px 14px 0; box-shadow: 0 18px 50px rgba(28,24,135,.25); border: 1px solid var(--border); overflow: hidden; animation: pop .15s; }
.dp-pop .mc-foot { margin: 12px -14px 0; }
.mc-day.today-ring { box-shadow: inset 0 0 0 2px var(--brand-mid); }

/* ---------- content repeat ---------- */
.rep-box { display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); border-radius: 14px; padding: 12px; }
.rep-sub { font-size: 14px; }
.num-in { width: 64px !important; display: inline-block; text-align: center; padding: 6px !important; margin: 0 4px; }
.wd-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-pick button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 800; cursor: pointer; font-family: inherit; color: var(--text); }
.wd-pick button.fri { color: var(--urgent); }
.wd-pick button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.rep-preview { font-size: 13px; color: var(--text-2); background: var(--surface); border-radius: 10px; padding: 8px 10px; border-inline-start: 3px solid var(--brand-mid); }
.rep-preview b { color: var(--brand); }

/* ---------- calendar page ---------- */
body.on-cal { background: #E9E8F8; }
body.on-cal .topbar { background: color-mix(in srgb, #E9E8F8 88%, transparent); }
:root[data-theme="dark"] body.on-cal, :root[data-theme="dark"] body.on-cal .topbar { background: #0B0A1F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.on-cal, :root:not([data-theme="light"]) body.on-cal .topbar { background: #0B0A1F; } }
body.on-cal .content { max-width: 1320px; }
.calx { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.calx-month { padding: 20px; }
.calx-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.calx-title h1 { font-size: 30px; font-weight: 900; color: var(--brand); line-height: 1.2; }
.calx-tools { display: flex; align-items: center; gap: 8px; }
.calx-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12px; color: var(--text-2); margin: 12px 0 10px; }
.calx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-task { background: var(--brand-mid); } .lg-urgent { background: var(--urgent); } .lg-content { background: var(--ok); }
.calx-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calx-wd { text-align: center; font-size: 13px; font-weight: 800; color: var(--text-2); padding: 4px 0; }
.calx-wd.fri { color: var(--urgent); }
.calx-day { min-height: 112px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); padding: 8px; display: flex; flex-direction: column; gap: 4px; text-align: start; cursor: pointer; font-family: inherit; color: var(--text); min-width: 0; transition: border-color .15s, box-shadow .15s, transform .1s; }
.calx-day:hover { border-color: var(--brand-mid); }
.calx-day.out { background: transparent; border-style: dashed; opacity: .5; }
.calx-day.fri { background: color-mix(in srgb, var(--urgent-soft) 55%, var(--surface)); }
.calx-day.sel { border: 2px solid var(--brand-mid); box-shadow: 0 6px 18px rgba(28,24,135,.15); }
.cd-n { display: flex; justify-content: space-between; align-items: center; }
.cd-main { font-size: 17px; font-weight: 800; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.calx-day.fri .cd-main { color: var(--urgent); }
.calx-day.today .cd-main { background: var(--brand); color: var(--brand-on); }
.cd-small { font-size: 11px; color: var(--text-3); }
.cd-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cd-evs .ev { font-size: 11px; font-weight: 600; background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-evs .ev.urgent { background: var(--urgent-soft); color: var(--urgent); }
.cd-evs .ev.content { background: var(--ok-soft); color: var(--ok); }
.cd-evs .ev.done { text-decoration: line-through; opacity: .55; }
.cd-evs .more { font-size: 11px; color: var(--text-3); }
.cd-dots { display: none; gap: 3px; justify-content: center; }
.cd-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-mid); }
.cd-dots i.u { background: var(--urgent); } .cd-dots i.c { background: var(--ok); }
.calx-agenda { position: sticky; top: 80px; display: flex; flex-direction: column; max-height: calc(100vh - 110px); padding: 0; overflow: hidden; }
.ag-h { background: #1C1887; color: #fff; padding: 20px; text-align: center; }
:root[data-theme="dark"] .ag-h { background: #1E1B55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ag-h { background: #1E1B55; } }
.ag-day { font-size: 14px; color: #C9C7F2; }
.ag-date { font-size: 26px; font-weight: 900; }
.ag-h .mc-sub { color: #C9C7F2; }
.ag-body { flex: 1; overflow-y: auto; padding: 4px 14px 10px; }
.ag-body .group-h { margin-top: 14px; }
.ag-body .group-h svg { color: var(--brand-mid); }
.ag-empty { padding: 4px 2px 6px; }
.ag-content { cursor: pointer; border-inline-start-color: var(--ok) !important; }
.ag-actions { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--border); }
.ag-actions .btn { flex: 1; border-radius: 12px; padding: 10px; }
@media (max-width: 1000px) {
  .calx { grid-template-columns: 1fr; }
  .calx-agenda { position: static; max-height: none; }
}
@media (max-width: 700px) {
  .calx-month { padding: 14px 10px; }
  .calx-title h1 { font-size: 24px; }
  .calx-h { justify-content: center; }
  .calx-grid { gap: 4px; }
  .calx-day { min-height: 58px; padding: 4px 2px; border-radius: 12px; align-items: center; }
  .cd-n { justify-content: center; }
  .cd-main { font-size: 15px; width: 30px; height: 30px; }
  .cd-small, .cd-evs { display: none; }
  .cd-dots { display: flex; }
}

/* floating mobile bottom bar */
@media (max-width: 900px) {
  .bottom-nav { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); border-radius: 22px; box-shadow: 0 10px 30px rgba(28,24,135,.16); padding: 6px 4px; }
  .bottom-nav a { border-radius: 14px; padding: 6px 8px; }
  .bottom-nav a.active { background: var(--brand-soft); }
  .content { padding-bottom: 110px; }
  .fab { bottom: calc(96px + env(safe-area-inset-bottom)); }
  #toast-root { bottom: calc(100px + env(safe-area-inset-bottom)); }
}
:root[data-theme="dark"] .nav-item.active { box-shadow: none; }

/* ---------- content steps & colors ---------- */
.step-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; align-items: center; }
.step-legend span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.step-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--sc); display: inline-block; }
.crow-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.crow { background: var(--surface); border: 1px solid var(--border); border-inline-start: 5px solid var(--cc); border-radius: 14px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s, border-color .15s; background-image: linear-gradient(to left, color-mix(in srgb, var(--cc) 7%, transparent), transparent 40%); }
.crow:hover { box-shadow: 0 6px 18px rgba(28,24,135,.1); }
.crow.pub { opacity: .7; }
.crow-h { display: flex; align-items: center; gap: 8px; }
.crow-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cc); flex: none; }
.crow-t { font-weight: 800; flex: 1; min-width: 0; }
.crow-prog { font-size: 12px; font-weight: 800; color: var(--cc); background: color-mix(in srgb, var(--cc) 14%, transparent); border-radius: 999px; padding: 1px 9px; }
.crow-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.step-chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px 3px 6px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--sc) 12%, var(--surface)); color: var(--sc); border: 1px solid color-mix(in srgb, var(--sc) 35%, transparent); cursor: pointer; font-family: inherit; }
.step-chip .sc-o { font-weight: 500; opacity: .8; }
.step-chip .sc-o::before { content: '· '; }
.step-chip .sc-box, .step-row .sc-box { width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--sc); display: inline-grid; place-items: center; flex: none; font-style: normal; background: var(--surface); }
.step-chip .sc-box svg, .step-row .sc-box svg { width: 11px; height: 11px; }
.step-chip.done { background: var(--sc); color: #fff; border-color: var(--sc); }
.step-chip.done .sc-box { background: #fff; color: var(--sc); border-color: #fff; }
.step-chip.done .sc-l { text-decoration: line-through; text-decoration-thickness: 1px; }
.steps-box { display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); border-radius: 14px; padding: 12px; }
.step-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 12px; padding: 8px 10px; border-inline-start: 4px solid var(--sc); }
.step-name { flex: 1; font-weight: 700; color: var(--sc); display: flex; align-items: center; gap: 6px; }
.step-done { display: inline-flex; cursor: pointer; }
.step-done input { position: absolute; opacity: 0; pointer-events: none; }
.step-row .sc-box svg { opacity: 0; color: #fff; }
.step-done input:checked + .sc-box { background: var(--sc); }
.step-done input:checked + .sc-box svg { opacity: 1; }
.step-done input:focus-visible + .sc-box { box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 35%, transparent); }
.mini-sel { width: auto !important; min-width: 130px; padding: 5px 8px !important; font-size: 13px; border-radius: 10px !important; }
.step-pill { background: color-mix(in srgb, var(--sc) 14%, transparent) !important; color: var(--sc) !important; }
.step-pill svg { width: 12px; height: 12px; }
.c-dot { display: inline-flex; align-items: center; gap: 4px; color: var(--cc); font-weight: 600; }
.cd-evs .ev.content { background: color-mix(in srgb, var(--cc) 16%, var(--surface)); color: var(--cc); border-inline-start: 3px solid var(--cc); }
.calx-agenda .crow { margin-bottom: 8px; }
.modal .crow { margin-bottom: 8px; }
@media (max-width: 600px) { .crow-list { grid-template-columns: 1fr; } .step-row { flex-wrap: wrap; } .mini-sel { min-width: 0; flex: 1; } }
