/* =============================================================================
   hausfix Admin — Login page styles
   Depends on: Bootstrap 5, Bootstrap Icons, Google Fonts (Inter)
   This file contains ONLY login-specific styles.
   ============================================================================= */

:root { --accent: #AF8C33; }

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    background: #f4f6fb;
}

/* ── Left panel ──────────────────────────────── */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #1a1d2e 0%, #2d3160 50%, #AF8C33 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 64px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 60px;
    position: relative;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: 800;
}

.brand-text .name { font-size: 22px; font-weight: 700; color: #fff; }
.brand-text .sub  { font-size: 12px; color: rgba(255,255,255,0.6); letter-spacing: 1px; text-transform: uppercase; }

.login-headline {
    font-size: 38px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
    position: relative;
}

.login-sub {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    max-width: 400px;
    position: relative;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
}

.feature-list li i {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

/* ── Right panel ─────────────────────────────── */
.login-right {
    width: 700px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: #fff;
}

.login-form-wrap { width: 100%; max-width: 440px; }

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1d2e;
    margin-bottom: 6px;
}

.login-subtitle { font-size: 14px; color: #8b92a9; margin-bottom: 36px; }

.form-label { font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; }

/* Input group overrides for login (tighter radius) */
.input-group .form-control {
    border-radius: 10px !important;
    border: 1.5px solid #e0e4ef;
    padding: 11px 14px;
    font-size: 14px;
    transition: border 0.2s, box-shadow 0.2s;
}

.input-group .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    z-index: 3;
}

.input-group-text {
    background: #f8f9fc;
    border: 1.5px solid #e0e4ef;
    color: #8b92a9;
    border-radius: 10px !important;
    padding: 11px 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.input-group-text:hover { background: #f0f2f9; color: var(--accent); }

/* Validation states */
.input-group .form-control.is-invalid { border-color: #ef4444 !important; }
.input-group .form-control.is-valid   { border-color: #22c55e !important; }

/* Field-level error messages */
.field-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 5px;
    display: none;
}
.field-error.visible { display: block; }

.form-check-label { font-size: 13px; color: #6b7280; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

/* ── Login button ──────────────────────────────── */
.btn-login {
    background: var(--accent);
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover:not(:disabled)  { background: #4338ca; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.4); }
.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled               { opacity: 0.7; cursor: not-allowed; }

/* Spinner inside button */
.btn-login .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    display: none;
}

.btn-login.loading .spinner  { display: block; }
.btn-login.loading .btn-text { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alert box ────────────────────────────────── */
.alert-login {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}

.alert-login.error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-login.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-login.hidden  { display: none; }

.login-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: #9ca3af;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1100px) {
    .login-right { width: 500px; padding: 40px 36px; }
}

@media (max-width: 991px) {
    .login-left  { display: none; }
    .login-right { width: 100%; padding: 40px 24px; }
}

@media (max-width: 480px) {
    .login-right { padding: 32px 20px; }
    .login-title { font-size: 22px; }
}
