:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --ink: #17202a;
  --muted: #687481;
  --line: #e1e6ea;
  --nav: #172926;
  --nav-soft: #213a35;
  --accent: #e25836;
  --accent-dark: #bd3f22;
  --teal: #1f7569;
  --teal-soft: #e6f3f0;
  --yellow: #e9a51a;
  --yellow-soft: #fff5dc;
  --red: #bf3b42;
  --red-soft: #fff0f1;
  --blue: #3976b9;
  --blue-soft: #edf5ff;
  --shadow: 0 12px 34px rgba(28, 44, 40, 0.08);
  --radius: 18px;
}

[hidden] { display: none !important; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(380px, 1.1fr);
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 168, 145, .22), transparent 32%),
    linear-gradient(135deg, #101f2d 0 46%, #f3f6f8 46%);
  padding: clamp(28px, 6vw, 84px);
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
}

.auth-brand { color: #fff; max-width: 560px; }
.auth-brand .brand-mark.large {
  width: 64px;
  height: 64px;
  font-size: 22px;
  margin-bottom: 28px;
}
.auth-brand h1 { font-size: clamp(36px, 5vw, 64px); margin: 8px 0 18px; letter-spacing: -.04em; }
.auth-brand > p:not(.eyebrow) { color: #c8d4dc; font-size: 17px; line-height: 1.65; }
.auth-brand ul { display: grid; gap: 12px; padding: 18px 0 0; list-style: none; }
.auth-brand li::before { content: "✓"; color: #67d2b8; font-weight: 800; margin-right: 10px; }

.auth-card {
  width: min(100%, 520px);
  justify-self: center;
  background: #fff;
  border: 1px solid #dde5ea;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(16, 31, 45, .18);
  padding: clamp(24px, 4vw, 42px);
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: #eef2f4; margin-bottom: 30px; }
.auth-tabs button { border: 0; border-radius: 9px; padding: 11px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.auth-tabs button.active { background: #fff; color: var(--nav); box-shadow: 0 3px 12px rgba(16,31,45,.08); }
.auth-panel h2 { margin: 0 0 8px; font-size: 25px; }
.auth-panel > p, [data-registration-step] > p { color: var(--muted); line-height: 1.5; margin: 0 0 22px; }
.auth-card form { display: grid; gap: 16px; }
.auth-card label { display: grid; gap: 7px; font-weight: 700; font-size: 13px; color: var(--nav); }
.auth-card input { width: 100%; border: 1px solid #ccd7de; border-radius: 10px; padding: 12px 13px; font: inherit; }
.auth-card input:focus { outline: 3px solid rgba(23, 134, 113, .13); border-color: var(--teal); }
.auth-message, .auth-notice { margin-top: 18px; padding: 11px 13px; border-radius: 10px; background: #fff2d5; color: #7d5510; font-size: 13px; }
.auth-message:empty { display: none; }
.auth-message.error { background: #ffe8ea; color: #a12836; }
.auth-message.success, .auth-notice.dev-code { background: #e2f2ee; color: #176a5a; }

@media (max-width: 820px) {
  .auth-screen { grid-template-columns: 1fr; background: linear-gradient(180deg, #101f2d 0 34%, #f3f6f8 34%); padding: 28px 18px 48px; }
  .auth-brand { padding-bottom: 12px; }
  .auth-brand h1 { font-size: 38px; }
  .auth-brand ul { display: none; }
  .auth-card { border-radius: 18px; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 258px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 10%, rgba(75, 139, 123, .2), transparent 30%),
    var(--nav);
  color: #fff;
  padding: 22px 16px 16px;
  z-index: 20;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 19px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent);
  font-weight: 800;
  letter-spacing: .04em;
}

.brand strong { display: block; font-size: 16px; }
.brand span, .sidebar-footer span { display: block; color: #aebcb8; font-size: 12px; margin-top: 2px; }

.company-switcher {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  text-align: left;
}

.company-switcher strong { display: block; font-size: 13px; }
.company-switcher small { display: block; color: #9db0aa; margin-top: 2px; }
.chevron { color: #93a9a3; }

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d9e8e4;
  color: #1f5148;
  font-weight: 800;
}
.avatar.small { width: 34px; height: 34px; font-size: 11px; }

.nav { flex: 1; overflow-y: auto; margin: 16px 0; padding-right: 2px; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: #3b514c; border-radius: 4px; }

.nav-label {
  margin: 21px 10px 7px;
  color: #839791;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.nav-label:first-child { margin-top: 4px; }

.nav-item {
  width: 100%;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  margin: 2px 0;
  color: #c9d5d2;
  border: 0;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  transition: .18s ease;
}
.nav-item > span { color: #8fb3aa; font-size: 17px; text-align: center; }
.nav-item b {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  color: #cdd9d6;
  font-size: 10px;
  text-align: center;
}
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active {
  color: #fff;
  background: var(--nav-soft);
  box-shadow: inset 3px 0 var(--accent);
}
.nav-item.active > span { color: #f08a6e; }

.sidebar-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 4px 0;
}
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer .icon-btn { color: #aab9b5; }

.workspace { margin-left: 258px; min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 30px;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(215,222,225,.8);
  backdrop-filter: blur(14px);
}

.menu-btn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 22px;
}

.global-search {
  width: min(520px, 48vw);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f9fa;
}
.global-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.global-search span { color: #87929b; font-size: 18px; }
kbd { padding: 2px 7px; border: 1px solid #d8dddf; border-bottom-width: 2px; border-radius: 5px; color: #87929b; font-size: 10px; background: #fff; }

.top-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  position: relative;
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--ink);
}
.icon-btn:hover { background: rgba(0,0,0,.05); }
.notification-btn { border: 1px solid var(--line); }
.notification-btn b {
  position: absolute;
  right: -3px;
  top: -4px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 9px;
}

.primary-btn, .secondary-btn, .text-btn {
  border-radius: 11px;
  font-weight: 700;
  transition: .18s ease;
}
.primary-btn {
  padding: 10px 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(226,88,54,.2);
}
.primary-btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.secondary-btn {
  padding: 10px 15px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.secondary-btn:hover { border-color: #bfc9cd; background: #f8fafb; }
.secondary-btn.wide { width: 100%; }
.text-btn { padding: 6px; border: 0; color: var(--teal); background: transparent; }
.text-btn:hover { color: #124e46; }

.view { display: none; padding: 28px 30px 48px; }
.view.active { display: block; animation: fade-in .22s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}
.page-heading.compact { align-items: center; }
.page-heading h1 { margin: 2px 0 7px; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.035em; line-height: 1.1; }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); max-width: 720px; line-height: 1.5; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

.eyebrow { margin: 0 0 5px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow.danger { color: var(--red); }

.role-switch, .filter-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.role-switch button, .filter-tabs button {
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
}
.role-switch button.active, .filter-tabs button.active { color: var(--ink); background: #edf1f2; font-weight: 700; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metrics-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric {
  position: relative;
  overflow: hidden;
  min-height: 120px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.metric:after {
  content: "";
  position: absolute;
  width: 74px;
  height: 74px;
  right: -24px;
  top: -28px;
  border-radius: 50%;
  background: var(--metric-glow, #e7f2ef);
}
.metric-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-value { display: block; margin-top: 12px; font-size: 28px; font-weight: 800; letter-spacing: -.04em; }
.metric-note { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.metric-note.up { color: var(--teal); }
.metric-note.alert { color: var(--red); }

.dashboard-grid { display: grid; grid-template-columns: 1.3fr 1.3fr .9fr; gap: 16px; }
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 3px 14px rgba(24,39,35,.025);
  padding: 20px;
}
.panel.span-2 { grid-column: span 2; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.panel-head h2, .panel h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }

.risk-list { display: grid; gap: 3px; }
.risk-item {
  display: grid;
  grid-template-columns: 10px 1.6fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 3px;
  border-bottom: 1px solid #eef1f2;
}
.risk-item:last-child { border-bottom: 0; }
.risk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.risk-dot.high { background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.risk-title strong { display: block; font-size: 13px; }
.risk-title span, .risk-assignee, .risk-deadline span { color: var(--muted); font-size: 11px; }
.risk-deadline { text-align: right; }
.risk-deadline strong { display: block; }

.donut-wrap { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; }
.donut {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--percent, 75%), #e6eaec 0);
  position: relative;
}
.donut:after { content: ""; width: 84px; height: 84px; border-radius: 50%; background: #fff; position: absolute; }
.donut span { position: relative; z-index: 1; font-size: 21px; font-weight: 800; }
.legend { display: grid; gap: 11px; }
.legend-row { display: grid; grid-template-columns: auto 1fr auto; gap: 7px; align-items: center; color: var(--muted); }
.legend-row i { width: 8px; height: 8px; border-radius: 50%; }
.legend-row strong { color: var(--ink); }

.timeline { display: grid; gap: 4px; }
.timeline-row {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 11px 2px;
  border-bottom: 1px solid #eef1f2;
}
.timeline-row:last-child { border-bottom: 0; }
.date-chip { text-align: center; padding: 7px; border-radius: 9px; background: var(--panel-soft); }
.date-chip strong { display: block; font-size: 16px; }
.date-chip span { color: var(--muted); font-size: 10px; }
.timeline-copy strong { display: block; font-size: 13px; }
.timeline-copy span { color: var(--muted); font-size: 11px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2f3;
  color: #53616a;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.green { background: var(--teal-soft); color: var(--teal); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.yellow { background: var(--yellow-soft); color: #996300; }
.badge.blue { background: var(--blue-soft); color: var(--blue); }

.load-list { display: grid; gap: 15px; }
.load-row { display: grid; gap: 7px; }
.load-row-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.load-row-head span { color: var(--muted); }
.progress { height: 7px; overflow: hidden; border-radius: 8px; background: #edf0f1; }
.progress span { display: block; height: 100%; border-radius: 8px; background: var(--teal); }
.progress.warn span { background: var(--yellow); }
.progress.danger span { background: var(--red); }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.toolbar.standalone {
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.toolbar select, .month-picker, select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
}

.search-field {
  min-width: 260px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.search-field input { min-width: 0; border: 0; outline: 0; background: transparent; }
.search-field span { color: #87929b; }
.compact-search { min-width: 220px; }

.table-panel { padding: 0; overflow: hidden; }
.table-panel .toolbar { padding: 15px 17px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 11px 16px;
  background: #f7f9fa;
  color: #7b8790;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}
td { padding: 14px 16px; border-top: 1px solid #edf0f1; vertical-align: middle; }
tbody tr:hover { background: #fbfcfc; }
.company-cell { display: flex; gap: 10px; align-items: center; }
.company-cell .company-logo { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: var(--teal-soft); color: var(--teal); font-size: 11px; font-weight: 800; }
.company-cell strong, .company-cell span { display: block; }
.company-cell span, .subtext { margin-top: 3px; color: var(--muted); font-size: 11px; }
.money { font-weight: 800; white-space: nowrap; }
.row-actions { width: 56px; text-align: right; }
.row-menu {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.row-menu:hover, .row-menu[aria-expanded="true"] {
  border-color: var(--line);
  background: #f3f7f6;
  color: var(--ink);
}
.context-menu {
  position: fixed;
  z-index: 90;
  width: 260px;
  padding: 7px;
  border: 1px solid #dfe5e6;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(20, 39, 35, .18);
  animation: context-in .14s ease;
}
@keyframes context-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.context-menu button {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.context-menu button:hover, .context-menu button:focus-visible { background: #f1f7f5; outline: 0; }
.context-menu button > span { color: var(--teal); font-size: 17px; text-align: center; }
.context-menu button.danger strong, .context-menu button.danger > span { color: var(--red); }
.context-menu button.danger:hover, .context-menu button.danger:focus-visible { background: #fff1f2; }
.context-menu button.archive strong, .context-menu button.archive > span { color: #667579; }
.context-menu button.archive:hover, .context-menu button.archive:focus-visible { background: #f2f5f5; }
.context-menu button.restore strong, .context-menu button.restore > span { color: var(--teal); }
.context-menu strong, .context-menu small { display: block; }
.context-menu strong { font-size: 12px; }
.context-menu small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.context-menu-separator { height: 1px; margin: 5px 7px; background: #edf0f1; }
.archived-row { background: #fafbfb; color: #687679; }
.archived-row .company-logo { filter: grayscale(1); opacity: .72; }

.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #cfe4de;
  border-radius: 15px;
  background: #f2faf8;
}
.notice-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; }
.notice p { margin: 4px 0 0; color: var(--muted); }

.obligation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.obligation-card {
  position: relative;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.obligation-card:before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 16px 0 0 16px; background: var(--teal); }
.obligation-card h3 { margin: 8px 0 10px; font-size: 15px; }
.obligation-card p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.obligation-meta { display: flex; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid #edf0f1; }
.obligation-meta span { color: var(--muted); font-size: 10px; }

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 13px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.kanban-column { min-height: 520px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: #eef2f3; }
.kanban-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 3px 12px; }
.kanban-head strong { font-size: 12px; }
.kanban-head b { min-width: 23px; padding: 3px 7px; border-radius: 11px; background: #fff; font-size: 10px; text-align: center; }
.task-stack { display: grid; gap: 9px; }
.task-card {
  padding: 13px;
  border: 1px solid #e1e6e8;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(23,32,42,.04);
}
.task-card.critical { border-top: 3px solid var(--red); }
.task-card.high { border-top: 3px solid var(--yellow); }
.task-card h3 { margin: 8px 0 5px; font-size: 13px; line-height: 1.35; }
.task-client { color: var(--muted); font-size: 11px; }
.task-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eef1f2; color: var(--muted); font-size: 10px; }
.task-card select { width: 100%; margin-top: 10px; padding: 7px; font-size: 10px; }

.month-picker { display: inline-flex; align-items: center; gap: 11px; }
.month-picker button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 18px; }
.month-picker strong { min-width: 116px; text-align: center; }
.calendar-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.calendar-today { min-height: 34px; }
.calendar-view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: #eef2f3; }
.calendar-view-switch button { padding: 7px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.calendar-view-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(23,32,42,.08); }
.calendar-filter-panel { margin-bottom: 14px; padding: 14px 16px; }
.calendar-filters { display: grid; grid-template-columns: repeat(3, minmax(130px, .8fr)) minmax(220px, 1.4fr) auto; gap: 12px; align-items: end; }
.calendar-filters label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.calendar-filters select, .calendar-filters input { width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.calendar-reset { min-height: 36px; }
.calendar-metrics { margin-bottom: 14px; }
.calendar-board { padding: 0; overflow: hidden; }
.calendar-weekdays, .calendar-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { border-bottom: 1px solid var(--line); background: #f8faf9; }
.calendar-weekdays span { padding: 10px; color: var(--muted); font-size: 10px; font-weight: 800; text-align: center; }
.calendar-day { position: relative; min-height: 106px; padding: 9px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:hover, .calendar-day.has-events:hover { background: #f1f8f6; }
.calendar-day.outside { background: #fafbfb; color: #b2bbbd; }
.calendar-day.today .calendar-day-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--teal); color: #fff; }
.calendar-day.selected { box-shadow: inset 0 0 0 2px var(--teal); }
.calendar-day-number { font-size: 12px; font-weight: 800; }
.calendar-day-events { display: grid; gap: 4px; margin-top: 10px; }
.calendar-count { display: block; width: fit-content; max-width: 100%; padding: 3px 6px; border-radius: 6px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.calendar-count.reporting { background: #e9f1ff; color: #3a69a6; }
.calendar-count.payment { background: #fff3d8; color: #8b661a; }
.calendar-count.notification { background: #e6f4ef; color: #23745e; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 16px; color: var(--muted); font-size: 10px; }
.calendar-legend span { display: flex; align-items: center; gap: 6px; }
.calendar-dot { width: 8px; height: 8px; border-radius: 50%; }
.calendar-dot.reporting { background: #6997d7; }
.calendar-dot.payment { background: #e2ad3b; }
.calendar-dot.notification { background: var(--teal); }
.calendar-list-panel { padding: 0; overflow: hidden; }
.calendar-list-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.calendar-list-head h2 { margin: 0; font-size: 16px; }
.calendar-list-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.calendar-list { display: grid; }
.calendar-event-card { border-bottom: 1px solid var(--line); background: #fff; }
.calendar-event-card:last-child { border-bottom: 0; }
.calendar-event-card summary { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 18px; gap: 14px; align-items: center; padding: 15px 18px; cursor: pointer; list-style: none; }
.calendar-event-card summary::-webkit-details-marker { display: none; }
.calendar-event-card[open] summary { background: #fafcfc; }
.calendar-event-date { display: grid; justify-items: center; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.calendar-event-date strong { color: var(--ink); font-size: 23px; line-height: 1; }
.calendar-event-main { display: grid; gap: 5px; min-width: 0; }
.calendar-event-main > strong { font-size: 12px; line-height: 1.4; }
.calendar-event-main > span:last-child { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.calendar-event-title-row b { font-size: 13px; }
.calendar-type { padding: 3px 7px; border-radius: 7px; font-size: 9px; font-style: normal; font-weight: 800; }
.calendar-type.reporting { background: #e9f1ff; color: #3a69a6; }
.calendar-type.payment { background: #fff3d8; color: #8b661a; }
.calendar-type.notification { background: #e6f4ef; color: #23745e; }
.calendar-event-deadline { color: var(--muted); font-size: 10px; }
.calendar-expand { color: var(--muted); transition: transform .2s; }
.calendar-event-card[open] .calendar-expand { transform: rotate(180deg); }
.calendar-event-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: end; padding: 14px 18px 17px 96px; background: #fafcfc; }
.calendar-event-details div { display: grid; gap: 4px; }
.calendar-event-details span { color: var(--muted); font-size: 9px; }
.calendar-event-details strong { font-size: 10px; line-height: 1.35; }

.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.template-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 12px 14px; }
.template-toolbar label { display: grid; gap: 5px; min-width: 220px; color: var(--muted); font-size: 9px; font-weight: 700; }
.template-toolbar select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.template-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.template-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.template-card h3 { margin: 10px 0 12px; font-size: 15px; }
.template-card ol { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.85; font-size: 11px; }
.template-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.template-categories button {
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  background: transparent;
  color: #3f4d53;
  font-weight: 700;
  cursor: pointer;
}
.template-categories button.active { background: #2764e7; color: #fff; }
.library-card { padding: 24px; }
.library-card h3 { min-height: 42px; margin: 14px 0 16px; font-size: 18px; }
.copy-icon {
  border: 0;
  background: transparent;
  color: #4c5ee9;
  font-size: 20px;
  cursor: pointer;
}
.template-facts { display: grid; gap: 10px; margin: 0 0 18px; }
.template-facts div { display: flex; justify-content: space-between; gap: 16px; }
.template-facts dt { color: var(--muted); }
.template-facts dd { margin: 0; color: #243237; font-weight: 750; text-align: right; }
.template-preview-list { display: grid; gap: 9px; max-height: 58vh; overflow: auto; padding-right: 6px; }
.template-preview-list label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  line-height: 1.45;
}
.template-preview-list input { margin-top: 3px; }
.template-footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf0f1; color: var(--muted); font-size: 10px; }
.template-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 13px; }
.checklist-card ol { padding: 0; list-style: none; }
.checklist-card li { display: flex; gap: 8px; }
.checklist-card li span { color: var(--teal); font-weight: 900; }

.tariff-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .8fr); gap: 16px; }
.tariff-scenarios { display: grid; align-content: start; gap: 10px; }
.tariff-scenarios h2 { margin: 0 0 4px; font-size: 16px; }
.tariff-scenarios button {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbfa;
  color: var(--ink);
  text-align: left;
}
.tariff-scenarios button:hover { border-color: var(--teal); background: #f0f8f5; }
.tariff-scenarios button strong { font-size: 12px; }
.tariff-scenarios button span { color: var(--muted); font-size: 10px; }
.admin-grid, .support-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-form { display: grid; gap: 13px; }
.settings-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.settings-form input, .settings-form select, .settings-form textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.notification-matrix th:not(:first-child), .notification-matrix td:not(:first-child) { width: 120px; text-align: center; }
.notification-matrix input { width: 17px; height: 17px; accent-color: var(--teal); }
.support-ticket-list { display: grid; gap: 10px; max-height: 560px; overflow-y: auto; }
.support-ticket { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; }
.support-ticket > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.support-ticket p { margin: 9px 0; color: var(--ink); font-size: 11px; line-height: 1.5; }
.support-ticket > span { color: var(--muted); font-size: 9px; }

.communication-panel { padding: 0; overflow: hidden; }
.communication-toolbar { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.communication-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 590px; }
.conversation-sidebar { border-right: 1px solid var(--line); background: #fbfcfc; }
.channel-status { display: grid; gap: 6px; padding: 12px 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.channel-status span { display: flex; align-items: center; gap: 7px; }
.channel-dot { width: 7px; height: 7px; border-radius: 50%; background: #c4ccce; }
.channel-dot.online { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.conversation-list { display: grid; align-content: start; max-height: 620px; overflow-y: auto; }
.conversation-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid #edf0f1;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.conversation-item:hover, .conversation-item.active { background: #eef7f4; }
.channel-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: #e8f1ef; color: var(--teal); font-weight: 900; }
.conversation-copy { min-width: 0; }
.conversation-copy strong, .conversation-copy small, .conversation-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-copy strong { font-size: 12px; }
.conversation-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.conversation-copy span { margin-top: 6px; color: #738084; font-size: 10px; }
.conversation-side { display: grid; justify-items: end; align-content: space-between; gap: 7px; color: var(--muted); font-size: 9px; }
.conversation-side b { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; border-radius: 9px; background: var(--teal); color: #fff; }
.conversation-detail { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; background: #fff; }
.conversation-detail > .empty-state { align-self: center; }
.conversation-head { display: flex; justify-content: space-between; gap: 16px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.conversation-head h2 { margin: 0; font-size: 17px; }
.conversation-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.conversation-title-row, .conversation-actions { display: flex; align-items: center; gap: 8px; }
.conversation-actions { align-self: center; flex-wrap: wrap; justify-content: flex-end; }
.message-thread { display: flex; flex-direction: column; gap: 11px; min-height: 360px; max-height: 480px; padding: 20px; overflow-y: auto; background: #f7f9f8; }
.message { width: fit-content; max-width: min(72%, 620px); padding: 11px 13px; border: 1px solid #e2e8e6; border-radius: 4px 14px 14px; background: #fff; box-shadow: 0 4px 14px rgba(25,45,40,.04); }
.message.outgoing { align-self: flex-end; border-color: #cde4dd; border-radius: 14px 4px 14px 14px; background: var(--teal-soft); }
.message.system { align-self: center; max-width: 85%; border-style: dashed; background: #fff; text-align: center; }
.message span { color: var(--muted); font-size: 9px; }
.message p { margin: 5px 0 0; line-height: 1.5; font-size: 11px; }
.message-composer { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: end; padding: 14px; border-top: 1px solid var(--line); }
.message-composer textarea { width: 100%; resize: vertical; min-height: 42px; padding: 10px 11px; border: 1px solid #d9e0e3; border-radius: 10px; outline: 0; }
.message-composer textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.compact-notice { align-self: end; margin: 14px; }

.service-layout { display: grid; grid-template-columns: 1.45fr .75fr; gap: 16px; }
.service-layout.single { grid-template-columns: 1fr; }
.service-list { display: grid; gap: 3px; }
.service-row { display: grid; grid-template-columns: 1fr 120px 100px; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid #edf0f1; }
.service-row:last-child { border-bottom: 0; }
.service-row strong, .service-row span { display: block; }
.service-row small { color: var(--muted); }
.tariff-card { background: linear-gradient(155deg, #17322d, #245148); color: #fff; }
.tariff-card .eyebrow { color: #91c8ba; }
.tariff-card p, .tariff-card li { color: #c4d6d1; }
.tariff-card ul { padding-left: 20px; line-height: 2; }
.tariff-card .secondary-btn { color: #fff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); }
.tariff-price { margin: 22px 0; font-size: 31px; font-weight: 800; }
.tariff-price span { font-size: 12px; font-weight: 400; color: #a9c1bb; }

.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.team-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.team-card.inactive { opacity: .72; background: #f8faf9; }
.team-person { display: flex; gap: 11px; align-items: center; }
.team-person > div { min-width: 0; flex: 1; }
.team-edit { margin-left: auto; flex: 0 0 auto; }
.team-person strong, .team-person span { display: block; }
.team-person span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.employee-contact { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 22px; margin-top: 12px; color: var(--muted); font-size: 9px; }
.employee-card-actions { display: flex; justify-content: flex-end; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.danger-link { padding: 5px 0; border: 0; background: transparent; color: var(--red); font-size: 10px; font-weight: 800; cursor: pointer; }
.danger-link:hover { text-decoration: underline; }
.team-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0; }
.replacement-note {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
}
.team-kpis div { padding: 10px; border-radius: 10px; background: #f6f8f9; text-align: center; }
.team-kpis strong, .team-kpis span { display: block; }
.team-kpis span { color: var(--muted); font-size: 9px; margin-top: 3px; }

.integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.integration-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.integration-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-weight: 900; }
.integration-card h3 { margin: 14px 0 6px; }
.integration-card p { min-height: 42px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.integration-footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid #edf0f1; }
.integration-footer span { color: var(--muted); font-size: 10px; }
.integration-actions { display: flex; gap: 8px; margin-top: 14px; }
.integration-actions button { flex: 1; }
.integration-card .integration-hint { min-height: 0; margin: 10px 0 0; font-size: 10px; }
.telegram-integration { border-color: #b7d9f8; box-shadow: 0 8px 24px rgba(42, 139, 211, .08); }
.delivery-status { display: block; margin-top: 6px; font-size: 9px; }
.delivery-status.sent { color: var(--green); }
.delivery-status.queued { color: #9a6500; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(12,24,21,.58);
  backdrop-filter: blur(4px);
}
.modal-backdrop.open { display: grid; }
.modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0,0,0,.25);
  animation: modal-in .2s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 18px; }
.modal-head h2 { margin: 0; font-size: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid label { display: grid; gap: 6px; color: #4d5961; font-size: 11px; font-weight: 700; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #d9e0e3;
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: #fff;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.check-row { grid-template-columns: auto 1fr !important; align-items: center; justify-content: start; }
.check-row input { width: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.client-card-modal { width: min(820px, 100%); }
.client-form-tabs {
  display: flex;
  gap: 6px;
  margin: -4px 0 18px;
  padding: 4px;
  border-radius: 12px;
  background: #f2f6f6;
}
.client-form-tabs button {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #66757c;
  font-weight: 750;
  cursor: pointer;
}
.client-form-tabs button.active {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 2px 8px rgba(22, 49, 54, .08);
}
.form-section-title {
  margin: 20px 0 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: #263b40;
  font-size: 13px;
}
[data-client-form-panel][hidden],
[data-client-field][hidden] { display: none !important; }
.view-mode input:disabled, .view-mode select:disabled, .view-mode textarea:disabled {
  opacity: 1;
  border-color: #edf0f1;
  color: var(--ink);
  background: #f8faf9;
  -webkit-text-fill-color: var(--ink);
}
.confirm-modal { width: min(430px, 100%); text-align: center; }
.confirm-modal h2 { margin: 12px 0 7px; font-size: 22px; }
.confirm-modal > p { margin: 0; color: var(--muted); line-height: 1.55; }
.confirm-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: #fff0f1;
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}
.delete-client-preview {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid #eceff0;
  border-radius: 12px;
  background: #f8faf9;
  text-align: left;
}
.delete-client-preview span { color: var(--muted); font-size: 11px; }
.danger-btn {
  padding: 10px 15px;
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.danger-btn:hover { filter: brightness(.94); }
.danger-btn:disabled { opacity: .6; cursor: wait; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: 360px;
  padding: 13px 16px;
  border-radius: 12px;
  background: #172926;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

.empty-state { padding: 38px; color: var(--muted); text-align: center; }
.hidden { display: none !important; }

@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .panel.span-2 { grid-column: span 1; }
  .obligation-grid, .template-grid, .team-grid, .integration-grid { grid-template-columns: repeat(2, 1fr); }
  .service-layout { grid-template-columns: 1fr; }
  .tariff-workspace, .admin-grid, .support-layout { grid-template-columns: 1fr; }
  .communication-layout { grid-template-columns: 290px minmax(0, 1fr); }
}

@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 40px rgba(0,0,0,.24); }
  .sidebar.open { transform: translateX(0); }
  .workspace { margin-left: 0; }
  .menu-btn { display: block; }
  .global-search { width: 100%; }
  .topbar { padding: 0 18px; }
  .view { padding: 24px 18px 40px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .metrics-grid, .metrics-grid.four { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .obligation-grid, .template-grid, .team-grid, .integration-grid { grid-template-columns: 1fr; }
  .communication-layout { grid-template-columns: 1fr; }
  .conversation-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .conversation-list { max-height: 320px; }
  .conversation-detail { min-height: 520px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; min-width: 0; }
  .calendar-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-reset { width: 100%; }
  .calendar-day { min-height: 88px; }
  .calendar-event-details { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 18px; }
}

@media (max-width: 560px) {
  .top-actions .primary-btn, .global-search kbd { display: none; }
  .metrics-grid, .metrics-grid.four { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 104px; padding: 14px; }
  .metric-value { font-size: 23px; }
  .role-switch { width: 100%; overflow-x: auto; }
  .risk-item { grid-template-columns: 9px 1fr auto; }
  .risk-assignee { display: none; }
  .donut-wrap { grid-template-columns: 110px 1fr; }
  .donut { width: 104px; height: 104px; }
  .donut:after { width: 68px; height: 68px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .filter-tabs { width: 100%; overflow-x: auto; }
  .template-toolbar { align-items: stretch; flex-direction: column; }
  .template-toolbar label { min-width: 0; }
  .calendar-heading-actions { justify-content: flex-start; }
  .calendar-filters { grid-template-columns: 1fr; }
  .calendar-weekdays span { padding: 8px 2px; }
  .calendar-day { min-height: 62px; padding: 6px; }
  .calendar-count { min-width: 18px; padding: 2px 4px; overflow: hidden; font-size: 0; }
  .calendar-count::first-letter { font-size: 9px; }
  .calendar-event-card summary { grid-template-columns: 44px minmax(0, 1fr) 14px; gap: 9px; padding: 13px 12px; }
  .calendar-event-deadline { display: none; }
  .calendar-event-details { grid-template-columns: 1fr; padding: 12px; }
  .notification-matrix th:not(:first-child), .notification-matrix td:not(:first-child) { width: auto; }
}
