/* ========================================================
   IDN PORTOFOLIO - COMPACT MODERN AUTHENTICATION STYLESHEET
   Design System: Space Grotesk + Inter, Frosted Glass, Micro-Box 4px
   Harmonized with Landing Page, Mahasiswa, Grafik, and Leaderboard
   ======================================================== */

:root {
    --auth-primary: #1d72b8;
    --auth-primary-hover: #155e8a;
    --auth-primary-rgb: 29, 114, 184;
    --auth-accent: #0284c7;
    --auth-accent-glow: rgba(2, 132, 199, 0.25);
    --auth-bg: #090d16;
    --auth-card-bg: rgba(22, 29, 44, 0.9);
    --auth-card-border: rgba(255, 255, 255, 0.09);
    --auth-input-bg: rgba(15, 23, 42, 0.75);
    --auth-input-border: rgba(255, 255, 255, 0.12);
    --auth-dark-text: #f8fafc;
    --auth-muted-text: #94a3b8;
    --auth-card-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(29, 114, 184, 0.12);
}

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

body.auth-page {
    font-family: 'Inter', sans-serif;
    background-color: var(--auth-bg);
    color: var(--auth-dark-text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    font-size: 16px !important;
}

/* Background Atmosphere & Ambient Lighting */
.auth-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-ambient-glow-1 {
    position: absolute;
    top: -120px;
    left: 15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(29, 114, 184, 0.2), transparent 70%);
    filter: blur(85px);
    animation: authGlowFloat1 18s ease-in-out infinite alternate;
}

.auth-ambient-glow-2 {
    position: absolute;
    bottom: -100px;
    right: 15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.16), transparent 70%);
    filter: blur(85px);
    animation: authGlowFloat2 15s ease-in-out infinite alternate;
}

@keyframes authGlowFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(35px, 50px) scale(1.12); }
}

@keyframes authGlowFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, -35px) scale(1.1); }
}

/* Subtle Geometric Background Pattern */
.auth-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px, 96px 96px, 96px 96px;
    opacity: 0.6;
}

/* Auth Card Container (Compact 410px) */
.auth-container {
    width: 100%;
    max-width: 415px;
    position: relative;
    z-index: 10;
    margin: 0 auto;
}

.auth-card-modern {
    background: var(--auth-card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--auth-card-border);
    border-radius: 4px;
    box-shadow: var(--auth-card-shadow);
    padding: 1.65rem 1.75rem 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Top Accent Gradient Border */
.auth-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--auth-primary), #38bdf8, var(--auth-accent));
}

/* Compact Top Action Bar */
.auth-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.15rem;
}

.btn-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--auth-muted-text);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem !important;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-auth-back:hover {
    color: #ffffff;
    background: rgba(var(--auth-primary-rgb), 0.2);
    border-color: var(--auth-primary);
    transform: translateX(-2px);
}

.auth-top-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem !important;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(var(--auth-primary-rgb), 0.12);
    border: 1px solid rgba(var(--auth-primary-rgb), 0.22);
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.pulse-dot-auth {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
    animation: authPulse 2s infinite ease-in-out;
}

@keyframes authPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.6; }
}

/* Compact Brand Header */
.auth-brand-head {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-logo-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0.45rem;
}

.auth-logo-frame {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: 0 4px 14px -4px rgba(29, 114, 184, 0.35);
}

.auth-logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(56, 189, 248, 0.35));
}

.auth-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 60%, #1d72b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    font-size: 0.82rem !important;
    color: var(--auth-muted-text);
    line-height: 1.4;
}

/* Alert Messages (Compact 4px) */
.auth-alert {
    padding: 0.65rem 0.85rem;
    border-radius: 4px;
    font-size: 0.82rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 1rem;
    animation: authAlertFade 0.3s ease;
}

@keyframes authAlertFade {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.auth-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.auth-alert i {
    font-size: 0.95rem;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Form Groups & Inputs (Compact Micro-box 4px) */
.auth-form-group {
    margin-bottom: 0.95rem;
}

.auth-form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.76rem !important;
    font-weight: 700;
    color: var(--auth-dark-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
}

.auth-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 13px;
    color: var(--auth-primary);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.auth-input-control {
    width: 100%;
    height: 42px;
    padding: 8px 40px 8px 38px;
    border-radius: 4px;
    border: 1px solid var(--auth-input-border);
    background: var(--auth-input-bg);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem !important;
    outline: none;
    transition: all 0.25s ease;
}

.auth-input-control:focus {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.auth-input-control.is-invalid {
    border-color: #ef4444;
}

.auth-input-control::placeholder {
    color: rgba(148, 163, 184, 0.55);
    font-size: 0.84rem;
}

.btn-toggle-password {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--auth-muted-text);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 6px;
    transition: color 0.2s ease;
    z-index: 2;
}

.btn-toggle-password:hover {
    color: #ffffff;
}

.auth-field-hint {
    display: block;
    font-size: 0.72rem !important;
    color: var(--auth-muted-text);
    margin-top: 0.25rem;
}

.auth-field-error {
    display: block;
    font-size: 0.75rem !important;
    color: #f87171;
    margin-top: 0.25rem;
}

/* Submit Button (Compact 42px) */
.btn-auth-submit {
    width: 100%;
    height: 42px;
    margin-top: 1rem;
    border-radius: 4px;
    background: linear-gradient(135deg, #1d72b8 0%, #155e8a 100%);
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(29, 114, 184, 0.3);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auth-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d72b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-spinner-wrap i {
    font-size: 0.95rem;
}


/* Compact Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.15rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem !important;
    color: var(--auth-muted-text);
}

.btn-link-register {
    color: #38bdf8;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.btn-link-register:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* --------------------------------------------------------
   REGISTRATION EXTENSIONS (2-COLUMN GRID, SELECT, FILE, CAPTCHA)
   -------------------------------------------------------- */
.auth-container-wide {
    max-width: 680px;
}

.auth-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.95rem;
}

.auth-grid-full {
    grid-column: 1 / -1;
}

.auth-select-control {
    width: 100%;
    height: 42px;
    padding: 8px 36px 8px 38px;
    border-radius: 4px;
    border: 1px solid var(--auth-input-border);
    background: var(--auth-input-bg);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem !important;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    transition: all 0.25s ease;
}

.auth-select-control:focus {
    border-color: #38bdf8;
    background-color: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.auth-select-control.is-invalid {
    border-color: #ef4444;
}

.auth-select-control option {
    background: #0f172a;
    color: #ffffff;
}

/* Custom File Upload */
.auth-file-wrapper {
    position: relative;
    cursor: pointer;
}

.auth-file-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.auth-file-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    padding: 8px 14px;
    border-radius: 4px;
    border: 1px dashed var(--auth-input-border);
    background: var(--auth-input-bg);
    color: var(--auth-muted-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
    transition: all 0.2s ease;
}

.auth-file-wrapper:hover .auth-file-box {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.9);
}

.auth-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(var(--auth-primary-rgb), 0.2);
    color: #38bdf8;
    padding: 3px 10px;
    border-radius: 3px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Captcha */
.auth-captcha-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.auth-captcha-img-wrap {
    height: 42px;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border: 1px solid var(--auth-input-border);
}

.auth-captcha-img-wrap img {
    height: 38px;
    object-fit: contain;
}

.btn-captcha-refresh {
    height: 42px;
    padding: 0 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--auth-input-border);
    color: #38bdf8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-captcha-refresh:hover {
    background: rgba(var(--auth-primary-rgb), 0.2);
    border-color: #38bdf8;
    color: #ffffff;
}

@media (max-width: 640px) {
    .auth-grid-2 {
        grid-template-columns: 1fr;
    }

    .auth-grid-full {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .auth-card-modern {
        padding: 1.4rem 1.25rem 1.25rem;
    }

    .auth-title {
        font-size: 1.25rem !important;
    }
}

