/* ======================================================
   GLOBAL BASE STYLES
   ====================================================== */

html,
body {
    font-family: "Inter Tight", Arial, Helvetica, sans-serif;
    font-size: 0.92rem;
    font-weight: 400;
    margin: 0;
    color: #374151;
    background-color: #f8fafb;
}

/* Links */
a,
.btn-link {
    color: #004266;
    text-decoration: none;
}

    a:hover,
    .btn-link:hover {
        color: #00324D;
        text-decoration: underline;
    }

    /* Focus ring consistency */
    .btn:focus,
    .btn:active:focus,
    .btn-link.nav-link:focus,
    .form-control:focus,
    .form-check-input:focus {
        box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(47, 122, 156, 0.35);
    }

/* ======================================================
   FORMS & VALIDATION
   ====================================================== */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid,
.validation-message {
    outline: none !important;
    color: #dc3545;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Floating labels */
.form-floating > .form-control::placeholder,
.form-floating > .form-control-plaintext::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control:focus::placeholder,
.form-floating > .form-control-plaintext:focus::placeholder {
    text-align: start;
}

/* ======================================================
   PAGE LAYOUT STRUCTURE
   ====================================================== */

#layout {
    position: relative;
    height: 100vh;
    overflow: visible;
}

/* ======================================================
   SIDEBAR (slides, never squashes)
   ====================================================== */

#sidenav {
    position: fixed;
    top: 0;
    left: 0;
    width: 170px;
    height: 100vh;
    z-index: 2000;
    transform: translateX(-170px);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
    background-color: #f4f6f8;
    overflow: hidden;
    border-right: 1px solid #e3eaee;
}

    #sidenav.expanded {
        transform: translateX(0);
    }

    #sidenav * {
        max-width: 100%;
    }

/* ======================================================
   MAIN CONTENT (moves right)
   ====================================================== */

#main {
    position: relative;
    width: 100%;
    height: 100vh;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    background: #f8fafb;
    overflow: hidden;
    transition: margin-left .3s ease, width .3s ease;
}

@media (min-width: 768px) {
    #sidenav.expanded ~ #main {
        margin-left: 170px;
        width: calc(100% - 170px);
    }
}

@media (max-width: 767.98px) {
    #sidenav {
        top: 100px;
        height: calc(100vh - 100px);
        z-index: 3000;
    }

        #main,
        #sidenav.expanded ~ #main {
            margin-left: 0 !important;
            width: 100% !important;
        }
}

#main .content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: visible;
    padding-top: 6px;
}

/* ======================================================
   SIDEBAR HEADER
   ====================================================== */

#sidenav .heading {
    min-height: 100px;
    max-height: 120px;
    padding: 0.85rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e3eaee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    position: sticky;
    top: 0;
    z-index: 3;
    background-color: #fff;
}

    #sidenav .heading .topbar-logo {
        width: 100px;
        height: auto;
        display: block;
        margin-bottom: 4px;
    }

.footer-logo {
    max-width: 65px;
    width: 100%;
    height: auto;
}

/* ======================================================
   SIDEBAR NAVIGATION
   ====================================================== */

#sidenav .nav-scrollable {
    flex: 1 1 auto;
    min-height: 0;
    padding: 7px 0 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #004266 transparent;
}

    #sidenav .nav-scrollable::-webkit-scrollbar {
        width: 6px;
    }

    #sidenav .nav-scrollable::-webkit-scrollbar-track {
        background: transparent;
    }

    #sidenav .nav-scrollable::-webkit-scrollbar-thumb {
        background-color: #004266;
        border-radius: 10px;
    }

        #sidenav .nav-scrollable::-webkit-scrollbar-thumb:hover {
            background-color: #7A66B3;
        }

#sidenav .nav-item {
    width: 100%;
    margin: 2px 0;
}

#sidenav .nav-link {
    width: 100%;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #4b5563;
    background: transparent;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

    #sidenav .nav-link i {
        font-size: 1rem;
        line-height: 1;
    }

    #sidenav .nav-link:hover {
        color: #004266;
        background: rgba(47, 122, 156, 0.06);
        border-color: rgba(47, 122, 156, 0.12);
    }

    #sidenav .nav-link.active {
        background: rgba(47, 122, 156, 0.1);
        border-color: rgba(47, 122, 156, 0.2);
        color: #004266;
        font-weight: 600;
    }

        #sidenav .nav-link.active i {
            color: #004266;
        }

/* ======================================================
   SIDEBAR FOOTER
   ====================================================== */

#sidenav .sidebar-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 8px;
    background-color: #f4f6f8;
    border-top: 1px solid #e3eaee;
}

    #sidenav .sidebar-footer .footer-content {
        width: 100%;
        text-align: center;
        font-size: 0.6rem;
        font-weight: 600;
        color: #6b7280;
    }

        #sidenav .sidebar-footer .footer-content .powered-by {
            display: block;
            margin-top: 4px;
        }

        #sidenav .sidebar-footer .footer-content a.dev {
            color: #004266;
            font-weight: 600;
            text-decoration: none;
        }

            #sidenav .sidebar-footer .footer-content a.dev:hover {
                text-decoration: underline;
            }

/* ======================================================
   TOPBAR
   ====================================================== */

#main-topbar {
    position: sticky;
    top: 0;
    min-height: 100px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #f8fafb 0%, #ffffff 50%, #f8fafb 100%);
    border-bottom: 1px solid #e3eaee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    z-index: 1100;
}

    #main-topbar .ms-auto {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    #main-topbar .topbar-link {
        font-size: 0.9rem;
        font-weight: 500;
        color: #4b5563;
        text-decoration: none;
    }

        #main-topbar .topbar-link:hover {
            color: #004266;
        }

    #main-topbar .topbar-separator {
        color: #cbd5e1;
        padding-left: 4px;
        padding-right: 4px;
    }

.topbar-controls {
    display: flex;
    font-size: 1.5rem;
}

    .topbar-controls button {
        background: none;
        border: none;
        color: #4b5563;
        cursor: pointer;
        transition: color 0.15s ease;
    }

        .topbar-controls button:hover {
            color: #004266;
        }

/* ======================================================
   TABLES & DRAG SCROLL
   ====================================================== */

.card .table-responsive,
.card .drag-scroll-wrapper {
    background: #ffffff;
    border: 1px solid #e3eaee;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    background-color: #ffffff;
    color: #374151;
}

    .table thead th {
        background-color: #f8fafb;
        color: #4b5563;
        font-size: 0.78rem;
        font-weight: 600;
        padding: 10px 14px;
        border-bottom: 1px solid #e3eaee;
        vertical-align: middle;
        white-space: nowrap;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .table tbody td {
        padding: 12px 14px;
        vertical-align: middle;
        border-bottom: 1px solid #edf2f5;
        color: #374151;
    }

    .table tbody tr:nth-child(even) td {
        background-color: #fcfdfe;
    }

.table-hover tbody tr:hover td {
    background-color: #f4f8fb;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table thead th:first-child {
    border-top-left-radius: 8px;
}

.table thead th:last-child {
    border-top-right-radius: 8px;
}

.drag-scroll-wrapper > .table {
    width: auto;
    min-width: 100%;
    table-layout: auto;
}

/* Scrollbars for tables */
.drag-scroll-wrapper::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.drag-scroll-wrapper::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.drag-scroll-wrapper::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f7;
    border-radius: 10px;
}

.drag-scroll-wrapper::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

    .drag-scroll-wrapper::-webkit-scrollbar-thumb:hover,
    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #004266;
    }

/* ======================================================
   CUSTOM BUTTONS (PRACTICE DESIGN SYSTEM)
   ====================================================== */

.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.375rem 0.85rem;
    transition: all 0.15s ease-in-out;
}

/* Cerulean Light (Primary Practice Accent) */
.btn-cerulean-light,
.btn-cerulean {
    background-color: #17618A;
    border-color: #004266;
    color: #fff;
}

    .btn-cerulean-light:hover,
    .btn-cerulean:hover {
        background-color: #125675;
        border-color: #00324D;
        color: #fff;
    }

    .btn-cerulean-light:active,
    .btn-cerulean-light:focus,
    .btn-cerulean:active,
    .btn-cerulean:focus {
        background-color: #0D4966;
        border-color: #00324D;
        box-shadow: 0 0 0 .25rem rgba(58, 143, 183, .35);
        color: #fff;
    }

/* Cerulean Dark */
.btn-cerulean-dark {
    background-color: #004266;
    border-color: #184E5E;
    color: #fff;
}

    .btn-cerulean-dark:hover {
        background-color: #1B5567;
        border-color: #144652;
        color: #fff;
    }

    .btn-cerulean-dark:active,
    .btn-cerulean-dark:focus {
        background-color: #174A5A;
        border-color: #113C48;
        box-shadow: 0 0 0 .25rem rgba(31, 95, 115, .35);
        color: #fff;
    }

/* Lavender (Secondary Accent) */
.btn-lavender,
.btn-purple {
    background-color: #7A66B3;
    border-color: #6442B0;
    color: white;
}

    .btn-lavender:hover,
    .btn-purple:hover {
        background-color: #6f42c1;
        border-color: #5c3da4;
        color: white;
    }

    .btn-lavender:active,
    .btn-lavender:focus,
    .btn-purple:active,
    .btn-purple:focus {
        background-color: #5a32a3;
        border-color: #5a32a3;
        box-shadow: 0 0 0 .25rem rgba(122, 102, 179, .35);
        color: white;
    }

/* Standard UI Buttons */
.btn-blue {
    background-color: #1B6EC2;
    border-color: #155A9E;
    color: #fff;
}

    .btn-blue:hover {
        background-color: #1861AC;
        color: #fff;
    }

.btn-grey {
    background-color: #6c757d;
    border-color: #565e64;
    color: #fff;
}

    .btn-grey:hover {
        background-color: #5a6268;
        color: #fff;
    }

.btn-red,
.btn-delete {
    background-color: transparent;
    border-color: #dc3545;
    color: #dc3545;
}

    .btn-red:hover,
    .btn-delete:hover,
    .btn-delete:focus,
    .btn-delete:active {
        background-color: #dc3545;
        border-color: #dc3545;
        color: #fff !important;
    }

.btn-gold {
    background-color: #D4AF37;
    border-color: #B8962E;
    color: #fff;
}

    .btn-gold:hover {
        background-color: #C9A533;
        color: #fff;
    }

/* Disabled Buttons */
.btn:disabled,
.btn.disabled {
    opacity: .65;
    cursor: not-allowed;
    box-shadow: none !important;
}

.btn.btn-cerulean-light:disabled,
.btn.btn-cerulean-light.disabled,
.btn.btn-cerulean-dark:disabled,
.btn.btn-cerulean-dark.disabled,
.btn.btn-purple:disabled,
.btn.btn-purple.disabled {
    opacity: .65;
}

/* ======================================================
   ALERTS & BADGES
   ====================================================== */

.alert-cerulean {
    background-color: #eaf6fb;
    border: 1px solid #004266;
    color: #004266;
}

.alert-purple {
    background-color: #f0e6ff;
    border: 1px solid #d0b8ff;
    color: #4b0082;
}

.alert-gold {
    background-color: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #6b5600;
}

.badge {
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
}

    .badge.bg-cerulean {
        background-color: #004266;
        color: #ffffff;
    }

        .badge.bg-cerulean:hover {
            background-color: #00324D;
        }

    .badge.bg-purple {
        background-color: #7A66B3;
        color: #ffffff;
    }

    .badge.bg-orange {
        background-color: #fd7e14;
        color: #ffffff;
    }

/* Status text coloring */
.text-red {
    color: #dc3545;
}

.text-orange {
    color: #fd7e14;
    font-weight: 600;
}

.text-green, .text-cerulean {
    color: #004266;
    font-weight: 600;
}

/* ======================================================
   MODALS & OVERLAYS
   ====================================================== */

.modal {
    z-index: 30000 !important;
}

.modal-backdrop {
    z-index: 29900 !important;
}

.modal-dialog,
.modal-content {
    z-index: 30001 !important;
}

.modal-dialog {
    max-height: 95vh;
}

.modal-body {
    overflow-y: auto;
}

.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(1px);
    z-index: 40000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-overlay-box {
    text-align: center;
    font-weight: 600;
    background: #ffffff;
    padding: 28px 36px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    min-width: 280px;
}

/* ======================================================
   MOBILE OVERLAY & RESPONSIVE ADJUSTMENTS
   ====================================================== */

.mobile-nav-overlay {
    display: none;
}

@media (max-width: 767.98px) {
    #sidenav .heading {
        display: none;
    }

    .topbar-controls button:nth-child(2) {
        display: none;
    }

    .topbar-controls {
        width: 170px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        margin-top: 0;
        margin-left: 0;
        padding-left: 0;
        box-sizing: border-box;
    }

        .topbar-controls button:first-child {
            padding-left: 0;
            margin-left: 0;
        }

    .mobile-nav-overlay {
        position: fixed;
        top: 100px;
        left: 170px;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.05);
        z-index: 2500;
        display: block;
        pointer-events: auto;
    }
}



/* ==========================================================
   TPSEN PORTAL - MODERN PRACTICE DESIGN
   ========================================================== */

:root {
    --portal-primary: #004266;
    --portal-primary-dark: #00324D;
    --portal-primary-light: #EAF3F8;
    --portal-accent: #FFAE70;
    --portal-background: #F3F7FA;
    --portal-surface: #FFFFFF;
    --portal-border: #DFE8ED;
    --portal-text: #263B43;
    --portal-muted: #788B92;
    --portal-success: #23836A;
    --portal-success-bg: #E8F5EF;
    --portal-warning: #C87945;
    --portal-warning-bg: #FFF1E7;
    --portal-danger: #B84D56;
    --portal-danger-bg: #FFF0F0;
    --portal-radius: 12px;
    --portal-shadow: 0 3px 15px rgba(0, 66, 102, 0.055);
    /* Letterhead palette aliases */
    --letter-primary: #004266;
    --letter-primary-dark: #00324D;
    --letter-accent: #FFAE70;
    --letter-light: #EAF3F8;
    --letter-text: #263B43;
    --letter-muted: #788B92;
    --letter-border: #DFE8ED;
}

/* PAGE BACKGROUND */

.portal-container {
    width: 100%;
    max-width: 1500px;
    min-width: 0;
    margin: 0 auto;
    padding: 28px 32px 45px;
    color: var(--portal-text);
    box-sizing: border-box;
}

    .portal-container *,
    .portal-container *::before,
    .portal-container *::after {
        box-sizing: border-box;
    }

/* ==========================================================
   USER BAR
   ========================================================== */

.portal-userbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 13px 18px;
    margin-bottom: 30px;
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
}

.portal-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.portal-user-avatar {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--portal-primary-light);
    color: var(--portal-primary);
    font-size: 1.15rem;
}

.portal-user-info > div:nth-child(2) {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.portal-user-label {
    color: var(--portal-muted);
    font-size: 0.73rem;
}

.portal-user-info strong {
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.portal-user-info .btn {
    margin-left: 12px;
}

.btn-profile,
.btn-logout {
    font-size: 0.79rem;
    font-weight: 700;
    border-radius: 7px;
    padding: 7px 11px;
    white-space: nowrap;
}

.btn-profile {
    color: var(--portal-primary);
    border: 1px solid var(--portal-border);
    background: white;
}

    .btn-profile:hover {
        background: var(--portal-primary-light);
        color: var(--portal-primary-dark);
    }

.btn-logout {
    color: var(--portal-danger);
    border: 1px solid #F0D9DB;
    background: white;
}

    .btn-logout:hover {
        background: var(--portal-danger-bg);
        color: var(--portal-danger);
    }

/* ==========================================================
   LOGIN SCREEN
   ========================================================== */

.login-page {
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 35px 15px;
}

.login-card {
    width: 100%;
    max-width: 510px;
    padding: 45px 48px 38px;
    background: white;
    border: 1px solid var(--portal-border);
    border-radius: 20px;
    box-shadow: 0 12px 45px rgba(29, 65, 74, 0.09);
    text-align: center;
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.login-brand-icon {
    width: 66px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 19px;
    background: linear-gradient(145deg, var(--portal-primary), var(--portal-accent));
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 6px 18px rgba(23, 107, 112, 0.2);
}

.login-brand > span {
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 2.2px;
    color: var(--portal-muted);
}

.login-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--portal-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.login-heading h1 {
    margin: 0;
    color: #64777E;
    font-size: 1.05rem;
    font-weight: 400;
}

.login-heading h2 {
    margin: 9px 0 5px;
    color: var(--portal-primary-dark);
    font-size: clamp(1.65rem, 5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.7px;
}

.login-heading > p {
    margin: 0;
    color: #70868C;
    font-size: 1rem;
    font-weight: 500;
}

.login-divider {
    width: 55px;
    height: 3px;
    margin: 25px auto;
    background: var(--portal-accent);
    border-radius: 5px;
}

.login-description {
    margin-bottom: 25px;
}

    .login-description p {
        margin: 0;
        color: #687B82;
        font-size: 0.9rem;
        line-height: 1.8;
    }

.btn-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 20px;
    border: 1px solid var(--portal-primary);
    border-radius: 9px;
    background: var(--portal-primary);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .btn-login:hover {
        background: var(--portal-primary-dark);
        border-color: var(--portal-primary-dark);
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 5px 15px rgba(23, 107, 112, 0.2);
    }

.login-help {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--portal-border);
}

    .login-help > span {
        display: block;
        color: var(--portal-text);
        font-size: 0.84rem;
        font-weight: 600;
    }

    .login-help p {
        margin: 5px 0 13px;
        color: var(--portal-muted);
        font-size: 0.8rem;
    }

.login-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

    .login-contact a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--portal-primary);
        font-size: 0.81rem;
        font-weight: 600;
        text-decoration: none;
    }

        .login-contact a:hover {
            color: var(--portal-primary-dark);
            text-decoration: underline;
        }

.login-help small {
    display: block;
    margin-top: 15px;
    color: var(--portal-muted);
    font-size: 0.73rem;
}

.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    color: var(--portal-muted);
    font-size: 0.76rem;
}

/* ==========================================================
   PAGE HEADINGS
   ========================================================== */

.portal-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 26px;
}

.portal-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--portal-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.7px;
}

.portal-heading h1 {
    margin: 0;
    color: var(--portal-primary-dark);
    font-size: clamp(1.65rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.6px;
}

.portal-heading p {
    margin: 7px 0 0;
    color: var(--portal-muted);
    font-size: 0.88rem;
}

.portal-heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.btn-export,
.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
}

.btn-export {
    color: var(--portal-primary);
    background: white;
    border: 1px solid var(--portal-border);
}

    .btn-export:hover:not(:disabled) {
        color: var(--portal-primary-dark);
        background: var(--portal-primary-light);
    }

.btn-register {
    color: white;
    background: var(--portal-primary);
    border: 1px solid var(--portal-primary);
}

    .btn-register:hover {
        color: white;
        background: var(--portal-primary-dark);
        border-color: var(--portal-primary-dark);
    }

/* ==========================================================
   DASHBOARD SUMMARY CARDS
   ========================================================== */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 21px 22px;
    background: white;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 7px 20px rgba(29, 65, 74, 0.09);
    }

.stat-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.3rem;
}

.stat-total .stat-icon {
    color: var(--portal-primary);
    background: var(--portal-primary-light);
}

.stat-completed .stat-icon {
    color: var(--portal-success);
    background: var(--portal-success-bg);
}

.stat-pending .stat-icon {
    color: var(--portal-warning);
    background: var(--portal-warning-bg);
}

.stat-card > div:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-card span {
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.stat-card strong {
    margin-top: 3px;
    color: var(--portal-text);
    font-size: 1.8rem;
    line-height: 1.2;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================
   PANELS
   ========================================================== */

.portal-panel {
    min-width: 0;
    margin-bottom: 20px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 18px 21px;
    border-bottom: 1px solid var(--portal-border);
}

    .panel-heading h5 {
        margin: 0;
        color: var(--portal-text);
        font-size: 0.95rem;
        font-weight: 700;
    }

    .panel-heading > div > span {
        display: block;
        margin-top: 4px;
        color: var(--portal-muted);
        font-size: 0.77rem;
    }

.panel-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--portal-primary);
    background: var(--portal-primary-light);
}

/* ==========================================================
   SEARCH AND FILTERS
   ========================================================== */

.filter-panel {
    padding: 19px 21px;
}

.filter-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

    .filter-header h5 {
        margin: 0;
        color: var(--portal-text);
        font-size: 1rem;
        font-weight: 700;
    }

    .filter-header span {
        display: block;
        margin-top: 3px;
        color: var(--portal-muted);
        font-size: 0.76rem;
    }

    .filter-header .panel-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-top: 0;
    }

    .filter-header > i {
        color: var(--portal-accent);
        font-size: 1.25rem;
    }

.filter-controls {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(150px, 200px) 125px;
    align-items: end;
    gap: 13px;
}

.search-control {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

    .search-control > i {
        position: absolute;
        left: 13px;
        z-index: 2;
        color: var(--portal-muted);
    }

    .search-control .form-control {
        min-width: 0;
        height: 42px;
        padding: 9px 38px;
        border: 1px solid var(--portal-border);
        border-radius: 8px;
        color: var(--portal-text);
        font-size: 0.82rem;
        box-shadow: none;
    }

        .search-control .form-control:focus,
        .filter-select .form-select:focus {
            border-color: var(--portal-accent);
            box-shadow: 0 0 0 3px rgba(72, 166, 160, 0.12);
        }

        .search-control .form-control::placeholder {
            color: #A0ADB1;
        }

.search-reset {
    position: absolute;
    right: 10px;
    z-index: 3;
    padding: 4px;
    border: 0;
    background: transparent;
    color: var(--portal-muted);
}

.filter-select {
    min-width: 0;
}

    .filter-select label {
        display: block;
        margin-bottom: 6px;
        color: var(--portal-muted);
        font-size: 0.72rem;
        font-weight: 600;
    }

    .filter-select .form-select {
        height: 42px;
        border: 1px solid var(--portal-border);
        border-radius: 8px;
        color: var(--portal-text);
        font-size: 0.82rem;
        box-shadow: none;
    }

/* ==========================================================
   TABLES - INCLUDING MOBILE HORIZONTAL SCROLL
   ========================================================== */

.portal-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #A7C4C5 #EDF3F4;
}

    .portal-table-scroll::-webkit-scrollbar {
        height: 9px;
    }

    .portal-table-scroll::-webkit-scrollbar-track {
        background: #EDF3F4;
        border-radius: 10px;
    }

    .portal-table-scroll::-webkit-scrollbar-thumb {
        background: #A7C4C5;
        border-radius: 10px;
    }

        .portal-table-scroll::-webkit-scrollbar-thumb:hover {
            background: var(--portal-primary);
        }

.portal-table {
    width: 100%;
    min-width: 1050px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--portal-text);
    font-size: 0.82rem;
}

    .portal-table thead th {
        padding: 14px 15px;
        background: #F5F9F9;
        border-bottom: 1px solid var(--portal-border);
        color: #647A81;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.3px;
        white-space: nowrap;
        vertical-align: middle;
    }

        .portal-table thead th button {
            padding: 0;
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
            white-space: nowrap;
            cursor: pointer;
        }

            .portal-table thead th button:hover {
                color: var(--portal-primary);
            }

    .portal-table tbody td {
        padding: 14px 15px;
        border-bottom: 1px solid #EDF1F2;
        color: #52666D;
        vertical-align: middle;
    }

    .portal-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .portal-table.table-hover > tbody > tr:hover > * {
        --bs-table-bg-state: #F5FAFA;
        color: var(--portal-text);
    }

    .portal-table .patient-cell {
        color: var(--portal-text);
        font-weight: 600;
    }

    .portal-table .text-nowrap {
        white-space: nowrap;
    }

/* Status indicators */

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-submitted {
    color: var(--portal-success);
    background: var(--portal-success-bg);
}

.status-due {
    color: var(--portal-warning);
    background: var(--portal-warning-bg);
}

/* Table action buttons */

.btn-table-view,
.btn-table-complete,
.btn-table-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.btn-table-view {
    color: var(--portal-primary);
    background: white;
    border: 1px solid #C8DEDE;
}

    .btn-table-view:hover {
        color: white;
        background: var(--portal-primary);
        border-color: var(--portal-primary);
    }

.btn-table-complete {
    color: white;
    background: var(--portal-primary);
    border: 1px solid var(--portal-primary);
}

    .btn-table-complete:hover {
        color: white;
        background: var(--portal-primary-dark);
    }

.btn-table-delete {
    color: var(--portal-danger);
    background: white;
    border: 1px solid #EBCFD1;
}

    .btn-table-delete:hover {
        color: white;
        background: var(--portal-danger);
        border-color: var(--portal-danger);
    }

/* Empty table */

.empty-table {
    height: 150px;
    text-align: center;
}

    .empty-table i,
    .empty-table strong,
    .empty-table span {
        display: block;
    }

    .empty-table i {
        margin-bottom: 9px;
        color: #A5B9BD;
        font-size: 1.8rem;
    }

    .empty-table strong {
        color: var(--portal-text);
        font-size: 0.87rem;
    }

    .empty-table span {
        margin-top: 4px;
        color: var(--portal-muted);
        font-size: 0.77rem;
    }

/* ==========================================================
   PAGINATION
   ========================================================== */

.portal-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px 19px;
    background: #FAFCFC;
    border-top: 1px solid var(--portal-border);
}

.pagination-info {
    color: var(--portal-muted);
    font-size: 0.76rem;
}

    .pagination-info strong {
        color: var(--portal-text);
    }

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--portal-border);
    border-radius: 6px;
    background: white;
    color: var(--portal-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

    .pagination-button:hover:not(:disabled) {
        background: var(--portal-primary);
        border-color: var(--portal-primary);
        color: white;
    }

    .pagination-button:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.pagination-current {
    padding: 0 9px;
    color: var(--portal-text);
    font-size: 0.77rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ==========================================================
   CLIENT PROFILE
   ========================================================== */

.client-profile-panel {
    margin-bottom: 22px;
}

.client-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 19px 21px;
    background: #F7FAFA;
    border-bottom: 1px solid var(--portal-border);
}

.client-profile-info {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.client-profile-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--portal-primary-light);
    color: var(--portal-primary);
    font-size: 1.2rem;
}

.client-profile-info > div:last-child {
    min-width: 0;
}

.client-profile-info span {
    display: block;
    color: var(--portal-muted);
    font-size: 0.71rem;
}

.client-profile-info h4 {
    margin: 2px 0;
    color: var(--portal-primary-dark);
    font-size: 1rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.client-profile-info small {
    color: var(--portal-muted);
    font-size: 0.76rem;
}

.completion-counter {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

    .completion-counter strong {
        color: var(--portal-primary);
        font-size: 1.25rem;
        font-weight: 700;
    }

    .completion-counter span {
        color: var(--portal-muted);
        font-size: 0.7rem;
    }

.client-table {
    min-width: 650px;
}

/* ==========================================================
   EMPTY STATE
   ========================================================== */

.portal-empty-state {
    padding: 55px 25px;
    text-align: center;
    background: white;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
}

.empty-state-icon {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    border-radius: 18px;
    background: var(--portal-primary-light);
    color: var(--portal-primary);
    font-size: 1.8rem;
}

.portal-empty-state h4 {
    color: var(--portal-text);
    font-size: 1.05rem;
    font-weight: 700;
}

.portal-empty-state p {
    max-width: 450px;
    margin: 8px auto 0;
    color: var(--portal-muted);
    font-size: 0.85rem;
    line-height: 1.7;
}

/* ==========================================================
   SECURITY ALERT
   ========================================================== */

.portal-security-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 25px;
    padding: 19px 21px;
    background: #FFF8EA;
    border: 1px solid #F0E1BF;
    border-radius: var(--portal-radius);
}

.security-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #F9EACB;
    color: #C87945;
    font-size: 1.25rem;
}

.security-content {
    min-width: 0;
}

    .security-content h5 {
        margin: 0 0 6px;
        color: #9A5A35;
        font-size: 0.94rem;
        font-weight: 700;
    }

    .security-content p {
        margin: 0 0 12px;
        color: #806A48;
        font-size: 0.82rem;
        line-height: 1.7;
    }

.btn-security {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 7px;
    background: #C87945;
    border: 1px solid #C87945;
    color: white;
    font-size: 0.77rem;
    font-weight: 600;
}

    .btn-security:hover {
        color: white;
        background: #895713;
    }

/* ==========================================================
   RESPONSIVE LAYOUT
   ========================================================== */

@media (max-width: 991.98px) {
    .portal-container {
        padding: 22px 20px 35px;
    }

    .filter-controls {
        grid-template-columns: minmax(0, 1fr) 180px;
    }

    .search-control {
        grid-column: 1 / -1;
    }

    .dashboard-stats {
        gap: 12px;
    }

    .stat-card {
        padding: 17px;
        gap: 11px;
    }
}

@media (max-width: 767.98px) {

    .portal-container {
        padding: 16px 12px 30px;
    }

    .portal-userbar {
        align-items: flex-start;
        padding: 12px;
        gap: 10px;
        margin-bottom: 22px;
    }

    .portal-user-info {
        flex-wrap: wrap;
        gap: 9px;
    }

        .portal-user-info .btn {
            margin-left: 0;
            flex-basis: 100%;
        }

    .btn-logout {
        font-size: 0.72rem;
        padding: 7px 9px;
    }

    .portal-heading {
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .portal-heading-actions {
        width: 100%;
    }

        .portal-heading-actions .btn {
            flex: 1 1 auto;
        }

    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 18px;
    }

    .stat-card {
        padding: 14px 16px;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        font-size: 1.1rem;
    }

    .stat-card strong {
        font-size: 1.45rem;
    }

    .filter-panel {
        padding: 15px;
    }

    .filter-controls {
        grid-template-columns: 1fr 1fr;
        gap: 11px;
    }

    .search-control {
        grid-column: 1 / -1;
    }

    .filter-select {
        min-width: 0;
    }

    .portal-panel {
        border-radius: 10px;
    }

    .panel-heading {
        padding: 15px;
    }

    /* Force the table to retain its column widths.
       The wrapper, not the entire page, scrolls horizontally. */

    .portal-table-scroll {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: hidden;
        touch-action: pan-x pan-y;
    }

    .portal-table {
        width: 1050px;
        min-width: 1050px;
        table-layout: auto;
    }

    .client-table {
        width: 650px;
        min-width: 650px;
    }

    .portal-table thead th,
    .portal-table tbody td {
        padding: 12px 11px;
    }

    .portal-pagination {
        padding: 13px;
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-info {
        text-align: center;
    }

    .pagination-controls {
        justify-content: center;
    }

    .client-profile-header {
        padding: 15px;
    }

    .completion-counter {
        align-items: flex-start;
        margin-left: 56px;
    }

    .portal-security-alert {
        padding: 15px;
        gap: 11px;
    }

    .login-page {
        min-height: auto;
        padding: 30px 0;
    }

    .login-card {
        padding: 35px 22px 28px;
        border-radius: 15px;
    }

    .login-brand {
        margin-bottom: 24px;
    }

    .login-heading h2 {
        font-size: 1.65rem;
    }

    .login-contact {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 380px) {
    .portal-container {
        padding-left: 9px;
        padding-right: 9px;
    }

    .filter-controls {
        grid-template-columns: 1fr;
    }

    .search-control {
        grid-column: auto;
    }

    .portal-heading-actions {
        flex-direction: column;
    }

        .portal-heading-actions .btn {
            width: 100%;
        }

    .login-card {
        padding-left: 17px;
        padding-right: 17px;
    }
}

/* ACCESSIBILITY */

.portal-container button:focus-visible,
.portal-container a:focus-visible,
.portal-container select:focus-visible,
.portal-container input:focus-visible {
    outline: 3px solid rgba(72, 166, 160, 0.4);
    outline-offset: 2px;
}


/* ==========================================================
   TPSEN PROFILE & SECURITY PAGE
   ========================================================== */

.profile-page {
    max-width: 1050px;
}

/* PAGE HEADER */

.profile-heading {
    margin-bottom: 27px;
}

.btn-profile-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    color: var(--portal-primary);
    background: white;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

    .btn-profile-back:hover {
        color: var(--portal-primary-dark);
        background: var(--portal-primary-light);
        border-color: #C8DEDE;
    }

/* INTRO CARD */

.profile-intro-card {
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 20px 22px;
    margin-bottom: 30px;
    background: linear-gradient(110deg, #E8F3F2, #F5FAFA);
    border: 1px solid #DCEBE9;
    border-radius: var(--portal-radius);
}

.profile-intro-icon {
    width: 49px;
    height: 49px;
    flex: 0 0 49px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 13px;
    color: var(--portal-primary);
    font-size: 1.45rem;
}

.profile-intro-content h5 {
    margin: 0 0 5px;
    color: var(--portal-primary-dark);
    font-size: 0.95rem;
    font-weight: 700;
}

.profile-intro-content p {
    margin: 0;
    color: #637B80;
    font-size: 0.82rem;
    line-height: 1.65;
}

/* SECTION HEADINGS */

.profile-section {
    margin-bottom: 29px;
}

.profile-section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 13px;
}

.profile-section-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.15rem;
}

.profile-icon-teal {
    color: var(--portal-primary);
    background: var(--portal-primary-light);
}

.profile-icon-blue {
    color: #3877A2;
    background: #EAF2F9;
}

.profile-icon-purple {
    color: #7765A4;
    background: #F0EDFA;
}

.profile-section-heading h3 {
    margin: 0;
    color: var(--portal-text);
    font-size: 1.03rem;
    font-weight: 700;
}

.profile-section-heading p {
    margin: 4px 0 0;
    color: var(--portal-muted);
    font-size: 0.79rem;
}

/* SECTION CARDS */

.profile-section-card {
    min-width: 0;
    padding: 25px;
    background: white;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
}

/* FORM LAYOUT */

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 21px 20px;
}

.profile-form-field {
    min-width: 0;
}

.profile-form-full {
    grid-column: 1 / -1;
}

.profile-label {
    display: block;
    margin-bottom: 8px;
    color: var(--portal-text);
    font-size: 0.81rem;
    font-weight: 600;
}

.profile-required {
    color: #C15C62;
}

.profile-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .profile-input-wrapper > i {
        position: absolute;
        left: 13px;
        z-index: 2;
        color: #8A9DA2;
        font-size: 0.95rem;
        pointer-events: none;
    }

.profile-input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 10px 13px 10px 39px;
    color: var(--portal-text);
    background: #FFFFFF;
    border: 1px solid #DCE6E8;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .profile-input::placeholder {
        color: #A4B0B4;
    }

    .profile-input:focus {
        color: var(--portal-text);
        background: white;
        border-color: var(--portal-accent);
        box-shadow: 0 0 0 3px rgba(72, 166, 160, 0.12);
    }



.profile-pin-input {
    letter-spacing: 2px;
}

    .profile-pin-input::placeholder {
        letter-spacing: normal;
    }

.profile-field-help {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 7px;
    color: var(--portal-muted);
    font-size: 0.73rem;
    line-height: 1.5;
}

    .profile-field-help i {
        margin-top: 2px;
        color: var(--portal-accent);
    }

/* VALIDATION */

.profile-validation {
    display: block;
    margin-top: 6px;
    color: #C34D58;
    font-size: 0.75rem;
}

.profile-validation-summary {
    margin-bottom: 18px;
    padding: 12px 15px 12px 32px;
    color: #A43D48;
    background: #FFF3F3;
    border: 1px solid #F0DADB;
    border-radius: 8px;
    font-size: 0.8rem;
}

    .profile-validation-summary:empty {
        display: none;
    }

/* FORM FOOTER */

.profile-form-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #EDF1F2;
}

.btn-profile-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 17px;
    color: white;
    background: var(--portal-primary);
    border: 1px solid var(--portal-primary);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all .15s ease;
}

    .btn-profile-primary:hover:not(:disabled) {
        color: white;
        background: var(--portal-primary-dark);
        border-color: var(--portal-primary-dark);
        box-shadow: 0 4px 12px rgba(23, 107, 112, 0.15);
        transform: translateY(-1px);
    }

    .btn-profile-primary:disabled {
        opacity: .65;
        cursor: not-allowed;
    }

/* SECURITY NOTE */

.profile-security-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    margin-bottom: 22px;
    background: #F0F6FA;
    border: 1px solid #DFEAF1;
    border-radius: 8px;
    color: #557486;
    font-size: 0.79rem;
    line-height: 1.6;
}

    .profile-security-note i {
        flex: 0 0 auto;
        margin-top: 2px;
        color: #4D83A2;
        font-size: 1rem;
    }

/* ==========================================================
   STATUS ALERTS
   ========================================================== */

.profile-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 22px;
    border-radius: 9px;
    font-size: 0.83rem;
    line-height: 1.5;
}

.profile-alert-icon {
    flex: 0 0 auto;
    font-size: 1.1rem;
}

.profile-alert-content {
    flex: 1;
    min-width: 0;
}

.profile-alert-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

    .profile-alert-close:hover {
        background: rgba(0,0,0,0.06);
    }

.profile-alert-success {
    color: #236E59;
    background: #E9F5EF;
    border: 1px solid #D1E9DD;
}

    .profile-alert-success .profile-alert-close {
        color: #236E59;
    }

.profile-alert-error {
    color: #A43D48;
    background: #FFF1F1;
    border: 1px solid #F0DADB;
}

    .profile-alert-error .profile-alert-close {
        color: #A43D48;
    }

/* ==========================================================
   TWO-FACTOR AUTHENTICATION STATUS
   ========================================================== */

.twofa-status-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 17px;
    background: #F7FAFA;
    border: 1px solid var(--portal-border);
    border-radius: 10px;
}

.twofa-status-info {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.twofa-status-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--portal-primary-light);
    color: var(--portal-primary);
    font-size: 1.25rem;
}

.twofa-status-info h5 {
    margin: 0 0 4px;
    color: var(--portal-text);
    font-size: 0.88rem;
    font-weight: 700;
}

.twofa-status-info p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 0.76rem;
    line-height: 1.55;
}

.twofa-status-actions {
    flex: 0 0 auto;
}

.twofa-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.twofa-enabled {
    color: var(--portal-success);
    background: var(--portal-success-bg);
}

.twofa-disabled {
    color: var(--portal-warning);
    background: var(--portal-warning-bg);
}

.twofa-description {
    padding-top: 19px;
}

    .twofa-description p {
        margin: 0 0 17px;
        color: #697E84;
        font-size: 0.82rem;
        line-height: 1.75;
    }

.btn-profile-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    color: var(--portal-danger);
    background: white;
    border: 1px solid #EBCFD1;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

    .btn-profile-danger-outline:hover {
        color: white;
        background: var(--portal-danger);
        border-color: var(--portal-danger);
    }

/* ==========================================================
   2FA SETUP WIZARD
   ========================================================== */

.twofa-wizard {
    margin-top: 20px;
    padding: 22px;
    background: #F8FBFB;
    border: 1px solid var(--portal-border);
    border-radius: 11px;
}

.twofa-wizard-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--portal-border);
}

.twofa-wizard-icon {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-primary);
    background: var(--portal-primary-light);
    border-radius: 12px;
    font-size: 1.25rem;
}

.twofa-wizard-heading h4 {
    margin: 0 0 4px;
    color: var(--portal-primary-dark);
    font-size: 0.98rem;
    font-weight: 700;
}

.twofa-wizard-heading p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 0.76rem;
}

.twofa-steps {
    display: flex;
    flex-direction: column;
    gap: 17px;
    padding: 21px 0;
}

.twofa-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.twofa-step-number {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--portal-primary-light);
    color: var(--portal-primary);
    font-size: 0.76rem;
    font-weight: 700;
}

.twofa-step strong {
    display: block;
    margin: 2px 0 4px;
    color: var(--portal-text);
    font-size: 0.82rem;
}

.twofa-step p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 0.77rem;
    line-height: 1.65;
}

/* QR CODE */

.twofa-qr-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
    padding: 23px;
    background: white;
    border: 1px solid var(--portal-border);
    border-radius: 10px;
}

.twofa-qr-image {
    width: 220px;
    max-width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid var(--portal-border);
    border-radius: 10px;
}

    .twofa-qr-image img {
        display: block;
        width: 100%;
        height: auto;
    }

.twofa-manual-key {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    max-width: 280px;
}

    .twofa-manual-key > span {
        color: var(--portal-text);
        font-size: 0.8rem;
        font-weight: 700;
    }

    .twofa-manual-key kbd {
        display: inline-block;
        padding: 11px 13px;
        color: var(--portal-primary-dark);
        background: var(--portal-primary-light);
        border: 1px solid #CFE2E0;
        border-radius: 7px;
        font-size: 0.84rem;
        letter-spacing: 1.2px;
        overflow-wrap: anywhere;
    }

    .twofa-manual-key small {
        color: var(--portal-muted);
        font-size: 0.72rem;
        line-height: 1.55;
    }

/* VERIFICATION */

.twofa-verification {
    margin-top: 22px;
    padding-top: 21px;
    border-top: 1px solid var(--portal-border);
}

    .twofa-verification h5 {
        margin: 0 0 5px;
        color: var(--portal-text);
        font-size: 0.9rem;
        font-weight: 700;
    }

    .twofa-verification > p {
        margin: 0 0 17px;
        color: var(--portal-muted);
        font-size: 0.77rem;
    }

.twofa-code-input {
    max-width: 280px;
    height: 48px;
    padding-left: 14px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 7px;
}

.twofa-wizard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.btn-profile-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 16px;
    color: #65777D;
    background: white;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
    font-size: 0.81rem;
    font-weight: 600;
}

    .btn-profile-secondary:hover {
        color: var(--portal-text);
        background: #F3F7F8;
    }

/* ==========================================================
   DISABLE 2FA
   ========================================================== */

.twofa-disable-panel {
    margin-top: 20px;
    padding: 22px;
    background: #FFFAFA;
    border: 1px solid #F0DADB;
    border-radius: 10px;
}

.twofa-disable-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}

.twofa-disable-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-danger);
    background: var(--portal-danger-bg);
    border-radius: 11px;
    font-size: 1.2rem;
}

.twofa-disable-heading h4 {
    margin: 0 0 5px;
    color: #9D4149;
    font-size: 0.95rem;
    font-weight: 700;
}

.twofa-disable-heading p {
    margin: 0;
    color: #927176;
    font-size: 0.76rem;
    line-height: 1.5;
}

.twofa-warning {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 14px;
    margin-bottom: 20px;
    color: #946A35;
    background: #FFF5E6;
    border: 1px solid #F1E1C8;
    border-radius: 8px;
    font-size: 0.77rem;
    line-height: 1.6;
}

    .twofa-warning i {
        flex: 0 0 auto;
        margin-top: 2px;
    }

.btn-profile-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 15px;
    color: white;
    background: var(--portal-danger);
    border: 1px solid var(--portal-danger);
    border-radius: 8px;
    font-size: 0.81rem;
    font-weight: 600;
}

    .btn-profile-danger:hover:not(:disabled) {
        color: white;
        background: #983D45;
        border-color: #983D45;
    }

    .btn-profile-danger:disabled {
        opacity: .65;
        cursor: not-allowed;
    }

/* ==========================================================
   PAGE FOOTER
   ========================================================== */

.profile-page-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    padding: 15px;
    color: var(--portal-muted);
    font-size: 0.75rem;
}

    .profile-page-footer i {
        color: var(--portal-accent);
    }

/* ==========================================================
   RESPONSIVE PROFILE PAGE
   ========================================================== */

@media (max-width: 767.98px) {

    .profile-page {
        padding-left: 13px;
        padding-right: 13px;
    }

    .profile-heading {
        align-items: flex-start;
        gap: 13px;
    }

    .btn-profile-back {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .profile-intro-card {
        align-items: flex-start;
        gap: 12px;
        padding: 15px;
        margin-bottom: 24px;
    }

    .profile-intro-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        font-size: 1.2rem;
    }

    .profile-section {
        margin-bottom: 23px;
    }

    .profile-section-card {
        padding: 17px;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .profile-form-full {
        grid-column: auto;
    }

    .profile-form-footer {
        margin-top: 19px;
    }

        .profile-form-footer .btn {
            width: 100%;
        }

    .twofa-status-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .twofa-status-actions {
        padding-left: 57px;
    }

    .twofa-wizard {
        padding: 16px;
    }

    .twofa-qr-container {
        flex-direction: column;
        gap: 18px;
        padding: 17px;
    }

    .twofa-qr-image {
        width: 210px;
    }

    .twofa-manual-key {
        width: 100%;
        max-width: none;
        align-items: center;
        text-align: center;
    }

        .twofa-manual-key kbd {
            max-width: 100%;
            overflow-wrap: anywhere;
        }

    .twofa-code-input {
        max-width: 100%;
    }

    .twofa-wizard-actions {
        flex-direction: column;
    }

        .twofa-wizard-actions .btn {
            width: 100%;
        }

    .twofa-disable-panel {
        padding: 16px;
    }
}

@media (max-width: 380px) {

    .profile-page {
        padding-left: 9px;
        padding-right: 9px;
    }

    .profile-heading {
        flex-direction: column;
    }

        .profile-heading .btn-profile-back {
            align-self: flex-start;
        }

    .profile-section-heading h3 {
        font-size: 0.94rem;
    }

    .profile-section-card {
        padding: 13px;
    }

    .twofa-wizard-heading {
        align-items: flex-start;
    }

    .profile-alert {
        align-items: flex-start;
        padding: 12px;
    }
}




/* ==========================================================
       COLOUR SCHEME
       ========================================================== */

/* Letterhead colour aliases are defined in the global palette above. */

/* ==========================================================
   PRACTICE PAGE LAYOUT
   ========================================================== */

.practice-layout {
    font-family: Arial, Helvetica, sans-serif;
    background: #F3F7F8;
    color: var(--letter-text);
}

.practice-main {
    min-width: 0;
}

/* ==========================================================
   LETTERHEAD
   ========================================================== */

.letterhead-wrapper {
    width: 100%;
    background: #FFFFFF;
    border-top: 3px solid #FFAE70;
    border-bottom: 4px solid #004266;
    box-shadow: 0 2px 9px rgba(0, 66, 102, 0.06);
}

.letterhead {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 17px;
    color: #00324D;
}

/* ==========================================================
   TOP SECTION
   ========================================================== */

.letterhead-top-section {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    min-height: 175px;
}

/* LOGO */

.letterhead-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .letterhead-logo img {
        display: block;
        width: 100%;
        max-width: 250px;
        height: 175px;
        object-fit: contain;
    }

/* IDENTITY */

.letterhead-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* NAME AND REGISTRATION */

.letterhead-name-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.letterhead-name {
    margin: 0;
    color: #00324D;
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-align: center;
    white-space: nowrap;
}

.letterhead-pr {
    color: #004266;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

/* CREDENTIALS */

.letterhead-credentials {
    margin-top: 9px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    line-height: 1.4;
}


.letterhead-registration {
    margin-bottom: 5px;
}

.letterhead-role {
    color: #004266;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
}

/* PEACH ACCENT */

.letterhead-accent {
    width: 48px;
    height: 2px;
    margin-top: 7px;
    background: #FFAE70;
    border-radius: 3px;
}

/* ==========================================================
   FULL-WIDTH DIVIDER
   ========================================================== */

.letterhead-divider {
    width: 100%;
    height: 1px;
    margin: 10px 0 10px;
    background: #DFE8ED;
}

/* ==========================================================
   BOTTOM SECTION
   ========================================================== */

.letterhead-bottom {
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: center;
    column-gap: 75px;
    align-items: start;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    font-size: 0.81rem;
    line-height: 1.45;
}

/* ADDRESS */

.letterhead-address {
    color: #586E75;
    min-width: 0;
    text-align: left;
}

.letterhead-hours {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 5px;
    color: #004266;
    font-size: 0.76rem;
}

    .letterhead-hours i {
        color: #FFAE70;
        flex-shrink: 0;
    }

.letterhead-appt {
    margin-top: 2px;
    text-align: center;
    color: #788B92;
    font-size: 0.75rem;
    font-style: italic;
}

/* CONTACT DETAILS */

/* CONTACT */
.letterhead-contact {
    display: grid;
    grid-template-columns: 65px max-content;
    column-gap: 8px;
    text-align: left;
    row-gap: 7px;
    align-content: start;
    min-width: 0;
    padding: 0;
}

.contact-label {
    color: #788B92;
    font-weight: 600;
}

.letterhead-contact > span:not(.contact-label) {
    color: #263B43;
    min-width: 0;
}

.letterhead-contact a {
    color: #004266;
    font-weight: 600;
    text-decoration: none;
}

    .letterhead-contact a:hover {
        color: #C87945;
        text-decoration: underline;
    }

/* ==========================================================
   MOBILE
   ========================================================== */


@media (max-width: 767.98px) {

    /* MAIN CONTAINER */
    .letterhead {
        padding: 10px 14px;
    }

    /* LOGO ABOVE LETTERHEAD */
    .letterhead-top-section {
        display: grid;
        grid-template-columns: 1fr;
        align-items: center;
        gap: 5px;
        min-height: auto;
    }

    .letterhead-logo img {
        display: block;
        width: 145px;
        height: 115px;
        object-fit: contain;
    }

    /* NAME AND REGISTRATION */
    .letterhead-name-row {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .letterhead-name {
        font-size: 1.9rem;
        white-space: normal;
    }

    .letterhead-pr {
        font-size: 0.8rem;
    }

    /* CREDENTIALS */
    .letterhead-credentials {
        margin-top: 7px;
        margin-bottom: 8px;
        font-size: 0.76rem;
        line-height: 1.4;
    }

    .letterhead-registration {
        margin-bottom: 5px;
    }

    .letterhead-role {
        font-size: 0.85rem;
        line-height: 1.25;
    }

    .letterhead-accent {
        margin-top: 6px;
    }

    /* DIVIDER */
    .letterhead-divider {
        margin: 10px 0;
    }

    /* ADDRESS AND CONTACT */
    .letterhead-bottom {
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        font-size: 0.79rem;
    }

    .letterhead-hours {
        font-size: 0.75rem;
    }

    .letterhead-appt {
        text-align: center;
    }

    .letterhead-contact {
        width: 100%;
        grid-template-columns: 65px max-content;
        justify-content: center;
        padding-top: 10px;
        border-top: 1px solid #DFE8ED;
        text-align: left;
        row-gap: 5px;
    }
}


@media (max-width: 380px) {

    .letterhead-logo img {
        width: 145px;
        height: 125px;
    }

    .letterhead-name {
        font-size: 1.7rem;
    }

    .letterhead-credentials {
        font-size: 0.73rem;
    }

    .letterhead-contact {
        grid-template-columns: 52px minmax(0, 1fr);
    }

        .letterhead-contact > span {
            overflow-wrap: anywhere;
        }
}
/* ==========================================================
   FOOTER
   ========================================================== */

.practice-footer {
    width: 100%;
    margin-top: auto;
    background: #004266;
    border-top: 3px solid #FFAE70;
    color: #D9E8E9;
}

.practice-footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.practice-footer-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.77rem;
}

    .practice-footer-copy strong {
        color: #FFFFFF;
    }

    .practice-footer-copy span {
        color: #D0E0E8;
        font-size: 0.72rem;
    }

.practice-footer-hosting {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #D0E0E8;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
}

    .practice-footer-hosting strong {
        color: #FFFFFF;
    }

.practice-footer-links {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 4px;
}

    .practice-footer-links a {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: #FFFFFF;
        font-size: 0.76rem;
        font-weight: 600;
        text-decoration: none;
    }

        .practice-footer-links a:hover {
            color: #FFAE70;
            text-decoration: underline;
        }

    .practice-footer-links > span {
        color: #AFC8D5;
    }

/* MOBILE FOOTER */

@media (max-width: 767.98px) {

    .practice-footer-inner {
        padding: 18px 12px;
    }
}


/* ==========================================================
   REGISTER CLIENT PAGE
   ========================================================== */

.register-page {
    max-width: 1050px;
}

    /* Match the My Profile form control sizing. */
    .register-page .form-label {
        display: block;
        margin-bottom: 8px;
        color: var(--portal-text);
        font-size: 0.81rem;
        font-weight: 600;
    }

    .register-page .form-control,
    .register-page .form-select,
    .register-page .input-group > .form-control,
    .register-page .input-group > .btn {
        min-height: 44px;
        font-size: 0.85rem;
    }

    .register-page .form-control,
    .register-page .form-select {
        padding: 10px 13px;
        color: var(--portal-text);
        border: 1px solid #DCE6E8;
        border-radius: 8px;
        box-shadow: none;
    }

        .register-page .form-control:focus,
        .register-page .form-select:focus {
            border-color: var(--portal-accent);
            box-shadow: 0 0 0 3px rgba(72, 166, 160, 0.12);
        }

    .register-page .form-text,
    .register-page small,
    .register-page .text-muted {
        font-size: 0.75rem;
    }

.register-section {
    margin-bottom: 20px;
}

.register-intro {
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
    font-size: 0.84rem;
}

.register-target-select {
    max-width: 570px;
    margin-top: 14px;
}

.register-forms-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--portal-text);
    font-size: 0.82rem;
}

.register-forms-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.register-form-option {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    min-height: 60px;
    padding: 11px 13px;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

    .register-form-option:hover {
        border-color: #A9C4D3;
        background: var(--portal-primary-light);
    }

/* Submit confirmation and action: message first, full-width button below. */
.register-submit-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.register-submit-info {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
    line-height: 1.5;
}

.register-submit-button {
    display: flex;
    width: 100%;
    min-width: 0;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
}

/* Register Client responsive layout */
@media (max-width: 767.98px) {
    .register-page .register-forms-list {
        grid-template-columns: 1fr;
    }

    .register-submit-card {
        padding: 15px;
    }
}

/* Keep panel icon and heading text together */
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

    .panel-heading > div {
        flex: 0 1 auto;
        margin-left: 0;
        text-align: left;
    }

/*.form-settings-button {
    width: 217px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}*/

.btn-profile:hover,
.btn-profile:focus {
    border: 1px solid #c5dce5 !important;
    background-color: #eaf4f8;
    text-decoration: none;
}

/* ======================================================
   INTAKE FORM - REQUIRED FIELD COLOURS
   ====================================================== */

.required-field .form-control,
.required-field .form-select {
    border: 1px solid #ced4da !important;
    box-shadow: none !important;
}

/* Required field is empty */
.required-field.required-missing .form-control,
.required-field.required-missing .form-select {
    border: 1px solid #dc3545 !important;
    box-shadow: none !important;
}

/* Required field is completed */
.required-field.required-complete .form-control,
.required-field.required-complete .form-select {
    border: 1px solid #23836A !important;
    box-shadow: none !important;
}

/* Keep the correct colour when focused */
.required-field.required-missing .form-control:focus,
.required-field.required-missing .form-select:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.15) !important;
}

.required-field.required-complete .form-control:focus,
.required-field.required-complete .form-select:focus {
    border-color: #23836A !important;
    box-shadow: 0 0 0 0.15rem rgba(35, 131, 106, 0.15) !important;
}

/* Prevent Blazor validation outlines from conflicting with required-field colours */
.required-field .valid.modified:not([type=checkbox]),
.required-field .invalid:not([type=checkbox]) {
    outline: none !important;
}

/* Consistent dashboard heading buttons */
.portal-heading-actions > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 8px;
}

.filter-select.page-size-select {
    width: 125px;
    max-width: 125px;
    justify-self: start;
}

/* Admin submission filters */
.filter-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 220px 125px;
    gap: 12px;
    align-items: end;
    width: 100%;
}

    .filter-controls .search-control {
        min-width: 0;
    }

    .filter-controls .filter-select {
        min-width: 0;
        width: 100%;
    }

        .filter-controls .filter-select select {
            width: 100%;
        }

/* Smaller screens */
@media (max-width: 767px) {
    .filter-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .filter-controls .search-control {
            grid-column: 1 / -1;
        }
}