@import url('app-components.css');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    color: #102039;
    background: #f6f8fd;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

.duty-date-display input[type="date"] {
    max-width: 150px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 13px;
}

* {
    box-sizing: border-box;
}

.auth-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 16px;
}

.dashboard-page {
    font-family: 'Inter', sans-serif;
}

.sidebar-shell {
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
}

.sidebar-footer {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: #ffffff;
}

.login-error {
    color: #ef4444;
    margin-bottom: 10px;
}

.symptom-bar {
    width: var(--symptom-width);
}

.login-panel {
    width: min(100%, 510px);
    min-height: 614px;
    padding: 38px 38px 34px;
    border: 1px solid #edf0f6;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 12px 38px rgba(23, 47, 91, 0.045);
}

.brand {
    text-align: center;
}

.brand-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    display: block;
    object-fit: contain;
}

.brand h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
}

.brand p {
    margin: 2px 0 26px;
    color: #50596c;
    font-size: 14px;
}

.contactless-button,
.sign-in-button {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.contactless-button {
    color: #12223c;
    background: #eef3ff;
    border-color: #e4ebff;
}

.contactless-button:hover {
    background: #e6edff;
}

.contactless-button svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: #064bdc;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.status-message {
    min-height: 18px;
    margin: 8px 0 0;
    color: #475675;
    font-size: 12px;
    text-align: center;
}

.status-message:empty {
    display: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 2px 0 20px;
    color: #3d4659;
    font-size: 13px;
    font-weight: 600;
}

.divider::before,
.divider::after {
    height: 1px;
    flex: 1;
    content: '';
    background: #e2e9f7;
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.input-wrap {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 14px;
    border: 1px solid #edf1fc;
    border-radius: 10px;
    background: #eef3ff;
    box-shadow: 0 1px 2px rgba(28, 46, 84, 0.04);
}

.input-wrap:focus-within {
    border-color: #86a8ff;
    box-shadow: 0 0 0 3px rgba(21, 81, 223, 0.1);
}

.input-wrap > svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    fill: none;
    stroke: #777f91;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.input-wrap input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    color: #172740;
    background: transparent;
    font: inherit;
    font-size: 16px;
}

.password-toggle {
    width: 28px;
    height: 34px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    color: #737c8f;
    background: transparent;
    cursor: pointer;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sign-in-button {
    min-height: 47px;
    margin-top: 1px;
    color: #fff;
    background: #1551df;
    box-shadow: 0 3px 5px rgba(15, 43, 95, 0.22);
}

.sign-in-button:hover {
    background: #1047cb;
}

.sign-in-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.support-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 37px;
    color: #454d60;
    font-size: 14px;
}

.support-links a {
    color: inherit;
    text-decoration: none;
}

.support-links a:hover {
    color: #1551df;
    text-decoration: underline;
}

.link-separator {
    font-size: 17px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(21, 81, 223, 0.35);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .auth-page {
        padding: 10px;
    }

    .login-panel {
        min-height: auto;
        padding: 32px 22px 28px;
    }

    .support-links {
        gap: 12px;
        margin-top: 30px;
        font-size: 13px;
    }
}

.nfc-login-panel {
    min-height: auto;
    padding-top: 30px;
}

.nfc-login-panel .brand p {
    margin-bottom: 16px;
}

.reader-status {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 auto;
    padding: 6px 11px;
    border: 1px solid #e5ebf6;
    border-radius: 20px;
    color: #394963;
    background: #fff;
    font-size: 12px;
}

.reader-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22a06b;
}

.scan-visual {
    position: relative;
    width: 170px;
    height: 170px;
    display: grid;
    place-items: center;
    margin: 18px auto 8px;
}

/* These rings give the badge a simple scanning effect. */
.scan-ring {
    position: absolute;
    width: 82px;
    height: 82px;
    border: 1px solid rgba(21, 81, 223, 0.28);
    border-radius: 50%;
    animation: scan-pulse 3s ease-out infinite;
}

.scan-ring-two {
    animation-delay: 1s;
}

.scan-ring-three {
    animation-delay: 2s;
}

@keyframes scan-pulse {
    0% {
        opacity: 0.75;
        transform: scale(0.8);
    }

    100% {
        opacity: 0;
        transform: scale(2);
    }
}

.scan-card {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid #d9e4fb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(30, 69, 137, 0.12);
}

.scan-card svg {
    width: 44px;
    height: 34px;
    stroke: #1551df;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.reader-heading {
    margin: 4px 0 7px;
    color: #102039;
    font-size: 18px;
    text-align: center;
}

.reader-instruction {
    max-width: 350px;
    margin: 0 auto;
    color: #58657b;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.reader-waiting {
    margin: 12px 0;
    color: #58657b;
    font-size: 13px;
    text-align: center;
}

.authorization-note {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid #e8edf6;
    border-radius: 9px;
    color: #475675;
    background: #f9fbff;
    font-size: 12px;
    line-height: 1.45;
}

.profile-page-shell {
    width: 100%;
}

.profile-card {
    border: 1px solid #e7edf8;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.profile-card__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
}

.profile-card__content--compact {
    padding: 18px 20px;
}

.profile-card__identity {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.profile-avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.profile-avatar--blue {
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
}

.profile-meta {
    min-width: 0;
}

.profile-name {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.8rem, 2.2vw, 2.4rem);
    font-weight: 800;
    line-height: 1.1;
}

.profile-name--sm {
    font-size: clamp(2rem, 2.6vw, 2.4rem);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edf7ee;
    color: #168657;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.profile-card__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s ease;
    cursor: pointer;
}

.control-button--secondary {
    color: #1d4ed8;
    border-color: #d7e6ff;
    background: #f4f8ff;
}

.control-button--secondary:hover {
    background: #eaf2ff;
}

.control-button--primary {
    color: #ffffff;
    background: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.control-button--primary:hover {
    background: #1d4ed8;
}

.alert-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 18px;
    border: 1px solid #f8c9c9;
    border-radius: 12px;
    background: #fff8f8;
    color: #b42318;
    font-size: 14px;
    font-weight: 600;
}

.alert-banner__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(220, 38, 38, 0.08);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.alert-banner__button {
    margin-left: auto;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.tab-list {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
    border: 1px solid #e5edf7;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.03);
}

.tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.tab-button--active {
    color: #1d4ed8;
    background: #edf5ff;
}

.record-panel {
    border: 1px solid #e7edf8;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.record-panel__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid #edf2fb;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
}

.record-panel__heading i {
    color: #2563eb;
}

.record-panel__heading--compact {
    justify-content: space-between;
    gap: 12px;
}

.record-panel__link {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding: 18px 20px 20px;
}

.info-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 132px;
    padding: 18px 16px;
    border: 1px solid #eaf0fb;
    border-radius: 14px;
    background: #f8fbff;
}

.info-card__label {
    color: #5b6b86;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.info-card strong {
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.info-card small {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.table-wrap {
    overflow-x: auto;
    padding: 0 0 8px;
}

.consultation-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 13px;
}

.consultation-table thead th {
    padding: 14px 18px;
    border-bottom: 1px solid #edf2fb;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
}

.consultation-table tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid #edf2fb;
    color: #334155;
    vertical-align: middle;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.status-tag--success {
    background: #ecfdf5;
    color: #047857;
}

.status-tag--warning {
    background: #fff7ed;
    color: #c2410c;
}

.status-tag--safe {
    background: #eff6ff;
    color: #1d4ed8;
}

.table-action {
    padding: 8px 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.breadcrumb-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

.medical-background-panel {
    border: 1px solid #e7edf8;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.medical-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
    padding: 18px 18px 12px;
}

.medical-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mini-panel {
    border: 1px solid #e7edf8;
    border-radius: 16px;
    background: #f8fbff;
    padding: 14px 16px 10px;
}

.mini-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.mini-panel__header--note {
    margin-bottom: 10px;
}

.mini-panel__title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mini-panel__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #edf5ff;
    color: #1d4ed8;
    font-size: 12px;
}

.mini-panel__header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
}

.mini-panel__action {
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 10px;
    cursor: pointer;
}

.mini-panel__action--upload {
    background: #f1f5ff;
}

.condition-list,
.immunization-list,
.document-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.condition-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 12px;
    border: 1px solid #e5edf9;
    border-radius: 12px;
    background: #fff;
}

.condition-item__text {
    min-width: 0;
}

.condition-item__label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.condition-meta {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.condition-detail {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.condition-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.condition-pill--blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.condition-pill--slate {
    background: #eff6ff;
    color: #475569;
}

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

.medication-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 98px;
    padding: 12px 10px;
    border: 1px solid #dfeafc;
    border-radius: 12px;
    background: #ffffff;
}

.medication-card__title {
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.medication-card__dosage {
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
}

.medication-card__desc {
    color: #64748b;
    font-size: 11px;
    line-height: 1.5;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 700;
}

.immunization-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border: 1px solid #e8edf8;
    border-radius: 10px;
    background: #fff;
}

.immunization-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eaf7ee;
    color: #15803d;
    font-size: 10px;
}

.immunization-name {
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.immunization-meta {
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
}

.document-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e5edf9;
    border-radius: 12px;
    background: #fff;
}

.document-item__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 14px;
}

.document-item__name {
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.document-item__meta {
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
}

.document-item__controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.document-item__controls button {
    width: 26px;
    height: 26px;
    border: 1px solid #dfeafc;
    border-radius: 7px;
    background: #f8fbff;
    color: #475569;
    cursor: pointer;
}

.storage-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 10px 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.manage-button {
    padding: 8px 14px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.note-panel {
    padding: 14px 16px 12px;
    border: 1px solid #e7edf8;
    border-radius: 16px;
    background: #fbfdff;
}

.note-panel p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.7;
}

.emergency-shell {
    border: 1px solid #e7edf8;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.emergency-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid #edf2fb;
    background: #f9fbff;
}

.emergency-header__left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.emergency-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #edf5ff;
    color: #1d4ed8;
    font-size: 12px;
}

.emergency-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
}

.emergency-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.secondary-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid #dbeafe;
    border-radius: 9px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.secondary-mini--outline {
    background: #ffffff;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 18px 18px 12px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e7edf8;
    border-radius: 16px;
    background: #f8fbff;
    overflow: hidden;
}

.contact-card--primary {
    background: #f4f8ff;
}

.contact-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid #edf2fb;
}

.contact-card__step {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #e0ecff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.contact-card__title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
}

.contact-card__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.contact-card__tag--secondary {
    background: #e0f2fe;
    color: #0369a1;
}

.contact-card__tag--proxy {
    background: #ede9fe;
    color: #6d28d9;
}

.contact-card__meta {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    background: #e6f9ee;
    color: #15803d;
    font-size: 10px;
    font-weight: 700;
}

.verification-badge--muted {
    background: #f1f5f9;
    color: #475569;
}

.contact-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 14px 0;
}

.contact-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
    color: #ffffff;
    font-size: 15px;
}

.contact-avatar--secondary {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}

.contact-avatar--proxy {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

.contact-name {
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.contact-role {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.contact-details div {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    line-height: 1.5;
}

.contact-details dt {
    min-width: 58px;
    color: #64748b;
    font-weight: 700;
}

.contact-details dd {
    margin: 0;
    flex: 1;
    color: #0f172a;
    font-weight: 600;
}

.contact-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 9px;
    background: #e8f8ee;
    color: #0f766e;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.contact-consent--muted {
    background: #eef2ff;
    color: #334155;
}

.contact-card__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px;
    margin-top: auto;
}

.action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
}

.action-pill--blue {
    background: #1d4ed8;
    color: #ffffff;
}

.action-pill--light {
    background: #ffffff;
    border-color: #dfeafc;
    color: #1d4ed8;
}

.protocol-panel {
    border: 1px solid #e7edf8;
    border-radius: 16px;
    background: #f9fbff;
}

.protocol-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #edf2fb;
}

.protocol-panel__title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.protocol-panel__review {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.protocol-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 18px 20px 20px;
}

.protocol-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
    padding: 14px 12px;
    border: 1px solid #e7edf8;
    border-radius: 12px;
    background: #ffffff;
}

.protocol-box--alert {
    border-color: #f8c9c9;
    background: #fff8f8;
}

.protocol-box__title {
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.protocol-box__body {
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.protocol-box__meta {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.protocol-box--alert .protocol-box__title,
.protocol-box--alert .protocol-box__body {
    color: #b42318;
}

.note-signature {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.consultation-wrapper {
    width: 100%;
    padding-bottom: 20px;
}

.consultation-panel {
    width: min(100%, 1180px);
    margin: 0 auto;
    border: 1px solid #e7edf8;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.consultation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid #edf2fb;
    background: #f8fbff;
}

.consultation-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.consultation-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #edf5ff;
    color: #1d4ed8;
    font-size: 14px;
}

.consultation-header__title {
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
}

.consultation-header__subtitle {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.consultation-header__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
}

.patient-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid #edf2fb;
    background: #fff;
}

.patient-summary__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.patient-summary__name {
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.2;
}

.patient-summary__detail-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.divider-dot {
    color: #94a3b8;
}

.status-pill--small {
    display: inline-flex;
    min-height: 22px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #1d4ed8;
    font-size: 10px;
}

.patient-summary__risk {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 10px 12px;
    border: 1px solid #f6c5c5;
    border-radius: 11px;
    background: #fff6f6;
    color: #b42318;
    font-size: 12px;
    font-weight: 700;
}

.risk-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 9px;
    background: rgba(239, 68, 68, 0.08);
    color: #b42318;
}

.risk-value {
    color: #0f172a;
}

.risk-severity {
    padding: 5px 8px;
    border-radius: 7px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-section {
    padding: 18px 20px 12px;
    border-bottom: 1px solid #edf2fb;
}

.form-section--secondary {
    background: rgba(248, 250, 252, 0.65);
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.section-title span {
    color: #0f172a;
    letter-spacing: 0.02em;
    text-transform: none;
    font-size: 13px;
}

.required-mark,
.section-meta {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.required-mark {
    color: #dc2626;
}

.section-meta--right {
    color: #1d4ed8;
}

.field-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-label {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #dfeafc;
    border-radius: 10px;
    background: #f8fbff;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.form-textarea {
    min-height: 110px;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.metric-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 114px;
    padding: 12px 12px 10px;
    border: 1px solid #e3ebf7;
    border-radius: 12px;
    background: #fff;
}

.metric-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.metric-value {
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.1;
}

.metric-value small {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
}

.metric-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.metric-state--normal {
    background: #e0f2fe;
    color: #0369a1;
}

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

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

.followup-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    accent-color: #1d4ed8;
}

.attending-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #dfeafc;
    border-radius: 12px;
    background: #ffffff;
}

.attending-box__label {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.attending-doc {
    display: flex;
    align-items: center;
    gap: 12px;
}

.attending-doc__avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.attending-doc__name {
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
}

.attending-doc__role {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.authorized-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #edf2fb;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
}

.checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8f9ee;
    color: #15803d;
    font-size: 10px;
}

.authorized-id {
    margin-left: auto;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 20px 20px;
    background: #ffffff;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.bottom-bar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.action-button--ghost {
    border-color: #dfeafc;
    background: #f8fbff;
    color: #1d4ed8;
}

.action-button--primary {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

@media (max-width: 960px) {
    .metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .two-column-fields,
    .medication-grid,
    .followup-grid,
    .contact-grid,
    .protocol-grid {
        grid-template-columns: 1fr;
    }

    .patient-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .patient-summary__risk {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .section-title-row,
    .consultation-header,
    .bottom-bar {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .patient-summary__meta {
        align-items: flex-start;
        flex-direction: column;
    }
    .patient-summary__name {
        font-size: 1.4rem;
    }
}

@media (max-width: 960px) {
    .profile-card__content {
        flex-direction: column;
        align-items: flex-start;
    }

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

@media (max-width: 640px) {
    .profile-card__content {
        padding: 18px 16px;
    }

    .profile-card__identity {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-card__actions {
        width: 100%;
    }

    .control-button {
        width: 100%;
    }

    .tab-list {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
    }

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

.authorization-note svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: #1551df;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.nfc-divider {
    margin: 18px 0 14px;
}

.nfc-back-link {
    text-decoration: none;
    text-align: center;
}

@media (max-width: 480px) {
    .nfc-login-panel {
        padding: 26px 20px 24px;
    }

    .scan-visual {
        width: 150px;
        height: 150px;
        margin-top: 14px;
    }

    .nfc-back-link {
        padding: 8px 12px;
        font-size: 13px;
    }
}

.document-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    color: #0f172a;
}

.document-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 14px;
    color: #94a3b8;
    font-size: 11px;
}

.document-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.document-breadcrumb a:hover {
    color: #2563eb;
}

.document-breadcrumb strong {
    color: #334155;
    font-weight: 700;
}

.document-patient-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 -6px 18px;
    padding: 0 6px 14px;
    border-bottom: 1px solid #e8edf6;
}

.document-patient-identity,
.document-patient-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.document-patient-identity {
    gap: 12px;
    min-width: 0;
}

.document-patient-identity .profile-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    font-size: 13px;
}

.document-patient-copy {
    min-width: 0;
}

.document-patient-name-row h1 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
}

.document-patient-copy p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 11px;
}

.document-id-chip,
.document-study-chip,
.document-status,
.document-target,
.document-count-chip,
.document-record-count {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.document-id-chip {
    padding: 4px 7px;
    background: #dbeafe;
    color: #1d4ed8;
}

.document-study-chip {
    padding: 4px 7px;
    background: #eff6ff;
    color: #475569;
}

.document-status {
    padding: 5px 9px;
    background: #eff6ff;
    color: #475569;
    white-space: nowrap;
}

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

.document-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 19px;
    font-weight: 800;
}

.document-heading p,
.document-panel-heading p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 11px;
}

.document-count-chip {
    gap: 6px;
    padding: 6px 9px;
    background: #eff6ff;
    color: #1d4ed8;
    white-space: nowrap;
}

.document-count-chip i {
    color: #0284c7;
    font-size: 6px;
}

.document-panel {
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid #e5ebf5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.035);
}

.document-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f3f8;
}

.document-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.document-panel-heading h3 {
    margin: 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
}

.document-panel-icon {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 9px;
    background: #eaf2ff;
    color: #1d4ed8;
    font-size: 13px;
}

.document-target {
    padding: 5px 8px;
    background: #f1f5f9;
    color: #64748b;
    white-space: nowrap;
}

.document-form {
    padding-top: 12px;
}

.document-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.document-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.document-field label {
    color: #334155;
    font-size: 10px;
    font-weight: 700;
}

.document-field label span {
    color: #dc2626;
}

.document-field input,
.document-field select {
    width: 100%;
    height: 38px;
    min-width: 0;
    padding: 0 10px;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 11px;
}

.document-field input:focus,
.document-field select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.document-file-input {
    display: none;
}

.file-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    min-height: 108px;
    padding: 15px;
    border: 1px dashed #c8d5ed;
    border-radius: 9px;
    background: #f1f5ff;
    color: #0f172a;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.file-drop-zone:hover,
.file-drop-zone--active {
    border-color: #3b82f6;
    background: #eaf2ff;
}

.file-drop-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-bottom: 2px;
    border-radius: 50%;
    background: #fff;
    color: #2563eb;
    font-size: 13px;
}

.file-drop-zone strong {
    font-size: 10px;
    font-weight: 700;
}

.file-drop-zone > span:last-child {
    color: #64748b;
    font-size: 9px;
}

.pending-file {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 9px;
    padding: 8px 10px;
    border: 1px solid #e1e9f6;
    border-radius: 9px;
    background: #f7f9ff;
}

.pending-file[hidden] {
    display: none;
}

.pending-file-icon,
.document-row-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 7px;
    background: #fee2e2;
    color: #ef4444;
    font-size: 12px;
}

.pending-file-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pending-file-copy strong {
    overflow: hidden;
    color: #1e293b;
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-file-copy span {
    color: #64748b;
    font-size: 9px;
}

.document-icon-button,
.document-row-action {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.document-icon-button:hover,
.document-row-action:hover {
    background: #eaf2ff;
    color: #1d4ed8;
}

.document-message,
.document-table-message {
    min-height: 0;
    margin: 7px 0 0;
    color: #15803d;
    font-size: 10px;
}

.document-message:empty,
.document-table-message:empty {
    display: none;
}

.document-message--error {
    color: #b42318;
}

.document-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.document-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.document-button--secondary {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.document-button--primary {
    background: #1d4ed8;
    color: #fff;
}

.document-button--primary:hover {
    background: #1e40af;
}

.uploaded-panel {
    padding-bottom: 10px;
}

.uploaded-heading {
    padding-bottom: 10px;
    border-bottom: 0;
}

.document-record-count {
    padding: 5px 8px;
    background: #f1f5f9;
    color: #64748b;
}

.document-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.document-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.document-table thead {
    background: #f8fafc;
}

.document-table th {
    padding: 9px 8px;
    color: #64748b;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.document-table td {
    padding: 8px;
    border-bottom: 1px solid #eef2f7;
    color: #475569;
    font-size: 9px;
    white-space: nowrap;
}

.document-table tbody tr:last-child td {
    border-bottom: 0;
}

.document-table tbody tr[hidden] {
    display: none;
}

.document-table-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
    font-weight: 700;
}

.document-row-icon {
    width: 23px;
    height: 23px;
    flex-basis: 23px;
    font-size: 10px;
}

.document-category-chip {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #1d4ed8;
    font-size: 8px;
    font-weight: 700;
}

.document-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
}

.document-row-action {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    color: #2563eb;
    font-size: 10px;
}

.document-row-action--delete {
    color: #dc2626;
}

.document-row-action--delete:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.document-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #eef2f7;
    color: #64748b;
    font-size: 9px;
}

.document-pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.document-pagination button,
.document-pagination span {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 24px;
    padding: 0 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 9px;
}

.document-pagination button {
    cursor: pointer;
}

.document-pagination button:not(:disabled):hover {
    background: #eaf2ff;
    color: #1d4ed8;
}

.document-pagination button:disabled {
    opacity: 0.45;
    cursor: default;
}

.document-pagination span[aria-current="page"] {
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

@media (max-width: 720px) {
    .document-patient-strip,
    .document-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .document-panel {
        padding: 14px 12px;
    }

    .document-table {
        min-width: 620px;
    }
}

@media (max-width: 520px) {
    .document-form-fields {
        grid-template-columns: 1fr;
    }

    .document-panel-heading {
        align-items: flex-start;
    }

    .document-target {
        white-space: normal;
    }

    .document-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .document-form-actions {
        width: 100%;
    }

    .document-button {
        flex: 1;
    }
}

.checkin-page {
    min-height: 100vh;
    background: #f5f7fc;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
}

.checkin-layout {
    display: flex;
    min-height: 100vh;
}

.checkin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex: 0 0 256px;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    align-self: flex-start;
    overflow-y: auto;
    padding: 20px 20px 0;
    background: #fff;
    border-right: 1px solid #e8edf5;
}

.checkin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    margin: 0 6px 18px;
    color: inherit;
    text-decoration: none;
}

.checkin-brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
}

.checkin-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.checkin-brand-copy {
    display: flex;
    flex-direction: column;
}

.checkin-brand-copy strong {
    color: #0f3f9e;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.checkin-brand-copy small {
    margin-top: 3px;
    color: #334155;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.checkin-navigation {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.checkin-nav-heading {
    margin: 2px 7px 5px;
    color: #334155;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.checkin-nav-heading--admin {
    margin-top: 15px;
}

.checkin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.checkin-nav-link i {
    width: 20px;
    color: #475569;
    font-size: 14px;
    text-align: center;
}

.checkin-nav-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .checkin-nav-link:hover {
        transform: scale(1.08);
    }
}

.checkin-nav-link--active,
.checkin-nav-link--active:hover {
    background: #1455d9;
    color: #fff;
}

.checkin-nav-link--active i,
.checkin-nav-link--active:hover i {
    color: #fff;
}

.checkin-nav-link--unavailable {
    width: 100%;
    border: 0;
    background: transparent;
    color: #334155;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.checkin-sidebar-profile {
    /* Profile picture is now part of the navigation flow */
}

.checkin-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin: 0 -20px 0;
    padding: 0 20px;
    border-top: 1px solid #e8edf5;
    background: #f0f4ff;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.checkin-main {
    min-width: 0;
    flex: 1;
}

.checkin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 0 32px;
    border-bottom: 1px solid #e9edf5;
    background: #fff;
}

.checkin-search {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(100%, 640px);
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #e6eaf1;
    border-radius: 8px;
    background: #f8faff;
    color: #64748b;
}

.checkin-search i {
    font-size: 14px;
}

.checkin-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
}

.checkin-search input::placeholder {
    color: #94a3b8;
}

.checkin-user {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
}

.checkin-user-copy {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.checkin-user-copy strong {
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
}

.checkin-user-copy small {
    color: #64748b;
    font-size: 11px;
}

.checkin-user-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0e45b6;
    color: #fff;
    font-size: 14px;
}

.checkin-content {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 0 32px 32px;
}

.checkin-page-title {
    margin: 0;
    padding: 0 0 22px;
    color: #10233d;
    font-size: 24px;
    font-weight: 700;
}

.checkin-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.checkin-scan-panel,
.current-student-panel,
.recent-checkins-panel {
    border: 1px solid #e8edf5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 13px rgba(15, 23, 42, 0.025);
}

.checkin-scan-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 280px;
    padding: 30px;
}

.scan-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: center;
    cursor: pointer;
}

.scan-symbol {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: #e7efff;
    color: #0d4ac4;
    font-size: 30px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.scan-symbol i {
    transform: rotate(90deg);
}

.scan-trigger:hover .scan-symbol {
    transform: scale(1.04);
    background: #dce8ff;
}

.scan-trigger--complete .scan-symbol {
    background: #dcfce7;
    color: #15803d;
}

.scan-trigger:disabled {
    cursor: default;
}

.scan-heading {
    color: #10233d;
    font-size: 16px;
    font-weight: 700;
}

.scan-instruction {
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
}

.scan-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #edf4ff;
    color: #1648b5;
    font-size: 11px;
    font-weight: 700;
}

.scan-status i {
    font-size: 7px;
}

[data-theme="dark"] .scan-status {
    background: #1e3a5f;
    color: #a5c8ff;
}

.scan-separator {
    width: 100%;
    margin: 16px 0 12px;
    border-top: 1px solid #e9edf4;
}

.manual-search-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 42px;
    border-radius: 6px;
    background: #eaf1ff;
    color: #10233d;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.manual-search-link:hover {
    background: #dce8ff;
}

.current-student-panel {
    min-height: 280px;
    padding: 24px;
}

.current-student-panel h2,
.recent-checkins-panel h2 {
    margin: 0 0 16px;
    color: #10233d;
    font-size: 16px;
    font-weight: 700;
}

.current-student-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    padding: 12px;
    border-radius: 8px;
    background: #eff4ff;
}

.student-avatar {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 7px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 16px;
    font-weight: 800;
}

.student-avatar--rose {
    background: #ffe4e6;
    color: #be123c;
}

.current-student-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.current-student-details strong {
    overflow: hidden;
    color: #10233d;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-student-details span {
    margin-top: 2px;
    color: #475569;
    font-family: monospace;
    font-size: 12px;
}

.current-student-details small {
    margin-top: 2px;
    color: #1d4ed8;
    font-size: 12px;
}

.view-student-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 9px;
    min-width: 128px;
    min-height: 42px;
    margin-top: 12px;
    padding: 0 16px;
    border-radius: 6px;
    background: #1048bb;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.view-student-profile:hover {
    background: #0d3b9d;
}

.recent-checkins-panel {
    padding: 20px;
}

.recent-checkins-panel h2 {
    margin-bottom: 14px;
}

.checkins-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.checkins-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.checkins-table thead {
    background: #edf2ff;
}

.checkins-table th {
    padding: 10px 12px;
    color: #334155;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.checkins-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f6;
    color: #334155;
    font-size: 12px;
}

.checkins-table tbody tr:last-child td {
    border-bottom: 0;
}

.checkins-table td:nth-child(2) a {
    color: #1648b5;
    font-family: monospace;
    font-weight: 700;
    text-decoration: none;
}

.checkins-table td:nth-child(2) a:hover {
    text-decoration: underline;
}

.checkins-table .checkins-action-heading,
.checkins-table .checkins-action-cell {
    text-align: right;
    white-space: nowrap;
}

.checkin-consultation-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: 6px;
    background: #1648b5;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.checkin-consultation-link:hover,
.checkin-consultation-link:focus-visible {
    background: #0d3b9d;
    color: #fff;
}

.checkin-message {
    margin: 10px 0 0;
    color: #15803d;
    font-size: 12px;
}

.checkin-message:empty {
    display: none;
}

@media (max-width: 820px) {
    .checkin-sidebar {
        flex-basis: 220px;
    }

    .checkin-content {
        padding-right: 16px;
        padding-left: 16px;
    }

    .checkin-topbar {
        padding-right: 16px;
        padding-left: 16px;
    }
}

@media (max-width: 767px) {
    .checkin-layout {
        flex-direction: column;
    }

    .checkin-sidebar {
        position: static;
        height: auto;
        min-height: auto;
        align-self: stretch;
        overflow: visible;
        padding: 14px 16px 0;
        border-right: 0;
        border-bottom: 1px solid #e8edf5;
    }

    .checkin-brand {
        margin: 0 4px 14px;
    }

    .checkin-navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .checkin-nav-heading,
    .checkin-nav-heading--admin {
        grid-column: 1 / -1;
        margin: 8px 5px 2px;
    }

    .checkin-nav-link {
        min-width: 0;
    }

    .checkin-logout {
        min-height: 42px;
        margin: 12px -16px 0;
        border-top: 1px solid #e8edf5;
    }

    .checkin-topbar {
        min-height: 64px;
        padding: 0 16px;
    }

    .checkin-user-copy {
        display: none;
    }

    .checkin-content {
        padding: 0 16px 24px;
    }

    .checkin-page-title {
        padding: 18px 0;
        font-size: 21px;
    }

    .checkin-panels {
        grid-template-columns: 1fr;
    }

    .checkin-scan-panel,
    .current-student-panel {
        min-height: 0;
    }
}

.reports-page {
    min-height: 100vh;
    background: #f6f8fd;
    color: #102039;
}

.reports-layout {
    display: flex;
    min-height: 100vh;
}

.reports-main {
    min-width: 0;
    flex: 1;
}

.reports-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 0 30px;
    border-bottom: 1px solid #e8edf5;
    background: #fff;
}

.reports-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 520px);
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8faff;
    color: #64748b;
}

.reports-search i {
    font-size: 13px;
}

.reports-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #102039;
    font: inherit;
    font-size: 13px;
}

.reports-search input::placeholder {
    color: #94a3b8;
}

.reports-user-tools {
    display: flex;
    align-items: center;
    gap: 11px;
}

.reports-notification {
    position: relative;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font-size: 14px;
    cursor: pointer;
}

.reports-notification:hover {
    background: #f1f5f9;
}

.reports-notification span {
    position: absolute;
    top: 6px;
    right: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
}

.reports-user-copy {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.reports-user-copy strong {
    color: #102039;
    font-size: 12px;
    font-weight: 700;
}

.reports-user-copy small {
    color: #64748b;
    font-size: 10px;
}

.reports-user-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0e45b6;
    color: #fff;
    font-size: 13px;
}

.reports-content {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 26px 30px 20px;
}

.reports-titlebar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.reports-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.reports-title-row h1 {
    margin: 0;
    color: #102039;
    font-size: 25px;
    font-weight: 800;
}

.reports-titlebar > div:first-child > p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
}

.reports-data-badge {
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.reports-export-actions {
    display: flex;
    gap: 8px;
}

.report-toolbar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid #dce5f3;
    border-radius: 7px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.report-toolbar-button:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.reports-filter-panel {
    display: grid;
    grid-template-columns: 0.9fr 0.9fr 1.4fr 1.3fr auto;
    align-items: end;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e4eaf3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.025);
}

.report-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.report-filter-field label {
    color: #475569;
    font-size: 10px;
    font-weight: 700;
}

.report-filter-field input,
.report-filter-field select {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 9px;
    border: 1px solid #dce4ef;
    border-radius: 7px;
    outline: 0;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 11px;
}

.report-filter-field input:focus,
.report-filter-field select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.report-generate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    border-radius: 7px;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.report-generate-button:hover {
    background: #1d4ed8;
}

.report-status {
    min-height: 0;
    margin: 0;
    color: #15803d;
    font-size: 11px;
}

.report-status:not(:empty) {
    margin-top: 8px;
}

.report-status--error {
    color: #b42318;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.report-summary-card,
.report-distribution-panel {
    min-width: 0;
    border: 1px solid #e5ebf4;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.report-summary-card {
    min-height: 190px;
    padding: 16px;
}

.report-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.report-card-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
}

.report-card-icon--cyan {
    border-color: #dbeafe;
    background: #eff6ff;
    color: #0284c7;
}

.report-card-icon--indigo {
    border-color: #e0e7ff;
    background: #eef2ff;
    color: #4f46e5;
}

.report-change {
    padding: 4px 7px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 9px;
    font-weight: 800;
}

.report-card-label {
    margin: 13px 0 3px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.report-total-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
}

.report-total-value strong {
    color: #102039;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.report-total-value span {
    color: #64748b;
    font-size: 10px;
}

.report-sparkline {
    display: flex;
    align-items: end;
    justify-content: space-between;
    height: 34px;
    margin-top: 10px;
    border-bottom: 1px solid #e5edf8;
    background: linear-gradient(165deg, transparent 45%, rgba(59, 130, 246, 0.09) 46%, rgba(59, 130, 246, 0.02) 100%);
}

.report-sparkline span {
    width: 9%;
    border-top: 2px solid #2563eb;
}

.report-sparkline span:nth-child(1) { height: 20%; }
.report-sparkline span:nth-child(2) { height: 29%; }
.report-sparkline span:nth-child(3) { height: 36%; }
.report-sparkline span:nth-child(4) { height: 32%; }
.report-sparkline span:nth-child(5) { height: 52%; }
.report-sparkline span:nth-child(6) { height: 58%; }
.report-sparkline span:nth-child(7) { height: 74%; }
.report-sparkline span:nth-child(8) { height: 96%; }

.report-sparkline-labels {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    margin-top: 5px;
    color: #64748b;
    font-size: 8px;
}

.report-small-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
}

.report-complaint-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}

.report-complaint-copy {
    min-width: 0;
}

.report-complaint-copy h2 {
    margin: 0;
    color: #102039;
    font-size: 14px;
    font-weight: 800;
}

.report-complaint-copy p {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0 0;
    color: #64748b;
    font-size: 10px;
}

.report-complaint-copy p strong {
    color: #334155;
}

.report-donut {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    border-radius: 50%;
    background: conic-gradient(#2563eb 0 34%, #06b6d4 34% 61%, #e2e8f0 61% 100%);
}

.report-donut > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
}

.report-donut strong {
    color: #102039;
    font-size: 13px;
    font-weight: 800;
}

.report-donut small {
    color: #64748b;
    font-size: 7px;
    font-weight: 700;
}

.report-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 10px;
    margin-top: 12px;
    color: #475569;
    font-size: 8px;
}

.report-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.report-legend b {
    margin-left: auto;
    color: #334155;
}

.legend-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
}

.legend-dot--blue { background: #2563eb; }
.legend-dot--cyan { background: #06b6d4; }
.legend-dot--pale { background: #cbd5e1; }

.report-referral-tag {
    padding: 5px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 9px;
    font-weight: 700;
}

.report-referrals-card .report-card-label {
    margin-top: 13px;
}

.report-referral-note {
    margin: 5px 0 7px;
    color: #475569;
    font-size: 10px;
}

.report-referral-note span {
    color: #64748b;
}

.report-referral-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.report-referral-bar span {
    display: block;
    width: 3.5%;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
}

.report-referral-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: #64748b;
    font-size: 8px;
}

.report-referral-footer span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.report-referral-footer b {
    color: #334155;
    font-size: 9px;
}

.report-distribution-panel {
    margin-top: 16px;
    padding: 17px;
}

.report-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 13px;
}

.report-panel-heading h2 {
    margin: 0;
    color: #102039;
    font-size: 16px;
    font-weight: 800;
}

.report-panel-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 10px;
}

.report-table-badge {
    padding: 5px 8px;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    background: #f8fbff;
    color: #2563eb;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.report-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.report-table thead {
    background: #f8fafc;
}

.report-table th {
    padding: 10px 9px;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.report-table td {
    padding: 10px 9px;
    border-bottom: 1px solid #edf1f6;
    color: #475569;
    font-size: 10px;
}

.report-table tbody tr:last-child td {
    border-bottom: 0;
}

.report-diagnosis-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
}

.report-diagnosis-name strong {
    font-size: 10px;
    font-weight: 700;
}

.report-diagnosis-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #2563eb;
}

.report-table tbody tr:nth-child(even) .report-diagnosis-dot {
    background: #60a5fa;
}

.report-case-count {
    color: #1e293b !important;
    font-weight: 800;
    text-align: right;
}

.report-share-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}

.report-share-pill {
    min-width: 34px;
    padding: 4px 6px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}

.report-share-bar {
    display: block;
    width: 52px;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.report-share-bar::after {
    display: block;
    width: 34%;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
    content: '';
}

.report-share-bar[data-percent="27"]::after { width: 27%; }
.report-share-bar[data-percent="16"]::after { width: 16%; }
.report-share-bar[data-percent="14"]::after { width: 14%; }
.report-share-bar[data-percent="12"]::after { width: 12%; }
.report-share-bar[data-percent="8"]::after { width: 8%; }
.report-share-bar[data-percent="7"]::after { width: 7%; }
.report-share-bar[data-percent="5"]::after { width: 5%; }
.report-share-bar[data-percent="3"]::after { width: 3%; }
.report-share-bar[data-percent="2"]::after { width: 2%; }

.report-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    color: #64748b;
    font-size: 10px;
}

.report-pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.report-pagination button,
.report-pagination span {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 26px;
    padding: 0 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 9px;
}

.report-pagination button {
    cursor: pointer;
}

.report-pagination button:not(:disabled):hover {
    background: #eff6ff;
    color: #2563eb;
}

.report-pagination button:disabled {
    opacity: 0.45;
    cursor: default;
}

.report-pagination span[aria-current="page"] {
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

.reports-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 0 0;
    color: #64748b;
    font-size: 9px;
}

.reports-footer span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.reports-footer span:first-child i {
    color: #2563eb;
}

.reports-footer span:last-child i {
    color: #0ea5e9;
    font-size: 6px;
}

@media (max-width: 1100px) {
    .reports-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-generate-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .reports-layout {
        flex-direction: column;
    }

    .reports-topbar {
        min-height: 64px;
        padding: 0 16px;
    }

    .reports-content {
        padding: 20px 16px;
    }

    .reports-titlebar {
        flex-direction: column;
    }

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

    .report-summary-card {
        min-height: 0;
    }

    .report-table {
        min-width: 720px;
    }

    .reports-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .reports-user-copy {
        display: none;
    }

    .reports-filter-panel {
        grid-template-columns: 1fr;
    }

    .report-generate-button {
        grid-column: auto;
    }

    .reports-export-actions {
        width: 100%;
    }

    .report-toolbar-button {
        flex: 1;
    }

    .report-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media print {
    .reports-page {
        background: #fff;
    }

    .reports-page .checkin-sidebar,
    .reports-topbar,
    .reports-export-actions,
    .reports-filter-panel,
    .report-pagination {
        display: none !important;
    }

    .reports-content {
        width: 100%;
        padding: 0;
    }

    .reports-layout {
        display: block;
    }

    .report-summary-card,
    .report-distribution-panel {
        break-inside: avoid;
        box-shadow: none;
    }
}

.duty-page {
    min-height: 100vh;
    background: #f6f8fd;
    color: #102039;
}

.duty-layout {
    display: flex;
    min-height: 100vh;
}

.duty-main {
    min-width: 0;
    flex: 1;
}

.duty-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 0 30px;
    border-bottom: 1px solid #e8edf5;
    background: #fff;
}

.duty-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 520px);
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8faff;
    color: #64748b;
}

.duty-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #102039;
    font: inherit;
    font-size: 13px;
}

.duty-search input::placeholder {
    color: #94a3b8;
}

.duty-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.duty-user div {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.duty-user strong {
    color: #102039;
    font-size: 12px;
    font-weight: 700;
}

.duty-user small {
    color: #64748b;
    font-size: 12px;
}

.duty-user > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0e45b6;
    color: #fff;
    font-size: 13px;
}

.duty-content {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 25px 30px 30px;
}

.duty-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.duty-titlebar h1 {
    margin: 0;
    color: #102039;
    font-size: 25px;
    font-weight: 800;
}

.duty-titlebar p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
}

.duty-primary-button,
.duty-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.duty-primary-button {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.16);
}

.duty-primary-button:hover {
    background: #1d4ed8;
}

.duty-primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.duty-secondary-button {
    border-color: #dce5f3;
    background: #fff;
    color: #2563eb;
}

.duty-secondary-button:hover {
    background: #f8fbff;
}

.duty-datebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 52px;
    margin-bottom: 14px;
    padding: 7px 10px;
    border: 1px solid #e3eaf4;
    border-radius: 9px;
    background: #fff;
}

.duty-date-controls,
.duty-date-display,
.duty-datebar-right {
    display: flex;
    align-items: center;
    gap: 9px;
}

.duty-date-controls > button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.duty-date-controls > button:hover {
    background: #eff6ff;
    color: #2563eb;
}

.duty-date-display {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #e6edf7;
    border-radius: 7px;
    color: #1d4ed8;
}

.duty-date-display strong {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.duty-date-display button {
    padding: 4px 7px;
    border: 0;
    border-radius: 5px;
    background: #dbeafe;
    color: #1d4ed8;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.duty-roster-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
}

.duty-roster-status i {
    color: #10b981;
    font-size: 7px;
}

.duty-roster-status strong {
    color: #334155;
    font-weight: 700;
}

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

.duty-stat-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    min-height: 84px;
    padding: 13px 15px;
    border: 1px solid #e5ebf4;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.025);
}

.duty-stat-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid #dbeafe;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 15px;
}

.duty-stat-icon--violet {
    border-color: #e0e7ff;
    background: #eef2ff;
    color: #4f46e5;
}

.duty-stat-icon--blue {
    background: #f1f5ff;
    color: #1d4ed8;
}

.duty-stat-card p {
    margin: 0 0 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.duty-stat-card strong,
.duty-stat-card small {
    display: block;
}

.duty-stat-card strong {
    color: #102039;
    font-size: 16px;
    font-weight: 800;
}

.duty-stat-card small {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
}

.duty-roster-panel {
    overflow: hidden;
    border: 1px solid #e4eaf3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.duty-roster-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 9px 14px;
    border-bottom: 1px solid #edf1f6;
}

.duty-shift-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 7px;
    background: #f1f5f9;
}

.duty-shift-tab {
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.duty-shift-tab:hover {
    color: #1d4ed8;
}

.duty-shift-tab--active,
.duty-shift-tab--active:hover {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.18);
}

.duty-roster-count {
    color: #64748b;
    font-size: 12px;
}

.duty-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.duty-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.duty-table thead {
    background: #f8fafc;
}

.duty-table th {
    padding: 10px 12px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.duty-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f6;
    color: #475569;
    font-size: 13px;
    white-space: nowrap;
}

.duty-table tbody tr:last-child td {
    border-bottom: 0;
}

.duty-staff-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}

.duty-avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: #dbeafe;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
}

.duty-avatar--nurse {
    background: #e0f2fe;
    color: #0284c7;
}

.duty-staff-copy,
.duty-time-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.duty-staff-copy strong,
.duty-time-copy strong {
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
}

.duty-staff-copy small,
.duty-time-copy small {
    color: #64748b;
    font-size: 11px;
}

.duty-status-pill {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.duty-status-pill--on {
    background: #dbeafe;
    color: #1d4ed8;
}

.duty-status-pill--off {
    background: #f1f5f9;
    color: #475569;
}

.duty-status-pill--completed {
    background: #dcfce7;
    color: #15803d;
}

.live-update-notice {
    position: fixed;
    z-index: 1000;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(540px, calc(100vw - 40px));
    padding: 12px 15px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    color: #1e3a8a;
    font-size: 13px;
}

.live-update-notice[hidden] {
    display: none;
}

.live-update-notice[data-error="true"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.live-update-notice__button {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 0;
    border-radius: 6px;
    background: #1d4ed8;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.live-update-notice__button:hover {
    background: #1e40af;
}

.duty-row-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.duty-row-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 3px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.duty-row-action:hover {
    color: #2563eb;
}

.duty-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 7px 14px;
    border-top: 1px solid #edf1f6;
    color: #64748b;
    font-size: 11px;
}

.duty-pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.duty-pagination button,
.duty-pagination a,
.duty-pagination span {
    display: inline-grid;
    place-items: center;
    min-height: 27px;
    padding: 0 9px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font: inherit;
    font-size: 11px;
}

.duty-pagination button,
.duty-pagination a {
    cursor: pointer;
}

.duty-pagination button:not(:disabled):hover,
.duty-pagination a:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
}

.duty-pagination button:disabled {
    opacity: 0.45;
    cursor: default;
}

.duty-pagination span[aria-current="page"] {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

.duty-message {
    min-height: 0;
    margin: 0;
    color: #15803d;
    font-size: 13px;
}

.duty-message:not(:empty) {
    margin-top: 9px;
}

.duty-message--error {
    color: #b42318;
}

.duty-dialog {
    width: min(100% - 32px, 520px);
    max-width: 520px;
    max-height: min(90vh, 760px);
    padding: 0;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #102039;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.duty-dialog::backdrop {
    background: rgba(15, 23, 42, 0.38);
}

.duty-dialog-form {
    padding: 20px;
}

.duty-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf1f6;
}

.duty-dialog-header h2 {
    margin: 0;
    color: #102039;
    font-size: 18px;
    font-weight: 800;
}

.duty-dialog-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.duty-dialog-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
}

.duty-dialog-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    padding-top: 16px;
}

.duty-dialog-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.duty-dialog-field--wide {
    grid-column: 1 / -1;
}

.duty-dialog-field label {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.duty-dialog-field input,
.duty-dialog-field select {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #dce4ef;
    border-radius: 7px;
    outline: 0;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 14px;
}

.duty-dialog-field input:focus,
.duty-dialog-field select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.duty-dialog-field input[readonly] {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.duty-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 17px;
    border-top: 1px solid #edf1f6;
}

.duty-form-message {
    margin: 10px 0 0;
    color: #b42318;
    font-size: 13px;
}

.duty-month-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-top: 16px;
}

.duty-month-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.duty-month-card span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.duty-month-card strong {
    color: #102039;
    font-size: 15px;
}

.duty-page .activity-table-footer {
    font-size: 12px;
}

.duty-page .activity-pagination button,
.duty-page .activity-pagination a,
.duty-page .activity-pagination span,
.duty-page .activity-page-jump label {
    font-size: 12px;
}

@media (max-width: 980px) {
    .duty-content {
        padding-right: 20px;
        padding-left: 20px;
    }

    .duty-datebar {
        align-items: flex-start;
        flex-direction: column;
    }

    .duty-datebar-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 767px) {
    .duty-layout {
        flex-direction: column;
    }

    .duty-topbar {
        min-height: 64px;
        padding: 0 16px;
    }

    .duty-content {
        padding: 20px 16px 24px;
    }

    .duty-titlebar {
        align-items: flex-start;
        flex-direction: column;
    }

    .duty-stat-grid {
        grid-template-columns: 1fr;
    }

    .duty-roster-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .duty-table {
        min-width: 800px;
    }
}

@media (max-width: 520px) {
    .duty-user div {
        display: none;
    }

    .duty-content {
        padding-right: 12px;
        padding-left: 12px;
    }

    .duty-date-controls,
    .duty-datebar-right {
        width: 100%;
    }

    .duty-date-controls {
        justify-content: space-between;
    }

    .duty-date-display {
        min-width: 0;
        gap: 6px;
        padding: 0 7px;
    }

    .duty-date-display strong {
        font-size: 12px;
    }

    .duty-roster-status {
        flex-wrap: wrap;
    }

    .duty-shift-tabs {
        width: 100%;
    }

    .duty-shift-tab {
        flex: 1;
        padding: 0 5px;
        font-size: 11px;
    }

    .duty-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .duty-month-grid,
    .duty-dialog-fields {
        grid-template-columns: 1fr;
    }

    .duty-dialog-field--wide {
        grid-column: auto;
    }
}

.user-accounts-page {
    min-height: 100vh;
    background: #f6f8fd;
    color: #102039;
}

.user-accounts-layout {
    display: flex;
    min-height: 100vh;
}

.user-accounts-main {
    min-width: 0;
    flex: 1;
}

.account-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 0 30px;
    border-bottom: 1px solid #e8edf5;
    background: #fff;
}

.account-global-search,
.account-directory-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 520px);
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8faff;
    color: #64748b;
}

.account-global-search input,
.account-directory-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #102039;
    font: inherit;
    font-size: 15px;
}

.account-global-search input::placeholder,
.account-directory-search input::placeholder {
    color: #94a3b8;
}

.account-current-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.account-current-user div {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.account-current-user strong {
    color: #102039;
    font-size: 14px;
    font-weight: 700;
}

.account-current-user small {
    color: #64748b;
    font-size: 12px;
}

.account-current-user > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0e45b6;
    color: #fff;
    font-size: 13px;
}

.user-accounts-content {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 25px 30px 30px;
}

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

.account-page-heading h1 {
    margin: 0;
    color: #102039;
    font-size: 25px;
    font-weight: 800;
}

.account-page-heading p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 15px;
}

.account-primary-button,
.account-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.account-primary-button {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.16);
}

.account-primary-button:hover {
    background: #1d4ed8;
}

.account-secondary-button {
    border-color: #dce5f3;
    background: #fff;
    color: #475569;
}

.account-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 16px;
}

.account-metric-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    min-height: 122px;
    padding: 17px;
    border: 1px solid #e5ebf4;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.account-metric-card p {
    margin: 0 0 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.account-metric-card strong {
    display: block;
    color: #102039;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.account-metric-card small {
    display: block;
    max-width: 150px;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.account-metric-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 16px;
}

.account-metric-icon--red {
    background: #fee2e2;
    color: #dc2626;
}

.account-metric-icon--violet {
    background: #e0e7ff;
    color: #4f46e5;
}

.account-metric-icon--cyan {
    background: #e0f2fe;
    color: #0284c7;
}

.account-directory-panel {
    overflow: hidden;
    border: 1px solid #e5ebf4;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.account-directory-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.45fr) minmax(140px, 0.45fr);
    gap: 10px;
    padding: 13px;
    border-bottom: 1px solid #eef2f7;
}

.account-directory-search {
    width: 100%;
    min-height: 38px;
}

.account-filter-select select {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    outline: 0;
    background: #f8faff;
    color: #475569;
    font: inherit;
    font-size: 14px;
}

.account-filter-select select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

.account-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.account-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.account-table thead {
    background: #f8faff;
}

.account-table th {
    padding: 11px 14px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.account-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf1f6;
    color: #475569;
    font-size: 13px;
}

.account-table tbody tr:last-child td {
    border-bottom: 0;
}

.account-identity {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.account-identity strong {
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
}

.account-identity small {
    color: #64748b;
    font-size: 12px;
}

.account-role-badge,
.account-status-badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.account-role-badge--admin {
    background: #fee2e2;
    color: #b91c1c;
}

.account-role-badge--staff {
    background: #dbeafe;
    color: #2563eb;
}

.account-role-badge--student {
    background: #e0f2fe;
    color: #0369a1;
}

.account-status-badge--active {
    background: #dbeafe;
    color: #2563eb;
}

.account-status-badge--inactive {
    background: #e2e8f0;
    color: #475569;
}

.account-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.account-row-action {
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: #2563eb;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.account-row-action:hover {
    text-decoration: underline;
}

.account-row-action--quiet {
    color: #475569;
    font-weight: 500;
}

.account-message {
    min-height: 0;
    margin: 0;
    color: #15803d;
    font-size: 13px;
}

.account-message:not(:empty) {
    margin: 8px 14px 0;
}

.account-message--error {
    color: #b42318;
}

.account-row-actions form,
.duty-row-actions form {
    margin: 0;
}

.account-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 8px 14px;
    border-top: 1px solid #edf1f6;
    color: #64748b;
    font-size: 12px;
}

.account-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-pagination button,
.account-pagination a,
.account-pagination span {
    display: inline-grid;
    place-items: center;
    min-width: 29px;
    height: 27px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 12px;
}

.account-pagination button,
.account-pagination a {
    cursor: pointer;
}

.account-pagination button:not(:disabled):hover,
.account-pagination a:hover {
    background: #eff6ff;
    color: #2563eb;
}

.account-pagination button:disabled {
    opacity: 0.45;
    cursor: default;
}

.account-pagination span[aria-current="page"] {
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

.account-dialog {
    width: min(100% - 32px, 500px);
    max-width: 500px;
    max-height: 90vh;
    padding: 0;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #102039;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.account-dialog::backdrop {
    background: rgba(15, 23, 42, 0.38);
}

.account-dialog-form {
    padding: 20px;
}

.account-dialog-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf1f6;
}

.account-dialog-heading h2 {
    margin: 0;
    color: #102039;
    font-size: 18px;
    font-weight: 800;
}

.account-dialog-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.account-dialog-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
}

.account-dialog-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    padding: 16px 0;
}

.account-dialog-message {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.user-accounts-content > .account-dialog-message {
    margin-bottom: 16px;
}

.account-dialog-message[hidden] {
    display: none;
}

.account-dialog-message h3 {
    margin: 0;
    color: #102039;
    font-size: 14px;
    font-weight: 800;
}

.account-dialog-message p,
.account-dialog-message small {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

.account-dialog-message textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px;
    color: #334155;
    font: inherit;
    font-size: 13px;
}

.account-dialog-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.account-student-field[hidden] {
    display: none;
}

.account-dialog-field label {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.account-dialog-field input,
.account-dialog-field select {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #dce4ef;
    border-radius: 7px;
    outline: 0;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 14px;
}

.account-dialog-field input:focus,
.account-dialog-field select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

/* Profile photo field in account dialog */
.account-dialog-field--photo {
    grid-column: 1 / -1;
}

.account-photo-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.account-photo-preview img,
.account-photo-preview .profile-photo-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.account-photo-preview .profile-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    font-size: 20px;
}

.account-dialog-field input[type="file"] {
    height: auto;
    padding: 8px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.account-dialog-field input[type="file"]:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.account-dialog-field small {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 4px;
}

.account-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 15px;
    border-top: 1px solid #edf1f6;
}

.account-form-message {
    margin: 0 0 10px;
    color: #b42318;
    font-size: 13px;
}

@media (max-width: 980px) {
    .account-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .user-accounts-layout {
        flex-direction: column;
    }

    .account-topbar {
        min-height: 64px;
        padding: 0 16px;
    }

    .user-accounts-content {
        padding: 20px 16px 24px;
    }

    .account-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-directory-filters {
        grid-template-columns: 1fr 1fr;
    }

    .account-directory-search {
        grid-column: 1 / -1;
    }

    .account-table {
        min-width: 700px;
    }
}

@media (max-width: 520px) {
    .account-current-user div {
        display: none;
    }

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

    .account-directory-filters {
        grid-template-columns: 1fr;
    }

    .account-directory-search {
        grid-column: auto;
    }

    .account-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-dialog-fields {
        grid-template-columns: 1fr;
    }
}

.provision-page {
    min-height: 100vh;
    background: #f6f8fd;
    color: #102039;
}

.provision-layout {
    display: flex;
    min-height: 100vh;
}

.provision-main {
    min-width: 0;
    flex: 1;
}

.provision-topbar {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 64px;
    padding: 0 22px;
    border-bottom: 1px solid #e8edf5;
    background: #fff;
}

.provision-search {
    display: flex;
    align-items: center;
    gap: 9px;
    width: min(100%, 520px);
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #f8faff;
    color: #64748b;
}

.provision-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #102039;
    font: inherit;
    font-size: 11px;
}

.provision-search input::placeholder {
    color: #94a3b8;
}

.provision-topbar-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    color: #475569;
    font-size: 10px;
    white-space: nowrap;
}

.provision-topbar-status i {
    color: #2563eb;
    font-size: 10px;
}

.provision-topbar-status strong {
    font-weight: 600;
}

.provision-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.provision-user div {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.provision-user strong {
    color: #102039;
    font-size: 10px;
    font-weight: 700;
}

.provision-user small {
    color: #64748b;
    font-size: 9px;
}

.provision-user > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eff3ff;
    color: #3152a0;
    font-size: 9px;
    font-weight: 800;
}

.provision-content {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 16px 22px 20px;
}

.provision-breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 10px;
}

.provision-breadcrumb a {
    color: #475569;
    text-decoration: none;
}

.provision-breadcrumb a:hover,
.provision-return-link:hover {
    color: #1d4ed8;
}

.provision-breadcrumb i {
    color: #94a3b8;
    font-size: 8px;
}

.provision-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.provision-page-heading h1 {
    margin: 0;
    color: #102039;
    font-size: 19px;
    font-weight: 800;
}

.provision-page-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 11px;
}

.provision-return-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 0;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.provision-form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.provision-step {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #e5ebf4;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.02);
}

.provision-step-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.provision-step-heading > div > span {
    display: block;
    margin-bottom: 2px;
    color: #334155;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.provision-step-heading h2 {
    margin: 0;
    color: #1e293b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.provision-step-heading > small {
    padding-top: 7px;
    color: #64748b;
    font-size: 9px;
}

.provision-sync-status {
    color: #475569 !important;
}

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

.provision-role-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    min-height: 78px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fbfcff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.provision-role-card:hover {
    border-color: #93c5fd;
}

.provision-role-card--selected {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.provision-role-card > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.provision-role-card:focus-within {
    outline: 2px solid #93c5fd;
    outline-offset: 1px;
}

.provision-role-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 7px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
}

.provision-role-icon--staff {
    background: #f1f5ff;
    color: #4f46e5;
}

.provision-role-icon--student {
    background: #e0f2fe;
    color: #0284c7;
}

.provision-role-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding-right: 9px;
}

.provision-role-copy strong {
    color: #1e293b;
    font-size: 9px;
    font-weight: 800;
}

.provision-role-copy small {
    color: #475569;
    font-size: 8px;
    line-height: 1.35;
}

.provision-role-copy em {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    color: #475569;
    font-size: 7px;
    font-style: normal;
    font-weight: 600;
}

.provision-role-check {
    position: absolute;
    top: 9px;
    right: 9px;
    color: #94a3b8;
    font-size: 8px;
}

.provision-role-card--selected .provision-role-check {
    color: #2563eb;
}

.provision-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px 12px;
}

.provision-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.provision-field > label,
.provision-password-heading > label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #334155;
    font-size: 9px;
    font-weight: 600;
}

.provision-field > label b {
    color: #dc2626;
    font-size: 10px;
}

.field-note {
    margin-left: auto;
    color: #64748b;
    font-size: 8px;
    font-weight: 500;
}

.provision-input-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    height: 33px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
}

.provision-input-wrap:focus-within {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.13);
}

.provision-input-wrap > i {
    flex: 0 0 auto;
    font-size: 10px;
}

.provision-input-wrap input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 9px;
}

.provision-input-wrap input::placeholder {
    color: #94a3b8;
}

.provision-input-wrap > small {
    color: #475569;
    font-size: 8px;
    white-space: nowrap;
}

.provision-field select {
    width: 100%;
    min-width: 0;
    height: 33px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: 0;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 9px;
}

.provision-field select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.13);
}

.provision-step-toggle,
.provision-security-mark {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #475569;
    font-size: 12px;
}

.provision-step-toggle {
    cursor: pointer;
}

.provision-step-toggle:hover {
    background: #eff6ff;
    color: #2563eb;
}

.provision-permissions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 16px;
    margin: 10px 0 0;
    padding: 0;
    border: 0;
}

.provision-permissions legend {
    margin-bottom: 8px;
    color: #334155;
    font-size: 9px;
    font-weight: 600;
}

.provision-permissions label,
.provision-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #334155;
    font-size: 9px;
    cursor: pointer;
}

.provision-permissions input,
.provision-checkbox-row input {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    margin: 1px 0 0;
    accent-color: #2563eb;
}

.provision-permissions label span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.provision-permissions strong {
    color: #334155;
    font-size: 9px;
    font-weight: 600;
}

.provision-permissions small {
    color: #64748b;
    font-size: 8px;
}

.provision-auth-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
}

.provision-auth-main {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.provision-password-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.provision-password-heading button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 8px;
    cursor: pointer;
}

.provision-password-heading button:hover {
    color: #2563eb;
}

.provision-password-wrap {
    height: 34px;
    background: #f8fafc;
}

.provision-password-wrap input {
    font-family: monospace;
    font-size: 9px;
}

.provision-password-wrap button {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #475569;
    cursor: pointer;
}

.provision-help-text {
    margin-top: -5px;
    color: #64748b;
    font-size: 8px;
}

.provision-checkbox-row {
    align-items: center;
}

.provision-nfc-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #f8faff;
}

.provision-nfc-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.provision-nfc-heading > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-size: 9px;
    font-weight: 700;
}

.provision-nfc-heading small {
    color: #64748b;
    font-size: 7px;
}

.provision-nfc-heading .provision-reader-status--verified {
    color: #15803d;
    font-weight: 700;
}

.provision-nfc-card > p {
    margin: -6px 0 0 19px;
    color: #64748b;
    font-size: 8px;
}

.provision-reader-ready {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 3px;
    color: #475569;
}

.provision-reader-ready > i {
    color: #2563eb;
    font-size: 12px;
}

.provision-reader-ready span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.provision-reader-ready strong {
    color: #334155;
    font-size: 9px;
    font-weight: 600;
}

.provision-reader-ready small {
    color: #64748b;
    font-size: 8px;
}

.provision-nfc-card > button {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0 0;
    border: 0;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 8px;
    cursor: pointer;
}

.provision-nfc-card > button:hover {
    color: #2563eb;
}

.provision-initial-state {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.provision-initial-state strong {
    color: #334155;
    font-size: 9px;
    font-weight: 700;
}

.provision-initial-state p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 8px;
}

.provision-initial-state > span {
    color: #475569;
    font-size: 9px;
}

.provision-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0 0;
}

.provision-footer > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.provision-security-footer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 9px;
}

.provision-security-footer i {
    color: #334155;
}

.provision-cancel {
    color: #475569;
    font-size: 9px;
    text-decoration: none;
}

.provision-draft-button,
.provision-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #dce5f3;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
}

.provision-submit-button {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.provision-submit-button:hover {
    background: #1d4ed8;
}

.provision-message {
    min-height: 0;
    margin: 0;
    color: #15803d;
    font-size: 10px;
}

.provision-message:not(:empty) {
    margin-top: 5px;
}

@media (max-width: 1050px) {
    .provision-fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .provision-topbar-status {
        display: none;
    }
}

@media (max-width: 767px) {
    .provision-layout {
        flex-direction: column;
    }

    .provision-content {
        padding: 16px;
    }

    .provision-topbar {
        min-height: 60px;
        padding: 0 16px;
    }

    .provision-page-heading {
        flex-direction: column;
    }

    .provision-role-grid {
        grid-template-columns: 1fr;
    }

    .provision-role-card {
        min-height: 0;
    }

    .provision-auth-grid {
        grid-template-columns: 1fr;
    }

    .provision-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .provision-user div {
        display: none;
    }

    .provision-fields-grid,
    .provision-permissions {
        grid-template-columns: 1fr;
    }

    .provision-step {
        padding: 12px;
    }

    .provision-footer > div {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }

    .provision-security-footer {
        align-items: flex-start;
    }
}

.activity-page {
    min-height: 100vh;
    background: #f6f8fd;
    color: #102039;
}

.activity-layout {
    display: flex;
    min-height: 100vh;
}

.activity-main {
    min-width: 0;
    flex: 1;
}

.activity-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 64px;
    padding: 0 20px;
    border-bottom: 1px solid #e8edf5;
    background: #fff;
}

.activity-global-search {
    display: flex;
    align-items: center;
    gap: 9px;
    width: min(100%, 520px);
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #f8faff;
    color: #64748b;
}

.activity-global-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #102039;
    font: inherit;
    font-size: 11px;
}

.activity-global-search input::placeholder {
    color: #94a3b8;
}

.activity-top-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.activity-top-user div {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.activity-top-user strong {
    color: #102039;
    font-size: 10px;
    font-weight: 700;
}

.activity-top-user small {
    color: #64748b;
    font-size: 9px;
}

.activity-top-user > span {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #0e45b6;
    color: #fff;
    font-size: 11px;
}

.activity-content {
    width: min(90.9%, 1254px);
    margin: 0 auto;
    padding: 18px 20px 22px;
    zoom: 1.1;
}

.activity-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
    padding: 13px 15px;
    border: 1px solid #e6ecf5;
    border-radius: 9px;
    background: #fff;
}

.activity-heading h1 {
    margin: 0;
    color: #102039;
    font-size: 20px;
    font-weight: 800;
}

.activity-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 11px;
}

.activity-export-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #dce5f3;
    border-radius: 7px;
    background: #eff6ff;
    color: #1d4ed8;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.activity-export-button:hover {
    background: #dbeafe;
}

.activity-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 12px;
}

.activity-stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 62px;
    padding: 9px 11px;
    border: 1px solid #e5ebf4;
    border-radius: 9px;
    background: #fff;
}

.activity-stat-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
}

.activity-stat-icon--cyan {
    background: #e0f2fe;
    color: #0284c7;
}

.activity-stat-icon--blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.activity-stat-card p {
    margin: 0 0 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.activity-stat-card strong {
    color: #102039;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.activity-filter-panel {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto auto;
    align-items: end;
    gap: 8px;
    margin-bottom: 11px;
    padding: 10px 11px;
    border: 1px solid #e6ecf5;
    border-radius: 9px;
    background: #fff;
}

.activity-query-field,
.activity-select-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.activity-query-field > span:first-child,
.activity-select-field > span:first-child {
    color: #334155;
    font-size: 11px;
    font-weight: 600;
}

.activity-input-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #dce5f3;
    border-radius: 6px;
    background: #f8faff;
    color: #64748b;
}

.activity-input-wrap input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 13px;
}

.activity-input-wrap input::placeholder {
    color: #94a3b8;
}

.activity-select-field select {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #dce5f3;
    border-radius: 6px;
    outline: 0;
    background: #f8faff;
    color: #334155;
    font: inherit;
    font-size: 13px;
}

.activity-filter-button,
.activity-reset-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.activity-filter-button {
    padding: 0 11px;
    background: #2563eb;
    color: #fff;
}

.activity-filter-button:hover {
    background: #1d4ed8;
}

.activity-reset-button {
    width: 34px;
    border: 1px solid #dce5f3;
    background: #f8faff;
    color: #64748b;
}

.activity-reset-button:hover {
    color: #2563eb;
    background: #eff6ff;
}

.activity-message {
    min-height: 0;
    margin: 0;
    color: #15803d;
    font-size: 10px;
}

.activity-message:not(:empty) {
    margin-bottom: 7px;
}

.activity-table-panel {
    overflow: hidden;
    border: 1px solid #e5ebf4;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.025);
}

.activity-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.activity-table thead {
    background: #eaf1ff;
}

.activity-table th {
    padding: 10px 11px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.activity-table td {
    padding: 10px 11px;
    border-bottom: 1px solid #edf1f6;
    color: #334155;
    font-size: 13px;
}

.activity-table tbody tr:nth-child(even) {
    background: #fbfcff;
}

.activity-table tbody tr:last-child td {
    border-bottom: 0;
}

.activity-timestamp strong {
    color: #334155;
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
}

.activity-timestamp small {
    color: #64748b;
    font-family: monospace;
    font-size: 11px;
}

.activity-user {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.activity-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 700;
}

.activity-user-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-user-copy strong {
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.activity-user-copy small {
    color: #64748b;
    font-size: 11px;
}

.activity-action-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.activity-detail-link {
    display: inline-block;
    max-width: 290px;
    color: #334155;
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
}

.activity-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.activity-status-badge::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: '';
}

.activity-status-badge--success {
    background: #e0f2fe;
    color: #0369a1;
}

.activity-status-badge--completed {
    background: #dbeafe;
    color: #2563eb;
}

.activity-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 40px;
    padding: 6px 10px;
    background: #f2f6ff;
    color: #64748b;
    font-size: 11px;
}

.activity-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.activity-pagination button,
.activity-pagination a,
.activity-pagination span {
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 11px;
}

.activity-pagination button,
.activity-pagination a {
    cursor: pointer;
}

.activity-pagination button:not(:disabled):hover,
.activity-pagination a:hover {
    background: #e0ebff;
    color: #1d4ed8;
}

.activity-pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

.activity-pagination button[aria-current="page"] {
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

.activity-pagination-ellipsis {
    color: #64748b;
    font-size: 8px;
}

.activity-page-number-window {
    display: flex;
    align-items: center;
    gap: 3px;
}

.activity-pagination .activity-page-number-window a,
.activity-pagination .activity-page-status {
    display: grid;
    place-items: center;
    min-width: 27px;
    height: 27px;
    padding: 0 7px;
    border-radius: 7px;
    color: #475569;
    font-size: 11px;
    text-decoration: none;
}

.activity-pagination .activity-page-number-window a[aria-current="page"] {
    background: #2563eb;
    color: #fff;
    font-weight: 800;
}

.activity-pagination .activity-page-cycle {
    width: auto;
    min-width: 0;
    padding: 0 9px;
    border: 1px solid #dbe5f1;
    background: #fff;
    color: #334155;
    font-size: 10px;
    font-weight: 700;
}

.activity-page-jump {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.activity-page-jump label {
    color: #475569;
    font-size: 11px;
    font-weight: 600;
}

.activity-page-jump input {
    width: 64px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 13px;
}

.activity-page-jump button {
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.activity-page-jump button:hover {
    background: #1d4ed8;
}

.activity-footer {
    padding: 18px 0 0;
    color: #64748b;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 980px) {
    .activity-filter-panel {
        grid-template-columns: minmax(170px, 1fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto auto;
    }

    .activity-content {
        padding-right: 15px;
        padding-left: 15px;
    }
}

@media (max-width: 767px) {
    .activity-layout {
        flex-direction: column;
    }

    .activity-topbar {
        min-height: 60px;
        padding: 0 15px;
    }

    .activity-stat-grid {
        grid-template-columns: 1fr;
    }

    .activity-filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .activity-query-field {
        grid-column: 1 / -1;
    }

    .activity-table {
        min-width: 800px;
    }
}

@media (max-width: 520px) {
    .activity-top-user div {
        display: none;
    }

    .activity-content {
        padding-right: 11px;
        padding-left: 11px;
    }

    .activity-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .activity-filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .activity-filter-button {
        width: 100%;
    }

    .activity-table-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/*  CONSULTATION LOG STYLES                   */


.dashboard-body {
    background-color: #f8fafc;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.main-container {
    min-height: 100vh;
    display: flex;
}

.content-area {
    flex: 1;
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Header UI */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 24rem;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.875rem;
}

.search-box input {
    width: 100%;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem 0.625rem 2.25rem;
    font-size: 0.875rem;
    outline: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-text {
    text-align: right;
}

.user-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

.user-icon {
    display: flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: #1e40af;
    color: #ffffff;
    font-size: 0.875rem;
}

/* Panel Containers */
.consultation-wrapper {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.consultation-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.consultation-header__left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.consultation-header__icon {
    display: flex;
    height: 2.5rem;
    width: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: #eff6ff;
    color: #1d4ed8;
}

.consultation-header__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.consultation-header__subtitle {
    font-size: 0.75rem;
    color: #64748b;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.log-table th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.log-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.log-enc {
    font-weight: 600;
    color: #1e40af;
}

.log-date {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.125rem;
}

.patient-info-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-weight: 600;
    color: white;
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.profile-avatar--blue {
    background-color: #3b82f6;
}

.patient-table-name {
    font-weight: 500;
    color: #1e293b;
}

.patient-table-sub {
    font-size: 0.75rem;
    color: #64748b;
}

.log-complaint {
    font-weight: 500;
    color: #1e293b;
}

.log-mrn {
    font-size: 0.75rem;
    color: #64748b;
}

.log-diagnosis {
    color: #334155;
}

.log-badge {
    display: inline-block;
    margin-top: 0.25rem;
    background-color: #eff6ff;
    color: #1d4ed8;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.log-attending {
    font-size: 0.75rem;
    font-weight: 500;
    color: #1e293b;
}

.log-verified {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #059669;
    margin-top: 0.125rem;
}

/* Buttons and Actions */
.action-buttons-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn-icon {
    display: flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #475569;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-icon:hover {
    background-color: #f1f5f9;
    color: #1d4ed8;
}

.action-button {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button--primary {
    background-color: #1e40af;
    color: #ffffff;
    border: none;
}

.action-button--primary:hover {
    background-color: #1d3694;
}

.action-button--ghost {
    background-color: transparent;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.action-button--ghost:hover {
    background-color: #f1f5f9;
}

.bottom-bar {
    padding: 1.25rem 1.5rem;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #64748b;
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.bottom-bar__actions {
    display: flex;
    gap: 0.75rem;
}

/* ================================================= */
/* REPORTS styles                 */

.reports-page {
    background-color: #f8fafc;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.reports-layout {
    min-height: 100vh;
    display: flex;
}

.reports-main {
    flex: 1;
    min-width: 0;
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem;
}

.reports-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.reports-search {
    position: relative;
    width: 100%;
    max-width: 24rem;
}

.reports-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.875rem;
}

.reports-search input {
    width: 100%;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem 0.625rem 2.25rem;
    font-size: 0.875rem;
    outline: none;
}

.reports-user-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reports-notification {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.125rem;
    color: #64748b;
    padding: 0.5rem;
}

.reports-notification span {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 9999px;
}

.reports-user-copy {
    text-align: right;
}

.reports-user-copy strong {
    display: block;
    font-size: 0.875rem;
    color: #1e293b;
}

.reports-user-copy small {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

.reports-user-avatar {
    display: flex;
    height: 2.25rem;
    width: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: #1e40af;
    color: #ffffff;
    font-size: 0.875rem;
}

.reports-content {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.reports-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
}

.reports-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reports-titlebar h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.reports-titlebar p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
}

.reports-data-badge {
    background-color: #eff6ff;
    color: #1d4ed8;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.reports-export-actions {
    display: flex;
    gap: 0.5rem;
}

.report-toolbar-button {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.report-toolbar-button:hover {
    background-color: #f1f5f9;
}

.reports-filter-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}

.report-filter-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.375rem;
}

.report-filter-field input,
.report-filter-field select {
    width: 100%;
    box-sizing: border-box;
    height: 38px;
    padding: 0 9px;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background-color: #ffffff;
    color: #1e293b;
}

.report-generate-button {
    background-color: #1e40af;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 38px;
}

.report-generate-button:hover {
    background-color: #1d3694;
}

.report-status {
    font-size: 0.875rem;
    color: #059669;
    margin-bottom: 1rem;
}

.report-status--error {
    color: #dc2626;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.report-summary-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.report-card-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.report-card-icon {
    display: flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background-color: #dbeafe;
    color: #1e40af;
    font-size: 0.875rem;
}

.report-card-icon--cyan {
    background-color: #cffafe;
    color: #0891b2;
}

.report-card-icon--indigo {
    background-color: #e0e7ff;
    color: #4f46e5;
}

.report-change {
    font-size: 0.75rem;
    font-weight: 600;
    color: #059669;
}

.report-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 0.25rem 0;
}

.report-total-value {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.report-total-value strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.report-total-value span {
    font-size: 0.75rem;
    color: #64748b;
}

.report-sparkline {
    display: flex;
    gap: 3px;
    height: 24px;
    align-items: flex-end;
    margin-top: 0.75rem;
}

.report-sparkline span {
    flex: 1;
    background-color: #93c5fd;
    border-radius: 2px 2px 0 0;
}

.report-sparkline span:nth-child(4),
.report-sparkline span:nth-child(8) {
    background-color: #1e40af;
}

.report-sparkline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: #64748b;
    margin-top: 0.375rem;
}

.report-complaint-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-complaint-copy h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.125rem 0;
}

.report-complaint-copy p {
    font-size: 0.875rem;
    color: #334155;
    margin: 0;
}

.report-complaint-copy span {
    font-size: 0.75rem;
    color: #64748b;
    margin-left: 0.375rem;
}

.report-donut {
    width: 50px;
    height: 50px;
    border-radius: 9999px;
    background: conic-gradient(#1e40af 0% 34%, #cbd5e1 34% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-donut span {
    width: 38px;
    height: 38px;
    background-color: #f8fafc;
    border-radius: 9999px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: #1e293b;
}

.report-donut small {
    font-size: 0.5rem;
    color: #64748b;
}

.report-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: #475569;
}

.report-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
}

.legend-dot--blue { background-color: #1e40af; }
.legend-dot--cyan { background-color: #0891b2; }
.legend-dot--pale { background-color: #cbd5e1; }

.report-referral-tag,
.report-small-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4f46e5;
}

.report-referral-note {
    font-size: 0.875rem;
    color: #334155;
    margin: 0.25rem 0;
}

.report-referral-note span {
    color: #64748b;
}

.report-referral-bar {
    width: 100%;
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.report-referral-bar span {
    display: block;
    width: 3.5%;
    height: 100%;
    background-color: #4f46e5;
}

.report-referral-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: #64748b;
}

.report-distribution-panel {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.report-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.report-panel-heading h2 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.report-panel-heading p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.125rem 0 0 0;
}

.report-table-badge {
    background-color: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.report-table-wrap {
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.report-table th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.report-table td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.report-diagnosis-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-diagnosis-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background-color: #1e40af;
}

.report-case-count {
    font-weight: 600;
    color: #1e293b;
}

.report-share-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.report-share-pill {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e40af;
    background-color: #eff6ff;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    min-width: 36px;
    text-align: center;
}

.report-share-bar {
    display: block;
    height: 6px;
    width: 80px;
    background-color: #e2e8f0;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.report-share-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: attr(data-percent percentage); /* Fallback via custom property assignment in JS */
    background-color: #1e40af;
}

.report-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #64748b;
}

.report-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-pagination button {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.report-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reports-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.75rem;
    color: #64748b;
}

.reports-footer i {
    font-size: 0.5rem;
    vertical-align: middle;
    margin: 0 0.25rem;
}

.patient-search-wrapper {
    position: relative;
    z-index: 20;
}

.patient-search-wrapper:focus-within {
    z-index: 1001;
}

.patient-search-field {
    position: relative;
}

.patient-search-field input {
    display: block;
}

.patient-search-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    z-index: 1000;
    max-height: min(70vh, 24rem);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.patient-search-dropdown[hidden] {
    display: none;
}

.patient-search-dropdown [hidden] {
    display: none;
}

.patient-search-option {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    color: #1e293b;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.patient-search-option:last-child {
    border-bottom: 0;
}

.patient-search-option:hover,
.patient-search-option[aria-selected="true"] {
    background: #eff6ff;
}

.patient-search-photo,
.patient-search-initials {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 2.5rem;
    place-items: center;
    overflow: hidden;
    border-radius: 9999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
}

.patient-search-photo {
    object-fit: cover;
}

.patient-search-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.125rem;
}

.patient-search-name {
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-search-meta {
    overflow: hidden;
    color: #64748b;
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-search-message {
    padding: 0.875rem 1rem;
    color: #64748b;
    font-size: 0.875rem;
}

.patient-search-register {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.patient-search-register:hover,
.patient-search-all:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.patient-search-all {
    justify-content: center;
    color: #2563eb;
    font-size: 0.8125rem;
    font-weight: 600;
}

.clinic-profile-link {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

@media (min-width: 640px) {
    .patient-search-filter-grid {
        grid-template-columns: minmax(0, 1fr) minmax(14rem, auto) auto;
    }
}

.clinic-profile-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clinic-duty-photo,
.clinic-duty-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 50%;
}

.clinic-duty-photo {
    object-fit: cover;
}

.clinic-duty-avatar {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
}

.clinic-duty-empty {
    margin: 0;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.8125rem;
    text-align: center;
}

.profile-photo-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: #f6f8fd;
}

.profile-photo-layout {
    display: flex;
    min-height: 100vh;
}

.profile-photo-main {
    width: min(100%, 920px);
    min-width: 0;
    margin: 0 auto;
    padding: 38px 32px;
}

.profile-photo-heading h1 {
    margin: 0;
    color: #102039;
    font-size: 1.75rem;
    font-weight: 800;
}

.profile-photo-heading p {
    margin: 7px 0 22px;
    color: #64748b;
    font-size: 0.875rem;
}

.profile-photo-card {
    max-width: 680px;
    padding: 24px;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.profile-photo-account-select,
.profile-photo-form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.profile-photo-account-select {
    margin-bottom: 22px;
}

.profile-photo-account-select label,
.profile-photo-form label {
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 700;
}

.profile-photo-account-select select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #dbe3ef;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.875rem;
}

.profile-photo-file-input {
    width: 100%;
    min-height: 48px;
    padding: 6px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    font: inherit;
    font-size: 0.875rem;
}

.profile-photo-file-input::file-selector-button {
    min-height: 34px;
    margin-right: 12px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: #eaf2ff;
    color: #1d4ed8;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}

.profile-photo-file-input::file-selector-button:hover {
    background: #dbeafe;
    color: #1e40af;
}

.profile-photo-file-input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}

.profile-photo-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.profile-photo-preview img,
.profile-photo-preview > span {
    display: grid;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #eaf2ff;
    color: #2563eb;
    object-fit: cover;
    font-size: 1.4rem;
}

.profile-photo-preview > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-photo-preview strong {
    color: #102039;
    font-size: 1rem;
}

.profile-photo-preview small {
    color: #64748b;
    font-size: 0.8125rem;
}

.profile-photo-form button {
    align-self: flex-start;
    min-height: 42px;
    margin-top: 5px;
    padding: 0 18px;
    border: 0;
    border-radius: 9px;
    background: #1d4ed8;
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}

.profile-photo-form button:hover {
    background: #1e40af;
}

.profile-photo-message {
    max-width: 680px;
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 0.875rem;
}

.profile-photo-message--success {
    background: #ecfdf5;
    color: #047857;
}

.profile-photo-message--error {
    background: #fef2f2;
    color: #b91c1c;
}

@media (max-width: 767px) {
    .profile-photo-layout {
        display: block;
    }

    .profile-photo-main {
        padding: 26px 18px;
    }

    .profile-photo-card {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-photo-file-input::file-selector-button,
    .profile-photo-form button,
    .nfc-card-unlink {
        transition: none;
    }
}

.appointment-report-panel,
.appointment-card {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #ffffff;
}

.appointment-report-heading,
.appointment-chart-header,
.appointment-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.appointment-report-heading h2,
.appointment-chart-header h3,
.appointment-list-heading h2,
.appointment-card h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 700;
}

.appointment-report-heading p,
.appointment-chart-header p {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.8125rem;
}

.appointment-report-heading a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.4rem;
    color: #1d4ed8;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
}

.appointment-report-heading a:hover {
    color: #1e40af;
}

.appointment-report-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.appointment-report-summary article {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 0.875rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    background: #f8fafc;
}

.appointment-report-summary article > span {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.appointment-report-summary strong {
    margin-top: 0.25rem;
    color: #1e3a8a;
    font-size: 1.5rem;
}

.appointment-report-summary small {
    color: #64748b;
    font-size: 0.75rem;
}

.appointment-chart-header {
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.appointment-chart-periods {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.appointment-chart-periods button {
    padding: 0.4rem 0.65rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.appointment-chart-periods button[aria-pressed="true"] {
    background: #1d4ed8;
    color: #ffffff;
}

body.dashboard-page {
    font-family: 'Inter', 'DM Sans', 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

.font-size-xs,
.text-color--10px-,
.text-color--11px-,
.text-color--9px- {
    font-size: 14px;
    line-height: 1.45;
}

.checkin-sidebar {
    z-index: 20;
    overflow-y: auto;
    padding: 22px 18px 0;
    border-right-color: #e3eaf5;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    box-shadow: 8px 0 24px rgba(30, 58, 110, 0.035);
}

.checkin-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.checkin-brand-copy strong {
    font-size: 19px;
    letter-spacing: -0.035em;
}

.checkin-brand-copy small {
    color: #64748b;
    font-size: 14px;
    letter-spacing: 0.065em;
}

.checkin-nav-heading {
    margin-top: 10px;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 13px;
    letter-spacing: 0.09em;
}

.checkin-nav-link {
    position: relative;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #3b4b63;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.checkin-nav-link i {
    color: #64748b;
    font-size: 16px;
}

.checkin-nav-link:hover,
.checkin-nav-link:focus-visible {
    z-index: 1;
    transform: none;
    border-color: #e1eaff;
    background: #f2f6ff;
    color: #1748a5;
    outline: none;
}

.checkin-nav-link--active,
.checkin-nav-link--active:hover,
.checkin-nav-link--active:focus-visible {
    border-color: #1b55c9;
    background: linear-gradient(110deg, #1d4ed8 0%, #2764e8 100%);
    color: #fff;
    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.2);
}

.checkin-nav-link--active i,
.checkin-nav-link--active:hover i,
.checkin-nav-link--active:focus-visible i {
    color: #fff;
}

.checkin-nav-tooltip {
    position: absolute;
    z-index: 30;
    top: 50%;
    left: calc(100% + 12px);
    width: max-content;
    max-width: 250px;
    padding: 11px 14px;
    transform: translate(-4px, -50%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: #122541;
    box-shadow: 0 10px 28px rgba(15, 35, 65, 0.22);
    color: #fff;
    font-size: 14px;
    font-weight: 450;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

@media (min-width: 768px) {
    .checkin-nav-tooltip {
        position: fixed;
        top: var(--checkin-tooltip-top);
        left: var(--checkin-tooltip-left);
    }
}

.checkin-nav-tooltip::before {
    position: absolute;
    top: 50%;
    left: -5px;
    width: 8px;
    height: 8px;
    transform: translateY(-50%) rotate(45deg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background: #122541;
    content: "";
}

.checkin-nav-link:hover .checkin-nav-tooltip,
.checkin-nav-link:focus-visible .checkin-nav-tooltip,
.checkin-nav-tooltip--visible {
    transform: translate(0, -50%);
    opacity: 1;
    visibility: visible;
}

.checkin-logout {
    min-height: 50px;
    margin-right: -18px;
    margin-left: -18px;
    padding-right: 22px;
    padding-left: 22px;
    background: #f6f8ff;
    font-size: 14px;
    transition: background 0.18s ease;
}

.checkin-logout:hover,
.checkin-logout:focus-visible {
    background: #eef2ff;
    outline: 2px solid #c7d7ff;
    outline-offset: -2px;
}

@media (max-width: 767px) {
    .checkin-sidebar {
        padding: 16px 16px 0;
        overflow: visible;
    }

    .checkin-nav-tooltip {
        left: calc(100% + 8px);
        max-width: calc(50vw - 24px);
    }

    .checkin-logout {
        margin-right: -16px;
        margin-left: -16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .checkin-nav-link,
    .checkin-nav-tooltip,
    .checkin-logout {
        transition: none;
    }
}

.appointment-chart {
    display: flex;
    min-height: 190px;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
}

.appointment-chart-column {
    display: flex;
    min-width: 2.3rem;
    flex: 1 0 2.3rem;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.appointment-chart-value {
    min-height: 1rem;
    color: #475569;
    font-size: 0.6875rem;
    font-weight: 600;
}

.appointment-chart-track {
    display: flex;
    width: min(100%, 2rem);
    height: 130px;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 0.375rem 0.375rem 0 0;
    background: #eff6ff;
}

.appointment-chart-bar {
    display: block;
    width: 100%;
    border-radius: 0.375rem 0.375rem 0 0;
    background: linear-gradient(180deg, #60a5fa, #1d4ed8);
    transition: height 180ms ease;
}

.appointment-chart-label {
    min-height: 1.25rem;
    margin-top: 0.4rem;
    color: #64748b;
    font-size: 0.625rem;
    white-space: nowrap;
}

.appointments-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: #f6f8fd;
}

.appointments-layout {
    display: flex;
    min-height: 100vh;
}

.appointments-main {
    width: min(100%, 1100px);
    min-width: 0;
    margin: 0 auto;
    padding: 38px 32px;
}

.appointments-heading {
    margin-bottom: 1.25rem;
}

.appointments-heading h1 {
    margin: 0;
    color: #102039;
    font-size: 1.75rem;
    font-weight: 800;
}

.appointments-heading p {
    margin: 0.4rem 0 0;
    color: #64748b;
    font-size: 0.875rem;
}

.appointment-card h2 {
    margin-bottom: 1rem;
}

.appointment-booking-form {
    display: grid;
    max-width: 34rem;
    gap: 0.6rem;
}

.appointment-booking-form label {
    margin-top: 0.35rem;
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 700;
}

.appointment-booking-form input,
.appointment-booking-form textarea,
.appointment-status-form select {
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #1e293b;
    font: inherit;
    font-size: 0.875rem;
}

.appointment-booking-form textarea {
    resize: vertical;
}

.appointment-booking-form button,
.appointment-status-form button,
.appointment-cancel-button {
    min-height: 38px;
    padding: 0.5rem 0.875rem;
    border: 0;
    border-radius: 0.5rem;
    background: #1d4ed8;
    color: #ffffff;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
}

.appointment-booking-form button {
    justify-self: start;
    margin-top: 0.35rem;
}

.appointment-booking-form button:hover,
.appointment-status-form button:hover {
    background: #1e40af;
}

.appointment-list-heading {
    align-items: center;
    margin-bottom: 0.75rem;
}

.appointment-list-heading h2 {
    margin: 0;
}

.appointment-list-heading > span,
.appointment-empty,
.appointment-no-action {
    color: #64748b;
    font-size: 0.8125rem;
}

.appointment-empty {
    margin: 0;
}

.appointment-table-wrap {
    overflow-x: auto;
}

.appointment-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.8125rem;
}

.appointment-table th {
    padding: 0.75rem;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.6875rem;
    text-transform: uppercase;
}

.appointment-table td {
    padding: 0.75rem;
    border-top: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: middle;
}

.appointment-table td small {
    display: block;
    margin-top: 0.2rem;
    color: #64748b;
}

.appointment-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.6875rem;
    font-weight: 700;
}

.appointment-status--completed {
    background: #dcfce7;
    color: #15803d;
}

.appointment-status--cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.appointment-status-form {
    display: flex;
    min-width: 180px;
    gap: 0.4rem;
}

.appointment-status-form select {
    min-width: 110px;
    min-height: 34px;
    padding: 0.35rem;
    font-size: 0.75rem;
}

.appointment-status-form button {
    min-height: 34px;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

.appointment-cancel-button {
    min-height: 34px;
    background: #fff;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.appointment-cancel-button:hover {
    background: #fef2f2;
}

.appointment-message {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.appointment-message--success {
    background: #ecfdf5;
    color: #047857;
}

.appointment-message--error {
    background: #fef2f2;
    color: #b91c1c;
}

@media (max-width: 767px) {
    .appointments-layout {
        display: block;
    }

    .appointments-main {
        padding: 26px 18px;
    }

    .appointment-report-panel,
    .appointment-card {
        padding: 1rem;
    }

    .appointment-report-heading,
    .appointment-chart-header {
        flex-direction: column;
        align-items: stretch;
    }

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

    .appointment-chart-periods {
        align-self: flex-start;
    }
}

.consultation-treatment-details {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.nfc-card-heading p {
    margin: -12px 0 22px;
    color: #64748b;
    font-size: 14px;
}

.nfc-card-panel {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid #e8edf5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 13px rgba(15, 23, 42, 0.025);
}

.nfc-card-panel h2 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 700;
}

.nfc-account-table tbody tr {
    cursor: pointer;
}

.nfc-account-table tbody tr.selected-row {
    background-color: #eff6ff;
    box-shadow: inset 3px 0 #2563eb;
}

.nfc-card-form {
    display: grid;
    gap: 20px;
    max-width: 720px;
}

.nfc-card-field {
    display: grid;
    gap: 8px;
}

.nfc-card-field label {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.nfc-card-field input,
.nfc-card-field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
}

.nfc-reader-status {
    margin: 0;
    color: #2563eb;
    font-size: 13px;
}

.nfc-card-submit {
    justify-self: start;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #1455d9;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.nfc-card-submit:hover {
    background: #0e45b6;
}

.nfc-account-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nfc-account-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid #edf1f7;
    color: #334155;
    font-size: 14px;
}

.nfc-account-list li:last-child {
    border-bottom: 0;
}

.nfc-card-linked,
.nfc-card-unlinked {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
}

.nfc-card-linked {
    color: #15803d;
}

.nfc-card-unlinked {
    color: #64748b;
}

.nfc-account-card-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.nfc-card-unlink-form {
    margin: 0;
}

.nfc-card-unlink {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: #fff;
    color: #b91c1c;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.nfc-card-unlink:hover {
    border-color: #fca5a5;
    background: #fef2f2;
}

.checkin-message--success {
    color: #15803d;
}

.checkin-message--error {
    color: #b91c1c;
}

@media (max-width: 600px) {
    .nfc-card-panel {
        padding: 18px;
    }

    .nfc-account-list li {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .nfc-account-card-status {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.nfc-card-topbar {
    justify-content: flex-end;
}

.checkin-user-icon,
.duty-user > span,
.account-current-user > span,
.activity-top-user > span,
.reports-user-avatar {
    overflow: hidden;
}

.account-header-photo {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.admin-profile-avatar {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #0e45b6;
    color: #fff;
    text-decoration: none;
}

.admin-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button:not(:disabled),
a[href] {
    position: relative;
    top: 0;
    transition-property: top, box-shadow, color, background-color;
    transition-duration: 160ms;
    transition-timing-function: ease;
}

button:not(:disabled):hover,
a[href]:hover {
    top: -2px;
}

:is(
    .login-panel,
    .profile-card,
    .record-panel,
    .info-card,
    .medical-background-panel,
    .mini-panel,
    .medication-card,
    .note-panel,
    .contact-card,
    .protocol-panel,
    .consultation-panel,
    .document-panel,
    .uploaded-panel,
    .checkin-scan-panel,
    .current-student-panel,
    .current-student-card,
    .recent-checkins-panel,
    .reports-filter-panel,
    .report-summary-card,
    .report-distribution-panel,
    .duty-stat-card,
    .duty-roster-panel,
    .duty-month-card,
    .account-metric-card,
    .account-directory-panel,
    .activity-stat-card,
    .activity-filter-panel,
    .activity-table-panel,
    .profile-photo-card,
    .appointment-report-panel,
    .appointment-card,
    .clinic-stat-card,
    .clinic-duty-card,
    .admin-dashboard-card,
    .provision-nfc-card,
    .nfc-card-panel
) {
    transition-property: transform, box-shadow, border-color;
    transition-duration: 180ms;
    transition-timing-function: ease;
}

:is(
    .login-panel,
    .profile-card,
    .record-panel,
    .info-card,
    .medical-background-panel,
    .mini-panel,
    .medication-card,
    .note-panel,
    .contact-card,
    .protocol-panel,
    .consultation-panel,
    .document-panel,
    .uploaded-panel,
    .checkin-scan-panel,
    .current-student-panel,
    .current-student-card,
    .recent-checkins-panel,
    .reports-filter-panel,
    .report-summary-card,
    .report-distribution-panel,
    .duty-stat-card,
    .duty-roster-panel,
    .duty-month-card,
    .account-metric-card,
    .account-directory-panel,
    .activity-stat-card,
    .activity-filter-panel,
    .activity-table-panel,
    .profile-photo-card,
    .appointment-report-panel,
    .appointment-card,
    .clinic-stat-card,
    .clinic-duty-card,
    .admin-dashboard-card,
    .provision-nfc-card,
    .nfc-card-panel
):hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: #dbeafe;
}

@media (prefers-reduced-motion: reduce) {
    button:not(:disabled),
    a[href],
    :is(
        .login-panel,
        .profile-card,
        .record-panel,
        .info-card,
        .medical-background-panel,
        .mini-panel,
        .medication-card,
        .note-panel,
        .contact-card,
        .protocol-panel,
        .consultation-panel,
        .document-panel,
        .uploaded-panel,
        .checkin-scan-panel,
        .current-student-panel,
        .current-student-card,
        .recent-checkins-panel,
        .reports-filter-panel,
        .report-summary-card,
        .report-distribution-panel,
        .duty-stat-card,
        .duty-roster-panel,
        .duty-month-card,
        .account-metric-card,
        .account-directory-panel,
        .activity-stat-card,
        .activity-filter-panel,
        .activity-table-panel,
        .profile-photo-card,
        .appointment-report-panel,
        .appointment-card,
        .clinic-stat-card,
        .clinic-duty-card,
        .admin-dashboard-card,
        .provision-nfc-card,
        .nfc-card-panel
    ) {
        transition: none;
    }

    button:not(:disabled):hover,
    a[href]:hover,
    :is(
        .login-panel,
        .profile-card,
        .record-panel,
        .info-card,
        .medical-background-panel,
        .mini-panel,
        .medication-card,
        .note-panel,
        .contact-card,
        .protocol-panel,
        .consultation-panel,
        .document-panel,
        .uploaded-panel,
        .checkin-scan-panel,
        .current-student-panel,
        .current-student-card,
        .recent-checkins-panel,
        .reports-filter-panel,
        .report-summary-card,
        .report-distribution-panel,
        .duty-stat-card,
        .duty-roster-panel,
        .duty-month-card,
        .account-metric-card,
        .account-directory-panel,
        .activity-stat-card,
        .activity-filter-panel,
        .activity-table-panel,
        .profile-photo-card,
        .appointment-report-panel,
        .appointment-card,
        .clinic-stat-card,
        .clinic-duty-card,
        .provision-nfc-card,
        .nfc-card-panel
    ):hover {
        transform: none;
    }

    button:not(:disabled),
    a[href] {
        top: 0;
    }
}

/* Settings Page Styles */
.settings-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: #f6f8fd;
}

.settings-layout {
    display: flex;
    min-height: 100vh;
}

.settings-main {
    width: min(100%, 920px);
    min-width: 0;
    margin: 0 auto;
    padding: 38px 32px;
}

.settings-heading h1 {
    margin: 0;
    color: #102039;
    font-size: 1.75rem;
    font-weight: 800;
}

.settings-heading p {
    margin: 7px 0 22px;
    color: #64748b;
    font-size: 0.875rem;
}

.settings-section {
    max-width: 680px;
    padding: 24px;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.settings-card {
    max-width: 680px;
    padding: 24px;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.settings-form,
.settings-form-grid {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.settings-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.settings-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.settings-label {
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 700;
}

.settings-input,
.settings-textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #dbe3ef;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.875rem;
    box-sizing: border-box;
}

.settings-textarea {
    min-height: 80px;
    resize: vertical;
}

.settings-file-input {
    width: 100%;
    min-height: 48px;
    padding: 6px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    font: inherit;
    font-size: 0.875rem;
}

.settings-file-input::file-selector-button {
    min-height: 34px;
    margin-right: 12px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: #eaf2ff;
    color: #1d4ed8;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}

.settings-file-input::file-selector-button:hover {
    background: #dbeafe;
    color: #1e40af;
}

.settings-file-input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}

.settings-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.settings-preview img,
.settings-preview > span {
    display: grid;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #eaf2ff;
    color: #2563eb;
    object-fit: cover;
    font-size: 1.4rem;
}

.settings-preview > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.settings-preview strong {
    color: #102039;
    font-size: 1rem;
}

.settings-preview small {
    color: #64748b;
    font-size: 0.8125rem;
}

.settings-button {
    align-self: flex-start;
    min-height: 42px;
    margin-top: 5px;
    padding: 0 18px;
    border: 0;
    border-radius: 9px;
    background: #1d4ed8;
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}

.settings-button:hover {
    background: #1e40af;
}

.settings-button--secondary {
    align-self: flex-start;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #dbe3ef;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.settings-button--secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.settings-button--ghost {
    align-self: flex-start;
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #dc2626;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}

.settings-button--ghost:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.settings-message {
    max-width: 680px;
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 0.875rem;
}

.settings-message--success {
    background: #ecfdf5;
    color: #047857;
}

.settings-message--error {
    background: #fef2f2;
    color: #b91c1c;
}

.contact-row {
    border: 1px solid #e8edf5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafbfd;
    transition: background-color 160ms ease;
}

.contact-row:hover {
    background: #f1f5f9;
}

.contact-row legend {
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.contact-row-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.contact-row-actions {
    display: flex;
    justify-content: flex-end;
}

.settings-account-select {
    margin-bottom: 16px;
}

.settings-select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #dbe3ef;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.875rem;
    box-sizing: border-box;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Profile Photo Upload in Patient/Medical Profile */
.profile-photo-upload {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-photo-img,
.profile-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-photo-img {
    border: 3px solid #eaf2ff;
}

.profile-photo-placeholder {
    display: grid;
    place-items: center;
    background: #eaf2ff;
    color: #2563eb;
    font-size: 2rem;
    border: 3px solid #eaf2ff;
}

.profile-photo-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 200px;
}

.profile-photo-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #eaf2ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
    white-space: nowrap;
}

.profile-photo-label:hover {
    background: #dbeafe;
    color: #1e40af;
}

.profile-photo-input {
    display: none;
}

.profile-photo-submit {
    padding: 8px 16px;
    background: #1d4ed8;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.profile-photo-submit:hover {
    background: #1e40af;
}

@media (max-width: 767px) {
    .settings-layout {
        display: block;
    }

    .settings-main {
        padding: 26px 18px;
    }

    .settings-section,
    .settings-card {
        padding: 18px;
    }

    .settings-form-row,
    .contact-row-fields {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .settings-file-input::file-selector-button,
    .settings-button,
    .settings-button--secondary,
    .settings-button--ghost,
    .remove-contact {
        transition: none;
    }
}

.reports-notification {
    cursor: default;
}

.reports-notification:hover {
    background: transparent;
}

.consultation-export-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px 24px;
    border: 1px solid #a7f3d0;
    border-radius: 14px;
    background: #ecfdf5;
    box-shadow: 0 2px 6px rgb(15 23 42 / 5%);
}

.consultation-log-table {
    min-width: 1000px;
}

.consultation-export-panel h2 {
    margin: 0;
    color: #065f46;
    font-size: 17px;
    font-weight: 700;
}

.consultation-export-panel p {
    margin: 5px 0 0;
    color: #475569;
    font-size: 13px;
}

.consultation-export-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 760px;
    margin-top: 20px;
}

.consultation-export-date {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.consultation-export-date label {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.consultation-export-date label span {
    color: #64748b;
    font-weight: 400;
}

.consultation-export-date input[type="date"] {
    min-width: 190px;
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
}

.consultation-export-refresh,
.consultation-export-select-all {
    padding: 9px 13px;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    background: #fff;
    color: #047857;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.consultation-export-refresh:hover,
.consultation-export-select-all:hover {
    background: #d1fae5;
}

.consultation-export-students {
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid #dbe5e1;
    border-radius: 10px;
    background: #fff;
}

.consultation-export-students legend {
    padding: 0 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.consultation-export-students legend span {
    margin-left: 6px;
    color: #047857;
    font-size: 12px;
    font-weight: 600;
}

.consultation-export-student-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding: 2px;
}

.consultation-export-student {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.consultation-export-student:hover {
    border-color: #6ee7b7;
    background: #f0fdf4;
}

.consultation-export-student:has(input:checked) {
    border-color: #10b981;
    background: #ecfdf5;
    box-shadow: 0 0 0 1px #10b981;
}

.consultation-export-student input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.consultation-export-student input:focus-visible + .consultation-export-student-check {
    outline: 3px solid #6ee7b7;
    outline-offset: 3px;
}

.consultation-export-student-check {
    display: inline-flex;
    flex: 0 0 19px;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border: 1px solid #94a3b8;
    border-radius: 5px;
    background: #fff;
}

.consultation-export-student input:checked + .consultation-export-student-check {
    border-color: #059669;
    background: #059669;
}

.consultation-export-student input:checked + .consultation-export-student-check::after {
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    content: "";
    transform: rotate(45deg) translate(-1px, -1px);
}

.consultation-export-student-info {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.consultation-export-student-info strong {
    overflow: hidden;
    color: #1e293b;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.consultation-export-student-info small,
.consultation-export-help {
    color: #64748b;
    font-size: 12px;
}

.consultation-export-select-all {
    margin-top: 10px;
}

.consultation-export-empty {
    margin: 4px 0;
    color: #64748b;
    font-size: 13px;
}

.consultation-export-help {
    margin: 0;
}

.consultation-export-submit {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: #047857;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.consultation-export-submit:hover:not(:disabled) {
    background: #065f46;
}

.consultation-export-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .consultation-export-panel {
        padding: 18px;
    }

    .consultation-export-date {
        align-items: stretch;
        flex-direction: column;
    }

    .consultation-export-date input[type="date"],
    .consultation-export-refresh,
    .consultation-export-submit {
        width: 100%;
    }

    .consultation-export-submit {
        justify-content: center;
    }
}

/* Typeahead student search for consultation export */
.export-student-picker {
    position: relative;
    margin-bottom: 12px;
}

.export-student-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.export-student-search i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.export-student-search input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 13px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.export-student-search input:focus {
    outline: none;
    border-color: #047857;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.export-student-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #dbe5e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(15 23 42 / 12%);
    z-index: 100;
    margin: 0;
}

.export-student-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 100ms ease;
}

.export-student-result-item:last-child {
    border-bottom: 0;
}

.export-student-result-item:hover,
.export-student-result-item:focus {
    background: #f0fdf4;
    outline: none;
}

.export-student-result-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.export-student-result-meta {
    flex-shrink: 0;
    color: #64748b;
    font-size: 11px;
    white-space: nowrap;
}

.export-selected-students {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 44px;
    padding: 8px;
    border: 1px solid #dbe5e1;
    border-radius: 10px;
    background: #fafafa;
    transition: border-color 120ms ease, background 120ms ease;
}

.export-selected-students:focus-within {
    border-color: #047857;
    background: #fff;
}

.export-student-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 8px;
    border: 1px solid #a7f3d0;
    border-radius: 20px;
    background: #ecfdf5;
    font-size: 12px;
    color: #065f46;
    white-space: nowrap;
}

.export-student-tag-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.export-student-tag-id {
    color: #047857;
    opacity: 0.7;
    font-size: 11px;
}

.export-student-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #047857;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 100ms ease, color 100ms ease;
}

.export-student-tag-remove:hover {
    background: #d1fae5;
    color: #065f46;
}

.export-student-tag-remove:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
}

.consultation-export-help {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 12px;
}

body.auth-page {
    background-color: #c4e0ff;
    background-image: linear-gradient(180deg, #ffffff 0%, #f5f9ff 28%, #d8eaff 62%, #b8d8ff 100%);
    font-family: 'Inter', 'DM Sans', 'Segoe UI', sans-serif;
    font-size: 16px;
}

body.auth-page .login-panel {
    border-color: #e4edf8;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(37, 75, 130, 0.12);
}

body.auth-page .brand h1 {
    font-size: 26px;
    letter-spacing: -0.035em;
}

body.auth-page .brand p {
    color: #52647e;
    font-size: 16px;
}

body.auth-page .form-field label {
    font-size: 15px;
}

body.auth-page .status-message,
body.auth-page .divider {
    font-size: 14px;
}

body.auth-page .contactless-button,
body.auth-page .sign-in-button {
    font-size: 16px;
}

body.auth-page .support-links {
    font-size: 15px;
}

.patient-record-identity {
    display: flex;
    min-width: 13rem;
    align-items: center;
    gap: 12px;
}

.patient-record-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dce7f5;
    border-radius: 50%;
    background: #eaf2ff;
    color: #315d9f;
}

.patient-record-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.patient-record-avatar i {
    font-size: 18px;
}

.patient-record-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.patient-record-name {
    color: #172b4d;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.patient-record-email {
    overflow-wrap: anywhere;
    color: #64748b;
    font-size: 14px;
    line-height: 1.4;
}

.patient-search-table thead th {
    color: #52647e;
    font-size: 14px;
    letter-spacing: 0.045em;
}

.patient-search-table tbody td {
    font-size: 14px;
}

.patient-search-table tbody tr {
    transition: background-color 0.16s ease;
}

@media (max-width: 640px) {
    .patient-record-identity {
        min-width: 12rem;
    }

    .patient-record-avatar {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
}
.required-field-indicator {
    color: #dc2626;
    font-weight: 700;
}
