:root {
  --bg: #f7f8fc;
  --ink: #111827;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.12);
  --primary: #2557ff;
  --accent: #05c6a2;
  --deep: #07122f;
  --danger: #dc2626;
  --card: #ffffff;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.hidden { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 46px; height: 46px; border-radius: 15px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; display: grid; place-items: center; font-size: 24px; font-weight: 950; box-shadow: 0 14px 30px rgba(37, 87, 255, 0.22); }
.brand strong { display: block; font-size: 20px; letter-spacing: -0.03em; }
.brand small { display: block; margin-top: -4px; color: var(--muted); font-size: 12px; }
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 15%, rgba(37,87,255,0.18), transparent 28%), radial-gradient(circle at 85% 10%, rgba(5,198,162,0.2), transparent 24%), linear-gradient(180deg, #eef4ff, #fff); }
.login-card { width: min(470px, 100%); background: rgba(255,255,255,0.82); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.9); border-radius: 34px; padding: 34px; box-shadow: var(--shadow); }
.login-card h1 { margin: 30px 0 8px; font-size: 42px; letter-spacing: -0.06em; line-height: 1; }
.login-card p { color: var(--muted); }
.login-form { display: grid; gap: 16px; margin-top: 24px; }
label { display: grid; gap: 8px; color: #263247; font-weight: 850; font-size: 14px; }
input { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 14px 15px; background: #f8fafc; outline: none; transition: 0.18s ease; }
input:focus { border-color: rgba(37,87,255,0.52); box-shadow: 0 0 0 4px rgba(37,87,255,0.1); background: white; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 950; }
.btn.primary { color: white; background: linear-gradient(135deg, var(--primary), #6f45ff); box-shadow: 0 14px 34px rgba(37,87,255,0.22); }
.btn.ghost { color: white; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.12); width: 100%; }
.btn.danger { color: white; background: var(--danger); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.message { min-height: 22px; font-weight: 850; }
.message.error { color: var(--danger); }
.back-link { display: inline-block; margin-top: 20px; color: var(--primary); font-weight: 850; }
.dashboard-view { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { background: var(--deep); color: white; min-height: 100vh; padding: 26px; position: sticky; top: 0; align-self: start; }
.sidebar .brand small { color: rgba(255,255,255,0.58); }
.sidebar nav { display: grid; gap: 8px; margin: 44px 0; }
.sidebar nav a { color: rgba(255,255,255,0.74); padding: 13px 14px; border-radius: 16px; font-weight: 850; }
.sidebar nav a.active, .sidebar nav a:hover { background: rgba(255,255,255,0.1); color: white; }
.dashboard-main { padding: 34px; }
.dashboard-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; }
.eyebrow { display: inline-flex; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); font-weight: 950; background: rgba(37,87,255,0.08); border: 1px solid rgba(37,87,255,0.14); padding: 8px 12px; border-radius: 999px; }
.dashboard-header h1 { font-size: clamp(34px, 5vw, 62px); letter-spacing: -0.065em; line-height: 1; margin: 18px 0 8px; }
.dashboard-header p { margin: 0; color: var(--muted); }
.summary-card { min-width: 170px; background: white; border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: 0 14px 36px rgba(15,23,42,0.07); }
.summary-card strong { display: block; font-size: 34px; letter-spacing: -0.04em; }
.summary-card span { color: var(--muted); font-size: 13px; }
.toolbar { display: grid; grid-template-columns: 1fr auto; gap: 14px; margin: 30px 0; }
.applications { display: grid; gap: 18px; }
.application-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 24px; box-shadow: 0 18px 48px rgba(15,23,42,0.07); }
.application-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.application-head h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -0.04em; }
.application-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.application-meta span { background: #f1f5f9; color: #334155; border-radius: 999px; padding: 7px 10px; font-size: 12px; font-weight: 850; }
.note { color: var(--muted); background: #f8fafc; border: 1px solid var(--line); border-radius: 16px; padding: 13px; margin: 14px 0; }
.documents { display: grid; gap: 10px; }
.document-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: #fbfdff; }
.document-name { font-weight: 900; word-break: break-word; }
.document-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.document-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.empty-state { text-align: center; padding: 50px 22px; background: white; border: 1px dashed rgba(37,87,255,0.28); border-radius: 28px; color: var(--muted); }
.error-text { color: var(--danger); font-weight: 850; }

@media (max-width: 900px) {
  .dashboard-view { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; position: static; }
  .dashboard-header, .application-head { flex-direction: column; align-items: stretch; }
  .toolbar { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .dashboard-main, .sidebar { padding: 18px; }
  .document-row { grid-template-columns: 1fr; }
  .document-actions { justify-content: stretch; }
  .document-actions .btn { flex: 1; }
  .login-card { padding: 24px; }
}
