@import "tailwindcss";
@import "tailwindcss-animated";

@plugin "daisyui";


@plugin "daisyui/theme" {
    name: "pastel";
    default: true;
    prefersdark: false;
    color-scheme: "light";
    --color-base-100: oklch(100% 0 0);
    --color-base-200: oklch(98.462% 0.001 247.838);
    --color-base-300: oklch(92.462% 0.001 247.838);
    --color-base-content: oklch(20% 0 0);
    --color-primary: oklch(55% 0.135 66.442);
    --color-primary-content: oklch(98% 0.003 247.858);
    --color-secondary: oklch(45% 0.124 130.933);
    --color-secondary-content: oklch(98% 0.003 247.858);
    --color-accent: oklch(90% 0.093 164.15);
    --color-accent-content: oklch(39% 0.095 152.535);
    --color-neutral: oklch(55% 0.135 66.442);
    --color-neutral-content: oklch(92% 0.013 255.508);
    --color-info: oklch(38% 0.189 293.745);
    --color-info-content: oklch(98% 0.003 247.858);
    --color-success: oklch(79% 0.209 151.711);
    --color-success-content: oklch(98% 0.003 247.858);
    --color-warning: oklch(83% 0.128 66.29);
    --color-warning-content: oklch(55% 0.195 38.402);
    --color-error: oklch(64% 0.246 16.439);
    --color-error-content: oklch(98% 0.003 247.858);
    --radius-selector: 0.5rem;
    --radius-field: 0.5rem;
    --radius-box: 1rem;
    --size-selector: 0.25rem;
    --size-field: 0.1875rem;
    --border: 0.5px;
    --depth: 1;
    --noise: 1;
}






#blazor-error-ui {
    display: none;
    position: fixed;
    inset-inline: 0.75rem;
    top: 0.75rem;
    z-index: 1000;
    width: auto;
    max-width: 28rem;
    margin-inline: auto;
    left: 0;
    right: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    animation: blazor-top-slide-in 0.35s ease;
}

#blazor-error-ui .blazor-error-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    opacity: 0.7;
}

@keyframes blazor-top-slide-in {
    from {
        transform: translateY(-120%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Blazor reconnect toast — top slide-down DaisyUI alert */
#components-reconnect-modal {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 1100;
    display: flex;
    justify-content: center;
    padding: 0.75rem;
    pointer-events: none;
    transform: translateY(-130%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

#components-reconnect-modal.reconnect-visible,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

#components-reconnect-modal .reconnect-toast {
    width: min(100%, 26rem);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

#components-reconnect-modal .reconnect-toast__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
    text-align: start;
}

#components-reconnect-modal .hidden {
    display: none !important;
}


.overlay {
    position: relative;
    display: block; /* Add display:block directly instead of using d-block class */
    overflow: hidden;
    border-radius: 12px; /* or specific value like 0.625rem */
}

.overlay-wrapper {
    width: 100%;
    min-height: 175px;
    transition: transform 0.3s ease;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 12px; /* Inherit parent's border-radius */
}

.overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: rgba(0, 0, 0, 0.25);
}

/* Hover effects */
.overlay:hover .overlay-layer {
    opacity: 1;
}

.overlay:hover .overlay-wrapper {
    transform: scale(1.03);
}

.bi-eye-fill {
    color: white;
    font-size: 2.5rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.overlay:hover .bi-eye-fill {
    transform: translateY(0);
}

/* Dashboard glass island navigation */
.dash-shell {
    min-height: 100vh;
    max-width: 100%;
    overflow-x: clip;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(255, 186, 120, 0.28), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(140, 200, 180, 0.22), transparent 50%),
        linear-gradient(180deg, oklch(98.5% 0.01 90) 0%, oklch(96% 0.01 247) 100%);
}


/* DaisyUI .stat uses nowrap + large padding → horizontal overflow on phones */
.dash-shell .stat {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    padding-inline: 0.75rem;
    padding-block: 0.65rem;
    border-inline-end: 0 !important;
}

.dash-shell .stat-title,
.dash-shell .stat-value,
.dash-shell .stat-desc {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.dash-shell .card,
.dash-shell .card-body {
    min-width: 0;
    max-width: 100%;
}

.dash-shell .grid {
    min-width: 0;
    max-width: 100%;
}

.dash-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    max-width: 100%;
}

.dash-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    max-width: 100%;
}

.dash-toolbar__dates {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

@media (min-width: 640px) {
    .dash-toolbar__dates {
        display: flex;
        width: auto;
    }

    .dash-toolbar__dates .shamsi-picker {
        width: 9rem;
    }
}

@media (max-width: 639px) {
    .dash-toolbar__filters > .select {
        width: 100%;
        max-width: 100%;
    }

    .shamsi-picker {
        min-width: 0 !important;
        width: 100%;
    }
}

.dash-glass {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.28));
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 10px 40px rgba(40, 30, 20, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

/* Low-end / mobile: blur is expensive and freezes scrolling */
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
    .dash-glass,
    .dash-island,
    .dash-island.dash-island--side,
    .dash-island.dash-island--bottom {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(255, 255, 255, 0.92);
    }
}

/* Lightweight dashboard bars (no ApexCharts) */
.dash-lite-bars {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dash-lite-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 0.5rem;
    align-items: center;
}

.dash-lite-bar__label {
    font-size: 0.75rem;
    opacity: 0.8;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-lite-bar__value {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.dash-lite-bar__track {
    grid-column: 1 / -1;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(40, 30, 20, 0.08);
    overflow: hidden;
}

.dash-lite-bar__fill {
    height: 100%;
    border-radius: inherit;
    background: oklch(55% 0.135 66.442);
    min-width: 0;
}

.dash-island {
    position: fixed;
    z-index: 50;
    gap: 0.35rem;
    padding: 0.45rem;
    border-radius: 9999px;
    align-items: center;
    justify-content: center;
}

.dash-island--side {
    flex-direction: column;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
}

.dash-island--bottom {
    flex-direction: row;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 1rem;
    width: auto;
    max-width: none;
    transform: none;
    padding: 0.4rem;
    overflow: hidden;
}

.dash-island,
.dash-island.dash-island--side,
.dash-island.dash-island--bottom {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.32));
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 12px 40px rgba(40, 30, 20, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dash-island__track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 0.35rem;
}

.dash-island__track--fit {
    justify-content: space-evenly;
}

.dash-island__track--scroll {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dash-island__track--scroll::-webkit-scrollbar {
    display: none;
}

.dash-island__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    color: oklch(35% 0.02 60);
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.dash-island__btn:hover {
    background: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
}

.dash-island__btn--active {
    background: oklch(55% 0.135 66.442);
    color: white;
    box-shadow: 0 6px 16px rgba(180, 100, 40, 0.35);
}

.dash-main {
    max-width: 100%;
    min-width: 0;
    padding-bottom: 6rem;
}

@media (min-width: 768px) {
    .dash-main {
        padding-bottom: 1.5rem;
        padding-right: 5.5rem;
    }
}

/* Selectable option bulletin (chip board) */
.dash-bulletin {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.55rem;
    border-radius: 1rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.dash-bulletin__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(40, 30, 20, 0.1);
    background: rgba(255, 255, 255, 0.55);
    color: oklch(35% 0.02 60);
    font-size: 0.8rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-bulletin__chip:hover {
    background: rgba(255, 255, 255, 0.85);
}

.dash-bulletin__chip--active {
    background: oklch(55% 0.135 66.442);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(180, 100, 40, 0.3);
}

/* Admin live data — fullscreen TV board (no sideways scroll) */
html:has(.live-tv),
body:has(.live-tv) {
    overflow-x: hidden;
}

.live-tv {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: calc(100dvh - 9.25rem);
    max-height: calc(100dvh - 9.25rem);
    overflow: hidden;
}

.live-tv__header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    min-width: 0;
    flex-shrink: 0;
}

.live-tv__header > div:first-child {
    min-width: 0;
}

.live-tv__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
}

.live-tv__sub {
    margin-top: 0.05rem;
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.55;
    overflow-wrap: anywhere;
}

.live-tv__meta {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.live-tv__clock {
    font-size: 0.78rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    opacity: 0.7;
}

.live-tv__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
    flex: 1;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

.live-tv-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 2px rgba(40, 30, 20, 0.04);
    overflow: hidden;
}

.live-tv-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.38rem 0.7rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    min-width: 0;
}

.live-tv-panel__head h2 {
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0;
    min-width: 0;
}

.live-tv-panel__head span {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.5;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.live-tv-panel__body {
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.live-tv-panel__body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.live-tv-empty {
    font-size: 0.78rem;
    font-weight: 400;
    opacity: 0.5;
    text-align: center;
    padding: 1.5rem 0.75rem;
}

.live-tv-rows {
    width: 100%;
    min-width: 0;
}

.live-tv-row {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 0.95fr) minmax(0, 0.95fr);
    gap: 0.2rem 0.55rem;
    align-items: center;
    width: 100%;
    min-width: 0;
    padding: 0.28rem 0.65rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.045);
    border-right: 2px solid var(--c, transparent);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.35;
}

.live-tv-row > * {
    min-width: 0;
}

.live-tv-row:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.live-tv-row--head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(248, 246, 242, 0.96);
    backdrop-filter: blur(8px);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(0, 0, 0, 0.5);
    border-right-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
}

.live-tv-clip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-tv-muted {
    opacity: 0.72;
}

.live-tv-when {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.35rem;
    min-width: 0;
}

.live-tv-date {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.live-tv-time {
    font-size: 0.68rem;
    font-weight: 400;
    opacity: 0.55;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

.live-tv-plans-viewport {
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: auto;
}

.live-tv-plans {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
    min-width: 0;
    align-content: start;
}

.live-tv-plan {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0.6rem 0.7rem 0.55rem;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(13, 148, 136, 0.16);
    overflow: hidden;
}

.live-tv-plan__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    min-width: 0;
}

.live-tv-plan__doctor {
    font-size: 0.88rem;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-tv-plan__date {
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 1;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.live-tv-plan__total {
    margin-top: 0.15rem;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.15;
    color: #0f766e;
    font-variant-numeric: tabular-nums;
}

.live-tv-plan__list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-height: 0;
}

.live-tv-plan__list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 400;
    padding-top: 0.2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.live-tv-plan__list li span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-tv-plan__amount {
    font-size: 0.8rem;
    font-weight: 500;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
}

@media (min-width: 768px) {
    .live-tv {
        height: calc(100dvh - 7.5rem);
        max-height: calc(100dvh - 7.5rem);
    }
}

@media (min-width: 1100px) {
    .live-tv__grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        height: 100%;
    }

    .live-tv-panel {
        height: 100%;
    }
}

/* Bank sheet (Google Sheets–style fill handle) */
.bank-sheet__table td.bank-sheet__cell {
    position: relative;
    padding: 0.25rem;
    vertical-align: middle;
}

.bank-sheet__cell-inner {
    position: relative;
}

.bank-sheet__cell--selected {
    outline: 2px solid oklch(55% 0.135 66.442);
    outline-offset: -2px;
}

.bank-sheet__cell--fill-target {
    background: color-mix(in oklab, oklch(55% 0.135 66.442) 12%, transparent);
}

.bank-sheet__fill-handle {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 8px;
    height: 8px;
    background: oklch(55% 0.135 66.442);
    border: 1px solid white;
    cursor: crosshair;
    z-index: 2;
    touch-action: none;
}

.bank-sheet__cell:not(.bank-sheet__cell--selected) .bank-sheet__fill-handle {
    opacity: 0;
}

.bank-sheet__cell:hover .bank-sheet__fill-handle,
.bank-sheet__cell--selected .bank-sheet__fill-handle {
    opacity: 1;
}

/* Lead status filters & cards */
.lead-status-btn {
    border: 1.5px solid var(--status-color, #94a3b8) !important;
    color: var(--status-color, #475569) !important;
    background: color-mix(in srgb, var(--status-color, #94a3b8) 12%, white) !important;
}

.lead-status-btn--active {
    border-color: var(--status-color, #94a3b8) !important;
    background: var(--status-color, #94a3b8) !important;
    color: var(--status-contrast, #fff) !important;
}

.lead-card {
    background: color-mix(in srgb, var(--status-color, #94a3b8) 14%, white);
    border: 1px solid color-mix(in srgb, var(--status-color, #94a3b8) 28%, transparent);
    border-inline-start: 4px solid var(--status-color, #94a3b8);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.lead-card:hover {
    box-shadow: 0 8px 24px color-mix(in srgb, var(--status-color, #94a3b8) 22%, transparent);
}

.lead-card__badge {
    background: var(--status-color, #94a3b8);
    color: var(--status-contrast, #fff);
    border: none;
}

.lead-card__summary {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: color-mix(in srgb, var(--status-color, #475569) 55%, #334155);
}

.lead-card__summary strong {
    color: #1f2937;
    font-weight: 600;
}

.stat-clickable {
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.stat-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(40, 30, 20, 0.12);
}

.chart-clickable {
    cursor: pointer;
}

/* Dental patient / pending appointment square cards */
.patient-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .patient-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .patient-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .patient-card-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.patient-card {
    display: flex;
    flex-direction: column;
    min-height: 11.5rem;
    aspect-ratio: 1 / 1;
    padding: 0.85rem;
    border-radius: 1rem;
    background:
        linear-gradient(160deg, color-mix(in srgb, var(--color-accent) 35%, white) 0%, white 55%),
        #fff;
    border: 1px solid color-mix(in srgb, var(--color-secondary) 18%, transparent);
    box-shadow: 0 4px 14px rgba(40, 50, 40, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.patient-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(40, 50, 40, 0.12);
}

.patient-card--pending {
    aspect-ratio: auto;
    min-height: 14rem;
    background:
        linear-gradient(160deg, color-mix(in srgb, var(--color-warning) 22%, white) 0%, white 58%),
        #fff;
}

.patient-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.patient-card__avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--color-secondary) 16%, white);
    color: var(--color-secondary);
    font-size: 0.95rem;
}

.patient-card__status {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.patient-card__name {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.patient-card__phone {
    font-size: 0.72rem;
    opacity: 0.7;
    margin: 0.15rem 0 0.4rem;
    text-align: left;
}

.patient-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: auto;
    font-size: 0.68rem;
    line-height: 1.35;
    color: #475569;
}

.patient-card__meta strong {
    color: #1f2937;
    font-weight: 600;
}

.patient-view-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

@media (min-width: 768px) {
    .patient-view-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .patient-view-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.patient-info-tile {
    border-radius: 0.85rem;
    padding: 0.75rem 0.85rem;
    background: color-mix(in srgb, var(--color-base-200) 80%, white);
    border: 1px solid color-mix(in srgb, var(--color-base-300) 70%, transparent);
    min-height: 4.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.patient-info-tile--accent {
    background: color-mix(in srgb, var(--color-accent) 40%, white);
    border-color: color-mix(in srgb, var(--color-secondary) 25%, transparent);
}

.patient-info-tile__label {
    font-size: 0.68rem;
    opacity: 0.65;
}

.patient-info-tile__value {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.patient-appt-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.65rem;
}

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

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

.patient-appt-card {
    border-radius: 0.85rem;
    padding: 0.85rem;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--c, #94a3b8) 28%, transparent);
    border-inline-start: 4px solid var(--c, #94a3b8);
    box-shadow: 0 3px 12px rgba(30, 40, 40, 0.05);
}
/* Minimal Shamsi date picker */
html.shamsi-picker-open,
body.shamsi-picker-open {
    overflow: hidden !important;
}

.shamsi-picker {
    position: relative;
    display: inline-block;
    min-width: 9rem;
    max-width: 100%;
}

.shamsi-picker__backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: transparent;
}

.shamsi-picker__panel {
    position: fixed;
    z-index: 50;
    width: min(17.5rem, calc(100vw - 1rem));
    max-height: calc(100vh - 1rem);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0.65rem;
    border-radius: 0.9rem;
    background: #fff;
    border: 1px solid rgba(40, 30, 20, 0.12);
    box-shadow: 0 16px 36px rgba(30, 25, 20, 0.22);
}

.shamsi-picker__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.shamsi-picker__title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.shamsi-picker__title-btn {
    border: 0;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 0.45rem;
    padding: 0.2rem 0.45rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.shamsi-picker__title-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.shamsi-picker__weekdays,
.shamsi-picker__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.15rem;
    text-align: center;
}

.shamsi-picker__weekdays {
    margin-bottom: 0.25rem;
    font-size: 0.65rem;
    opacity: 0.55;
}

.shamsi-picker__day {
    height: 1.85rem;
    border-radius: 0.55rem;
    border: 0;
    background: transparent;
    font-size: 0.75rem;
    cursor: pointer;
}

.shamsi-picker__day:hover {
    background: rgba(0, 0, 0, 0.05);
}

.shamsi-picker__day--empty {
    pointer-events: none;
}

.shamsi-picker__day--today {
    box-shadow: inset 0 0 0 1px rgba(180, 100, 40, 0.45);
}

.shamsi-picker__day--selected {
    background: oklch(55% 0.135 66.442);
    color: white;
}

.shamsi-picker__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.shamsi-picker__chip {
    min-height: 2.1rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(40, 30, 20, 0.08);
    background: #f7f5f2;
    font-size: 0.75rem;
    cursor: pointer;
}

.shamsi-picker__chip:hover {
    background: #efeae3;
}

.shamsi-picker__chip--selected {
    background: oklch(55% 0.135 66.442);
    border-color: transparent;
    color: white;
}

.shamsi-picker__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

/* Shared datetime row + custom time picker */
.datetime-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 0.5rem;
    align-items: end;
}

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

.time-picker {
    position: relative;
    display: inline-block;
    min-width: 7.5rem;
    max-width: 100%;
}

.time-picker__backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: transparent;
}

.time-picker__panel {
    position: fixed;
    z-index: 50;
    width: min(17.5rem, calc(100vw - 1rem));
    max-height: calc(100vh - 1rem);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0.65rem;
    border-radius: 0.9rem;
    background: #fff;
    border: 1px solid rgba(40, 30, 20, 0.12);
    box-shadow: 0 16px 36px rgba(30, 25, 20, 0.22);
}

.time-picker__section {
    margin-bottom: 0.55rem;
}

.time-picker__label {
    display: block;
    font-size: 0.65rem;
    opacity: 0.55;
    margin-bottom: 0.3rem;
}

.time-picker__hours,
.time-picker__minutes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.3rem;
}

.time-picker__ampm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.time-picker__chip {
    min-height: 2rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(40, 30, 20, 0.08);
    background: #f7f5f2;
    font-size: 0.75rem;
    cursor: pointer;
}

.time-picker__chip:hover {
    background: #efeae3;
}

.time-picker__chip--selected {
    background: oklch(55% 0.135 66.442);
    border-color: transparent;
    color: white;
}

.time-picker__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-top: 0.35rem;
}
