:root {
    --bg: #f6f3ee;
    --panel: #ffffff;
    --panel-soft: #fcfaf7;
    --border: #e3ddd4;
    --text: #2d2a26;
    --muted: #6f685f;
    --heading: #1f1c18;
    --primary: #6f4e37;
    --primary-hover: #5c3f2c;
    --success: #2f7d4a;
    --success-hover: #27673d;
    --danger: #b44a4a;
    --danger-hover: #943d3d;
    --shadow: 0 10px 30px rgba(30, 24, 18, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --max-width: 1400px;
    --add-on: #13756f;
    --add-on-strong: #0d5652;
    --add-on-soft: #e3f4f2;
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(to bottom, #f8f5f0, #f2ede6);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.admin-page {
    min-height: 100vh;
    padding: 40px 20px;
}

.admin-shell {
    max-width: var(--max-width);
    margin: 0 auto;
}

.admin-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.admin-card + .admin-card {
    margin-top: 24px;
}

.admin-title {
    margin: 0 0 8px;
    font-size: 2rem;
    color: var(--heading);
    line-height: 1.2;
}

.admin-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-actions form {
    margin: 0;
}

.admin-inline-form {
    display: contents;
}

.announcement-email-preview {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 16px;
    overflow-x: auto;
}

.announcement-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.announcement-test-form input[type="email"] {
    flex: 1 1 260px;
    min-width: 0;
}

.announcement-error {
    color: var(--danger);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.announcement-status-sending { background: #fff4d6; color: #7a5a00; }
.announcement-status-sent { background: #e5f5ea; color: #23663b; }
.announcement-status-finished_with_errors { background: #fdecec; color: #8f2d2d; }

.invite-share-link {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 400;
}

.admin-section-title {
    margin: 0 0 14px;
    font-size: 1.3rem;
    color: var(--heading);
}

.admin-form {
    display: grid;
    gap: 14px;
}

.admin-form label {
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 4px;
    display: block;
}

.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="email"],
.admin-form input[type="tel"],
.admin-form input[type="date"],
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.12);
}

.admin-button,
.admin-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
    white-space: nowrap;
}

.admin-button:hover,
.admin-link-button:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.admin-button-primary,
.admin-link-button-primary {
    background: var(--primary);
    color: #fff;
}

.admin-button-primary:hover,
.admin-link-button-primary:hover {
    background: var(--primary-hover);
}

.admin-button-success,
.admin-link-button-success {
    background: var(--success);
    color: #fff;
}

.admin-button-success:hover,
.admin-link-button-success:hover {
    background: var(--success-hover);
}

.admin-button-danger,
.admin-link-button-danger {
    background: var(--danger);
    color: #fff;
}

.admin-button-danger:hover,
.admin-link-button-danger:hover {
    background: var(--danger-hover);
}

.admin-button-secondary,
.admin-link-button-secondary {
    background: #ece6de;
    color: var(--heading);
}

.admin-button-secondary:hover,
.admin-link-button-secondary:hover {
    background: #e3dbd1;
}

.admin-alert {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e7b8b8;
    background: #fff3f3;
    color: #8f2d2d;
    font-weight: 600;
}

.admin-alert-success {
    border-color: #bcdcc7;
    background: #effaf3;
    color: #23663b;
}

.admin-filter-form {
    gap: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.admin-table th {
    background: #f7f2eb;
    color: var(--heading);
    font-size: 0.95rem;
}

.admin-table tbody tr:hover {
    background: #fcfaf7;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: flex-start;
    white-space: nowrap;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: capitalize;
}

.status-pending {
    background: #f7ecd1;
    color: #825f12;
}

.status-approved {
    background: #dff2e5;
    color: #21643a;
}

.status-denied {
    background: #f6dddd;
    color: #922f2f;
}

.status-paid {
    background: #dcecf8;
    color: #205b86;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 20px;
}

.detail-card {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
}

.detail-card h2,
.detail-card h3 {
    margin-top: 0;
    color: var(--heading);
}

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

.detail-item {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 2px;
    font-weight: 700;
}

.detail-value {
    color: var(--text);
    word-break: break-word;
}

.detail-subtext {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 2px;
}

.dog-list {
    display: grid;
    gap: 16px;
}

.dog-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.top-space {
    margin-top: 24px;
}

.dashboard-booking-section {
    border-left-width: 6px;
}

.dashboard-arrivals-section {
    border-left-color: #df7a18;
}

.dashboard-departures-section {
    border-left-color: #2878c7;
}

.dashboard-pending-section {
    border-left-color: #c89b34;
}

.dashboard-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.dashboard-section-heading .admin-section-title {
    margin-bottom: 0;
}

.dashboard-section-kicker {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1ebe3;
    color: var(--heading);
    font-weight: 800;
}

.dashboard-summary-table {
    min-width: 680px;
}

#calendar {
    margin-top: 12px;
    width: 100%;
}

.calendar-stall-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbf8f3;
}

.calendar-stall-controls > div {
    display: grid;
    gap: 3px;
}

.calendar-stall-controls span {
    color: var(--muted);
    font-size: 0.88rem;
}

.fc {
    --fc-border-color: #e3ddd4;
    --fc-page-bg-color: #ffffff;
    --fc-neutral-bg-color: #f7f2eb;
    --fc-list-event-hover-bg-color: #fcfaf7;
    --fc-today-bg-color: #f3ede4;
    --fc-event-text-color: #ffffff;
    color: #2d2a26;
    font-family: Arial, Helvetica, sans-serif;
}

.fc .fc-toolbar-title {
    font-size: 1.35rem;
    color: #1f1c18;
    line-height: 1.2;
}

.fc .fc-button {
    background: #6f4e37;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 700;
    box-shadow: none;
}

.fc .fc-button:hover {
    background: #5c3f2c;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc .fc-button-primary:not(:disabled):active {
    background: #4d3525;
}

.fc .fc-daygrid-event,
.fc .fc-timeline-event {
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 800;
}

.fc .fc-timeline-event {
    min-height: 34px;
    margin: 0;
}

.fc .fc-timeline-event-harness {
    margin: 0 !important;
}

.fc .fc-timeline-event .fc-event-main,
.fc .fc-daygrid-event .fc-event-main {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 2px 6px;
}

.calendar-event-name {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc .fc-event.calendar-event-arrival {
    border-left: 6px solid #df7a18 !important;
}

.fc .fc-event.calendar-event-departure {
    border-right: 6px solid #2878c7 !important;
}

.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number {
    color: #2d2a26;
    text-decoration: none;
    font-weight: 700;
}

.fc .fc-scrollgrid,
.fc .fc-timeline {
    border-radius: 14px;
    overflow: hidden;
}

.fc .fc-resource-timeline-divider {
    background: #f7f2eb;
}

.fc .fc-datagrid-cell-cushion {
    font-weight: 700;
    color: #2d2a26;
}

.fc .fc-datagrid-cell-main {
    font-weight: 600;
    font-size: 14px;
}

.fc .fc-datagrid-cell-main,
.fc .fc-datagrid-cell-cushion {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc .fc-datagrid-cell-frame,
.fc .fc-timeline-lane-frame {
    min-height: 36px;
}

.fc .fc-timeline-slot-cushion {
    font-weight: 600;
}

.calendar-tooltip {
    font-size: 0.9rem;
    line-height: 1.5;
}

.calendar-tooltip strong {
    color: #1f1c18;
}

.stall-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    align-items: end;
}

.stall-date-form {
    display: grid;
    grid-template-columns: minmax(220px, 320px) auto;
    gap: 12px;
    align-items: end;
}

.stall-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.stall-legend-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 700;
    color: var(--heading);
}

.stall-legend-chip-large {
    min-width: 120px;
    background: #f6ede4;
}

.stall-legend-chip-small {
    min-width: 96px;
    background: #f9f6f1;
}

.stall-legend-note {
    color: var(--muted);
    font-size: 0.95rem;
}

.stall-board-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.stall-sidebar-card {
    position: sticky;
    top: 20px;
}

.stall-selection-card {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.stall-selection-empty {
    color: var(--muted);
}

.stall-selection-heading {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--heading);
    margin-bottom: 10px;
}

.stall-selection-meta {
    margin-top: 6px;
    color: var(--text);
}

.stall-unit-list {
    display: grid;
    gap: 12px;
}

.stall-unit-button {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    text-align: left;
    padding: 14px;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.stall-unit-button:hover,
.stall-unit-button:focus {
    border-color: #c7b6a5;
    box-shadow: 0 10px 24px rgba(30, 24, 18, 0.08);
    transform: translateY(-1px);
    outline: none;
}

.stall-unit-button.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.12);
}

.stall-unit-button.is-unassigned {
    background: #fff9ef;
}

.stall-unit-button.is-assigned {
    background: #f6fbf8;
}

.stall-unit-button-inline {
    padding: 12px;
}

.stall-unit-title {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--heading);
}

.stall-unit-owner,
.stall-unit-meta,
.stall-unit-status {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.93rem;
}

.stall-board-card {
    min-width: 0;
}

.stall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.stall-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff 0%, #fbf8f3 100%);
    box-shadow: 0 12px 28px rgba(30, 24, 18, 0.06);
}

.stall-card-large {
    min-height: 320px;
    grid-column: span 2;
}

.stall-card-small {
    min-height: 240px;
}

.stall-card.is-occupied {
    border-color: #d6cabf;
}

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

.stall-card-title {
    margin: 0;
    color: var(--heading);
    font-size: 1.2rem;
}

.stall-card-size {
    margin: 4px 0 0;
    color: var(--muted);
}

.stall-size-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
}

.stall-size-badge-large {
    background: #efe2d4;
    color: #6e4428;
}

.stall-size-badge-small {
    background: #ece7de;
    color: #5e554c;
}

.stall-card-body {
    flex: 1;
    display: grid;
    gap: 10px;
    align-content: start;
}

.stall-occupant-owner {
    margin: 0;
    color: var(--text);
}

.stall-empty-state {
    border: 1px dashed #d5c8bc;
    border-radius: 14px;
    padding: 18px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.8);
}

.stall-card-footer {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.stall-size-form {
    display: grid;
    gap: 8px;
}

.stall-size-label {
    font-weight: 700;
    color: var(--heading);
    font-size: 0.92rem;
}

.stall-size-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.stall-minimal-shell {
    padding-bottom: 24px;
}

.stall-view-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f4efe8;
}

.stall-view-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 9px;
    color: var(--muted);
    font-weight: 800;
}

.stall-view-option:hover {
    text-decoration: none;
    color: var(--primary);
}

.stall-view-option.is-active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(45, 34, 24, 0.08);
}

.stall-minimal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
}

.stall-minimal-date-form {
    display: grid;
    grid-template-columns: minmax(220px, 280px) auto;
    gap: 10px;
    align-items: end;
}

.stall-minimal-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--muted);
    font-size: 0.95rem;
}

.stall-period-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.stall-save-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fcfaf7;
}

.stall-save-status {
    color: var(--muted);
    font-weight: 700;
}

.stall-save-status.is-dirty {
    color: #8a5b24;
}

.stall-save-status.is-error {
    color: #9e3430;
}

.stall-save-controls .admin-button:disabled {
    cursor: default;
    opacity: 0.55;
}

.stall-upstairs-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px dashed #cfc2b4;
    border-radius: 14px;
    background: #f7f2eb;
}

.stall-upstairs-controls > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stall-upstairs-summary {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e9e1d8;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.stall-upstairs-summary.has-occupants {
    background: #dcebdd;
    color: #2f6a3c;
}

.stall-upstairs-board {
    padding: 18px;
    border: 1px solid #d7cabb;
    border-radius: 18px;
    background: linear-gradient(180deg, #faf6f0 0%, #f3ece3 100%);
}

.stall-upstairs-heading {
    text-align: center;
    margin-bottom: 16px;
}

.stall-upstairs-heading .admin-section-title,
.stall-upstairs-heading .admin-subtitle {
    margin-left: auto;
    margin-right: auto;
}

.stall-upstairs-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 148px));
    justify-content: center;
    gap: 16px;
}

.stall-upstairs-row .stall-stack-item {
    min-width: 0;
}

.stall-upstairs-row .stall-square-small {
    width: 100%;
    max-width: none;
}

.stall-week-workspace {
    overflow: hidden;
    border: 1px solid #d4c8bb;
    border-radius: 16px;
    background: #eee7dd;
}

.stall-week-canvas-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid #d4c8bb;
    background: #fbf8f4;
}

.stall-week-canvas-toolbar > div:first-child {
    display: grid;
    gap: 2px;
}

.stall-week-canvas-toolbar span {
    color: var(--muted);
    font-size: 0.84rem;
}

.stall-canvas-touch-help {
    display: none;
}

.stall-week-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stall-week-zoom-controls .admin-button {
    min-width: 42px;
    padding: 8px 11px;
}

#stall-zoom-value {
    min-width: 54px;
    text-align: center;
    color: var(--text);
    font-weight: 800;
}

.stall-week-canvas {
    position: relative;
    width: 100%;
    height: clamp(760px, 78vh, 1050px);
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    outline: none;
    background-color: #e7ded2;
    background-image:
        linear-gradient(rgba(111, 78, 55, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(111, 78, 55, 0.055) 1px, transparent 1px);
    background-size: 24px 24px;
}

.stall-week-canvas:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(111, 78, 55, 0.35);
}

.stall-week-canvas.is-pan-ready,
.stall-week-canvas.is-panning {
    cursor: grabbing;
}

@media (hover: none), (pointer: coarse) {
    .stall-canvas-desktop-help {
        display: none;
    }

    .stall-canvas-touch-help {
        display: inline;
    }

    .stall-week-canvas {
        cursor: default;
        overscroll-behavior: contain;
        -webkit-user-select: none;
        user-select: none;
    }

    .stall-week-canvas.is-panning {
        cursor: default;
    }
}

.stall-week-strip {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(7, 600px);
    align-items: flex-start;
    gap: 28px;
    width: max-content;
    transform-origin: 0 0;
    will-change: transform;
}

.stall-week-day {
    position: relative;
    width: 600px;
    padding: 16px;
    border: 1px solid #cabdad;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(45, 34, 24, 0.10);
}

.stall-single-day {
    position: relative;
}

.stall-arrival-badge-wrap {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.stall-arrival-badge-wrap.is-weekly {
    position: absolute;
    top: 12px;
    left: 50%;
    z-index: 8;
    margin: 0;
    transform: translateX(-50%);
}

.stall-arrival-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #b9afa5;
    color: #fff;
    box-shadow: 0 4px 12px rgba(45, 34, 24, 0.2);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
}

.stall-week-day .stall-arrival-badge {
    width: 38px;
    height: 38px;
    font-size: 0.92rem;
}

.stall-arrival-badge.has-unadded {
    background: #a84336;
    animation: stall-arrival-attention 1.6s ease-in-out infinite;
}

@keyframes stall-arrival-attention {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(168, 67, 54, 0.28);
    }
    50% {
        transform: scale(1.12);
        box-shadow: 0 0 0 9px rgba(168, 67, 54, 0.12), 0 6px 18px rgba(168, 67, 54, 0.35);
    }
}

@media (prefers-reduced-motion: reduce) {
    .stall-arrival-badge.has-unadded {
        animation: none;
    }
}

.stall-week-day-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.stall-week-day-header > div:first-child {
    display: grid;
    gap: 2px;
}

.stall-week-day-name {
    color: var(--heading);
    font-size: 1.05rem;
    font-weight: 900;
}

.stall-week-day-header strong {
    color: var(--muted);
    font-size: 0.86rem;
}

.stall-week-day .stall-upstairs-controls {
    padding: 9px 10px;
    font-size: 0.82rem;
}

.stall-week-day .stall-upstairs-controls .admin-button {
    padding: 7px 9px;
    font-size: 0.76rem;
}

.stall-week-day .stall-upstairs-summary {
    min-height: 24px;
    font-size: 0.72rem;
}

.stall-week-day .stall-upstairs-board {
    padding: 12px;
}

.stall-week-day .stall-upstairs-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.stall-week-day .stall-board-minimal {
    --stall-row-height: 118px;
    --stall-hallway-width: 52px;
    --stall-cross-hallway-height: 58px;
    width: 566px;
}

.stall-week-day .stall-square-name {
    font-size: 0.82rem;
}


.stall-week-day[aria-busy="true"] {
    opacity: 0.72;
    pointer-events: none;
}

.stall-minimal-empty {
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 18px;
    color: var(--muted);
    background: #fcfaf7;
}

.stall-board-minimal {
    --stall-row-height: clamp(110px, 17vw, 142px);
    --stall-hallway-width: clamp(42px, 7vw, 64px);
    --stall-cross-hallway-height: clamp(48px, 8vw, 68px);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--stall-hallway-width) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    width: min(100%, 780px);
    margin: 0 auto;
    overflow: hidden;
    border: 2px solid #8f7b69;
    border-radius: 8px;
    background: #e9e1d7;
    box-shadow: 0 14px 34px rgba(45, 34, 24, 0.09);
}

.stall-board-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
}

.stall-board-column:first-child {
    grid-column: 1;
    border-right: 1px solid #b6a593;
}

.stall-board-column:last-child {
    grid-column: 3;
    border-left: 1px solid #b6a593;
}

.stall-stack-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stall-column-spacer {
    width: 100%;
    height: var(--stall-cross-hallway-height);
    flex: 0 0 var(--stall-cross-hallway-height);
    background: #e9e1d7;
    border-top: 1px solid #b6a593;
    border-bottom: 1px solid #b6a593;
}

.stall-square {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid #d7cfc4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(30, 24, 18, 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.stall-square-large {
    max-width: 188px;
}

.stall-square-small {
    width: 82%;
    max-width: 148px;
}

.stall-square-split {
    width: 100%;
    max-width: 188px;
    aspect-ratio: 2.55 / 1;
    border-radius: 14px;
}

.stall-square-split .stall-square-dog {
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    padding: 8px 38px 8px 8px;
    border-radius: 10px;
}

.stall-square-split .stall-square-name {
    font-size: 0.88rem;
}

.stall-square-split .stall-empty-button {
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    border-radius: 10px;
}


.stall-board-minimal .stall-stack-item {
    position: relative;
    height: var(--stall-row-height);
    flex: 0 0 var(--stall-row-height);
    gap: 0;
}

.stall-board-minimal .stall-stack-item-split {
    height: calc(var(--stall-row-height) / 2);
    flex-basis: calc(var(--stall-row-height) / 2);
}

.stall-eight-cluster {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    width: 100%;
    height: var(--stall-row-height);
    flex: 0 0 var(--stall-row-height);
}

.stall-eight-cluster-stacked,
.stall-eight-cluster-tall {
    min-width: 0;
    height: 100%;
}

.stall-eight-cluster-stacked {
    display: flex;
    flex-direction: column;
}

.stall-eight-cluster-tall {
    border-left: 1px solid #b6a593;
}

.stall-board-minimal .stall-eight-cluster-tall .stall-stack-item {
    height: 100%;
    flex-basis: 100%;
}

.stall-board-minimal .stall-eight-cluster-stacked .stall-stack-item:last-child .stall-square,
.stall-board-minimal .stall-eight-cluster-tall .stall-square {
    border-bottom: 1px solid #b6a593;
}

.stall-board-minimal .stall-square,
.stall-board-minimal .stall-square-large,
.stall-board-minimal .stall-square-small,
.stall-board-minimal .stall-square-split {
    width: 100%;
    max-width: none;
    height: 100%;
    aspect-ratio: auto;
    border: 0;
    border-bottom: 1px solid #b6a593;
    border-radius: 0;
    box-shadow: none;
}

.stall-board-minimal .stall-board-column .stall-stack-item:last-child .stall-square {
    border-bottom: 0;
}

.stall-board-minimal .stall-square-caption {
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 2;
    max-width: calc(100% - 20px);
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #6e5a49;
    font-size: 0.76rem;
    line-height: 1.1;
    pointer-events: none;
}

.stall-board-minimal .stall-stack-item-split .stall-square-caption {
    top: 5px;
    left: 7px;
    padding: 2px 5px;
    font-size: 0.68rem;
}

.stall-board-minimal .stall-square-dog,
.stall-board-minimal .stall-square-split .stall-square-dog {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border-radius: 10px;
}

.stall-board-minimal .stall-stack-item-split .stall-square-dog {
    padding: 0;
}

.stall-board-minimal .stall-empty-button,
.stall-board-minimal .stall-square-split .stall-empty-button {
    width: calc(100% - 18px);
    height: calc(100% - 18px);
    border-radius: 10px;
}

.stall-board-minimal .stall-static-label {
    max-width: calc(100% - 24px);
}

.stall-square.is-empty {
    background: linear-gradient(180deg, #ffffff 0%, #faf7f3 100%);
    cursor: pointer;
}

.stall-square.is-occupied {
    background: linear-gradient(180deg, #fbf9f5 0%, #f4efe8 100%);
}

.stall-square.is-static {
    background: linear-gradient(180deg, #f7f3ee 0%, #efe7dc 100%);
    border-style: dashed;
    box-shadow: none;
    cursor: default;
}

.stall-square.is-empty:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(111, 78, 55, 0.08);
}

.stall-square.is-drop-target {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(111, 78, 55, 0.12);
    transform: translateY(-2px);
}

.stall-static-label {
    max-width: 72%;
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    color: #6e5a49;
}

.stall-square-caption {
    max-width: 180px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
    color: #6e5a49;
}

.stall-square-dog {
    position: relative;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 14px;
    background: #6f4e37;
    color: #fff;
    padding: 14px;
    cursor: grab;
    touch-action: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.stall-square-dog.is-touch-dragging {
    opacity: 0.35;
}

.stall-touch-drag-preview {
    position: fixed;
    z-index: 500;
    margin: 0;
    pointer-events: none;
    opacity: 0.9;
    box-shadow: 0 12px 30px rgba(30, 24, 18, 0.28);
    transform: scale(1.04);
    transform-origin: center;
}

.stall-square-dog.is-arriving {
    background: #d97816;
}

.stall-square-dog.is-departing {
    background: #00CCFF;
}

.stall-square-dog.is-moving-out {
    background: #e75b9b;
}

.stall-square-dog.is-moving-in {
    background: #7b4bc1;
}

.stall-add-on-dot {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--add-on);
    box-shadow: 0 1px 3px rgba(30, 24, 18, 0.35);
}

.stall-square.has-turnover-pair .stall-add-on-dot {
    right: 4px;
    bottom: 4px;
    width: 10px;
    height: 10px;
}

.stall-square-dog[data-transfer-role="source"] {
    cursor: default;
}

.stall-square-occupants {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px;
}

.stall-square-occupants .stall-square-dog {
    flex: 1 1 0;
}

.stall-square.has-turnover-pair .stall-square-occupants {
    gap: 4px;
}

.stall-square.has-turnover-pair .stall-square-dog {
    min-height: 0;
    border-radius: 7px;
}

.stall-square-dog.is-dragging {
    opacity: 0.45;
    cursor: grabbing;
}

.stall-square-name {
    display: block;
    width: 100%;
    text-align: center;
    font-weight: 800;
    line-height: 1.25;
    word-break: break-word;
}

.stall-square-dog-copy {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    gap: 3px;
    width: calc(100% - 24px);
    text-align: center;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.stall-square-transition-time {
    display: block;
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1.15;
    color: rgba(255, 255, 255, 0.94);
}

.stall-square.has-turnover-pair .stall-square-name {
    font-size: 0.78rem;
}

.stall-square.has-turnover-pair .stall-square-transition-time {
    font-size: 0.65rem;
}

.stall-turnover-add-button {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 5;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #2f7d4a;
    color: #fff;
    box-shadow: 0 3px 10px rgba(30, 24, 18, 0.2);
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.stall-turnover-add-button:hover,
.stall-turnover-add-button:focus {
    background: #27673d;
    outline: none;
}

.stall-empty-button {
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    border: 1px dashed #d4cabd;
    border-radius: 14px;
    background: #ffffff;
    color: #b4a292;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.stall-empty-button:hover,
.stall-empty-button:focus {
    border-color: var(--primary);
    color: var(--primary);
    background: #fcfaf7;
    outline: none;
}

.stall-empty-plus {
    font-size: 2rem;
    line-height: 1;
}



.stall-board-minimal .stall-eight-cluster .stall-square-occupants {
    padding: 5px 3px;
}

.stall-board-minimal .stall-eight-cluster .stall-square-dog-copy {
    gap: 2px;
    width: calc(100% - 12px);
}

.stall-board-minimal .stall-eight-cluster-tall .stall-square-dog-copy {
    width: calc(100% - 4px);
}

.stall-board-minimal .stall-eight-cluster .stall-square-name {
    font-size: 0.7rem;
    line-height: 1.1;
}

.stall-board-minimal .stall-eight-cluster-stacked .stall-square-name {
    font-size: 0.62rem;
}

.stall-board-minimal .stall-eight-cluster .stall-square-transition-time {
    font-size: 0.57rem;
    line-height: 1.05;
}

.stall-board-minimal .stall-eight-cluster .stall-square-caption {
    top: 3px;
    left: 4px;
    max-width: calc(100% - 8px);
    padding: 1px 4px;
    font-size: 0.57rem;
}


.stall-week-day .stall-board-minimal .stall-eight-cluster .stall-square-name {
    font-size: 0.55rem;
}

.stall-week-day .stall-board-minimal .stall-eight-cluster-stacked .stall-square-name {
    font-size: 0.52rem;
}

.stall-week-day .stall-board-minimal .stall-eight-cluster-tall .stall-square-name {
    font-size: 0.5rem;
}

.stall-week-day .stall-board-minimal .stall-eight-cluster .stall-square-transition-time {
    font-size: 0.5rem;
}

.stall-week-day .stall-board-minimal .stall-eight-cluster .stall-square-caption {
    font-size: 0.5rem;
}


.stall-size-key {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.92rem;
}

.stall-size-key-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stall-size-key-box {
    display: inline-block;
    border: 1px solid #d7cfc4;
    border-radius: 8px;
    background: #fff;
}

.stall-size-key-box-large {
    width: 24px;
    height: 24px;
}

.stall-size-key-box-small {
    width: 18px;
    height: 18px;
}

.stall-size-key-box-static {
    width: 24px;
    height: 24px;
    border-style: dashed;
    background: linear-gradient(180deg, #f7f3ee 0%, #efe7dc 100%);
}

.stall-size-key-box-arriving,
.stall-size-key-box-departing,
.stall-size-key-box-moving-out,
.stall-size-key-box-moving-in {
    width: 24px;
    height: 18px;
    border-color: transparent;
}

.stall-size-key-box-arriving {
    background: #00CCFF;
}

.stall-size-key-box-departing {
    background: #d97816;
}

.stall-size-key-box-moving-out {
    background: #e75b9b;
}

.stall-size-key-box-moving-in {
    background: #7b4bc1;
}

.stall-modal[hidden] {
    display: none;
}

.stall-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
}

.stall-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 16, 12, 0.42);
}

.stall-modal-dialog {
    position: relative;
    width: min(540px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    margin: 24px auto;
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(17, 12, 8, 0.24);
}

.stall-transfer-dialog input[type="time"] {
    width: 100%;
    margin-top: 8px;
}

.stall-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
}

.stall-modal-close {
    border: none;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #7d6c5e;
}

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

.stall-modal-option {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 14px;
    cursor: pointer;
}

.stall-modal-option:hover,
.stall-modal-option:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(111, 78, 55, 0.10);
    outline: none;
}

.stall-modal-option-title {
    display: block;
    font-weight: 800;
    color: var(--heading);
}

.stall-modal-option-meta {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.92rem;
}

.stall-leave-dialog {
    width: min(620px, calc(100% - 32px));
}

.stall-leave-status {
    min-height: 24px;
    margin: 0 0 14px;
    color: var(--muted);
    font-weight: 700;
}

.stall-leave-status.is-error {
    color: #9e3430;
}

.stall-leave-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 950px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stall-board-layout {
        grid-template-columns: 1fr;
    }

    .stall-sidebar-card {
        position: static;
    }
}

@media (max-width: 900px) {
    .admin-page {
        padding: 16px;
    }

    .admin-shell {
        max-width: 100%;
    }

    .admin-card {
        padding: 16px;
        border-radius: 14px;
    }

    .admin-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .admin-title {
        font-size: 1.5rem;
    }

    .admin-subtitle {
        font-size: 0.95rem;
    }

    .admin-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

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

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

    .admin-table-actions {
        flex-wrap: wrap;
        white-space: normal;
    }

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

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

    .stall-card-large {
        grid-column: span 2;
    }

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

@media (max-width: 760px) {
    .admin-page {
        padding: 12px;
    }

    .admin-card {
        padding: 14px;
    }

    .admin-title {
        font-size: 1.3rem;
    }

    .admin-section-title {
        font-size: 1.1rem;
    }

    .admin-actions,
    .admin-actions.top-space {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
    }

    .admin-button,
    .admin-link-button {
        width: 100%;
        justify-content: center;
        padding: 12px 14px;
        font-size: 0.95rem;
        white-space: normal;
    }

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

    .admin-table {
        min-width: 0;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        background: #fff;
        border: 1px solid #e6ddd2;
        border-radius: 14px;
        padding: 12px;
        margin-bottom: 14px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    }

    .admin-table td {
        border: none;
        padding: 8px 0;
        white-space: normal;
    }

    .admin-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        color: #5d4b3d;
        margin-bottom: 3px;
    }

    .admin-table-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        white-space: normal;
    }

    .detail-list {
        grid-template-columns: 1fr;
    }

    .dog-card {
        padding: 14px;
    }

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

    .stall-card-large,
    .stall-card-small {
        grid-column: span 1;
        min-height: auto;
    }

    .stall-size-controls {
        grid-template-columns: 1fr;
    }

    .stall-board-minimal {
        gap: 0;
    }

    .stall-square-large {
        max-width: 158px;
    }

    .stall-square-small {
        width: 82%;
        max-width: 128px;
    }

    .stall-square-split {
        width: 100%;
        max-width: 158px;
    }

    .stall-minimal-summary {
        flex-direction: column;
        align-items: start;
        gap: 6px;
    }

    .stall-save-controls {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .stall-save-status {
        text-align: center;
    }

    .stall-upstairs-controls {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .stall-upstairs-controls > div {
        justify-content: center;
    }

    .stall-upstairs-row {
        gap: 8px;
    }

    .stall-upstairs-board {
        padding: 14px 10px;
    }

    .stall-upstairs-row .stall-square-caption {
        font-size: 0.76rem;
    }

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

    .calendar-stall-controls {
        display: grid;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .fc .fc-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .fc .fc-toolbar-title {
        font-size: 1.1rem;
        text-align: center;
    }

    .fc .fc-button {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .fc .fc-daygrid-day-number,
    .fc .fc-col-header-cell-cushion,
    .fc .fc-datagrid-cell-cushion,
    .fc .fc-timeline-slot-cushion {
        font-size: 0.82rem;
    }

    .fc .fc-daygrid-event,
    .fc .fc-timeline-event {
        font-size: 0.75rem;
        padding: 0;
    }

    .fc .fc-resource-timeline-divider,
    .fc .fc-datagrid-cell-frame,
    .fc .fc-timeline-lane-frame {
        min-height: 36px;
    }
}

@media (max-width: 640px) {
    .admin-title {
        font-size: 1.2rem;
    }

    .admin-subtitle {
        font-size: 0.9rem;
    }

    .fc .fc-toolbar-title {
        font-size: 1rem;
    }

    .fc .fc-button {
        min-height: 38px;
        font-size: 0.8rem;
    }

    .stall-view-switch {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .stall-minimal-date-form,
    .stall-period-navigation {
        width: 100%;
    }

    .stall-period-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .stall-period-navigation .stall-minimal-summary {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .stall-week-canvas-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .stall-week-zoom-controls {
        justify-content: flex-start;
    }

    .stall-week-zoom-controls .admin-button {
        min-height: 44px;
    }

    .stall-week-canvas {
        height: 620px;
    }

    .stall-week-strip {
        grid-template-columns: repeat(7, 600px);
    }
}



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

.editor-span-2 { grid-column: span 2; }
.editor-span-3 { grid-column: span 3; }
.editor-span-4 { grid-column: 1 / -1; }

.editor-grid [hidden] { display: none; }

.admin-form input[type="number"],
.admin-form input[type="time"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 1rem;
}

.editor-hint {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.editor-hint.is-error,
.editor-pairing-row.is-error {
    color: #8f2d2d;
    opacity: 1;
    font-weight: 700;
}

.editor-pairing {
    display: grid;
    gap: 6px;
    margin: 12px 0;
}

.editor-pairing-row {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    font-weight: 600;
}

.editor-dog {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin: 0 0 14px;
    background: #fff;
    min-width: 0;
}

.editor-dog-legend {
    padding: 0 8px;
    font-weight: 800;
    color: var(--heading);
}

.editor-add-ons-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
    color: var(--heading);
}

.editor-add-ons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-form .editor-add-on-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-soft);
    cursor: pointer;
}

.admin-form .editor-add-on-option:has(input:checked) {
    border-color: var(--add-on);
    background: var(--add-on-soft);
}

.add-ons-callout {
    border: 2px solid var(--add-on);
    background: var(--add-on-soft);
}

.add-ons-callout h2 {
    color: var(--add-on-strong);
    margin-bottom: 12px;
}

.add-ons-callout-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.add-ons-callout-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.add-ons-callout-dog {
    min-width: 120px;
    font-weight: 800;
    color: var(--heading);
}

.add-on-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dog-card .add-on-badges {
    margin: -4px 0 14px;
}

.add-on-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--add-on);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.add-on-badge-small {
    padding: 2px 8px;
    font-size: 0.75rem;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .editor-grid {
        grid-template-columns: 1fr 1fr;
    }

    .editor-span-3,
    .editor-span-4 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .editor-span-2,
    .editor-span-3 {
        grid-column: auto;
    }
}

.editor-danger-zone {
    border-color: #e7b8b8;
}


.staff-only-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #efe6da;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.repeat-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: #e6eef9;
    color: #234a80;
    font-size: 0.78rem;
    font-weight: 700;
    vertical-align: middle;
}

.repeat-panel {
    border-color: #c9d8ee;
    background: #f6f9fd;
}

.repeat-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.repeat-item {
    padding: 12px 14px;
    border: 1px solid #d5e0f0;
    border-radius: 12px;
    background: #fff;
}

.repeat-item-header {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    font-weight: 600;
}

.repeat-match-reason {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.repeat-warning {
    margin-top: 8px;
    color: #8a5a00;
    font-size: 0.9rem;
    font-weight: 600;
}

.repeat-note {
    margin-top: 8px;
    white-space: pre-wrap;
}

.repeat-note-empty {
    color: var(--muted);
}

.dog-staff-notes {
    display: grid;
    gap: 12px;
}

.repeat-dog-history {
    padding: 12px 14px;
    border: 1px solid #c9d8ee;
    border-radius: 12px;
}

.repeat-details > summary {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    cursor: pointer;
}

.repeat-details > summary::-webkit-details-marker {
    display: none;
}

.repeat-details > summary::before {
    content: "\25B8";
    color: #234a80;
    font-size: 1.1rem;
    transition: transform 0.15s ease;
}

.repeat-details[open] > summary::before {
    transform: rotate(90deg);
}

.repeat-summary-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--heading);
}

.repeat-badge-notes {
    background: #fdf1d8;
    color: #8a5a00;
}

.repeat-details[open] > summary {
    margin-bottom: 8px;
}

.vet-records-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.vet-records-heading h2 {
    margin-bottom: 0;
}

.vet-records-status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    background: #eee9e2;
    color: var(--muted);
}

.vet-records-status-received {
    background: #dff2e5;
    color: #21643a;
}

.vet-records-status-waiting {
    background: #f7ecd1;
    color: #825f12;
}

.vet-records-plan {
    margin: 12px 0 0;
}

.document-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.document-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.document-info {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1 1 240px;
}

.document-name {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.document-meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.document-remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--danger);
    white-space: nowrap;
}

.document-upload-form input[type="file"] {
    max-width: 100%;
}

.vet-missing-badge {
    background: #f7ecd1;
    color: #825f12;
    text-decoration: none;
}

.vet-missing-badge:hover {
    background: #f0dfb4;
}

.dashboard-list-note {
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    color: var(--muted);
}

.stall-square-dog:focus-visible {
    outline: 3px solid var(--heading);
    outline-offset: 2px;
}

.stall-dog-menu[hidden] {
    display: none;
}

.stall-dog-menu {
    position: fixed;
    inset: 0;
    z-index: 210;
}

.stall-dog-menu-backdrop {
    position: absolute;
    inset: 0;
}

.stall-dog-menu.is-sheet .stall-dog-menu-backdrop {
    background: rgba(22, 16, 12, 0.42);
}

.stall-dog-menu-panel {
    position: absolute;
    width: 270px;
    max-width: calc(100vw - 16px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 18px 40px rgba(17, 12, 8, 0.22);
}

.stall-dog-menu.is-sheet .stall-dog-menu-panel {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    max-width: none;
    border-radius: 18px 18px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}

.stall-dog-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
}

.stall-dog-menu-header .stall-modal-close {
    font-size: 1.6rem;
    padding: 0 2px;
}

.stall-dog-menu-title {
    margin: 0;
    color: var(--heading);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    word-break: break-word;
}

.stall-dog-menu-meta {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.stall-dog-menu-actions {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.stall-dog-menu-action {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    color: var(--heading);
    font: inherit;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.stall-dog-menu-action[hidden] {
    display: none;
}

.stall-dog-menu-action:hover,
.stall-dog-menu-action:focus-visible {
    border-color: var(--primary);
    background: #faf6f1;
    outline: none;
}

.stall-dog-menu-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.stall-dog-menu-action-danger {
    color: #a3362e;
}

.stall-dog-menu.is-sheet .stall-dog-menu-action {
    padding: 14px;
    font-size: 1rem;
}

.booking-list-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #f1ebe3;
}

.booking-list-tab {
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.booking-list-tab:hover {
    color: var(--heading);
}

.booking-list-tab:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.booking-list-tab.is-active {
    background: #fff;
    color: var(--heading);
    box-shadow: 0 1px 3px rgba(30, 24, 18, 0.14);
}

.booking-list-card .admin-table-actions {
    flex-wrap: wrap;
    white-space: normal;
}

@media (min-width: 761px) {
    .booking-list-card .admin-table-actions {
        min-width: 330px;
    }
}

@media (max-width: 760px) {
    .booking-list-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        flex: 1 1 auto;
        min-width: 0;
    }

    .booking-list-tab {
        padding: 8px 6px;
        font-size: 0.9rem;
        text-align: center;
    }
}

.stall-multi-booking-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    z-index: 2;
    padding: 1px 6px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    background: rgba(30, 24, 18, 0.55);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.4;
    pointer-events: none;
}

.stall-dog-menu-bookings {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    max-height: min(60vh, 420px);
    overflow-y: auto;
}

.stall-dog-menu-bookings[hidden],
.stall-dog-menu-actions[hidden] {
    display: none;
}

.stall-dog-menu-booking {
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.stall-dog-menu-booking:first-child {
    border-top: 0;
    padding-top: 0;
}

.stall-dog-menu-booking-heading {
    display: grid;
    gap: 2px;
    color: var(--heading);
}

.stall-dog-menu-booking .stall-dog-menu-meta {
    margin: 0;
}

.stall-dog-menu-booking .stall-dog-menu-actions {
    margin-top: 8px;
}

.stall-overlap-list {
    margin: 0 0 14px;
    padding-left: 20px;
    color: var(--heading);
    line-height: 1.45;
}

.stall-leave-actions [hidden] {
    display: none;
}
