:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-muted: #f0f2f5;
  --text: #20242b;
  --muted: #7a818c;
  --line: #e6e8ec;
  --gold: #c9a227;
  --gold-soft: #efe3b2;
  --navy: #071b3a;
  --accent: #4f7cff;
  --accent-strong: #315ee8;
  --danger: #ec4c43;
  --green: #55b875;
  --yellow: #e4c949;
  --shadow: 0 20px 60px rgba(26, 31, 44, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.dark-mode {
  --bg: #11151c;
  --panel: #1a2029;
  --panel-muted: #252d38;
  --text: #f1f3f6;
  --muted: #aeb6c2;
  --line: #394250;
  color-scheme: dark;
}

body.dark-mode .sidebar,
body.dark-mode .rail,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode .task-extra-options,
body.dark-mode .delegate-options,
body.dark-mode .task-card.is-selected {
  background: #1a2029;
  color: var(--text);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 138px;
  padding: 0 20px;
  border-bottom: 1px solid var(--gold);
  background: var(--navy);
  color: white;
}

.brand-logo-img {
  content: url("ralen-logo-header.png");
  width: 420px;
  height: 132px;
  flex: 0 0 420px;
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 821px) and (max-width: 1050px) {
  .brand-quote {
    display: none;
  }
}

.brand-quote {
  color: var(--gold-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: 0;
}

.notification-center {
  position: relative;
  margin-left: auto;
}

.notification-center summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fff8dc;
  color: var(--navy);
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.notification-center summary::-webkit-details-marker {
  display: none;
}

.notification-center summary span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 0.75rem;
}

.notification-list {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 6px;
  width: min(430px, calc(100vw - 28px));
  max-height: 360px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.top-alert {
  margin: 0;
  padding: 6px 9px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fff8dc;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.4;
}

.top-alert.danger {
  border-color: #ffb2aa;
  background: #ffe8e5;
  color: #b33831;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 56px var(--sidebar-width, 250px) 7px var(--task-width, 560px) 7px minmax(420px, 1fr);
  min-height: calc(100vh - 72px);
  overflow: hidden;
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 22px 10px;
  border-right: 1px solid var(--gold);
  background: #f9fafb;
}

.avatar,
.rail-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-weight: 800;
}

.avatar {
  border: 1px solid var(--gold);
  background: var(--navy);
  color: var(--gold);
  font-size: 0.78rem;
}

.rail-button {
  border: 1px solid var(--gold-soft);
  background: #fff8dc;
  color: var(--navy);
  box-shadow: 0 6px 16px rgba(7, 27, 58, 0.08);
}

.rail-button.is-active {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--gold);
}

.rail-button:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--navy);
}

.rail-seven,
.nav-seven {
  font-size: 1.16rem;
  font-weight: 950;
}

.rail-team {
  font-size: 1.18rem;
  letter-spacing: 0;
}

.rail-button.bottom {
  margin-top: auto;
}

.sidebar {
  padding: 18px 14px;
  border-right: 1px solid var(--gold);
  background: #fbfbfc;
  overflow-y: auto;
  min-width: 0;
}

.column-resizer {
  position: relative;
  z-index: 3;
  border-right: 1px solid var(--gold);
  background: linear-gradient(90deg, transparent, #fff8dc 45%, #fff8dc 55%, transparent);
  cursor: col-resize;
}

.column-resizer::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 52px;
  border-radius: 999px;
  background: var(--gold);
  transform: translate(-50%, -50%);
}

body.is-resizing-columns {
  cursor: col-resize;
  user-select: none;
}

.quick-nav,
.nav-section {
  display: grid;
  gap: 4px;
}

.nav-section {
  margin-top: 28px;
}

.nav-section p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px 14px;
  color: #b0b4bd;
  font-size: 0.86rem;
  font-weight: 700;
}

.tiny-plus {
  width: 24px;
  height: 24px;
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: var(--navy);
  color: var(--gold);
  font-weight: 950;
  cursor: pointer;
}

.sidebar-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px auto;
  gap: 6px;
  margin-bottom: 8px;
}

.sidebar-tools[hidden] {
  display: none;
}

.sidebar-tools input,
.sidebar-tools button {
  min-height: 34px;
  padding: 6px 8px;
}

.nav-row-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}

.row-menu {
  position: relative;
}

.row-menu-toggle {
  width: 26px;
  height: 26px;
  border: 1px solid var(--gold-soft);
  border-radius: 7px;
  background: white;
  color: var(--navy);
  cursor: pointer;
}

.row-menu-actions {
  position: absolute;
  top: 24px;
  right: 0;
  z-index: 15;
  display: none;
  min-width: 96px;
  padding: 6px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 28px rgba(26, 31, 44, 0.14);
}

.row-menu:hover .row-menu-actions,
.row-menu:focus-within .row-menu-actions,
.row-menu.is-open .row-menu-actions {
  display: grid;
  gap: 4px;
}

.row-menu-actions button {
  width: 100%;
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
}

.row-menu-actions button:hover {
  background: #fff8dc;
}

.nav-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  min-height: 42px;
  gap: 10px;
  padding: 0 12px;
  border-radius: 8px;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: #fff8dc;
  color: var(--navy);
  font-weight: 900;
}

.nav-row.is-active {
  background: #eef0f3;
}

.nav-row.is-active .nav-icon {
  background: var(--navy);
  color: var(--gold);
}

.nav-row strong,
.task-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-row small {
  color: #a0a5ae;
}

.dot,
.tag-shape {
  width: 10px;
  height: 10px;
  background: var(--dot);
}

.dot {
  border-radius: 999px;
}

.tag-shape {
  border-radius: 3px;
  transform: rotate(45deg);
}

.task-pane {
  border-right: 1px solid var(--gold);
  background: var(--panel);
  overflow-y: auto;
  min-width: 0;
}

.pane-header,
.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px 12px;
}

.pane-header {
  justify-content: space-between;
}

.eyebrow,
.detail-header p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 1.55rem;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.05rem;
}

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

.circle-action,
.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #4c5563;
  cursor: pointer;
}

.circle-action:hover,
.icon-button:hover {
  background: var(--panel-muted);
}

.icon-button span {
  width: 18px;
  height: 2px;
  margin: 2px 0;
  border-radius: 2px;
  background: currentColor;
}

.icon-button[data-menu-toggle] {
  border-radius: 999px;
  background: var(--navy);
  background-image: url("/static/ralen-mark.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 31px 31px;
  color: var(--gold);
}

.icon-button[data-menu-toggle] span {
  opacity: 0;
}

.composer {
  padding: 0 16px 14px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: 8px;
  padding: 0 16px 14px;
}

.kanban-page,
.report-page {
  min-height: calc(100vh - 72px);
  padding: 24px;
  overflow: auto;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(240px, 1fr));
  gap: 12px;
  min-width: 1480px;
}

.kanban-column {
  min-height: 560px;
  padding: 10px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #f8f9fb;
}

.kanban-column.is-drop-target {
  background: #fff8dc;
  outline: 2px solid var(--gold);
}

.kanban-column > header {
  display: flex;
  justify-content: space-between;
  padding: 8px 4px 14px;
}

.kanban-cards {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 500px;
}

.kanban-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: white;
  cursor: grab;
}

.kanban-card span,
.kanban-card small {
  color: var(--muted);
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.report-metrics article,
.report-panel {
  padding: 16px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
}

.report-metrics article {
  display: grid;
  gap: 4px;
}

.report-metrics strong {
  font-size: 1.8rem;
  color: var(--navy);
}

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

.report-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(4, auto);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gold-soft);
}

.report-row .danger {
  color: var(--danger);
  font-weight: 850;
}

.idea-composer-options {
  display: grid;
  gap: 10px;
}

.project-row {
  display: grid;
  gap: 7px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gold-soft);
}

.project-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.project-row span,
.project-row small {
  color: var(--muted);
}

.project-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ebf0;
}

.project-progress span {
  display: block;
  height: 100%;
  background: var(--green);
}

.composer form,
.share-panel form {
  display: grid;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--text);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.title-input {
  min-height: 48px;
  border: 0;
  background: #f4f5f7;
  font-size: 1rem;
  font-weight: 850;
}

.composer-notes {
  width: 100%;
  min-height: 48px;
  overflow: hidden;
  resize: none;
}

.calendar-week .day-column.is-sunday > header span,
.calendar-week .day-column.is-sunday > header strong,
.calendar-week .day-column.is-sunday > header small {
  color: #d93636;
}

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

.large-date-input {
  min-height: 52px;
  font-size: 1.02rem;
  font-weight: 800;
}

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-toggle {
  justify-self: start;
}

.task-extra-options,
.delegate-options {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #fffdf6;
}

.task-extra-options[hidden],
.delegate-options[hidden] {
  display: none;
}

.tag-picker label,
.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f4f5f7;
  color: #4b5563;
  font-size: 0.86rem;
  font-weight: 700;
}

.tag-picker input,
.switch-row input {
  width: auto;
}

.primary-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
  color: #3f4858;
  font-weight: 800;
}

.secondary-button:hover {
  background: var(--panel-muted);
}

.task-list {
  display: grid;
  padding: 0 16px 28px;
}

.task-card {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 34px;
  align-items: start;
  gap: 8px;
  min-height: 72px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--gold);
}

.task-card.is-selected {
  border-radius: 8px;
  border-bottom-color: transparent;
  background: #f0f1f3;
}

.task-card.is-done {
  opacity: 0.58;
}

.task-card[draggable="true"] {
  cursor: grab;
}

.task-card.is-dragging {
  opacity: 0.42;
  cursor: grabbing;
}

.task-drop-indicator {
  height: 3px;
  margin: 2px 4px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 0 2px rgba(49, 94, 232, 0.14);
  pointer-events: none;
}

.check,
.check-display {
  display: block;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 2px solid var(--gold);
  border-radius: 5px;
  background: white;
  cursor: pointer;
}

.check.checked {
  border-color: var(--green);
  background: var(--green);
}

.task-link {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-meta,
.task-preview {
  color: var(--muted);
  font-size: 0.83rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 7px;
  background: #e7eaf0;
  color: #465064;
  font-size: 0.72rem;
  font-weight: 850;
}

.badge.soft {
  background: color-mix(in srgb, var(--badge) 28%, white);
  color: #42506a;
}

.priority-flag,
.task-tag-symbol {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 22px;
  font-size: 1rem;
}

.priority-flag-low { color: #7b8798; }
.priority-flag-medium { color: #43a565; }
.priority-flag-high { color: #ef8b2c; }
.priority-flag-urgent { color: #ef4a42; }

.task-tag-symbol {
  color: var(--tag-color);
}

.tag-picker label[style*="--tag-color"] {
  border-color: color-mix(in srgb, var(--tag-color) 58%, var(--line));
  box-shadow: inset 3px 0 0 var(--tag-color);
}

.badge.share {
  background: #dce8ff;
  color: #315ee8;
}

.priority-low {
  background: #e8f4ec;
  color: #2f7d4f;
}

.priority-medium {
  background: #e8f4ec;
  color: #2f7d4f;
}

.priority-high {
  background: #ffe8c8;
  color: #b45d12;
}

.priority-urgent {
  background: #ffdcd8;
  color: #b33831;
}

.priority-select option[value="medium"] {
  color: #2f7d4f;
}

.priority-select option[value="high"] {
  color: #b45d12;
}

.priority-select option[value="urgent"] {
  color: #b33831;
}

.priority-select option[value="low"] {
  color: #7b8798;
}

.badge.comments {
  background: #fff7d8;
  color: var(--navy);
}

.badge.pinned {
  background: var(--navy);
  color: var(--gold);
}

.field-label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.channel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.channel-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #fffdf6;
  color: #394252;
  font-size: 0.82rem;
  font-weight: 800;
}

.channel-row input {
  width: auto;
}

.task-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-rules label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #fffdf6;
  color: #394252;
  font-size: 0.82rem;
  font-weight: 800;
}

.task-rules input[type="checkbox"] {
  width: auto;
}

.task-rules select,
.task-rules input[type="number"] {
  width: auto;
  min-width: 150px;
}

.detail-channels,
.detail-rules {
  padding: 0 36px;
}

.attachments-box {
  display: grid;
  gap: 8px;
  margin: 0 36px;
  padding: 12px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #fffdf6;
}

.attachments-box a {
  color: #315ee8;
  font-weight: 800;
}

.performance-box {
  display: grid;
  gap: 4px;
  margin-top: 22px;
  padding: 12px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--navy);
  color: white;
  font-size: 0.82rem;
}

.sidebar-filter-panel form {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #fffdf6;
}

.sidebar-filter-panel label {
  display: grid;
  gap: 4px;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 850;
}

.sidebar-filter-panel label:has(input[type="checkbox"]) {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.sidebar-filter-panel input,
.sidebar-filter-panel select {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.82rem;
}

.sidebar-filter-panel input[type="checkbox"] {
  width: auto;
  accent-color: var(--gold);
}

.performance-box strong {
  color: var(--gold);
}

.performance-box .danger {
  color: #ffb2aa;
  font-weight: 900;
}

.order-buttons {
  display: grid;
  gap: 3px;
}

.order-buttons button {
  width: 28px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9aa0aa;
  cursor: pointer;
}

.order-buttons button:hover {
  background: #e9ebef;
  color: #343a46;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  gap: 10px;
  padding: 0 16px 28px;
  overflow-x: auto;
}

.day-column {
  min-height: 460px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fbfcfe;
}

.day-column header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  min-height: 70px;
  padding: 12px;
  border-bottom: 1px solid var(--gold);
}

.day-column header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.day-column header strong {
  grid-row: span 2;
  align-self: start;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef0f3;
  font-size: 1rem;
}

.day-column header small {
  color: #9aa0aa;
}

.day-column.is-today header strong {
  background: var(--accent);
  color: white;
}

.day-tasks {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.calendar-task {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 10px 10px 10px 12px;
  border-left: 4px solid #c5cad4;
  border-radius: 8px;
  background: white;
  box-shadow: 0 6px 18px rgba(26, 31, 44, 0.06);
}

.calendar-task.is-selected {
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, white);
}

.calendar-task strong,
.calendar-task span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-task strong {
  font-size: 0.86rem;
  line-height: 1.25;
}

.calendar-task span {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.calendar-task em {
  justify-self: start;
  padding: 2px 7px;
  border-radius: 7px;
  background: #eef0f3;
  color: #596273;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 850;
}

.priority-edge-low {
  border-left-color: var(--green);
}

.priority-edge-medium {
  border-left-color: var(--accent);
}

.priority-edge-high {
  border-left-color: var(--yellow);
}

.priority-edge-urgent {
  border-left-color: var(--danger);
}

.empty-day {
  margin: 0;
  padding: 12px 4px;
  color: #a0a5ae;
  font-size: 0.84rem;
  text-align: center;
}

.detail-pane {
  display: grid;
  grid-template-rows: auto auto;
  min-width: 0;
  background: var(--panel);
  overflow-y: auto;
}

.detail-editor {
  display: grid;
  gap: 14px;
}

.detail-editor .detail-form-grid,
.detail-editor .detail-channels,
.detail-editor .detail-rules,
.detail-editor .detail-tags,
.detail-editor .share-options,
.detail-editor .permission-note {
  display: none;
}

.detail-editor.show-detail-options .detail-form-grid {
  display: grid;
}

.detail-editor.show-detail-options .detail-channels,
.detail-editor.show-detail-options .detail-rules,
.detail-editor.show-detail-options .detail-tags,
.detail-editor.show-detail-options .share-options,
.detail-editor.show-detail-options .permission-note {
  display: flex;
}

.detail-editor.show-detail-options .share-options,
.detail-editor.show-detail-options .permission-note {
  display: grid;
}

.detail-options-toggle {
  justify-self: start;
  margin-left: 36px;
}

.autosave-status {
  justify-self: end;
  margin: -6px 36px 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
}

.autosave-status.is-saving {
  color: var(--muted);
}

.autosave-status.is-error {
  color: var(--danger);
}

.detail-header {
  align-items: flex-start;
  padding: 34px 36px 16px;
}

.detail-header > div {
  min-width: 0;
  flex: 1;
}

.detail-title-input {
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid var(--gold);
  border-radius: 0;
  background: transparent;
  padding: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 850;
}

.detail-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 36px;
}

.detail-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-tags,
.editor-toolbar,
.share-options,
.detail-actions {
  padding-left: 36px;
  padding-right: 36px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tags label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f4f5f7;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 800;
}

.detail-tags input {
  width: auto;
}

.editor-toolbar {
  display: flex;
  gap: 8px;
}

.editor-toolbar button {
  min-height: 34px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
  color: #4c5563;
  font-weight: 800;
  cursor: pointer;
}

.editor-toolbar button:hover {
  background: var(--panel-muted);
}

.editor-toolbar button[data-wrap-selection="**|**"] {
  font-weight: 950;
}

.editor-toolbar button[data-wrap-selection="*|*"] {
  font-style: italic;
}

.editor-toolbar button[data-wrap-selection="<u>|</u>"] {
  text-decoration: underline;
}

.editor-toolbar button[data-wrap-selection="~~|~~"] {
  text-decoration: line-through;
}

.editor-toolbar button[data-wrap-selection="<mark>|</mark>"] {
  background: #b7ff66;
  color: var(--navy);
}

.detail-notes {
  width: calc(100% - 72px);
  margin: 0 36px;
  min-height: 230px;
  color: var(--navy);
  line-height: 1.55;
}

.detail-description {
  min-height: 112px;
  background: #fffdf6;
}

.message-list {
  display: grid;
  gap: 6px;
  padding: 14px 36px 0;
}

.message {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fff7d8;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 750;
}

.message.error {
  border-color: #f0b7b2;
  background: #fff0ee;
  color: #9b2f29;
}

.permission-note {
  margin: -4px 36px 2px;
  padding: 10px 12px;
  border: 1px solid #f0b7b2;
  border-radius: 8px;
  background: #fff0ee;
  color: #9b2f29;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.45;
}

.share-options {
  display: grid;
  gap: 8px;
}

.share-recipient-fields {
  display: grid;
  gap: 8px;
}

.share-recipient-fields[hidden] {
  display: none;
}

.recipient-toggle {
  min-height: 38px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
  color: #394252;
  font-weight: 800;
  cursor: pointer;
}

.recipient-menu {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fffdf6;
}

.recipient-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: #394252;
  font-weight: 750;
}

.recipient-menu input {
  width: auto;
  accent-color: var(--gold);
}

.recipient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recipient-chips span {
  padding: 5px 8px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #fff7d8;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 850;
}

.share-options p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.detail-actions {
  display: flex;
  gap: 10px;
  padding-bottom: 8px;
}

.detail-actions .primary-button,
.detail-actions .secondary-button {
  flex: 1;
}

.task-extras {
  display: grid;
  gap: 12px;
  margin: 8px 36px 32px;
  padding-top: 18px;
  border-top: 1px solid var(--gold);
}

.checklist-list,
.comment-list {
  display: grid;
  gap: 8px;
}

.checklist-manage-row,
.comment-manage-row,
.attachment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  align-items: center;
  gap: 5px;
}

.comment-manage-row,
.attachment-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.checklist-manage-row > form:first-child {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.checklist-manage-row button,
.comment-manage-row button,
.attachment-row button {
  min-width: 26px;
  height: 26px;
  border: 1px solid var(--gold-soft);
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.checklist-list form,
.inline-add-form {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.mini-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold);
  border-radius: 5px;
  background: white;
  cursor: pointer;
}

.mini-check.checked,
.check-display.checked {
  border-color: var(--green);
  background: var(--green);
}

.is-done-text {
  color: var(--muted);
  text-decoration: line-through;
}

.muted-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.inline-add-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.comment-list p {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #fbfcfe;
  color: #394252;
  font-size: 0.88rem;
  line-height: 1.4;
}

.comment-list span {
  color: var(--muted);
  font-size: 0.76rem;
}

.mini-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #fbfcfe;
}

.mini-admin-row button {
  min-height: 32px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
  color: #394252;
  font-weight: 800;
}

.tag-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--dot);
}

.start-page {
  background: #f4f6f8;
}

.start-brand {
  justify-content: center;
  flex-wrap: wrap;
}

.start-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 420px));
  justify-content: center;
  gap: 18px;
  padding: 42px 18px;
}

.start-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.start-panel form {
  display: grid;
  gap: 10px;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #394252;
  font-size: 0.9rem;
  font-weight: 800;
}

.remember-row input {
  width: auto;
}

.week-planner {
  min-width: 0;
  padding: 22px;
  overflow: auto;
}

.week-planner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.week-grid-shell {
  overflow: auto;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
}

.week-grid {
  display: grid;
  grid-template-columns: 72px repeat(7, minmax(150px, 1fr));
  min-width: 1120px;
}

.week-hour-head,
.week-day-head,
.week-hour,
.week-slot {
  border-right: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
}

.week-day-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 10px;
  background: #fffdf6;
  color: var(--navy);
}

.week-day-head.is-sunday span,
.week-day-head.is-sunday strong {
  color: #c62828;
}

.week-hour {
  display: grid;
  place-items: start center;
  padding-top: 10px;
  background: #fbfcfe;
  color: var(--muted);
  font-weight: 850;
  font-size: 0.8rem;
}

.week-slot {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 78px;
  padding: 6px;
  border-top: 0;
  background: white;
  text-align: left;
  cursor: pointer;
}

.week-slot:hover {
  background: #fff8df;
}

.week-task {
  display: grid;
  gap: 2px;
  padding: 6px 6px 6px 8px;
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  background: #f4f6f8;
  color: var(--navy);
}

.week-task small {
  color: var(--muted);
}

.slot-dialog {
  width: min(520px, calc(100vw - 28px));
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

.slot-dialog::backdrop {
  background: rgba(7, 27, 58, 0.35);
}

.slot-dialog form {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.delegated-list {
  display: grid;
  gap: 8px;
  padding: 8px 16px 28px;
}

.delegated-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 120px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #fbfcfe;
  color: #394252;
}

.standalone-page {
  display: grid;
  gap: 18px;
  width: min(1380px, calc(100vw - 32px));
  margin: 18px auto 42px;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fbfcfe;
}

.dashboard-hero h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.dashboard-hero p {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--muted);
}

.dashboard-hero > strong {
  min-width: 120px;
  padding: 14px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fff8df;
  color: var(--navy);
  text-align: center;
}

.team-dashboard-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: white;
}

.team-dashboard-filters label,
.team-dashboard-filters select,
.team-dashboard-filters input {
  width: 100%;
}

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

.team-dashboard-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
}

.team-dashboard-card header {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 10px;
}

.team-dashboard-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.team-dashboard-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.team-dashboard-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.team-dashboard-stats span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2f8;
  color: var(--navy);
  font-size: 0.76rem;
  font-weight: 800;
}

.team-dashboard-stats .danger {
  background: #ffe8e5;
  color: #b42318;
}

.team-dashboard-taskbox {
  display: grid;
  gap: 7px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.team-dashboard-task {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--gold-soft);
  border-left-width: 5px;
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--navy);
}

.team-dashboard-task span,
.team-dashboard-task em {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.description-grid article {
  padding: 18px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
}

.description-grid h2 {
  margin: 0 0 8px;
  color: var(--navy);
}

.description-grid p {
  margin: 0;
  color: #394252;
  line-height: 1.5;
}

.enterprise-page {
  padding-bottom: 50px;
}

.enterprise-form {
  display: grid;
  gap: 10px;
}

.enterprise-form input,
.enterprise-form select,
.enterprise-form textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  padding: 8px 10px;
}

.enterprise-table {
  display: grid;
  gap: 10px;
}

.enterprise-table article,
.enterprise-row {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: white;
}

.enterprise-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.enterprise-table h2,
.enterprise-row strong {
  margin: 0;
  color: var(--navy);
}

.enterprise-table p {
  margin: 0;
  color: #394252;
}

.workload-green {
  color: #166534;
}

.workload-yellow {
  color: #9a5b00;
}

.workload-red,
.is-critical h2 {
  color: #b42318;
}

.workload-gray {
  color: #667085;
}

.day-capacity-summary {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #f7fbf8;
  color: #173b25;
}

.day-capacity-summary.is-overloaded {
  background: #fff4f2;
  color: #9f1d14;
}

.capacity-divider {
  display: grid;
  gap: 3px;
  margin: 12px 0;
  padding: 10px 0;
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid var(--gold-soft);
  color: var(--navy);
}

.capacity-divider span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #9a5b00;
}

.large-date-popover {
  position: absolute;
  z-index: 100;
  width: 340px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: 12px;
}

.large-date-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.large-date-head strong {
  text-align: center;
  text-transform: capitalize;
}

.large-date-head button,
.large-date-grid button {
  min-height: 34px;
  border: 1px solid var(--gold-soft);
  border-radius: 7px;
  background: #fffdf6;
  color: var(--navy);
  cursor: pointer;
}

.large-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.large-date-grid span {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.large-date-grid .is-sunday {
  color: #c62828;
}

.large-date-grid .is-muted {
  opacity: 0.45;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 36px 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.note-body {
  padding: 0 36px 28px;
  font-size: 1.02rem;
  line-height: 1.55;
}

.share-panel {
  margin: 16px 36px 28px;
  padding: 18px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fbfcfe;
}

.share-panel h3 {
  margin-bottom: 12px;
}

.share-panel select[multiple] {
  min-height: 94px;
}

.share-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.share-list p {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: white;
}

.share-list span {
  color: var(--muted);
  font-size: 0.85rem;
}

.share-list a {
  color: var(--accent-strong);
  font-size: 0.83rem;
  font-weight: 800;
}

.shared-page {
  background: #f4f6f8;
}

.shared-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 18px;
}

.shared-header {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.shared-header h1 {
  font-size: 1.7rem;
}

.shared-login {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 170px;
  gap: 10px;
}

.empty-access {
  margin: 20px 0;
  padding: 14px 16px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
  color: #596273;
}

.shared-calendar {
  padding: 0;
}

.calendar-shell,
.settings-shell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.year-view,
.settings-main {
  min-width: 0;
  padding: 24px;
  overflow: auto;
}

.year-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.year-nav {
  display: flex;
  gap: 8px;
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 14px;
}

.month-card,
.settings-panel {
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
}

.month-card,
.settings-panel {
  padding: 14px;
}

.month-card h2,
.settings-panel h2 {
  margin: 0 0 12px;
  font-size: 1.02rem;
}

.month-weekdays,
.month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-weekdays span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}

.month-day {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--gold-soft);
  color: #394252;
  font-size: 0.82rem;
}

.month-day:hover {
  background: #fff8df;
}

.month-day.is-muted {
  color: #b8b0a0;
  background: #faf8f0;
}

.month-day.has-tasks {
  background: #fff4c7;
  font-weight: 900;
}

.month-day.is-sunday span,
.month-large-day.is-sunday > span {
  color: #c62828;
}

.month-day strong {
  position: absolute;
  right: 3px;
  bottom: 2px;
  min-width: 14px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--gold);
  font-size: 0.62rem;
  text-align: center;
}

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

.settings-panel-wide {
  grid-column: 1 / -1;
}

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

.user-admin-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1fr) minmax(150px, 1fr) minmax(130px, 0.8fr) repeat(6, auto);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: #fffdf6;
}

.user-admin-row button {
  min-height: 32px;
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: white;
  cursor: pointer;
}

.month-large {
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: white;
  padding: 14px;
}

.month-large-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-large-day {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 126px;
  padding: 8px;
  border: 1px solid var(--gold-soft);
  color: #394252;
}

.month-large-day > span {
  font-weight: 900;
}

.month-large-day small {
  overflow: hidden;
  border-radius: 7px;
  background: #fff4c7;
  color: var(--navy);
  padding: 3px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-large-day.is-muted {
  background: #faf8f0;
  color: #a7a092;
}

.settings-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

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

.settings-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mobile-topbar,
.desktop-hidden {
  display: none;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 56px 250px minmax(360px, 1fr);
  }

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

  .team-dashboard-filters {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .column-resizer {
    display: none;
  }

  .detail-pane {
    grid-column: 2 / -1;
    border-top: 1px solid var(--gold);
  }
}

@media (max-width: 820px) {
  body {
    padding-top: 54px;
  }

  .brand-header {
    display: none;
  }

  .mobile-topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    height: 54px;
    padding: 0 12px;
    border-bottom: 1px solid var(--gold);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
  }

  .count-pill {
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef0f3;
    text-align: center;
    font-weight: 800;
  }

  .shell {
    display: block;
    min-height: calc(100vh - 54px);
    overflow: visible;
  }

  .rail {
    display: none;
  }

  .sidebar {
    position: fixed;
    inset: 54px auto 0 0;
    z-index: 25;
    width: min(82vw, 300px);
    transform: translateX(-102%);
    box-shadow: var(--shadow);
    transition: transform 180ms ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .task-pane,
  .detail-pane {
    border-right: 0;
    overflow: visible;
  }

  .desktop-hidden {
    display: grid;
  }

  .pane-header {
    padding: 18px 16px 12px;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .task-card {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .calendar-week {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .day-column {
    min-height: 0;
  }

  .order-buttons {
    grid-column: 2;
    display: flex;
  }

  .detail-header,
  .detail-meta,
  .note-body,
  .detail-form-grid,
  .detail-tags,
  .editor-toolbar,
  .share-options,
  .detail-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .detail-form-grid,
  .shared-login {
    grid-template-columns: 1fr;
  }

  .detail-notes {
    width: calc(100% - 36px);
    margin-left: 18px;
    margin-right: 18px;
  }

  .detail-actions {
    flex-direction: column;
  }

  .detail-channels,
  .detail-rules {
    padding-left: 18px;
    padding-right: 18px;
  }

  .attachments-box {
    margin-left: 18px;
    margin-right: 18px;
  }

  .calendar-shell,
  .settings-shell {
    display: block;
  }

  .year-view,
  .settings-main {
    padding: 16px;
  }

  .year-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .year-grid,
  .settings-grid,
  .start-shell,
  .team-dashboard-grid,
  .description-grid,
  .team-dashboard-filters {
    grid-template-columns: 1fr;
  }

  .user-admin-row,
  .mini-admin-row {
    grid-template-columns: 1fr;
  }

  .start-shell {
    padding: 18px;
  }

  .month-large-day {
    min-height: 78px;
  }

  .share-panel {
    margin: 14px 16px 24px;
  }
}

@media (max-width: 480px) {
  .task-card {
    min-height: 86px;
  }

  .header-actions {
    display: none;
  }

  h2 {
    font-size: 1.2rem;
  }

  .note-body {
    font-size: 0.96rem;
  }
}

.export-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.search-only-bar {
  grid-template-columns: minmax(0, 1fr);
}

.search-only-bar input[type="search"] {
  width: 100%;
}

.notification-list .top-alert {
  display: block;
  text-decoration: none;
}

.export-links a,
.mini-link {
  color: var(--navy);
  font-weight: 700;
}

.trend-chart {
  display: flex;
  min-height: 165px;
  align-items: end;
  gap: 12px;
  overflow-x: auto;
  padding: 16px 4px 4px;
}

.trend-column {
  display: grid;
  min-width: 44px;
  gap: 6px;
  text-align: center;
}

.trend-bars {
  height: 125px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
}

.trend-bars i,
.trend-bars b {
  display: block;
  width: 13px;
  min-height: 2px;
  background: #315ee8;
}

.trend-bars b {
  background: #c9a227;
}

.chart-legend {
  display: flex;
  gap: 20px;
}

.kanban-settings {
  border: 1px solid var(--gold);
  background: var(--panel);
}

.kanban-settings {
  margin: 0 0 16px;
  padding: 12px;
}

.kanban-settings-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.kanban-settings-grid form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.kanban-settings-grid button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--gold);
  background: var(--navy);
  color: white;
  font-weight: 700;
}

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

@media (max-width: 900px) {
}

.report-user-filter {
  display: flex;
  gap: 10px;
  align-items: end;
  margin: 12px 0 18px;
}

.team-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.team-week-grid article {
  min-height: 260px;
  border: 1px solid var(--gold);
  background: var(--panel);
}

.team-week-grid article > header {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background: var(--navy);
  color: white;
}

.team-week-grid article > a {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
