/* Removed Google Fonts - using local Haniva font family instead */
/* @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap'); */

:root {
    --primary:        #022349;
    --primary-light:  #033a75;
    --accent:         #71be46;
    --accent-dim:     rgba(113, 190, 70, 0.18);
    --dark:           #011529;
    --text-dark:      #1a1a1a;
    --text-muted:     #64748b;
    --bg-form:        #f0f4f8;
    --card-bg:        #ffffff;
    --card-border:    rgba(2, 35, 73, 0.08);
    --input-bg:       #ffffff;
    --input-border:   rgba(0, 0, 0, 0.1);
    --shadow-color:   rgba(2, 35, 73, 0.12);
}

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

body {
    font-family: 'Haniva', 'Montserrat', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Page wrapper ─── */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
}

/* ══════════════════════════════════════════════════════════════
   LEFT  –  BRAND PANEL
══════════════════════════════════════════════════════════════ */
.brand-section {
    flex: 0 0 66.666%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.brand-section::before { display: none; }

/* Large faint watermark – P icon mark in bottom-right corner */
.brand-watermark {
    position: absolute;
    right: -80px;
    bottom: -80px;
    width: 480px;
    height: 480px;
    opacity: 0.045;
    pointer-events: none;
}
.brand-watermark svg { width: 100%; height: 100%; }

/* Accent glow orb top-right */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}
.orb-1 {
    width: 380px;
    height: 380px;
    background: rgba(113, 190, 70, 0.13);
    top: -140px;
    right: -80px;
    animation: orbFloat 18s ease-in-out infinite;
}
.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(1, 21, 41, 0.9);
    bottom: -100px;
    left: -60px;
    animation: orbFloat 22s ease-in-out infinite reverse;
}
.orb-3 { display: none; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(30px, -40px); }
}

/* Brand content */
.brand-content {
    position: relative;
    z-index: 2;
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    animation: fadeInLeft 0.8s ease both;
}

/* Logo — no white box, just SVG on navy */
.logo-wrapper { margin-bottom: 2.75rem; }
.logo-glow { display: none; }

.logo-container {
    background: transparent;
    border: none;
    box-shadow: none;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    padding: 0;
    transition: transform 0.3s ease;
}
.logo-container:hover { transform: scale(1.04); }
.logo-container::before { display: none; }

.logo-container img {
    height: 54px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    filter: none;
}

/* Lime accent rule */
.brand-content::after {
    content: '';
    display: block;
    order: 1;
    width: 48px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin: 0 auto 2.25rem;
}

/* Page title */
.brand-title {
    order: 2;
    color: #ffffff;
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    background: none;
    -webkit-text-fill-color: #ffffff;
    text-shadow: none;
}

/* Subtitle */
.brand-subtitle {
    order: 3;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.975rem;
    font-weight: 400;
    line-height: 1.75;
    max-width: 320px;
}

/* Bottom tagline badge */
.brand-tagline-badge {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 3.5px;
    color: rgba(113, 190, 70, 0.55);
    text-transform: uppercase;
    z-index: 2;
}

/* ══════════════════════════════════════════════════════════════
   RIGHT  –  FORM PANEL
══════════════════════════════════════════════════════════════ */
.form-section {
    flex: 0 0 33.333%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.75rem;
    background: var(--bg-form);
    position: relative;
    overflow-y: auto;
}

/* Form card */
.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow:
        0 4px 6px rgba(2, 35, 73, 0.04),
        0 20px 60px rgba(2, 35, 73, 0.10);
    padding: 2.25rem;
    max-width: 420px;
    width: 100%;
    animation: fadeInRight 0.8s ease both;
    transition: box-shadow 0.3s ease;
}
.auth-card:hover {
    box-shadow:
        0 4px 6px rgba(2, 35, 73, 0.04),
        0 30px 80px rgba(2, 35, 73, 0.14),
        0 0 0 1px rgba(113, 190, 70, 0.12);
}

/* Form typography */
.form-heading {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}
.form-subheading {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.25rem;
    font-weight: 400;
    line-height: 1.6;
}
.form-label {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.forgot-link {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}
.forgot-link:hover { color: var(--accent); }

/* Inputs */
.form-control {
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    font-size: 0.95rem;
    font-weight: 400;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--input-bg);
    color: var(--text-dark);
}
.form-control::placeholder { color: var(--text-muted); opacity: 0.7; }
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 35, 73, 0.08);
    outline: none;
    transform: none;
}

.input-group-text {
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 0.875rem 1rem;
    color: var(--text-muted);
    transition: border-color 0.2s ease, color 0.2s ease;
}
.input-group .form-control {
    border-left: 1.5px solid var(--input-border);
    border-radius: 0 12px 12px 0;
}
.input-group:focus-within .input-group-text {
    border-color: var(--primary);
    color: var(--primary);
}
.input-group:focus-within .form-control { border-left-color: var(--primary); }

.password-addon { position: relative; }
.password-addon .form-control { padding-right: 3rem; }
.password-addon button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: color 0.2s ease;
    z-index: 5;
}
.password-addon button:hover { color: var(--primary); }

/* Primary button */
.btn-primary {
    background: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 4px 16px rgba(2, 35, 73, 0.3);
    width: 100%;
    margin-top: 0.75rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 6px 24px rgba(2, 35, 73, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}
.btn-primary:active { transform: translateY(0); }

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.4s ease;
}
.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-left: 3px solid #dc2626;
}
.alert-success {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
    border-left: 3px solid #16a34a;
}
.alert-info {
    background: rgba(2, 35, 73, 0.06);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

/* Spacing overrides */
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 1.75rem !important; }

.form-check-input { border: 1.5px solid var(--input-border); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-label { color: var(--text-dark); }
small, .small { color: var(--text-muted); }

/* ─── Animations ─── */
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-32px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
    .auth-page-wrapper { flex-direction: column; }
    .brand-section { flex: none; min-height: 40vh; padding: 2.5rem 2rem; }
    .brand-title { font-size: 2.25rem; }
    .brand-tagline-badge { bottom: 1rem; }
    .form-section { flex: none; width: 100%; padding: 2.5rem 1.5rem; overflow-y: visible; }
    .auth-card { max-width: 480px; padding: 2.25rem; }
}
@media (max-width: 576px) {
    .brand-section { min-height: 32vh; }
    .brand-title { font-size: 1.875rem; }
    .brand-subtitle { font-size: 0.9rem; }
    .logo-container img { height: 44px; }
    .auth-card { padding: 1.75rem; border-radius: 20px; }
    .form-heading { font-size: 1.625rem; }
}
