/* =========================================
   MEDICAL CENTER - LOGIN PAGE
   Modern blue and teal theme
   ========================================= */

:root {
    --navy: #102a43;
    --navy-light: #183f5b;
    --blue: #2478c8;
    --teal: #12b8a6;
    --text: #243b53;
    --muted: #8293a7;
    --border: #dce6ef;
    --surface: #ffffff;
    --background: #f2f7fb;
}

* {
    box-sizing: border-box;
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--background);
}

.login-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* Left welcome panel */

.login-welcome {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 70px 10%;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(18, 184, 166, 0.28),
            transparent 34%
        ),
        linear-gradient(145deg, #102a43, #174d70);
}

.login-welcome::before,
.login-welcome::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    pointer-events: none;
}

.login-welcome::before {
    width: 440px;
    height: 440px;
    right: -180px;
    bottom: -130px;
}

.login-welcome::after {
    width: 300px;
    height: 300px;
    right: -110px;
    bottom: -60px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 54px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    color: #5eead4;
    font-size: 42px;
    font-weight: 700;
}

.welcome-label {
    margin: 0 0 16px;
    color: #5eead4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.login-welcome h1 {
    margin: 0;
    font-size: clamp(30px, 3.2vw, 48px);
    line-height: 1.2;
    letter-spacing: -1.3px;
}

.welcome-description {
    margin-top: 25px;
    color: #d1e2ef;
    font-size: 16px;
    line-height: 1.9;
}

.welcome-footer {
    margin-top: 70px;
    color: #a9c5d9;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

/* Right login panel */

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 45px 30px 25px;
}

.login-card {
    width: 100%;
    max-width: 410px;
    padding: 40px;
    border: 1px solid #e5edf4;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 20px 60px rgba(16, 42, 67, 0.08);
}

.login-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 25px;
    border-radius: 16px;
    background: #e3f8f5;
    color: #079889;
    font-size: 27px;
}

.login-card h2 {
    margin: 0;
    color: var(--navy);
    font-size: 29px;
    letter-spacing: -0.7px;
}

.login-subtitle {
    margin: 10px 0 28px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    margin-bottom: 9px;
    color: #334e68;
    font-size: 13px;
    font-weight: 600;
}

.login-field input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: #fbfdff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(18, 184, 166, 0.12);
}

.login-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    margin-top: 10px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(100deg, #2478c8, #138fba);
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(36, 120, 200, 0.23);
}

.login-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.6;
}

.login-security {
    margin: 27px 0 0;
    color: #8a9bad;
    text-align: center;
    font-size: 11px;
}

.login-security span {
    margin-right: 6px;
    color: var(--teal);
    font-size: 9px;
}

.login-copyright {
    margin-top: 25px;
    color: #94a3b8;
    text-align: center;
    font-size: 11px;
}

/* Mobile and tablet layout */

@media (max-width: 850px) {
    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-welcome {
        min-height: 270px;
        padding: 35px 8%;
    }

    .brand-mark {
        width: 45px;
        height: 45px;
        margin-bottom: 24px;
        border-radius: 13px;
        font-size: 32px;
    }

    .login-welcome h1 {
        font-size: 30px;
    }

    .welcome-description {
        margin-top: 15px;
        font-size: 14px;
    }

    .welcome-footer {
        margin-top: 24px;
        font-size: 9px;
    }

    .login-panel {
        padding: 35px 20px;
    }

    .login-card {
        padding: 30px 25px;
    }
}

@media (max-width: 400px) {
    .login-card {
        padding: 25px 20px;
    }

    .login-card h2 {
        font-size: 25px;
    }
}
/* =========================================
   APPLICATION SHELL AND DASHBOARD
   ========================================= */

body.app-body {
    margin: 0;
    min-height: 100vh;
    background: #f3f7fb;
    color: #243b53;
    font-family: "Segoe UI", Arial, sans-serif;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 255px;
    padding: 25px 17px 18px;
    background: #102a43;
    color: #fff;
    overflow-y: auto;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 3px 7px 30px;
    color: #fff;
    text-decoration: none;
}

.app-brand-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 43px;
    height: 43px;
    border-radius: 13px;
    background: #12b8a6;
    color: white;
    font-size: 34px;
    font-weight: 700;
}

.app-brand-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.app-brand-text strong {
    font-size: 19px;
    letter-spacing: -.5px;
}

.app-brand-text small {
    color: #9fb6ca;
    font-size: 9px;
    letter-spacing: 1.1px;
}

.sidebar-label {
    padding: 12px 12px 10px;
    color: #7893aa;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.sidebar-label-tools {
    margin-top: 22px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 46px;
    padding: 10px 13px;
    border-radius: 9px;
    color: #c7d6e4;
    text-decoration: none;
    font-size: 13px;
    transition: background .2s, color .2s;
}

.nav-item:hover,
.nav-item:focus-visible {
    background: #1c4563;
    color: white;
}

.nav-item:first-child {
    background: #2478c8;
    color: white;
}

.nav-icon {
    display: inline-grid;
    place-items: center;
    width: 22px;
    font-size: 19px;
}

.sidebar-bottom {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: auto;
    padding: 17px 10px 5px;
    border-top: 1px solid #29465f;
}

.sidebar-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #12b8a6;
    box-shadow: 0 0 0 4px rgba(18, 184, 166, .13);
}

.sidebar-bottom div:last-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-bottom strong {
    font-size: 12px;
}

.sidebar-bottom small {
    color: #91a9bd;
    font-size: 10px;
}

/* Main content and top bar */

.app-main {
    min-width: 0;
    width: calc(100% - 255px);
    margin-left: 255px;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 92px;
    padding: 18px 35px;
    border-bottom: 1px solid #e5edf4;
    background: #fff;
}

.topbar-eyebrow {
    margin-bottom: 6px;
    color: #8293a7;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.6px;
}

.topbar-heading {
    color: #102a43;
    font-size: 22px;
    font-weight: 700;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.topbar-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #e3f8f5;
    color: #078f83;
    font-size: 13px;
    font-weight: 700;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.topbar-user-info strong {
    color: #243b53;
    font-size: 12px;
}

.topbar-user-info small {
    color: #8293a7;
    font-size: 10px;
}

.app-content {
    padding: 30px 35px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 38px;
    padding-top: 18px;
    border-top: 1px solid #e1eaf2;
    color: #91a0b2;
    font-size: 10px;
}

/* Existing notification messages */

.message {
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid #b9e8dc;
    border-radius: 10px;
    background: #edfcf7;
    color: #087f70;
    font-size: 13px;
}

/* General form controls inside application pages */

.app-content input,
.app-content select,
.app-content textarea {
    max-width: 100%;
    border: 1px solid #dce6ef;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
}

.app-content input:focus,
.app-content select:focus,
.app-content textarea:focus {
    border-color: #12b8a6;
    outline: 3px solid rgba(18, 184, 166, .12);
}

.app-content button,
.app-content button[type="submit"],
.app-content input[type="submit"] {
    border: 0;
    border-radius: 8px;
    padding: 11px 17px;
    background: #2478c8;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* Responsive layout */

@media (max-width: 900px) {
    .app-sidebar {
        width: 215px;
    }

    .app-main {
        width: calc(100% - 215px);
        margin-left: 215px;
    }

    .app-topbar {
        padding: 18px 22px;
    }

    .app-content {
        padding: 25px 22px;
    }
}

@media (max-width: 650px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: relative;
        width: 100%;
        padding: 15px;
    }

    .app-brand {
        padding-bottom: 15px;
    }

    .sidebar-label,
    .sidebar-bottom {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nav-item {
        flex: 1 1 135px;
        min-height: 40px;
        padding: 9px;
        font-size: 12px;
    }

    .app-main {
        width: 100%;
        margin-left: 0;
    }

    .app-topbar {
        min-height: 75px;
        padding: 15px;
    }

    .topbar-heading {
        font-size: 18px;
    }

    .topbar-user-info {
        display: none;
    }

    .app-content {
        padding: 20px 15px;
    }

    .app-footer {
        flex-direction: column;
    }
}
/* ===== Modern Dashboard ===== */

.dashboard-page {
    max-width: 1500px;
    margin: 0 auto;
    color: #172b4d;
}

.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.section-kicker {
    display: inline-block;
    color: #0d9488;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    margin-bottom: 8px;
}

.welcome-section h1 {
    margin: 0 0 8px;
    font-size: clamp(25px, 3vw, 32px);
    letter-spacing: -0.8px;
    color: #172b4d;
}

.muted,
.panel-heading p {
    color: #718096;
    font-size: 13px;
    margin: 0;
}

.date-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e7edf4;
    border-radius: 13px;
    padding: 13px 17px;
    box-shadow: 0 3px 12px rgba(25, 50, 80, 0.04);
}

.date-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #e8f7f5;
    color: #0d9488;
    font-size: 23px;
}

.date-chip small,
.date-chip strong {
    display: block;
}

.date-chip small {
    color: #718096;
    font-size: 11px;
    margin-bottom: 4px;
}

.date-chip strong {
    color: #263b59;
    font-size: 13px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    min-width: 0;
    padding: 23px;
    background: #ffffff;
    border: 1px solid #e8edf4;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(30, 55, 90, 0.035);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(30, 55, 90, 0.08);
}

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 25px;
    font-weight: 600;
}

.stat-patients .stat-icon {
    background: #eaf1ff;
    color: #3867d6;
}

.stat-waiting .stat-icon {
    background: #e5f8f4;
    color: #0d9488;
}

.stat-unpaid .stat-icon {
    background: #fff1e6;
    color: #dc7b28;
}

.stat-label {
    color: #8b98aa;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.stat-number {
    margin-top: 21px;
    color: #172b4d;
    font-size: 35px;
    font-weight: 800;
    line-height: 1.1;
}

.stat-description {
    margin-top: 8px;
    color: #718096;
    font-size: 13px;
}

.dashboard-panel {
    background: #ffffff;
    border: 1px solid #e8edf4;
    border-radius: 16px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(30, 55, 90, 0.035);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 23px 25px;
    border-bottom: 1px solid #edf1f6;
}

.panel-heading h2 {
    margin: 0 0 7px;
    color: #172b4d;
    font-size: 17px;
    font-weight: 750;
}

.panel-heading-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e5f8f4;
    color: #0d9488;
    font-size: 24px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 22px 25px 25px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 17px;
    border: 1px solid #edf1f6;
    border-radius: 13px;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease,
                background 0.2s ease;
}

.quick-action:hover {
    transform: translateY(-2px);
    border-color: #b9dcd9;
    background: #fbfefe;
}

.quick-action-icon {
    display: grid;
    place-items: center;
    flex: 0 0 45px;
    height: 45px;
    border-radius: 12px;
    font-size: 24px;
}

.action-primary .quick-action-icon {
    background: #eaf1ff;
    color: #3867d6;
}

.action-teal .quick-action-icon {
    background: #e5f8f4;
    color: #0d9488;
}

.action-purple .quick-action-icon {
    background: #f2ebff;
    color: #8055c7;
}

.action-orange .quick-action-icon {
    background: #fff1e6;
    color: #dc7b28;
}

.quick-action-text {
    flex: 1;
    min-width: 0;
}

.quick-action-text strong,
.quick-action-text small {
    display: block;
}

.quick-action-text strong {
    color: #263b59;
    font-size: 13px;
    margin-bottom: 5px;
}

.quick-action-text small {
    color: #8390a3;
    font-size: 11px;
    line-height: 1.5;
}

.quick-action-arrow {
    color: #98a5b5;
    font-size: 20px;
}

.visits-heading {
    padding-bottom: 20px;
}

.visit-count {
    flex-shrink: 0;
    padding: 7px 11px;
    border-radius: 20px;
    background: #e5f8f4;
    color: #0d8078;
    font-size: 11px;
    font-weight: 750;
}

.dashboard-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.dashboard-table thead {
    background: #f8fafc;
}

.dashboard-table th {
    padding: 15px 20px;
    color: #8290a3;
    text-align: left;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
    border-bottom: 1px solid #edf1f6;
}

.dashboard-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f3f7;
    color: #52647c;
    font-size: 12px;
}

.dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

.dashboard-table tbody tr:hover {
    background: #fbfdfd;
}

.doctor-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.doctor-cell strong {
    color: #344863;
    font-weight: 650;
}

.doctor-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e5f8f4;
    color: #0d9488;
    font-size: 18px;
}

.token-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 7px;
    background: #edf3ff;
    color: #3867d6;
    font-weight: 750;
}

.patient-link,
.payment-link,
.collect-fee-link {
    text-decoration: none;
    font-weight: 650;
}

.patient-link {
    color: #2862c5;
}

.patient-link:hover,
.payment-link:hover,
.collect-fee-link:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    background: #edf5ff;
    color: #426ca8;
    font-size: 11px;
    font-weight: 700;
}

.payment-link {
    color: #0d8078;
}

.collect-fee-link {
    color: #d17a27;
}

.payment-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 5px;
}

.payment-paid {
    background: #0d9488;
}

.payment-pending {
    background: #e99a3b;
}

.empty-state {
    text-align: center;
    padding: 45px 20px;
}

.empty-state-icon {
    display: grid;
    place-items: center;
    width: 65px;
    height: 65px;
    margin: 0 auto 15px;
    border-radius: 18px;
    background: #eef7f7;
    color: #0d9488;
    font-size: 31px;
}

.empty-state h3 {
    margin: 0 0 8px;
    color: #263b59;
    font-size: 16px;
}

.empty-state p {
    margin: 0 0 20px;
    color: #8290a3;
    font-size: 13px;
}

.empty-state .button {
    display: inline-block;
    padding: 11px 17px;
    border-radius: 9px;
    background: #0d9488;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

/* Dashboard responsive layout */

@media (max-width: 1000px) {
    .dashboard-stats {
        gap: 12px;
    }

    .stat-card {
        padding: 18px;
    }

    .dashboard-table th,
    .dashboard-table td {
        padding: 13px 15px;
    }
}

@media (max-width: 700px) {
    .welcome-section {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-number {
        font-size: 30px;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .panel-heading {
        padding: 19px 16px;
    }

    .visits-heading {
        align-items: flex-start;
    }

    .dashboard-table th,
    .dashboard-table td {
        padding: 13px 14px;
    }
}
/* ===== Patient Registry ===== */

.patient-registry {
    max-width: 1500px;
    color: #172b4d;
}

.registry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 27px;
}

.registry-header h1 {
    margin: 0 0 8px;
    color: #172b4d;
    font-size: clamp(25px, 3vw, 32px);
    letter-spacing: -0.7px;
}

.registry-subtitle {
    margin: 0;
    color: #718096;
    font-size: 13px;
    line-height: 1.6;
}

.registry-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 12px 17px;
    border: 0;
    border-radius: 10px;
    background: #0d9488;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 750;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.registry-primary-button:hover {
    background: #0b7f76;
    color: #fff;
    transform: translateY(-1px);
}

.registry-primary-button > span {
    font-size: 19px;
    line-height: 1;
}

.registry-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}

.registry-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 580px);
    min-height: 46px;
    padding: 5px 6px 5px 14px;
    background: #fff;
    border: 1px solid #e3eaf2;
    border-radius: 11px;
    box-shadow: 0 3px 12px rgba(25, 50, 80, 0.025);
}

.registry-search:focus-within {
    border-color: #69bcb5;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.09);
}

.registry-search-icon {
    color: #8390a3;
    font-size: 24px;
    line-height: 1;
}

.registry-search input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 9px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #263b59;
    font: inherit;
    font-size: 12px;
}

.registry-search input:focus {
    box-shadow: none;
}

.registry-search button {
    padding: 10px 15px;
    border: 0;
    border-radius: 8px;
    background: #173653;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.registry-search button:hover {
    background: #244d70;
}

.registry-clear {
    padding: 8px 5px;
    color: #718096;
    text-decoration: none;
    font-size: 11px;
}

.registry-clear:hover {
    color: #0d9488;
}

.registry-result-label {
    color: #8290a3;
    font-size: 12px;
}

.registry-result-label strong {
    color: #40536d;
}

.registry-table-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5ebf2;
    border-radius: 15px;
    box-shadow: 0 5px 18px rgba(30, 55, 90, 0.035);
}

.registry-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 22px 24px;
    border-bottom: 1px solid #edf1f6;
}

.registry-table-header h2 {
    margin: 0 0 6px;
    color: #172b4d;
    font-size: 16px;
    font-weight: 750;
}

.registry-table-header p {
    margin: 0;
    color: #8290a3;
    font-size: 12px;
}

.registry-table-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #e5f8f4;
    color: #0d9488;
    font-size: 23px;
}

.registry-table-wrap {
    overflow-x: auto;
}

.registry-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.registry-table thead {
    background: #f8fafc;
}

.registry-table th {
    padding: 15px 20px;
    color: #8290a3;
    text-align: left;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.65px;
    border-bottom: 1px solid #e9eef5;
}

.registry-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #eff3f7;
    color: #52647c;
    font-size: 12px;
    vertical-align: middle;
}

.registry-table tbody tr:last-child td {
    border-bottom: 0;
}

.registry-table tbody tr:hover {
    background: #fbfdfd;
}

.registry-patient-id {
    display: inline-block;
    padding: 7px 9px;
    border-radius: 7px;
    background: #edf3ff;
    color: #3867d6;
    font-size: 11px;
    font-weight: 750;
}

.registry-patient-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.registry-patient-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #e5f8f4;
    color: #0d8078;
    font-size: 15px;
    font-weight: 800;
}

.registry-patient-info a {
    display: block;
    margin-bottom: 4px;
    color: #2b4260;
    text-decoration: none;
    font-size: 12px;
    font-weight: 750;
}

.registry-patient-info a:hover {
    color: #0d9488;
}

.registry-patient-info small {
    display: block;
    color: #94a0b0;
    font-size: 10px;
}

.registry-phone,
.registry-date {
    color: #62738a;
}

.registry-view-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid #dcece9;
    border-radius: 8px;
    background: #f4fbfa;
    color: #0d8078;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}

.registry-view-button:hover {
    background: #e5f8f4;
}

.registry-view-button span {
    font-size: 15px;
}

.registry-empty-state {
    padding: 48px 20px;
    text-align: center;
    white-space: normal;
}

.registry-empty-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 17px;
    background: #eef7f7;
    color: #0d9488;
    font-size: 29px;
}

.registry-empty-state h3 {
    margin: 0 0 8px;
    color: #263b59;
    font-size: 16px;
}

.registry-empty-state p {
    margin: 0 0 20px;
    color: #8290a3;
    font-size: 12px;
    line-height: 1.7;
}

@media (max-width: 700px) {
    .registry-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .registry-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .registry-search {
        width: 100%;
    }

    .registry-result-label {
        line-height: 1.6;
    }

    .registry-table-header {
        padding: 18px;
    }

    .registry-table th,
    .registry-table td {
        padding: 13px 15px;
    }
}
/* ===== Professional Patient Form ===== */

.patient-form-page {
    max-width: 1050px;
    margin: 0 auto;
    color: #172b4d;
}

.patient-form-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.patient-form-heading h1 {
    margin: 0 0 8px;
    font-size: clamp(25px, 3vw, 31px);
    letter-spacing: -0.6px;
}

.patient-form-heading p {
    margin: 0;
    color: #718096;
    font-size: 13px;
    line-height: 1.6;
}

.patient-back-link {
    flex-shrink: 0;
    color: #0d8078;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.patient-back-link:hover {
    text-decoration: underline;
}

.patient-form-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5ebf2;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(30, 55, 90, 0.045);
}

.patient-form-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 23px 27px;
    border-bottom: 1px solid #edf1f6;
}

.patient-form-heading-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    background: #e5f8f4;
    color: #0d9488;
    font-size: 26px;
}

.patient-form-card-header h2 {
    margin: 0 0 6px;
    color: #263b59;
    font-size: 16px;
}

.patient-form-card-header p {
    margin: 0;
    color: #8290a3;
    font-size: 12px;
    line-height: 1.6;
}

.professional-patient-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
    padding: 27px;
}

.patient-field {
    min-width: 0;
}

.patient-field label {
    display: block;
    margin-bottom: 9px;
    color: #354963;
    font-size: 12px;
    font-weight: 750;
}

.required-star {
    color: #dc5a5a;
    margin-left: 2px;
}

.patient-field input,
.patient-field select,
.patient-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid #dfe7ef;
    border-radius: 9px;
    outline: none;
    background: #fbfcfe;
    color: #263b59;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.patient-field input:focus,
.patient-field select:focus,
.patient-field textarea:focus {
    border-color: #57b3aa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.09);
}

.patient-field input::placeholder,
.patient-field textarea::placeholder {
    color: #a0aaba;
}

.patient-field textarea {
    min-height: 110px;
    resize: vertical;
}

.patient-field input[type="checkbox"],
.patient-field input[type="radio"] {
    display: inline-block;
    width: auto;
    margin-right: 8px;
    box-shadow: none;
}

.patient-field select {
    cursor: pointer;
}

.patient-field ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.patient-field li {
    margin-bottom: 8px;
}

.patient-field-help {
    display: block;
    margin-top: 7px;
    color: #8290a3;
    font-size: 11px;
    line-height: 1.6;
}

.patient-field-error {
    display: block;
    margin-top: 7px;
    color: #c53d48;
    font-size: 11px;
    line-height: 1.5;
}

.patient-field-invalid input,
.patient-field-invalid select,
.patient-field-invalid textarea {
    border-color: #dc777d;
    background: #fffafa;
}

.patient-form-errors {
    grid-column: 1 / -1;
    padding: 13px 16px;
    border: 1px solid #f1c4c7;
    border-radius: 9px;
    background: #fff4f4;
    color: #b8323b;
    font-size: 12px;
}

.patient-form-errors p {
    margin: 4px 0;
}

.patient-form-note {
    grid-column: 1 / -1;
    color: #8290a3;
    font-size: 11px;
}

.patient-form-note span {
    color: #dc5a5a;
    font-weight: 800;
}

.patient-form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #edf1f6;
}

.patient-cancel-button,
.patient-save-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 11px 19px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.patient-cancel-button {
    border: 1px solid #dfe7ef;
    background: #fff;
    color: #586a80;
}

.patient-cancel-button:hover {
    background: #f6f8fb;
}

.patient-save-button {
    border: 1px solid #0d9488;
    background: #0d9488;
    color: #fff;
}

.patient-save-button:hover {
    border-color: #0b7f76;
    background: #0b7f76;
}

.patient-save-button span {
    font-size: 15px;
}

.patient-form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 19px 0 0;
    color: #8290a3;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 650px) {
    .patient-form-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .patient-form-card-header {
        padding: 19px;
    }

    .professional-patient-form {
        grid-template-columns: 1fr;
        gap: 19px;
        padding: 20px;
    }

    .patient-form-actions {
        flex-wrap: wrap;
    }

    .patient-cancel-button,
    .patient-save-button {
        flex: 1;
    }
}
/* ===== Patient Profile ===== */

.patient-profile-page {
    max-width: 1400px;
    margin: 0 auto;
    color: #172b4d;
}

.profile-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-page-heading h1 {
    margin: 0 0 8px;
    font-size: clamp(25px, 3vw, 31px);
    letter-spacing: -0.7px;
}

.profile-page-heading p {
    margin: 0;
    color: #718096;
    font-size: 13px;
    line-height: 1.6;
}

.profile-back-link {
    flex-shrink: 0;
    color: #0d8078;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.profile-back-link:hover {
    text-decoration: underline;
}

.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 25px;
    border: 1px solid #e0ecee;
    border-radius: 16px;
    background: linear-gradient(115deg, #f0fbfa 0%, #ffffff 75%);
    box-shadow: 0 5px 18px rgba(30, 55, 90, 0.035);
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 17px;
    min-width: 0;
}

.profile-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border: 4px solid #ffffff;
    border-radius: 20px;
    background: #d9f3ef;
    color: #0b8077;
    font-size: 29px;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.1);
}

.profile-identity-text {
    min-width: 0;
}

.profile-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #0d9488;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.profile-identity-text h2 {
    margin: 0 0 8px;
    overflow-wrap: anywhere;
    color: #172b4d;
    font-size: clamp(19px, 2.5vw, 25px);
    letter-spacing: -0.4px;
}

.profile-id {
    color: #64758b;
    font-size: 12px;
}

.profile-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-edit-button,
.profile-visit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 750;
    transition: background 0.2s ease;
}

.profile-edit-button {
    border-color: #dfe7ef;
    background: #fff;
    color: #40536d;
}

.profile-edit-button:hover {
    background: #f5f8fb;
}

.profile-visit-button {
    border-color: #0d9488;
    background: #0d9488;
    color: #fff;
}

.profile-visit-button:hover {
    border-color: #0b7f76;
    background: #0b7f76;
    color: #fff;
}

.profile-section-card {
    overflow: hidden;
    margin-bottom: 23px;
    border: 1px solid #e5ebf2;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(30, 55, 90, 0.035);
}

.profile-section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 22px 25px;
    border-bottom: 1px solid #edf1f6;
}

.profile-section-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 43px;
    height: 43px;
    border-radius: 12px;
    background: #e5f8f4;
    color: #0d9488;
    font-size: 23px;
}

.profile-history-icon {
    background: #edf3ff;
    color: #3867d6;
}

.profile-section-heading h3 {
    margin: 0 0 6px;
    color: #263b59;
    font-size: 15px;
}

.profile-section-heading p {
    margin: 0;
    color: #8290a3;
    font-size: 12px;
    line-height: 1.5;
}

.profile-information-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 5px 25px;
}

.profile-information-item {
    min-width: 0;
    padding: 20px 15px 20px 0;
    border-bottom: 1px solid #eff3f7;
}

.profile-field-label {
    display: block;
    margin-bottom: 9px;
    color: #8290a3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
}

.profile-information-item > strong,
.profile-notes {
    display: block;
    color: #344863;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.profile-address-item,
.profile-notes-item {
    grid-column: 1 / -1;
}

.profile-notes-item {
    border-bottom: 0;
}

.profile-notes {
    color: #64758b;
    font-weight: 400;
}

.profile-history-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.profile-history-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.profile-history-table thead {
    background: #f8fafc;
}

.profile-history-table th {
    padding: 15px 20px;
    border-bottom: 1px solid #e9eef5;
    color: #8290a3;
    text-align: left;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.65px;
}

.profile-history-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #eff3f7;
    color: #52647c;
    font-size: 12px;
    vertical-align: middle;
}

.profile-history-table tbody tr:last-child td {
    border-bottom: 0;
}

.profile-history-table tbody tr:hover {
    background: #fbfdfd;
}

.history-date {
    color: #52647c;
    font-weight: 600;
}

.history-doctor {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-doctor strong {
    color: #344863;
    font-weight: 650;
}

.history-doctor-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: #e5f8f4;
    color: #0d9488;
    font-size: 18px;
}

.history-token {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 7px;
    background: #edf3ff;
    color: #3867d6;
    font-weight: 750;
}

.history-status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    background: #edf5ff;
    color: #426ca8;
    font-size: 11px;
    font-weight: 700;
}

.profile-history-empty {
    padding: 38px 20px;
    text-align: center;
    white-space: normal;
}

.profile-empty-icon {
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    margin: 0 auto 13px;
    border-radius: 15px;
    background: #eef7f7;
    color: #0d9488;
    font-size: 27px;
}

.profile-history-empty h4 {
    margin: 0 0 7px;
    color: #263b59;
    font-size: 15px;
}

.profile-history-empty p {
    margin: 0 0 17px;
    color: #8290a3;
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .profile-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .profile-avatar {
        width: 60px;
        height: 60px;
        border-radius: 17px;
    }

    .profile-hero-actions {
        width: 100%;
    }

    .profile-edit-button,
    .profile-visit-button {
        flex: 1;
    }

    .profile-section-heading {
        padding: 18px;
    }

    .profile-information-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .profile-information-item,
    .profile-address-item,
    .profile-notes-item {
        grid-column: auto;
    }

    .profile-information-item:last-child {
        border-bottom: 0;
    }

    .profile-history-table th,
    .profile-history-table td {
        padding: 13px 15px;
    }
}

/* ===== Doctor Management ===== */

.doctor-management-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.doctor-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
}

.doctor-page-heading h1 {
    margin: 6px 0;
    color: #16344a;
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -0.7px;
}

.doctor-page-heading p,
.doctor-section-heading p {
    margin: 5px 0 0;
    color: #7a8b9b;
    font-size: 13px;
}

.doctor-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.doctor-primary-button,
.doctor-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition: 0.2s ease;
}

.doctor-primary-button {
    color: #fff;
    background: #087f8c;
    border: 1px solid #087f8c;
}

.doctor-primary-button:hover {
    color: #fff;
    background: #066b76;
    border-color: #066b76;
    transform: translateY(-1px);
}

.doctor-secondary-button {
    color: #087f8c;
    background: #fff;
    border: 1px solid #d6e5e9;
}

.doctor-secondary-button:hover {
    color: #066b76;
    background: #f0fbfc;
}

.doctor-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.doctor-summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: #fff;
    border: 1px solid #e5edf1;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(30, 65, 90, 0.035);
}

.doctor-summary-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 25px;
}

.doctor-icon-blue {
    color: #3776d1;
    background: #edf4ff;
}

.doctor-icon-teal {
    color: #078b8d;
    background: #e8f9f7;
}

.doctor-summary-card span,
.doctor-summary-card small {
    display: block;
    color: #7a8b9b;
    font-size: 12px;
}

.doctor-summary-card strong {
    display: block;
    margin: 3px 0;
    color: #18374c;
    font-size: 26px;
    line-height: 1.2;
}

.doctor-summary-card small {
    font-size: 11px;
}

.doctor-section-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5edf1;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(30, 65, 90, 0.035);
}

.doctor-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 22px 24px;
    border-bottom: 1px solid #edf1f4;
}

.doctor-section-heading h2 {
    margin: 0;
    color: #18374c;
    font-size: 17px;
    font-weight: 750;
}

.doctor-count {
    padding: 7px 11px;
    color: #087f8c;
    background: #eaf8f8;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.doctor-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.doctor-table thead th {
    padding: 14px 20px;
    color: #80909f;
    background: #f8fafc;
    border-bottom: 1px solid #edf1f4;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.7px;
    white-space: nowrap;
}

.doctor-table tbody td {
    padding: 16px 20px;
    color: #607486;
    border-bottom: 1px solid #f0f3f6;
    font-size: 12px;
    vertical-align: middle;
}

.doctor-table tbody tr:last-child td {
    border-bottom: none;
}

.doctor-table tbody tr:hover {
    background: #fbfdfe;
}

.doctor-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 175px;
}

.doctor-table-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    color: #087f8c;
    background: #e8f7f7;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 750;
}

.doctor-name-cell strong {
    display: block;
    color: #1b3b50;
    font-size: 12px;
}

.doctor-name-cell small {
    display: block;
    margin-top: 4px;
    color: #94a2af;
    font-size: 10px;
}

.doctor-fee {
    color: #1d485f;
    white-space: nowrap;
}

.doctor-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.doctor-status > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.doctor-status-active {
    color: #18815b;
    background: #e9f8ef;
}

.doctor-status-active > span {
    background: #24a46d;
}

.doctor-status-inactive {
    color: #9a6a2b;
    background: #fff5e5;
}

.doctor-status-inactive > span {
    background: #d99a38;
}

.doctor-text-link {
    color: #087f8c;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.doctor-text-link:hover {
    color: #066b76;
}

.schedule-doctor-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #29485d;
    font-weight: 650;
}

.schedule-doctor-name > span {
    color: #087f8c;
    font-size: 17px;
}

.schedule-hours {
    color: #405f74;
    white-space: nowrap;
}

.doctor-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 38px 20px;
    text-align: center;
}

.doctor-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    color: #087f8c;
    background: #eaf8f8;
    border-radius: 16px;
    font-size: 26px;
}

.doctor-empty-state h3 {
    margin: 0;
    color: #25465b;
    font-size: 15px;
}

.doctor-empty-state p {
    max-width: 370px;
    margin: 8px 0 18px;
    color: #8292a0;
    font-size: 12px;
    line-height: 1.7;
}

.schedule-empty-state {
    padding: 30px 20px;
}

@media (max-width: 760px) {
    .doctor-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .doctor-page-actions {
        width: 100%;
    }

    .doctor-page-actions > a {
        flex: 1;
    }

    .doctor-summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .doctor-section-heading {
        padding: 18px;
    }

    .doctor-table {
        min-width: 720px;
    }

    .doctor-table thead th,
    .doctor-table tbody td {
        padding: 13px 15px;
    }
}

/* ===== Professional Shared Forms ===== */

.generic-form-page {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
}

.generic-form-heading {
    margin-bottom: 22px;
}

.generic-form-heading h1 {
    margin: 6px 0;
    color: #18374c;
    font-size: 27px;
    font-weight: 750;
}

.generic-form-heading p {
    margin: 5px 0 0;
    color: #7a8b9b;
    font-size: 13px;
}

.generic-form-card {
    padding: 30px;
    background: #fff;
    border: 1px solid #e4edf1;
    border-radius: 16px;
    box-shadow: 0 5px 22px rgba(30, 65, 90, 0.045);
}

.professional-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 22px;
}

.professional-form-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 8px;
}

.professional-form-field label {
    color: #29465a;
    font-size: 12px;
    font-weight: 700;
}

.required-mark {
    color: #dc5656;
    font-weight: 800;
}

.professional-form-field input,
.professional-form-field select,
.professional-form-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 13px;
    color: #29465a;
    background: #fbfdfe;
    border: 1px solid #dce6ec;
    border-radius: 9px;
    outline: none;
    font: inherit;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.professional-form-field textarea {
    min-height: 110px;
    resize: vertical;
}

.professional-form-field input:focus,
.professional-form-field select:focus,
.professional-form-field textarea:focus {
    background: #fff;
    border-color: #078b96;
    box-shadow: 0 0 0 3px rgba(7, 139, 150, 0.10);
}

.professional-form-field input[type="checkbox"],
.professional-form-field input[type="radio"] {
    width: auto;
    min-height: auto;
    accent-color: #087f8c;
}

.professional-form-field input[type="file"] {
    padding: 9px;
}

.professional-form-field .helptext,
.field-help {
    color: #8494a1;
    font-size: 11px;
    line-height: 1.5;
}

.field-error {
    color: #c43f46;
    font-size: 11px;
    line-height: 1.5;
}

.form-error-summary {
    grid-column: 1 / -1;
    padding: 12px 15px;
    color: #a8323a;
    background: #fff0f0;
    border: 1px solid #f4d0d0;
    border-radius: 9px;
    font-size: 12px;
}

.professional-form-field ul {
    margin: 0;
    padding-left: 20px;
}

.full-width-field {
    grid-column: 1 / -1;
}

.professional-form-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    padding-top: 22px;
    border-top: 1px solid #edf1f4;
}

.form-save-button,
.form-cancel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 22px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.form-save-button {
    color: #fff;
    background: #087f8c;
    border: 1px solid #087f8c;
}

.form-save-button:hover {
    background: #066b76;
}

.form-cancel-button {
    color: #526b7c;
    background: #fff;
    border: 1px solid #dce6ec;
}

.form-cancel-button:hover {
    background: #f5f8fa;
}

.form-required-note {
    margin-top: 14px;
    color: #8292a0;
    font-size: 11px;
}

@media (max-width: 650px) {
    .generic-form-card {
        padding: 20px 16px;
    }

    .professional-form {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 18px;
    }

    .full-width-field,
    .professional-form-actions,
    .form-error-summary {
        grid-column: 1;
    }

    .professional-form-actions {
        flex-wrap: wrap;
    }

    .form-save-button,
    .form-cancel-button {
        flex: 1;
    }
}

/* ===== OPD Visit Registration ===== */

.opd-instructions {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 20px;
    padding: 17px 19px;
    background: #edf8fc;
    border: 1px solid #d8edf5;
    border-radius: 12px;
}

.opd-instructions-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    color: #147da0;
    background: #d9f0fa;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
}

.opd-instructions strong {
    display: block;
    margin-bottom: 5px;
    color: #24536a;
    font-size: 13px;
}

.opd-instructions p {
    margin: 0;
    color: #567889;
    font-size: 12px;
    line-height: 1.7;
}

.opd-form-card {
    max-width: 100%;
}

.opd-form-section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid #edf1f4;
}

.opd-form-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    color: #087f8c;
    background: #e8f7f7;
    border-radius: 13px;
    font-size: 23px;
}

.opd-form-section-heading h2 {
    margin: 0;
    color: #18374c;
    font-size: 16px;
    font-weight: 750;
}

.opd-form-section-heading p {
    margin: 5px 0 0;
    color: #8292a0;
    font-size: 12px;
}

.opd-submit-button {
    min-width: 190px;
}

@media (max-width: 650px) {
    .opd-instructions {
        padding: 14px;
    }

    .opd-submit-button {
        min-width: 0;
    }
}

/* ===== Daily OPD Queue ===== */

.opd-queue-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.queue-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.queue-page-heading h1 {
    margin: 6px 0;
    color: #18374c;
    font-size: 27px;
    font-weight: 750;
    letter-spacing: -0.6px;
}

.queue-page-heading p {
    margin: 5px 0 0;
    color: #7a8b9b;
    font-size: 13px;
}

.queue-filter-card,
.queue-section-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4edf1;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(30, 65, 90, 0.035);
}

.queue-filter-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px 24px;
}

.queue-date-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: min(100%, 260px);
}

.queue-date-field label {
    color: #29465a;
    font-size: 12px;
    font-weight: 700;
}

.queue-date-field input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    color: #29465a;
    background: #fbfdfe;
    border: 1px solid #dce6ec;
    border-radius: 9px;
    font: inherit;
    font-size: 13px;
    box-sizing: border-box;
}

.queue-date-field input:focus {
    outline: none;
    border-color: #078b96;
    box-shadow: 0 0 0 3px rgba(7, 139, 150, 0.1);
}

.queue-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 17px;
    color: #fff;
    background: #087f8c;
    border: 1px solid #087f8c;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.queue-filter-button:hover {
    background: #066b76;
}

.queue-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 21px 24px;
    border-bottom: 1px solid #edf1f4;
}

.queue-section-heading h2 {
    margin: 0;
    color: #18374c;
    font-size: 17px;
    font-weight: 750;
}

.queue-section-heading p {
    margin: 5px 0 0;
    color: #8292a0;
    font-size: 12px;
}

.queue-total {
    padding: 7px 11px;
    color: #087f8c;
    background: #eaf8f8;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.opd-queue-table {
    min-width: 1000px;
}

.queue-doctor {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 130px;
    color: #29485d;
    font-weight: 650;
}

.queue-doctor-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    color: #087f8c;
    background: #e8f7f7;
    border-radius: 10px;
    font-size: 17px;
}

.queue-token {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 8px 10px;
    color: #176d9b;
    background: #edf6ff;
    border: 1px solid #dcecff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

.queue-patient-link {
    display: block;
    color: #087f8c;
    font-weight: 700;
    text-decoration: none;
}

.queue-patient-link:hover {
    text-decoration: underline;
}

.queue-patient-id {
    display: block;
    margin-top: 4px;
    color: #91a0ad;
    font-size: 10px;
}

.queue-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.queue-status > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.queue-status-waiting {
    color: #9a6a2b;
    background: #fff5e5;
}

.queue-status-waiting > span {
    background: #d99a38;
}

.queue-status-consulting {
    color: #176d9b;
    background: #edf6ff;
}

.queue-status-consulting > span {
    background: #3888c9;
}

.queue-status-completed {
    color: #18815b;
    background: #e9f8ef;
}

.queue-status-completed > span {
    background: #24a46d;
}

.queue-status-other {
    color: #6d5b98;
    background: #f2effb;
}

.queue-action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 150px;
}

.queue-action-links a,
.queue-fee-paid,
.queue-fee-collect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.queue-action-start {
    color: #176d9b;
    background: #edf6ff;
}

.queue-action-complete {
    color: #18815b;
    background: #e9f8ef;
}

.queue-action-reassign {
    color: #926328;
    background: #fff5e5;
}

.queue-fee-paid {
    color: #18815b;
    background: #e9f8ef;
}

.queue-fee-collect {
    color: #fff;
    background: #087f8c;
}

.queue-fee-collect:hover {
    background: #066b76;
}

.queue-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 42px 20px;
    text-align: center;
}

.queue-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    color: #087f8c;
    background: #eaf8f8;
    border-radius: 16px;
    font-size: 25px;
}

.queue-empty-state h3 {
    margin: 0;
    color: #25465b;
    font-size: 15px;
}

.queue-empty-state p {
    margin: 8px 0 18px;
    color: #8292a0;
    font-size: 12px;
}

@media (max-width: 650px) {
    .queue-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .queue-filter-form {
        align-items: stretch;
        flex-direction: column;
        padding: 17px;
    }

    .queue-date-field {
        width: 100%;
    }

    .queue-filter-button {
        width: 100%;
    }

    .queue-section-heading {
        padding: 17px;
    }
}

/* ===== Payment Receipt ===== */

.receipt-page {
    max-width: 1000px;
    margin: 0 auto;
}

.receipt-page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 24px;
}

.receipt-page-toolbar h1 {
    margin: 6px 0;
    color: #18374c;
    font-size: 27px;
    font-weight: 750;
}

.receipt-page-toolbar p {
    margin: 5px 0 0;
    color: #7a8b9b;
    font-size: 13px;
}

.receipt-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.receipt-print-button,
.receipt-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 41px;
    padding: 10px 15px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.receipt-print-button {
    color: #fff;
    background: #087f8c;
    border: 1px solid #087f8c;
}

.receipt-print-button:hover {
    background: #066b76;
}

.receipt-back-button {
    color: #526b7c;
    background: #fff;
    border: 1px solid #dce6ec;
}

.receipt-paper {
    padding: 36px;
    background: #fff;
    border: 1px solid #e4edf1;
    border-radius: 16px;
    box-shadow: 0 5px 24px rgba(30, 65, 90, 0.05);
}

.receipt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e8f0f3;
}

.receipt-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.receipt-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: #fff;
    background: #087f8c;
    border-radius: 14px;
    font-size: 27px;
    font-weight: 800;
}

.receipt-brand h2 {
    margin: 0;
    color: #18374c;
    font-size: 21px;
    font-weight: 800;
}

.receipt-brand p {
    margin: 5px 0 0;
    color: #8292a0;
    font-size: 11px;
}

.receipt-document-label {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
}

.receipt-document-label span {
    color: #087f8c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.receipt-document-label strong {
    color: #29485d;
    font-size: 14px;
}

.receipt-success-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 23px 0;
    padding: 15px 17px;
    background: #eff9f3;
    border: 1px solid #d9eee1;
    border-radius: 11px;
}

.receipt-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    color: #18815b;
    background: #d9f1e2;
    border-radius: 50%;
    font-weight: 800;
}

.receipt-success-banner strong {
    display: block;
    color: #176d4c;
    font-size: 13px;
}

.receipt-success-banner p {
    margin: 4px 0 0;
    color: #59816c;
    font-size: 11px;
}

.receipt-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 30px;
}

.receipt-detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 17px 0;
    border-bottom: 1px solid #edf1f4;
    min-width: 0;
}

.receipt-detail-item > span,
.receipt-additional-details span {
    color: #8292a0;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.65px;
}

.receipt-detail-item > strong {
    overflow-wrap: anywhere;
    color: #29485d;
    font-size: 13px;
    font-weight: 700;
}

.receipt-token {
    color: #176d9b !important;
}

.receipt-amount-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding: 23px;
    background: #f0f9fa;
    border: 1px solid #d8edef;
    border-radius: 12px;
}

.receipt-amount-panel span {
    color: #087f8c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.65px;
}

.receipt-amount-panel p {
    margin: 6px 0 0;
    color: #698493;
    font-size: 12px;
}

.receipt-amount-panel > strong {
    color: #087f8c;
    font-size: 28px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.receipt-additional-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.receipt-additional-details > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.receipt-additional-details strong {
    color: #29485d;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.receipt-additional-details p {
    margin: 0;
    color: #526b7c;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.receipt-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px dashed #d8e3e9;
    text-align: center;
}

.receipt-footer p {
    margin: 0 0 6px;
    color: #29485d;
    font-size: 12px;
    font-weight: 700;
}

.receipt-footer span {
    color: #8292a0;
    font-size: 10px;
}

@media (max-width: 600px) {
    .receipt-paper {
        padding: 22px 17px;
    }

    .receipt-details-grid,
    .receipt-additional-details {
        grid-template-columns: minmax(0, 1fr);
    }

    .receipt-document-label {
        align-items: flex-start;
    }

    .receipt-amount-panel {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .receipt-amount-panel > strong {
        font-size: 25px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        background: #fff !important;
    }

    .sidebar,
    .topbar,
    .receipt-page-toolbar,
    .app-sidebar,
    .app-topbar,
    nav {
        display: none !important;
    }

    .main-content,
    .main-area,
    .content,
    .receipt-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .receipt-paper {
        padding: 10mm !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .receipt-success-banner,
    .receipt-amount-panel,
    .receipt-brand-icon {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}