:root {
  --brand: #5850b5;
  --brand-dark: #4338a0;
  --brand-soft: #eeedff;
  --brand-line: #d9d7ff;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #161927;
  --muted: #74798d;
  --line: #e4e7ef;
  --green: #1f9f72;
  --green-soft: #e9f8f1;
  --blue: #2776d8;
  --blue-soft: #eaf2ff;
  --amber: #b7791f;
  --amber-soft: #fff4dc;
  --danger: #c0394a;
  --danger-soft: #fff0f2;
  --shadow: 0 18px 45px rgba(34, 37, 55, 0.08);
  --shadow-soft: 0 12px 28px rgba(34, 37, 55, 0.06);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --sidebar-width: 282px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(88, 80, 181, 0.07), transparent 28rem),
    linear-gradient(120deg, #f8f9fd 0%, #f1f4f9 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 8px 22px;
  color: var(--text);
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 54px;
  flex: 0 0 42px;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.brand-text strong {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-text small {
  color: #8581a8;
  font-size: 12px;
  font-weight: 700;
}

.nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  color: #4d5367;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: var(--brand);
  background: #f4f3ff;
}

.nav-link.active {
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-line);
}

.nav-link.active .nav-icon {
  background: var(--brand);
  box-shadow: 0 8px 16px rgba(88, 80, 181, 0.2);
}

.nav-link__text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.nav-link__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.nav-link__badge {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef1f7;
  color: #74798d;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.nav-link__badge--is-active {
  background: var(--amber-soft);
  color: var(--amber);
}

.nav-link__subtext {
  display: grid;
  gap: 1px;
  color: #8a91a3;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.nav-link__count {
  color: inherit;
  font-weight: 900;
}

.nav-link__count--brand.nav-link__count--is-active {
  color: var(--brand);
}

.nav-link__count--green.nav-link__count--is-active {
  color: var(--green);
}

.nav-link__count--blue.nav-link__count--is-active {
  color: var(--blue);
}

.nav-link__count--amber.nav-link__count--is-active {
  color: var(--amber);
}

.nav-link__count--red.nav-link__count--is-active {
  color: var(--danger);
}

.nav-divider {
  height: 1px;
  margin: 7px 12px;
  background: var(--line);
  opacity: 0.78;
}

.sidebar-footer {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.sidebar-account {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  margin-top: 8px;
  padding: 14px 10px 12px;
  border-top: 1px solid var(--line);
}

.sidebar-account__avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  font-size: 13px;
}

.sidebar-account__copy {
  min-width: 0;
}

.sidebar-account__copy strong,
.sidebar-account__copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account__copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.sidebar-account__copy span {
  display: -webkit-box;
  margin-top: 3px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
}

.nav-link--logout {
  color: #626879;
}

.nav-link--logout:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.nav-icon {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 10px;
  background: #eef1f7;
}

.nav-icon::before,
.nav-icon::after {
  position: absolute;
  content: "";
}

.nav-icon--today::before,
.nav-icon--calendar::before {
  inset: 6px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-icon--today::after,
.nav-icon--calendar::after {
  top: 10px;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-icon--tasks::before {
  top: 7px;
  left: 7px;
  width: 12px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-icon--tasks::after {
  top: 11px;
  left: 11px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.nav-icon--employees::before {
  top: 6px;
  left: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.nav-icon--employees::after {
  left: 7px;
  bottom: 6px;
  width: 12px;
  height: 7px;
  border-radius: 7px 7px 3px 3px;
  background: currentColor;
}

.nav-icon--reminders::before {
  top: 6px;
  left: 9px;
  width: 8px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 8px 8px 4px 4px;
}

.nav-icon--reminders::after {
  left: 11px;
  bottom: 5px;
  width: 4px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-icon--archive::before {
  top: 7px;
  left: 6px;
  width: 14px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-icon--archive::after {
  top: 11px;
  left: 10px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-icon--logout::before {
  top: 7px;
  left: 6px;
  width: 9px;
  height: 12px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 3px 0 0 3px;
}

.nav-icon--logout::after {
  top: 12px;
  right: 5px;
  width: 11px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 3px -3px 0 -1px currentColor, 3px 3px 0 -1px currentColor;
}

.main {
  min-width: 0;
}

.topbar {
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 58px;
  padding: 24px 34px 0;
}

.topbar-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.topbar-create-button {
  min-height: 42px;
  padding: 0 18px;
  white-space: nowrap;
}

.topbar-clock {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.topbar-clock strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.notification-stub {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.notification-stub__icon {
  width: 23px;
  height: 23px;
  color: #5f6678;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-stub__badge {
  position: absolute;
  top: 7px;
  right: 7px;
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.eyebrow,
.muted {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  min-height: 48px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.profile-copy {
  min-width: 0;
}

.profile strong,
.profile span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.content {
  display: grid;
  gap: 22px;
  padding: 28px 34px 48px;
}

.panel,
.table-card,
.stat-card,
.login-card,
.task-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel,
.task-board {
  padding: 22px;
}

.panel h2,
.section-head h2 {
  margin: 0;
  font-size: 20px;
}

.hint-text {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.panel.compact {
  padding: 14px;
}

.page-intro {
  display: grid;
  gap: 6px;
}

.page-intro h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}

.page-intro p:last-child {
  margin: 0;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stats-grid--today {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  padding: 18px;
}

.stat-card::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand);
  content: "";
}

.stat-card--blue::before {
  background: var(--blue);
}

.stat-card--red::before {
  background: var(--danger);
}

.stat-card--green::before {
  background: var(--green);
}

.stat-card--violet::before,
.stat-card--brand::before {
  background: var(--brand);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 14px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #4d5367;
  font-size: 13px;
  font-weight: 900;
}

.tab:hover,
.tab.active {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}

.tab__count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef1f7;
  color: #5f6678;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.tab.active .tab__count {
  background: var(--brand);
  color: #fff;
}

.task-page-tabs {
  margin-top: 0;
}

[data-live-scope="assigned"] .task-page-tabs {
  margin-top: 22px;
  margin-bottom: 16px;
}

[data-live-scope="assigned"] .task-page-filter {
  margin-bottom: 16px;
}

.visibility-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.visibility-filter > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.task-visibility-filter {
  margin-top: 0;
  margin-bottom: 12px;
}

.table-card {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #fbfaff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.table-sort::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.35;
}

.table-sort[data-sort-direction="asc"]::after {
  border-top: 0;
  border-bottom: 5px solid currentColor;
  opacity: 0.85;
}

.table-sort[data-sort-direction="desc"]::after {
  opacity: 0.85;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr td {
  transition: background 0.2s ease;
}

tbody tr:hover td {
  background: #fbfcff;
}

.task-row-color--purple td {
  background: #eeeaff;
}

.task-row-color--purple:hover td {
  background: #e8e3ff;
}

.task-row-color--blue td {
  background: #e8f2ff;
}

.task-row-color--blue:hover td {
  background: #deecff;
}

.task-row-color--cyan td {
  background: #e3f9ff;
}

.task-row-color--cyan:hover td {
  background: #d8f5ff;
}

.task-row-color--green td {
  background: #e8f7ed;
}

.task-row-color--green:hover td {
  background: #ddf2e5;
}

.task-row-color--orange td {
  background: #fff0dc;
}

.task-row-color--orange:hover td {
  background: #ffe8c7;
}

.task-row-color--pink td {
  background: #ffeaf4;
}

.task-row-color--pink:hover td {
  background: #ffe2ef;
}

.task-row-color--gray td {
  background: #f3f5f9;
}

.task-row-color--gray:hover td {
  background: #edf0f5;
}

.badge,
.priority,
.task-pill,
.more-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.notice-panel {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.notice-panel strong {
  font-size: 15px;
}

.notice-panel code {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
}

.notice-panel span {
  color: var(--muted);
  font-size: 13px;
}

.notice-panel--password {
  border-color: #d4eddc;
  background: var(--green-soft);
}

.status-completed {
  background: var(--green-soft);
  color: var(--green);
}

.status-cancelled,
.status-overdue,
.priority-urgent {
  background: var(--danger-soft);
  color: var(--danger);
}

.priority-high {
  background: var(--amber-soft);
  color: var(--amber);
}

.priority-normal {
  background: var(--brand-soft);
  color: var(--brand);
}

.status-in_work,
.status-accepted {
  background: var(--amber-soft);
  color: var(--amber);
}

.priority-low {
  background: #eef1f5;
  color: #697183;
}

.color-swatch {
  display: inline-block;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  min-width: 13px;
  margin-right: 6px;
  border: 1px solid rgba(34, 37, 55, 0.18);
  aspect-ratio: 1;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
  vertical-align: -1px;
}

.color-swatch--purple {
  background: #6f5fe6;
}

.color-swatch--blue {
  background: #5b8de8;
}

.color-swatch--cyan {
  background: #34adc0;
}

.color-swatch--green {
  background: #46b27a;
}

.color-swatch--orange {
  background: #e39a41;
}

.color-swatch--pink {
  background: #e376a6;
}

.color-swatch--gray {
  background: #8d96a6;
}

.color-swatch--empty {
  border: 1px solid var(--line);
  background: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid--schedule {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-grid--schedule .field--assignee {
  grid-column: 1 / -1;
}

.one-time-schedule-fields,
.form-grid--recurring {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.recurring-month-hint {
  grid-column: 1 / -1;
  margin: -2px 0 0;
}

.recurring-time-field {
  grid-column: 1 / span 1;
}

.recurring-time-actions {
  grid-column: 1 / -1;
  align-self: end;
}

.form-grid--recurring[data-recurring-mode="monthly"] .recurring-time-actions {
  grid-column: 1 / -1;
}

.form-grid--recurring[data-recurring-mode="daily"] .recurring-time-field,
.form-grid--recurring[data-recurring-mode="daily"] .recurring-time-actions {
  grid-column: auto;
}

.form-grid--recurring[data-recurring-mode="daily"] .recurring-time-actions {
  padding-top: 24px;
}

.choice-grid--task-type {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-choice-block--compact {
  gap: 8px;
}

.date-mode-field {
  grid-column: 1 / -1;
}

.date-mode-toggle {
  width: fit-content;
}

.date-mode-toggle label {
  margin: 0;
}

.date-mode-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.date-mode-toggle span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 0;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.date-mode-toggle input:checked + span {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 1px 0 rgba(31, 38, 51, 0.05);
}

.field-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.form-grid--employee-schedule {
  align-content: start;
}

.form-grid.one,
.form-stack,
.mini-form {
  display: grid;
  gap: 12px;
}

.span-2 {
  grid-column: span 2;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 18px;
}

.checkbox-field span {
  margin: 0;
  color: var(--text);
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field,
.filter-inline {
  display: grid;
  gap: 7px;
}

.filter-inline span,
.field span {
  margin: 0;
  color: #626879;
  font-size: 12px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input,
select {
  height: 44px;
  padding: 0 13px;
}

textarea {
  min-height: 104px;
  padding: 12px 13px;
  line-height: 1.45;
}

select {
  padding-right: 36px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8a90a3 50%),
    linear-gradient(135deg, #8a90a3 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 19px,
    calc(100% - 12px) 19px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(88, 80, 181, 0.12);
  outline: none;
}

textarea {
  resize: vertical;
}

.task-form-panel {
  display: grid;
  gap: 16px;
  width: min(100%, 1120px);
  margin: 0 auto;
}

.task-create-intro,
.task-create-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.task-create-intro {
  gap: 5px;
}

.task-create-intro h2 {
  font-size: 30px;
}

.task-form-panel--create {
  padding: 18px;
}

.task-form {
  display: grid;
  grid-template-columns: minmax(210px, 0.82fr) minmax(300px, 1.12fr) minmax(300px, 1.12fr);
  gap: 12px;
  align-items: stretch;
}

.task-form-section {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.task-form-section--description,
.task-form .form-actions {
  grid-column: 1 / -1;
}

.task-form-section__head h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

.task-form-section__head h3 span {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.task-form-panel--create .task-form {
  gap: 12px;
}

.task-form-section--description textarea {
  min-height: 118px;
}

.task-form-panel--create .form-actions {
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.task-form input,
.task-form select,
.task-form textarea {
  background: #fff;
}

.task-form input[type="date"],
.task-form input[type="time"] {
  height: 40px;
  min-height: 40px;
  padding: 0 11px;
  color: #4d5367;
  font-size: 13px;
}

.task-form input[type="date"]::-webkit-calendar-picker-indicator,
.task-form input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0.58;
  cursor: pointer;
}

.task-choice-block {
  display: grid;
  gap: 7px;
}

.task-choice-block > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.choice-grid {
  display: grid;
  gap: 7px;
}

.choice-grid--priority {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid--colors {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.choice-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #5c6275;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.choice-card > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  line-height: 1;
}

.priority-choice {
  height: 36px;
}

.choice-grid--colors .choice-card {
  min-height: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  font-weight: 800;
}

.choice-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.choice-card:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px var(--brand-line);
}

.priority-choice--urgent:has(input:checked) {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.priority-choice--high:has(input:checked) {
  border-color: #e6c47f;
  background: var(--amber-soft);
  color: var(--amber);
}

.color-choice {
  justify-content: flex-start;
  min-width: 0;
}

.color-choice span:last-child {
  min-width: 0;
  margin: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.form-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: var(--brand-line);
  background: #f8f7ff;
}

.button:disabled {
  opacity: 0.58;
  transform: none;
}

.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 24px rgba(88, 80, 181, 0.2);
}

.button.primary:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.button.subtle {
  background: #fff;
  color: var(--danger);
}

.button--compact {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}

.button--linkish {
  min-height: 32px;
  padding: 0 4px;
  border-color: transparent;
  background: transparent;
  color: var(--brand);
  box-shadow: none;
}

.button--linkish:hover {
  border-color: transparent;
  background: transparent;
  color: var(--brand-dark);
  box-shadow: none;
}

.recurring-rules {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.recurring-rules__head h3 {
  margin: 0;
  font-size: 16px;
}

.recurring-rules__empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.recurring-rules__list {
  display: grid;
  gap: 8px;
}

.recurring-rules__table {
  overflow-x: auto;
}

.recurring-rule-row td {
  vertical-align: middle;
}

.recurring-rule-row td:nth-child(2) {
  display: grid;
  gap: 3px;
}

.recurring-rule-row strong {
  overflow-wrap: anywhere;
}

.recurring-rule-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recurring-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.recurring-rule__main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recurring-rule__main strong {
  overflow-wrap: anywhere;
}

.recurring-rule__main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recurring-rule__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.recurring-rule__actions form {
  margin: 0;
}

.schedule-add-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.compact-reschedule__toggles {
  align-self: end;
}

.filters,
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.task-page-filter {
  margin-bottom: 14px;
}

.filters select,
.filters input {
  width: auto;
  min-width: 180px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions form {
  margin: 0;
}

.access-panel {
  display: grid;
  gap: 16px;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.access-section {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.access-section h3 {
  margin: 0;
  font-size: 17px;
}

.access-section .hint-text {
  margin: 0;
}

.flash {
  margin: 18px 34px 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 800;
}

.login-card .flash {
  margin: 0;
}

.flash-success {
  background: var(--green-soft);
  color: var(--green);
}

.flash-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state,
.empty-small {
  color: var(--muted);
  padding: 28px;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 18px;
}

.empty-state p {
  max-width: 380px;
  margin: 0;
  line-height: 1.5;
}

.empty-state__icon {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
}

.empty-state__icon::before {
  position: absolute;
  inset: 12px 13px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 3px;
  content: "";
}

.empty-state__icon::after {
  position: absolute;
  top: 14px;
  left: 15px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor;
  content: "";
}

.empty-small {
  padding: 10px 0;
  font-size: 13px;
}

.task-detail-nav {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 12px;
}

.task-back-link {
  background: #fff;
  color: #5f6678;
}

.task-back-link:hover {
  color: var(--brand-dark);
}

.task-layout,
.task-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  align-items: start;
  gap: 16px;
}

.task-detail-grid--discussion {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  margin-top: 16px;
}

.task-detail-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.task-detail-left-stack {
  display: grid;
  align-content: start;
  gap: 16px;
}

.task-detail-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.task-heading,
.task-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.task-detail-head--compact {
  align-items: center;
  gap: 14px;
}

.task-detail-title {
  min-width: 0;
}

.task-heading h2,
.task-detail-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.18;
}

.task-detail-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.task-side-stack {
  display: grid;
  align-content: start;
  gap: 12px;
}

.task-action-panel {
  display: grid;
  gap: 9px;
}

.task-action-panel--compact {
  padding: 16px;
}

.task-action-panel h2,
.task-history h2 {
  margin: 0 0 2px;
  font-size: 18px;
}

.task-action-group,
.form-stack--compact {
  display: grid;
  gap: 8px;
}

.task-primary-actions {
  display: grid;
  gap: 8px;
  width: 100%;
}

.task-inline-action-form {
  display: inline-flex;
}

.task-complete-form {
  display: grid;
  width: 100%;
}

.task-complete-form textarea {
  width: 100%;
  max-width: 100%;
}

.task-action-buttons-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  width: 100%;
}

.task-action-buttons-left,
.task-action-buttons-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.task-action-buttons-left {
  justify-content: flex-start;
}

.task-action-buttons-right {
  justify-content: flex-end;
  margin-left: auto;
}

.task-action-buttons-row .button {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 12px;
}

.task-action-panels {
  display: grid;
  gap: 8px;
  width: 100%;
}

.task-action-panel-row {
  width: 100%;
}

.action-row--compact {
  gap: 8px;
}

.task-panel-divider {
  height: 1px;
  background: var(--line);
}

.compact-reschedule {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.compact-reschedule--detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafaff;
}

.compact-reschedule label {
  display: grid;
  gap: 5px;
}

.compact-reschedule label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-reschedule input {
  height: 38px;
}

.compact-reschedule textarea,
.form-stack--compact textarea {
  min-height: 52px;
  padding: 10px 12px;
  font-size: 13px;
}

.compact-reschedule__reason,
.compact-reschedule__actions {
  grid-column: 1 / -1;
}

.compact-reschedule__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cancel-confirm-card {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffafa;
}

.cancel-confirm-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cancel-confirm-card__reason {
  display: grid;
  gap: 5px;
}

.cancel-confirm-card__reason span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cancel-confirm-card__reason textarea {
  min-height: 52px;
  padding: 10px 12px;
  font-size: 13px;
}

.description {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.task-detail-section {
  display: grid;
  gap: 7px;
}

.task-detail-section h3 {
  margin: 0;
  font-size: 14px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.meta-grid div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.meta-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.meta-grid strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.task-meta-grid__wide {
  grid-column: span 2;
}

.task-discussion {
  padding: 18px;
}

.task-discussion .section-head {
  margin-bottom: 10px;
}

.comment-form {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
}

.comment-form--thread {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.comment-form textarea {
  min-height: 76px;
  flex: 1;
  padding: 11px 12px;
  font-size: 13px;
}

.comment-form__actions {
  display: flex;
  justify-content: flex-start;
}

.comment-thread {
  display: grid;
  gap: 9px;
}

.comment-item {
  display: grid;
  gap: 7px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.comment-item header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.comment-item header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.comment-item p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline--compact {
  gap: 9px;
}

.timeline-item {
  padding: 2px 0 2px 10px;
  border-left: 3px solid var(--brand);
}

.timeline-item span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.timeline-item p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.calendar {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.calendar-screen {
  display: grid;
  gap: 18px;
}

.calendar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.calendar-top h2 {
  margin: 2px 0 6px;
  font-size: 34px;
  line-height: 1.1;
}

.calendar-top p:last-child {
  margin: 0;
  color: var(--muted);
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.calendar-period {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  text-align: left;
}

.calendar-period strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: capitalize;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.calendar.month,
.calendar.week {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-head,
.calendar-day,
.week-col {
  background: #fff;
}

.calendar-head {
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
}

.calendar-day {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 132px;
  padding: 10px;
  color: var(--text);
}

.calendar-month {
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9ecf3;
  box-shadow: var(--shadow);
}

.calendar-month .calendar-head {
  min-height: 42px;
  padding: 13px 10px;
  border: 0;
  border-radius: 0;
  background: #fbfcff;
  color: #8a91a3;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-month .calendar-day {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
  height: 150px;
  min-height: 0;
  max-height: 150px;
  padding: 9px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.calendar-month .calendar-day:hover {
  background: #fbfbff;
}

.calendar-month .calendar-day.is-today {
  background: #f7f5ff;
  box-shadow: inset 0 0 0 1px var(--brand-line);
}

.calendar-month .muted-day {
  background: #fafbfe;
  color: #9aa1b2;
  opacity: 1;
}

.calendar-month .day-number {
  font-size: 15px;
}

.calendar-month .day-task-count {
  top: 10px;
  right: 9px;
  max-width: calc(100% - 44px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-month .calendar-day__tasks {
  align-self: start;
  gap: 4px;
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
}

.calendar-month .calendar-task {
  min-height: 24px;
  max-height: 24px;
  padding: 4px 6px;
  gap: 2px 5px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.2;
}

.calendar-month .more-pill {
  min-height: 20px;
  padding: 3px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.calendar-month .calendar-task small {
  font-size: 10px;
}

.calendar-month .mini-status {
  max-width: 58px;
  padding: 2px 5px;
  font-size: 9px;
}

.calendar-month .priority-dot {
  width: 7px;
  height: 7px;
  margin-top: 3px;
}

.calendar-day.is-today {
  border-color: var(--brand-line);
  background: #fbfaff;
  box-shadow: inset 0 0 0 1px var(--brand-line), var(--shadow-soft);
}

.muted-day {
  background: #fbfaff;
  color: var(--muted);
  opacity: 0.72;
}

.day-number,
.week-title {
  font-weight: 800;
}

.day-number {
  font-size: 17px;
}

.day-task-count {
  position: absolute;
  top: 12px;
  right: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.calendar-day__tasks {
  display: grid;
  gap: 5px;
  margin-top: 4px;
}

.calendar-task {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 3px 6px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(34, 37, 55, 0.06);
  border-radius: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.calendar-task__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-task small {
  grid-column: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-status {
  overflow: hidden;
  max-width: 74px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #5f6678;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--brand);
}

.priority-dot--high {
  background: var(--amber);
}

.priority-dot--normal {
  background: var(--brand);
}

.priority-dot--low {
  background: #a5adbb;
}

.priority-dot--urgent {
  background: var(--danger);
}

.priority-ribbon {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--brand);
}

.priority-ribbon--low {
  background: #a5adbb;
}

.priority-ribbon--normal {
  background: var(--brand);
}

.priority-ribbon--high {
  background: var(--amber);
}

.priority-ribbon--urgent {
  background: var(--danger);
}

.task-color--purple {
  background: #f1efff;
}

.task-color--blue {
  background: #edf4ff;
}

.task-color--cyan {
  background: #eafbff;
}

.task-color--green {
  background: #edf9f2;
}

.task-color--orange {
  background: #fff4e6;
}

.task-color--pink {
  background: #fff0f7;
}

.task-color--gray {
  background: #f3f5f8;
}

.calendar-screen .task-color--purple {
  background: #e8e2ff;
}

.calendar-screen .task-color--blue {
  background: #dceaff;
}

.calendar-screen .task-color--cyan {
  background: #d7f7ff;
}

.calendar-screen .task-color--green {
  background: #ddf3e6;
}

.calendar-screen .task-color--orange {
  background: #ffe8c8;
}

.calendar-screen .task-color--pink {
  background: #ffe0ef;
}

.calendar-screen .task-color--gray {
  background: #e9edf3;
}

.is-overdue {
  box-shadow: inset 0 0 0 1px rgba(192, 57, 74, 0.26);
}

.overdue-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11px;
  font-weight: 900;
}

.task-pill,
.more-pill {
  display: block;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-col {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 390px;
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.week-col:last-child {
  border-right: 0;
}

.week-col.is-today {
  background: #f8f6ff;
  box-shadow: inset 0 0 0 1px var(--brand-line);
}

.week-task {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 8px 8px 12px;
  border: 1px solid rgba(34, 37, 55, 0.06);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
}

.week-task strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.week-task span {
  color: var(--muted);
  font-size: 11px;
}

.calendar-week {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.week-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  min-height: 54px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef0f5;
  color: var(--text);
}

.week-title__day {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.week-title__date {
  grid-column: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.week-title strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  max-width: 76px;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-task-list {
  display: grid;
  gap: 6px;
}

.week-task-group {
  display: grid;
  gap: 6px;
}

.week-task-group__title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.week-task__time {
  color: var(--brand) !important;
  font-size: 11px !important;
  font-weight: 900;
}

.week-task__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.week-task__meta > span:not(.mini-status):not(.overdue-badge) {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-view {
  display: grid;
  gap: 14px;
}

.day-task-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.day-task-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.day-task-group__head h3 {
  margin: 0;
  font-size: 16px;
}

.day-task-group__head span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.day-task-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 18px;
  border: 1px solid rgba(34, 37, 55, 0.06);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.day-task-card h4 {
  margin: 3px 0 7px;
  font-size: 16px;
}

.day-task-card__main p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 8px;
  color: #4f5668;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.day-task-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.day-task-card__badges,
.day-task-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f5fa;
}

.segmented a {
  min-height: 32px;
  padding: 7px 10px;
  color: #4d5367;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.segmented a.active {
  background: var(--brand);
  color: #fff;
}

.segmented--compact a {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.inline-details summary {
  cursor: pointer;
  color: var(--brand-dark);
  font-weight: 800;
}

.inline-details summary.button {
  list-style: none;
}

.inline-details summary.button::-webkit-details-marker {
  display: none;
}

.mini-form {
  min-width: 260px;
  margin-top: 12px;
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 16% 18%, rgba(88, 80, 181, 0.1), transparent 28rem),
    linear-gradient(120deg, #f8f9fd 0%, #eef2f8 100%);
}

.login-card {
  display: grid;
  gap: 0;
  width: min(100%, 430px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 70px rgba(34, 37, 55, 0.14);
  backdrop-filter: blur(18px);
}

.login-logo {
  display: grid;
  place-items: center;
  width: 82px;
  height: 112px;
  margin: 0 auto 22px;
}

.login-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-card h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  text-align: center;
}

.login-subtitle {
  margin: 7px 0 0;
  color: var(--brand);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.login-text {
  margin: 12px auto 26px;
  max-width: 340px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.login-form {
  display: grid;
  gap: 16px;
  text-align: left;
}

.field input {
  height: 48px;
  background: #fafbfe;
}

.login-card .button {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
}

.app-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: grid;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 16px 38px rgba(31, 38, 51, 0.18);
  font-size: 14px;
  font-weight: 800;
}

.app-toast a {
  color: var(--brand);
  font-weight: 900;
}

hr {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .stats-grid--today {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .task-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-form-section--options {
    grid-column: 1 / -1;
  }

  .calendar-toolbar {
    grid-template-columns: 1fr;
  }

  .calendar-period {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .app-shell,
  .task-layout,
  .task-detail-grid,
  .task-detail-grid--discussion {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-grid,
  .meta-grid,
  .calendar.week:not(.calendar-week) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-week {
    grid-template-columns: repeat(7, minmax(136px, 1fr));
    overflow-x: auto;
  }

  .calendar-month {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
    overflow-x: auto;
  }

  .day-task-card {
    grid-template-columns: 1fr;
  }

  .day-task-card__badges,
  .day-task-card__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .topbar,
  .section-head,
  .topbar-meta,
  .calendar-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-meta {
    width: 100%;
  }

  .topbar-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .topbar-clock {
    flex: 1 1 220px;
    text-align: left;
  }

  .content,
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .flash {
    margin-left: 18px;
    margin-right: 18px;
  }

  .form-grid,
  .one-time-schedule-fields,
  .form-grid--recurring,
  .access-grid,
  .task-form,
  .stats-grid,
  .stats-grid--today,
  .meta-grid,
  .calendar.month,
  .calendar.week:not(.calendar-week),
  .nav {
    grid-template-columns: 1fr;
  }

  .calendar-week {
    grid-template-columns: repeat(7, minmax(132px, 1fr));
  }

  .calendar-month {
    grid-template-columns: repeat(7, minmax(92px, 1fr));
  }

  .choice-grid--priority,
  .choice-grid--colors,
  .choice-grid--task-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recurring-rule {
    grid-template-columns: 1fr;
  }

  .recurring-rule__actions {
    justify-content: flex-start;
  }

  .span-2 {
    grid-column: span 1;
  }

  .section-actions {
    justify-content: flex-start;
  }

  .task-detail-head,
  .comment-item header,
  .comment-form,
  .compact-reschedule {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .task-primary-actions {
    grid-template-columns: 1fr;
  }

  .task-action-buttons-row,
  .task-action-buttons-left,
  .task-action-buttons-right {
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
  }

  .task-action-buttons-row {
    flex-direction: column;
  }

  .task-action-buttons-right {
    margin-left: 0;
  }

  .comment-item header span {
    white-space: normal;
  }

  table {
    min-width: 900px;
  }

  .table-card {
    overflow-x: auto;
  }

  .login-card {
    padding: 28px;
  }
}
