@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #1A4D7C;
    --primary-dark: #12395D;
    --primary-light: #EAF2F9;
    --background: #F4F7FB;
    --white: #FFFFFF;
    --text: #263445;
    --muted: #718096;
    --border: #DCE4ED;
    --danger: #B42318;
    --success: #18794E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px 16px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: var(--white);
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(26, 77, 124, 0.10);
}

.brand {
    text-align: center;
    margin-bottom: 28px;
}

.brand img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    margin-bottom: 10px;
}

.brand h1 {
    font-size: 23px;
    font-weight: 800;
    color: var(--primary);
}

.brand p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 5px;
}

.tabs {
    display: flex;
    background: #F0F3F7;
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 28px;
}

.tab {
    flex: 1;
    border: none;
    padding: 11px;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.07);
}

.form-heading {
    margin-bottom: 22px;
}

.form-heading h2 {
    font-size: 22px;
    color: var(--text);
    margin-bottom: 6px;
}

.form-heading p {
    color: var(--muted);
    font-size: 13px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper > i {
    position: absolute;
    left: 14px;
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0 43px;
    background: #FAFBFD;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: 0.2s ease;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(26, 77, 124, 0.09);
}

.input-wrapper input::placeholder {
    color: #A0AAB7;
}

.password-toggle {
    position: absolute;
    right: 13px;
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 5px;
}

/* ACCOUNT TYPE CHOICES */

.role-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.role-option {
    position: relative;
    display: block;
    cursor: pointer;
    margin: 0;
}

.role-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-content {
    min-height: 140px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 17px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    background: #FAFBFD;
    transition: 0.2s ease;
}

.role-content > i {
    font-size: 25px;
    color: var(--primary);
}

.role-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.role-content small {
    font-size: 10px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--muted);
}

.role-option input:checked + .role-content {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(26, 77, 124, 0.08);
}

.role-option:hover .role-content {
    border-color: var(--primary);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 20px;
    font-size: 12px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    cursor: pointer;
}

.remember input {
    accent-color: var(--primary);
}

.form-options button,
.switch-text button {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.submit-btn {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 9px;
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.2s ease;
}

.submit-btn:hover {
    background: var(--primary-dark);
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 23px 0;
    color: #9AA6B2;
    font-size: 11px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.social-buttons {
    display: grid;
    gap: 10px;
}

.social-buttons button {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--white);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.social-buttons button:hover {
    background: var(--background);
}

.social-buttons i {
    margin-right: 8px;
    color: var(--primary);
}

.switch-text {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 24px;
}

.footer-note {
    text-align: center;
    color: #A0AAB7;
    font-size: 10px;
    margin-top: 27px;
}

/* FEEDBACK */

.feedback {
    padding: 11px 13px;
    margin-bottom: 17px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
}

.feedback.error {
    color: var(--danger);
    background: #FEF3F2;
    border: 1px solid #FECDCA;
}

.feedback.success {
    color: var(--success);
    background: #ECFDF3;
    border: 1px solid #ABEFC6;
}

/* MODAL */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 30, 45, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 390px;
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    position: relative;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
}

.modal-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 15px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 21px;
}

.modal-content h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.modal-content > p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-content .submit-btn {
    margin-top: 15px;
}

.reset-feedback {
    font-size: 12px;
    margin-top: 13px;
    color: var(--primary);
}

.hidden {
    display: none !important;
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
    }

    .role-options {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .role-content {
        padding: 14px 8px;
        min-height: 135px;
    }

    .form-heading h2 {
        font-size: 20px;
    }
}