:root {
  color-scheme: light;
  --bg: #f3eddf;
  --surface: #fffaf1;
  --surface-muted: #ece3d4;
  --text: #29241f;
  --muted: #756b60;
  --border: #d7cab6;
  --accent: #c5472f;
  --accent-hover: #a63a28;
  --accent-soft: #f2d2c8;
  --danger: #b42318;
  --shadow: 0 12px 32px rgba(24, 35, 54, 0.08);
  --radius: 16px;
  --user-colour: #2b6058;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191512;
  --surface: #251f1b;
  --surface-muted: #302923;
  --text: #f6efe5;
  --muted: #c0b4a7;
  --border: #51483f;
  --accent: #ef8267;
  --accent-hover: #ff9b82;
  --accent-soft: #563128;
  --danger: #ff938a;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #191512;
    --surface: #251f1b;
    --surface-muted: #302923;
    --text: #f6efe5;
    --muted: #c0b4a7;
    --border: #51483f;
    --accent: #ef8267;
    --accent-hover: #ff9b82;
    --accent-soft: #563128;
    --danger: #ff938a;
    --shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 3px 11px 11px 11px;
  background: var(--accent);
  color: var(--surface);
  font-size: 16px;
  font-weight: 800;
}

.app-menu {
  position: relative;
}

.app-menu summary {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  cursor: pointer;
  font-size: 20px;
  list-style: none;
}

.app-menu summary::-webkit-details-marker {
  display: none;
}

.app-menu nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: min(280px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-menu nav a,
.app-menu nav span,
.app-menu nav button {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.app-menu nav a:hover,
.app-menu nav button:hover {
  background: var(--surface-muted);
}

.app-menu nav span {
  color: var(--muted);
}

.messages p {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-left: 4px solid var(--user-colour);
  background: var(--surface);
}

.header-actions,
.user-chip,
.theme-switcher,
.segmented {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 10px;
}

.user-chip {
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
}

.user-colour {
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--user-colour);
  box-shadow: 0 0 0 1px var(--border);
}

.theme-switcher,
.segmented {
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.theme-switcher button,
.segmented button {
  min-height: 32px;
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.theme-switcher button.is-active,
.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(20, 30, 45, 0.12);
}

.page-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 34px clamp(16px, 4vw, 48px) 64px;
}

.home-intro {
  max-width: 700px;
  margin-bottom: 28px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 28px;
  align-items: start;
}

.quick-column {
  display: grid;
  gap: 24px;
}

.quick-change {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 13px 18px;
  border: 0;
  border-radius: 3px 18px 18px 18px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}

.quick-change-secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.quick-change-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.next-shift {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pending-panel {
  padding: 18px;
  border-left: 4px solid var(--user-colour);
  background: var(--surface);
}

.pending-panel strong {
  display: block;
  margin-bottom: 6px;
}

.profile-heading {
  margin-bottom: 26px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.profile-layout > *,
.account-details,
.copy-field,
.copy-field input {
  min-width: 0;
}

.profile-form,
.account-details {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 3px 18px 18px 18px;
  background: var(--surface);
}

.profile-form {
  display: grid;
  gap: 22px;
}

.profile-field {
  display: grid;
  gap: 8px;
}

.profile-field > label {
  font-weight: 700;
}

.profile-field select {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text);
}

.colour-field {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.colour-field input {
  width: 54px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-muted);
}

.account-details dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 16px;
}

.account-details dt {
  color: var(--muted);
}

.account-details dd {
  margin: 0;
  text-align: right;
}

.account-details hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.page-heading,
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.eyebrow,
.summary-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.button:hover:not(:disabled) {
  background: var(--accent-hover);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-quiet {
  min-height: 36px;
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.button-full {
  display: flex;
  width: 100%;
  margin-top: 8px;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

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

.summary-card,
.calendar-shell,
.login-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-card {
  display: flex;
  min-height: 130px;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.summary-card strong {
  margin: 3px 0;
  font-size: 24px;
}

.calendar-shell {
  overflow: hidden;
}

.calendar-toolbar {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.empty-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  padding: 32px;
  text-align: center;
}

.empty-state p {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--muted);
}

.empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
}

.login-layout {
  display: grid;
  min-height: calc(100vh - 166px);
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 440px);
  align-items: center;
  gap: clamp(36px, 8vw, 100px);
}

.login-copy h1 {
  max-width: 620px;
  font-size: clamp(38px, 7vw, 68px);
}

.login-copy p:last-child {
  max-width: 590px;
  color: var(--muted);
  font-size: 18px;
}

.login-card {
  display: grid;
  gap: 10px;
  padding: clamp(24px, 5vw, 34px);
}

.login-card label {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--surface-muted);
  color: var(--text);
}

.login-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-error {
  padding: 10px 12px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
  font-size: 14px;
}

@media (max-width: 780px) {
  .app-header {
    align-items: flex-start;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .user-chip {
    display: none;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .home-layout,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 108px;
  }

  .login-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 34px;
  }
}

@media (max-width: 520px) {
  .app-header {
    min-height: 62px;
    padding: 9px 12px;
  }

  .brand span:last-child {
    display: none;
  }

  .page-shell {
    padding-top: 24px;
  }

  .calendar-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .empty-state {
    min-height: 300px;
    padding: 24px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Aplicació operativa */
a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button-row form,
.danger-action {
  margin: 0;
}

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

.button-danger:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent) !important;
}

.notification-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
}

.notification-link span {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

.list-section,
.request-section,
.notification-list,
.detail-stack {
  display: grid;
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid var(--border);
}

.list-section > h2,
.request-section > h2 {
  padding-top: 22px;
}

.list-row,
.rule-row,
.holiday-row,
.special-row,
.notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}

.list-row > div,
.rule-row > div,
.holiday-row > div,
.special-row > div,
.notification-row > div {
  display: grid;
  gap: 4px;
}

.rule-row {
  grid-template-columns: minmax(180px, 0.7fr) minmax(180px, 1fr) auto;
}

.rule-row.is-inactive {
  opacity: 0.58;
}

.holiday-row,
.special-row {
  grid-template-columns: 58px minmax(0, 1fr) auto auto;
}

.holiday-row time,
.special-row time {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  align-content: center;
  border-radius: 8px;
  background: var(--surface-muted);
}

.holiday-row time strong,
.special-row time strong {
  font-size: 20px;
  line-height: 1;
}

.holiday-row time span,
.special-row time span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.request-card,
.detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.detail-panel {
  display: block;
}

.detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.status-tag {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
}

.status-tag.is-pending {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-tag.is-complete {
  background: color-mix(in srgb, var(--user-colour) 18%, var(--surface));
  color: var(--text);
}

.empty-copy {
  padding: 22px 0;
  color: var(--muted);
}

.app-form {
  display: grid;
  width: min(680px, 100%);
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 3px 18px 18px 18px;
  background: var(--surface);
}

.form-page .page-heading {
  margin-bottom: 24px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field > label,
.copy-field > span {
  font-weight: 700;
}

.form-field input:not([type="checkbox"]),
.form-field select,
.form-field textarea,
.copy-field input,
.year-filter input,
.inline-editor input,
.inline-editor select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text);
}

.form-field small {
  color: var(--muted);
}

.form-field ul.errorlist {
  margin: 0;
  padding-left: 20px;
  color: var(--danger);
}

.checkbox-field,
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-field input,
.check-row input {
  width: 20px;
  height: 20px;
}

.compact-form {
  margin-top: 14px;
  padding: 18px;
  box-shadow: none;
}

.context-banner,
.linked-box {
  display: grid;
  gap: 4px;
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
}

.vacation-banner,
.linked-box {
  border-left-color: #7b6aa6;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(0, 1fr);
  gap: 9px 18px;
  margin: 0 0 20px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  text-align: right;
}

.inline-editor {
  margin: 18px 0;
}

.inline-editor summary {
  width: fit-content;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
}

.undo-toast {
  position: sticky;
  z-index: 12;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(560px, 100%);
  margin: 0 0 18px auto;
  padding: 13px 16px;
  border-radius: 3px 14px 14px 14px;
  background: #2b6058;
  color: #fff;
  box-shadow: var(--shadow);
}

.undo-toast form {
  margin: 0;
}

.undo-toast button {
  min-height: 36px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 700;
}

.calendar-page-heading {
  margin-bottom: 26px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  text-align: center;
}

.calendar-toolbar > div {
  display: grid;
  gap: 2px;
}

.today-link {
  font-size: 13px;
}

.month-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
}

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

.weekday-row span {
  padding: 9px 4px;
  color: var(--muted);
  text-align: center;
}

.calendar-day {
  position: relative;
  display: block;
  min-height: 112px;
  padding: 8px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day:hover {
  background: var(--surface-muted);
}

.calendar-day.is-outside {
  opacity: 0.4;
}

.calendar-day.is-holiday::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--accent);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.day-number {
  display: inline-grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 6px;
  font-weight: 700;
}

.holiday-mark {
  float: right;
  margin: 4px 6px 0 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.day-events {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}

.event-chip,
.vacation-chip,
.more-events {
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--event-colour, var(--user-colour)) 58%, var(--surface));
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vacation-chip {
  background: color-mix(in srgb, #b6a6d9 62%, var(--surface));
}

.vacation-chip.is-pending {
  border: 1px dashed #8f7cbb;
  background: transparent;
}

.more-events {
  background: var(--surface-muted);
  color: var(--muted);
}

.calendar-legend,
.people-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.calendar-legend {
  padding: 13px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.legend-square {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  background: var(--user-colour);
}

.legend-square.holiday { background: var(--accent); }
.legend-square.vacation { background: #b6a6d9; }
.legend-square.pending { border: 1px dashed var(--muted); background: transparent; }

.people-row {
  margin-top: 8px;
  gap: 7px;
}

.people-row span {
  padding: 4px 8px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--event-colour) 65%, var(--surface));
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 22px;
  margin-top: 30px;
}

.mini-month h2 {
  margin-bottom: 10px;
}

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

.mini-weekdays span {
  padding: 3px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.mini-day {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
  text-decoration: none;
}

.mini-day.has-event { background: color-mix(in srgb, var(--event-colour, var(--user-colour)) 55%, var(--surface)); }
.mini-day.is-holiday { box-shadow: inset 0 -3px 0 var(--accent); }
.mini-day.has-vacation { outline: 2px solid #9b89c4; outline-offset: -2px; }
.mini-day.is-outside { opacity: 0.18; }

.year-filter {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 22px;
}

.year-filter label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.year-filter input {
  max-width: 120px;
}

.timeline {
  display: grid;
  margin-top: 28px;
  border-left: 2px solid var(--border);
}

.timeline article {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 18px;
  padding: 0 0 24px 18px;
}

.timeline time {
  color: var(--muted);
}

.notification-row.is-unread {
  padding-left: 14px;
  border-left: 4px solid var(--accent);
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(42px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.swatch-choice {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  cursor: pointer;
}

.swatch-choice input {
  position: absolute;
  opacity: 0;
}

.swatch-choice span {
  display: block;
  width: 44px;
  height: 44px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--swatch);
}

.swatch-choice input:checked + span {
  border-color: var(--text);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.swatch-choice b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.check-row {
  margin: 10px 0;
}

.copy-field {
  display: grid;
  gap: 7px;
}

.preference-save {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
}

.preference-save p {
  margin: 0;
}

.account-form-section {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

@media (max-width: 900px) {
  .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-day { min-height: 98px; }
}

@media (max-width: 680px) {
  .calendar-page-heading .button-row { width: 100%; }
  .calendar-day { min-height: 70px; padding: 4px; }
  .event-chip, .more-events { display: none; }
  .vacation-chip { height: 8px; padding: 0; font-size: 0; }
  .holiday-mark { font-size: 0; }
  .holiday-mark::after { content: "F"; font-size: 11px; }
  .year-grid { grid-template-columns: 1fr; }
  .request-card, .rule-row, .holiday-row, .special-row { grid-template-columns: 1fr; }
  .holiday-row time, .special-row time { justify-self: start; }
  .detail-list { grid-template-columns: 1fr; gap: 2px; }
  .detail-list dd { margin-bottom: 10px; text-align: left; }
  .swatch-grid { grid-template-columns: repeat(5, 44px); }
}

@media (max-width: 420px) {
  .weekday-row span { font-size: 12px; }
  .day-number { width: 26px; height: 26px; }
  .calendar-day { min-height: 58px; }
  .page-heading .button-row > * { flex: 1 1 auto; text-align: center; }
  .swatch-grid { grid-template-columns: repeat(5, 40px); }
  .swatch-choice span { width: 40px; height: 40px; }
}
