/* Tailwind output / custom styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.clinical-theme {
    --clinical-bg: #f7f9fb;
    --clinical-canvas: #f1f5f9;
    --clinical-card: #ffffff;
    --clinical-card-soft: #f8fafc;
    --clinical-border: #dbe4ee;
    --clinical-border-strong: #cbd5e1;
    --clinical-text: #172033;
    --clinical-muted: #5f6b7a;
    --clinical-primary: #0077b6;
    --clinical-primary-strong: #005d90;
    --clinical-shadow: 0 4px 16px rgba(0, 119, 182, 0.06);
}

.clinical-theme main {
    background:
        radial-gradient(circle at top right, rgba(72, 202, 228, 0.12), transparent 28rem),
        var(--clinical-canvas);
}

.clinical-theme .bg-slate-950,
.clinical-theme .bg-slate-900 {
    background-color: var(--clinical-card) !important;
}

.clinical-theme .bg-slate-800 {
    background-color: #e9eef5 !important;
}

.clinical-theme .bg-slate-100 {
    background-color: var(--clinical-canvas) !important;
}

.clinical-theme .text-slate-100,
.clinical-theme .text-slate-200,
.clinical-theme .text-slate-300 {
    color: var(--clinical-text) !important;
}

.clinical-theme .text-slate-400,
.clinical-theme .text-slate-500 {
    color: var(--clinical-muted) !important;
}

.clinical-theme .border-slate-800,
.clinical-theme .border-slate-700 {
    border-color: var(--clinical-border) !important;
}

.clinical-theme .shadow-xl,
.clinical-theme .shadow-2xl {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12) !important;
}

.clinical-theme main .rounded-2xl,
.clinical-theme main .rounded-xl {
    box-shadow: var(--clinical-shadow);
}

.clinical-theme input,
.clinical-theme select,
.clinical-theme textarea {
    background-color: #f8fafc !important;
    border-color: var(--clinical-border-strong) !important;
    color: var(--clinical-text) !important;
}

.clinical-theme input:focus,
.clinical-theme select:focus,
.clinical-theme textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.16);
    border-color: var(--clinical-primary) !important;
}

.clinical-theme .bg-blue-600 {
    background-color: var(--clinical-primary) !important;
}

.clinical-theme .hover\:bg-blue-500:hover {
    background-color: var(--clinical-primary-strong) !important;
}

.clinical-theme .consent-template-empty {
    color: #7c2d12 !important;
    background-color: #fff7ed !important;
    border-color: #f59e0b !important;
}

.clinical-theme .consent-template-empty strong {
    color: #92400e;
}

.clinical-theme a,
.clinical-theme button {
    letter-spacing: 0;
}

.clinical-theme .odonto-app,
.clinical-theme .odontogram-view,
.clinical-theme [class*="odontogram"] {
    box-shadow: none;
}

/* Public landing page */
.landing-page {
    --landing-ink: #172033;
    --landing-muted: #627083;
    --landing-line: #dce6ef;
    --landing-blue: #0077b6;
    --landing-cyan: #48cae4;
    background: #f8fbfd;
    color: var(--landing-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.landing-nav { align-items: center; display: flex; gap: 2rem; justify-content: space-between; margin: auto; max-width: 1240px; padding: 1.35rem 1.5rem; }
.landing-brand img { height: 2.45rem; width: auto; }
.landing-links { display: flex; gap: 1.8rem; margin-left: auto; }
.landing-links a, .landing-text-link { color: var(--landing-muted); font-size: .82rem; font-weight: 600; text-decoration: none; transition: color .2s ease; }
.landing-links a:hover, .landing-text-link:hover, .footer-links a:hover, .footer-legal a:hover { color: var(--landing-blue); }
.landing-button { align-items: center; background: var(--landing-blue); border-radius: .7rem; color: white; display: inline-flex; font-size: .86rem; font-weight: 700; gap: .75rem; padding: .9rem 1.2rem; text-decoration: none; transition: transform .2s ease, background .2s ease; }
.landing-button:hover { background: #005d90; color: white; transform: translateY(-2px); }
.landing-button-small { padding: .7rem 1rem; white-space: nowrap; }
.landing-hero { align-items: center; display: grid; gap: 4rem; grid-template-columns: .88fr 1.12fr; margin: auto; max-width: 1240px; min-height: 650px; padding: 4rem 1.5rem 6rem; }
.landing-hero-copy { max-width: 530px; }
.landing-eyebrow { color: var(--landing-blue); font-size: .7rem; font-weight: 800; letter-spacing: .15em; margin: 0 0 1rem; text-transform: uppercase; }
.landing-hero h1 { font-size: clamp(2.7rem, 5vw, 5rem); letter-spacing: -.065em; line-height: .99; margin: 0; max-width: 620px; }
.landing-lead { color: var(--landing-muted); font-size: 1.08rem; line-height: 1.7; margin: 1.7rem 0; max-width: 480px; }
.landing-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 1.4rem; }
.landing-text-link { color: var(--landing-ink); }
.landing-proof-row { border-top: 1px solid var(--landing-line); color: var(--landing-muted); display: flex; font-size: .7rem; gap: 1.5rem; margin-top: 3.4rem; padding-top: 1.2rem; }
.landing-proof-row strong { color: var(--landing-ink); display: block; font-size: .76rem; }
.landing-hero-visual { background: #e9f7fa; border: 1px solid #d4eaf0; border-radius: 1.15rem; box-shadow: 0 24px 60px rgba(0, 119, 182, .12); overflow: hidden; transform: rotate(1deg); }
.landing-hero-product-shot { display: block; height: auto; max-width: 100%; object-fit: contain; width: 100%; }
.landing-window-bar { align-items: center; background: white; border-bottom: 1px solid #e5edf1; color: #93a5b3; display: flex; gap: .35rem; padding: .7rem .9rem; }
.landing-window-bar span { background: #d9e5eb; border-radius: 50%; height: .45rem; width: .45rem; }.landing-window-bar b { font-size: .55rem; font-weight: 600; margin-left: .5rem; }
.landing-dashboard-preview { display: flex; min-height: 390px; }.preview-sidebar { background: #f5fbfc; border-right: 1px solid #dcecf0; padding: 1.1rem .8rem; width: 3.2rem; }.preview-sidebar i { background: #b6dfe8; border-radius: .28rem; display: block; height: 1.45rem; margin-bottom: 1rem; opacity: .75; }.preview-sidebar i:first-child { background: var(--landing-blue); }
.preview-content { flex: 1; padding: 1.55rem; }.preview-heading { align-items: end; display: flex; justify-content: space-between; }.preview-heading small, .preview-cards small { color: #7b8e9e; display: block; font-size: .57rem; }.preview-heading strong { display: block; font-size: 1.05rem; margin-top: .25rem; }.preview-heading em { color: #7b8e9e; font-size: .57rem; font-style: normal; }
.preview-cards { display: grid; gap: .55rem; grid-template-columns: repeat(3, 1fr); margin: 1.4rem 0; }.preview-cards > div { background: white; border: 1px solid #e0edf0; border-radius: .65rem; padding: .8rem; }.preview-cards strong { display: block; font-size: 1.25rem; margin: .3rem 0; }.preview-cards b { color: #16a17a; font-size: .5rem; font-weight: 700; }
.preview-panel { background: white; border: 1px solid #e0edf0; border-radius: .7rem; padding: 1rem; }.preview-panel-title { display: flex; font-size: .7rem; justify-content: space-between; }.preview-panel-title span { color: var(--landing-blue); font-size: .56rem; }.preview-appointment { align-items: center; border-top: 1px solid #eef3f5; display: flex; gap: .8rem; margin-top: .75rem; padding-top: .75rem; }.preview-appointment > b { color: #8193a0; font-size: .62rem; }.preview-appointment span { flex: 1; }.preview-appointment strong, .preview-appointment small { display: block; font-size: .62rem; }.preview-appointment small { color: #8394a0; font-size: .52rem; margin-top: .2rem; }.preview-appointment i { background: #e1f7ef; border-radius: 1rem; color: #168566; font-size: .48rem; font-style: normal; padding: .3rem .5rem; }
.landing-section-width { margin-left: auto; margin-right: auto; max-width: 1240px; padding-left: 1.5rem; padding-right: 1.5rem; }.landing-intro { padding-bottom: 8rem; text-align: center; }.landing-intro h2, .landing-section-heading h2, .landing-ai h2, .landing-trust h2, .landing-faq h2, .landing-cta h2 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.055em; line-height: 1.05; margin: 0; }.landing-intro h2 span, .landing-ai h2 span { color: var(--landing-blue); }.landing-intro > p:last-child { color: var(--landing-muted); line-height: 1.7; margin: 1.5rem auto 0; max-width: 640px; }
.landing-section { padding-bottom: 8rem; }.landing-section-heading { align-items: end; display: flex; gap: 3rem; justify-content: space-between; margin-bottom: 2.5rem; }.landing-section-heading > p { color: var(--landing-muted); font-size: .9rem; line-height: 1.65; max-width: 300px; }.feature-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }.feature-card { background: white; border: 1px solid var(--landing-line); border-radius: 1rem; display: flex; flex-direction: column; min-height: 220px; padding: 1.5rem; transition: box-shadow .2s ease, transform .2s ease; }.feature-card:hover { box-shadow: 0 14px 34px rgba(20, 72, 92, .1); transform: translateY(-3px); }.feature-card-large { grid-row: span 2; min-height: 465px; }.feature-card-accent { background: #e4f7f8; border-color: #c5e9ed; }.feature-icon { align-items: center; background: #e5f5f8; border-radius: .65rem; color: var(--landing-blue); display: flex; font-size: 1.3rem; height: 2.5rem; justify-content: center; width: 2.5rem; }.feature-card p { color: var(--landing-blue); font-size: .68rem; font-weight: 800; letter-spacing: .1em; margin: 2rem 0 .6rem; text-transform: uppercase; }.feature-card h3 { font-size: 1.3rem; letter-spacing: -.035em; line-height: 1.15; margin: 0; }.feature-card > span:last-of-type { color: var(--landing-muted); font-size: .83rem; line-height: 1.6; margin-top: .8rem; }.feature-card a { color: var(--landing-blue); font-size: .72rem; font-weight: 700; margin-top: auto; padding-top: 1rem; text-decoration: none; }
.landing-ai { align-items: center; background: #e2f5f7; border-radius: 1.25rem; display: grid; gap: 4rem; grid-template-columns: 1fr 1fr; margin-bottom: 8rem; padding-bottom: 4.5rem; padding-top: 4.5rem; }.ai-copy { padding-left: 4rem; }.ai-copy > p:not(.landing-eyebrow) { color: var(--landing-muted); line-height: 1.7; max-width: 480px; }.ai-note { align-items: center; display: flex; font-size: .8rem; gap: .7rem; margin-top: 1.8rem; }.ai-note b { align-items: center; background: var(--landing-blue); border-radius: 50%; color: white; display: flex; height: 1.5rem; justify-content: center; width: 1.5rem; }.ai-card { background: white; border: 1px solid #cbe7eb; border-radius: 1rem; box-shadow: 0 18px 40px rgba(0, 119, 182, .1); margin-right: 3rem; overflow: hidden; }.ai-card-top, .ai-card-bottom { align-items: center; display: flex; justify-content: space-between; padding: 1rem 1.15rem; }.ai-card-top { border-bottom: 1px solid #e6f0f1; font-size: .7rem; font-weight: 700; }.ai-card-top em { background: #e3f7ef; border-radius: 1rem; color: #168566; font-size: .55rem; font-style: normal; padding: .35rem .6rem; }.ai-scan { background: #f7fbfc; padding: 3rem 1.5rem; text-align: center; }.tooth-row { display: flex; gap: .65rem; justify-content: center; }.tooth-row i { background: white; border: 2px solid #b5d8df; border-radius: .45rem .45rem .7rem .7rem; height: 3.7rem; transform: rotate(180deg); width: 1.8rem; }.tooth-row i.active { border-color: var(--landing-blue); box-shadow: inset 0 0 0 4px #d8f2f5; }.scan-line { background: var(--landing-cyan); height: 2px; margin: 1.4rem auto .7rem; max-width: 230px; }.ai-scan small { color: #6e8794; font-size: .62rem; }.ai-card-bottom { border-top: 1px solid #e6f0f1; color: #718592; font-size: .62rem; }.ai-card-bottom button { background: var(--landing-blue); border: 0; border-radius: .5rem; color: white; cursor: pointer; font-size: .62rem; font-weight: 700; padding: .55rem .75rem; }
.landing-trust { align-items: start; display: grid; gap: 5rem; grid-template-columns: .85fr 1.15fr; padding-bottom: 8rem; }.trust-points { border-top: 1px solid var(--landing-line); display: grid; grid-template-columns: repeat(3, 1fr); }.trust-points div { border-right: 1px solid var(--landing-line); display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem 1rem 1.4rem 0; }.trust-points div + div { padding-left: 1rem; }.trust-points div:last-child { border: 0; }.trust-points b { color: var(--landing-blue); font-size: .65rem; }.trust-points strong { font-size: .8rem; }.trust-points span { color: var(--landing-muted); font-size: .7rem; line-height: 1.5; }
.landing-faq { display: grid; gap: 5rem; grid-template-columns: .8fr 1.2fr; padding-bottom: 8rem; }.faq-list details { border-top: 1px solid var(--landing-line); padding: 1.2rem 0; }.faq-list details:last-child { border-bottom: 1px solid var(--landing-line); }.faq-list summary { cursor: pointer; display: flex; font-size: .9rem; font-weight: 700; justify-content: space-between; list-style: none; }.faq-list summary::-webkit-details-marker { display: none; }.faq-list summary span { color: var(--landing-blue); font-size: 1.25rem; font-weight: 400; }.faq-list p { color: var(--landing-muted); font-size: .82rem; line-height: 1.65; margin: .9rem 0 0; max-width: 650px; }
.landing-cta { background: var(--landing-ink); border-radius: 1.25rem; color: white; margin-bottom: 5rem; padding-bottom: 5rem; padding-top: 5rem; text-align: center; }.landing-cta .landing-eyebrow { color: var(--landing-cyan); }.landing-cta h2 { margin: auto auto 2rem; max-width: 720px; }.landing-footer { border-top: 1px solid var(--landing-line); display: grid; gap: 3rem; grid-template-columns: 1fr auto; margin: auto; max-width: 1240px; padding: 3rem 1.5rem 2rem; }.landing-footer img { height: 2rem; }.landing-footer p { color: var(--landing-muted); font-size: .72rem; margin-top: .8rem; }.footer-links { display: flex; gap: 1.4rem; }.footer-links a, .footer-legal a, .footer-legal span { color: var(--landing-muted); font-size: .7rem; text-decoration: none; }.footer-legal { display: flex; gap: 1.2rem; grid-column: 1 / -1; padding-top: 1.2rem; }
@media (max-width: 900px) { .landing-links { display: none; }.landing-hero { gap: 3rem; grid-template-columns: 1fr; padding-top: 3rem; }.landing-hero-copy { max-width: 650px; }.landing-hero-visual { max-width: 700px; width: 100%; }.landing-section-heading, .landing-trust, .landing-faq { display: block; }.landing-section-heading > p { margin-top: 1rem; }.landing-ai { grid-template-columns: 1fr; }.ai-copy { padding: 0 3rem; }.ai-card { margin: 0 3rem; }.landing-trust h2, .landing-faq h2 { margin-bottom: 2rem; } }
@media (max-width: 620px) { .landing-nav { padding-left: 1rem; padding-right: 1rem; }.landing-brand img { height: 2rem; }.landing-button-small { font-size: .7rem; }.landing-hero { min-height: auto; padding: 3rem 1rem 5rem; }.landing-section-width { padding-left: 1rem; padding-right: 1rem; }.landing-intro, .landing-section, .landing-trust, .landing-faq { padding-bottom: 5rem; }.landing-hero h1 { font-size: 2.9rem; }.landing-proof-row { gap: .8rem; }.preview-content { padding: .8rem; }.preview-cards { gap: .3rem; }.preview-cards > div { padding: .5rem; }.preview-cards strong { font-size: 1rem; }.preview-appointment small { display: none; }.feature-grid { grid-template-columns: 1fr; }.feature-card-large { grid-row: auto; min-height: 290px; }.landing-ai { border-radius: 0; margin-bottom: 5rem; padding-bottom: 3rem; padding-top: 3rem; }.ai-copy { padding: 0 1.5rem; }.ai-card { margin: 0 1rem; }.tooth-row { gap: .3rem; }.tooth-row i { height: 2.8rem; width: 1.2rem; }.trust-points { grid-template-columns: 1fr; }.trust-points div, .trust-points div + div { border-bottom: 1px solid var(--landing-line); border-right: 0; padding: 1rem 0; }.landing-footer { display: block; padding-left: 1rem; padding-right: 1rem; }.footer-links, .footer-legal { flex-wrap: wrap; margin-top: 2rem; } }

/* Additional landing capabilities */
.feature-card-wide { grid-column: span 2; }
.landing-consulting { align-items: center; border-bottom: 1px solid var(--landing-line); border-top: 1px solid var(--landing-line); display: grid; gap: 5rem; grid-template-columns: .8fr 1.2fr; margin-bottom: 8rem; padding-bottom: 5rem; padding-top: 5rem; }
.consulting-label > span { color: var(--landing-ink); display: block; font-size: 1.45rem; font-weight: 700; letter-spacing: -.04em; }
.consulting-label > span b { color: var(--landing-blue); font-size: 1.8rem; margin: 0 .2rem; }
.landing-consulting h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.055em; line-height: 1.05; margin: 0; max-width: 620px; }
.landing-consulting p:not(.landing-eyebrow) { color: var(--landing-muted); line-height: 1.7; margin: 1.3rem 0 1.5rem; max-width: 620px; }
@media (max-width: 900px) { .landing-consulting { display: block; }.landing-consulting > div + div { margin-top: 2.5rem; } }
@media (max-width: 620px) { .feature-card-wide { grid-column: auto; }.landing-consulting { margin-bottom: 5rem; padding-bottom: 3rem; padding-top: 3rem; } }

/* Landing content additions */
.landing-nav-actions { align-items: center; display: flex; gap: 1rem; }
.landing-login-link { color: var(--landing-muted); font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.landing-login-button { box-shadow: 0 5px 14px rgba(0, 119, 182, .18); }
.landing-login-link:hover { color: var(--landing-blue); }
.landing-workflow { padding-bottom: 8rem; }
.workflow-grid { border-left: 1px solid var(--landing-line); display: grid; grid-template-columns: repeat(7, 1fr); }
.workflow-grid > div { border-right: 1px solid var(--landing-line); display: flex; flex-direction: column; gap: .55rem; min-height: 170px; padding: 1rem; }
.workflow-grid b { color: var(--landing-blue); font-size: .68rem; }.workflow-grid strong { font-size: .85rem; }.workflow-grid span { color: var(--landing-muted); font-size: .68rem; line-height: 1.55; }
.ai-checks { display: grid; gap: .6rem; margin-top: 1.4rem; }.ai-checks span { color: var(--landing-ink); font-size: .76rem; }.ai-checks + .ai-note { margin-top: 1.4rem; }
.landing-product { padding-bottom: 8rem; }.product-tabs { border-bottom: 1px solid var(--landing-line); display: flex; gap: .4rem; margin-bottom: 1.2rem; }.product-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--landing-muted); cursor: pointer; font: inherit; font-size: .75rem; font-weight: 700; padding: .8rem 1rem; }.product-tabs button.active, .product-tabs button:hover { border-bottom-color: var(--landing-blue); color: var(--landing-blue); }.product-placeholder { align-items: center; background: #eef8fa; border: 1px dashed #b9dfe5; border-radius: 1rem; display: flex; flex-direction: column; justify-content: center; min-height: 270px; padding: 2rem; text-align: center; }.product-placeholder span { color: var(--landing-blue); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }.product-placeholder strong { font-size: 1.3rem; margin-top: .8rem; }.product-placeholder small { color: var(--landing-muted); font-size: .72rem; line-height: 1.5; margin-top: .7rem; max-width: 450px; }
.landing-cta > div:first-child > p:not(.landing-eyebrow) { color: #b7c4d2; line-height: 1.65; margin: 1rem auto 0; max-width: 520px; }.contact-actions { align-items: center; display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }.landing-cta .landing-text-link { color: #cbd6e1; font-size: .75rem; }.landing-cta .landing-text-link:hover { color: white; }
@media (max-width: 900px) { .workflow-grid { grid-template-columns: repeat(4, 1fr); }.workflow-grid > div { min-height: 145px; }.landing-product { padding-bottom: 5rem; } }
@media (max-width: 620px) { .landing-nav-actions { gap: .55rem; }.landing-login-button { font-size: .7rem; padding: .65rem .8rem; }.workflow-grid { grid-template-columns: repeat(2, 1fr); }.workflow-grid > div { min-height: 130px; padding: .8rem; }.product-tabs { flex-wrap: wrap; }.product-tabs button { padding-left: .45rem; padding-right: .45rem; }.landing-cta > div:first-child > p:not(.landing-eyebrow) { font-size: .85rem; } }

.ai-sequence { background: #f7fbfc; min-height: 330px; overflow: hidden; position: relative; }
.ai-sequence-frame { animation: ai-sequence-cycle 10s infinite; background: #f7fbfc; inset: 0; margin: 0; opacity: 0; position: absolute; }.ai-sequence-frame img { display: block; height: 100%; object-fit: contain; object-position: center; width: 100%; }.ai-sequence-frame figcaption { background: rgba(23, 32, 51, .88); bottom: 1rem; color: white; font-size: .65rem; font-weight: 700; left: 1rem; padding: .45rem .65rem; position: absolute; }.ai-sequence-frame-dictation { animation-delay: 0s; }.ai-sequence-frame-proposal { animation-delay: 5s; }.ai-sequence-progress { bottom: .65rem; display: flex; gap: .3rem; left: 50%; position: absolute; transform: translateX(-50%); }.ai-sequence-progress span { background: rgba(255,255,255,.7); border-radius: 50%; height: .4rem; width: .4rem; }.ai-review-label { color: #168566; font-size: .58rem; font-weight: 700; }.ai-card-bottom { gap: 1rem; }.ai-card-bottom > span:first-child { font-size: .58rem; }
@keyframes ai-sequence-cycle { 0%, 44% { opacity: 1; } 50%, 94% { opacity: 0; } 100% { opacity: 1; } }
.product-preview { align-items: center; background: #eef8fa; border: 1px solid #cbe7eb; border-radius: 1rem; display: flex; min-height: 330px; overflow: hidden; position: relative; }.product-preview-image { display: none; height: auto; max-height: 520px; object-fit: contain; width: 100%; }.product-preview-image.is-active { display: block; }
@media (prefers-reduced-motion: reduce) { .ai-sequence-frame { animation: none; opacity: 0; }.ai-sequence-frame-dictation { opacity: 1; }.ai-sequence-progress { display: none; } }
@media (max-width: 620px) { .ai-sequence { min-height: 260px; }.product-preview { min-height: 220px; }.ai-card-bottom { align-items: flex-start; flex-direction: column; gap: .35rem; } }

/* Single-frame transitions for the IA and agenda galleries. */
.ai-sequence-frame { animation: none; display: none; height: 100%; inset: 0; opacity: 0; position: absolute; transition: opacity .65s ease; width: 100%; }
.ai-sequence-frame.is-visible { display: block; opacity: 1; }
.ai-sequence-frame > span { background: rgba(23, 32, 51, .88); bottom: 1rem; color: white; font-size: .65rem; font-weight: 700; left: 1rem; padding: .45rem .65rem; position: absolute; }
.ai-sequence-progress span.is-active, .product-agenda-progress span.is-active { background: var(--landing-blue); transform: scale(1.2); }
.product-preview { height: min(520px, 44vw); min-height: 330px; }
.product-preview-image { display: block; inset: 0; max-height: none; opacity: 0; position: absolute; transition: opacity .65s ease; }
.product-preview-image.is-active { opacity: 1; z-index: 1; }
.product-agenda-sequence { display: none; inset: 0; position: absolute; }.product-agenda-sequence.is-active { display: block; }
.product-agenda-sequence img { display: block; height: 100%; inset: 0; object-fit: contain; opacity: 0; position: absolute; transition: opacity .65s ease; width: 100%; }.product-agenda-sequence img.is-active { opacity: 1; z-index: 1; }
.product-agenda-progress { bottom: .75rem; display: flex; gap: .35rem; left: 50%; position: absolute; transform: translateX(-50%); z-index: 2; }.product-agenda-progress span { background: #9ab6c2; border-radius: 50%; height: .4rem; transition: background .2s ease, transform .2s ease; width: .4rem; }
@media (max-width: 620px) { .product-preview { height: 62vw; min-height: 220px; } }

/* Keep every product screenshot inside the same visual frame. */
.product-preview > .product-preview-image { display: block; height: 100%; left: 0; object-fit: contain; position: absolute; top: 0; width: 100%; }
.product-preview > .product-preview-image:not(.is-active) { opacity: 0; pointer-events: none; visibility: hidden; }
.product-preview > .product-agenda-sequence { height: 100%; left: 0; top: 0; width: 100%; }
.product-agenda-sequence img { display: block; height: 100%; left: 0; object-fit: contain; top: 0; width: 100%; }

/* The navigation scrolls inside the fixed sidebar; the account footer stays visible. */
.app-sidebar > nav {
    min-height: 0;
}

.app-mobile-rail {
    display: flex;
}

.app-mobile-rail-title {
    display: none;
}

.app-main {
    margin-inline-start: 3.5rem;
}

.clinical-theme .ui-icon-preview {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

.clinical-theme #icon-mapping-copy {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

.shadow-sm {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.border-slate-300 {
    border-color: #cbd5e1;
}

.border-blue-200 {
    border-color: #bfdbfe;
}

.border-emerald-200 {
    border-color: #a7f3d0;
}

.border-cyan-200 {
    border-color: #a5f3fc;
}

.border-amber-200 {
    border-color: #fde68a;
}

.border-rose-200 {
    border-color: #fecdd3;
}

.border-red-200 {
    border-color: #fecaca;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-emerald-50 {
    background-color: #ecfdf5;
}

.bg-cyan-50 {
    background-color: #ecfeff;
}

.bg-amber-50 {
    background-color: #fffbeb;
}

.bg-rose-50 {
    background-color: #fff1f2;
}

.bg-red-50 {
    background-color: #fef2f2;
}

.bg-slate-100 {
    background-color: #f1f5f9;
}

.hover\:bg-slate-200:hover {
    background-color: #e2e8f0;
}

.text-blue-700 {
    color: #1d4ed8;
}

.text-blue-800 {
    color: #1e40af;
}

.text-emerald-700 {
    color: #047857;
}

.text-cyan-700 {
    color: #0e7490;
}

.text-amber-700 {
    color: #a16207;
}

.text-amber-800 {
    color: #92400e;
}

.text-rose-700 {
    color: #be123c;
}

.text-rose-800 {
    color: #9f1239;
}

.text-red-800 {
    color: #991b1b;
}

.hover\:text-blue-700:hover {
    color: #1d4ed8;
}

.assistant-hero-grid,
.assistant-next-grid,
.assistant-main-grid,
.assistant-kpi-grid {
    display: grid;
    gap: 1rem;
}

.assistant-hero-grid,
.assistant-next-grid {
    align-items: center;
}

.assistant-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.assistant-kpi-card,
.assistant-mini-card {
    display: block;
    border-width: 1px;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.assistant-mini-card {
    border-radius: 0.75rem;
}

.assistant-alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-width: 1px;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}

.assistant-kpi-blue {
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

.assistant-kpi-green {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
}

.assistant-kpi-cyan {
    background-color: #ecfeff;
    border-color: #a5f3fc;
}

.assistant-kpi-amber {
    background-color: #fffbeb;
    border-color: #fde68a;
}

.assistant-kpi-rose {
    background-color: #fff1f2;
    border-color: #fecdd3;
}

.assistant-kpi-red {
    background-color: #fef2f2;
    border-color: #fecaca;
}

.assistant-kpi-neutral {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}

.assistant-kpi-purple {
    background-color: #f5f3ff;
    border-color: #ddd6fe;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .dashboard-summary-grid {
        grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
    }
}

@media (min-width: 1280px) {
    .dashboard-summary-grid {
        grid-template-columns: minmax(0, .78fr) minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1.27fr);
    }
}

.dashboard-appointment-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

.dashboard-summary-alert-list .assistant-alert-row {
    min-width: 0;
    padding: .65rem .75rem;
}

.dashboard-summary-alert-list .assistant-alert-row > span:first-child {
    min-width: 0;
}

.dashboard-summary-alert-list .assistant-alert-row > span:first-child > span {
    white-space: nowrap;
    font-size: .8rem;
}

.dashboard-summary-alert-list .dashboard-intake-alert {
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.dashboard-summary-alert-list .assistant-alert-row > span:first-child > .dashboard-intake-label {
    white-space: normal;
    line-height: 1.05;
}

.dashboard-intake-label > span {
    display: block;
}

.dashboard-summary-alert-list .assistant-alert-row > span:last-child {
    font-size: 1.5rem;
    line-height: 1;
}

.dashboard-card-hitarea {
    position: absolute;
    z-index: 0;
    inset: 0;
    border-radius: inherit;
}

.dashboard-card-hitarea:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}

.dashboard-today-appointments-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
}

.dashboard-today-appointments-card {
    cursor: pointer;
}

.dashboard-credit-card {
    min-height: 5.75rem;
    padding: .75rem 1rem;
}

.dashboard-economic-card {
    border-top: 3px solid #2563eb;
    transition: box-shadow .15s ease, transform .15s ease;
}

.dashboard-economic-card:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

@media (min-width: 1024px) {
    .assistant-next-grid {
        grid-template-columns: auto 1fr auto;
    }
}

@media (min-width: 1280px) and (hover: hover) and (pointer: fine) {
    .assistant-hero-grid {
        grid-template-columns: 1fr auto;
    }

    .assistant-main-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
    }
}

.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

#modal-panel {
    max-height: calc(100vh - 32px);
}

#modal-content {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

#modal-content:has(.inventory-movement-modal) {
    overflow: hidden;
}

.inventory-movement-modal {
    display: flex;
    max-height: calc(100dvh - 2rem);
    flex-direction: column;
}

.inventory-movement-modal-body,
.inventory-movement-history-load {
    min-height: 0;
}

.inventory-movement-history-items {
    overscroll-behavior: contain;
}

#modal-panel.modal-panel-wide {
    max-width: min(1280px, calc(100vw - 24px));
}

#modal-panel:has([data-modal-size="wide"]) {
    max-width: min(1280px, calc(100vw - 24px));
}

#modal-panel:has([data-modal-size="compact"]) {
    max-width: min(480px, calc(100vw - 24px));
}

.patient-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .5rem;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    background: #ffffff;
    padding: .5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.patient-tab {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border-radius: .8rem;
    background: #f1f5f9;
    color: #334155;
    padding: .65rem .75rem;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    transition: background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.patient-tab:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.patient-tab.is-active {
    background: #0b7fbd;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(11, 127, 189, .22);
}

.patient-tab svg {
    flex: 0 0 auto;
}

/* Desktop keeps the navigation fixed; tablet and phone use the menu trigger. */
@media (min-width: 1280px) and (hover: hover) and (pointer: fine) {
    .app-sidebar {
        transform: translateX(0) !important;
    }

    .app-mobile-rail,
    .app-mobile-overlay {
        display: none !important;
    }

    .app-main {
        margin-inline-start: 0;
        padding-left: 16rem;
    }

    .app-main > .mx-auto {
        padding-top: 2rem;
    }
}

@media (max-width: 1279px), (hover: none) and (pointer: coarse) {
    .app-main {
        padding-left: 0;
    }

    .patient-tabs {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: .35rem;
        padding: .4rem;
        overflow: hidden;
    }

    .patient-tab {
        width: 2.9rem;
        min-height: 2.9rem;
        padding: .5rem .25rem;
    }

    .patient-tab-label {
        display: none;
    }

    .patient-tab.is-active {
        transform: translateY(-1px);
    }
}

.patient-clinical-overview {
    grid-template-columns: minmax(0, 1fr);
}

.patient-clinical-stack {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1180px) {
    .patient-clinical-overview {
        grid-template-columns: minmax(360px, 2fr) minmax(620px, 3fr);
        align-items: stretch;
    }

    .patient-clinical-stack {
        height: 100%;
    }

    .patient-history-preview {
        flex: 1 1 auto;
    }
}

.treatment-cost-copy-dialog {
    max-width: min(1024px, calc(100vw - 24px));
}

.treatment-cost-copy-dialog::backdrop {
    background: rgba(2, 6, 23, .72);
}

.treatment-cost-copy-preview-scroll {
    max-height: 46vh;
}

.appointment-schedule-card-compact {
    box-sizing: border-box;
    padding: .25rem .5rem !important;
}

.appointment-schedule-card-content {
    display: grid;
    gap: .75rem;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    height: 100%;
}

.appointment-schedule-card-compact > .appointment-schedule-card-content {
    align-items: center;
    gap: .5rem;
    grid-template-columns: 4.25rem minmax(0, 1fr) auto;
    height: 100%;
}

.appointment-schedule-card-time {
    white-space: nowrap;
}

.appointment-schedule-card-time p:first-child {
    font-size: .95rem;
    line-height: 1.1;
}

.appointment-schedule-card-time p:last-child {
    font-size: .65rem;
    line-height: 1.1;
}

.appointment-schedule-card-patient {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.appointment-schedule-card-heading {
    flex-wrap: nowrap;
    min-width: 0;
}

.appointment-schedule-card-compact .appointment-schedule-card-actions {
    flex-wrap: nowrap;
    gap: .3rem;
}

.appointment-schedule-card-compact .appointment-schedule-card-actions button,
.appointment-schedule-card-compact .appointment-schedule-card-actions a {
    flex: 0 0 2rem;
    height: 2rem;
    width: 2rem;
}

.appointment-schedule-card-compact .appointment-schedule-card-actions form {
    display: flex;
}

.appointment-week-day-card {
    min-height: 224px;
}

.appointment-mobile-view-switch {
    display: none;
}

.appointment-mobile-date,
.appointment-mobile-filter-control,
.appointment-view-select {
    display: none;
}

.appointment-view-select {
    min-width: 5rem;
    border: 1px solid #cbd5e1;
    border-radius: .7rem;
    background: #fff;
    padding: .45rem 1.25rem .45rem .55rem;
    color: #1e293b;
    font-size: .875rem;
    font-weight: 700;
}

.appointment-mobile-view-button {
    display: inline-flex;
    min-width: 0;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 1px solid #cbd5e1;
    border-radius: .75rem;
    background: #fff;
    padding: .65rem .75rem;
    color: #475569;
    font-size: .875rem;
    font-weight: 600;
}

.appointment-mobile-view-button.is-active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.appointment-week-carousel {
    display: none;
    gap: .75rem;
    overflow-x: auto;
    padding: .25rem .25rem .75rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

.appointment-week-carousel-shell {
    position: relative;
    min-width: 0;
}

.appointment-week-carousel-arrow {
    display: none;
}

.appointment-week-carousel-slide {
    flex: 0 0 min(86%, 26rem);
    scroll-snap-align: start;
}

.appointment-week-carousel .appointment-week-day-scroll {
    max-height: min(38vh, 320px);
    touch-action: pan-x pan-y;
}

.appointment-week-day-selected {
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, .4);
}

@media (max-width: 767px), (max-width: 950px) and (max-height: 500px), (min-width: 768px) and (max-width: 1279px) and (orientation: portrait) {
    .appointment-mobile-view-switch {
        display: flex;
        gap: .5rem;
    }

    .appointments-page[data-appointment-view="day"] .appointment-week-view-panel,
    .appointments-page[data-appointment-view="week"] .appointment-day-view-panel {
        display: none;
    }

    .appointment-week-compact {
        display: none;
    }

    .appointment-week-carousel {
        display: flex;
    }

    .patients-list-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;
    }
}

.appointment-week-day-scroll {
    max-height: 128px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    touch-action: pan-y;
}

@media (max-width: 767px) and (orientation: portrait) {
    .patients-list-page {
        display: flex;
        flex-direction: column;
        gap: .75rem;
    }

    .patients-list-page > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0;
    }

    .patients-list-header {
        display: none;
    }

    .patients-summary-grid {
        gap: .5rem;
    }

    .patients-summary-grid > article {
        padding: .75rem;
    }

    .patients-table-panel {
        padding: .75rem;
    }

    .patients-search-row {
        flex-direction: row;
        align-items: center;
        gap: .5rem;
        margin-bottom: .75rem;
    }

    .patients-search-row > input {
        min-width: 0;
        flex: 1 1 auto;
        padding: .75rem;
    }

    .clinical-theme:has(.inventory-list-page) {
        height: 100dvh;
        overflow: hidden;
        overscroll-behavior: none;
    }

    .clinical-theme:has(.inventory-list-page) .app-main {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .clinical-theme:has(.inventory-list-page) .app-main > .mx-auto {
        display: flex;
        height: 100%;
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
        padding-top: .5rem;
        padding-bottom: .5rem;
    }

    .inventory-list-page {
        display: flex;
        height: 100%;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        gap: .5rem;
        overflow: hidden;
        overscroll-behavior: none;
    }

    .inventory-list-page > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0;
    }

    .inventory-list-header {
        display: none;
    }

    .inventory-list-panel {
        display: flex;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        gap: .5rem;
        overflow: hidden;
        padding: .75rem;
    }

    #inventory-table-container {
        display: flex;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        overflow: hidden;
    }

    .inventory-page-fragment {
        display: flex;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        overflow: hidden;
    }

    .inventory-mobile-cards {
        min-height: 0;
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        padding-bottom: .25rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .inventory-pagination {
        flex: 0 0 auto;
        margin-top: .5rem;
        gap: .5rem;
    }

    .inventory-mobile-top-actions {
        display: none;
    }

    .inventory-mobile-bottom-actions {
        display: flex;
    }

    .inventory-mobile-name {
        overflow: visible;
        overflow-wrap: anywhere;
        text-overflow: clip;
        white-space: normal;
    }

    .inventory-mobile-meta > div {
        min-width: 0;
        line-height: 1.25rem;
    }

    .inventory-mobile-meta dt,
    .inventory-mobile-meta dd {
        display: inline;
    }

    .inventory-mobile-meta dt {
        color: #94a3b8;
    }

    .inventory-mobile-meta dd {
        color: #172033;
        overflow-wrap: anywhere;
    }

    .inventory-mobile-meta dd > span {
        vertical-align: middle;
    }

    .inventory-mobile-bottom-actions > button {
        width: 2rem;
        height: 2rem;
    }

    .inventory-mobile-bottom-actions > button svg {
        width: 1rem;
        height: 1rem;
    }

    .inventory-latest-movements {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1279px) and (orientation: portrait) {
    .clinical-theme:has(.appointments-page) {
        height: 100dvh;
        overflow: hidden;
        overscroll-behavior: none;
    }

    .clinical-theme:has(.appointments-page) .app-main {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .clinical-theme:has(.appointments-page) .app-main > .mx-auto {
        display: flex;
        height: 100%;
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
        padding-top: .5rem;
        padding-bottom: .5rem;
    }

    .appointments-page {
        display: flex;
        height: 100%;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        gap: .75rem;
        overflow: hidden;
        overscroll-behavior: none;
    }

    .appointments-page > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0;
    }

    .appointment-mobile-date {
        display: block;
        min-width: 0;
        overflow: hidden;
        color: #475569;
        font-size: .875rem;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .appointment-week-title,
    .appointments-page .appointment-day-title {
        display: none;
    }

    .appointment-mobile-filter-control,
    .appointment-view-select {
        display: block;
    }

    .appointment-week-view-panel,
    .appointment-day-view-panel {
        height: auto;
        min-height: 0;
        flex: 1 1 auto;
    }

    .appointment-week-carousel-shell {
        position: relative;
        min-height: 0;
        flex: 1 1 auto;
        overflow: visible;
    }

    .appointment-week-carousel {
        height: 100%;
        min-height: 0;
        flex: 1 1 auto;
        gap: .75rem;
        padding-right: .75rem;
        padding-bottom: .5rem;
    }

    .appointment-week-carousel-slide {
        flex-basis: 100%;
        min-width: 0;
    }

    .appointment-week-action-buttons {
        flex-wrap: nowrap !important;
        gap: .375rem !important;
    }

    .appointment-week-action-buttons > button,
    .appointment-week-action-buttons > a,
    .appointment-week-action-buttons > form > button {
        height: 2.25rem !important;
        width: 2.25rem !important;
        flex: 0 0 2.25rem;
    }

    .appointment-week-carousel-arrow {
        position: absolute;
        z-index: 5;
        top: 50%;
        display: inline-flex;
        height: 2.5rem;
        width: 2.5rem;
        align-items: center;
        justify-content: center;
        transform: translateY(-50%);
        border: 1px solid #cbd5e1;
        border-radius: 9999px;
        background: rgba(255, 255, 255, .94);
        color: #334155;
        box-shadow: 0 2px 8px rgba(15, 23, 42, .16);
    }

    .appointment-week-carousel-arrow-prev {
        left: -.6rem;
    }

    .appointment-week-carousel-arrow-next {
        right: -.6rem;
    }
}

.appointment-week-day-scroll::-webkit-scrollbar {
    width: 6px;
}

.appointment-week-day-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.appointment-week-day-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cbd5e1;
}

.appointment-week-day-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.appointment-day-scroll {
    height: max(180px, min(680px, calc(100vh - 560px)));
    overscroll-behavior-y: contain;
}

.appointment-filter-trigger {
    list-style: none;
}

.appointment-filter-trigger::-webkit-details-marker {
    display: none;
}

.appointment-filter-menu[open] .appointment-filter-trigger {
    border-color: #bfdbfe;
    background-color: #eff6ff;
    color: #1d4ed8;
}

.appointment-filter-popover {
    position: absolute;
    z-index: 40;
    top: calc(100% + .5rem);
    right: 0;
    width: min(90vw, 720px);
    max-height: min(75vh, 640px);
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #dbe4ee;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
}

.appointment-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .75rem;
}

@media (min-width: 640px) {
    .appointment-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .appointment-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Unified close control for modal headers. Footer actions such as Cancelar keep their own hierarchy. */
.clinical-theme .modal-close[class*="px-3"],
.clinical-theme .modal-close[class*="h-10"] {
    display: inline-flex;
    height: 2.5rem;
    width: 2.5rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: .75rem;
    background-color: #f1f5f9;
    color: #334155;
    font-weight: 700;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease;
}

.clinical-theme .modal-close[class*="px-3"]:hover,
.clinical-theme .modal-close[class*="h-10"]:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

@media (min-width: 768px) {
    .treatment-cost-copy-controls {
        grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr);
    }
}

@media (max-width: 767px), (max-width: 950px) and (max-height: 500px), (min-width: 768px) and (max-width: 1279px) and (orientation: portrait) {
    .appointment-week-view-panel,
    .appointment-day-view-panel {
        display: flex;
        height: calc(100dvh - 14rem);
        min-height: 18rem;
        flex-direction: column;
        overflow: hidden;
    }

    .appointment-week-view-panel > .mb-3 {
        flex: 0 0 auto;
    }

    .appointment-week-carousel-shell {
        min-height: 0;
        flex: 1 1 auto;
        position: relative;
    }

    .appointment-week-carousel {
        height: 100%;
        min-height: 0;
        flex: 1 1 auto;
        align-items: stretch;
    }

    .appointment-week-carousel-slide {
        display: flex;
        height: 100%;
        min-height: 0;
        flex-direction: column;
    }

    .appointment-week-carousel-slide > .mb-3 {
        flex: 0 0 auto;
    }

    .appointment-week-carousel .appointment-week-day-scroll {
        min-height: 0;
        max-height: none;
        flex: 1 1 auto;
    }

    .appointment-day-mobile-list {
        min-height: 0;
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        padding-right: .25rem;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
}
.voice-dictionary-record-btn {
  background-color: #7c3aed;
  color: #ffffff;
}

.voice-dictionary-record-btn:hover {
  background-color: #6d28d9;
}

.inventory-mobile-filter-toggle,
.inventory-mobile-history,
.inventory-email-action,
.inventory-filter-mobile-header,
.inventory-filter-mobile-footer {
    display: none;
}

.inventory-mobile-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
}

.inventory-filter-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
}

.inventory-filter-action-row .inventory-filter-menu {
    display: contents;
}

.inventory-filter-action-row #inventoryFilters {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin-bottom: 0;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 190px) minmax(140px, 190px);
}

.inventory-filter-action-row .inventory-email-action {
    grid-column: 2;
    grid-row: 1;
}

.inventory-filter-menu {
    display: contents;
    min-width: 0;
}

.inventory-filter-panel {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 190px) minmax(140px, 190px);
}

.inventory-filter-panel input {
    min-width: 0;
}

.inventory-email-action {
    display: inline-flex;
    flex: 0 0 auto;
}

@media (max-width: 767px) and (orientation: portrait) {
    .clinical-theme:has(.appointments-page) {
        height: 100dvh;
        overflow: hidden;
        overscroll-behavior: none;
    }

    .clinical-theme:has(.appointments-page) .app-main {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .clinical-theme:has(.appointments-page) .app-main > .mx-auto {
        display: flex;
        height: 100%;
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
        padding-top: .5rem;
        padding-bottom: .5rem;
    }

    .appointments-page {
        display: flex;
        height: 100%;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        gap: .5rem;
        overflow: hidden;
        overscroll-behavior: none;
    }

    .appointments-page > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0;
    }

    .appointment-page-heading-row {
        display: none;
    }

    .appointment-mobile-date {
        display: block;
        min-width: 0;
        overflow: hidden;
        color: #475569;
        font-size: .8rem;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .appointment-week-title,
    .appointments-page .appointment-day-title {
        display: none;
    }

    .appointment-mobile-filter-control {
        display: block;
    }

    .appointment-view-select {
        display: block;
    }

    .appointment-week-toolbar {
        align-items: flex-start;
        gap: .75rem;
    }

    .appointment-week-view-panel {
        height: auto;
        min-height: 0;
        flex: 1 1 auto;
    }

    .appointment-week-carousel-shell {
        overflow: visible;
    }

    .appointment-week-carousel {
        gap: .75rem;
        padding-right: .75rem;
        padding-bottom: .5rem;
    }

    .appointment-week-carousel-slide {
        flex-basis: 100%;
        min-width: 0;
    }

    .appointment-week-action-buttons {
        flex-wrap: nowrap !important;
        gap: .25rem !important;
    }

    .appointment-week-action-buttons > button,
    .appointment-week-action-buttons > a,
    .appointment-week-action-buttons > form > button {
        height: 2rem !important;
        width: 2rem !important;
        flex: 0 0 2rem;
    }

    .appointment-week-carousel-arrow {
        position: absolute;
        z-index: 5;
        top: 50%;
        display: inline-flex;
        height: 2.25rem;
        width: 2.25rem;
        align-items: center;
        justify-content: center;
        transform: translateY(-50%);
        border: 1px solid #cbd5e1;
        border-radius: 9999px;
        background: rgba(255, 255, 255, .94);
        color: #334155;
        box-shadow: 0 2px 8px rgba(15, 23, 42, .16);
    }

    .appointment-week-carousel-arrow-prev {
        left: -.6rem;
    }

    .appointment-week-carousel-arrow-next {
        right: -.6rem;
    }

    .appointment-mobile-controls {
        gap: .375rem;
    }

    .appointment-mobile-controls > a,
    .appointment-mobile-controls > details > summary {
        height: 2.25rem;
        width: 2.25rem;
    }

    .appointment-day-view-panel {
        height: auto;
        min-height: 0;
        flex: 1 1 auto;
    }

    .appointment-day-mobile-list {
        margin-top: .75rem;
    }

    .appointment-day-mobile-list > :not([hidden]) ~ :not([hidden]) {
        margin-top: .5rem;
    }

    .appointment-day-mobile-list article {
        padding: .75rem;
    }

    .appointment-day-mobile-list article > div.mt-3 {
        margin-top: .375rem;
    }

    .appointment-day-mobile-actions {
        flex-wrap: nowrap;
        gap: .25rem;
        margin-top: .625rem;
    }

    .appointment-day-mobile-actions > * {
        flex: 0 0 auto;
    }

    .appointment-day-mobile-actions button,
    .appointment-day-mobile-actions a {
        width: 2rem;
        height: 2rem;
        border-radius: .55rem;
    }

    .appointment-day-mobile-actions svg {
        width: .9rem;
        height: .9rem;
    }

    .app-mobile-rail {
        inset: 0 0 auto;
        height: 3.5rem;
        width: auto;
        flex-direction: row;
        justify-content: flex-start;
        gap: .5rem;
        overflow: hidden;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
        padding: .5rem .75rem;
    }

    .app-mobile-rail-button {
        margin-bottom: 0;
    }

    .app-mobile-rail-quick-link {
        display: none;
    }

    .app-mobile-rail-separator {
        width: 1px;
        height: 2rem;
        flex: 0 0 auto;
        margin: 0;
    }

    .app-mobile-rail-title {
        display: block;
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
        padding-left: .25rem;
        color: #0f172a;
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.25rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-mobile-page-heading,
    .app-mobile-heading-only {
        display: none !important;
    }

    .app-main {
        margin-inline-start: 0;
        padding-top: 3.5rem;
    }

    .inventory-mobile-toolbar {
        position: relative;
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        gap: .5rem;
    }

    .inventory-filter-action-row {
        display: flex;
    }

    .inventory-filter-action-row .inventory-filter-menu {
        display: block;
    }

    .inventory-filter-action-row #inventoryFilters {
        grid-column: auto;
        grid-row: auto;
    }

    .inventory-filter-action-row .inventory-email-action {
        grid-column: auto;
        grid-row: auto;
    }

    .inventory-filter-menu {
        display: block;
    }

    .inventory-mobile-filter-toggle,
    .inventory-mobile-history {
        display: inline-flex;
    }

    .inventory-mobile-history {
        flex: 0 0 auto;
    }

    .inventory-filter-panel {
        position: absolute;
        z-index: 40;
        top: calc(100% + .5rem);
        right: 0;
        left: auto;
        box-sizing: border-box;
        width: min(90vw, 720px);
        max-width: calc(100vw - 2rem);
        grid-template-columns: minmax(0, 1fr);
        gap: .75rem;
        max-height: min(75vh, 640px);
        overflow-y: auto;
        margin: 0;
        padding: 1rem;
        border: 1px solid #dbe4ee;
        border-radius: 1rem;
        background: #fff;
        box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
        color: #0f172a;
    }

    .inventory-filter-menu[open] .inventory-filter-trigger {
        border-color: #93c5fd;
        background: #eff6ff;
        color: #1d4ed8;
    }

    .inventory-filter-panel input,
    .inventory-filter-panel select {
        border-color: #cbd5e1;
        background-color: #fff;
        color: #1e293b;
        padding: .625rem .75rem;
    }

    .inventory-filter-mobile-header,
    .inventory-filter-mobile-footer {
        display: flex;
        grid-column: 1 / -1;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
    }
}

.patients-search-row > input {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
}

@media (min-width: 768px) and (max-width: 1279px) and (orientation: portrait) {
    .appointment-week-view-panel,
    .appointment-day-view-panel {
        height: auto;
        min-height: 0;
        flex: 1 1 auto;
    }
}
