/* ==========================================================================
   Auth V4 - Engineered Blueprint Design (White & Mission Green)
   ========================================================================== */

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

:root {
    --brand-green: #a3e635;
    --brand-dark: #000000;
    --text-main: #000000;
    --text-muted: #4b5563;
    --bg-grid: #f9fafb;
}

.auth-modern-v2 {
    min-height: 100vh;
    background-color: var(--bg-grid);
    /* Subtle Grid Background */
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    font-family: 'Rajdhani', sans-serif !important;
}

.auth-engineered-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 85vh;
    max-height: 800px;
    background: #ffffff;
    position: relative;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.1);
}

/* Register variant: taller card with scroll */
.auth-register-container {
    max-height: 90vh;
}

/* Offset Borders Motif */
.auth-engineered-container::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 100px;
    height: 100px;
    border-top: 2px solid #000;
    border-left: 2px solid #000;
    z-index: 10;
}

.auth-engineered-container::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 100%;
    height: 100%;
    border-bottom: 2px solid #000;
    border-right: 2px solid #000;
    pointer-events: none;
    z-index: 0;
}

/* Visual Side with Chamfered Corner */
.auth-engineered-visual {
    flex: 1.1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 60px;
    background: #000;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 88% 100%, 0 100%);
    min-height: 600px;
}

.auth-engineered-visual img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) brightness(0.6);
    z-index: 1;
}

.visual-text {
    position: relative;
    z-index: 3;
}

.visual-text .tag {
    display: inline-block;
    color: var(--brand-green);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.visual-text h2 {
    font-size: 64px;
    font-weight: 800;
    line-height: 0.95;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -2px;
    color: #ffffff;
}

/* Form Side */
.auth-engineered-form {
    flex: 1;
    padding: 50px 50px 40px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    z-index: 5;
    border-top: 2px solid #000;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Form */
.auth-engineered-form::-webkit-scrollbar {
    width: 6px;
}

.auth-engineered-form::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.auth-engineered-form::-webkit-scrollbar-thumb {
    background: var(--brand-green);
    border-radius: 10px;
}

.auth-engineered-form::-webkit-scrollbar-thumb:hover {
    background: #84cc16;
}

/* Firefox scrollbar */
.auth-engineered-form {
    scrollbar-width: thin;
    scrollbar-color: var(--brand-green) #f1f1f1;
}

.form-header {
    margin-bottom: 30px;
    flex-shrink: 0;
}

.form-header h3 {
    font-size: 42px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 12px;
    color: var(--brand-dark);
}

.form-header p {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
    max-width: 400px;
}

/* ── Section Labels ──────────────────────────────────────────────────── */
.form-section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    margin-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.form-section-label .section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--brand-dark);
    color: var(--brand-green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.form-section-label .section-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ── Input Groups ────────────────────────────────────────────────────── */
.input-group-engineered {
    margin-bottom: 20px;
}

.input-group-engineered label {
    display: block;
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.required-star {
    color: #ef4444;
    font-size: 14px;
}

.input-group-engineered input,
.input-group-engineered select {
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0 !important;
    padding: 14px 16px !important;
    color: #000 !important;
    font-family: 'Rajdhani', sans-serif !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.input-group-engineered input:focus,
.input-group-engineered select:focus {
    outline: none !important;
    border-color: #000 !important;
    box-shadow: 0 0 0 4px rgba(163, 230, 53, 0.2) !important;
}

.input-group-engineered input::placeholder {
    color: #9ca3af !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    letter-spacing: 1px !important;
}

/* ── Error States ────────────────────────────────────────────────────── */
.field-error {
    display: block;
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.input-group-engineered input.is-invalid,
.input-group-engineered:has(.field-error) input {
    border-color: #ef4444 !important;
}

.auth-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 3px solid #ef4444;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.auth-error-banner .error-icon {
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}

.auth-error-banner .error-text p {
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    line-height: 1.5;
}

/* ── Grid Layout ─────────────────────────────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Engineered Buttons ──────────────────────────────────────────────── */
.btn-engineered-auth {
    width: 100%;
    background: var(--brand-green);
    color: #000;
    border: none;
    padding: 18px;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    clip-path: polygon(0 0, 100% 0, 100% 75%, 92% 100%, 0 100%);
    margin-top: 10px;
    font-family: 'Rajdhani', sans-serif;
}

.btn-engineered-auth:hover {
    background: #bef264;
    transform: translateY(-2px);
}

.btn-secondary-engineered {
    display: block;
    width: 100%;
    background: #ffffff;
    color: #000;
    border: 1.5px solid #000;
    padding: 16px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 20px;
}

.btn-secondary-engineered:hover {
    background: #f9fafb;
}

.btn-secondary-engineered::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 100%;
    height: 100%;
    border-bottom: 1.5px solid #000;
    border-right: 1.5px solid #000;
    pointer-events: none;
}

.auth-extra-links {
    margin-top: 30px;
    text-align: left;
    flex-shrink: 0;
}

.auth-extra-links p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.auth-extra-links a {
    color: #000;
    font-weight: 800;
    text-decoration: none;
    margin-left: 8px;
    border-bottom: 2px solid var(--brand-green);
    padding-bottom: 2px;
    transition: all 0.2s ease;
}

.auth-extra-links a:hover {
    color: #84cc16;
    border-bottom-color: #84cc16;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .auth-engineered-container {
        flex-direction: column;
        max-width: 600px;
        height: auto;
        max-height: none;
        margin: 0 auto;
    }

    .auth-register-container {
        max-height: none;
    }

    .auth-engineered-visual {
        flex: none;
        height: 300px;
        min-height: auto;
        padding: 40px;
    }

    .visual-text h2 {
        font-size: 40px;
    }

    .auth-engineered-form {
        padding: 36px;
        overflow-y: visible;
    }

    .form-header h3 {
        font-size: 32px;
    }
}

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

    .auth-modern-v2 {
        padding: 20px 12px;
    }

    .auth-engineered-form {
        padding: 28px 24px;
    }

    .form-header h3 {
        font-size: 28px;
    }

    .form-header p {
        font-size: 14px;
    }

    .auth-engineered-visual {
        height: 220px;
        padding: 30px;
    }

    .visual-text h2 {
        font-size: 32px;
    }
}
