/* ===== AUTH PAGE — Pruthashakti Admin ===== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0f4f1;
    height: 100vh;
    overflow: hidden;
}

/* ---- Layout: Split Screen ---- */
.auth-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* ---- Left: Brand Panel ---- */
.auth-brand-panel {
    flex: 0 0 480px;
    background: linear-gradient(160deg, #0d3520 0%, #167246 40%, #198754 70%, #22a06e 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 360px;
}

.auth-logo {
    height: 72px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.auth-brand-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.auth-brand-tagline {
    font-size: 0.925rem;
    line-height: 1.6;
    opacity: 0.85;
    margin-bottom: 2.5rem;
}

.auth-brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    text-align: left;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
}

.auth-feature i {
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    flex-shrink: 0;
}

.auth-brand-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    opacity: 0.5;
    font-size: 0.8rem;
    z-index: 1;
}

/* ---- Right: Form Panel ---- */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.auth-form-subtitle {
    font-size: 0.925rem;
    color: #6b7280;
    margin: 0;
}

/* ---- Error Alert ---- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #991b1b;
    line-height: 1.5;
}

.auth-alert i {
    font-size: 1.1rem;
    margin-top: 1px;
    flex-shrink: 0;
    color: #dc2626;
}

/* ---- Form Fields ---- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
}

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

.auth-input-wrapper > i:first-child {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s;
}

.auth-input {
    width: 100%;
    padding: 0.7rem 0.875rem 0.7rem 2.65rem;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
}

.auth-input::placeholder {
    color: #9ca3af;
}

.auth-input:focus {
    border-color: #198754;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1);
}

.auth-input:focus ~ i:first-child,
.auth-input-wrapper:focus-within > i:first-child {
    color: #198754;
}

.auth-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.05rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.auth-toggle-password:hover {
    color: #374151;
}

/* ---- Checkbox ---- */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
    user-select: none;
}

.auth-checkbox input {
    display: none;
}

.auth-checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
    background: #f9fafb;
}

.auth-checkbox input:checked + .auth-checkmark {
    background: #198754;
    border-color: #198754;
}

.auth-checkbox input:checked + .auth-checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -1px;
}

/* ---- Submit Button ---- */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #167246 0%, #198754 60%, #22a06e 100%);
    cursor: pointer;
    margin-top: 0.25rem;
    box-shadow: 0 4px 14px rgba(22, 114, 70, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(22, 114, 70, 0.35);
}

.auth-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(22, 114, 70, 0.3);
}

.auth-submit-btn i {
    font-size: 1.05rem;
    transition: transform 0.2s;
}

.auth-submit-btn:hover i {
    transform: translateX(3px);
}

/* ---- Footer Link ---- */
.auth-form-footer {
    margin-top: 2rem;
    text-align: center;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-back-link:hover {
    color: #198754;
}

.auth-back-link i {
    transition: transform 0.2s;
}

.auth-back-link:hover i {
    transform: translateX(-3px);
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-form-panel {
        min-height: 100vh;
        background: linear-gradient(180deg, #f0f9f4 0%, #fff 30%);
    }

    .auth-form-container {
        max-width: 400px;
    }
}

@media (max-width: 575.98px) {
    .auth-form-panel {
        padding: 1.5rem 1.25rem;
    }

    .auth-form-title {
        font-size: 1.4rem;
    }

    .auth-input {
        font-size: 16px; /* prevents iOS zoom on focus */
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .auth-brand-panel {
        flex: 0 0 400px;
    }
}
