/* =============================================
   Login Page Styles
   ============================================= */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
    --c-bg:        #f5f7fb;
    --c-surface:   #ffffff;
    --c-text:      #0f172a;
    --c-text-2:    #475569;
    --c-muted:     #94a3b8;
    --c-border:    #e2e8f0;
    --c-input-bg:  #f8fafc;
    --c-primary:   #4f46e5;
    --c-primary-2: #4338ca;
    --c-primary-soft: #eef2ff;
    --c-success:   #059669;
    --c-success-bg:#ecfdf5;
    --c-danger:    #dc2626;
    --c-danger-bg: #fef2f2;
    --shadow-sm:   0 1px 2px rgba(15,23,42,.05);
    --shadow-md:   0 4px 12px rgba(15,23,42,.06);
    --shadow-lg:   0 20px 50px rgba(15,23,42,.10);
}

html, body { height:100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    -webkit-font-smoothing: antialiased;
}

.page {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

/* ---------- LEFT: Brand panel ---------- */
.brand {
    position: relative;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #0ea5e9 100%);
    color: #fff;
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.brand::before {
    content:'';
    position:absolute; inset:0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.18) 0, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(14,165,233,.35) 0, transparent 45%);
    pointer-events:none;
}
.brand::after {
    content:'';
    position:absolute; inset:0;
    background-image:
        linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    pointer-events:none;
}
.brand-top, .brand-mid, .brand-bot { position:relative; z-index:1; }
.brand-logo { display:flex; align-items:center; gap:12px; }
.brand-logo-mark {
    width:42px; height:42px; border-radius:11px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    display:flex; align-items:center; justify-content:center;
    backdrop-filter: blur(10px);
}
.brand-logo-mark svg { width:22px; height:22px; }
.brand-logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px; font-weight: 800; letter-spacing:-.02em;
}
.brand-logo-sub { font-size: 11px; opacity:.7; letter-spacing:1.5px; text-transform:uppercase; }
.brand-mid h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 40px; font-weight: 800; line-height: 1.15;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
    max-width: 480px;
}
.brand-mid p {
    font-size: 15px; line-height:1.6;
    color: rgba(255,255,255,.82);
    max-width: 460px;
}
.feature-list {
    list-style:none; margin-top: 2rem;
    display:flex; flex-direction:column; gap: .9rem;
}
.feature-list li {
    display:flex; align-items:center; gap:12px;
    font-size: 14px; color: rgba(255,255,255,.92);
}
.feature-list .check {
    width:22px; height:22px; border-radius:50%;
    background: rgba(255,255,255,.18);
    display:flex; align-items:center; justify-content:center;
    flex-shrink:0;
}
.feature-list .check svg { width:12px; height:12px; }
.brand-bot { font-size: 12px; color: rgba(255,255,255,.65); }

/* ---------- RIGHT: Form panel ---------- */
.form-panel {
    display:flex; align-items:center; justify-content:center;
    padding: 2.5rem 2rem;
    background: var(--c-bg);
}
.form-card { width: 100%; max-width: 420px; }
.form-header { margin-bottom: 1.75rem; }
.form-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 26px; font-weight: 700; letter-spacing:-.02em;
    color: var(--c-text);
}
.form-header p { margin-top: .4rem; font-size: 14px; color: var(--c-text-2); }

.alert {
    display:flex; align-items:flex-start; gap:10px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}
.alert svg { width:18px; height:18px; flex-shrink:0; margin-top:1px; }
.alert-error   { background: var(--c-danger-bg);  color: var(--c-danger);  border-color:#fecaca; }
.alert-success { background: var(--c-success-bg); color: var(--c-success); border-color:#a7f3d0; }

.field { margin-bottom: 1rem; }
.field label {
    display:block;
    font-size: 13px; font-weight: 500;
    color: var(--c-text);
    margin-bottom: 6px;
}
.input-wrap { position: relative; display:flex; align-items:center; }
.input-icon { position:absolute; left:13px; color: var(--c-muted); display:flex; pointer-events:none; }
.input-icon svg { width:18px; height:18px; }
.form-input {
    width: 100%;
    padding: 11px 14px 11px 42px;
    font-size: 14px;
    font-family: inherit;
    color: var(--c-text);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-input::placeholder { color: var(--c-muted); }
.form-input:hover { border-color:#cbd5e1; }
.form-input:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 4px rgba(79,70,229,.10);
}

.pwd-toggle {
    position:absolute; right:8px;
    background:none; border:none;
    padding:6px;
    color: var(--c-muted);
    cursor: pointer;
    border-radius:6px;
    display:flex;
    transition: color .15s, background .15s;
}
.pwd-toggle:hover { color: var(--c-text); background: var(--c-input-bg); }
.pwd-toggle svg { width:18px; height:18px; }

.row-between {
    display:flex; align-items:center; justify-content:space-between;
    margin: .25rem 0 1.5rem;
}
.check-label {
    display:flex; align-items:center; gap:8px;
    font-size: 13px; color: var(--c-text-2);
    cursor: pointer; user-select:none;
}
.check-label input { width:16px; height:16px; accent-color: var(--c-primary); cursor:pointer; }
.link-primary { font-size: 13px; font-weight:500; color: var(--c-primary); text-decoration:none; }
.link-primary:hover { text-decoration: underline; }

.btn-submit {
    width:100%;
    padding: 12px 16px;
    font-size: 14px; font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--c-primary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display:flex; align-items:center; justify-content:center; gap:8px;
    transition: background .15s, transform .1s, box-shadow .15s;
    box-shadow: 0 1px 2px rgba(79,70,229,.25), 0 4px 12px rgba(79,70,229,.18);
}
.btn-submit:hover { background: var(--c-primary-2); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit:disabled { opacity:.7; cursor:not-allowed; }
.btn-submit svg { width:16px; height:16px; }

.spinner {
    width:14px; height:14px;
    border:2px solid rgba(255,255,255,.4);
    border-top-color:#fff;
    border-radius:50%;
    animation: spin .7s linear infinite;
    display:none;
}
.btn-submit.loading .spinner { display:inline-block; }
.btn-submit.loading .arrow   { display:none; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer-note {
    margin-top: 1.5rem;
    font-size: 13px;
    color: var(--c-text-2);
    text-align:center;
}
.footer-note a { color: var(--c-primary); text-decoration:none; font-weight:500; }
.footer-note a:hover { text-decoration: underline; }

.form-foot { margin-top: 2.5rem; text-align:center; font-size: 12px; color: var(--c-muted); }

@media (max-width: 920px) {
    .page { grid-template-columns: 1fr; }
    .brand { display:none; }
    .form-panel { padding: 2rem 1.25rem; }
}
