:root {
  --ink: #173e35;
  --muted: #68776d;
  --paper: #f6f5ee;
  --line: #dce1d5;
  --lime: #d5e4b1;
  --sage: #e9eddf;
  --accent: #cd885d;
  --surface: #fff;
  --primary: #22664f;
  font:
    15px/1.6 "DM Sans",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 44px;
  padding: 11px 18px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-weight: 650;
}
button:hover,
.button:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.quiet {
  background: none;
  color: var(--ink);
}
a {
  color: var(--primary);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3 {
  font-family: Manrope, system-ui, sans-serif;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
}
h1 {
  font-size: 40px;
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: 19px;
}
p {
  margin: 0 0 16px;
}
small,
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 750;
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.brand span {
  color: #8ba56a;
  font-size: 12px;
}
.app-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100dvh;
}
aside {
  background: #fdfdf9;
  border-right: 1px solid var(--line);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
aside .eyebrow {
  font-size: 8px;
  margin-top: -22px;
}
nav {
  display: grid;
  gap: 7px;
}
nav button {
  justify-content: flex-start;
  text-align: left;
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  font-weight: 550;
}
nav button.active {
  background: var(--sage);
  color: var(--ink);
  font-weight: 750;
}
nav span {
  width: 20px;
  color: #829178;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}
.topbar {
  height: 90px;
  padding: 22px 40px;
  border-bottom: 1px solid var(--line);
  background: #fdfdf9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar #breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-right: auto;
}
.workspace {
  min-width: 0;
}
#main {
  padding: 36px 40px 80px;
  max-width: 1600px;
  margin: auto;
  outline: none;
}
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.page-heading p {
  margin-bottom: 5px;
}
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.between {
  justify-content: space-between;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}
.stat {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.stat strong {
  font-size: 36px;
  display: block;
  line-height: 1.2;
}
.stat p {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.two-col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  min-width: 0;
}
.card p:last-child {
  margin-bottom: 0;
}
.horse-card {
  padding: 0;
  overflow: hidden;
}
.horse-portrait {
  height: 170px;
  background: #e3e8d9;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.horse-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.horse-initial {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 82px;
  color: #8ba181;
}
.horse-body {
  padding: 22px;
}
.horse-card h3 {
  margin: 0;
}
.badge {
  font-size: 11px;
  font-weight: 650;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--sage);
  color: var(--primary);
}
.badge.warning {
  background: #f9e5d5;
  color: #92532c;
}
.badge.danger {
  background: #fae3df;
  color: #922e2e;
}
.badge.neutral {
  background: #eff0ea;
  color: #67756a;
}
.list {
  display: grid;
  gap: 0;
}
.list-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.list-item:last-child {
  border-bottom: 0;
}
.list-item p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.list-item strong {
  font-size: 15px;
}
.list-item .actions {
  flex-shrink: 0;
}
.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.toolbar input {
  flex: 1;
  min-width: 150px;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.tabs button {
  font-size: 12px;
}
.tabs .active {
  background: var(--ink);
  color: white;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.detail-grid .full {
  grid-column: 1/-1;
}
dl {
  margin: 0;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
}
dt {
  color: var(--muted);
  font-size: 12px;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.account-wrap {
  position: relative;
}
#account-menu {
  position: absolute;
  right: 0;
  top: 52px;
  width: 230px;
  z-index: 40;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 40px #173e3518;
  padding: 8px;
}
#account-menu button,
#account-menu a {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  background: none;
  color: var(--ink);
  padding: 12px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
}
#menu-toggle {
  display: none;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 15px 24px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 40px #173e3530;
  max-width: 90vw;
  overflow-wrap: anywhere;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  width: min(640px, calc(100vw - 24px));
  max-height: 90dvh;
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: #153b3066;
  backdrop-filter: blur(4px);
}
dialog header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
dialog footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 16px;
}
input,
textarea,
select {
  display: block;
  background: white;
  border: 1px solid #cdd7c9;
  border-radius: 10px;
  width: 100%;
  padding: 12px;
  color: var(--ink);
  min-height: 46px;
  margin-top: 5px;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: var(--primary);
}
textarea {
  min-height: 95px;
  resize: vertical;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
}
fieldset label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.form-grid .full {
  grid-column: 1/-1;
}
#form-error,
.error {
  color: #a03131;
}
.notice {
  background: var(--sage);
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 13px;
  margin: 18px 0;
}
.notice.warning {
  background: #f9e5d5;
}
#impersonation {
  background: #b42231;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 12px 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  font-size: 13px;
}
body.impersonating {
  padding-top: var(--impersonation-height, 80px);
}
body.impersonating aside {
  top: var(--impersonation-height, 80px);
  height: calc(100dvh - var(--impersonation-height, 80px));
}
#impersonation button {
  background: white;
  color: #a0212e;
  font-size: 12px;
  padding: 8px 12px;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 20px;
}
.calendar .day {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px;
  min-height: 105px;
  min-width: 0;
  font-size: 12px;
}
.calendar .day.today {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.calendar .day b {
  display: block;
}
.calendar .calendar-event {
  font-size: 10px;
  background: var(--sage);
  border-radius: 5px;
  padding: 4px;
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.clock-focus {
  text-align: center;
  min-height: 55dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--sage);
  border-radius: 24px;
  padding: 30px;
}
.clock-focus .clock-value {
  font-size: 56px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
  margin: 20px 0;
}
.clock-focus .clock-button {
  font-size: 20px;
  min-height: 90px;
  width: min(360px, 100%);
  border-radius: 20px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-size: 11px;
}
.check-row {
  display: flex;
  align-items: start;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.check-row input {
  margin-top: 5px;
  flex-shrink: 0;
}
.check-row p {
  margin: 0;
}
.timeline {
  border-left: 2px solid var(--line);
  padding-left: 20px;
}
.timeline article {
  padding: 0 0 24px;
}
.file-card img {
  max-width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
}
.demo-ribbon {
  background: var(--lime);
  color: var(--ink);
  padding: 10px 20px;
  font-size: 12px;
  text-align: center;
}
.public-header {
  padding: 30px 6vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.marketing main {
  padding: 0 6vw;
  max-width: 1500px;
  margin: auto;
}
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8vw;
  align-items: center;
  min-height: 76vh;
  padding: 35px 0 80px;
}
.hero h1 {
  font-size: clamp(44px, 4.6vw, 72px);
  line-height: 1.08;
}
.hero em {
  font-family: Georgia, serif;
  font-weight: normal;
}
.lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  margin: 26px 0;
}
.login-card {
  background: white;
  border: 1px solid var(--line);
  padding: 34px;
  border-radius: 24px;
  box-shadow: 0 20px 70px #173e3508;
}
.login-card button {
  width: 100%;
  margin: 6px 0;
}
.login-card small {
  font-size: 11px;
}
.scroll-cue {
  display: block;
  margin-top: 48px;
  font-size: 12px;
  text-decoration: none;
  animation: breath 3s infinite;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 35px 0 80px;
}
.feature-grid article {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.feature-grid p {
  font-size: 14px;
  color: var(--muted);
}
.sales {
  padding: 50px 0 70px;
  border-top: 1px solid var(--line);
}
details {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.marketing footer {
  border-top: 1px solid var(--line);
  padding: 30px 6vw;
  font-size: 12px;
}
#demo-entry {
  position: fixed;
  inset: 0;
  box-shadow: 0 0 0 100vmax #153b3066;
  z-index: 150;
}
#demo-entry input[type="checkbox"] {
  display: inline-block;
}
#demo-entry .demo-entry-trap {
  display: none;
}
@keyframes breath {
  50% {
    transform: translateY(4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .hero {
    gap: 30px;
  }
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .app-shell {
    display: block;
  }
  aside {
    position: fixed;
    width: 270px;
    z-index: 90;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  aside.open {
    transform: none;
    box-shadow: 0 0 0 100vmax #173e3555;
  }
  .topbar {
    padding: 14px 18px;
    height: 74px;
  }
  #menu-toggle {
    display: inline-flex;
    padding: 6px 10px;
    background: transparent;
    color: var(--ink);
    font-size: 23px;
  }
  #main {
    padding: 26px 18px 60px;
  }
  h1 {
    font-size: 31px;
  }
  h2 {
    font-size: 23px;
  }
  .page-heading {
    align-items: start;
    flex-wrap: wrap;
    gap: 16px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 29px;
  }
  .grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 20px;
  }
  .horse-card {
    padding: 0;
  }
  .list-item {
    align-items: start;
    flex-wrap: wrap;
    gap: 12px;
  }
  .list-item .actions {
    margin-left: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  dialog {
    padding: 22px 18px;
  }
  dialog footer {
    flex-wrap: wrap;
  }
  .calendar {
    gap: 2px;
  }
  .calendar .day {
    padding: 4px;
    min-height: 90px;
    font-size: 10px;
  }
  .calendar .calendar-event {
    font-size: 9px;
    padding: 2px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 20px 0 55px;
    gap: 40px;
  }
  .hero h1 {
    font-size: 44px;
  }
  .public-header {
    padding: 24px 6vw;
  }
  .public-header .quiet {
    font-size: 12px;
  }
  .brand {
    font-size: 24px;
  }
  .login-card {
    padding: 25px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .marketing main {
    padding: 0 6vw;
  }
  .clock-focus {
    min-height: 65dvh;
    padding: 24px 15px;
  }
  .clock-focus .clock-value {
    font-size: 44px;
  }
  #impersonation {
    font-size: 11px;
    padding: 10px 12px;
    justify-content: space-between;
    min-height: 80px;
  }
  .toolbar > * {
    max-width: 100%;
  }
  dl {
    grid-template-columns: 105px minmax(0, 1fr);
  }
  .row .button {
    font-size: 13px;
  }
  .notice {
    padding: 15px;
  }
  body {
    overflow-wrap: anywhere;
  }
}

.search-select {
  position: relative;
  min-width: 0;
  width: 100%;
}
.search-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  opacity: 0 !important;
  clip-path: inset(50%);
  pointer-events: none;
}
.search-select-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 38px 12px 13px;
  background: #fff;
  border: 1px solid #cdd7c9;
  border-radius: 10px;
  color: var(--ink);
  text-overflow: ellipsis;
}
.search-select-input:focus {
  outline: 3px solid var(--lime);
}
.search-select-input[aria-invalid="true"] {
  border-color: #b64c43;
}
.search-select-chevron {
  position: absolute;
  right: 4px;
  top: 6px;
  bottom: 4px;
  width: 30px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.search-select-list {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 6px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 36px #173e3523;
  overflow: auto;
  overscroll-behavior: contain;
  z-index: 100000;
  font: 14px/1.5 system-ui;
}
.search-select-option {
  padding: 11px 12px;
  min-height: 44px;
  border-radius: 7px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.search-select-option:hover,
.search-select-option.focused {
  background: var(--sage);
}
.search-select-option[aria-selected="true"] {
  font-weight: 700;
}
.search-select-empty {
  padding: 14px;
  color: var(--muted);
}
.toolbar > .search-select {
  width: auto;
  min-width: 130px;
  max-width: 230px;
}
.clock-focus:fullscreen {
  border-radius: 0;
  min-height: 100dvh;
  width: 100%;
  justify-content: center;
}
.clock-focus:fullscreen .clock-value {
  font-size: 80px;
}
@media (max-width: 760px) {
  .search-select-input {
    font-size: 16px;
  }
  .toolbar > .search-select {
    max-width: 100%;
    flex: 1;
  }
}

.clock-focus-exit {
  display: none;
}
body.clock-mode .clock-focus {
  position: fixed;
  inset: 0;
  z-index: 100;
  min-height: 100dvh;
  width: 100%;
  border-radius: 0;
  padding: 24px;
  background: var(--sage);
}
body.clock-mode .clock-focus-exit {
  display: flex;
  position: absolute;
  top: 20px;
  left: 20px;
}
body.clock-mode .topbar,
body.clock-mode aside,
body.clock-mode #main > *:not(.clock-focus) {
  display: none;
}
body.clock-mode .clock-value {
  font-size: 72px;
}
body.clock-mode.impersonating .clock-focus {
  top: var(--impersonation-height, 80px);
  min-height: calc(100dvh - var(--impersonation-height, 80px));
}
/* Independent color and shape tokens: every combination uses the same contrast-safe palette. */
.card,
.stat,
.login-card,
.horse-card,
.clock-focus,
.cal-month-day,
.cal-event,
dialog {
  border-radius: var(--card-radius, 18px);
}
button,
.button,
input,
textarea,
.search-select-input,
.search-select-list {
  border-radius: var(--button-radius, 10px);
}
aside,
.topbar {
  background: color-mix(in srgb, var(--paper) 40%, white);
}
.horse-portrait {
  background: var(--sage);
}
.horse-initial {
  color: var(--muted);
}
.brand span {
  color: var(--primary);
}
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.calendar-controls label {
  margin: 0;
}
.cal-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}
.filter-chips {
  margin: 12px 0 24px;
}
.filter-chips button {
  font-size: 11px;
  padding: 7px 10px;
}
.cal-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--card-radius, 18px);
  background: white;
  max-height: 70dvh;
}
.cal-week {
  display: grid;
  grid-template-columns: 60px repeat(var(--days), minmax(125px, 1fr));
  min-width: 100%;
  width: max(100%, calc(var(--days) * 140px + 60px));
}
.cal-column {
  min-width: 0;
  border-left: 1px solid var(--line);
}
.cal-column > header,
.cal-time-labels > b {
  display: block;
  background: var(--paper);
  height: 54px;
  padding: 16px 8px;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 3;
}
.cal-day-body {
  height: 1296px;
  position: relative;
}
.cal-time-labels > span {
  display: block;
  height: 54px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 10px;
}
.cal-slot {
  height: 54px;
  border-bottom: 1px solid var(--line);
}
.cal-slot:hover {
  background: var(--sage);
}
.cal-event {
  position: relative;
  background: var(--sage);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, white);
  margin: 4px;
  overflow: hidden;
  min-height: 38px;
}
.cal-day-body > .cal-event {
  position: absolute;
  left: 0;
  right: 0;
  margin-top: 0;
  z-index: 2;
}
.cal-event.overdue {
  border-left: 4px solid var(--accent);
}
.cal-event.done {
  opacity: 0.7;
}
.cal-event-open {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  width: 100%;
  height: 100%;
  background: none;
  color: var(--ink);
  padding: 7px;
  font-size: 11px;
  border-radius: inherit;
  text-align: left;
  gap: 0;
  min-height: 0;
}
.cal-event-open b {
  line-height: 1.3;
}
.cal-event-open small {
  font-size: 9px;
}
.cal-resize {
  position: absolute;
  bottom: 0;
  right: 0;
  min-height: 16px;
  width: 100%;
  height: 16px;
  padding: 0;
  cursor: ns-resize;
  opacity: 0.55;
  border-radius: 0;
  background: var(--primary);
  color: white;
  line-height: 16px;
}
.cal-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cal-month-day {
  background: white;
  border: 1px solid var(--line);
  padding: 8px;
  min-height: 150px;
  min-width: 0;
}
.cal-month-day.today {
  border-color: var(--primary);
}
.cal-month-day > b {
  font-size: 11px;
}
.cal-month-day > button {
  padding: 2px 8px;
  min-height: 30px;
}
.cal-agenda-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  gap: 20px;
}
.cal-agenda-row > div {
  flex: 1;
  min-width: 0;
}
.design-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.design-choice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: var(--card-radius, 18px);
  cursor: pointer;
}
.design-choice input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}
.design-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--swatch);
}
.shape-swatch {
  width: 36px;
  height: 28px;
  border: 2px solid var(--primary);
  background: var(--sage);
}
.design-preview {
  background: var(--sage);
  margin: 24px 0;
}
.cal-filters select[multiple] {
  max-height: 120px;
}
@media (max-width: 1000px) {
  .cal-filters {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
  .design-options {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 760px) {
  .cal-filters {
    grid-template-columns: 1fr 1fr;
  }
  .cal-month {
    grid-template-columns: 1fr;
  }
  .cal-month > div:empty {
    display: none;
  }
  .cal-month-day {
    min-height: 80px;
  }
  .cal-month-day .cal-event-open {
    font-size: 13px;
  }
  .cal-agenda-row {
    flex-wrap: wrap;
  }
  .calendar-controls {
    align-items: start;
  }
  .calendar-controls .row {
    gap: 6px;
  }
  .calendar-controls label {
    max-width: 160px;
  }
  .design-options {
    grid-template-columns: 1fr 1fr;
  }
  .cal-filters .search-select {
    min-width: 0;
  }
  .cal-scroll {
    max-height: 72dvh;
  }
  .cal-event {
    touch-action: pan-y;
  }
}
.cal-week {
  grid-template-columns: 60px repeat(var(--days), minmax(105px, 1fr));
  width: max(100%, calc(var(--days) * 110px + 60px));
}
.cal-day-body .cal-event-open {
  padding: 4px;
  font-size: 10px;
  line-height: 1.2;
}
.cal-day-body .cal-event-open small {
  display: none;
}
.cal-day-body .cal-event {
  touch-action: none;
}
.cal-resize {
  height: 10px;
  min-height: 10px;
  line-height: 10px;
}
.cal-dragging {
  z-index: 50 !important;
  opacity: 0.7;
  box-shadow: 0 10px 24px #173e3555;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary);
}
