:root {
    --primary: #58c2ca;
    --primary-dark: #07808c;
    --accent: #e6007e;
    --accent-dark: #b90065;
    --blue: #1778c8;
    --green: #20a77b;
    --amber: #ca8a04;
    --red: #dc2626;
    --ink: #101a32;
    --muted: #667085;
    --line: #d8e7ed;
    --panel: #ffffff;
    --soft: #f4fbfc;
    --page: #edf7f9;
    --shadow: 0 16px 38px rgba(16, 26, 50, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    direction: rtl;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Tajawal", "Cairo", Tahoma, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(7, 151, 165, 0.06), transparent 270px),
        var(--page);
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

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

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 9px 12px;
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.12);
}

label span {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    vertical-align: top;
}

th {
    color: #475467;
    background: #f8fafc;
    font-size: 0.9rem;
}

td small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 5vw;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    min-width: 0;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    max-width: 520px;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.brand small {
    color: var(--muted);
    font-size: 0.78rem;
}

.brand-logo {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(88, 194, 202, 0.28);
    box-shadow: 0 12px 26px rgba(8, 128, 140, 0.16);
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.admin-logo {
    background: rgba(255, 255, 255, 0.98);
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 35%),
        linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 10px 22px rgba(7, 151, 165, 0.28);
}

.main-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.main-nav a {
    color: #344054;
    padding: 8px 12px;
    border-radius: 8px;
}

.main-nav a:hover {
    background: var(--soft);
}

.main-nav a.active,
.main-nav a[aria-current="page"] {
    color: var(--primary-dark);
    background: #e8f8fa;
    box-shadow: inset 0 -2px 0 var(--primary-dark);
}

.page-shell {
    width: min(1180px, 92vw);
    margin: 0 auto;
    padding: 32px 0 56px;
}

.hero-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    min-height: 420px;
}

.hero-copy {
    padding: 48px;
    border-radius: 8px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.22), transparent 18%),
        linear-gradient(rgba(8, 43, 58, 0.76), rgba(8, 43, 58, 0.70)),
        linear-gradient(135deg, var(--primary), var(--blue) 56%, var(--accent));
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    inset-inline-end: -90px;
    bottom: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.hero-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    padding: 6px;
    margin-bottom: 18px;
    box-shadow: 0 18px 34px rgba(16, 26, 50, 0.22);
}

.hero-copy h1 {
    margin: 0 0 16px;
    font-size: 2.4rem;
    line-height: 1.35;
    max-width: 760px;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.9);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary-dark);
    font-weight: 800;
}

.hero-copy .eyebrow {
    color: #c9fbff;
}

.hero-actions,
.form-actions,
.ticket-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 9px 14px;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), #0b98a5);
    border-color: var(--primary-dark);
    color: #fff;
    box-shadow: 0 10px 18px rgba(7, 128, 140, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #056b78, var(--primary-dark));
}

.btn-outline {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary-dark);
}

.btn-success {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-danger-outline {
    background: #fff;
    color: #b42318;
    border-color: #f4b4ae;
}

.btn-danger-outline:hover {
    background: #fff1f0;
    border-color: #dc2626;
}

.btn:focus-visible,
.main-nav a:focus-visible {
    outline: 3px solid rgba(7, 128, 140, 0.28);
    outline-offset: 3px;
}

.btn-muted {
    background: #e2e8f0;
}

.btn-lg {
    min-height: 50px;
    padding-inline: 20px;
}

.btn-small {
    min-height: 34px;
    padding: 5px 10px;
    font-size: 0.86rem;
}

.quick-panel,
.panel,
.form-panel,
.install-card,
.ticket,
.result-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.quick-panel {
    padding: 28px;
}

.result-panel {
    padding: 24px;
}

.section-band {
    margin-top: 34px;
}

.section-heading,
.panel-head,
.admin-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.section-heading h2,
.panel-head h2,
.quick-panel h2 {
    margin: 0;
}

.panel-head small {
    color: var(--muted);
    font-weight: 800;
}

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

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

.clinic-card {
    min-height: 190px;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.clinic-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--clinic-color, var(--primary));
}

.clinic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(16, 26, 50, 0.1);
}

.clinic-card h3 {
    margin: 14px 0 8px;
}

.clinic-card p {
    color: var(--muted);
    margin: 0 0 16px;
}

.clinic-dot,
.color-chip {
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 50%;
    background: var(--clinic-color, var(--chip, var(--primary)));
    margin-left: 8px;
}

.inline-link {
    font-weight: 800;
}

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

.metric-grid.compact {
    grid-template-columns: 1fr;
}

.metric {
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metric span {
    display: block;
    font-size: 2rem;
    color: var(--accent);
    font-weight: 900;
}

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

.booking-layout,
.track-layout {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.track-page .page-shell {
    width: min(1200px, calc(100% - 40px));
}

.track-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 24px;
    padding: 28px 30px;
    border: 1px solid rgba(7, 128, 140, 0.16);
    border-radius: 14px;
    background:
        radial-gradient(circle at 8% 10%, rgba(230, 0, 126, 0.08), transparent 28%),
        linear-gradient(135deg, #ffffff, #f1fbfc);
    box-shadow: 0 14px 36px rgba(16, 26, 50, 0.07);
}

.track-hero h1 {
    margin: 0 0 6px;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.35;
}

.track-hero p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
}

.track-privacy-note {
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid #c9ecef;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
}

.track-privacy-icon,
.track-empty-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--primary-dark);
    font-weight: 900;
}

.track-privacy-note strong,
.track-privacy-note small {
    display: block;
}

.track-privacy-note small {
    margin-top: 1px;
    color: var(--muted);
}

.track-layout {
    grid-template-columns: 370px minmax(0, 1fr);
    gap: 24px;
}

.track-search-card {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 16px;
    max-width: none;
    border-radius: 12px;
}

.track-card-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.track-card-heading h2,
.track-card-heading p,
.track-result-heading h2 {
    margin: 0;
}

.track-card-heading p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.9rem;
}

.track-step-number {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: var(--primary-dark);
    font-weight: 900;
}

.track-search-card label span em {
    margin-inline-start: 5px;
    color: #b42318;
    font-size: 0.72rem;
    font-style: normal;
}

.track-search-card label span em.is-optional {
    color: #64748b;
}

.track-search-card input[dir="ltr"] {
    text-align: left;
}

.field-hint {
    display: block;
    margin-top: -10px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.tracking-identifier-hint {
    margin-top: -6px;
    padding: 9px 11px;
    border: 1px solid #cde9ec;
    border-radius: 8px;
    background: #f2fbfc;
}

.track-search-button {
    width: 100%;
    min-height: 48px;
}

.track-result-panel {
    min-width: 0;
    min-height: 430px;
    padding: 28px;
    border-radius: 12px;
}

.tracking-results-summary {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #cde9ec;
    border-radius: 9px;
    color: #075e69;
    background: #effbfc;
    font-weight: 800;
}

.tracking-results-list {
    display: grid;
    gap: 28px;
}

.tracking-result-card + .tracking-result-card {
    padding-top: 28px;
    border-top: 2px solid var(--line);
}

.track-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.track-result-heading .eyebrow {
    margin-bottom: 2px;
}

.appointment-highlight {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.appointment-highlight > div {
    padding: 16px 18px;
    border: 1px solid #cde9ec;
    border-radius: 10px;
    background: linear-gradient(135deg, #f2fbfc, #ffffff);
}

.appointment-highlight span,
.appointment-highlight strong {
    display: block;
}

.appointment-highlight span {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.82rem;
}

.appointment-highlight strong {
    font-size: 1.08rem;
}

.track-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.track-detail-list > div {
    min-width: 0;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
}

.track-detail-list > div:nth-child(odd) {
    border-inline-end: 1px solid var(--line);
}

.track-detail-list > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.track-detail-list dt {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.track-detail-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.track-result-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.copy-feedback {
    min-height: 1.4em;
    color: #08755e;
    font-size: 0.82rem;
    font-weight: 800;
}

.track-result-actions .btn-danger-outline {
    margin-inline-start: auto;
}

.track-empty-state {
    min-height: 372px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

.track-empty-state h2 {
    margin: 14px 0 4px;
}

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

.track-empty-state > small {
    margin-top: 10px;
    color: var(--muted);
}

.track-empty-state.is-error .track-empty-icon {
    background: #b42318;
}

.track-guide-steps {
    width: min(100%, 640px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.track-guide-steps > div {
    padding: 14px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f9fcfd;
}

.track-guide-steps b {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    margin: 0 auto 7px;
    border-radius: 50%;
    color: var(--primary-dark);
    background: #dff4f6;
}

.track-guide-steps span {
    font-size: 0.82rem;
    font-weight: 800;
}

.steps-panel {
    position: sticky;
    top: 94px;
    padding: 26px;
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(16, 26, 50, 0.92), rgba(5, 107, 120, 0.92)),
        linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.steps-panel h1 {
    margin: 0 0 18px;
}

.steps-list {
    margin: 0;
    padding-right: 20px;
}

.steps-list li {
    margin-bottom: 10px;
}

.form-panel {
    padding: 24px;
}

.form-panel fieldset:first-of-type {
    background: linear-gradient(180deg, rgba(88, 194, 202, 0.08), rgba(255, 255, 255, 0));
}

.form-panel.narrow {
    max-width: 520px;
}

fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 0 0 20px;
    padding: 18px;
}

legend {
    padding: 0 8px;
    font-weight: 900;
}

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

.span-2 {
    grid-column: span 2;
}

.slot-area {
    margin-top: 18px;
    padding: 16px;
    border: 1px dashed #b7c7d4;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fdfe, #ffffff);
}

.slot-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.slot-toolbar span {
    color: var(--muted);
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
    gap: 10px;
}

.slot-button {
    min-height: 58px;
    border: 1px solid #c7d7e1;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    padding: 8px;
    text-align: center;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.slot-button:disabled {
    cursor: not-allowed;
    transform: none;
    opacity: 1;
}

.slot-button strong,
.slot-button small {
    display: block;
}

.slot-button small {
    width: fit-content;
    margin: 5px auto 0;
    border-radius: 999px;
    padding: 2px 9px;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.5;
}

.slot-button.active {
    border-color: var(--primary);
    background: #e6fbfd;
    color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(88, 194, 202, 0.34);
}

.slot-available {
    border: 2px solid #0f9f82;
    background: #e4fbf3;
    color: #064e3b;
    box-shadow: inset 5px 0 0 #10b981;
}

.slot-partial {
    border: 2px solid #d97706;
    background: #fff4cc;
    color: #78350f;
    box-shadow: inset 5px 0 0 #f59e0b;
}

.slot-available small {
    background: #d1fae5;
    color: #047857;
}

.slot-partial small {
    background: #fef3c7;
    color: #92400e;
}

.slot-new {
    border: 2px solid #db2777;
    background: #ffe1ee;
    color: #9d174d;
    box-shadow: inset 5px 0 0 #ec008c;
}

.slot-new small {
    background: #fce7f3;
    color: #be185d;
}

.slot-confirmed,
.slot-attended,
.slot-examined {
    border: 2px solid #2563eb;
    background: #dbeafe;
    color: #1e3a8a;
    box-shadow: inset 5px 0 0 #2563eb;
}

.slot-confirmed small,
.slot-attended small,
.slot-examined small {
    background: #dbeafe;
    color: #1d4ed8;
}

.slot-waiting {
    border: 2px solid #ca8a04;
    background: #fef3c7;
    color: #92400e;
    box-shadow: inset 5px 0 0 #eab308;
}

.slot-waiting small {
    background: #fef3c7;
    color: #92400e;
}

.slot-past,
.slot-blocked,
.slot-full {
    border: 2px solid #94a3b8;
    background: #e2e8f0;
    color: #64748b;
}

.slot-button:not(:disabled):hover {
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 43, 69, 0.12), inset 5px 0 0 currentColor;
}

.slot-button:focus-visible {
    outline: 3px solid rgba(0, 154, 169, 0.25);
    outline-offset: 2px;
}

.exceptional-booking-dialog {
    width: min(92vw, 480px);
    max-width: calc(100vw - 32px);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: var(--panel);
    box-shadow: 0 24px 64px rgba(16, 26, 50, 0.24);
}

.exceptional-booking-dialog::backdrop {
    background: rgba(16, 26, 50, 0.52);
}

.exceptional-dialog-content {
    padding: 24px;
}

.exceptional-dialog-content h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.12rem;
}

.exceptional-dialog-message {
    margin: 14px 0 22px;
    color: #344054;
    white-space: pre-line;
    line-height: 1.85;
}

.exceptional-dialog-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.exceptional-dialog-actions .btn {
    min-width: 112px;
}

.slot-color-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 12px 0 14px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.slot-color-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.slot-color-legend i {
    width: 14px;
    height: 14px;
    border: 1px solid transparent;
    border-radius: 3px;
    flex: 0 0 14px;
}

.legend-available {
    background: #e4fbf3;
    border-color: #0f9f82 !important;
}

.legend-partial {
    background: #fff4cc;
    border-color: #d97706 !important;
}

.legend-booked {
    background: #ffe1ee;
    border-color: #db2777 !important;
}

.legend-confirmed {
    background: #dbeafe;
    border-color: #2563eb !important;
}

.legend-unavailable {
    background: #e2e8f0;
    border-color: #94a3b8 !important;
}

.slot-past small,
.slot-blocked small,
.slot-full small {
    background: #e2e8f0;
    color: #475569;
}

.notice,
.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.notice.soft {
    background: #e8f8fa;
    color: #075e69;
    border: 1px solid #c5edf2;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.cancellation-panel {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #f4b4ae;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff8f7, #ffffff);
}

.cancellation-panel[hidden] {
    display: none;
}

.cancellation-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cancellation-heading h3 {
    margin: 0;
    color: #991b1b;
}

.cancellation-heading p {
    margin: 2px 0 0;
    color: #7a271a;
}

.danger-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #dc2626;
    font-weight: 900;
}

.cancellation-panel form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.confirmation-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid #f5d0cc;
    border-radius: 8px;
    background: #fff;
}

.confirmation-check input {
    width: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    margin-top: 4px;
    accent-color: #dc2626;
}

.confirmation-check span {
    margin: 0;
    color: #7a271a;
    font-size: 0.88rem;
}

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

.appointment-state-note {
    display: grid;
    gap: 2px;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #f1d7a7;
    border-radius: 9px;
    color: #7a4b00;
    background: #fff9e8;
}

.appointment-state-note.is-cancelled {
    border-color: #cde9ec;
    color: #075e69;
    background: #effbfc;
}

.appointment-state-note span,
.appointment-state-note small {
    display: block;
}

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

.detail-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 16px;
}

.detail-list.two-col {
    grid-template-columns: 150px 1fr 150px 1fr;
}

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

.detail-list dd {
    margin: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 9px;
    border-radius: 999px;
    font-weight: 800;
    background: #e2e8f0;
    color: #334155;
}

.status-new { background: #dbeafe; color: #1d4ed8; }
.status-confirmed { background: #c9f4f7; color: #056b78; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }
.status-attended,
.status-examined { background: #dcfce7; color: #166534; }
.status-no_show { background: #ffedd5; color: #c2410c; }
.status-postponed { background: #e2e8f0; color: #475569; }
.status-waiting { background: #fef3c7; color: #a16207; }

.site-footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    color: var(--muted);
    padding: 22px;
    border-top: 1px solid var(--line);
}

.login-shell {
    min-height: 58vh;
    display: grid;
    place-items: center;
}

.ticket {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px;
}

.ticket-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.ticket-code {
    background: #0f3d46;
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
}

.official-ticket {
    max-width: 920px;
}

.ticket-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ticket-brand .brand-logo {
    width: 74px;
    height: 74px;
    flex-basis: 74px;
}

.ticket-meta {
    display: grid;
    gap: 8px;
    justify-items: start;
}

.ticket-meta .badge {
    font-size: 0.95rem;
}

.ticket-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    background: #fff;
}

.ticket-section h2 {
    margin: 0 0 14px;
    font-size: 1.1rem;
}

.ticket-note {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding: 14px;
    border: 1px dashed #b7c7d4;
    border-radius: 8px;
    color: #344054;
    background: #f8fdfe;
}

.ticket-note p {
    margin: 0;
}

.empty-state {
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 42px;
    box-shadow: var(--shadow);
}

.empty-state.small {
    padding: 24px;
    box-shadow: none;
}

.admin-body {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    min-width: 0;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px;
    background:
        linear-gradient(180deg, #101a32, #063b48 72%, #082f3b);
    color: #fff;
    overflow-y: auto;
    min-width: 0;
}

.admin-brand {
    color: #fff;
    margin-bottom: 20px;
    align-items: flex-start;
}

.admin-brand small {
    color: #c7d7e1;
}

.admin-brand strong {
    max-width: 178px;
}

.side-nav {
    display: grid;
    gap: 6px;
}

.side-nav a,
.logout-link {
    color: #e9f2f6;
    padding: 10px 12px;
    border-radius: 8px;
}

.side-nav a.active,
.side-nav a:hover,
.logout-link:hover {
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 3px 0 0 var(--accent);
}

.logout-link {
    display: block;
    margin-top: 18px;
}

.admin-main {
    padding: 24px;
    min-width: 0;
}

.admin-topline h1,
.admin-topline p {
    margin: 0;
}

.admin-topline p {
    color: var(--muted);
}

.admin-grid {
    display: grid;
    gap: 18px;
}

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

.panel {
    padding: 18px;
    margin-bottom: 18px;
    min-width: 0;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    min-width: 0;
}

.status-row-confirmed {
    background: linear-gradient(90deg, rgba(32, 167, 123, 0.08), transparent 44%);
}

.status-row-new {
    background: linear-gradient(90deg, rgba(23, 120, 200, 0.08), transparent 44%);
}

.status-row-waiting {
    background: linear-gradient(90deg, rgba(202, 138, 4, 0.1), transparent 44%);
}

.status-row-cancelled,
.status-row-no_show {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.07), transparent 44%);
}

.quick-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 220px;
}

.quick-actions form {
    margin: 0;
}

.btn-icon {
    width: 36px;
    min-width: 36px;
    padding-inline: 0;
    font-size: 1rem;
}

.inline-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 10px;
    align-items: start;
}

.inline-form.wide textarea {
    grid-column: span 4;
}

.stacked-form {
    display: grid;
    gap: 10px;
    min-width: 260px;
    padding: 12px 0 0;
}

.schedule-capacity-fields {
    align-items: start;
}

.field-help {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.5;
}

.schedule-capacity-fields input[readonly] {
    background: #f1f5f9;
    color: #475569;
    cursor: not-allowed;
}

.schedule-emergency-field {
    display: block;
}

.internal-booking-panel {
    padding: 0;
    overflow: hidden;
}

.internal-booking-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.internal-booking-summary::-webkit-details-marker {
    display: none;
}

.internal-booking-summary strong,
.internal-booking-summary small {
    display: block;
}

.internal-booking-summary small {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.internal-booking-panel[open] > .internal-booking-summary {
    border-bottom: 1px solid var(--line);
    background: #f7fbfc;
}

.internal-booking-form {
    display: grid;
    gap: 0;
    padding: 0 18px 18px;
}

.internal-booking-section {
    padding: 18px 0;
}

.internal-booking-section + .internal-booking-section {
    border-top: 1px solid var(--line);
}

.internal-booking-section .section-heading {
    margin-bottom: 14px;
}

.internal-booking-section .section-heading h3 {
    margin: 0;
}

.internal-booking-section .section-heading small {
    color: var(--muted);
    font-weight: 700;
}

.form-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.internal-booking-extra {
    margin-top: 14px;
    border-top: 1px dashed #cbd8df;
}

.internal-booking-extra > summary {
    width: fit-content;
    padding: 12px 0;
    color: var(--primary-dark);
    cursor: pointer;
    font-weight: 900;
}

.full-field {
    display: block;
    margin-top: 14px;
}

.internal-booking-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.privacy-note {
    max-width: 760px;
    color: #475569;
    font-size: .86rem;
    line-height: 1.7;
}

.visibility-internal {
    margin-top: 5px;
    border: 1px solid #c4b5fd;
    background: #ede9fe;
    color: #5b21b6;
}

.appointment-internal td:first-child {
    box-shadow: inset -4px 0 0 #7c3aed;
}

.admin-form {
    align-items: end;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    color: #344054;
    font-weight: 800;
}

.check input {
    width: 18px;
    min-height: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    align-items: center;
}

.appointment-view-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f6fafb;
}

.appointment-view-tabs a {
    padding: 9px 18px;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 700;
}

.appointment-view-tabs a.active {
    color: #fff;
    background: var(--primary);
}

.compact-panel {
    padding-block: 10px;
}

.compact-panel .appointment-view-tabs {
    margin-bottom: 0;
}

.schedule-editor-grid {
    grid-template-columns: minmax(0, 760px);
}

.weekly-calendar-panel {
    --week-line: #d8e7ed;
}

.weekly-calendar-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(190px, 240px) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
}

.weekly-navigation {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.weekly-calendar-totals,
.weekly-calendar-status {
    color: var(--muted);
    font-weight: 800;
}

.weekly-calendar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.weekly-print-header {
    display: none;
}

.weekly-calendar-status {
    margin: 10px 0;
}

.weekly-calendar-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 0;
    border-block: 1px solid var(--week-line);
}

.weekly-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: .82rem;
    font-weight: 800;
}

.weekly-calendar-legend span::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #58c2ca;
}

.weekly-calendar-legend .legend-new::before { background: #3b82f6; }
.weekly-calendar-legend .legend-confirmed::before { background: #0891b2; }
.weekly-calendar-legend .legend-service::before { background: #16a34a; }
.weekly-calendar-legend .legend-exception::before { background: #e6007e; }

.weekly-calendar-scroll {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 6px;
}

.weekly-heatmap-host {
    min-width: 1160px;
    transition: opacity .16s ease;
}

.weekly-calendar-panel.is-loading .weekly-heatmap-host {
    opacity: .45;
}

.weekly-heatmap {
    width: 100%;
    table-layout: fixed;
    border-spacing: 4px;
    border-collapse: separate;
    background: #f4f7f8;
}

.weekly-heatmap th,
.weekly-heatmap td {
    border: 0;
}

.weekly-heatmap thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 74px;
    padding: 9px;
    border: 1px solid #d8e7ed;
    border-radius: 6px;
    background: #eef4f6;
    color: #172033;
    text-align: center;
}

.weekly-heatmap thead th strong,
.weekly-heatmap thead th span,
.weekly-heatmap thead th small {
    display: block;
}

.weekly-heatmap thead th span,
.weekly-heatmap thead th small {
    margin-top: 3px;
    color: #64748b;
    font-size: .75rem;
}

.weekly-heatmap thead th.is-today {
    border-color: var(--primary);
    background: #e5f8fa;
    box-shadow: inset 0 3px 0 var(--primary);
}

.weekly-heatmap .heat-time-head,
.weekly-heatmap .heat-time {
    position: sticky;
    right: 0;
    z-index: 4;
    width: 76px;
    min-width: 76px;
    background: #172b4d;
    color: #fff;
    text-align: center;
}

.weekly-heatmap .heat-time {
    height: 58px;
    padding: 8px;
    border-radius: 6px;
    font-size: .78rem;
}

.heat-cell {
    height: 58px;
    padding: 6px;
    border: 1px solid transparent !important;
    border-radius: 6px;
    overflow: hidden;
    color: #334155;
    background: #e9eef1;
    vertical-align: middle;
    text-align: right;
    line-height: 1.35;
}

.heat-cell strong,
.heat-cell small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.heat-cell strong { font-size: .76rem; }
.heat-cell small { margin-top: 3px; font-size: .68rem; opacity: .84; }

.heat-unavailable {
    background: #e9eef1;
}

.heat-schedule {
    border-color: var(--heat-color) !important;
    box-shadow: inset 4px 0 0 var(--heat-color);
    background: #e7f8f8;
    color: #0f5961;
}

.heat-appointment a {
    display: block;
    color: inherit;
}

.heat-new { background: #dbeafe; color: #1e40af; border-color: #3b82f6 !important; }
.heat-confirmed { background: #cffafe; color: #155e75; border-color: #0891b2 !important; }
.heat-waiting { background: #fef3c7; color: #854d0e; border-color: #ca8a04 !important; }
.heat-attended,
.heat-examined { background: #dcfce7; color: #166534; border-color: #16a34a !important; }
.heat-cancelled,
.heat-no_show { background: #fee2e2; color: #991b1b; border-color: #dc2626 !important; }
.heat-postponed { background: #e2e8f0; color: #475569; border-color: #64748b !important; }
.heat-exception { background: #fce7f3; color: #9d174d; border-color: #e6007e !important; }
.heat-holiday { background: #ffedd5; color: #9a3412; border-color: #ea580c !important; }
.heat-extra { background: #ede9fe; color: #5b21b6; border-color: #7c3aed !important; }

.weekly-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(165px, 1fr));
    min-width: 1155px;
    gap: 8px;
    transition: opacity .16s ease;
}

.weekly-calendar-panel.is-loading .weekly-calendar-grid {
    opacity: .45;
}

.weekly-day {
    min-width: 0;
    border: 1px solid var(--week-line);
    border-radius: 8px;
    background: #fbfdfe;
    overflow: hidden;
}

.weekly-day > header {
    display: grid;
    gap: 2px;
    min-height: 82px;
    padding: 10px;
    border-bottom: 1px solid var(--week-line);
    background: #f2f7f9;
}

.weekly-day > header span,
.weekly-day > header small {
    color: var(--muted);
    font-size: .78rem;
}

.weekly-day.is-today {
    border-color: var(--primary);
    box-shadow: inset 0 3px 0 var(--primary);
}

.weekly-day.is-today > header {
    background: #e9f9fa;
}

.weekly-day-events {
    display: grid;
    align-content: start;
    gap: 7px;
    min-height: 240px;
    padding: 8px;
}

.week-event {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 8px;
    border: 1px solid #dbe7eb;
    border-inline-start: 4px solid #94a3b8;
    border-radius: 6px;
    color: #172033;
    background: #fff;
    font-size: .78rem;
    line-height: 1.45;
}

.week-event strong,
.week-event span,
.week-event small {
    overflow-wrap: anywhere;
}

.week-event small {
    color: #64748b;
}

.week-event > div {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

.week-schedule {
    border-inline-start-color: var(--event-color);
    background: #edfafa;
}

.week-appointment.status-new { border-inline-start-color: #3b82f6; background: #eff6ff; color: #1e3a8a; }
.week-appointment.status-confirmed { border-inline-start-color: #0891b2; background: #ecfeff; color: #155e75; }
.week-appointment.status-waiting { border-inline-start-color: #ca8a04; background: #fffbeb; color: #854d0e; }
.week-appointment.status-attended,
.week-appointment.status-examined { border-inline-start-color: #16a34a; background: #f0fdf4; color: #166534; }
.week-appointment.status-cancelled,
.week-appointment.status-no_show { border-inline-start-color: #dc2626; background: #fef2f2; color: #991b1b; }
.week-appointment.status-postponed { border-inline-start-color: #64748b; background: #f8fafc; color: #475569; }

.week-event-status {
    white-space: nowrap;
    font-weight: 900;
}

.week-exception,
.week-holiday {
    border-inline-start-color: #e6007e;
    background: #fff1f7;
    color: #9d174d;
}

.week-holiday {
    border-inline-start-color: #dc2626;
    background: #fff7ed;
    color: #9a3412;
}

.weekly-day-empty {
    margin: 14px 0;
    color: var(--muted);
    font-size: .78rem;
    text-align: center;
}

@media (max-width: 900px) {
    .weekly-calendar-panel .panel-head,
    .weekly-calendar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .weekly-calendar-controls {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .weekly-navigation .btn {
        flex: 1 1 140px;
    }
}

.holiday-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.holiday-form [data-holiday-fields] {
    min-width: 0;
}

.holiday-form [data-holiday-fields][hidden] {
    display: none;
}

.report-catalog {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.report-catalog a {
    display: grid;
    gap: 5px;
    min-height: 82px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}

.report-catalog a:hover,
.report-catalog a.active {
    border-color: var(--primary);
    box-shadow: inset 4px 0 0 var(--primary);
    background: #f3fbfc;
}

.report-catalog small {
    color: var(--muted);
    line-height: 1.6;
}

.paper-orientation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    min-width: 180px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f6fafb;
}

.paper-orientation legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.paper-orientation label {
    cursor: pointer;
}

.paper-orientation input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.paper-orientation span {
    display: grid;
    place-items: center;
    min-height: 38px;
    padding-inline: 12px;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 800;
}

.paper-orientation input:checked + span {
    color: #fff;
    background: var(--primary);
}

.report-preview .table-wrap {
    max-height: 680px;
}

.report-preview thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.filter-field {
    display: grid;
    gap: 5px;
}

.filter-field span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.date-stepper {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    text-align: center;
}

@media (max-width: 640px) {
    .appointment-view-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        text-align: center;
    }

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

    .date-stepper strong {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .holiday-metrics {
        grid-template-columns: 1fr;
    }

    .report-catalog {
        grid-template-columns: 1fr;
    }
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 14px;
    color: var(--muted);
    font-weight: 800;
}

.pagination-links,
.per-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.per-page-form select {
    min-height: 36px;
    padding-block: 5px;
}

.inline-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

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

.dashboard-wide {
    margin-bottom: 18px;
}

.dashboard-date-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-date-panel > div {
    display: grid;
    gap: 4px;
}

.dashboard-date-panel small {
    color: var(--muted);
}

.dashboard-date-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-date-picker input[type="date"] {
    min-width: 170px;
}

@media (max-width: 720px) {
    .dashboard-date-panel,
    .dashboard-date-picker {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-date-picker input[type="date"] {
        width: 100%;
    }
}

.dashboard-status-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.dashboard-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 900;
}

.dashboard-time {
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.empty-inline {
    padding: 18px;
    border: 1px dashed #b7c7d4;
    border-radius: 8px;
    background: #f8fdfe;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

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

.appointment-mini {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.appointment-mini strong,
.appointment-mini span,
.appointment-mini small {
    display: block;
}

.appointment-mini small {
    color: var(--muted);
}

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

.clinic-load-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.clinic-load-item strong,
.clinic-load-item small {
    display: block;
}

.clinic-load-item small {
    color: var(--muted);
}

.clinic-load-item span {
    color: var(--primary-dark);
    font-weight: 900;
}

.clinic-load-item i {
    grid-column: 1 / -1;
    display: block;
    height: 8px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, var(--clinic-color, var(--primary)) var(--load, 0%), #e8f1f5 var(--load, 0%));
}

.notification {
    padding: 12px;
    border: 1px solid var(--line);
    border-right: 4px solid var(--primary);
    border-radius: 8px;
}

.notification p {
    margin: 4px 0;
    color: var(--muted);
}

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

.bar-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    align-items: center;
}

.bar-row i {
    grid-column: 1 / -1;
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.install-card {
    max-width: 720px;
    margin: 40px auto;
    padding: 30px;
}

.print-body {
    background: #fff;
}

.print-sheet {
    width: min(1100px, 94vw);
    margin: 24px auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

.orientation-landscape .print-sheet {
    width: min(1480px, 96vw);
}

.print-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    border-bottom: 2px solid var(--line);
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.print-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.print-brand .brand-logo {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
}

.print-meta {
    text-align: left;
    color: var(--muted);
    font-weight: 800;
}

.print-meta small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.print-summary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0;
    color: #344054;
}

.print-summary span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 10px;
    background: #f8fdfe;
    font-weight: 800;
}

.print-sheet table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.print-sheet th,
.print-sheet td {
    border: 1px solid #d8e7ed;
    padding: 8px;
    vertical-align: top;
}

.print-sheet th {
    background: #eef9fb;
    color: #0f3d46;
}

.print-document-footer {
    margin-top: 22px;
    padding-top: 10px;
    border-top: 1px solid #d8e7ed;
    color: #64748b;
    font-size: .78rem;
    text-align: center;
}

.print-signatures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 28px;
    color: var(--muted);
    font-weight: 800;
}

.print-signatures span {
    border-top: 1px solid #94a3b8;
    padding-top: 8px;
}

@media (max-width: 980px) {
    .hero-workspace,
    .booking-layout,
    .track-layout,
    .admin-grid.two {
        grid-template-columns: 1fr;
    }

    .steps-panel {
        position: static;
    }

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

    .admin-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .admin-brand strong {
        max-width: none;
    }

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

@media (max-width: 680px) {
    .topbar,
    .admin-topline,
    .section-heading,
    .panel-head,
    .ticket-head {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        position: static;
        padding: 14px 16px;
    }

    .brand {
        width: 100%;
        align-items: flex-start;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    .brand strong {
        max-width: 100%;
        font-size: 0.98rem;
    }

    .brand small {
        font-size: 0.76rem;
    }

    .main-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .main-nav a {
        text-align: center;
        padding: 9px 6px;
        background: #fff;
        border: 1px solid var(--line);
        font-size: 0.86rem;
    }

    .page-shell {
        width: min(100% - 24px, 1180px);
        padding-inline: 0;
    }

    .admin-main {
        width: 100%;
        max-width: 100%;
        padding: 14px;
    }

    .hero-copy {
        padding: 28px;
    }

    .hero-copy h1 {
        font-size: 1.45rem;
    }

    .hero-logo {
        width: 76px;
        height: 76px;
        border-radius: 14px;
    }

    .clinic-grid,
    .metric-grid,
    .form-grid,
    .form-grid.three-col,
    .detail-list.two-col,
    .inline-form {
        grid-template-columns: 1fr;
    }

    .internal-booking-summary,
    .internal-booking-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .internal-booking-summary .btn,
    .internal-booking-actions .btn {
        width: 100%;
    }

    .span-2 {
        grid-column: span 1;
    }

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

    .detail-list.two-col,
    .print-head,
    .print-signatures {
        grid-template-columns: 1fr;
    }

    .print-head,
    .ticket-brand,
    .print-brand {
        align-items: flex-start;
        flex-direction: column;
    }

    .main-nav,
    .site-footer {
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .main-nav {
        grid-template-columns: 1fr;
    }

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

    .btn,
    .btn-lg {
        width: 100%;
    }
}

@media print {
    .topbar,
    .site-footer,
    .ticket-actions,
    .admin-sidebar,
    .admin-topline {
        display: none !important;
    }

    body,
    .page-shell,
    .ticket,
    .print-sheet {
        background: #fff;
        box-shadow: none;
        border: 0;
        width: 100%;
        margin: 0;
    }

    .print-sheet {
        padding: 0;
    }

    .print-sheet thead {
        display: table-header-group;
    }

    .print-sheet tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .orientation-landscape .print-sheet table {
        font-size: 0.78rem;
    }

    .orientation-landscape .print-sheet th,
    .orientation-landscape .print-sheet td {
        padding: 5px;
    }

    body.print-weekly-calendar {
        display: block;
        min-width: 0;
        color: #172033;
        background: #fff;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    body.print-weekly-calendar .admin-main {
        width: 100%;
        padding: 0;
    }

    body.print-weekly-calendar .admin-main > * {
        display: none !important;
    }

    body.print-weekly-calendar .admin-main > .weekly-calendar-panel {
        display: block !important;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    body.print-weekly-calendar .weekly-calendar-panel > .panel-head,
    body.print-weekly-calendar .weekly-calendar-controls,
    body.print-weekly-calendar .weekly-calendar-status {
        display: none !important;
    }

    body.print-weekly-calendar .weekly-print-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 22px;
        align-items: center;
        margin-bottom: 10px;
        padding-bottom: 9px;
        border-bottom: 2px solid #58c2ca;
    }

    body.print-weekly-calendar .weekly-print-brand {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    body.print-weekly-calendar .weekly-print-brand .brand-logo {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    body.print-weekly-calendar .weekly-print-brand strong,
    body.print-weekly-calendar .weekly-print-brand span,
    body.print-weekly-calendar .weekly-print-meta strong,
    body.print-weekly-calendar .weekly-print-meta span,
    body.print-weekly-calendar .weekly-print-meta small {
        display: block;
    }

    body.print-weekly-calendar .weekly-print-brand strong {
        font-size: 1rem;
    }

    body.print-weekly-calendar .weekly-print-brand span,
    body.print-weekly-calendar .weekly-print-meta span,
    body.print-weekly-calendar .weekly-print-meta small {
        margin-top: 2px;
        color: #64748b;
        font-size: .72rem;
        font-weight: 800;
    }

    body.print-weekly-calendar .weekly-print-meta {
        min-width: 245px;
        text-align: left;
    }

    body.print-weekly-calendar .weekly-print-summary {
        grid-column: 1 / -1;
        color: #334155;
        font-size: .75rem;
        font-weight: 900;
    }

    body.print-weekly-calendar .weekly-calendar-legend {
        gap: 8px 14px;
        padding: 6px 0;
        border-top: 0;
        break-inside: avoid;
    }

    body.print-weekly-calendar .weekly-calendar-legend span {
        font-size: .68rem;
    }

    body.print-weekly-calendar .weekly-calendar-scroll {
        overflow: visible;
        padding: 0;
    }

    body.print-weekly-calendar .weekly-heatmap-host {
        min-width: 0;
    }

    body.print-weekly-calendar .weekly-heatmap {
        width: 100%;
        border-spacing: 2px;
        background: #fff;
        font-size: .62rem;
    }

    body.print-weekly-calendar .weekly-heatmap thead {
        display: table-header-group;
    }

    body.print-weekly-calendar .weekly-heatmap tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.print-weekly-calendar .weekly-heatmap thead th {
        position: static;
        height: 47px;
        padding: 4px;
        border-radius: 2px;
    }

    body.print-weekly-calendar .weekly-heatmap .heat-time-head,
    body.print-weekly-calendar .weekly-heatmap .heat-time {
        position: static;
        width: 47px;
        min-width: 47px;
    }

    body.print-weekly-calendar .weekly-heatmap .heat-time,
    body.print-weekly-calendar .heat-cell {
        height: 35px;
        padding: 3px;
        border-radius: 2px;
    }

    body.print-weekly-calendar .heat-cell strong {
        font-size: .58rem;
    }

    body.print-weekly-calendar .heat-cell small {
        margin-top: 1px;
        font-size: .52rem;
    }
}

@media screen and (max-width: 980px) {
    .track-page .page-shell {
        width: min(100% - 28px, 760px);
    }

    .track-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .track-privacy-note {
        width: 100%;
        min-width: 0;
    }

    .track-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .track-search-card {
        position: static;
        width: 100%;
        max-width: none;
    }
}

@media screen and (max-width: 680px) {
    .track-page .page-shell {
        width: min(100% - 24px, 640px);
        padding-top: 18px;
    }

    .track-hero,
    .track-result-panel,
    .track-search-card {
        padding: 18px;
    }

    .track-hero {
        margin-bottom: 14px;
    }

    .track-result-heading {
        align-items: flex-start;
    }

    .appointment-highlight,
    .track-detail-list,
    .track-guide-steps {
        grid-template-columns: minmax(0, 1fr);
    }

    .track-detail-list > div,
    .track-detail-list > div:nth-child(odd),
    .track-detail-list > div:nth-last-child(-n + 2) {
        border-inline-end: 0;
        border-bottom: 1px solid var(--line);
    }

    .track-detail-list > div:last-child {
        border-bottom: 0;
    }

    .track-result-actions,
    .cancellation-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .track-result-actions .btn,
    .cancellation-actions .btn {
        width: 100%;
    }

    .track-result-actions .btn-danger-outline {
        margin-inline-start: 0;
    }

    .copy-feedback {
        text-align: center;
    }

    .track-empty-state {
        min-height: 320px;
        padding: 12px 0;
    }

    .cancellation-panel {
        padding: 16px;
    }
}

/* Patient appointment ticket */
.ticket-page .page-shell {
    width: min(1020px, 94vw);
}

.ticket-screen-shell {
    display: grid;
    gap: 16px;
    max-width: 920px;
    margin: 0 auto;
}

.patient-ticket {
    page: patient-ticket-page;
    position: relative;
    overflow: hidden;
    color: #14213d;
    background: #fff;
    border: 1px solid #cfe2e6;
    border-radius: 14px;
    box-shadow: 0 22px 55px rgba(16, 49, 64, 0.12);
}

.patient-ticket::before {
    content: "";
    display: block;
    height: 6px;
    background: linear-gradient(90deg, var(--accent), var(--primary-dark), var(--primary));
}

.patient-ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px 20px;
}

.patient-ticket-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.patient-ticket-brand .brand-logo {
    width: 70px;
    height: 70px;
    flex-basis: 70px;
    box-shadow: none;
}

.ticket-kicker,
.ticket-brand-meta,
.patient-ticket-brand h1,
.patient-ticket-type span,
.patient-ticket-type strong,
.patient-ticket-type small {
    margin: 0;
}

.ticket-kicker {
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.patient-ticket-brand h1 {
    max-width: 600px;
    margin-top: 2px;
    font-size: 1.16rem;
    line-height: 1.4;
}

.ticket-brand-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 7px;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.77rem;
}

.patient-ticket-type {
    min-width: 170px;
    padding-inline-start: 20px;
    border-inline-start: 1px solid #cfe2e6;
    text-align: start;
}

.patient-ticket-type span,
.patient-ticket-type small {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.patient-ticket-type strong {
    display: block;
    color: #073b46;
    font-size: 1.42rem;
    line-height: 1.35;
}

.ticket-reference {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: 17px 28px;
    background: linear-gradient(135deg, #eefafb, #f8fcfd);
    border-block: 1px solid #cfe7ea;
}

.ticket-reference-code > span,
.ticket-reference-code > small,
.ticket-reference-code > strong {
    display: block;
}

.ticket-reference-code > span {
    color: #52647a;
    font-size: 0.8rem;
    font-weight: 900;
}

.ticket-reference-code > strong {
    margin: 1px 0;
    color: #073b46;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.25;
    letter-spacing: 0.045em;
    overflow-wrap: anywhere;
}

.ticket-reference-code > small {
    color: #667085;
    font-size: 0.76rem;
}

.ticket-reference-status {
    display: grid;
    justify-items: end;
    gap: 6px;
    min-width: 148px;
}

.ticket-reference-status small {
    color: #667085;
    font-size: 0.74rem;
}

.ticket-state-message {
    margin: 16px 28px 0;
    padding: 11px 14px;
    border: 1px solid #e7c66d;
    border-radius: 8px;
    color: #7a4d00;
    background: #fff9e8;
    font-weight: 800;
}

.ticket-state-message-cancelled {
    border-color: #f2b8b5;
    color: #9f1c19;
    background: #fff2f1;
}

.patient-ticket-section {
    padding: 20px 28px 0;
}

.patient-ticket-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 11px;
}

.patient-ticket-section-title > span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #b9dde1;
    border-radius: 50%;
    color: #076f7b;
    background: #effafb;
    font-size: 0.72rem;
    font-weight: 900;
}

.patient-ticket-section-title h2,
.patient-ticket-section-title small {
    margin: 0;
}

.patient-ticket-section-title h2 {
    font-size: 1rem;
    line-height: 1.35;
}

.patient-ticket-section-title small {
    display: block;
    margin-top: 1px;
    color: #667085;
    font-size: 0.74rem;
}

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

.ticket-data-cell {
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #dae8eb;
    border-radius: 8px;
    background: #fbfdfe;
}

.ticket-data-cell > span,
.ticket-data-cell > strong {
    display: block;
}

.ticket-data-cell > span {
    margin-bottom: 2px;
    color: #667085;
    font-size: 0.75rem;
    font-weight: 800;
}

.ticket-data-cell > strong {
    color: #17233b;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.ticket-data-emphasis {
    border-color: #a9d7dc;
    background: #f1fbfc;
}

.ticket-data-emphasis > strong {
    color: #056874;
    font-size: 1.04rem;
}

.ticket-data-wide {
    grid-column: span 2;
}

.patient-ticket-details {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
}

.patient-detail {
    min-width: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #dce9eb;
}

.patient-detail-wide {
    grid-column: span 2;
}

.patient-detail dt {
    color: #667085;
    font-size: 0.73rem;
    font-weight: 800;
}

.patient-detail dd {
    margin: 2px 0 0;
    color: #17233b;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.ticket-instructions {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    margin: 20px 28px 0;
    padding: 14px 16px;
    border: 1px solid #d9e6e9;
    border-radius: 8px;
    color: #344054;
    background: #fafcfd;
}

.ticket-instructions > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-instructions-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #07808c;
    font-size: 0.84rem;
    font-weight: 900;
}

.ticket-instructions h2 {
    margin: 0;
    font-size: 0.94rem;
}

.ticket-instructions ol {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding-inline-start: 20px;
    font-size: 0.78rem;
    line-height: 1.55;
}

.ticket-instructions li::marker {
    color: var(--primary-dark);
    font-weight: 900;
}

.patient-ticket-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding: 15px 28px 18px;
    color: #667085;
    background: #f8fbfc;
    border-top: 1px solid #dce9eb;
    font-size: 0.72rem;
}

.patient-ticket-footer p {
    max-width: 570px;
    margin: 0;
}

.patient-ticket-footer > div {
    display: grid;
    justify-items: end;
    gap: 2px;
    color: #3f5368;
    font-weight: 800;
    white-space: nowrap;
}

.ticket-screen-shell > .ticket-actions {
    justify-content: center;
}

@media screen and (max-width: 760px) {
    .ticket-page .page-shell {
        width: min(100% - 24px, 700px);
        padding-top: 18px;
    }

    .patient-ticket-header,
    .patient-ticket-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .patient-ticket-type {
        width: 100%;
        padding: 10px 0 0;
        border-inline-start: 0;
        border-top: 1px solid #dce9eb;
    }

    .ticket-reference {
        grid-template-columns: 1fr;
    }

    .ticket-reference-status,
    .patient-ticket-footer > div {
        justify-items: start;
    }

    .appointment-ticket-grid,
    .patient-ticket-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ticket-instructions {
        grid-template-columns: 1fr;
    }

    .ticket-instructions ol {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 460px) {
    .patient-ticket-header,
    .ticket-reference,
    .patient-ticket-section {
        padding-inline: 18px;
    }

    .ticket-state-message,
    .ticket-instructions {
        margin-inline: 18px;
    }

    .patient-ticket-footer {
        padding-inline: 18px;
    }

    .patient-ticket-brand {
        align-items: flex-start;
    }

    .patient-ticket-brand .brand-logo {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }

    .appointment-ticket-grid,
    .patient-ticket-details {
        grid-template-columns: 1fr;
    }

    .ticket-data-wide,
    .patient-detail-wide {
        grid-column: span 1;
    }
}

@page patient-ticket-page {
    size: A4 portrait;
    margin: 9mm;
}

@media print {
    html,
    body.ticket-page {
        width: 100%;
        min-width: 0;
        min-height: 0;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        color: #14213d;
        background: #fff !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    body.ticket-page .topbar,
    body.ticket-page .site-footer,
    body.ticket-page .ticket-actions {
        display: none !important;
    }

    body.ticket-page .page-shell,
    body.ticket-page .ticket-screen-shell {
        display: block;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.ticket-page .patient-ticket {
        width: 100%;
        max-width: none;
        margin: 0;
        border: 0.3mm solid #b9d1d5;
        border-radius: 0;
        box-shadow: none;
        font-size: 9.5pt;
        line-height: 1.35;
        break-inside: avoid-page;
        page-break-inside: avoid;
    }

    body.ticket-page .patient-ticket::before {
        height: 1.2mm;
    }

    body.ticket-page .patient-ticket-header {
        gap: 5mm;
        padding: 4.5mm 6mm 3.5mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.ticket-page .patient-ticket-brand {
        gap: 3mm;
    }

    body.ticket-page .patient-ticket-brand .brand-logo {
        width: 16mm;
        height: 16mm;
        flex-basis: 16mm;
        border-radius: 2mm;
    }

    body.ticket-page .ticket-kicker,
    body.ticket-page .ticket-brand-meta,
    body.ticket-page .patient-ticket-type span,
    body.ticket-page .patient-ticket-type small {
        font-size: 7.5pt;
    }

    body.ticket-page .patient-ticket-brand h1 {
        font-size: 10.5pt;
    }

    body.ticket-page .patient-ticket-type {
        min-width: 38mm;
        padding-inline-start: 5mm;
    }

    body.ticket-page .patient-ticket-type strong {
        font-size: 14pt;
    }

    body.ticket-page .ticket-reference {
        gap: 5mm;
        padding: 3.5mm 6mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.ticket-page .ticket-reference-code > strong {
        color: #073b46 !important;
        font-size: 16pt;
    }

    body.ticket-page .ticket-reference-code > span,
    body.ticket-page .ticket-reference-code > small,
    body.ticket-page .ticket-reference-status small {
        font-size: 7.5pt;
    }

    body.ticket-page .ticket-state-message {
        margin: 3mm 6mm 0;
        padding: 2.5mm 3mm;
        font-size: 8.5pt;
        break-inside: avoid;
    }

    body.ticket-page .patient-ticket-section {
        padding: 3.5mm 6mm 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.ticket-page .patient-ticket-section-title {
        gap: 2mm;
        margin-bottom: 2.2mm;
    }

    body.ticket-page .patient-ticket-section-title > span {
        width: 7mm;
        height: 7mm;
        flex-basis: 7mm;
        font-size: 7pt;
    }

    body.ticket-page .patient-ticket-section-title h2 {
        font-size: 9.5pt;
    }

    body.ticket-page .patient-ticket-section-title small,
    body.ticket-page .ticket-data-cell > span,
    body.ticket-page .patient-detail dt {
        font-size: 7.2pt;
    }

    body.ticket-page .appointment-ticket-grid,
    body.ticket-page .patient-ticket-details {
        gap: 2mm;
    }

    body.ticket-page .ticket-data-cell {
        min-height: 13mm;
        padding: 2.2mm 2.8mm;
        border-radius: 1.5mm;
    }

    body.ticket-page .ticket-data-cell > strong,
    body.ticket-page .patient-detail dd {
        font-size: 8.5pt;
    }

    body.ticket-page .ticket-data-emphasis > strong {
        font-size: 10pt;
    }

    body.ticket-page .patient-detail {
        padding: 2mm 2.5mm;
    }

    body.ticket-page .ticket-instructions {
        grid-template-columns: 34mm minmax(0, 1fr);
        gap: 3mm;
        margin: 3.5mm 6mm 0;
        padding: 2.8mm 3mm;
        border-radius: 1.5mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.ticket-page .ticket-instructions h2 {
        font-size: 8.5pt;
    }

    body.ticket-page .ticket-instructions-icon {
        width: 5.5mm;
        height: 5.5mm;
        flex-basis: 5.5mm;
    }

    body.ticket-page .ticket-instructions ol {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3mm;
        padding-inline-start: 4mm;
        font-size: 7.5pt;
        line-height: 1.45;
    }

    body.ticket-page .patient-ticket-footer {
        gap: 5mm;
        margin-top: 3.5mm;
        padding: 3mm 6mm 3.5mm;
        font-size: 7pt;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Booking field requirement settings */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.booking-requirement {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    margin-inline-start: 5px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-style: normal;
    font-weight: 900;
    vertical-align: middle;
}

.booking-requirement.is-required {
    color: #075e69;
    background: #dff6f8;
}

.booking-requirement.is-optional {
    color: #667085;
    background: #eef2f6;
}

.fieldset-hint {
    margin: -4px 0 16px;
    color: var(--muted);
    font-size: 0.86rem;
}

.booking-input-hint {
    display: block;
    margin-top: 6px;
    color: #075e69;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.5;
}

.booking-fields-panel {
    overflow: hidden;
}

.booking-fields-notice {
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid #b9dde1;
    border-radius: 8px;
    color: #075e69;
    background: #effafb;
}

.booking-field-group + .booking-field-group {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.booking-field-group-head {
    margin-bottom: 12px;
}

.booking-field-group-head h3,
.booking-field-group-head small {
    margin: 0;
}

.booking-field-group-head h3 {
    font-size: 1.03rem;
}

.booking-field-group-head small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
}

.booking-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.booking-field-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 145px;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.booking-field-card.is-locked {
    background: #f7fbfc;
}

.booking-field-card strong,
.booking-field-card small {
    display: block;
}

.booking-field-card small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.booking-field-select select {
    min-height: 40px;
}

.booking-field-policy {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 36px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 900;
}

.booking-field-policy.is-required {
    color: #075e69;
    background: #dff6f8;
}

.booking-fields-actions {
    position: sticky;
    bottom: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 28px rgba(16, 26, 50, 0.1);
    backdrop-filter: blur(8px);
}

@media (max-width: 860px) {
    .booking-fields-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .booking-field-card {
        grid-template-columns: 1fr;
    }

    .booking-fields-actions .btn {
        width: 100%;
    }
}
