/* ================================================================
   Hisab Finance — Premium Login Page
   ================================================================ */
:root {
    --bg-base: #f8f7f5;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --accent: #0f1939;
    --accent-glow: rgba(15, 25, 57, 0.15);
    --accent-2: #1e2a4a;
    --text-primary: #0f1939;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-focus: rgba(99,102,241,0.5);
    --error: #ef4444;
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

/* ================================================================
   WRAPPER
   ================================================================ */
.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ================================================================
   LEFT — BRAND PANEL
   ================================================================ */
.brand-panel {
    flex: 1;
    background: linear-gradient(135deg, #0f1939 0%, #1e2a4a 50%, #0f1939 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 60px 48px;
}

.brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(108,99,255,0.25) 0%, transparent 65%);
}

.brand-panel-inner {
    position: relative;
    z-index: 1;
    max-width: 440px;
}

.brand-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #ffffff, #f8f7f5);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: var(--accent);
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.brand-title {
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 14px;
}

.brand-tagline {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    margin-bottom: 44px;
}

.brand-features { display: flex; flex-direction: column; gap: 20px; }

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.feature-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: #ffffff;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.2);
}

.feature-item div strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}

.feature-item div span {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* Floating orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.orb-1 {
    width: 300px; height: 300px;
    background: rgba(99,102,241,0.08);
    bottom: -80px; right: -80px;
    animation: pulse 6s ease-in-out infinite;
}

.orb-2 {
    width: 200px; height: 200px;
    background: rgba(139,92,246,0.06);
    top: -40px; left: -40px;
    animation: pulse 8s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* ================================================================
   RIGHT — FORM PANEL
   ================================================================ */
.form-panel {
    width: 480px;
    background: var(--bg-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 48px 32px;
    border-left: 1px solid var(--border);
    overflow-y: auto;
}

.form-card { width: 100%; max-width: 380px; }

.form-header { margin-bottom: 32px; text-align: center; }

.form-logo {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
    margin: 0 auto 18px;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.form-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Alert */
.alert-error {
    background: rgba(248,113,113,0.1);
    border: 1px solid rgba(248,113,113,0.3);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 13px;
    padding: 12px 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.alert-error:empty { display: none; }
.alert-error i { flex-shrink: 0; }

/* Form Groups */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.forgot-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--transition);
}

.forgot-link:hover { opacity: 0.8; }

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

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.form-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    padding: 12px 44px 12px 40px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

.toggle-pass {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color var(--transition);
    z-index: 1;
}

.toggle-pass:hover { color: var(--accent); }

.field-error {
    display: block;
    font-size: 12px;
    color: var(--error);
    margin-top: 5px;
}

/* Checkbox */
.form-row { margin-bottom: 24px; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input { display: none; }

.checkmark {
    width: 18px; height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    background: var(--bg-surface);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition), border-color var(--transition);
    flex-shrink: 0;
}

.checkbox-label input:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    width: 5px; height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}

/* Sign In Button */
.btn-signin {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    padding: 13px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
    margin-bottom: 20px;
}

.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-signin:active { transform: translateY(0); }

/* Register */
.register-prompt {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.register-prompt a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: opacity var(--transition);
}

.register-prompt a:hover { opacity: 0.8; }

/* Footer */
.login-footer {
    margin-top: auto;
    padding-top: 28px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
    .brand-panel { display: none; }
    .form-panel {
        width: 100%;
        border-left: none;
    }
    body { overflow: auto; }
}

@media (max-width: 480px) {
    .form-panel { padding: 32px 24px; }
}
