:root {
  --navy: #0f172a;
  --navy-2: #172554;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --surface: #ffffff;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f1f5f9;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: #0f172a; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; position: relative; overflow: hidden; }
.login-backdrop { position: absolute; inset: 0; background:
  radial-gradient(circle at 15% 20%, rgba(6,182,212,.22), transparent 28%),
  radial-gradient(circle at 85% 80%, rgba(37,99,235,.28), transparent 32%),
  linear-gradient(135deg, #020617, #172554 55%, #0f172a); }
.login-card { width: min(1020px, 100%); min-height: 610px; position: relative; display: grid; grid-template-columns: 1.08fr .92fr; background: rgba(255,255,255,.98); border-radius: 28px; overflow: hidden; box-shadow: 0 30px 80px rgba(2,6,23,.38); }
.brand-panel { padding: 58px; display: flex; flex-direction: column; justify-content: space-between; color: white; background:
  linear-gradient(160deg, rgba(15,23,42,.92), rgba(30,64,175,.88)),
  radial-gradient(circle at top right, #06b6d4, transparent 40%); }
.brand-badge { display: inline-flex; gap: 8px; align-items: center; padding: 8px 13px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.1); font-size: .82rem; }
.brand-panel h1 { margin: 28px 0 12px; font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 800; letter-spacing: -3px; }
.brand-panel h1 span { color: #67e8f9; }
.brand-panel p { max-width: 520px; color: #cbd5e1; font-size: 1.08rem; line-height: 1.7; }
.brand-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.brand-stats div { padding: 14px; border: 1px solid rgba(255,255,255,.15); border-radius: 15px; background: rgba(255,255,255,.08); }
.brand-stats strong, .brand-stats span { display: block; }
.brand-stats span { margin-top: 3px; color: #bfdbfe; font-size: .75rem; }
.form-panel { padding: 52px 48px; display: flex; flex-direction: column; justify-content: center; }
.form-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 25px; }
.app-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: #dbeafe; color: var(--blue); font-size: 1.3rem; }
.form-heading h2 { margin: 0; font-weight: 800; }
.form-heading p { margin: 3px 0 0; color: var(--muted); }
.status-chip { width: fit-content; display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 999px; font-size: .78rem; margin-bottom: 24px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-idle { background: #f1f5f9; color: #475569; }.status-idle .status-dot { background: #94a3b8; }
.status-ok { background: #dcfce7; color: #166534; }.status-ok .status-dot { background: #22c55e; }
.status-error { background: #fee2e2; color: #991b1b; }.status-error .status-dot { background: #ef4444; }
.form-label { font-size: .87rem; font-weight: 700; color: #334155; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94a3b8; z-index: 2; }
.input-icon .form-control { height: 50px; padding-left: 45px; border-radius: 13px; border-color: #cbd5e1; }
.input-icon .form-control:focus { border-color: #60a5fa; box-shadow: 0 0 0 .22rem rgba(37,99,235,.13); }
.password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #64748b; padding: 8px; }
.login-button { height: 51px; width: 100%; margin-top: 8px; border: 0; border-radius: 13px; font-weight: 700; background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.test-api { margin: 14px auto 0; text-decoration: none; font-size: .84rem; }
.security-note { text-align: center; color: #94a3b8; font-size: .75rem; margin: 20px 0 0; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 260px; min-height: 100vh; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; background: var(--navy); color: white; transition: transform .25s ease; z-index: 20; }
.sidebar-brand { height: 78px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(135deg,#2563eb,#06b6d4); }
.sidebar-brand strong, .sidebar-brand small { display: block; }.sidebar-brand small { color: #94a3b8; }
.sidebar-nav { padding: 20px 12px; display: grid; gap: 6px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 12px; color: #cbd5e1; padding: 12px 14px; border-radius: 12px; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { color: white; background: rgba(37,99,235,.24); }
.sidebar-footer { margin-top: auto; padding: 18px; }
.app-main { width: calc(100% - 260px); margin-left: 260px; min-height: 100vh; }
.topbar { height: 78px; padding: 0 28px; display: flex; align-items: center; gap: 15px; background: white; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: white; font-size: 1.25rem; }
.topbar-title h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }.topbar-title span { color: var(--muted); font-size: .78rem; }
.user-chip { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip strong, .user-chip small { display: block; }.user-chip small { color: var(--muted); font-size: .74rem; }
.user-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-weight: 800; }
.content-area { padding: 28px; }
.welcome-card { min-height: 190px; display: flex; align-items: center; justify-content: space-between; padding: 34px; border-radius: 22px; color: white; background: linear-gradient(120deg,#1d4ed8,#0f172a); box-shadow: 0 18px 40px rgba(30,64,175,.2); }
.welcome-card h1 { margin: 7px 0; font-weight: 800; }.welcome-card p { margin: 0; color: #dbeafe; }
.eyebrow { font-size: .72rem; letter-spacing: 1.6px; color: #bfdbfe; font-weight: 700; }
.welcome-icon { font-size: 6rem; opacity: .18; }
.kpi-grid { margin: 22px 0; display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.kpi-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; align-items: center; gap: 14px; box-shadow: 0 8px 20px rgba(15,23,42,.04); }
.kpi-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #eff6ff; color: var(--blue); font-size: 1.25rem; }
.kpi-card span, .kpi-card strong { display:block; }.kpi-card span { color: var(--muted); font-size: .8rem; }.kpi-card strong { font-size: 1.45rem; }
.content-card { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.section-heading { display:flex; justify-content:space-between; align-items:start; }.section-heading h3 { margin:0; font-size:1.1rem; font-weight:800; }.section-heading p { margin:4px 0 0; color:var(--muted); }
.migration-list { margin-top:20px; display:grid; gap:12px; }.migration-list div { display:flex; align-items:center; gap:10px; padding:13px; border-radius:12px; background:#f8fafc; }.migration-list .bi-check-circle-fill { color:#22c55e; }
.alert { border-radius: 12px; font-size: .86rem; }
@media (max-width: 900px) {
  .login-card { grid-template-columns: 1fr; max-width: 560px; }
  .brand-panel { display: none; }
  .form-panel { padding: 42px 30px; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  .sidebar { transform: translateX(-100%); }.sidebar.open { transform: translateX(0); }
  .app-main { width: 100%; margin-left: 0; }
  .topbar { padding: 0 16px; }.content-area { padding: 16px; }
  .user-chip div:not(.user-avatar) { display:none; }
}
@media (max-width: 520px) {
  .login-shell { padding: 12px; }.form-panel { padding: 34px 22px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .welcome-card { padding: 25px; }.welcome-icon { display:none; }
}
