/* Design system components, rebuilt from docs/design/design-system/components/ as classes.  Each block names the
   component it mirrors.  Screen-specific styles live in screens/. */

/* Button (actions/Button.jsx): .btn plus a variant and an optional size. */
.btn {
  height: 44px; padding: 0 18px; border-radius: var(--radius-control); border: 0;
  font-family: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); cursor: pointer;
}
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
.btn.has-icon { padding-left: 14px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn-lg.has-icon { padding-left: 20px; }
.btn-xl { height: 52px; padding: 0 20px; font-size: 16px; border-radius: var(--radius-choice); }
.btn-block { width: 100%; }
.btn-gold { color: var(--navy-950); box-shadow: var(--shadow-gold-btn); }
.btn-gold:hover { color: var(--navy-950); }
.btn-outline { background: transparent; color: var(--walnut-900); border: 1.5px solid var(--walnut-900); }
.btn-outline:hover { color: var(--walnut-900); background: var(--walnut-50); }
.btn-white { background: #FFFFFF; color: var(--ink-900); border: 1px solid var(--paper-500); }
.btn-white:hover { color: var(--ink-900); background: var(--paper-25); }
.btn-navy { background: var(--navy-700); color: #FFFFFF; }
.btn-navy:hover { background: var(--navy-900); color: #FFFFFF; }
.btn-ghost { background: transparent; color: var(--navy-700); padding: 0 6px; }
.btn-ghost:hover { color: var(--navy-900); }
.btn-danger { background: var(--ruby-800); color: #FFFFFF; }
.btn-danger:hover { background: var(--ruby-950); color: #FFFFFF; }
/* Known gap: a button with a trailing icon. */
.btn .icon-trailing { margin-right: -4px; }

/* Card (display/Card.jsx). */
.card {
  background: var(--surface-card); border: 1px solid var(--border-card); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; overflow: hidden;
}
.card-padded { padding: var(--space-16); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: 18px 20px 10px; }
.card-padded .card-head { padding: 0 0 10px; }
.card-title { font-family: var(--font-display); font-size: var(--type-title-sm); font-weight: var(--weight-display); color: var(--text-heading); }
.card-action { font-size: 14px; font-weight: 600; text-decoration: none; }
.card-row { padding: 14px 20px; border-top: 1px solid var(--border-row); }

/* SectionHeader and Eyebrow (display/SectionHeader.jsx). */
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-12); }
.section-title { font-family: var(--font-display); font-size: var(--type-section); font-weight: var(--weight-display); color: var(--text-heading); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--ink-500); }

/* Page titles are navy; section titles are walnut. */
.page-title { font-family: var(--font-display); font-size: var(--type-title-lg); font-weight: var(--weight-display); color: var(--text-title); line-height: var(--leading-tight); }
.page-subtitle { font-size: var(--type-body); color: var(--text-muted); }

/* TextField, Select and Textarea (forms/). */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-900); }
.field-hint { font-size: 13px; font-weight: 400; color: var(--text-muted); line-height: var(--leading-note); }
.field-error { font-size: 13px; font-weight: 600; color: var(--ruby-800); }
.input, .select, .textarea {
  width: 100%; height: var(--control-h-field); padding: 0 12px; border: 1px solid var(--border-input);
  border-radius: var(--radius-control); background: #FFFFFF; font-size: 15px; font-weight: 400; color: var(--ink-900);
}
.select {
  appearance: none; padding: 0 40px 0 12px;
  background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233B2314' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: var(--leading-note); }
.input[aria-invalid='true'], .select[aria-invalid='true'] { border-color: var(--ruby-800); }
@media (max-width: 1023px) { .input, .select { height: var(--control-h-field-phone); } }

/* Checkbox (forms/Checkbox.jsx), plain and boxed. */
.checkbox { display: flex; align-items: center; gap: var(--space-8); min-height: 34px; font-size: 13px; font-weight: 700; color: var(--walnut-900); cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin: 0; accent-color: var(--walnut-900); flex-shrink: 0; }
.checkbox-boxed {
  gap: var(--space-10); min-height: 44px; padding: 0 12px; border-radius: var(--radius-control);
  border: 1px solid var(--border-input); background: #FFFFFF; font-size: 14px;
}
.checkbox-boxed input { width: 20px; height: 20px; accent-color: var(--gold-500); }
.checkbox-boxed:has(input:checked) { border: 1.5px solid var(--gold-500); background: var(--navy-950); color: var(--gold-200); }

/* Badge (display/Badge.jsx). */
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: var(--radius-tag); white-space: nowrap; background: var(--status-open-bg); color: var(--status-open-fg); }
.badge-sm { font-size: 11px; padding: 3px 8px; }
.badge-new { background: var(--status-new-bg); color: var(--status-new-fg); }
.badge-open { background: var(--status-open-bg); color: var(--status-open-fg); }
.badge-overdue { background: var(--status-overdue-bg); color: var(--status-overdue-fg); }
.badge-overdue-solid { background: var(--ruby-800); color: #FFFFFF; }
.badge-done { background: var(--status-done-bg); color: var(--status-done-fg); }
.badge-district { background: var(--navy-50); color: var(--navy-900); }
.badge-tint { background: var(--paper-100); color: var(--walnut-900); }

/* Chip (actions/Chip.jsx), the toggle variant, as links that filter a list.  The current one has aria-current. */
.chip {
  min-height: var(--chip-h); padding: 0 14px; border-radius: 18px; border: 1px solid var(--paper-500); background: #FFFFFF;
  font-size: 13px; font-weight: 600; color: var(--ink-900); white-space: nowrap; flex-shrink: 0; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
}
.chip:hover { color: var(--ink-900); border-color: var(--navy-700); }
.chip[aria-current='true'] { border-color: var(--navy-950); background: var(--navy-950); color: var(--gold-200); font-weight: 700; }
.chip-count { font-weight: 500; opacity: 0.85; }
.chips { display: flex; gap: var(--space-8); overflow-x: auto; scrollbar-width: none; }

/* Avatar (display/Avatar.jsx). */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--navy-700); color: var(--gold-200);
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--ring-gold); flex-shrink: 0;
}
.avatar-36 { width: 36px; height: 36px; }
.avatar-light { background: var(--navy-50); color: var(--navy-900); box-shadow: none; font-size: 12px; }

/* Callout (display/Callout.jsx). */
.callout { display: flex; gap: var(--space-10); padding: 12px 14px; border-radius: var(--radius-choice); background: var(--walnut-100); color: var(--walnut-900); font-size: 13px; line-height: var(--leading-note); }
.callout .icon { margin-top: 1px; }

/* StatusCard (feedback/StatusCard.jsx), with the warning tone the design lists as a known gap.  The error tone is
   the base look. */
.status-card { background: #FFFFFF; border: 1px solid var(--border-card); border-radius: var(--radius-card); padding: 24px 20px; display: flex; flex-direction: column; gap: var(--space-12); }
.status-card-label { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: var(--radius-tag); background: var(--ruby-50); color: var(--ruby-800); }
.status-card-info .status-card-label { background: var(--navy-50); color: var(--navy-900); }
.status-card-archived .status-card-label { background: var(--paper-200); color: var(--walnut-900); }
.status-card-warning .status-card-label { background: var(--gold-50); color: var(--gold-900); }
.status-card-warning .status-card-title { font-size: var(--type-title-sm); }
.status-card-title { font-family: var(--font-display); font-size: 24px; font-weight: var(--weight-display); color: var(--navy-950); }
.status-card-body { font-size: 15px; color: var(--ink-700); line-height: 1.55; }
.status-card .btn { height: 46px; }
.status-page { width: 100%; max-width: 560px; }

/* Flash messages, shown at the top of the content. */
.flash { padding: 12px 14px; border-radius: var(--radius-choice); font-size: 14px; line-height: var(--leading-note); }
.flash-notice { background: var(--green-50); color: var(--green-800); }
.flash-alert { background: var(--ruby-50); color: var(--ruby-800); }

/* A submitted form's buttons wait for the answer (submit_lock_controller.js). */
[aria-busy='true'] { cursor: progress; opacity: 0.6; }

/* A list row that opens one thing: the whole row is clickable.  The row gets .row-link and its main link gets
   .row-link-target, whose ::after covers the row.  Other controls in the row (checkboxes, secondary links) sit above
   that cover, so they still work on their own. */
.row-link { position: relative; }
.row-link:hover { background: var(--paper-25); }
.row-link-target::after { content: ''; position: absolute; inset: 0; }
.row-link :is(a, button, input, select, label, form):not(.row-link-target) { position: relative; z-index: 1; }
