:root {
  --bg-base: #edf4ff;
  --bg-alt: #dfeafd;
  --bg-deep: #102138;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.84);
  --surface-muted: rgba(244, 248, 255, 0.62);
  --border: rgba(120, 145, 182, 0.28);
  --border-strong: rgba(70, 104, 152, 0.28);
  --text-main: #16263b;
  --text-soft: #5d6d84;
  --text-faint: #7a889c;
  --accent: #1e63f0;
  --accent-strong: #1449b0;
  --accent-soft: rgba(30, 99, 240, 0.12);
  --good: #1c8a58;
  --good-soft: rgba(28, 138, 88, 0.14);
  --warn: #b87312;
  --warn-soft: rgba(184, 115, 18, 0.14);
  --danger: #c23a58;
  --danger-soft: rgba(194, 58, 88, 0.14);
  --shadow-lg: 0 28px 70px rgba(46, 70, 109, 0.18);
  --shadow-md: 0 18px 42px rgba(55, 82, 127, 0.14);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Onest", "Golos Text", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 32%),
    linear-gradient(135deg, var(--bg-base), var(--bg-alt));
}

body {
  position: relative;
  padding: 18px;
}

body.drawer-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.ambient-bg,
.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient-bg {
  background:
    radial-gradient(circle at 9% 18%, rgba(101, 160, 255, 0.24), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(74, 129, 255, 0.19), transparent 30%),
    radial-gradient(circle at 53% 88%, rgba(134, 207, 180, 0.2), transparent 26%);
}

.ambient-grid {
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(112, 133, 173, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 133, 173, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 82%);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 36px);
}

.glass {
  background: linear-gradient(155deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px) saturate(145%);
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  min-height: calc(100vh - 36px);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, #2f6af4, #70a4ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-block h2,
.topbar h1,
.card-head h3,
.calendar-head h3,
.modal h3,
.drawer-head h2 {
  margin: 0;
  font-family: "Golos Text", sans-serif;
}

.brand-block h2 {
  font-size: 20px;
}

.brand-block p,
.topbar p,
.card-head p,
.drawer-head p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45;
}

.search-field {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.search-field input,
select,
input[type="text"],
input[type="date"] {
  width: 100%;
  border: 1px solid rgba(124, 149, 187, 0.34);
  background: rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.search-field input::placeholder {
  color: var(--text-faint);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(30, 99, 240, 0.22);
  outline-offset: 2px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.34);
  color: #2b3950;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(30, 99, 240, 0.09);
  border-color: rgba(30, 99, 240, 0.15);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(30, 99, 240, 0.16), rgba(30, 99, 240, 0.08));
  color: var(--accent-strong);
  border-color: rgba(30, 99, 240, 0.24);
}

.sidebar-footnote {
  margin-top: auto;
  border-top: 1px solid rgba(116, 142, 181, 0.22);
  padding-top: 16px;
}

.sidebar-footnote p {
  margin: 0 0 4px;
  color: var(--text-soft);
  font-size: 13px;
}

.sidebar-footnote strong {
  color: #24416f;
  font-weight: 600;
  line-height: 1.4;
}

.main-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.topbar {
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.topbar h1 {
  font-size: 28px;
  margin-top: 4px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4f6690;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-actions,
.toolbar-actions,
.modal-actions,
.quick-actions,
.relation-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn,
.icon-btn,
.quick-action,
.filter-chip,
.link-chip,
.status-link,
.row-link,
.day-task,
.entity-card,
.detail-list-item {
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.btn {
  border-radius: 14px;
  padding: 11px 15px;
  cursor: pointer;
  font-weight: 600;
}

.btn.small {
  padding: 8px 12px;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #4d87ff);
  box-shadow: 0 14px 24px rgba(30, 99, 240, 0.24);
}

.btn.secondary,
.btn.tertiary,
.quick-action,
.icon-btn {
  color: #24416b;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(122, 147, 184, 0.3);
}

.btn.tertiary {
  background: rgba(243, 247, 255, 0.86);
}

.btn:hover,
.quick-action:hover,
.filter-chip:hover,
.link-chip:hover,
.status-link:hover,
.row-link:hover,
.entity-card:hover,
.detail-list-item:hover,
.icon-btn:hover,
.day-task:hover {
  transform: translateY(-1px);
}

.view {
  display: none;
  gap: 14px;
}

.view.active {
  display: grid;
}

.view.active > * {
  animation: rise-in 0.38s ease both;
}

.view.active > *:nth-child(2) {
  animation-delay: 0.03s;
}

.view.active > *:nth-child(3) {
  animation-delay: 0.06s;
}

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

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

.metric-card {
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  gap: 6px;
}

.metric-card h4 {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.metric-card strong {
  font-size: 32px;
  line-height: 1;
}

.metric-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

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

.card {
  border-radius: var(--radius-lg);
  padding: 18px;
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-head h3 {
  font-size: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #385680;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(30, 99, 240, 0.18);
  background: rgba(30, 99, 240, 0.08);
}

.stack-list {
  display: grid;
  gap: 10px;
}

.list-item,
.signal-list-item {
  border-radius: 16px;
  padding: 13px;
  border: 1px solid rgba(123, 148, 185, 0.26);
  background: rgba(255, 255, 255, 0.7);
}

.entity-card {
  width: 100%;
  cursor: pointer;
  text-align: left;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(123, 148, 185, 0.26);
}

.entity-card:hover,
.detail-list-item:hover {
  border-color: rgba(30, 99, 240, 0.24);
  box-shadow: var(--shadow-md);
}

.list-item h4,
.signal-list-item h4 {
  margin: 0;
  font-size: 15px;
}

.list-item p,
.signal-list-item p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.list-item-top,
.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.card-arrow {
  color: #5d74a0;
  font-size: 15px;
  flex-shrink: 0;
}

.meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  border: 1px solid transparent;
}

.tag.high {
  color: #7f1733;
  background: var(--danger-soft);
  border-color: rgba(194, 58, 88, 0.22);
}

.tag.medium {
  color: #815310;
  background: var(--warn-soft);
  border-color: rgba(184, 115, 18, 0.24);
}

.tag.low {
  color: #116642;
  background: var(--good-soft);
  border-color: rgba(28, 138, 88, 0.24);
}

.tag.neutral {
  color: #35516f;
  background: rgba(39, 96, 197, 0.1);
  border-color: rgba(39, 96, 197, 0.16);
}

.codex-list {
  margin: 0;
  padding-left: 18px;
  color: #3b4f6a;
  display: grid;
  gap: 10px;
  line-height: 1.45;
}

.view-toolbar {
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.view-toolbar label {
  min-width: 170px;
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 13px;
}

.toolbar-actions {
  margin-left: auto;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: #24446f;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(120, 145, 182, 0.28);
}

.filter-chip-x {
  color: var(--text-faint);
  font-size: 14px;
}

.filter-hint {
  color: var(--text-faint);
  font-size: 13px;
  align-self: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-card,
.task-card {
  border-radius: var(--radius-md);
  padding: 14px;
}

.task-card {
  background: rgba(255, 255, 255, 0.74);
}

.project-card h4 {
  margin: 10px 0 0;
  font-size: 18px;
}

.project-card p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.progress {
  height: 8px;
  margin-top: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(95, 120, 161, 0.15);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #2a69f2, #75adff);
}

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

.kanban-column {
  border-radius: var(--radius-lg);
  padding: 14px;
  min-height: 520px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.column-head h4 {
  margin: 0;
  font-size: 16px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(31, 97, 203, 0.1);
  color: #34547d;
  font-size: 12px;
  font-weight: 600;
}

.task-card {
  display: grid;
  gap: 10px;
}

.task-card h5 {
  margin: 0;
  font-size: 15px;
}

.task-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.calendar-wrap {
  border-radius: var(--radius-lg);
  padding: 18px;
  display: grid;
  gap: 12px;
}

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

.calendar-head > div {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.calendar-head h3 {
  font-size: 22px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays span {
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.calendar-day {
  min-height: 136px;
  border-radius: 16px;
  border: 1px solid rgba(123, 148, 185, 0.24);
  background: rgba(255, 255, 255, 0.68);
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 7px;
}

.calendar-day.muted {
  opacity: 0.44;
}

.calendar-day.today {
  border-color: rgba(30, 99, 240, 0.28);
  box-shadow: inset 0 0 0 1px rgba(30, 99, 240, 0.12);
}

.day-number {
  font-size: 12px;
  font-weight: 600;
  color: #45597a;
}

.day-task {
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
  text-align: left;
  color: #24446f;
  background: rgba(40, 100, 211, 0.1);
  border: 1px solid rgba(40, 100, 211, 0.14);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.day-task-muted {
  cursor: default;
  background: rgba(118, 138, 172, 0.12);
  color: var(--text-soft);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(121, 146, 182, 0.2);
  text-align: left;
  font-size: 13px;
}

th {
  color: #4d6282;
  font-weight: 600;
}

td {
  color: #2d425f;
}

.row-link {
  padding: 0;
  background: none;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 600;
}

.load-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.load-track {
  width: 110px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(121, 146, 182, 0.2);
}

.load-track > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #286af3, #7ab7ff);
}

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

.settings-list {
  display: grid;
  gap: 10px;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(121, 146, 182, 0.24);
  background: rgba(255, 255, 255, 0.64);
}

.switch-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 28, 49, 0.26);
  z-index: 40;
}

.modal-backdrop.open {
  display: grid;
}

.modal {
  width: min(480px, 100%);
  border-radius: 22px;
  padding: 20px;
  display: grid;
  gap: 12px;
}

.modal label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 13px;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-actions {
  justify-content: flex-end;
}

.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.drawer-layer.open {
  pointer-events: auto;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 27, 47, 0.24);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.drawer-layer.open .drawer-scrim {
  opacity: 1;
}

.detail-drawer {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(440px, calc(100vw - 32px));
  border-radius: 28px;
  display: grid;
  grid-template-rows: auto 1fr;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.24s ease;
  overflow: hidden;
}

.drawer-layer.open .detail-drawer {
  transform: translateX(0);
}

.drawer-head {
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(122, 147, 184, 0.18);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.drawer-head h2 {
  font-size: 24px;
  margin-top: 6px;
}

.drawer-head-copy {
  min-width: 0;
}

.drawer-body {
  overflow: auto;
  padding: 18px 20px 22px;
  display: grid;
  gap: 14px;
}

.drawer-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-soft);
  line-height: 1.5;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 20px;
  flex-shrink: 0;
}

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

.detail-section h3 {
  margin: 0;
  font-size: 15px;
  font-family: "Golos Text", sans-serif;
}

.detail-text {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

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

.mini-stat {
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(121, 146, 182, 0.22);
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 6px;
}

.mini-stat span {
  color: var(--text-soft);
  font-size: 12px;
}

.mini-stat strong {
  font-size: 17px;
}

.link-grid,
.detail-list,
.status-buckets {
  display: grid;
  gap: 10px;
}

.link-chip,
.status-link,
.quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
}

.link-chip {
  width: 100%;
  color: #24416b;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(122, 147, 184, 0.28);
}

.link-grid {
  grid-template-columns: 1fr;
}

.detail-list-item,
.status-link {
  width: 100%;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(121, 146, 182, 0.22);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.detail-list-item strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
}

.detail-list-item span {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
}

.detail-list-item.static-item {
  cursor: default;
}

.detail-list-item.static-item:hover {
  transform: none;
  box-shadow: none;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.quick-action {
  cursor: pointer;
}

.relation-links {
  margin-top: 10px;
}

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

.status-bucket {
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(121, 146, 182, 0.22);
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 10px;
}

.status-bucket-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.status-bucket-head strong {
  font-size: 14px;
}

.status-bucket-head span {
  color: var(--text-soft);
  font-size: 12px;
}

.status-bucket-list {
  display: grid;
  gap: 8px;
}

.status-bucket-empty {
  color: var(--text-faint);
  font-size: 12px;
}

.empty-note {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px dashed rgba(123, 148, 185, 0.4);
  color: var(--text-soft);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.5);
}

.inline-empty {
  margin: 4px 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1360px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

  .dashboard-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 940px) {
  body {
    padding: 12px;
  }

  .topbar {
    flex-direction: column;
  }

  .metrics-grid,
  .metrics-grid.small,
  .projects-grid,
  .kanban-grid,
  .status-buckets {
    grid-template-columns: 1fr;
  }

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

  .toolbar-actions {
    margin-left: 0;
    width: 100%;
  }

  .toolbar-actions .btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .view-toolbar label {
    min-width: 0;
  }

  .inline-fields,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 5px;
  }

  .calendar-day {
    min-height: 110px;
    padding: 8px;
  }

  .detail-drawer {
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    border-radius: 0;
    transform: translateY(100%);
  }

  .drawer-layer.open .detail-drawer {
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .top-actions {
    width: 100%;
  }

  .top-actions .btn {
    flex: 1 1 100%;
  }

  .sidebar,
  .topbar,
  .card,
  .calendar-wrap {
    border-radius: 22px;
  }

  .calendar-head {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
}
