* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text: #172033;
    --muted: #718096;
    --border: #e5e7eb;
    --background: #f5f7fb;
    --white: #ffffff;
    --danger-bg: #fef2f2;
    --danger-text: #b91c1c;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
                 BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
}


/* ========================================
   LOGIN
======================================== */

.login-page {
    min-height: 100vh;
    background: var(--background);
}

.login-background {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;

    background:
        radial-gradient(
            circle at top left,
            rgba(37, 99, 235, .12),
            transparent 35%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(99, 102, 241, .10),
            transparent 35%
        ),
        var(--background);
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, .04);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .10);
}

.brand {
    text-align: center;
    margin-bottom: 30px;
}

.brand-icon {
    width: 260px;
    height: 100px;
    margin-bottom: 15px;
    object-fit: contain;
}

.brand h1 {
    font-size: 24px;
    letter-spacing: .8px;
}

.brand p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 14px;
}

.alert {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 14px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin: 18px 0 8px;
}

.input-wrap {
    display: flex;
    align-items: center;

    border: 1px solid var(--border);
    border-radius: 12px;

    height: 50px;
    padding: 0 13px;

    transition: .2s ease;
}

.input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.input-wrap span {
    margin-right: 9px;
    font-size: 15px;
}

.input-wrap input {
    width: 100%;
    height: 100%;

    border: 0;
    outline: 0;

    font-size: 14px;
    background: transparent;
}

.password-toggle {
    border: 0;
    background: transparent;

    color: var(--primary);

    cursor: pointer;

    font-size: 12px;
    font-weight: 600;
}

.btn-primary {
    width: 100%;
    height: 50px;

    margin-top: 25px;

    border: 0;
    border-radius: 12px;

    background: var(--primary);
    color: white;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition: .2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.login-footer {
    text-align: center;

    margin-top: 25px;

    color: #9aa3b2;

    font-size: 12px;
}


/* ========================================
   DASHBOARD
======================================== */

.dashboard-page {
    min-height: 100vh;
    background: var(--background);
}


/* ========================================
   TOPBAR
======================================== */

.topbar {
    width: 100%;
    min-height: 72px;

    background: var(--white);

    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 5%;

    gap: 20px;
}


/* Hospital logo + name */

.topbar-brand {
    display: flex;
    align-items: center;

    gap: 10px;

    font-weight: 800;
    letter-spacing: .6px;

    min-width: 0;

    flex: 1;
}


/* Logo */

.mini-icon {
    width: 100px;
    height: 36px;

    object-fit: contain;

    flex-shrink: 0;
}


/* Hospital name - DESKTOP */

.topbar-brand span {
    font-size: 16px;

    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}


/* Logout */

.logout-btn {
    flex-shrink: 0;

    text-decoration: none;

    color: #4b5563;

    font-size: 14px;
    font-weight: 600;

    padding: 9px 14px;

    border-radius: 9px;
}

.logout-btn:hover {
    background: #f3f4f6;
}


/* ========================================
   DASHBOARD CONTAINER
======================================== */

.dashboard-container {
    width: min(1100px, 90%);

    margin: 0 auto;

    padding: 70px 0;
}

.welcome {
    margin-bottom: 35px;
}

.eyebrow {
    color: var(--primary);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.5px;

    margin-bottom: 10px;
}

.welcome h1 {
    font-size: clamp(28px, 4vw, 40px);

    line-height: 1.2;
}

.welcome p:last-child {
    margin-top: 10px;

    color: var(--muted);
}


/* ========================================
   MODULE GRID
======================================== */

.module-grid {
    display: grid;

    grid-template-columns: repeat(
        2,
        minmax(0, 1fr)
    );

    gap: 22px;
}


/* ========================================
   MODULE CARD
======================================== */

.module-card {
    position: relative;

    min-height: 190px;

    display: flex;
    align-items: center;

    gap: 20px;

    padding: 30px;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 20px;

    text-decoration: none;

    color: var(--text);

    overflow: hidden;

    transition: .25s ease;
}

.module-card::after {
    content: "";

    position: absolute;

    width: 110px;
    height: 110px;

    border-radius: 50%;

    background: rgba(37, 99, 235, .05);

    right: -35px;
    top: -35px;
}

.module-card:hover {
    transform: translateY(-5px);

    border-color: rgba(37, 99, 235, .3);

    box-shadow:
        0 18px 40px rgba(15, 23, 42, .10);
}


/* ========================================
   MODULE ICON
======================================== */

.module-icon {
    width: 68px;
    height: 68px;

    flex: 0 0 68px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eff6ff;

    border-radius: 17px;

    font-size: 29px;
}

.img-icon {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.module-card h2 {
    font-size: 21px;
}

.module-card p {
    color: var(--muted);

    font-size: 14px;

    margin-top: 6px;
}


/* ========================================
   ARROW
======================================== */

.arrow {
    position: absolute;

    right: 25px;
    bottom: 23px;

    font-size: 23px;

    color: var(--primary);
}


/* ========================================
   FOOTER
======================================== */

.dashboard-footer {
    text-align: center;

    color: #9aa3b2;

    font-size: 12px;

    padding: 0 20px 30px;
}

/* ========================================
   MOBILE / TABLET
======================================== */

@media (max-width: 700px) {

    /* =========================
       TOPBAR
    ========================= */

    .topbar {
        width: 100%;
        min-height: 60px;
        height: auto;

        padding: 10px 12px;

        display: flex;
        align-items: center;

        gap: 8px;
    }

    .topbar-brand {
        flex: 1 1 auto;
        min-width: 0;

        display: flex;
        align-items: center;

        gap: 8px;
    }

    .mini-icon {
        width: 60px;
        height: 30px;

        flex: 0 0 60px;

        object-fit: contain;
    }

    .topbar-brand span {
        flex: 1 1 auto;
        min-width: 0;

        font-size: 11px;
        line-height: 1.3;

        white-space: normal;

        overflow: visible;
        text-overflow: clip;

        overflow-wrap: break-word;
        word-break: normal;
    }

    .logout-btn {
        flex: 0 0 auto;

        font-size: 11px;

        padding: 7px 9px;

        white-space: nowrap;
    }


    /* =========================
       DASHBOARD
    ========================= */

    .dashboard-container {
        width: 100%;
        max-width: 100%;

        margin: 0 auto;

        padding: 30px 15px;
    }

    .welcome {
        width: 100%;

        margin-bottom: 20px;
    }

    .welcome h2 {
        font-size: 20px;

        line-height: 1.3;

        overflow-wrap: break-word;
    }


    /* =========================
       MODULE GRID
    ========================= */

    .module-grid {
        width: 100%;

        display: grid;

        grid-template-columns: 1fr;

        gap: 14px;
    }


    /* =========================
       MODULE CARD
    ========================= */

    .module-card {
        position: relative;

        width: 100%;
        min-width: 0;

        min-height: 90px;

        padding: 16px;

        display: flex;
        align-items: center;

        gap: 12px;

        border-radius: 14px;
    }

    .module-icon {
        width: 46px;
        height: 46px;

        flex: 0 0 46px;

        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: 11px;

        font-size: 21px;
    }

    .img-icon {
        width: 28px;
        height: 28px;

        object-fit: contain;
    }

    /*
       Text area inside card
    */

    .module-card > div:nth-child(2) {
        flex: 1 1 auto;

        min-width: 0;

        padding-right: 10px;
    }

    .module-card h2 {
        font-size: 16px;

        line-height: 1.3;

        overflow-wrap: break-word;
        word-break: normal;
    }

    .module-card p {
        font-size: 12px;

        line-height: 1.4;

        margin-top: 4px;
    }


    /* =========================
       ARROW
    ========================= */

    .arrow {
        position: static;

        flex: 0 0 auto;

        margin-left: auto;

        font-size: 20px;

        color: var(--primary);
    }


    /* =========================
       FOOTER
    ========================= */

    .dashboard-footer {
        width: 100%;

        padding: 0 15px 20px;

        text-align: center;

        font-size: 10px;

        line-height: 1.4;
    }
}


/* ========================================
   VERY SMALL PHONE
======================================== */

@media (max-width: 380px) {

    /* =========================
       TOPBAR
    ========================= */

    .topbar {
        min-height: 56px;

        padding: 8px 9px;

        gap: 6px;
    }

    .topbar-brand {
        gap: 5px;
    }

    .mini-icon {
        width: 50px;
        height: 26px;

        flex: 0 0 50px;
    }

    .topbar-brand span {
        font-size: 10px;

        line-height: 1.25;
    }

    .logout-btn {
        font-size: 10px;

        padding: 6px 7px;
    }


    /* =========================
       DASHBOARD
    ========================= */

    .dashboard-container {
        width: 100%;

        padding: 25px 12px;
    }

    .welcome {
        margin-bottom: 16px;
    }

    .welcome h2 {
        font-size: 18px;

        line-height: 1.3;
    }


    /* =========================
       MODULE CARDS
    ========================= */

    .module-grid {
        gap: 10px;
    }

    .module-card {
        min-height: 85px;

        padding: 13px;

        gap: 10px;

        border-radius: 12px;
    }

    .module-icon {
        width: 40px;
        height: 40px;

        flex: 0 0 40px;

        font-size: 18px;

        border-radius: 10px;
    }

    .img-icon {
        width: 24px;
        height: 24px;
    }

    .module-card > div:nth-child(2) {
        padding-right: 5px;
    }

    .module-card h2 {
        font-size: 14px;

        line-height: 1.3;
    }

    .module-card p {
        font-size: 10px;

        line-height: 1.3;
    }

    .arrow {
        font-size: 16px;
    }


    /* =========================
       FOOTER
    ========================= */

    .dashboard-footer {
        font-size: 9px;

        padding-left: 10px;
        padding-right: 10px;
    }
}
