:root {
    --bg: #d9f3ee;
    --panel: #ffffff;
    --panel-soft: #f3fbf9;
    --line: #deeeea;
    --text: #1b2b33;\r\n    --ink: #1b2b33;
    --muted: #6b7c83;
    --brand: #1fd0a4;
    --brand-deep: #13b28b;
    --brand-soft: #e8fbf6;
    --danger-soft: #ffe9e7;
    --danger-text: #cf5a4c;
    --warning-soft: #edf1f7;
    --warning-text: #64748b;
    --success-soft: #e9f9eb;
    --success-text: #24915a;
}

body {
    margin: 0;
    background: radial-gradient(900px 420px at 15% -10%, rgba(31, 208, 164, 0.24) 0%, rgba(31, 208, 164, 0) 60%),\r\n                radial-gradient(760px 380px at 92% 12%, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 55%),\r\n                linear-gradient(180deg, #f6fffd 0%, var(--bg) 100%);
    color: var(--text);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 108px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(31, 208, 164, 0.12);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    color: var(--text);
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand) 0%, #8cefd5 100%);
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 18px 30px rgba(31, 208, 164, 0.25);
}

.brand-text {
    text-align: center;
}

.brand-text h1 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.brand-text p {
    margin: 0;
    font-size: 0.72rem;
    color: var(--muted);
}

.nav-cluster {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.sidebar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border-radius: 18px;
    padding: 12px 8px;
    color: #64748b;
    text-decoration: none;
    transition: 0.2s ease;
}

.sidebar-link i {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--panel-soft);
    font-size: 1.15rem;
}

.sidebar-link span {
    font-size: 0.7rem;
    text-align: center;
    line-height: 1.1;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--brand-deep);
}

.sidebar-link.active i,
.sidebar-link:hover i {
    background: linear-gradient(135deg, var(--brand) 0%, #82ebd0 100%);
    color: white;
    box-shadow: 0 10px 22px rgba(31, 208, 164, 0.22);
}

.doctor-card {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.doctor-card small,
.doctor-card span {
    color: var(--muted);
    font-size: 0.72rem;
}

.content-shell {
    flex: 1;
    padding: 18px 20px 28px;
}

.top-utility {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    box-shadow: 0 20px 40px rgba(27, 68, 72, 0.06);
}

.utility-left,
.utility-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-dot {
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--panel-soft);
    color: var(--text);
    font-size: 1.3rem;
}

.utility-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7f4f4;
    border-radius: 16px;
    padding: 0 16px;
    min-width: 360px;
    height: 48px;
}

.utility-search i {
    color: var(--muted);
}

.utility-search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    color: var(--text);
}

.utility-chip,
.utility-avatar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    background: #fff4e6;
    border-radius: 16px;
    padding: 10px 14px;
    font-weight: 600;
}

.utility-chip i {
    color: #8b5cf6;
}

.utility-avatar {
    background: var(--brand-soft);
}

.avatar-ring {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: white;
    color: var(--brand-deep);
}

.main-content {
    padding-top: 18px;
}

.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-size: 0.74rem;
}

.page-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--muted);
    font-size: 0.92rem;
}

.app-alert {
    border-radius: 18px;
    border: 0;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
}

.surface-card,
.card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.86) !important;
    border-radius: 26px !important;
    box-shadow: 0 22px 46px rgba(28, 72, 76, 0.07) !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 20px 24px !important;
}

.card-body {
    padding: 22px 24px !important;
}

.form-control,
.form-select {
    border-radius: 14px;
    border-color: var(--line);
    min-height: 46px;
    background: #fbfdfd;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(31, 208, 164, 0.45);
    box-shadow: 0 0 0 0.18rem rgba(31, 208, 164, 0.12);
}

.btn {
    border-radius: 14px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    border: 0;
}

.btn-outline-primary {
    color: var(--brand-deep);
    border-color: rgba(31, 208, 164, 0.35);
}

.btn-outline-primary:hover {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-soft {
    background: var(--panel-soft);
    color: var(--text);
    border: 1px solid var(--line);
}

.hero-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(246, 255, 252, 0.98) 100%);
    border-radius: 32px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 26px 48px rgba(26, 75, 72, 0.08);
}

.hero-panel h3 {
    margin: 0 0 8px;
    font-size: 1.8rem;
}

.hero-panel p {
    color: var(--muted);
    max-width: 560px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric-tile {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.metric-tile small {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.metric-tile h3 {
    margin: 10px 0 6px;
    font-size: 2rem;
}

.metric-trend {
    color: var(--brand-deep);
    font-size: 0.85rem;
}

.quick-strip,
.filter-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pill-link,
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 14px;
    text-decoration: none;
    background: #f7f4f4;
    color: var(--text);
    font-weight: 600;
}

.pill-link.active,
.filter-pill.active {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: white;
}

.section-title {
    margin: 0;
    font-size: 1.5rem;
}

.table-shell {
    background: var(--panel);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 22px 46px rgba(28, 72, 76, 0.07);
    overflow: visible;
}

.table-shell-header {
    padding: 22px 24px 0;
}

.table-filter-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr auto;
    gap: 14px;
    margin-top: 16px;
    align-items: center;
}

.filter-input {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    padding: 0 16px;
    background: #f7f4f4;
    border-radius: 16px;
}

.filter-input i {
    color: var(--muted);
}

.filter-input input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
}

.date-input {
    min-height: 50px;
    background: #f7f4f4;
}

.clean-table {
    width: 100%;
    margin: 18px 0 0;
}

.clean-table thead th {
    background: #f8f5f5;
    color: #97a4a8;
    font-weight: 600;
    border-bottom: 0;
    padding: 14px 16px;
    white-space: nowrap;
}

.clean-table tbody td {
    padding: 16px;
    border-top: 1px solid #eef3f2;
    vertical-align: middle;
}

.clean-table tbody tr:nth-child(odd) {
    background: #f3fcf8;
}

.patient-identity {
    --doctor-accent: #f6b215;
    --doctor-soft: #fff7de;
    --doctor-text: #8a5c00;
    --doctor-ring: rgba(246, 178, 21, 0.18);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.patient-identity-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.patient-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: var(--doctor-accent);
    box-shadow: 0 0 0 4px var(--doctor-soft);
    flex: 0 0 auto;
}

.doctor-chip {
    --doctor-accent: #0f766e;
    --doctor-soft: #e6f7f4;
    --doctor-text: #115e59;
    --doctor-ring: rgba(15, 118, 110, 0.22);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--doctor-soft);
    color: var(--doctor-text);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: inset 0 0 0 1px var(--doctor-ring);
}

.doctor-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--doctor-accent);
    flex: 0 0 auto;
}

.doctor-chip.is-calendar-key {
    background: #fff;
}

.date-block strong,
.date-block span {
    display: block;
}

.date-block span {
    color: var(--muted);
    font-size: 0.85rem;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 106px;
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.status-appointment {
    background: var(--warning-soft);
    color: var(--warning-text);
    border-color: #d9e0ea;
}

.status-checked_in {
    background: #e8f4ff;
    color: #3d7db8;
    border-color: #cfe4f8;
}

.status-completed,
.pay-paid {
    background: var(--success-soft);
    color: var(--success-text);
    border-color: #cdebd6;
}

.status-cancelled,
.pay-unpaid {
    background: var(--danger-soft);
    color: var(--danger-text);
    border-color: #ffd2cd;
}

.action-icons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.icon-action {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    display: inline-grid;
    place-items: center;
    text-decoration: none;
}

.icon-action:hover {
    background: var(--brand-soft);
    color: var(--brand-deep);
    border-color: rgba(31, 208, 164, 0.25);
}

.icon-action-danger {
    color: var(--danger-text);
    border-color: #ffd2cd;
}

.icon-action-danger:hover {
    background: var(--danger-soft);
    color: var(--danger-text);
    border-color: #ffb8b0;
}

.side-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mini-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.mini-item strong,
.mini-item span {
    display: block;
}

.mini-item span {
    color: var(--muted);
    font-size: 0.84rem;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(900px 420px at 15% -10%, rgba(31, 208, 164, 0.24) 0%, rgba(31, 208, 164, 0) 60%),\r\n                radial-gradient(760px 380px at 92% 12%, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 55%),\r\n                linear-gradient(180deg, #f6fffd 0%, var(--bg) 100%);
}

.login-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 30px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.12);
}

.login-hint {
    background: var(--panel-soft);
    border-radius: 16px;
    padding: 16px;
}

.print-page {
    background: #f4f4f4;
    padding: 20px;
}

.print-sheet {
    background: #fff;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

@media (max-width: 1199px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .table-filter-row {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 575px) {
    .calendar-legend-cluster {
        width: 100%;
    }

    .calendar-doctor-legend {
        padding: 0 12px 6px;
    }

    .calendar-month-view {
        min-width: 720px;
    }

    .calendar-day {
        min-height: 92px;
        padding: 8px 8px 10px;
    }

    .calendar-event-time {
        display: none;
    }

    .calendar-event-name {
        max-width: 100%;
    }
}@media (max-width: 991px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }

    .brand-box,
    .doctor-card {
        display: none;
    }

    .nav-cluster {
        flex-direction: row;
    }

    .content-shell {
        padding: 14px;
    }

    .top-utility,
    .page-intro {
        flex-direction: column;
        align-items: stretch;
    }

    .utility-search {
        min-width: 0;
        width: 100%;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .timing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    body {
        background: #fff !important;
    }

    .no-print,
    .sidebar,
    .top-utility,
    .page-intro,
    .btn,
    .alert {
        display: none !important;
    }

    .content-shell,
    .main-content {
        padding: 0 !important;
    }

    .print-sheet {
        box-shadow: none;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
}
.pay-partial {
    background: #fff3d8;
    color: #b7791f;
    border-color: #f0d9a9;
}

.billing-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.billing-summary-item {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
}

.billing-summary-item span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.billing-summary-item strong {
    font-size: 1.15rem;
}

.billing-summary-item.highlight {
    background: #eefcf7;
    border-color: #cfeee0;
}

@media (max-width: 991px) {
    .billing-summary {
        grid-template-columns: 1fr 1fr;
    }
}

.receive-payment-modal {
    border: 0;
    border-radius: 26px;
}

.receive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.receive-tile {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}

.receive-tile span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.receive-tile.highlight {
    background: #eefcf7;
    border-color: #cfeee0;
}

@media (max-width: 991px) {
    .receive-grid {
        grid-template-columns: 1fr;
    }
}

.brand-logo-image {
    width: 86px;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.brand-text h1 {
    font-size: 0.85rem;
    line-height: 1.2;
}

.login-logo {
    width: 240px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.print-branding {
    display: flex;
    align-items: center;
    gap: 16px;
}

.print-logo {
    width: 132px;
    height: auto;
    object-fit: contain;
}

.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

.table-responsive .dropdown,
.table-responsive td,
.table-responsive th,
.card,
.card-body,
.card-header {
    overflow: visible;
}

.dropdown-menu {
    z-index: 2000;
}
.prescription-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.prescription-table th,
.prescription-table td {
    padding: 6px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #dfe9e6;
    white-space: nowrap;
}

.prescription-table tbody tr:last-child td {
    border-bottom: 0;
}

.prescription-table thead th {
    background: #f3f7f6;
    color: #607177;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prescription-table td {
    font-size: 0.96rem;
}

.prescription-medicine-cell {
    min-width: 260px;
    white-space: normal;
}
.patient-list-body {
    padding: 0 !important;
}

.patient-table-wrap {
    overflow: visible;
}

.patient-table-wrap .table {
    margin-bottom: 0;
}

.patient-table-wrap th,
.patient-table-wrap td {
    white-space: nowrap;
}

.patient-table-wrap .dropdown,
.patient-table-wrap td,
.patient-table-wrap th {
    overflow: visible;
}

@media (max-width: 991px) {
    .patient-table-wrap {
        overflow-x: auto;
    }
}
.walkin-desk-card {
    background: linear-gradient(180deg, #ffffff 0%, #f6fffc 100%);
}

.walkin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #ecfbf6;
    color: var(--brand-deep);
    font-size: 0.78rem;
    font-weight: 700;
}

.walkin-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.calendar-shell {
    overflow: hidden;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-month-label {
    min-width: 170px;
    text-align: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: #f7f4f4;
    font-weight: 700;
}

.calendar-board {
    padding-top: 18px;
}

.calendar-headings,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.calendar-headings {
    margin-bottom: 12px;
}

.calendar-headings span {
    padding: 0 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-day {
    min-height: 170px;
    padding: 14px;
    border-radius: 20px;
    background: #f9fcfb;
    border: 1px solid #e6efec;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-day.is-muted {
    opacity: 0.55;
}

.calendar-day.is-today {
    background: #eefcf7;
    border-color: #bfead8;
    box-shadow: inset 0 0 0 1px rgba(31, 208, 164, 0.14);
}

.calendar-day-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-day-number {
    font-weight: 800;
    font-size: 1rem;
}

.calendar-day-count {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: #e2f8f0;
    color: var(--brand-deep);
    font-size: 0.78rem;
    font-weight: 700;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendar-empty {
    color: var(--muted);
    font-size: 0.82rem;
}

.calendar-event {
    display: block;
    padding: 9px 10px;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid transparent;
}

.calendar-event strong,
.calendar-event span {
    display: block;
}

.calendar-event strong {
    font-size: 0.78rem;
}

.calendar-event span {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event.status-appointment {
    background: #f6f8fb;
    border-color: #dde5ee;
    color: #5d7287;
}

.calendar-event.status-checked_in {
    background: #ebf5ff;
    border-color: #d4e7fb;
    color: #3d7db8;
}

.calendar-event.status-completed {
    background: #ebfbef;
    border-color: #d0eed8;
    color: #24915a;
}

.calendar-event.status-cancelled {
    background: #fff0ee;
    border-color: #ffd6d1;
    color: #cf5a4c;
}

@media (max-width: 1199px) {
    .calendar-headings,
    .calendar-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .walkin-actions {
        grid-template-columns: 1fr;
    }

    .calendar-headings,
    .calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-day {
        min-height: 150px;
    }
}

@media (max-width: 640px) {
    .calendar-headings,
    .calendar-grid {
        grid-template-columns: 1fr;
    }
}
.calendar-shell {
    padding: 18px;
    overflow: hidden;
}


.calendar-legend-cluster {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 6px 12px 0;
}

.calendar-doctor-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 12px 0;
}

.calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
}

.calendar-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.calendar-legend-dot.is-upcoming { background: #2563eb; }
.calendar-legend-dot.is-checked-in { background: #f59e0b; }
.calendar-legend-dot.is-completed { background: #22c55e; }
.calendar-legend-dot.is-cancelled { background: #9ca3af; }

.calendar-toolbar-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.calendar-nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-nav-btn,
.calendar-today-btn {
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid #e6eceb;
    background: #fff;
    color: var(--text);
    font-weight: 600;
}

.calendar-today-btn {
    padding: 0 16px;
    min-width: auto;
}

.calendar-month-title {
    min-width: 128px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #4b5563;
}

.calendar-scroll {
    overflow-x: auto;
}

.calendar-month-view {
    min-width: 980px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.calendar-headings {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    background: #fcfcfd;
    border-bottom: 1px solid #eceff1;
}

.calendar-headings span {
    padding: 12px 14px;
    font-size: 0.86rem;
    color: #9aa3af;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
}

.calendar-day {
    min-height: 108px;
    padding: 10px 10px 12px;
    border-right: 1px solid #eceff1;
    border-bottom: 1px solid #eceff1;
    background: #fff;
    border-radius: 0;
    gap: 8px;
}

.calendar-day:nth-child(7n) {
    border-right: 0;
}

.calendar-day.is-muted {
    background: #fcfcfd;
    opacity: 1;
}

.calendar-day.is-muted .calendar-day-number {
    color: #b6bec8;
}

.calendar-day.is-today {
    background: #f8fbff;
    box-shadow: inset 0 0 0 2px #93c5fd;
}

.calendar-day-top {
    justify-content: flex-start;
    align-items: flex-start;
}

.calendar-day-number {
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-event-pill {
    --doctor-accent: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1.2;
}

.calendar-event-pill.doctor-coded {
    border-left: 4px solid var(--doctor-accent);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.calendar-event-marker {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--doctor-accent);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
    flex: 0 0 auto;
}

.calendar-event-pill:hover {
    background: #13b28b;
    color: #fff;
}

.calendar-event-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.calendar-event-time {
    font-size: 0.72rem;
    opacity: 0.95;
    white-space: nowrap;
}


.calendar-event-pill.is-upcoming {
    background: #2563eb;
}

.calendar-event-pill.is-upcoming:hover {
    background: #1d4ed8;
}

.calendar-event-pill.is-checked-in {
    background: #f59e0b;
    color: #111827;
}

.calendar-event-pill.is-checked-in:hover {
    background: #d97706;
    color: #111827;
}

.calendar-event-pill.is-completed {
    background: #22c55e;
}

.calendar-event-pill.is-completed:hover {
    background: #16a34a;
}

.calendar-event-pill.is-cancelled {
    background: #9ca3af;
    text-decoration: line-through;
}

.calendar-event-pill.is-cancelled:hover {
    background: #6b7280;
}.calendar-more-link {
    display: inline-block;
    margin-top: 2px;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.82rem;
}

.calendar-more-link:hover {
    color: var(--brand-deep);
}

@media (max-width: 991px) {
    .calendar-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-nav-left {
        justify-content: space-between;
    }
}
.history-item {
    padding: 16px 0;
    border-bottom: 1px solid #edf1f0;
}

.history-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.compact-history-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compact-history-row {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr 1.2fr 1.4fr auto;
    gap: 16px;
    align-items: center;
}

.compact-history-meta {
    min-width: 0;
}

.compact-history-wide strong,
.compact-history-meta strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-history-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.compact-history-action {
    display: flex;
    justify-content: flex-end;
}

.compact-history-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #4b5563;
    font-size: 0.92rem;
}

@media (max-width: 991px) {
    .compact-history-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .compact-history-action {
        justify-content: flex-start;
    }

    .compact-history-wide strong,
    .compact-history-meta strong {
        white-space: normal;
    }
}
.diagnosis-picker {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdfd;
}

.diagnosis-search-group .btn {
    min-width: 86px;
}
.treatment-picker {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdfd;
}

.selected-treatment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.treatment-row {
    background: #fbfdfd;
}

.selected-treatment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.selected-treatment-meta {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
}

.selected-treatment-meta strong {
    color: var(--ink);
    font-size: 0.95rem;
}

.selected-treatment-price-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 180px;
    font-size: 0.78rem;
    color: var(--muted);
}

.selected-treatment-price-field .form-control {
    min-width: 120px;
}








/* Dashboard responsiveness fixes: reduce horizontal scrolling */
.top-utility {
    flex-wrap: wrap;
}

.utility-left,
.utility-right {
    flex-wrap: wrap;
}

.utility-search {
    flex: 1 1 280px;
    min-width: 0;
    max-width: 520px;
}

.calendar-month-view {
    width: 100%;
    min-width: 0;
}

@media (max-width: 575px) {
    .calendar-month-view {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 1199px) {
    .clean-table thead th {
        white-space: normal;
    }

    .clean-table thead th,
    .clean-table tbody td {
        padding: 12px 12px;
    }

    .section-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 575px) {
    .clean-table thead th,
    .clean-table tbody td {
        padding: 10px 10px;
        font-size: 0.92rem;
    }

    .hero-panel h3 {
        font-size: 1.35rem;
    }
}


/* Reports UI */
.report-filter-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 208, 164, 0.14);
    border-radius: 22px;
    padding: 14px;
}

.report-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.report-metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px;
}

.report-metric-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
}

.report-metric-value {
    margin-top: 8px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ink);
}

.report-metric-sub {
    margin-top: 4px;
    font-size: 0.86rem;
    color: var(--muted);
}

.report-mini-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.report-mini {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-mini span {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 700;
}

.report-mini strong {
    font-size: 0.95rem;
    color: var(--ink);
}

@media (max-width: 991px) {
    .report-metric-grid {
        grid-template-columns: 1fr;
    }

    .report-mini-grid {
        grid-template-columns: 1fr;
    }
}
\n/* WhatsApp action button */\n.icon-action-whatsapp {\n    border-color: rgba(34, 197, 94, 0.35);\n    color: #16a34a;\n}\n\n.icon-action-whatsapp:hover {\n    background: rgba(34, 197, 94, 0.12);\n    border-color: rgba(34, 197, 94, 0.55);\n    color: #15803d;\n}\n

/* Public invoice view (patient link) */
.invoice-public-page {
    background: radial-gradient(760px 420px at 14% -10%, rgba(31, 208, 164, 0.22) 0%, rgba(31, 208, 164, 0) 58%),
                radial-gradient(760px 380px at 92% 12%, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 55%),
                linear-gradient(180deg, #f6fffd 0%, var(--bg) 100%);
    min-height: 100vh;
    padding: 24px 0;
}

.invoice-public-container {
    max-width: 880px;
}

.invoice-public-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(27, 68, 72, 0.12);
    overflow: hidden;
}

.invoice-public-head {
    padding: 20px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.invoice-public-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.invoice-public-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 16px;
    background: rgba(31, 208, 164, 0.10);
    padding: 8px;
}

.invoice-public-clinic {
    font-weight: 900;
    letter-spacing: 0.02em;
    font-size: 1.1rem;
    color: var(--ink);
}

.invoice-public-doctor {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.92rem;
}

.invoice-public-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.invoice-public-meta {
    padding: 18px 22px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
}

.invoice-public-meta-block {
    background: rgba(243, 251, 249, 0.78);
    border: 1px solid rgba(31, 208, 164, 0.14);
    border-radius: 22px;
    padding: 14px 16px;
}

.invoice-public-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.74rem;
    font-weight: 800;
}

.invoice-public-value {
    margin-top: 8px;
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--ink);
}

.invoice-public-sub {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.92rem;
}

.invoice-public-table-wrap {
    padding: 0 22px 18px;
}

.invoice-public-table thead th {
    background: #fbfdfd;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    color: #6b7280;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
}

.invoice-public-table tbody td {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.invoice-public-totals {
    padding: 16px 22px 22px;
    display: grid;
    gap: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.68);
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-weight: 700;
}

.invoice-total-row strong {
    font-weight: 900;
}

.invoice-total-row-main {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
    font-size: 1.05rem;
}

.invoice-total-row-due {
    color: #b91c1c;
}

.invoice-public-foot {
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-weight: 600;
}

.invoice-public-note {
    font-size: 0.92rem;
}

@media (max-width: 767px) {
    .invoice-public-meta {
        grid-template-columns: 1fr;
    }

    .invoice-public-head {
        flex-direction: column;
        align-items: stretch;
    }

    .invoice-public-actions {
        justify-content: flex-start;
    }
}

@media print {
    .invoice-public-page {
        background: #fff !important;
        padding: 0 !important;
    }

    .invoice-public-container {
        max-width: 100% !important;
    }

    .invoice-public-card {
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
    }
}

/* Sidebar collapse toggle (menu button) */
.sidebar {
    transition: width 0.18s ease, padding 0.18s ease;
}

.app-shell.sidebar-collapsed .sidebar {
    width: 76px;
    padding: 18px 12px;
}

.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .doctor-card,
.app-shell.sidebar-collapsed .sidebar-link span {
    display: none;
}

.app-shell.sidebar-collapsed .sidebar-link {
    padding: 12px 6px;
}

.app-shell.sidebar-collapsed .sidebar-link i {
    width: 46px;
    height: 46px;
}

.app-shell.sidebar-collapsed .brand-logo-image {
    width: 50px;
    height: 50px;
}

@media (max-width: 991px) {
    /* Keep mobile navigation readable; ignore collapse */
    .app-shell.sidebar-collapsed .sidebar {
        width: 100%;
        padding: 18px 16px;
    }

    .app-shell.sidebar-collapsed .sidebar-link span {
        display: inline;
    }

    .app-shell.sidebar-collapsed .brand-text,
    .app-shell.sidebar-collapsed .doctor-card {
        display: none;
    }
}

/* Compact utility header (global) */
.top-utility {
    padding: 10px 14px;
    border-radius: 20px;
    gap: 12px;
}

.menu-dot {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.18rem;
}

.utility-search {
    height: 42px;
    border-radius: 14px;
    padding: 0 14px;
}

.utility-chip,
.utility-avatar {
    border-radius: 14px;
    padding: 8px 12px;
    font-weight: 700;
}

.avatar-ring {
    width: 32px;
    height: 32px;
}

.content-shell {
    padding: 14px 16px 22px;
}

.page-intro {
    margin-bottom: 14px;
    align-items: flex-end;
    gap: 10px;
}

.page-title {
    font-size: clamp(1.45rem, 1.6vw + 1rem, 1.9rem);
}

.page-subtitle {
    font-size: 0.88rem;
}

.hero-panel {
    padding: 18px 18px 16px;
}

.hero-panel h3 {
    font-size: clamp(1.25rem, 1.4vw + 0.9rem, 1.6rem);
}

.table-shell-header {
    padding: 18px 18px 0;
}

.clean-table {
    margin: 14px 0 0;
}

.clean-table thead th {
    padding: 12px 12px;
}

.clean-table tbody td {
    padding: 12px;
}

.icon-action {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

@media (max-width: 991px) {
    .content-shell {
        padding: 12px 12px 18px;
    }

    .top-utility {
        padding: 10px 12px;
    }

    .utility-search {
        height: 42px;
    }
}

@media (max-width: 575px) {
    .hero-panel {
        padding: 16px 14px 14px;
    }

    .utility-chip,
    .utility-avatar {
        width: 100%;
        justify-content: center;
    }
}

/* Top utility horizontal (keep menu + search in one row on desktop) */
@media (min-width: 992px) {
    .top-utility {
        flex-wrap: nowrap;
    }

    .utility-left {
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: nowrap;
    }

    .menu-dot {
        flex: 0 0 auto;
    }

    .utility-search {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }

    .utility-right {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

@media (max-width: 991px) {
    /* On mobile/tablet it can stack */
    .top-utility {
        flex-wrap: wrap;
    }

    .utility-left {
        width: 100%;
    }
}

/* Appointment workspace */
.appointment-workspace {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.appointment-workspace-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(27, 68, 72, 0.06);
}

.appointment-workspace-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    text-decoration: none;
    color: #50636a;
    font-weight: 700;
    background: transparent;
    transition: 0.18s ease;
}

.appointment-workspace-tab small {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.14);
    color: #6b7280;
    font-size: 0.76rem;
    font-weight: 800;
}

.appointment-workspace-tab:hover,
.appointment-workspace-tab.active {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: #fff;
}

.appointment-workspace-tab:hover small,
.appointment-workspace-tab.active small {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.appointment-dashboard-card {
    overflow: hidden;
}

.appointment-dashboard-head {
    padding: 24px 24px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.appointment-new-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.appointment-filter-summary {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.appointment-filter-summary span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f4faf8;
    color: #5b6f75;
    font-size: 0.82rem;
    font-weight: 700;
}

.appointment-toolbar-form {
    padding: 0 24px 20px;
}

.appointment-toolbar-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.35fr) auto auto minmax(140px, 170px);
    gap: 12px;
    align-items: center;
}

.appointment-search-field,
.appointment-period-field {
    margin: 0;
}

.appointment-search-field {
    min-height: 50px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    border: 1px solid #dde8e5;
    background: #fff;
}

.appointment-search-field i {
    color: #8aa0a5;
}

.appointment-search-field input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.appointment-toolbar-button {
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid #dde8e5;
    border-radius: 16px;
    background: #fff;
    color: #475c63;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.appointment-toolbar-button:hover {
    border-color: rgba(31, 208, 164, 0.35);
    color: var(--brand-deep);
}

.appointment-period-field .form-select {
    min-height: 50px;
    border-radius: 16px;
    background: #fff;
}

.appointment-advanced-filters {
    display: none;
    margin-top: 14px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fbfefd 0%, #f3fbf8 100%);
    border: 1px solid rgba(31, 208, 164, 0.16);
}

.appointment-advanced-filters.is-open {
    display: block;
}

.appointment-advanced-grid {
    display: grid;
    grid-template-columns: minmax(200px, 220px) minmax(180px, 220px) 1fr auto;
    gap: 14px;
    align-items: end;
}

.appointment-advanced-grid label,
.appointment-custom-range label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    color: #5d7076;
    font-size: 0.84rem;
    font-weight: 700;
}

.appointment-custom-range {
    display: none;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 14px;
}

.appointment-custom-range.is-open {
    display: grid;
}

.appointment-calendar-hint {
    min-height: 50px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px dashed rgba(31, 208, 164, 0.28);
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.appointment-calendar-hint span {
    font-size: 0.76rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.appointment-calendar-hint strong {
    color: var(--ink);
    font-size: 0.96rem;
}

.appointment-advanced-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.appointment-empty-state {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    color: #5e7176;
}

.appointment-empty-icon {
    width: 92px;
    height: 92px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(31, 208, 164, 0.16) 0%, rgba(31, 208, 164, 0.08) 100%);
    color: var(--brand-deep);
    font-size: 2.2rem;
}

.appointment-empty-state h4 {
    margin: 0;
    font-size: 1.4rem;
}

.appointment-empty-state p {
    max-width: 320px;
    margin: 0;
    color: var(--muted);
}

.appointment-table tbody tr:nth-child(odd) {
    background: #fbfefd;
}

.appointment-calendar-shell {
    padding: 0 20px 24px;
}

.appointment-calendar-overview {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.appointment-calendar-metric {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid #e3ece8;
    background: #f8fcfb;
}

.appointment-calendar-metric span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.appointment-calendar-metric strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 1.6rem;
}

.appointment-calendar-empty {
    min-height: 220px;
}

@media (max-width: 1199px) {
    .appointment-toolbar-row {
        grid-template-columns: 1fr 1fr;
    }

    .appointment-advanced-grid {
        grid-template-columns: 1fr 1fr;
    }

    .appointment-calendar-overview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .appointment-dashboard-head,
    .appointment-toolbar-form {
        padding-left: 16px;
        padding-right: 16px;
    }

    .appointment-toolbar-row,
    .appointment-advanced-grid,
    .appointment-custom-range,
    .appointment-calendar-overview {
        grid-template-columns: 1fr;
    }

    .appointment-advanced-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .appointment-workspace-tabs {
        width: 100%;
    }

    .appointment-workspace-tab {
        flex: 1 1 calc(50% - 8px);
        justify-content: space-between;
    }

    .appointment-calendar-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .appointment-empty-state {
        min-height: 280px;
    }
}

/* Consultation action cards */
.consultation-actions-shell {
    overflow: hidden;
}

.consultation-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.consultation-action-card {
    min-height: 240px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid #e2ece8;
    background: linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 14px 28px rgba(27, 68, 72, 0.05);
}

.consultation-action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 208, 164, 0.28);
    color: inherit;
}

.consultation-action-card-primary {
    background: linear-gradient(180deg, #f3fffb 0%, #ebfbf5 100%);
    border-color: rgba(31, 208, 164, 0.2);
}

.consultation-action-card-muted {
    opacity: 0.7;
}

.consultation-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(31, 208, 164, 0.12);
    color: var(--brand-deep);
    font-size: 1.5rem;
}

.consultation-action-card h6 {
    margin: 0;
    font-size: 1.12rem;
}

.consultation-action-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    flex: 1;
}

.consultation-action-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--brand-deep);
}

@media (max-width: 1199px) {
    .consultation-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .consultation-action-grid {
        grid-template-columns: 1fr;
    }
}

.plan-ongoing {
    background: #edf7ff;
    color: #2563eb;
    border-color: #cfe3ff;
}

.plan-completed {
    background: #ebfbef;
    color: #24915a;
    border-color: #cdebd6;
}

.treatment-plan-selection-shell {
    overflow: hidden;
}

.treatment-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.treatment-plan-card {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid #e2ece8;
    background: linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
    box-shadow: 0 14px 28px rgba(27, 68, 72, 0.05);
}

.treatment-plan-card h6 {
    margin: 0;
    font-size: 1.05rem;
}

.treatment-plan-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.treatment-plan-meta-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.treatment-plan-meta-grid strong {
    display: block;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.treatment-plan-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 991px) {
    .treatment-plan-grid,
    .treatment-plan-meta-grid {
        grid-template-columns: 1fr;
    }
}

.patient-profile-stack {
    display: grid;
    gap: 0;
}

.patient-profile-overview-card {
    overflow: hidden;
}

.patient-profile-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.patient-overview-block {
    padding: 18px;
    border-radius: 20px;
    background: #f8fcfb;
    border: 1px solid #e2ece8;
    min-height: 120px;
}

.patient-overview-block strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    line-height: 1.6;
    white-space: pre-line;
}

.patient-overview-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}

.patient-overview-metric strong {
    font-size: 2rem;
    line-height: 1.1;
}

.patient-plan-history-body {
    display: grid;
    gap: 16px;
}

.patient-plan-card {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid #e2ece8;
    background: linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
    box-shadow: 0 14px 28px rgba(27, 68, 72, 0.05);
}

.patient-plan-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.patient-plan-card-head h6 {
    margin: 4px 0 0;
    font-size: 1.1rem;
}

.patient-plan-date {
    color: var(--muted);
    font-size: 0.9rem;
}

.patient-plan-amount {
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef8f4;
    color: var(--brand-deep);
    font-weight: 700;
}

.patient-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.patient-plan-grid-wide {
    grid-column: span 2;
}

.patient-plan-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}

.patient-plan-grid p {
    margin: 0;
    color: var(--ink);
    line-height: 1.65;
    white-space: pre-line;
    word-break: break-word;
}

.patient-plan-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.practice-management-search {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.practice-management-search .form-control {
    min-width: 260px;
}

.practice-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.practice-summary-card {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid #e2ece8;
    background: linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 14px 28px rgba(27, 68, 72, 0.05);
}

.practice-summary-card strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 2rem;
    color: var(--ink);
}

.practice-summary-card small,
.practice-summary-label {
    display: block;
}

.practice-summary-label {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.practice-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.practice-section-card {
    overflow: hidden;
}

.practice-list {
    display: grid;
}

.practice-list-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-top: 1px solid #edf2ef;
    flex-wrap: wrap;
}

.practice-list-item:first-child {
    border-top: 0;
}

.practice-list-item strong {
    display: block;
    margin-bottom: 4px;
}

.practice-list-item span {
    color: var(--muted);
    line-height: 1.55;
    word-break: break-word;
}

.practice-list-side {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.practice-empty {
    padding: 24px 20px;
    color: var(--muted);
}

.practice-complaint-form {
    padding-bottom: 18px;
    border-bottom: 1px solid #edf2ef;
}

@media (max-width: 1199px) {
    .patient-profile-overview-grid,
    .practice-summary-grid,
    .practice-section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .patient-profile-overview-grid,
    .patient-plan-grid,
    .practice-summary-grid,
    .practice-section-grid {
        grid-template-columns: 1fr;
    }

    .patient-plan-grid-wide {
        grid-column: auto;
    }

    .practice-management-search {
        width: 100%;
    }

    .practice-management-search .form-control {
        min-width: 0;
        width: 100%;
    }
}

.practice-hero-chip {
    padding: 10px 16px;
    border-radius: 999px;
    background: #eef8f4;
    color: var(--brand-deep);
    font-weight: 700;
}

.practice-workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.practice-workspace-card {
    min-height: 280px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #e2ece8;
    background: linear-gradient(180deg, #ffffff 0%, #f7fcfa 100%);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 18px 34px rgba(27, 68, 72, 0.06);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.practice-workspace-card:hover {
    color: inherit;
    transform: translateY(-3px);
    border-color: rgba(31, 208, 164, 0.3);
}

.practice-workspace-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.practice-workspace-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(31, 208, 164, 0.12);
    color: var(--brand-deep);
    font-size: 1.45rem;
}

.practice-workspace-count {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ink);
}

.practice-workspace-card h5 {
    margin: 0;
    font-size: 1.2rem;
}

.practice-workspace-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.practice-workspace-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.practice-workspace-preview span {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f7f4;
    color: #48626a;
    font-size: 0.88rem;
}

.practice-workspace-link {
    color: var(--brand-deep);
    font-size: 0.95rem;
}

.practice-detail-card {
    overflow: hidden;
}

@media (max-width: 1199px) {
    .practice-workspace-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .practice-workspace-grid {
        grid-template-columns: 1fr;
    }

    .practice-workspace-card {
        min-height: 0;
    }
}

.dashboard-hero-panel {
    overflow: hidden;
}

.dashboard-overview-band {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(218, 229, 224, 0.9);
}

.dashboard-overview-band strong {
    color: var(--ink);
    font-size: 1.15rem;
}

.dashboard-overview-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-overview-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: #f4faf7;
    border: 1px solid #deebe6;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.dashboard-overview-pill strong {
    margin-left: 6px;
    font-size: 1rem;
}

.walkin-allergy-card {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid #deebe6;
    background: #f8fcfb;
}

.practice-workspace-grid-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1199px) {
    .practice-workspace-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .dashboard-overview-band,
    .dashboard-overview-pills {
        flex-direction: column;
        align-items: stretch;
    }

    .practice-workspace-grid-wide {
        grid-template-columns: 1fr;
    }

    .dashboard-overview-pill {
        width: 100%;
        text-align: left;
    }
}


.soft-card {
    border: 1px solid rgba(31, 208, 164, 0.18);
    background: linear-gradient(180deg, rgba(31, 208, 164, 0.08) 0%, rgba(255, 255, 255, 0.96) 100%);
    border-radius: 18px;
    padding: 14px 16px;
}

.doctor-card,
.utility-avatar {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doctor-card {
    color: var(--text);
}

.doctor-card:hover,
.utility-avatar:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(27, 68, 72, 0.08);
}

/* Shell refresh: compact sidebar, icon-only utility actions, and billing action row */
.sidebar {
    width: 88px;
    padding: 18px 12px;
    overflow: hidden;
    transition: width 0.24s ease, padding 0.24s ease, box-shadow 0.24s ease;
}

.brand-box {
    padding: 4px 0 12px;
    justify-content: center;
}

.brand-text,
.doctor-card,
.utility-chip,
.utility-avatar {
    display: none !important;
}

.nav-cluster {
    gap: 8px;
}

.sidebar-link {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    padding: 10px 8px;
    overflow: hidden;
}

.sidebar-link span {
    width: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    text-align: left;
    transform: translateX(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, max-width 0.2s ease;
}

.utility-right {
    gap: 10px;
}

.utility-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
    background: #fff4e6;
    border: 1px solid rgba(251, 191, 36, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.utility-icon-btn i {
    font-size: 1.08rem;
}

.utility-icon-btn-brand {
    background: var(--brand-soft);
    border-color: rgba(31, 208, 164, 0.22);
}

.utility-icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(27, 68, 72, 0.08);
    color: var(--brand-deep);
}

.utility-icon-btn .avatar-ring {
    width: 100%;
    height: 100%;
}

.app-shell.sidebar-collapsed .sidebar:hover,
.app-shell.sidebar-collapsed .sidebar:focus-within,
.app-shell.sidebar-expanded .sidebar {
    width: 244px;
    padding: 18px 14px;
    box-shadow: 24px 0 40px rgba(27, 68, 72, 0.08);
}

.app-shell.sidebar-collapsed .sidebar:hover .sidebar-link,
.app-shell.sidebar-collapsed .sidebar:focus-within .sidebar-link,
.app-shell.sidebar-expanded .sidebar .sidebar-link {
    justify-content: flex-start;
    padding-inline: 12px;
}

.app-shell.sidebar-collapsed .sidebar:hover .sidebar-link span,
.app-shell.sidebar-collapsed .sidebar:focus-within .sidebar-link span,
.app-shell.sidebar-expanded .sidebar .sidebar-link span {
    width: auto;
    max-width: 160px;
    opacity: 1;
    transform: translateX(0);
}

.app-shell.sidebar-collapsed .sidebar:hover .brand-box,
.app-shell.sidebar-collapsed .sidebar:focus-within .brand-box,
.app-shell.sidebar-expanded .sidebar .brand-box {
    justify-content: flex-start;
}

.practice-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.billing-actions-cell {
    min-width: 210px;
    white-space: normal !important;
}

.billing-action-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.billing-action-row .btn,
.billing-action-row .icon-action {
    min-height: 38px;
}

.billing-action-row .icon-action {
    flex: 0 0 38px;
}

@media (max-width: 991px) {
    .sidebar {
        width: 100%;
        overflow: visible;
        box-shadow: none;
    }

    .sidebar-link {
        justify-content: flex-start;
        padding-inline: 12px;
    }

    .sidebar-link span {
        width: auto;
        max-width: 160px;
        opacity: 1;
        transform: translateX(0);
    }

    .brand-box {
        justify-content: flex-start;
    }

    .utility-search {
        min-width: 0;
    }

    .billing-actions-cell {
        min-width: 170px;
    }
}

.app-shell.sidebar-collapsed .sidebar {
    width: 88px;
    padding: 18px 12px;
}

.app-shell.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 10px 8px;
}

.app-shell.sidebar-collapsed .sidebar-link span {
    display: block !important;
}

@media (max-width: 991px) {
    .app-shell.sidebar-collapsed .sidebar {
        width: 100%;
        padding: 18px 16px;
    }

    .app-shell.sidebar-collapsed .sidebar-link {
        justify-content: flex-start;
        padding-inline: 12px;
    }

    .app-shell.sidebar-collapsed .sidebar-link span {
        display: block !important;
        width: auto;
        max-width: 160px;
        opacity: 1;
        transform: translateX(0);
    }
}

/* Appointment workspace cleanup */
.appointment-dashboard-head {
    padding: 22px 24px 10px;
    align-items: center;
}

.appointment-dashboard-head .section-title {
    font-size: 1.45rem;
}

.appointment-toolbar-form-simple {
    padding-top: 6px;
}

.appointment-toolbar-row-simple {
    grid-template-columns: minmax(240px, 1.4fr) minmax(150px, 180px) minmax(160px, 190px) minmax(280px, 1fr) auto;
    align-items: end;
}

.appointment-date-field,
.appointment-custom-range label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    color: #5d7076;
    font-size: 0.82rem;
    font-weight: 700;
}

.appointment-date-field .form-control,
.appointment-custom-range .form-control {
    min-height: 50px;
    border-radius: 16px;
    background: #fff;
}

.appointment-custom-range {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 12px;
    align-items: end;
}

.appointment-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 1199px) {
    .appointment-toolbar-row-simple {
        grid-template-columns: minmax(220px, 1fr) minmax(150px, 180px) minmax(150px, 180px);
    }

    .appointment-custom-range.is-open {
        grid-column: 1 / -2;
    }

    .appointment-toolbar-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .appointment-toolbar-row-simple,
    .appointment-custom-range.is-open {
        grid-template-columns: 1fr;
    }

    .appointment-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .appointment-toolbar-actions .btn {
        flex: 1 1 0;
    }
}

.print-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.print-summary-card {
    border: 1px solid rgba(31, 208, 164, 0.16);
    border-radius: 22px;
    padding: 16px 18px;
    background: linear-gradient(180deg, #fbfefd 0%, #f5fcfa 100%);
}

.print-summary-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.print-summary-text {
    color: var(--ink);
    font-weight: 700;
    line-height: 1.6;
}

.print-summary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.print-summary-list span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(31, 208, 164, 0.10);
    color: var(--brand-deep);
    font-weight: 700;
    font-size: 0.9rem;
}

.invoice-public-clinical {
    padding: 0 22px 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.invoice-public-clinical-card {
    background: rgba(243, 251, 249, 0.78);
    border: 1px solid rgba(31, 208, 164, 0.14);
    border-radius: 22px;
    padding: 14px 16px;
}

.invoice-public-clinical-text {
    margin-top: 8px;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.7;
}

.invoice-public-chip-list {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.invoice-public-chip-list span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(31, 208, 164, 0.10);
    color: var(--brand-deep);
    font-weight: 700;
    font-size: 0.9rem;
}

@media (max-width: 767px) {
    .print-summary-grid,
    .invoice-public-clinical {
        grid-template-columns: 1fr;
    }
}
/* Global palette refresh */
:root {
    --bg: #e3f1ee;
    --panel: #f4fbf9;
    --panel-soft: #eaf6f2;
    --line: #c8ddd8;
    --text: #16313a;
    --ink: #16313a;
    --muted: #5f7981;
    --brand: #1aa38f;
    --brand-deep: #0f766e;
    --brand-soft: #dff3ee;
    --danger-soft: #fbe9e7;
    --danger-text: #b45348;
    --warning-soft: #edf4f8;
    --warning-text: #567388;
    --success-soft: #e3f5ec;
    --success-text: #1f7a56;
}

body {
    background:
        radial-gradient(960px 460px at 10% -8%, rgba(26, 163, 143, 0.18) 0%, rgba(26, 163, 143, 0) 62%),
        radial-gradient(860px 380px at 100% 8%, rgba(15, 118, 110, 0.12) 0%, rgba(15, 118, 110, 0) 54%),
        linear-gradient(180deg, #f2fbf8 0%, #e3f1ee 100%);
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(9, 71, 86, 0.97) 0%, rgba(12, 93, 99, 0.96) 52%, rgba(14, 108, 103, 0.95) 100%);
    border-right: 1px solid rgba(182, 228, 220, 0.28);
    box-shadow: 24px 0 42px rgba(7, 47, 59, 0.16);
}

.brand-box {
    color: #ecfffb;
}

.brand-mark {
    background: linear-gradient(135deg, #8fe4d2 0%, #d8f8f0 100%);
    color: #0d5f5a;
    box-shadow: 0 18px 34px rgba(2, 28, 34, 0.22);
}

.sidebar-link {
    color: rgba(231, 250, 246, 0.84);
}

.sidebar-link i {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(233, 252, 248, 0.14);
    color: #effffb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #ffffff;
    background: rgba(217, 248, 241, 0.12);
}

.sidebar-link:hover i,
.sidebar-link.active i {
    background: linear-gradient(135deg, #8de6d6 0%, #d9fbf2 100%);
    border-color: rgba(255, 255, 255, 0.2);
    color: #0e655f;
    box-shadow: 0 12px 24px rgba(4, 35, 46, 0.22);
}

.top-utility {
    background: rgba(243, 250, 248, 0.9);
    border: 1px solid rgba(201, 223, 217, 0.9);
    box-shadow: 0 18px 34px rgba(22, 49, 58, 0.08);
}

.menu-dot,
.utility-icon-btn {
    background: #ebf6f3;
    border-color: rgba(153, 191, 184, 0.36);
    color: var(--brand-deep);
}

.utility-icon-btn.utility-icon-btn-brand {
    background: linear-gradient(135deg, #1aa38f 0%, #159684 100%);
    border-color: transparent;
    color: #ffffff;
}

.utility-search {
    background: rgba(232, 244, 241, 0.94);
    border: 1px solid rgba(190, 214, 208, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.utility-search input::placeholder {
    color: #789097;
}

.surface-card,
.card,
.soft-card,
.hero-panel,
.dashboard-hero-panel,
.table-shell,
.walkin-desk-card,
.appointment-dashboard-card,
.practice-detail-card,
.practice-workspace-card,
.consultation-action-card,
.patient-profile-overview-card,
.patient-plan-card,
.invoice-public-card,
.report-filter-card {
    background: linear-gradient(180deg, rgba(247, 252, 250, 0.98) 0%, rgba(237, 247, 244, 0.98) 100%);
    border-color: rgba(198, 220, 214, 0.9);
    box-shadow: 0 16px 32px rgba(18, 51, 60, 0.07);
}

.card-header,
.table-shell-header {
    background: transparent;
    border-bottom-color: rgba(193, 216, 210, 0.82);
}

.clean-table thead th,
.table thead th {
    background: rgba(221, 240, 235, 0.72);
    color: #44646d;
}

.clean-table tbody tr,
.table tbody tr {
    background: rgba(250, 253, 252, 0.72);
}

.clean-table tbody tr:nth-child(even),
.table tbody tr:nth-child(even) {
    background: rgba(238, 247, 244, 0.92);
}

.section-title,
.hero-panel h3,
.dashboard-hero-panel h3,
.card-title {
    color: #143540;
}

.text-muted,
.hero-panel p,
.dashboard-hero-panel p,
.section-subtitle {
    color: #698189 !important;
}

.form-control,
.form-select,
select,
textarea,
input[type="text"],
input[type="date"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="password"] {
    background: rgba(248, 252, 251, 0.98);
    border-color: rgba(190, 214, 208, 0.95);
    color: var(--text);
}

.form-control:focus,
.form-select:focus,
select:focus,
textarea:focus,
input:focus {
    border-color: rgba(26, 163, 143, 0.55);
    box-shadow: 0 0 0 0.18rem rgba(26, 163, 143, 0.12);
}

.btn-light,
.btn-outline-secondary,
.btn-outline-primary {
    background: rgba(239, 248, 246, 0.94);
    border-color: rgba(180, 207, 201, 0.88);
    color: #24434b;
}

.btn-light:hover,
.btn-outline-secondary:hover,
.btn-outline-primary:hover {
    background: rgba(225, 241, 237, 0.96);
    border-color: rgba(152, 187, 180, 0.96);
    color: #173740;
}

/* Patient treatment plan workspace */
.patient-profile-overview-grid-expanded {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.patient-overview-success {
    background: linear-gradient(180deg, rgba(227, 245, 236, 0.96) 0%, rgba(214, 240, 228, 0.96) 100%);
    border-color: rgba(140, 199, 168, 0.72);
}

.patient-plan-card-group {
    gap: 18px;
}

.patient-plan-submeta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

.patient-plan-grid-summary p,
.patient-plan-grid-session p {
    min-height: 52px;
}

.patient-plan-actions-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.patient-plan-lock-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #52616d;
    font-weight: 700;
    font-size: 0.88rem;
}

.patient-plan-session-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.patient-plan-session-card {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(248, 252, 251, 0.92);
    border: 1px solid rgba(197, 219, 213, 0.88);
}

.patient-plan-session-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.patient-plan-session-top strong {
    display: block;
    color: var(--ink);
}

.patient-plan-session-top span {
    color: var(--muted);
    font-size: 0.86rem;
}

.patient-plan-session-price {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(26, 163, 143, 0.12);
    color: var(--brand-deep);
    font-weight: 700;
}

.patient-plan-grid-session {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1199px) {
    .patient-profile-overview-grid-expanded {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .patient-profile-overview-grid-expanded,
    .patient-plan-grid-summary,
    .patient-plan-grid-session {
        grid-template-columns: 1fr;
    }

    .patient-plan-grid-summary p,
    .patient-plan-grid-session p {
        min-height: 0;
    }
}

/* Walk-in submit controls */
.walkin-actions,
.walkin-form-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.walkin-actions .btn,
.walkin-form-actions .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
}

@media (max-width: 575px) {
    .walkin-actions,
    .walkin-form-actions {
        grid-template-columns: 1fr;
    }
}

/* Admin settings workspace */
.admin-overview-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    justify-content: center;
    min-height: 170px;
}

.admin-overview-icon,
.admin-widget-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(31, 208, 164, 0.18), rgba(19, 178, 139, 0.28));
    color: var(--brand-deep);
    font-size: 1.35rem;
}

.admin-overview-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
}

.admin-overview-label {
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-widget-card {
    display: grid;
    grid-template-columns: 54px 1fr 28px;
    gap: 16px;
    align-items: center;
    padding: 22px 24px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(242,251,248,0.98));
    border: 1px solid rgba(31, 208, 164, 0.14);
    box-shadow: 0 18px 32px rgba(20, 67, 74, 0.07);
    color: var(--text);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-widget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 36px rgba(20, 67, 74, 0.1);
    border-color: rgba(31, 208, 164, 0.3);
    color: var(--text);
}

.admin-widget-card h5 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.admin-widget-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-widget-arrow {
    color: var(--brand-deep);
    font-size: 1.1rem;
    justify-self: end;
}

.demo-credentials-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.demo-credential-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(31, 208, 164, 0.14);
}

.demo-credential-card span {
    color: var(--muted);
    font-size: 0.9rem;
}

.permission-chip-grid .form-check {
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.permission-chip-grid .form-check:hover {
    border-color: rgba(31, 208, 164, 0.28);
    box-shadow: 0 10px 18px rgba(20, 67, 74, 0.06);
}

/* Sidebar performance tune */
.app-shell {
    position: relative;
}

.sidebar {
    flex: 0 0 88px;
    width: 88px;
    min-width: 88px;
    overflow: visible;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 30;
    contain: layout paint;
    backdrop-filter: none;
    background: linear-gradient(180deg, #0f766e 0%, #115e59 58%, #134e4a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 10px 0 24px rgba(8, 47, 44, 0.16);
    transition: flex-basis 0.14s ease-out, width 0.14s ease-out, box-shadow 0.14s ease-out;
}

.sidebar-link {
    color: rgba(230, 249, 246, 0.8);
}

.sidebar-link i {
    background: rgba(255, 255, 255, 0.1);
    color: #f4fffd;
}

.sidebar-link span {
    color: #f4fffd;
    transition: opacity 0.14s ease-out, transform 0.14s ease-out;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #ffffff;
}

.sidebar-link:hover i,
.sidebar-link.active i {
    background: linear-gradient(135deg, #34d399 0%, #14b8a6 100%);
    box-shadow: 0 10px 20px rgba(20, 184, 166, 0.24);
}

.brand-box {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar:hover,
.sidebar:focus-within,
.app-shell.sidebar-expanded .sidebar {
    flex-basis: 236px;
    width: 236px;
    box-shadow: 18px 0 36px rgba(8, 47, 44, 0.22);
}

.sidebar:hover .sidebar-link,
.sidebar:focus-within .sidebar-link,
.app-shell.sidebar-expanded .sidebar .sidebar-link {
    justify-content: flex-start;
    padding-inline: 12px;
}

.sidebar:hover .sidebar-link span,
.sidebar:focus-within .sidebar-link span,
.app-shell.sidebar-expanded .sidebar .sidebar-link span {
    width: auto;
    max-width: 160px;
    opacity: 1;
    transform: translateX(0);
}

.sidebar:hover .brand-box,
.sidebar:focus-within .brand-box,
.app-shell.sidebar-expanded .sidebar .brand-box {
    justify-content: flex-start;
}

.content-shell {
    min-width: 0;
}

@media (max-width: 991px) {
    .sidebar {
        position: relative;
        width: 100%;
        min-width: 0;
        height: auto;
    }

    .demo-credentials-grid {
        grid-template-columns: 1fr;
    }

    .admin-widget-card {
        grid-template-columns: 48px 1fr;
    }

    .admin-widget-arrow {
        display: none;
    }
}


/* Patient plan hub refresh */
.patient-plan-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.patient-plan-hub-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
}

.patient-plan-hub-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.patient-plan-hub-top h6 {
    margin: 0;
    font-size: 1.06rem;
}

.patient-plan-hub-meta,
.patient-plan-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.patient-plan-hub-meta p,
.patient-plan-modal-grid p {
    margin: 6px 0 0;
    min-height: 48px;
    color: var(--ink);
    line-height: 1.6;
}

.patient-plan-hub-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.patient-plan-hub-stat {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(193, 216, 210, 0.78);
}

.patient-plan-hub-stat span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.patient-plan-hub-stat strong {
    color: var(--ink);
    font-size: 0.98rem;
    line-height: 1.5;
}

.patient-plan-hub-stat-wide {
    grid-column: span 1;
}

.patient-plan-hub-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.patient-plan-modal .modal-content {
    border: 1px solid rgba(198, 220, 214, 0.92);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(247, 252, 250, 0.99) 0%, rgba(236, 247, 244, 0.99) 100%);
    box-shadow: 0 24px 48px rgba(18, 51, 60, 0.16);
}

.patient-plan-modal .modal-header,
.patient-plan-modal .modal-footer {
    border-color: rgba(193, 216, 210, 0.82);
    padding: 22px 24px;
}

.patient-plan-modal .modal-body {
    padding: 24px;
}

.patient-plan-modal-section {
    margin-top: 22px;
}

.patient-plan-session-list-modal {
    margin-top: 0;
}

.patient-plan-modal-footer {
    align-items: center;
}

@media (max-width: 1199px) {
    .patient-plan-hub-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .patient-plan-hub-meta,
    .patient-plan-modal-grid,
    .patient-plan-hub-stats {
        grid-template-columns: 1fr;
    }

    .patient-plan-hub-meta p,
    .patient-plan-modal-grid p {
        min-height: 0;
    }
}
.dashboard-calendar-workspace {
    padding: 22px;
    overflow: hidden;
}

.dashboard-calendar-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-calendar-toolbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.dashboard-calendar-nav-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-calendar-nav-btn,
.dashboard-calendar-today-btn,
.dashboard-calendar-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
}

.dashboard-calendar-nav-btn {
    width: 44px;
}

.dashboard-calendar-today-btn {
    padding: 0 16px;
}

.dashboard-calendar-range-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 220px;
}

.dashboard-calendar-range-copy strong {
    font-size: 1.1rem;
    color: var(--ink);
}

.dashboard-calendar-range-copy span {
    color: var(--muted);
    font-size: 0.88rem;
}

.dashboard-calendar-view-switch {
    display: inline-grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border-radius: 16px;
    background: #f2f7f6;
    border: 1px solid var(--line);
}

.dashboard-calendar-view-link {
    min-width: 84px;
    padding: 0 14px;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.dashboard-calendar-view-link.is-active {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    color: #fff;
}

.dashboard-calendar-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.dashboard-calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.dashboard-calendar-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.dashboard-calendar-main-panel,
.dashboard-calendar-side-card,
.dashboard-calendar-summary-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 251, 249, 0.98) 100%);
}

.dashboard-calendar-main-panel {
    padding: 16px;
}

.dashboard-calendar-scroller {
    overflow: auto;
}

.dashboard-calendar-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-calendar-summary-card {
    padding: 16px;
    text-align: center;
}

.dashboard-calendar-summary-card strong {
    display: block;
    color: var(--ink);
    font-size: 1.5rem;
    line-height: 1;
}

.dashboard-calendar-summary-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-calendar-summary-card.is-total {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(31, 208, 164, 0.12) 0%, rgba(19, 178, 139, 0.18) 100%);
    border-color: rgba(31, 208, 164, 0.26);
}

.dashboard-calendar-side-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-calendar-side-card {
    padding: 16px;
}

.dashboard-calendar-side-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-calendar-side-head strong {
    color: var(--ink);
    font-size: 0.95rem;
}

.dashboard-calendar-side-head span {
    color: var(--muted);
    font-size: 0.8rem;
}

.dashboard-calendar-filter-form,
.dashboard-calendar-doctor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-calendar-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-calendar-day-grid {
    min-width: 760px;
}

.dashboard-calendar-time-row {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 92px;
}

.dashboard-calendar-time-row + .dashboard-calendar-time-row {
    border-top: 1px solid #e8f0ee;
}

.dashboard-calendar-time-label {
    padding: 18px 14px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: right;
}

.dashboard-calendar-time-slot {
    padding: 12px 0 12px 16px;
    border-left: 1px solid #e8f0ee;
}

.dashboard-calendar-time-slot.is-empty {
    display: flex;
    align-items: center;
}

.dashboard-calendar-empty-slot {
    color: #9aa8ab;
    font-size: 0.84rem;
}

.dashboard-calendar-event-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-calendar-event-card,
.dashboard-calendar-mini-event,
.dashboard-calendar-month-pill {
    --doctor-accent: #0f766e;
    --doctor-soft: #e6f7f4;
    --doctor-text: #115e59;
    --doctor-ring: rgba(15, 118, 110, 0.22);
    display: flex;
    gap: 12px;
    text-decoration: none;
    border: 1px solid transparent;
    border-left: 4px solid var(--doctor-accent);
    color: var(--ink);
}

.dashboard-calendar-event-card {
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 18px;
}

.dashboard-calendar-event-meta,
.dashboard-calendar-event-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dashboard-calendar-event-meta strong,
.dashboard-calendar-mini-event strong {
    font-size: 0.94rem;
}

.dashboard-calendar-event-meta span,
.dashboard-calendar-event-side span,
.dashboard-calendar-mini-time {
    font-size: 0.82rem;
    color: #55656b;
}

.dashboard-calendar-event-status {
    font-weight: 700;
}

.dashboard-calendar-event-card.is-upcoming,
.dashboard-calendar-mini-event.is-upcoming,
.dashboard-calendar-month-pill.is-upcoming {
    background: #f4f7fb;
    border-color: #dfe7f1;
}

.dashboard-calendar-event-card.is-checked-in,
.dashboard-calendar-mini-event.is-checked-in,
.dashboard-calendar-month-pill.is-checked-in {
    background: #fff7e8;
    border-color: #f6ddb2;
}

.dashboard-calendar-event-card.is-completed,
.dashboard-calendar-mini-event.is-completed,
.dashboard-calendar-month-pill.is-completed {
    background: #edf9f0;
    border-color: #cfe8d5;
}

.dashboard-calendar-event-card.is-cancelled,
.dashboard-calendar-mini-event.is-cancelled,
.dashboard-calendar-month-pill.is-cancelled {
    background: #f7f3f3;
    border-color: #e6dada;
    color: #7b6f72;
}
.dashboard-calendar-week-grid {
    display: grid;
    grid-template-columns: 88px repeat(7, minmax(148px, 1fr));
    min-width: 1160px;
    border: 1px solid #e4efec;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.dashboard-calendar-week-head,
.dashboard-calendar-week-time,
.dashboard-calendar-week-cell {
    border-right: 1px solid #e8f0ee;
    border-bottom: 1px solid #e8f0ee;
}

.dashboard-calendar-week-head {
    min-height: 68px;
    padding: 12px 10px;
    background: #f7fbfa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.dashboard-calendar-week-head.is-today {
    background: #eefcf7;
}

.dashboard-calendar-week-head strong {
    color: var(--ink);
    font-size: 0.9rem;
}

.dashboard-calendar-week-head span,
.dashboard-calendar-week-time {
    color: var(--muted);
    font-size: 0.78rem;
}

.dashboard-calendar-week-time {
    padding: 16px 10px;
    background: #fbfdfd;
    font-weight: 700;
    text-align: right;
}

.dashboard-calendar-week-cell {
    min-height: 86px;
    padding: 8px;
    background: #fff;
}

.dashboard-calendar-week-cell.is-today {
    background: #fbfffd;
}

.dashboard-calendar-week-cell.is-empty {
    background: linear-gradient(180deg, rgba(250, 253, 252, 1) 0%, rgba(246, 250, 249, 1) 100%);
}

.dashboard-calendar-mini-event {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 14px;
    margin-bottom: 8px;
}

.dashboard-calendar-mini-event:last-child {
    margin-bottom: 0;
}

.dashboard-calendar-month-wrap {
    min-width: 940px;
    border: 1px solid #e4efec;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.dashboard-calendar-month-headings,
.dashboard-calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dashboard-calendar-month-headings {
    background: #f7fbfa;
    border-bottom: 1px solid #e8f0ee;
}

.dashboard-calendar-month-headings span {
    padding: 12px 14px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-calendar-month-cell {
    min-height: 138px;
    padding: 12px;
    border-right: 1px solid #e8f0ee;
    border-bottom: 1px solid #e8f0ee;
    background: #fff;
}

.dashboard-calendar-month-cell.is-muted {
    background: #f9fbfb;
}

.dashboard-calendar-month-cell.is-today {
    background: #eefcf7;
}

.dashboard-calendar-month-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.dashboard-calendar-month-number {
    font-weight: 800;
    color: var(--ink);
}

.dashboard-calendar-month-count {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: #e4f8f1;
    color: var(--brand-deep);
    font-size: 0.76rem;
    font-weight: 700;
}

.dashboard-calendar-month-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-calendar-month-pill {
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.dashboard-calendar-month-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--doctor-accent);
    flex: 0 0 auto;
}

.dashboard-calendar-month-pill-copy {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-calendar-month-pill-time {
    font-size: 0.72rem;
    color: #66767c;
}

.dashboard-calendar-more-link {
    color: var(--brand-deep);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 1399px) {
    .dashboard-calendar-body {
        grid-template-columns: 1fr;
    }

    .dashboard-calendar-summary-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .dashboard-calendar-summary-card.is-total {
        grid-column: span 1;
    }
}

@media (max-width: 991px) {
    .dashboard-calendar-workspace {
        padding: 18px;
    }

    .dashboard-calendar-toolbar-main,
    .dashboard-calendar-nav-group {
        align-items: stretch;
    }

    .dashboard-calendar-view-switch,
    .dashboard-calendar-filter-actions,
    .dashboard-calendar-summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-calendar-range-copy {
        min-width: 0;
    }

    .dashboard-calendar-time-row {
        grid-template-columns: 68px minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .dashboard-calendar-event-card {
        flex-direction: column;
    }

    .dashboard-calendar-time-label,
    .dashboard-calendar-week-time {
        font-size: 0.72rem;
    }
}
.staff-role-hub {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.staff-role-card,
.staff-account-card,
.staff-permission-card,
.staff-modal-utility-card,
.staff-role-empty,
.staff-create-stat {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 251, 249, 0.98) 100%);
}

.staff-role-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(28, 72, 76, 0.05);
}

.staff-role-card-top,
.staff-account-head,
.staff-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.staff-role-icon,
.staff-account-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-grid;
    place-items: center;
    background: rgba(31, 208, 164, 0.12);
    color: var(--brand-deep);
    font-size: 1.3rem;
    font-weight: 800;
}

.staff-role-card.role-admin .staff-role-icon,
.staff-account-card.role-admin .staff-account-avatar {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.staff-role-card.role-doctor .staff-role-icon,
.staff-account-card.role-doctor .staff-account-avatar {
    background: rgba(16, 185, 129, 0.14);
    color: #0f766e;
}

.staff-role-card.role-receptionist .staff-role-icon,
.staff-account-card.role-receptionist .staff-account-avatar {
    background: rgba(249, 115, 22, 0.12);
    color: #c2410c;
}

.staff-role-count {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ink);
}

.staff-role-card strong,
.staff-account-identity strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.staff-role-card p,
.staff-role-link,
.staff-account-identity span,
.staff-account-meta span,
.staff-create-stat span {
    color: var(--muted);
}

.staff-role-link {
    font-weight: 700;
}

.staff-create-shell,
.staff-role-section {
    padding: 22px;
}

.staff-create-stat {
    min-width: 140px;
    padding: 14px 16px;
    text-align: center;
}

.staff-create-stat strong {
    display: block;
    font-size: 1.6rem;
    color: var(--ink);
}

.staff-switch-label,
.staff-switch-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.staff-account-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.staff-account-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    min-height: 100%;
}

.staff-account-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.staff-account-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.staff-account-meta strong {
    display: block;
    color: var(--ink);
    font-size: 0.93rem;
}

.staff-account-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.staff-flag-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #edf6f4;
    color: #4f666c;
    font-size: 0.78rem;
    font-weight: 700;
}

.staff-flag-chip.is-enabled {
    background: #e5fbf4;
    color: var(--brand-deep);
}

.staff-account-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.staff-role-empty {
    padding: 30px 20px;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--muted);
    text-align: center;
}

.staff-role-empty i {
    font-size: 2rem;
}

.staff-account-modal .modal-content {
    border: 1px solid rgba(198, 220, 214, 0.92);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(247, 252, 250, 0.99) 0%, rgba(236, 247, 244, 0.99) 100%);
    box-shadow: 0 24px 48px rgba(18, 51, 60, 0.16);
}

.staff-account-modal .modal-header,
.staff-account-modal .modal-body {
    padding: 22px 24px;
}

.staff-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.staff-modal-toggle-grid {
    display: grid;
    gap: 10px;
}

.staff-switch-card,
.staff-permission-card,
.staff-modal-utility-card {
    padding: 14px 16px;
}

.staff-permission-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.staff-modal-utility-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 14px;
}

.staff-modal-utility-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (max-width: 1199px) {
    .staff-role-hub,
    .staff-account-grid,
    .staff-modal-grid,
    .staff-modal-utility-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .staff-role-hub,
    .staff-account-grid,
    .staff-modal-grid,
    .staff-modal-utility-grid,
    .staff-account-meta {
        grid-template-columns: 1fr;
    }

    .staff-role-card-top,
    .staff-account-head,
    .staff-section-head {
        flex-direction: column;
        align-items: stretch;
    }
}
.dashboard-calendar-workspace {
    max-height: 980px;
}

.dashboard-calendar-body,
.dashboard-calendar-main-panel,
.dashboard-calendar-side-panel {
    min-height: 0;
}

.dashboard-calendar-body {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: stretch;
}

.dashboard-calendar-main-panel {
    display: flex;
    flex-direction: column;
    max-height: 780px;
    overflow: hidden;
}

.dashboard-calendar-scroller {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.dashboard-calendar-day-grid,
.dashboard-calendar-week-grid,
.dashboard-calendar-month-wrap {
    min-width: 0;
    width: 100%;
}

.dashboard-calendar-time-row {
    grid-template-columns: 62px minmax(0, 1fr);
    min-height: 76px;
}

.dashboard-calendar-time-label,
.dashboard-calendar-week-time {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.dashboard-calendar-time-slot {
    padding: 8px 0 8px 10px;
}

.dashboard-calendar-event-stack {
    gap: 8px;
}

.dashboard-calendar-event-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
}

.dashboard-calendar-event-meta,
.dashboard-calendar-event-side {
    gap: 3px;
    min-width: 0;
}

.dashboard-calendar-event-meta strong,
.dashboard-calendar-mini-event strong {
    font-size: 0.86rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-calendar-event-meta span,
.dashboard-calendar-event-side span,
.dashboard-calendar-mini-time,
.dashboard-calendar-month-pill-time {
    font-size: 0.74rem;
    line-height: 1.15;
}

.dashboard-calendar-event-meta span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-calendar-event-side {
    align-items: flex-end;
}

.dashboard-calendar-event-status {
    font-size: 0.72rem;
}

.dashboard-calendar-event-card .doctor-chip {
    padding: 4px 8px;
    font-size: 0.68rem;
}

.dashboard-calendar-week-grid {
    grid-template-columns: 56px repeat(7, minmax(0, 1fr));
}

.dashboard-calendar-week-head {
    min-height: 58px;
    padding: 8px 6px;
}

.dashboard-calendar-week-head strong {
    font-size: 0.82rem;
}

.dashboard-calendar-week-head span {
    font-size: 0.72rem;
}

.dashboard-calendar-week-cell {
    min-height: 68px;
    padding: 5px;
}

.dashboard-calendar-mini-event {
    gap: 2px;
    padding: 6px 7px;
    border-radius: 12px;
    margin-bottom: 6px;
}

.dashboard-calendar-month-cell {
    min-height: 118px;
    padding: 9px;
}

.dashboard-calendar-month-events {
    gap: 6px;
}

.dashboard-calendar-month-pill {
    gap: 8px;
    padding: 5px 7px;
    border-radius: 10px;
    font-size: 0.74rem;
}

.dashboard-calendar-month-pill-copy {
    min-width: 0;
}

.dashboard-calendar-month-count {
    min-width: 24px;
    height: 24px;
    font-size: 0.7rem;
}

@media (max-width: 1399px) {
    .dashboard-calendar-main-panel {
        max-height: 720px;
    }
}

@media (max-width: 1199px) {
    .dashboard-calendar-workspace {
        max-height: none;
    }

    .dashboard-calendar-body {
        grid-template-columns: 1fr;
    }

    .dashboard-calendar-main-panel {
        max-height: 680px;
    }
}

@media (max-width: 767px) {
    .dashboard-calendar-event-card {
        grid-template-columns: 1fr;
    }

    .dashboard-calendar-event-side {
        align-items: flex-start;
    }
}
.doctor-chip {
    gap: 7px;
    padding: 4px 9px;
    border: 1px solid var(--doctor-ring);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 6px 14px rgba(15, 23, 42, 0.04);
    letter-spacing: 0.01em;
}

.doctor-chip-dot {
    width: 9px;
    height: 9px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.patient-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    box-shadow: 0 0 0 5px var(--doctor-soft);
}
.brand-box {
    padding: 8px 6px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.06);
}

.brand-logo-image {
    width: 118px;
    max-height: 72px;
    margin: 0 auto;
    filter: drop-shadow(0 10px 18px rgba(15, 118, 110, 0.12));
}

.app-shell.sidebar-collapsed .brand-box {
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 6px 4px;
    border-radius: 18px;
}

.app-shell.sidebar-collapsed .brand-logo-image {
    width: 60px;
    max-height: 60px;
    opacity: 1;
    visibility: visible;
}

.sidebar:hover .brand-logo-image,
.sidebar:focus-within .brand-logo-image,
.app-shell.sidebar-expanded .sidebar .brand-logo-image {
    width: 126px;
    max-height: 78px;
}

.sidebar {
    overflow: visible;
}

.brand-box {
    min-height: 74px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.brand-logo-image {
    display: block;
    width: min(132px, 100%);
    height: auto;
    max-height: 78px;
    object-fit: contain;
}

.app-shell.sidebar-collapsed .sidebar {
    flex: 0 0 92px;
    width: 92px;
}

.app-shell.sidebar-collapsed .brand-box {
    min-height: 68px;
    padding: 8px 4px;
}

.app-shell.sidebar-collapsed .brand-logo-image {
    width: 58px;
    max-height: 58px;
}

.sidebar:hover .brand-box,
.sidebar:focus-within .brand-box,
.app-shell.sidebar-expanded .sidebar .brand-box {
    background: rgba(255, 255, 255, 0.96);
}

.clinic-datetime-picker {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 251, 248, 0.96));
    border: 1px solid rgba(19, 178, 139, 0.16);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 16px 32px rgba(13, 42, 52, 0.06);
}

.clinic-datetime-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.clinic-datetime-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clinic-datetime-panel .form-label {
    margin-bottom: 0;
    font-weight: 700;
    color: var(--ink);
}

.clinic-datetime-input-shell {
    position: relative;
}

.clinic-datetime-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-deep);
    font-size: 1rem;
    pointer-events: none;
}

.clinic-datetime-date-input {
    min-height: 54px;
    padding-left: 42px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(19, 178, 139, 0.2);
    font-weight: 600;
}

.clinic-time-select-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.clinic-time-select-grid .form-select {
    min-height: 54px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(19, 178, 139, 0.2);
    font-weight: 600;
    text-align: center;
    text-align-last: center;
}

.clinic-datetime-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 18px;
}

.clinic-datetime-meta .btn-link {
    font-size: 0.82rem;
    color: var(--brand-deep);
    text-decoration: none;
}

.clinic-datetime-meta .btn-link:hover {
    color: var(--brand);
}

.clinic-datetime-picker.is-compact {
    padding: 14px;
    border-radius: 20px;
}

.clinic-datetime-picker.is-compact .clinic-datetime-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (max-width: 767px) {
    .clinic-datetime-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    .app-shell.sidebar-collapsed .sidebar {
        flex: 0 0 92px;
        width: 92px;
        min-width: 92px;
        padding: 18px 12px;
        overflow: visible;
    }

    .app-shell.sidebar-collapsed .sidebar-link {
        justify-content: center;
        padding: 10px 8px;
    }

    .app-shell.sidebar-collapsed .sidebar-link span {
        width: 0;
        max-width: 0;
        opacity: 0;
        overflow: hidden;
        white-space: nowrap;
        transform: translateX(-8px);
        pointer-events: none;
    }

    .app-shell.sidebar-collapsed .sidebar:hover,
    .app-shell.sidebar-collapsed .sidebar:focus-within,
    .app-shell.sidebar-expanded .sidebar {
        flex: 0 0 236px;
        width: 236px;
        min-width: 236px;
        padding: 18px 14px;
    }

    .app-shell.sidebar-collapsed .sidebar:hover .sidebar-link,
    .app-shell.sidebar-collapsed .sidebar:focus-within .sidebar-link,
    .app-shell.sidebar-expanded .sidebar .sidebar-link {
        justify-content: flex-start;
        padding-inline: 12px;
    }

    .app-shell.sidebar-collapsed .sidebar:hover .sidebar-link span,
    .app-shell.sidebar-collapsed .sidebar:focus-within .sidebar-link span,
    .app-shell.sidebar-expanded .sidebar .sidebar-link span {
        width: auto;
        max-width: 160px;
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }

    .app-shell.sidebar-collapsed .sidebar:hover .brand-box,
    .app-shell.sidebar-collapsed .sidebar:focus-within .brand-box,
    .app-shell.sidebar-expanded .sidebar .brand-box {
        justify-content: flex-start;
    }
}
