/* ===========================
   Login Page — GraminMIS
   Modern Split-Screen Layout
   =========================== */

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

.is-hidden { display: none !important; }

body {
    margin: 0;
    padding: 0;
    font-family: "Roboto", -apple-system, sans-serif;
    background: #0f0a1e;
    min-height: 100vh;
}

/* ===========================
   Auth Container Tabs
   =========================== */
.auth-container { display: none; }
.auth-container.active {
    display: block;
    animation: fadeSlide 0.3s ease-out;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===========================
   Login Page Layout
   =========================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    position: relative;
}

/* Left panel - brand/info */
.login-background {
    flex: 1 1 50%;
    background: linear-gradient(135deg, #1e003c 0%, #4c1d95 40%, #7c3aed 75%, #2563eb 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    overflow: hidden;
    min-height: 100vh;
}

/* Dot-grid overlay */
.login-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* Decorative blob */
.login-background::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -80px;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.login-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #ffffff;
    max-width: 380px;
}

.login-brand-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    background: #fff;
    padding: 4px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.login-brand h2 {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.login-brand p {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    margin: 0 0 40px;
    line-height: 1.6;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    width: 100%;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
}

.login-feature-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #c4b5fd;
}

/* ===========================
   Login Card (right panel)
   =========================== */
.login-card {
    flex: 1 1 50%;
    width: 50%;
    min-width: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    position: relative;
    box-shadow: -20px 0 60px rgba(0,0,0,0.25);
    animation: slideRight 0.5s ease-out;
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Mobile only — shown when left brand panel is hidden */
.login-header { display: none; }

.login-body {
    padding: 52px 44px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.login-body-header {
    margin-bottom: 32px;
}

.login-body-header h3 {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.login-body-header p {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
}

/* ===========================
   Form Elements
   =========================== */
.login-form { width: 100%; }

.form-group { margin-bottom: 20px !important; }

.form-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

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

.form-input {
    width: 100%;
    padding: 13px 16px 13px 46px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
    color: #111827;
    font-size: 14.5px;
    font-family: "Roboto", sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    height: 50px;
}

.form-input:focus {
    outline: none;
    border-color: #7c3aed;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

.form-input:hover:not(:focus) {
    border-color: #c4b5fd;
    background: #ffffff;
}

.form-input::placeholder { color: #9ca3af; font-size: 14px; }

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a78bfa;
    font-size: 15px;
    z-index: 2;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper:focus-within .input-icon { color: #7c3aed; }

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 15px;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s;
}

.password-toggle:hover { color: #7c3aed; }

/* ===========================
   Forgot Password
   =========================== */
.forgot-wrapper {
    text-align: right;
    margin-top: -10px;
    margin-bottom: 24px;
}

.forgot-link {
    font-size: 13px;
    font-weight: 600;
    color: #7c3aed;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.forgot-link:hover { color: #6d28d9; text-decoration: underline; }

/* ===========================
   Submit Button — extends .btn .btn--rect .btn--primary
   =========================== */
.button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    border: none;
    border-radius: 12px;        /* rect-rounded */
    font-size: 15px;
    font-weight: 700;
    font-family: "Roboto", sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(124,58,237,.35);
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
    text-decoration: none;
}
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124,58,237,.45);
    color: #fff;
    text-decoration: none;
}
.button:active  { transform: translateY(0); }
.button:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ===========================
   Alert Boxes
   =========================== */
.alert-box {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 500;
    animation: fadeSlide 0.3s ease-out;
}

.alert-error {
    background: #fff5f5;
    border: 1.5px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1.5px solid #a7f3d0;
    color: #059669;
}

.alert-box i { font-size: 16px; flex-shrink: 0; }

/* ===========================
   Reset / Back links
   =========================== */
.reset-subtitle {
    font-size: 12.5px;
    color: #9ca3af;
    margin-top: 6px;
}

.back-to-login-link {
    text-align: center;
    margin-top: 20px;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
    .login-background { display: none; }
    .login-card { width: 100%; min-width: 0; box-shadow: none; }
    .login-body { padding: 40px 28px; }

    /* Show mini header when left panel hidden */
    .login-header {
        display: block;
        background: linear-gradient(135deg, #4c1d95, #7c3aed);
        padding: 32px 28px 24px;
        text-align: center;
    }

    .logo-wrapper { margin-bottom: 12px; }
    .login-logo { width: 60px; height: 60px; }
    .login-title { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 4px; }
    .login-subtitle { font-size: 13px; color: rgba(255,255,255,0.75); margin: 0; }
}

@media (max-width: 480px) {
    .login-body { padding: 32px 20px; }
}
