:root {
  --bg:#f3f6f4;
  --panel:#ffffff;
  --ink:#101828;
  --muted:#667085;
  --line:#d0d5dd;
  --forest:#0b241c;
  --evergreen:#164536;
  --yield:#1fa77a;
  --mint:#dff7ec;
  --gold:#f4c95d;
  --clay:#c8544d;
  --blue:var(--evergreen);
  --navy:var(--forest);
  --green:var(--yield);
  --red:var(--clay);
  --shadow:0 18px 50px rgba(16,24,40,.10);
}
* { box-sizing:border-box; }
body {
  margin:0;
  min-height:100vh;
  font-family:Inter, "Segoe UI", Arial, sans-serif;
  background:var(--bg);
  color:var(--ink);
}
body.auth-page {
  display:grid;
  place-items:center;
  padding:28px;
  background:radial-gradient(circle at 18% 16%, rgba(31,167,122,.16) 0, transparent 28%), var(--bg);
}
.login-shell { width:min(1120px, 100%); display:grid; grid-template-columns:minmax(0,1fr) 430px; gap:28px; align-items:stretch; }
.login-panel { border-radius:18px; background:linear-gradient(135deg,var(--forest),var(--evergreen)); color:white; padding:42px; min-height:560px; display:flex; flex-direction:column; justify-content:center; box-shadow:var(--shadow); }
.brand-mark { display:inline-flex; align-items:center; gap:10px; color:#fff; font-weight:950; margin-bottom:54px; font-size:25px; letter-spacing:-.04em; }
.brand-mark .brand-icon { width:48px; height:48px; border-radius:14px; background:#fff; color:var(--forest); display:grid; place-items:center; font-size:18px; position:relative; overflow:hidden; box-shadow:0 10px 26px rgba(0,0,0,.18); }
.brand-mark .brand-icon:after { content:""; position:absolute; right:-7px; top:7px; width:18px; height:18px; border-radius:50%; background:var(--forest); box-shadow:-4px 22px 0 -3px var(--forest); }
.brand-mark span span { color:#72e2b6; }
.eyebrow { color:#bfead7; font-size:12px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
h1 { margin:12px 0 0; font-size:42px; line-height:1.05; letter-spacing:0; max-width:620px; }
.login-panel p { color:#d0d5dd; line-height:1.55; max-width:610px; font-size:16px; }
.approval-note { margin-top:30px; border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.07); color:#eef2ff; border-radius:10px; padding:14px 16px; max-width:560px; }
.login-card, .card { background:var(--panel); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); }
.login-card { padding:34px; align-self:center; }
.login-card h2, .card h2 { margin:0 0 8px; font-size:24px; }
.login-card p, .card p { color:var(--muted); margin:0 0 20px; line-height:1.45; }
label { display:block; font-size:12px; font-weight:900; color:var(--muted); text-transform:uppercase; margin:14px 0 6px; }
input, select { width:100%; min-height:44px; border:1px solid var(--line); border-radius:9px; padding:10px 12px; font:inherit; background:#fff; }
button, .button { display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:9px; min-height:44px; padding:10px 15px; background:var(--evergreen); color:#fff; font:inherit; font-weight:900; cursor:pointer; text-decoration:none; }
button.secondary, .button.secondary { background:#eef2f0; color:var(--evergreen); }
button.danger { background:var(--red); }
button:disabled { opacity:.6; cursor:not-allowed; }
.full-button { width:100%; margin-top:20px; }
.auth-alt { margin-top:18px; color:var(--muted); font-size:14px; text-align:center; }
.auth-alt a, .meta a { color:var(--evergreen); font-weight:900; text-decoration:none; }
.actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:18px; }
.message { border-radius:9px; padding:10px 12px; margin:12px 0; background:#eef2ff; color:#1d4ed8; font-size:13px; }
.message[data-type="error"] { background:#fee2e2; color:#991b1b; }
.message[data-type="success"] { background:#dcfce7; color:#166534; }
.shell { width:min(980px, 100%); display:grid; grid-template-columns:1fr 420px; gap:20px; align-items:stretch; margin:24px auto; }
.brand { padding:30px; display:flex; flex-direction:column; justify-content:space-between; min-height:430px; background:linear-gradient(135deg,var(--forest),var(--evergreen)); color:#fff; border-radius:14px; }
.brand p { color:#d0d5dd; line-height:1.55; max-width:560px; }
.card { padding:26px; }
body.data-page { padding:0; background:var(--bg); }
.data-shell { width:min(1180px, 100%); margin:0 auto; padding:28px; }
.data-hero { background:linear-gradient(135deg,var(--forest),var(--evergreen)); color:#fff; border-radius:14px; padding:28px; display:flex; justify-content:space-between; gap:18px; align-items:flex-end; box-shadow:var(--shadow); }
.data-hero h1 { font-size:34px; }
.data-hero p { color:#d0d5dd; max-width:760px; line-height:1.5; }
.data-hero-actions { display:flex; gap:10px; flex-wrap:wrap; }
.data-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:18px; align-items:start; }
.updates-card { margin-top:18px; }
.table-wrap { max-height:520px; overflow:auto; border:1px solid var(--line); border-radius:8px; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th, td { padding:11px 12px; border-bottom:1px solid #e6ebf1; text-align:left; vertical-align:middle; }
th { background:#f8fafc; color:#475467; font-size:11px; text-transform:uppercase; font-weight:900; }
td button { min-height:34px; padding:7px 10px; margin-right:6px; }
.meta { margin-top:16px; font-size:13px; color:var(--muted); }
@media (max-width:900px) {
  body.auth-page { padding:14px; align-items:start; }
  .login-shell, .shell, .data-grid { grid-template-columns:1fr; }
  .login-panel { min-height:auto; padding:26px; }
  .brand-mark { margin-bottom:26px; }
  h1 { font-size:30px; }
  .login-card { align-self:stretch; padding:24px; }
  .data-shell { padding:16px; }
  .data-hero { align-items:flex-start; flex-direction:column; }
}
@media (max-width:560px) {
  .actions, .data-hero-actions { flex-direction:column; align-items:stretch; }
  button, .button { width:100%; }
}

body.admin-page .shell { width:min(1380px, 100%); grid-template-columns:320px minmax(0,1fr); }
.admin-stack { display:flex; flex-direction:column; gap:24px; }
.admin-panel { min-width:0; }
.section-heading { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:12px; }
.section-heading h2 { margin-bottom:6px; }
.status-pill { display:inline-flex; align-items:center; min-height:24px; border-radius:999px; padding:3px 9px; font-weight:900; font-size:12px; text-transform:uppercase; }
.status-pill.success { background:#dcfce7; color:#166534; }
.status-pill.failed { background:#fee2e2; color:#991b1b; }
.status-pill.running { background:#eef2ff; color:#1d4ed8; }
.muted-cell { color:var(--muted); }
@media (max-width:1100px) {
  body.admin-page .shell { grid-template-columns:1fr; }
  body.admin-page .brand { min-height:auto; }
}
@media (max-width:700px) {
  .section-heading { flex-direction:column; }
}
