@font-face {
    font-family: Inter;
    src: url("inter.woff") format("woff");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --canvas: #f5f6f3;
    --paper: #fff;
    --ink: #172e3c;
    --muted: #566873;
    --border: #dbe4e5;
    --navy: #12384d;
    --navy-hover: #0b293a;
    --gold: #f4c46c;
    --radius: 20px;
    --shadow: 0 3px 5px #152c3b05, 0 12px 32px #152c3b06;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.5;
    background: var(--canvas);
    color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
img { display: block; max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.032em; }
h2 { font-size: clamp(1.23rem, 1.1rem + .45vw, 1.54rem); font-weight: 740; }
h3 { font-size: 1rem; font-weight: 700; }
.muted { color: var(--muted); font-size: .9rem; }
:focus-visible { outline: 3px solid #287b9c; outline-offset: 3px; }
.skip-link {
    position: fixed; z-index: 5; top: .5rem; left: .5rem; transform: translateY(-180%);
    border-radius: 8px; background: var(--paper); padding: .7rem 1rem;
}
.skip-link:focus { transform: none; }

.site-shell { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--border); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 15px; text-decoration: none; min-width: 0; }
.brand-virbac { width: 92px; height: auto; flex: none; }
.brand-divider { display: inline-block; flex: none; width: 1px; height: 24px; background: var(--border); }
.brand-name { font-size: .91rem; font-weight: 740; letter-spacing: -.025em; }
.header-actions { display: flex; align-items: center; gap: 5px; }
.site-footer { margin-top: 2.25rem; }
.footer-inner {
    border-top: 1px solid var(--border); padding-block: 1rem 1.5rem;
    color: var(--muted); font-size: .77rem;
}

.hero {
    position: relative; isolation: isolate; overflow: hidden; border-radius: 24px;
    background: radial-gradient(ellipse at 93% -25%, #276278 0, transparent 66%),
        linear-gradient(108deg, #102c3d, #13394c 69%, #16455b);
    color: #fff;
}
.hero::before {
    position: absolute; z-index: -1; inset: 0; content: "";
    background: repeating-radial-gradient(ellipse at 88% 105%, transparent 0 18px, #ffffff16 19px, transparent 20px 34px);
    mask-image: linear-gradient(90deg, transparent 24%, #000);
    pointer-events: none;
}
.client-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 22%);
    align-items: center; gap: 1.5rem; min-height: 166px; padding: 18px 40px; margin-block: 22px;
}
.hero-copy { min-width: 0; }
.eyebrow {
    color: #d6e5eb; margin-bottom: .65rem; font-size: .72rem; line-height: 1.4;
    font-weight: 750; letter-spacing: .115em;
}
.hero h1, .login-hero-title { font-size: clamp(2.25rem, 1.35rem + 2.6vw, 3.3rem); font-weight: 790; line-height: 1.05; letter-spacing: -.055em; }
.hero h1 span { color: var(--gold); white-space: nowrap; }
.hero-copy > p:last-child, .login-hero p:last-child { max-width: 470px; margin-top: .85rem; color: #e1edf0; font-size: .95rem; }
.hero-art { display: grid; place-items: center; align-self: stretch; }
.logo-frame {
    display: block; width: min(166px, 100%); aspect-ratio: 767 / 834;
    position: relative; overflow: hidden; filter: drop-shadow(0 5px 6px #06131b54);
}
.logo-frame img { position: absolute; left: -23.21%; top: -65.71%; width: 140.81%; height: auto; max-width: none; }
.client-hero .logo-frame { width: min(118px, 100%); }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; gap: 20px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.calendar-card, .selection-card, .availability-card, .orders-card { padding: 24px; min-width: 0; }
.section-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.section-top .muted { margin-top: .42rem; }
.calendar { margin-top: 1.15rem; container: agenda-calendar / inline-size; }
.calendar-heading {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    margin-bottom: .82rem; padding-top: .95rem; border-top: 1px solid var(--border);
}
.month-identity h3 { font-size: clamp(1.05rem, .98rem + .38vw, 1.28rem); }
.month-identity .muted { display: block; margin-top: .2rem; font-size: .78rem; }
.calendar-nav { display: flex; align-items: center; gap: 6px; flex: none; }
.calendar-nav .icon-button { width: 38px; height: 38px; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekdays { margin-bottom: 6px; padding-block: .33rem; border-radius: 7px; background: #f0f4f3; }
.weekdays span { text-align: center; font-size: .74rem; font-weight: 720; color: #40555f; }

.calendar-state {
    --date-fill: #e6f4e9;
    --date-edge: #97bea4;
    --date-text: #164e33;
    --date-icon: #236644;
    --date-icon-ink: #fff;
}
.calendar-state[data-state="pendente"] {
    --date-fill: #fff0d1; --date-edge: #d5a04f; --date-text: #744205; --date-icon: #885004;
}
.calendar-state[data-state="confirmado"] {
    --date-fill: #e4effd; --date-edge: #8eafdc; --date-text: #173e6e; --date-icon: #205b9c;
}
.calendar-state[data-state="bloqueado"] {
    --date-fill: #f7e9ee; --date-edge: #cf9bab; --date-text: #742941; --date-icon: #863953;
}
.calendar-state[data-state="selecionado"] {
    --date-fill: #143a4e; --date-edge: #143a4e; --date-text: #fff;
    --date-icon: #f6cd77; --date-icon-ink: #292615;
}
.calendar-state[data-state="passado"] {
    --date-fill: #f1f2f4; --date-edge: #d4dade; --date-text: #505d65; --date-icon: #59656e;
}
.day, .legend li {
    color: var(--date-text); border: 1px solid var(--date-edge); background: var(--date-fill);
}
.day {
    display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-content: center;
    min-width: 0; min-height: 56px; padding: 4px; gap: 4px; border-radius: 9px; line-height: 1.05;
}
.day-number { font-size: 1.04rem; font-weight: 790; font-variant-numeric: tabular-nums; }
.day-state { display: none; }
.day:not(:disabled):hover { box-shadow: inset 0 0 0 1.5px var(--date-icon); }
.day.selecionado[data-state="bloqueado"] { box-shadow: inset 0 0 0 2px var(--date-icon); }
.day.selecionado[data-state="bloqueado"] .day-number { text-decoration: underline 2px; text-underline-offset: 2px; }
.state-mark {
    display: inline-block; position: relative; flex: none; width: 20px; height: 20px;
    border-radius: 5px; background: var(--date-icon); color: var(--date-icon-ink);
}
.state-mark::before, .state-mark::after { position: absolute; inset: 0; margin: auto; }
[data-state="disponivel"] .state-mark::before, [data-state="passado"] .state-mark::before {
    content: ""; width: 10px; height: 2px; border-radius: 1px; background: currentColor;
}
[data-state="disponivel"] .state-mark::after {
    content: ""; width: 2px; height: 10px; border-radius: 1px; background: currentColor;
}
[data-state="pendente"] .state-mark::before {
    content: ""; width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%;
}
[data-state="pendente"] .state-mark::after {
    content: ""; width: 4px; height: 5px; border: solid currentColor;
    border-width: 0 0 1.5px 1.5px; transform: translate(1px, -1px);
}
[data-state="confirmado"] .state-mark { border-radius: 50%; }
[data-state="confirmado"] .state-mark::before {
    content: ""; width: 10px; height: 6px; border: solid currentColor;
    border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg);
}
[data-state="bloqueado"] .state-mark::before {
    content: ""; width: 11px; height: 8px; border: 1.5px solid currentColor; border-radius: 2px;
    transform: translateY(2px);
}
[data-state="bloqueado"] .state-mark::after {
    content: ""; width: 7px; height: 5px; border: 1.5px solid currentColor; border-bottom: 0;
    border-radius: 4px 4px 0 0; transform: translateY(-3px);
}
[data-state="selecionado"] .state-mark::before {
    content: ""; width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 2px;
}
[data-state="selecionado"] .state-mark::after {
    content: ""; width: 7px; height: 4px; border: solid currentColor;
    border-width: 0 0 1.5px 1.5px; transform: translateY(-.5px) rotate(-45deg);
}
.calendar-loading { padding: .75rem 0; }
.calendar-retry { margin-top: .55rem; }

.legend { list-style: none; padding: 0; margin: 0 0 .85rem; display: flex; flex-wrap: wrap; gap: .38rem; }
.legend li {
    display: inline-flex; align-items: center; gap: 5px; padding: .25rem .45rem .25rem .28rem;
    border-radius: 8px; font-size: .75rem; font-weight: 700;
}

@container agenda-calendar (min-width: 630px) {
    .day {
        grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: start;
        min-height: 65px; padding: 7px 6px; gap: 5px 3px;
    }
    .day-state { display: block; grid-column: 1 / -1; text-align: start; font-size: .69rem; font-weight: 710; }
}

@container agenda-calendar (max-width: 430px) {
    .legend { gap: .32rem; }
    .legend li { gap: 4px; padding: .22rem .33rem .22rem .24rem; font-size: .72rem; }
    .legend .state-mark { width: 18px; height: 18px; }
}

.swatch { width: 8px; height: 8px; display: inline-block; flex: none; border-radius: 50%; background: #75828a; }
.swatch.pendente { background: #b67823; }
.swatch.confirmado { background: #2d75a5; }
.swatch.cancelado { background: #9d5d5b; }
.calendar-tools {
    margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem;
    display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px;
}
.calendar-tools .muted { font-size: .76rem; }
.year-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.year-month {
    border: 1px solid var(--border); border-radius: 11px; padding: .72rem .75rem; color: var(--ink);
    background: #f7faf8; text-align: start; display: grid; gap: .17rem; min-width: 0;
}
.year-month:hover { border-color: #79a491; background: #eef7f1; }
.year-month strong { font-size: .88rem; }
.year-month span { color: var(--muted); font-size: .72rem; }
.year-month .year-selected { color: var(--navy); font-weight: 700; }

.calendar-public .year-grid { gap: 10px; }
.calendar-public .year-month {
    position: relative; min-height: 72px; align-content: center; padding: .68rem 1.8rem .68rem .8rem;
    border-color: #ccdcd6; background: #f1f7f3;
}
.calendar-public .year-month:hover { border-color: #80aa98; background: #e8f3ec; }
.calendar-public .year-month[data-empty="true"] { background: #f5f6f6; border-color: var(--border); }
.calendar-public .year-month strong { font-size: .94rem; }
.calendar-public .year-month::after {
    position: absolute; inset-inline-end: .8rem; top: calc(50% - 4px);
    width: 7px; height: 7px; content: ""; border: solid #56776a; border-width: 0 1.5px 1.5px 0;
    transform: rotate(-45deg);
}
.calendar-public .day {
    grid-template-columns: minmax(0, 1fr); justify-items: center; min-height: 54px; padding: 4px;
}
.calendar-public .day .state-mark { width: 17px; height: 17px; }

@container agenda-calendar (max-width: 500px) {
    .calendar-public .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

.selection-heading { display: flex; align-items: center; gap: .65rem; }
.selection-icon {
    display: grid; place-items: center; width: 38px; height: 38px; flex: none;
    background: #eaf2f0; color: var(--navy); border-radius: 11px;
}
.selection-card > .muted, .availability-card > .muted { margin-block: .7rem .8rem; }
.selection-actions { display: grid; gap: .35rem; margin-top: .95rem; }

.btn, .icon-button {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 42px;
    border: 1px solid transparent; border-radius: 9px; padding: .56rem .88rem; line-height: 1.25;
    font-size: .86rem; font-weight: 700; text-align: center; text-decoration: none;
    transition: background-color .14s ease, border-color .14s ease;
}
.btn:disabled, .icon-button:disabled { opacity: .56; }
.btn.compact { min-height: 36px; padding: .42rem .65rem; font-size: .79rem; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:not(:disabled):hover { background: var(--navy-hover); }
.btn-light, .icon-button { background: #fff; border-color: var(--border); color: var(--navy); }
.btn-light:not(:disabled):hover, .icon-button:not(:disabled):hover { border-color: #9db6c1; background: #eff5f6; }
.btn-text { background: transparent; color: var(--navy); }
.btn-text:not(:disabled):hover { background: #eaf2f2; }
.btn-danger { color: #8f3531; border-color: #e9d1cc; background: #fff9f8; }
.btn-danger:not(:disabled):hover { background: #f8e8e5; }
.btn-gold { color: #2c260f; background: var(--gold); }
.btn-gold:not(:disabled):hover { background: #f7d08b; }
.btn-on-dark { color: #fff; border-color: #73909f; background: #ffffff12; }
.btn-on-dark:not(:disabled):hover { background: #ffffff23; }
.icon-button { width: 36px; height: 36px; min-height: 36px; padding: 0; flex: none; }
.chevron { display: block; border: solid currentColor; border-width: 0 1.7px 1.7px 0; width: 7px; height: 7px; transform: rotate(-45deg); }
.chevron.left { transform: rotate(135deg); }
.calendar-icon, .receipt-icon { position: relative; display: inline-block; flex: none; width: 16px; height: 16px; border: 1.7px solid currentColor; border-radius: 3px; }
.calendar-icon::before { position: absolute; top: 3.6px; left: 0; right: 0; border-top: 1.7px solid currentColor; content: ""; }
.receipt-icon { width: 13px; }
.receipt-icon::before { position: absolute; top: 4px; left: 2px; right: 2px; height: 4px; border-block: 1px solid currentColor; content: ""; }

.chip-list { display: flex; flex-wrap: wrap; gap: .38rem; list-style: none; padding: 0; margin: 0; }
.chip {
    min-height: 31px; padding: .28rem .5rem; border-radius: 7px; border: 1px solid #d2e0e5;
    display: inline-flex; align-items: center; gap: .45rem; color: var(--navy); background: #edf4f6;
    font-size: .79rem; font-weight: 690; font-variant-numeric: tabular-nums;
}
.chip-remove:hover { background: #dfecf0; }
.chip-remove span { font-size: 1.05rem; line-height: 1; }
.scroll-chips, .dialog-dates { max-height: 125px; overflow: auto; padding: .15rem .15rem .2rem; }
.message { padding: .66rem .8rem; margin-top: .7rem; border: 1px solid #ccdde5; border-radius: 9px; background: #eef5fa; color: #1b4963; font-size: .84rem; overflow-wrap: anywhere; }
.message.error { border-color: #efd3cb; background: #fff3ef; color: #88372b; }
.message.success { border-color: #cce3d5; background: #eef8f0; color: #22523a; }
.stack > .message { margin-top: 0; }

.narrow-shell { max-width: 620px; }
.gate-card, .setup-card { padding: clamp(21px, 4vw, 35px); margin-block: 2rem; }
.setup-card h1, .gate-card h1, .login-form-section h1 { font-size: clamp(1.5rem, 1.25rem + 1.3vw, 2.15rem); }
.setup-card > .muted, .gate-card > .muted, .login-form-section > .muted { margin-block: .45rem 1.25rem; }
.setup-card > .message { margin-bottom: .9rem; }
.setup-group { border: 1px solid var(--border); border-radius: 12px; padding: .85rem; margin: 0; min-width: 0; }
.setup-group legend { font-size: .9rem; font-weight: 730; padding: 0 .35rem; }
.setup-group > p { margin-top: .5rem; }
.stack { display: grid; gap: .9rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.field { display: block; min-width: 0; color: var(--ink); font-size: .81rem; font-weight: 680; }
.field.wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
    display: block; width: 100%; min-width: 0; min-height: 42px; padding: .55rem .63rem; margin-top: .3rem;
    border: 1px solid #cbd7db; border-radius: 8px; background: #fff; color: var(--ink);
    font-size: .88rem; font-weight: 450;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #6aa4bc; outline-offset: 1px; border-color: #6aa4bc; }
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #677985; }
.field-help, .optional { color: var(--muted); font-size: .76rem; font-weight: 450; }
.field > .field-help { display: block; margin-top: .33rem; }
.field-help code { overflow-wrap: anywhere; }
.login-shell { max-width: 930px; }
.login-wrap { display: grid; grid-template-columns: 1fr 1fr; margin: clamp(2rem, 7vw, 6rem) auto; border: 1px solid var(--border); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.login-hero { display: flex; flex-direction: column; justify-content: center; gap: 1rem; border-radius: 0; padding: 2rem; }
.login-hero .logo-frame { width: 120px; }
.login-hero-title { font-size: 2.25rem; }
.login-form-section { display: grid; align-content: center; padding: clamp(1.5rem, 4.5vw, 3.25rem); }
.login-form-section > .message { margin: 0 0 1rem; }
.back-link { margin-top: 1.2rem; color: var(--navy); font-size: .84rem; font-weight: 700; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

dialog {
    width: min(600px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px);
    border: 1px solid var(--border); border-radius: 18px; padding: 0; color: var(--ink); background: var(--paper);
    box-shadow: 0 24px 70px #0d273a42;
}
dialog::backdrop { background: #112b3dc2; }
.wide-dialog { width: min(720px, calc(100% - 32px)); }
.dialog-inner { padding: clamp(17px, 3.5vw, 26px); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: .9rem; margin-bottom: 1rem; }
.dialog-header .muted { margin-top: .35rem; }
.close-button { font-size: 1.3rem; font-weight: 500; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
#request-dates { margin-bottom: .9rem; }
.track-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .6rem; }
.receipt { margin: .8rem 0 1rem; border-radius: 12px; border: 1px solid var(--border); padding: 1rem; background: #f8faf9; display: grid; justify-items: start; gap: .6rem; }
.receipt p { font-size: .86rem; }
.protocol-block { display: grid; gap: .15rem; }
.protocol-block span { font-size: .73rem; color: var(--muted); font-weight: 650; }
.protocol-block strong { font: 700 .93rem/1.4 ui-monospace, monospace; overflow-wrap: anywhere; word-break: break-all; }
.copy-buffer { position: fixed; left: -200vw; top: 0; width: 1px; height: 1px; opacity: 0; }

.admin-hero {
    display: flex; align-items: end; justify-content: space-between; gap: 1.2rem;
    padding: 1.85rem 2.15rem; margin-block: 24px 16px;
}
.admin-hero h1 { font-size: clamp(2rem, 1.55rem + 1.5vw, 2.75rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.section-nav { display: flex; gap: 1.3rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.section-nav a { padding: .7rem .15rem; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 730; }
.section-nav a[aria-current] { color: var(--navy); border-color: var(--navy); }
.section-nav a:hover { color: var(--navy); }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat-card { padding: .85rem 1rem; text-align: start; color: var(--ink); border-radius: 14px; }
.stat-card:hover { border-color: #9ab7c3; }
.stat-card span { color: var(--muted); font-size: .81rem; display: flex; align-items: center; gap: 7px; }
.stat-card strong { display: block; margin-top: .2rem; font-size: 1.75rem; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.order-filters { display: grid; grid-template-columns: 2fr minmax(128px, 1fr) minmax(125px, 1fr) auto; gap: .6rem; align-items: end; margin: 1.1rem 0; }
.orders-table table { width: 100%; border-collapse: collapse; text-align: start; font-size: .85rem; }
.orders-table th { text-align: start; background: #eff4f4; color: var(--muted); font-size: .77rem; }
.orders-table th, .orders-table td { padding: .68rem .75rem; }
.orders-table th:first-child { border-radius: 8px 0 0 8px; }
.orders-table th:last-child { border-radius: 0 8px 8px 0; }
.orders-table td { border-bottom: 1px solid var(--border); vertical-align: middle; overflow-wrap: anywhere; }
.orders-table th:last-child, .orders-table td:last-child { text-align: end; }
.row-name { display: block; }
.row-meta { display: block; margin-top: .14rem; color: var(--muted); font-size: .74rem; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: .26rem .52rem; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.status-badge.pendente { background: #fbf0d9; color: #6b4312; }
.status-badge.confirmado { background: #e7f1f8; color: #1a5377; }
.status-badge.cancelado { background: #f6eae8; color: #7b403e; }
.orders-empty { background: #f7f9f8; border: 1px dashed #d2e0dc; border-radius: 12px; padding: 1.3rem; }
.orders-empty p { margin-top: .27rem; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; margin-top: .8rem; }
#block-form { padding-top: .9rem; margin-top: .9rem; border-top: 1px solid var(--border); }
#admin-selected-dates { margin-bottom: .35rem; }
#block-note { margin-top: .35rem; overflow-wrap: anywhere; }
.block-actions, .detail-top, .detail-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.detail-top { justify-content: space-between; align-items: center; }
.detail-grid { margin: .9rem 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.detail-grid > div { min-width: 0; padding: .55rem .65rem; background: #f4f7f7; border-radius: 8px; }
.detail-grid dt { color: var(--muted); font-size: .74rem; }
.detail-grid dd { margin: .12rem 0 0; font-size: .89rem; overflow-wrap: anywhere; }
.detail-grid a { color: #165b79; text-underline-offset: 2px; }
.detail-section { margin-top: .9rem; }
.detail-section h3, .edit-dates h3 { margin-bottom: .42rem; }
.detail-section p { font-size: .87rem; }
.detail-section.note { padding: .7rem; border-left: 3px solid #d3ae64; background: #f9f5ea; border-radius: 0 8px 8px 0; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-actions { justify-content: flex-end; border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .9rem; }
.date-add { display: grid; grid-template-columns: minmax(120px, 210px) auto; justify-content: start; align-items: end; gap: .5rem; margin-top: .55rem; }

@media (max-width: 850px) {
    .site-shell { width: calc(100% - 40px); }
    .client-hero { padding-inline: 29px; }
    .workspace-grid { grid-template-columns: minmax(0, 1.7fr) minmax(238px, 1fr); gap: 13px; }
    .calendar-card, .selection-card, .availability-card, .orders-card { padding: 18px; }
}
@media (max-width: 660px) {
    .site-shell { width: calc(100% - 26px); }
    .header-inner { min-height: 62px; gap: .4rem; }
    .brand { gap: 8px; }
    .brand-virbac { width: 65px; }
    .brand-name { font-size: .75rem; line-height: 1.15; }
    .brand-divider { height: 18px; }
    .header-track { font-size: .73rem; padding-inline: .5rem; min-height: 36px; flex: none; }
    .client-hero { min-height: 0; padding: 20px; grid-template-columns: minmax(0, 1fr) minmax(72px, 22%); gap: 10px; margin-block: 14px; border-radius: 18px; }
    .hero h1 { font-size: clamp(1.65rem, 1.26rem + 2.2vw, 2.5rem); }
    .hero-copy > p:last-child { font-size: .84rem; }
    .eyebrow { font-size: .62rem; letter-spacing: .08em; }
    .workspace-grid, .login-wrap { grid-template-columns: 1fr; }
    .card { border-radius: 15px; }
    .calendar-card, .selection-card, .availability-card, .orders-card { padding: 15px; }
    .calendar-heading { margin-bottom: .75rem; }
    .login-wrap { margin-block: 1.1rem; }
    .login-hero { padding: 1.25rem; flex-direction: row; justify-content: flex-start; align-items: center; }
    .login-hero .logo-frame { width: 64px; flex: none; }
    .login-hero-title { font-size: 1.6rem; }
    .login-hero p:last-child { font-size: .83rem; margin-top: .4rem; }
    .admin-hero { align-items: flex-start; flex-direction: column; padding: 1.2rem; margin-block: 14px 12px; border-radius: 18px; }
    .stat-card { padding: .62rem; }
    .stat-card span { font-size: .69rem; }
    .stats-grid { gap: .4rem; }
    .order-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-filters .field:first-child { grid-column: 1 / -1; }
    .order-filters .btn { grid-column: 1 / -1; justify-self: start; }
    .orders-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .orders-table table, .orders-table tbody, .orders-table tr { display: block; }
    .orders-table tr { border: 1px solid var(--border); border-radius: 10px; margin-bottom: .5rem; padding: .5rem .65rem; }
    .orders-table td { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: .1rem .35rem; border: 0; padding: .25rem 0; }
    .orders-table td::before { content: attr(data-label); color: var(--muted); font-size: .74rem; }
    .orders-table td > * { grid-column: 2; justify-self: start; }
    .orders-table td:last-child { text-align: start; }
}
@media (max-width: 405px) {
    .client-hero .logo-frame { width: 76px; }
    .header-track .receipt-icon { display: none; }
    .header-actions .btn { font-size: .71rem; padding-inline: .4rem; }
    .day { min-height: 52px; }
    .weekdays, .calendar-grid { gap: 4px; }
    .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: 1fr; }
    .track-form { grid-template-columns: 1fr; }
    .track-form .btn { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; }
}
