/* ============================================================
   CODEWORD HACKATHON
   LOGIN + STUDENT REGISTRATION
   ============================================================
   Premium Light Glassmorphism + 3D Design
   Purple + Orange Theme
   Fully Responsive
   Existing HTML / IDs / Classes preserved
   Works with Login + Student Registration
   ============================================================ */


/* ============================================================
   GOOGLE FONT
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');


/* ============================================================
   THEME VARIABLES
   ============================================================ */

:root {

    --cw-primary: #4F46D8;
    --cw-primary-dark: #3932B8;
    --cw-primary-deep: #302AA2;
    --cw-primary-light: #756FF0;

    --cw-orange: #F6A623;
    --cw-orange-dark: #D98C08;
    --cw-orange-light: #FFD071;

    --cw-dark: #172033;
    --cw-dark-2: #202A3D;

    --cw-text: #344054;
    --cw-text-medium: #475467;
    --cw-muted: #667085;

    --cw-white: #FFFFFF;
    --cw-bg: #F5F7FB;
    --cw-surface: #F8F9FD;

    --cw-border: #DDE3EE;
    --cw-border-light: #E9EDF4;

    --cw-error: #D92D20;
    --cw-success: #16834B;

    --cw-warning: #B54708;

    --cw-radius: 22px;

    --cw-card-shadow:
        0 30px 70px rgba(23, 32, 51, 0.13),
        0 12px 30px rgba(79, 70, 216, 0.07);

    --cw-input-shadow:
        inset 0 2px 5px rgba(23, 32, 51, 0.035),
        0 4px 0 rgba(226, 230, 239, 0.95),
        0 8px 16px rgba(23, 32, 51, 0.025);

    --cw-button-shadow:
        0 7px 0 var(--cw-primary-dark),
        0 15px 28px rgba(79, 70, 216, 0.20);
}


/* ============================================================
   RESET
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        "Poppins",
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--cw-text);

    background:
        radial-gradient(
            circle at 7% 12%,
            rgba(79, 70, 216, 0.11),
            transparent 35%
        ),
        radial-gradient(
            circle at 95% 85%,
            rgba(246, 166, 35, 0.12),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #F8F9FC 0%,
            #F3F5FA 50%,
            #FFFFFF 100%
        );

    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--cw-primary);
}

::selection {
    background: var(--cw-primary);
    color: #FFFFFF;
}


/* ============================================================
   PAGE CONTAINER
   ============================================================ */

.page-container {

    position: relative;
    z-index: 1;

    display: flex;

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

    width: 100%;
    min-height: calc(100vh - 1px);

    padding: 80px 20px;

    overflow: hidden;
}


/* ============================================================
   BACKGROUND DECORATIVE CIRCLES
   ============================================================ */

.page-container::before,
.page-container::after {

    content: "";

    position: absolute;

    border-radius: 50%;

    pointer-events: none;

    z-index: -1;
}


.page-container::before {

    width: 430px;
    height: 430px;

    top: -230px;
    left: -190px;

    background:
        radial-gradient(
            circle,
            rgba(79, 70, 216, 0.14),
            rgba(79, 70, 216, 0.035) 48%,
            transparent 72%
        );
}


.page-container::after {

    width: 420px;
    height: 420px;

    right: -210px;
    bottom: -230px;

    background:
        radial-gradient(
            circle,
            rgba(246, 166, 35, 0.15),
            rgba(246, 166, 35, 0.035) 48%,
            transparent 72%
        );
}


/* ============================================================
   FORM WRAPPER
   ============================================================ */

.form-wrapper {

    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 470px;

    margin: 0 auto;
}


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

.card {

    position: relative;

    width: 100%;

    padding: 42px 42px 35px;

    border: 1px solid rgba(221, 227, 238, 0.95);

    border-radius: var(--cw-radius);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.99),
            rgba(248, 249, 253, 0.98)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 20px 0 rgba(79, 70, 216, 0.035),
        var(--cw-card-shadow);

    overflow: visible;

    animation: cardEnter 0.55s ease both;
}


/* ============================================================
   CARD TOP GRADIENT
   ============================================================ */

.card::before {

    content: "";

    position: absolute;

    top: 0;
    left: 28px;
    right: 28px;

    height: 5px;

    border-radius: 0 0 10px 10px;

    background:
        linear-gradient(
            90deg,
            var(--cw-primary),
            var(--cw-primary-light) 50%,
            var(--cw-orange)
        );

    box-shadow:
        0 5px 14px rgba(79, 70, 216, 0.17);

    z-index: 3;
}


/* ============================================================
   CARD BOTTOM 3D EDGE
   ============================================================ */

.card::after {

    content: "";

    position: absolute;

    left: 16px;
    right: 16px;

    bottom: -9px;

    height: 14px;

    border-radius: 0 0 18px 18px;

    background:
        linear-gradient(
            90deg,
            rgba(79, 70, 216, 0.18),
            rgba(246, 166, 35, 0.12)
        );

    z-index: -1;
}


/* ============================================================
   CARD HEADING
   ============================================================ */

.card h2 {

    margin: 0 0 28px;

    text-align: center;

    color: var(--cw-dark);

    font-size: 30px;

    line-height: 1.25;

    font-weight: 800;

    letter-spacing: -0.5px;
}


/* ============================================================
   CLOSE BUTTON
   LOGIN PAGE
   ============================================================ */

.close-btn {

    position: absolute;

    top: 18px;
    right: 18px;

    z-index: 20;

    width: 36px;
    height: 36px;

    display: flex;

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

    padding: 0;

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

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #FFFFFF,
            #F0F2F7
        );

    color: var(--cw-text-medium);

    font-size: 14px;

    cursor: pointer;

    box-shadow:
        0 4px 0 #DCE1EA,
        0 8px 15px rgba(23, 32, 51, 0.08);

    transition:
        transform 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.close-btn:hover {

    transform: translateY(-2px);

    border-color: rgba(246, 166, 35, 0.55);

    background:
        linear-gradient(
            145deg,
            #FFF8EB,
            #FFFFFF
        );

    color: var(--cw-orange-dark);

    box-shadow:
        0 5px 0 rgba(246, 166, 35, 0.20),
        0 10px 18px rgba(246, 166, 35, 0.12);
}


.close-btn:active {

    transform: translateY(2px);

    box-shadow:
        0 2px 0 #DCE1EA,
        0 5px 10px rgba(23, 32, 51, 0.07);
}


/* ============================================================
   CANCEL / BACK BUTTON
   STUDENT REGISTRATION
   ============================================================ */

.cancel-btn {

    display: inline-flex;

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

    gap: 8px;

    min-height: 38px;

    margin: 0 0 20px;

    padding: 8px 14px;

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

    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            #FFFFFF,
            #F3F4F8
        );

    color: var(--cw-text-medium);

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 4px 0 #DCE1EA,
        0 8px 15px rgba(23, 32, 51, 0.06);

    transition: 0.2s ease;
}


.cancel-btn:hover {

    transform: translateY(-2px);

    border-color: rgba(79, 70, 216, 0.35);

    color: var(--cw-primary);

    box-shadow:
        0 5px 0 rgba(79, 70, 216, 0.14),
        0 10px 18px rgba(79, 70, 216, 0.09);
}


.cancel-btn:active {

    transform: translateY(2px);

    box-shadow:
        0 2px 0 #DCE1EA,
        0 5px 10px rgba(23, 32, 51, 0.06);
}


/* ============================================================
   ERROR BOX
   ============================================================ */

.error-box {

    display: none;

    margin: 0 0 18px;

    padding: 12px 14px;

    border:
        1px solid rgba(217, 45, 32, 0.20);

    border-left:
        4px solid var(--cw-error);

    border-radius: 11px;

    background: #FFF5F4;

    color: var(--cw-error);

    font-size: 12px;

    line-height: 1.6;

    font-weight: 600;
}


/* ============================================================
   GENERIC FORM
   ============================================================ */

#loginForm,
#registerForm {

    width: 100%;
}


/* ============================================================
   ALL INPUTS
   LOGIN + REGISTER
   ============================================================ */

#loginForm input,
#loginForm select,
#registerForm input,
#registerForm select,
#registerForm textarea {

    display: block;

    width: 100%;

    min-width: 0;

    height: 55px;

    margin: 0 0 18px;

    padding: 0 17px;

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

    border-radius: 14px;

    outline: none;

    background:
        linear-gradient(
            145deg,
            #FFFFFF,
            #F7F8FC
        );

    color: var(--cw-dark);

    font-size: 13.5px;

    font-weight: 500;

    box-shadow:
        inset 0 2px 5px rgba(23, 32, 51, 0.035),
        0 4px 0 #E7EAF1,
        0 8px 15px rgba(23, 32, 51, 0.025);

    transition:
        transform 0.2s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}


/* ============================================================
   PLACEHOLDER
   ============================================================ */

#loginForm input::placeholder,
#registerForm input::placeholder,
#registerForm textarea::placeholder {

    color: #98A2B3;

    opacity: 1;

    font-weight: 500;
}


/* ============================================================
   INPUT HOVER
   ============================================================ */

#loginForm input:hover,
#loginForm select:hover,
#registerForm input:hover,
#registerForm select:hover,
#registerForm textarea:hover {

    border-color: #C7CCDA;

    background: #FFFFFF;
}


/* ============================================================
   INPUT FOCUS
   ============================================================ */

#loginForm input:focus,
#loginForm select:focus,
#registerForm input:focus,
#registerForm select:focus,
#registerForm textarea:focus {

    transform: translateY(-1px);

    border-color: var(--cw-primary);

    background: #FFFFFF;

    box-shadow:
        0 0 0 4px rgba(79, 70, 216, 0.09),
        0 8px 20px rgba(79, 70, 216, 0.09),
        0 4px 0 rgba(79, 70, 216, 0.25);
}


/* ============================================================
   TEXTAREA
   ============================================================ */

#registerForm textarea {

    min-height: 110px;

    height: auto;

    padding-top: 14px;
    padding-bottom: 14px;

    resize: vertical;
}


/* ============================================================
   SELECT
   ============================================================ */

#loginRole {

    cursor: pointer;

    appearance: auto;

    color: var(--cw-dark);
}


/* ============================================================
   LOGIN SELECT PREMIUM GLASS
   ============================================================ */

#loginRole {

    height: 56px;

    padding: 0 48px 0 18px;

    border:
        1px solid rgba(79, 70, 216, 0.30);

    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(245, 246, 252, 0.94)
        );

    font-weight: 600;

    box-shadow:
        inset 0 2px 5px rgba(255, 255, 255, 0.90),
        inset 0 -2px 5px rgba(79, 70, 216, 0.035),
        0 4px 0 rgba(79, 70, 216, 0.12),
        0 8px 18px rgba(79, 70, 216, 0.08);
}


#loginRole:hover {

    transform: translateY(-1px);

    border-color:
        rgba(79, 70, 216, 0.50);

    background:
        linear-gradient(
            145deg,
            #FFFFFF,
            #F4F3FF
        );

    box-shadow:
        inset 0 2px 5px rgba(255, 255, 255, 0.95),
        0 5px 0 rgba(79, 70, 216, 0.14),
        0 12px 22px rgba(79, 70, 216, 0.11);
}


#loginRole:focus {

    transform: translateY(-2px);

    border-color: var(--cw-primary);

    background:
        linear-gradient(
            145deg,
            #FFFFFF,
            #F7F6FF
        );

    box-shadow:
        0 0 0 4px rgba(79, 70, 216, 0.11),
        0 7px 0 rgba(79, 70, 216, 0.18),
        0 14px 25px rgba(79, 70, 216, 0.13);
}


#loginRole option {

    color: var(--cw-dark);

    background: #FFFFFF;

    font-family: "Poppins", sans-serif;

    font-size: 14px;
}


/* ============================================================
   VALIDATION MESSAGES
   ============================================================ */

#loginForm small,
#registerForm small {

    display: block;

    min-height: 0;

    margin:
        -11px 3px 13px;

    color: var(--cw-error);

    font-size: 10.5px;

    line-height: 1.5;

    font-weight: 600;
}


/* ============================================================
   SPECIFIC LOGIN VALIDATION
   ============================================================ */

#roleMsg,
#emailMsg,
#passMsg {

    display: block;
}


/* ============================================================
   REGISTER FORM FIELD SPACING
   ============================================================ */

#registerForm > input {

    margin-bottom: 18px;
}


/* ============================================================
   OTP FIELD
   ============================================================ */

.reg-field {

    width: 100%;

    margin-bottom: 4px;
}


/* ============================================================
   OTP ROW
   ============================================================ */

.otp-row {

    display: flex;

    align-items: stretch;

    width: 100%;

    gap: 9px;

    margin-bottom: 0;
}


.otp-row input {

    flex: 1;

    min-width: 0;

    margin-bottom: 18px !important;
}


/* ============================================================
   OTP BUTTON BASE
   ============================================================ */

.otp-btn {

    flex: 0 0 auto;

    min-width: 105px;

    height: 55px;

    padding: 0 14px;

    border: 1px solid var(--cw-primary-dark);

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            var(--cw-primary),
            var(--cw-primary-light)
        );

    color: #FFFFFF;

    font-size: 11.5px;

    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 5px 0 var(--cw-primary-dark),
        0 10px 18px rgba(79, 70, 216, 0.15);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.25s ease;
}


.otp-btn:hover {

    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            var(--cw-primary-dark),
            var(--cw-primary)
        );

    box-shadow:
        0 7px 0 var(--cw-primary-deep),
        0 14px 22px rgba(79, 70, 216, 0.18);
}


.otp-btn:active {

    transform: translateY(3px);

    box-shadow:
        0 2px 0 var(--cw-primary-deep),
        0 6px 12px rgba(79, 70, 216, 0.12);
}


/* ============================================================
   OTP ACTIONS
   ============================================================ */

.otp-actions {

    display: flex;

    align-items: center;

    gap: 9px;

    margin:
        -2px 0 14px;
}


.otp-actions .otp-btn {

    min-width: 105px;

    height: 43px;
}


/* ============================================================
   VERIFY BUTTON
   ============================================================ */

.verify-btn {

    background:
        linear-gradient(
            135deg,
            #16834B,
            #23A566
        );

    border-color: #147441;

    box-shadow:
        0 5px 0 #116238,
        0 10px 18px rgba(22, 131, 75, 0.16);
}


.verify-btn:hover {

    background:
        linear-gradient(
            135deg,
            #147441,
            #16834B
        );

    box-shadow:
        0 7px 0 #0E5732,
        0 14px 22px rgba(22, 131, 75, 0.19);
}


/* ============================================================
   RESEND BUTTON
   ============================================================ */

.resend-btn {

    background:
        linear-gradient(
            135deg,
            #FFF8EB,
            #FFFFFF
        );

    color: var(--cw-orange-dark);

    border-color:
        rgba(246, 166, 35, 0.45);

    box-shadow:
        0 5px 0 rgba(246, 166, 35, 0.20),
        0 10px 18px rgba(246, 166, 35, 0.10);
}


.resend-btn:hover {

    background:
        linear-gradient(
            135deg,
            #FFF1D6,
            #FFFFFF
        );

    color: #B96F00;
}


/* ============================================================
   CAPTCHA BOX
   ============================================================ */

.captcha-box {

    width: 100%;

    margin-top: 4px;

    margin-bottom: 20px;

    padding: 14px;

    border:
        1px solid rgba(79, 70, 216, 0.12);

    border-radius: 15px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.96),
            rgba(247, 248, 252, 0.96)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 4px 0 rgba(79, 70, 216, 0.06),
        0 8px 18px rgba(23, 32, 51, 0.035);
}


/* ============================================================
   CAPTCHA ROW
   ============================================================ */

.captcha-row {

    display: flex;

    align-items: center;

    gap: 10px;

    width: 100%;

    margin-bottom: 12px;
}


/* ============================================================
   CAPTCHA CANVAS
   ============================================================ */

#captchaCanvas {

    display: block;

    flex: 1;

    width: 100%;

    max-width: 100%;

    height: 55px;

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

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #F2F1FF,
            #FFF9EE
        );

    box-shadow:
        inset 0 2px 5px rgba(23, 32, 51, 0.04),
        0 4px 0 #E5E8EF;
}


/* ============================================================
   CAPTCHA REFRESH
   ============================================================ */

#refreshCaptcha {

    flex: 0 0 45px;

    width: 45px;

    height: 45px;

    display: flex;

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

    padding: 0;

    border:
        1px solid rgba(79, 70, 216, 0.20);

    border-radius: 12px;

    background:
        linear-gradient(
            145deg,
            #FFFFFF,
            #F1F2F8
        );

    color: var(--cw-primary);

    font-size: 22px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 4px 0 #DCE1EA,
        0 8px 15px rgba(79, 70, 216, 0.08);

    transition: 0.2s ease;
}


#refreshCaptcha:hover {

    transform: translateY(-2px) rotate(-15deg);

    color: var(--cw-orange-dark);

    border-color:
        rgba(246, 166, 35, 0.35);

    box-shadow:
        0 5px 0 rgba(246, 166, 35, 0.18),
        0 10px 18px rgba(246, 166, 35, 0.10);
}


#refreshCaptcha:active {

    transform: translateY(2px) rotate(0deg);

    box-shadow:
        0 2px 0 #DCE1EA,
        0 5px 10px rgba(23, 32, 51, 0.06);
}


/* ============================================================
   CAPTCHA INPUT
   ============================================================ */

#captchaInput {

    margin-bottom: 0 !important;
}


/* ============================================================
   FORM MESSAGE
   ============================================================ */

#formMsg {

    margin-top: 8px !important;

    margin-bottom: 12px !important;

    color: var(--cw-text-medium);

    font-size: 12px;

    line-height: 1.6;

    text-align: center;

    font-weight: 600;
}


/* ============================================================
   LOGIN BUTTON
   PREMIUM GLASSY 3D
   ============================================================ */

#loginBtn,
#submitBtn {

    position: relative;

    display: flex;

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

    width: 100%;

    min-height: 56px;

    margin-top: 5px;

    padding: 14px 22px;

    border:
        1px solid rgba(79, 70, 216, 0.70);

    border-radius: 17px;

    outline: none;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(79, 70, 216, 0.98),
            rgba(117, 111, 240, 0.98)
        );

    color: #FFFFFF;

    font-family: "Poppins", sans-serif;

    font-size: 14px;

    font-weight: 800;

    letter-spacing: 0.1px;

    cursor: pointer;

    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.50),
        inset 0 -2px 4px rgba(35, 29, 140, 0.20),
        0 6px 0 #3932B8,
        0 10px 18px rgba(79, 70, 216, 0.18),
        0 18px 30px rgba(79, 70, 216, 0.12);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        opacity 0.25s ease;
}


/* ============================================================
   BUTTON GLASS HIGHLIGHT
   ============================================================ */

#loginBtn::before,
#submitBtn::before {

    content: "";

    position: absolute;

    top: 2px;

    left: 12%;

    width: 76%;

    height: 42%;

    border-radius: 999px;

    background:
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.28),
            rgba(255, 255, 255, 0.04)
        );

    opacity: 0.85;

    pointer-events: none;
}


/* ============================================================
   BUTTON ORANGE EDGE
   ============================================================ */

#loginBtn::after,
#submitBtn::after {

    content: "";

    position: absolute;

    left: 10%;
    right: 10%;

    bottom: 3px;

    height: 2px;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(246, 166, 35, 0.65),
            transparent
        );

    opacity: 0.8;

    pointer-events: none;
}


/* ============================================================
   BUTTON HOVER
   ============================================================ */

#loginBtn:hover:not(:disabled),
#submitBtn:hover:not(:disabled) {

    transform: translateY(-3px);

    border-color:
        rgba(117, 111, 240, 0.90);

    background:
        linear-gradient(
            135deg,
            #453CC8,
            #6D67ED
        );

    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.55),
        inset 0 -3px 5px rgba(35, 29, 140, 0.18),
        0 8px 0 #302AA2,
        0 15px 25px rgba(79, 70, 216, 0.22),
        0 22px 38px rgba(79, 70, 216, 0.13);
}


/* ============================================================
   BUTTON ACTIVE
   ============================================================ */

#loginBtn:active:not(:disabled),
#submitBtn:active:not(:disabled) {

    transform: translateY(4px);

    box-shadow:
        inset 0 2px 4px rgba(35, 29, 140, 0.20),
        0 2px 0 #302AA2,
        0 5px 12px rgba(79, 70, 216, 0.14);
}


/* ============================================================
   DISABLED BUTTON
   ============================================================ */

#loginBtn:disabled,
#submitBtn:disabled {

    opacity: 0.55;

    cursor: not-allowed;

    transform: none;

    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.35),
        0 5px 0 #B8BDCC,
        0 8px 15px rgba(23, 32, 51, 0.08);
}


/* ============================================================
   REGISTER / LOGIN TEXT
   ============================================================ */

.login-text {

    margin: 25px 0 0;

    text-align: center;

    color: var(--cw-muted);

    font-size: 12px;

    line-height: 1.7;

    font-weight: 500;
}


/* ============================================================
   REGISTER LINK
   ============================================================ */

.login-text a {

    display: inline-block;

    margin-left: 3px;

    color: var(--cw-primary-dark);

    font-weight: 750;

    text-decoration: none;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.login-text a:hover {

    color: var(--cw-orange-dark);

    text-decoration: underline;

    transform: translateY(-1px);
}


/* ============================================================
   SUCCESS BOX
   ============================================================ */

.success-box {

    margin-bottom: 18px;

    padding: 12px 15px;

    border:
        1px solid rgba(22, 131, 75, 0.20);

    border-left:
        4px solid var(--cw-success);

    border-radius: 10px;

    background: #F0FAF5;

    color: var(--cw-success);

    font-size: 12px;

    line-height: 1.6;

    font-weight: 600;
}


/* ============================================================
   SUCCESS MODAL
   ============================================================ */

.modal,
.modal-overlay {

    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

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

    padding: 20px;

    background:
        rgba(23, 32, 51, 0.58);

    backdrop-filter: blur(8px);

    -webkit-backdrop-filter: blur(8px);
}


/* ============================================================
   MODAL CONTENT
   ============================================================ */

.modal-content,
.modal-box {

    position: relative;

    width: min(100%, 400px);

    padding: 32px 28px;

    border:
        1px solid rgba(221, 227, 238, 0.95);

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            #FFFFFF,
            #F8F9FD
        );

    text-align: center;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 30px 75px rgba(23, 32, 51, 0.25),
        0 8px 0 rgba(79, 70, 216, 0.08);

    animation: modalPop 0.3s ease both;
}


.modal-content h3,
.modal-box h2 {

    margin: 0 0 10px;

    color: var(--cw-dark);

    font-size: 21px;

    line-height: 1.35;

    font-weight: 800;
}


.modal-content p {

    margin: 0 0 21px;

    color: var(--cw-muted);

    font-size: 13px;

    line-height: 1.75;
}


/* ============================================================
   MODAL BUTTON
   ============================================================ */

.modal-content button,
.modal-box button {

    position: relative;

    width: 100%;

    min-height: 45px;

    padding: 10px 18px;

    border:
        1px solid var(--cw-primary-dark);

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--cw-primary),
            var(--cw-primary-light)
        );

    color: #FFFFFF;

    font-size: 13px;

    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 6px 0 var(--cw-primary-dark),
        0 12px 20px rgba(79, 70, 216, 0.18);

    transition: 0.2s ease;
}


.modal-content button:hover,
.modal-box button:hover {

    transform: translateY(-2px);

    box-shadow:
        0 8px 0 var(--cw-primary-dark),
        0 15px 24px rgba(79, 70, 216, 0.20);
}


.modal-content button:active,
.modal-box button:active {

    transform: translateY(3px);

    box-shadow:
        0 3px 0 var(--cw-primary-dark),
        0 7px 12px rgba(79, 70, 216, 0.13);
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes cardEnter {

    from {

        opacity: 0;

        transform:
            translateY(25px)
            scale(0.98);
    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


@keyframes modalPop {

    from {

        opacity: 0;

        transform:
            scale(0.92)
            translateY(12px);
    }

    to {

        opacity: 1;

        transform:
            scale(1)
            translateY(0);
    }
}


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

@media (max-width: 700px) {

    .page-container {

        align-items: flex-start;

        min-height: auto;

        padding:
            55px
            16px
            65px;
    }


    .form-wrapper {

        max-width: 500px;
    }


    .card {

        padding:
            38px
            30px
            31px;
    }


    .card h2 {

        font-size: 29px;
    }


    .otp-row {

        gap: 8px;
    }


    .otp-btn {

        min-width: 95px;

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


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

@media (max-width: 520px) {

    .page-container {

        padding:
            40px
            13px
            50px;
    }


    .card {

        padding:
            35px
            21px
            28px;

        border-radius: 19px;
    }


    .card::before {

        left: 20px;
        right: 20px;
    }


    .card h2 {

        margin-bottom: 25px;

        font-size: 27px;
    }


    .close-btn {

        top: 14px;
        right: 14px;

        width: 32px;
        height: 32px;

        font-size: 12px;
    }


    #loginForm input,
    #loginForm select,
    #registerForm input,
    #registerForm select {

        height: 52px;

        padding:
            0
            14px;

        border-radius: 13px;

        font-size: 12.5px;
    }


    #loginRole {

        height: 53px;

        padding-left: 15px;

        border-radius: 14px;

        font-size: 12.5px;
    }


    #loginForm small,
    #registerForm small {

        font-size: 10px;

        margin-top: -10px;

        margin-bottom: 12px;
    }


    .otp-row {

        flex-direction: column;

        gap: 0;
    }


    .otp-row input {

        width: 100%;

        margin-bottom: 10px !important;
    }


    .otp-row .otp-btn {

        width: 100%;

        height: 48px;

        margin-bottom: 12px;
    }


    .otp-actions {

        flex-direction: column;

        width: 100%;
    }


    .otp-actions .otp-btn {

        width: 100%;
    }


    .captcha-box {

        padding: 11px;
    }


    .captcha-row {

        gap: 7px;
    }


    #captchaCanvas {

        height: 50px;
    }


    #refreshCaptcha {

        flex-basis: 42px;

        width: 42px;
        height: 42px;
    }


    #loginBtn,
    #submitBtn {

        min-height: 53px;

        border-radius: 15px;

        font-size: 13px;
    }


    .cancel-btn {

        min-height: 36px;

        font-size: 11.5px;
    }


    .login-text {

        margin-top: 21px;

        font-size: 11.5px;
    }
}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 380px) {

    .page-container {

        padding:
            30px
            9px
            45px;
    }


    .card {

        padding:
            31px
            16px
            25px;

        border-radius: 17px;
    }


    .card::before {

        left: 16px;
        right: 16px;
    }


    .card h2 {

        margin-bottom: 22px;

        font-size: 24px;
    }


    .close-btn {

        top: 11px;
        right: 11px;

        width: 30px;
        height: 30px;

        font-size: 11px;
    }


    #loginForm input,
    #loginForm select,
    #registerForm input,
    #registerForm select {

        height: 49px;

        padding:
            0
            12px;

        border-radius: 12px;

        font-size: 11.5px;
    }


    #loginRole {

        height: 50px;

        padding-left: 12px;

        border-radius: 13px;

        font-size: 11.5px;
    }


    #loginForm small,
    #registerForm small {

        font-size: 9.5px;

        margin-bottom: 10px;
    }


    #loginBtn,
    #submitBtn {

        min-height: 50px;

        border-radius: 14px;

        font-size: 12.5px;
    }


    .login-text {

        font-size: 10.5px;
    }


    .captcha-row {

        gap: 6px;
    }


    #captchaCanvas {

        height: 47px;
    }


    #refreshCaptcha {

        flex-basis: 39px;

        width: 39px;
        height: 39px;

        font-size: 19px;
    }
}


/* ============================================================
   VERY SMALL DEVICES
   ============================================================ */

@media (max-width: 340px) {

    .page-container {

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


    .card {

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


    .card h2 {

        font-size: 22px;
    }


    #loginForm input,
    #loginForm select,
    #registerForm input,
    #registerForm select {

        font-size: 11px;
    }


    #loginRole {

        font-size: 11px;
    }


    .otp-btn {

        font-size: 10.5px;
    }
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

#loginBtn:focus-visible,
#submitBtn:focus-visible,
.close-btn:focus-visible,
.cancel-btn:focus-visible,
#loginForm input:focus-visible,
#loginForm select:focus-visible,
#registerForm input:focus-visible,
#registerForm select:focus-visible,
#registerForm textarea:focus-visible,
.otp-btn:focus-visible,
#refreshCaptcha:focus-visible,
.login-text a:focus-visible {

    outline:
        3px solid rgba(79, 70, 216, 0.25);

    outline-offset: 3px;
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    html {

        scroll-behavior: auto;
    }


    *,
    *::before,
    *::after {

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}


/* ============================================================
   END
   ============================================================ */