﻿*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --navy: #0b1f45;
    --navy-mid: #122859;
    --teal: #0ea5e9;
    --teal-light: #38bdf8;
    --cream: #f5f7fa;
    --white: #ffffff;
    --text-muted: #94a3b8;
    --card-shadow: 0 24px 60px rgba(11,31,69,.13);
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* ============================= */
/* LINKS & BUTTONS               */
/* ============================= */

a {
    color: var(--teal);
}

.btn-primary {
    color: #fff;
    background-color: var(--navy);
    border-color: var(--navy-mid);
}

    .btn-primary:hover {
        background-color: var(--navy-mid);
        border-color: var(--navy);
    }

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #fff;
    background-color: var(--navy);
    border-color: var(--navy-mid);
}

/* ============================= */
/* BOOTSTRAP HELPERS             */
/* ============================= */

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0,0,0,.05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* ============================= */
/* FOOTER                        */
/* ============================= */

.footer {
    text-align: center;
    padding: 13px;
    font-size: .8rem;
    color: var(--text-muted);
    background: var(--white);
    border-top: 1px solid #e8ecf0;
    width: 100%;
    flex-shrink: 0;
}

    .footer a {
        color: var(--teal);
        text-decoration: none;
    }

        .footer a:hover {
            text-decoration: underline;
        }

/* ============================= */
/* OPD SCREEN STYLES             */
/* ============================= */

.section-panel {
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(250,250,255,0.75));
    border: 1px solid rgba(13,110,253,0.06);
    border-radius: .75rem;
    padding: 1.25rem;
    box-shadow: 0 8px 24px rgba(11,32,79,0.04);
    backdrop-filter: blur(6px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .85rem;
}

.icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 6px 18px rgba(11,32,79,0.06);
    flex-shrink: 0;
}

.icon-patient {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.icon-visit {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.icon-billing {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.section-title {
    font-weight: 600;
    margin: 0;
}

.section-sub {
    color: #6c757d;
    font-size: .9rem;
    margin: 0;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(14,165,233,0.6);
    box-shadow: 0 0 0 .12rem rgba(14,165,233,0.08);
}

/* ============================= */
/* LOGIN PAGE BODY               */
/* ============================= */

body.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--cream);
}

/* ============================= */
/* SPLIT SCREEN                  */
/* ============================= */

.split-screen {
    display: flex;
    flex: 1;
    width: 100%;
    height: auto;
    min-height: unset;
}

/* ============================= */
/* LEFT PANEL                    */
/* ============================= */

.left-panel {
    flex: 1.1;
    position: relative;
    background: #0b1f45;
    color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 56px;
    min-height: 100vh;
}

    .left-panel::before,
    .left-panel::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        opacity: .07;
        background: #38bdf8;
    }

    .left-panel::before {
        width: 420px;
        height: 420px;
        top: -120px;
        right: -100px;
    }

    .left-panel::after {
        width: 280px;
        height: 280px;
        bottom: -80px;
        left: -60px;
    }

    .left-panel .grid-overlay {
        position: absolute;
        inset: 0;
        background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
        background-size: 48px 48px;
        pointer-events: none;
    }

    .left-panel .accent-bar {
        width: 48px;
        height: 4px;
        background: linear-gradient(90deg, #0ea5e9, #38bdf8);
        border-radius: 2px;
        margin-bottom: 20px;
    }

    .left-panel .brand-icon {
        font-size: 2.4rem;
        color: #38bdf8;
        margin-bottom: 12px;
    }

.clinic-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.85rem, 3vw, 2.7rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
    color: #ffffff;
}

.left-description {
    font-size: .95rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255,255,255,.65);
    max-width: 360px;
    margin-bottom: 40px;
}

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 420px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: .84rem;
    font-weight: 500;
    color: #ffffff;
}

    .feature i {
        font-size: 1.15rem;
        flex-shrink: 0;
    }

/* ============================= */
/* RIGHT PANEL                   */
/* ============================= */

.right-panel {
    flex: .9;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    background: var(--cream);
}

/* ============================= */
/* LOGIN BOX — CRYSTAL GLASS     */
/* ============================= */

.login-box {
    width: 100%;
    max-width: 420px;
    /* clean glass */
    background: linear-gradient( 145deg, rgba(255, 255, 255, 0.65), rgba(245, 247, 250, 0.35) );
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: 18px;
    padding: 42px 38px;
    /* PROFESSIONAL BORDER (key improvement) */
    border: 1px solid rgba(255, 255, 255, 0.35);
    /* subtle depth, not heavy */
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

    .login-box::before {
        content: '';
        position: absolute;
        top: 0;
        left: 32px;
        right: 32px;
        height: 2.5px;
        background: linear-gradient(90deg, #0ea5e9, #38bdf8);
        border-radius: 0 0 3px 3px;
    }

/* ============================= */
/* LOGIN INPUTS                  */
/* ============================= */

.login-input {
    border: 1.5px solid rgba(14,165,233,.25);
    border-radius: 10px;
    font-size: .92rem;
    background: rgba(255,255,255,.80);
    transition: border-color .2s, box-shadow .2s, background .2s;
}

    .login-input:focus {
        border-color: #0ea5e9;
        background: rgba(255,255,255,.98);
        box-shadow: 0 0 0 3px rgba(14,165,233,.12);
        outline: none;
    }

/* ============================= */
/* LOGIN BUTTON                  */
/* ============================= */

.login-btn {
    background: linear-gradient(135deg, #0b1f45, #122859);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: .95rem;
    font-weight: 600;
    padding: 13px;
    letter-spacing: .3px;
    transition: transform .15s, box-shadow .2s, background .2s;
    box-shadow: 0 6px 20px rgba(11,31,69,.25);
}

    .login-btn:hover {
        background: linear-gradient(135deg, #0ea5e9, #38bdf8);
        transform: translateY(-1px);
        box-shadow: 0 8px 24px rgba(14,165,233,.35);
        color: #ffffff;
    }

    .login-btn:active {
        transform: translateY(0);
    }

/* ============================= */
/* EXTERNAL LOGIN BUTTON         */
/* ============================= */

.external-btn {
    border: 1.5px solid rgba(14,165,233,.35);
    border-radius: 8px;
    color: #0b1f45;
    background: rgba(255,255,255,.70);
    font-size: .82rem;
    font-weight: 500;
    padding: 7px 16px;
    transition: background .2s, border-color .2s, transform .15s;
}

    .external-btn:hover {
        background: rgba(14,165,233,.10);
        border-color: #0ea5e9;
        color: #0b1f45;
        transform: translateY(-1px);
    }

/* ============================= */
/* RESPONSIVE                    */
/* ============================= */

/* Tablet landscape */
@media (max-width: 1024px) {
    .left-panel {
        padding: 48px 40px;
    }

    .features {
        gap: 10px;
    }

    .feature {
        padding: 10px 12px;
        font-size: .80rem;
    }
}

/* Tablet portrait — stacked */
@media (max-width: 768px) {

    .split-screen {
        flex-direction: column;
        height: auto;
        min-height: unset;
    }

    .left-panel {
        flex: none;
        width: 100%;
        min-height: unset;
        height: auto;
        padding: 30px 20px 26px;
        align-items: center;
        text-align: center;
        justify-content: flex-start;
        background: #0b1f45;
        color: #ffffff;
    }

        .left-panel::before {
            width: 240px;
            height: 240px;
            top: -70px;
            right: -50px;
        }

        .left-panel::after {
            width: 160px;
            height: 160px;
            bottom: -45px;
            left: -35px;
        }

        .left-panel .accent-bar {
            margin-inline: auto;
        }

        .left-panel .brand-icon {
            font-size: 1.9rem;
            margin-bottom: 8px;
        }

    .clinic-heading {
        font-size: clamp(1.45rem, 5vw, 2rem);
        margin-bottom: 10px;
        color: #ffffff;
    }

    .left-description {
        font-size: .85rem;
        max-width: 440px;
        margin-inline: auto;
        margin-bottom: 18px;
    }

    .features {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        width: 100%;
        gap: 7px;
    }

    .feature {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        padding: 9px 6px;
        font-size: .73rem;
    }

    .right-panel {
        flex: none;
        width: 100%;
        height: auto;
        padding: 24px 16px 36px;
        align-items: flex-start;
        background: var(--cream);
    }

    .login-box {
        padding: 32px 22px;
        border-radius: 18px;
    }

        .login-box::before {
            left: 20px;
            right: 20px;
        }
}

/* Mobile */
@media (max-width: 480px) {

    .left-panel {
        padding: 24px 14px 20px;
        background: #0b1f45;
    }

    .clinic-heading {
        font-size: 1.4rem;
    }

    .left-description {
        font-size: .8rem;
        margin-bottom: 14px;
    }

    .features {
        grid-template-columns: repeat(6, 1fr);
        gap: 5px;
    }

    .feature {
        flex-direction: column;
        padding: 7px 3px;
        border-radius: 8px;
        gap: 0;
    }

        .feature .feat-label {
            display: none;
        }

        .feature i {
            font-size: 1rem;
        }

    .right-panel {
        padding: 18px 10px 30px;
    }

    .login-box {
        padding: 26px 16px;
        border-radius: 16px;
    }

        .login-box::before {
            left: 16px;
            right: 16px;
        }

    .login-input {
        font-size: .86rem;
    }

    .footer {
        font-size: .7rem;
        padding: 9px;
    }
}

/* Very small */
@media (max-width: 360px) {
    .left-panel {
        padding: 18px 10px 16px;
        background: #0b1f45;
    }

    .clinic-heading {
        font-size: 1.25rem;
    }

    .features {
        grid-template-columns: repeat(3, 1fr);
    }

    .feature .feat-label {
        display: none;
    }

    .login-box {
        padding: 20px 12px;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {

    .split-screen {
        flex-direction: row;
    }

    .left-panel {
        flex: 0 0 230px;
        width: 230px;
        min-height: 100%;
        height: auto;
        padding: 20px 16px;
        align-items: flex-start;
        text-align: left;
        justify-content: center;
        background: #0b1f45;
        overflow-y: auto;
    }

        .left-panel .accent-bar {
            margin-inline: unset;
        }

    .left-description {
        margin-inline: unset;
        text-align: left;
        font-size: .76rem;
        margin-bottom: 14px;
    }

    .features {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    .feature {
        flex-direction: row;
        text-align: left;
        padding: 7px 8px;
        font-size: .72rem;
    }

        .feature .feat-label {
            display: inline;
        }

    .right-panel {
        flex: none;
        width: 100%;
        height: auto;
        padding: 24px 16px 36px;
        align-items: flex-start;
        background: var(--cream);
    }
}
