* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #10233f;
    --navy-light: #17365f;
    --gold: #d6a83c;
    --background: #f4f7fb;
    --text: #172033;
    --muted: #6c7789;
    --border: #dce2ea;
    --white: #ffffff;
}

body {
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
}

.container {
    min-height: calc(100vh - 45px);
    display: grid;
    grid-template-columns: 42% 58%;
}

/* LEFT PANEL */

.left-panel {
    position: relative;
    overflow: hidden;
    padding: 70px 8vw;
    display: flex;
    flex-direction: column;
    justify-content: center;

    background: linear-gradient(
        145deg,
        var(--navy),
        var(--navy-light)
    );

    color: white;
}

.left-panel::before {
    content: "";
    position: absolute;

    width: 430px;
    height: 430px;

    border: 1px solid rgba(214, 168, 60, 0.25);
    border-radius: 50%;

    right: -200px;
    top: -100px;
}

.left-panel::after {
    content: "";
    position: absolute;

    width: 320px;
    height: 320px;

    border: 1px solid rgba(214, 168, 60, 0.18);
    border-radius: 50%;

    left: -190px;
    bottom: -150px;
}

.logo,
.mobile-logo {
    width: 72px;
    height: 72px;

    display: grid;
    place-items: center;

    background: var(--gold);
    color: var(--navy);

    border-radius: 18px;

    font-size: 23px;
    font-weight: 900;

    letter-spacing: 1px;

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);

    margin-bottom: 28px;
}

.left-panel h1 {
    font-size: clamp(35px, 4vw, 58px);

    line-height: 1.08;

    letter-spacing: -1.5px;

    margin-bottom: 18px;
}

.left-panel > p {
    font-size: 19px;

    color: #dbe6f5;
}

.features {
    margin-top: 55px;

    display: flex;
    flex-direction: column;

    gap: 14px;

    color: #c5d3e6;

    font-size: 14px;
}

/* RIGHT PANEL */

.right-panel {
    display: grid;
    place-items: center;

    padding: 50px 7vw;
}

.login-box {
    width: min(100%, 470px);
}

.mobile-logo {
    display: none;
}

.welcome {
    color: #9a741e;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 2px;

    margin-bottom: 9px;
}

.login-box h2,
.modal-box h2 {
    font-size: 31px;

    line-height: 1.2;

    margin-bottom: 8px;
}

.description {
    color: var(--muted);

    line-height: 1.6;

    margin-bottom: 25px;
}

/* ROLE BUTTONS */

.roles {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 5px;

    padding: 5px;

    background: #e9edf3;

    border-radius: 12px;

    margin-bottom: 24px;
}

.role {
    border: none;

    background: transparent;

    padding: 12px;

    border-radius: 9px;

    color: #596579;

    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}

.role.active {
    background: white;

    color: var(--navy);

    box-shadow: 0 3px 12px rgba(16, 35, 63, 0.1);
}

/* FORM */

label {
    display: block;

    font-size: 13px;

    font-weight: 700;

    margin: 17px 0 8px;
}

input {
    width: 100%;

    border: 1px solid var(--border);

    border-radius: 10px;

    padding: 14px 15px;

    outline: none;

    font-size: 15px;

    background: white;

    transition: 0.2s;
}

input:focus {
    border-color: var(--navy-light);

    box-shadow: 0 0 0 3px rgba(23, 54, 95, 0.08);
}

/* PASSWORD */

.password-box {
    position: relative;
}

.password-box input {
    padding-right: 70px;
}

.password-box button {
    position: absolute;

    right: 8px;
    top: 7px;

    height: 36px;

    border: none;

    background: transparent;

    color: var(--navy-light);

    font-weight: 700;

    cursor: pointer;
}

/* LOGIN BUTTON */

.login-button {
    width: 100%;

    border: none;

    border-radius: 10px;

    padding: 14px;

    margin-top: 22px;

    background: var(--navy);

    color: white;

    font-size: 15px;

    font-weight: 800;

    cursor: pointer;

    transition: 0.2s;
}

.login-button:hover {
    background: #0b1b32;

    transform: translateY(-1px);
}

/* REGISTRATION */

.registration {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 18px;

    border: 1px solid var(--border);

    background: white;

    border-radius: 12px;

    padding: 15px;

    margin-top: 18px;
}

.registration strong,
.registration small {
    display: block;
}

.registration strong {
    font-size: 14px;

    margin-bottom: 4px;
}

.registration small {
    color: var(--muted);

    font-size: 12px;
}

.registration button {
    flex: 0 0 auto;

    border: 1px solid var(--navy);

    background: white;

    color: var(--navy);

    border-radius: 8px;

    padding: 9px 13px;

    font-weight: 800;

    cursor: pointer;
}

.security {
    text-align: center;

    color: #8b95a5;

    font-size: 12px;

    margin-top: 20px;
}

#loginMessage,
#registrationMessage {
    min-height: 20px;

    margin-top: 13px;

    font-size: 13px;

    color: #9a741e;
}

/* MODAL */

.modal {
    position: fixed;

    inset: 0;

    background: rgba(8, 19, 35, 0.62);

    display: none;

    place-items: center;

    padding: 20px;

    z-index: 100;
}

.modal.show {
    display: grid;
}

.modal-box {
    position: relative;

    width: min(100%, 470px);

    background: white;

    border-radius: 18px;

    padding: 32px;

    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.close {
    position: absolute;

    top: 10px;

    right: 15px;

    border: none;

    background: transparent;

    font-size: 30px;

    color: #6d7787;

    cursor: pointer;
}

/* FOOTER */

footer {
    min-height: 45px;

    display: grid;

    place-items: center;

    background: #edf1f6;

    color: #788396;

    font-size: 12px;

    padding: 10px 20px;
}

/* MOBILE */

@media (max-width: 800px) {

    .container {
        grid-template-columns: 1fr;

        min-height: calc(100vh - 45px);
    }

    .left-panel {
        display: none;
    }

    .right-panel {
        padding: 38px 20px;
    }

    .mobile-logo {
        display: grid;

        margin: 0 auto 25px;
    }

    .login-box h2 {
        font-size: 27px;
    }
}

@media (max-width: 430px) {

    .registration {
        flex-direction: column;

        align-items: flex-start;
    }

    .registration button {
        width: 100%;
    }

    .modal-box {
        padding: 28px 20px;
    }
}


/* ==========================================
   ADMIN DASHBOARD
   ========================================== */

.admin-dashboard {
    min-height: 100vh;
    background: var(--background);
}

.admin-header {
    min-height: 82px;
    background: var(--navy);
    color: white;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 6vw;
}

.admin-header > div {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-logo {
    width: 50px;
    height: 50px;

    display: grid;
    place-items: center;

    background: var(--gold);
    color: var(--navy);

    border-radius: 12px;

    font-weight: 900;
}

.admin-header h1 {
    font-size: 21px;
    margin: 0;
}

.admin-header p {
    margin-top: 3px;
    font-size: 12px;
    color: #cbd7e8;
}

.logout-button {
    border: 1px solid rgba(255,255,255,0.4);

    background: transparent;
    color: white;

    border-radius: 8px;

    padding: 9px 15px;

    font-weight: 700;

    cursor: pointer;
}

.logout-button:hover {
    background: white;
    color: var(--navy);
}

.admin-content {
    width: min(1100px, 92%);
    margin: 35px auto;
}

.welcome-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 15px;

    padding: 25px;

    margin-bottom: 22px;
}

.welcome-card h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.welcome-card p:last-child {
    color: var(--muted);
}

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;

    margin-bottom: 30px;
}

.stat-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 14px;

    padding: 22px;
}

.stat-card span {
    display: block;

    color: var(--muted);

    font-size: 13px;

    margin-bottom: 10px;
}

.stat-card strong {
    font-size: 32px;

    color: var(--navy);
}

.dashboard-section {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 15px;
}

.dashboard-section h2 {
    margin-bottom: 5px;
}

.dashboard-section p {
    color: var(--muted);

    font-size: 13px;
}

.primary-button {
    border: none;

    background: var(--navy);
    color: white;

    border-radius: 9px;

    padding: 11px 17px;

    font-weight: 700;

    cursor: pointer;
}

.table-container {
    background: white;

    border: 1px solid var(--border);

    border-radius: 14px;

    min-height: 220px;

    display: grid;
    place-items: center;

    padding: 30px;
}

.empty-state {
    text-align: center;
}

.empty-state h3 {
    margin-bottom: 7px;
}

.empty-state p {
    color: var(--muted);

    font-size: 13px;
}

@media (max-width: 700px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        padding: 15px 20px;
    }

    .admin-header h1 {
        font-size: 17px;
    }

    .admin-content {
        width: 92%;
    }

    .dashboard-section {
        align-items: flex-start;
        flex-direction: column;
    }

}
