﻿
/* ══════════════════════════════════════════════════
           CSS VARIABLES
           ══════════════════════════════════════════════════ */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --success: #0f9d58;
    --success-light: #e6f4ea;
    --success-border: #ceead6;
    --danger: #d93025;
    --danger-light: #fce8e6;
    --warning: #f9ab00;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #6c757d;
    --gray-600: #565e64;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ══════════════════════════════════════════════════
           BACKGROUND & LAYOUT
           ══════════════════════════════════════════════════ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(145deg, #0f2027 0%, #203a43 40%, #2c5364 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Animated background particles */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

    .bg-decoration .circle {
        position: absolute;
        border-radius: 50%;
        opacity: 0.06;
        background: var(--white);
    }

        .bg-decoration .circle:nth-child(1) {
            width: 400px;
            height: 400px;
            top: -100px;
            right: -100px;
            animation: float 20s ease-in-out infinite;
        }

        .bg-decoration .circle:nth-child(2) {
            width: 300px;
            height: 300px;
            bottom: -80px;
            left: -80px;
            animation: float 25s ease-in-out infinite reverse;
        }

        .bg-decoration .circle:nth-child(3) {
            width: 200px;
            height: 200px;
            top: 40%;
            left: 60%;
            animation: float 18s ease-in-out infinite 3s;
        }

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-30px) rotate(5deg);
    }

    66% {
        transform: translateY(20px) rotate(-3deg);
    }
}

.page-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 30px 16px 60px;
}

/* ══════════════════════════════════════════════════
           MAIN CARD
           ══════════════════════════════════════════════════ */
.access-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 520px;
    overflow: hidden;
    animation: cardEntry 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Card Header ── */
.card-header-area {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 50%, #0a3d91 100%);
    padding: 36px 32px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .card-header-area::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -30%;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
    }

    .card-header-area::after {
        content: '';
        position: absolute;
        bottom: -40%;
        left: -20%;
        width: 160px;
        height: 160px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.05);
    }

.header-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    backdrop-filter: blur(8px);
}

    .header-icon i {
        font-size: 1.5rem;
        color: var(--white);
    }

.card-header-area h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.card-header-area p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* ── Card Body ── */
.card-body-area {
    padding: 32px;
}

/* ══════════════════════════════════════════════════
           STEP INDICATOR
           ══════════════════════════════════════════════════ */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 0 20px;
}

.step-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: var(--transition);
    border: 2.5px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-500);
    flex-shrink: 0;
    position: relative;
}

    .step-dot.active {
        border-color: var(--primary);
        background: var(--primary);
        color: var(--white);
        box-shadow: 0 0 0 5px rgba(26, 115, 232, 0.15);
        transform: scale(1.05);
    }

    .step-dot.completed {
        border-color: var(--success);
        background: var(--success);
        color: var(--white);
    }

.step-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--gray-500);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.step-dot.active .step-label {
    color: var(--primary);
}

.step-dot.completed .step-label {
    color: var(--success);
}

.step-line {
    width: 60px;
    height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
    transition: var(--transition);
    flex-shrink: 0;
}

    .step-line.completed {
        background: linear-gradient(90deg, var(--success), var(--success));
    }

/* ══════════════════════════════════════════════════
           FORM CONTROLS
           ══════════════════════════════════════════════════ */
.form-group-custom {
    margin-bottom: 22px;
}

    .form-group-custom label {
        display: block;
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--gray-700);
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-wrapper .input-icon {
        position: absolute;
        left: 16px;
        color: var(--gray-400);
        font-size: 0.95rem;
        z-index: 2;
        pointer-events: none;
        transition: var(--transition);
    }

.form-input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
    background: var(--gray-50);
    color: var(--gray-900);
}

    .form-input:focus {
        border-color: var(--primary);
        background: var(--white);
        box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.08);
    }

        .form-input:focus + .input-icon,
        .form-input:focus ~ .input-icon {
            color: var(--primary);
        }

    .form-input::placeholder {
        color: var(--gray-400);
        font-weight: 400;
    }

/* ══════════════════════════════════════════════════
           CAPTCHA
           ══════════════════════════════════════════════════ */
.captcha-box {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.captcha-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 16px;
}

.captcha-img-frame {
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    padding: 4px;
    box-shadow: var(--shadow-sm);
    line-height: 0;
    overflow: hidden;
}

    .captcha-img-frame img {
        height: 56px;
        width: auto;
        display: block;
        user-select: none;
        -webkit-user-drag: none;
        pointer-events: none;
    }

.btn-captcha-refresh {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 1rem;
}

    .btn-captcha-refresh:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
        transform: rotate(180deg);
    }

.captcha-input-wrapper {
    position: relative;
}

    .captcha-input-wrapper .input-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gray-400);
        font-size: 0.95rem;
        z-index: 2;
        pointer-events: none;
    }

.captcha-input {
    width: 100%;
    padding: 12px 18px 12px 48px;
    font-size: 1.15rem;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 0.4em;
    text-align: center;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-900);
    text-transform: uppercase;
}

    .captcha-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.08);
    }

    .captcha-input::placeholder {
        font-size: 0.85rem;
        font-family: 'Inter', sans-serif;
        font-weight: 400;
        letter-spacing: 0.02em;
        color: var(--gray-400);
    }

/* ══════════════════════════════════════════════════
           BUTTONS
           ══════════════════════════════════════════════════ */
.btn-primary-main {
    width: 100%;
    padding: 15px 28px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

    .btn-primary-main::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
        transition: left 0.5s ease;
    }

    .btn-primary-main:hover::before {
        left: 100%;
    }

    .btn-primary-main:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(26, 115, 232, 0.35);
    }

    .btn-primary-main:active {
        transform: translateY(0);
        box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
    }

.btn-success-main {
    width: 100%;
    padding: 15px 28px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--white);
    background: linear-gradient(135deg, var(--success) 0%, #0b8043 100%);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

    .btn-success-main::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
        transition: left 0.5s ease;
    }

    .btn-success-main:hover::before {
        left: 100%;
    }

    .btn-success-main:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(15, 157, 88, 0.35);
    }

    .btn-success-main:active {
        transform: translateY(0);
    }

/* ══════════════════════════════════════════════════
           OTP INFO BADGE
           ══════════════════════════════════════════════════ */
.otp-sent-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--success-light);
    border: 1.5px solid var(--success-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 22px;
}

    .otp-sent-badge .badge-icon {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--success);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

        .otp-sent-badge .badge-icon i {
            color: var(--white);
            font-size: 0.85rem;
        }

    .otp-sent-badge .badge-text {
        font-size: 0.85rem;
        color: #137333;
        font-weight: 600;
        line-height: 1.4;
    }

/* ══════════════════════════════════════════════════
           OTP TIMER & ATTEMPTS
           ══════════════════════════════════════════════════ */
.otp-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 0 2px;
}

.otp-timer {
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 500;
}

    .otp-timer span {
        font-weight: 800;
        color: var(--primary);
        font-family: 'Courier New', monospace;
        font-size: 0.9rem;
    }

        .otp-timer span.expired {
            color: var(--danger);
        }

.otp-attempts {
    font-size: 0.78rem;
    color: var(--warning);
    font-weight: 600;
}

/* ══════════════════════════════════════════════════
           SECTION TITLES
           ══════════════════════════════════════════════════ */
.section-heading {
    text-align: center;
    margin-bottom: 28px;
}

    .section-heading h2 {
        font-size: 1.15rem;
        font-weight: 800;
        color: var(--gray-900);
        margin: 0 0 6px;
        letter-spacing: -0.01em;
    }

    .section-heading p {
        font-size: 0.82rem;
        color: var(--gray-500);
        margin: 0;
        font-weight: 400;
    }

/* ══════════════════════════════════════════════════
           ERROR MODAL
           ══════════════════════════════════════════════════ */
.error-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

    .error-overlay.visible {
        display: flex;
        animation: overlayIn 0.25s ease;
    }

@keyframes overlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.error-dialog {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    padding: 36px 32px 28px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: dialogIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialogIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.error-dialog .err-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--danger-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

    .error-dialog .err-icon-circle i {
        font-size: 1.6rem;
        color: var(--danger);
    }

.error-dialog .err-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.error-dialog .err-message {
    font-size: 0.88rem;
    color: var(--gray-600);
    margin-bottom: 24px;
    line-height: 1.6;
}

.btn-error-dismiss {
    padding: 11px 40px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--white);
    background: var(--danger);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

    .btn-error-dismiss:hover {
        background: #c5221f;
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(217, 48, 37, 0.3);
    }

/* ══════════════════════════════════════════════════
           STEP PANEL ANIMATION
           ══════════════════════════════════════════════════ */
.step-panel {
    animation: panelSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes panelSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ══════════════════════════════════════════════════
           FOOTER NOTE
           ══════════════════════════════════════════════════ */
.card-footer-note {
    text-align: center;
    padding: 16px 32px 24px;
    border-top: 1px solid var(--gray-100);
}

    .card-footer-note p {
        font-size: 0.72rem;
        color: var(--gray-400);
        margin: 0;
        line-height: 1.5;
    }

    .card-footer-note i {
        margin-right: 4px;
    }

/* ══════════════════════════════════════════════════
           RESPONSIVE
           ══════════════════════════════════════════════════ */
@media (max-width: 576px) {
    .page-wrapper {
        padding: 16px 10px 40px;
    }

    .access-card {
        border-radius: var(--radius-md);
    }

    .card-header-area {
        padding: 28px 20px 22px;
    }

        .card-header-area h1 {
            font-size: 1.15rem;
        }

    .card-body-area {
        padding: 24px 20px;
    }

    .step-line {
        width: 40px;
    }

    .step-dot {
        width: 34px;
        height: 34px;
        font-size: 0.75rem;
    }

    .step-label {
        font-size: 0.55rem;
    }

    .captcha-box {
        padding: 14px;
    }

    .card-footer-note {
        padding: 14px 20px 20px;
    }
}
