:root {
  --ink: #172033;
  --muted: #667085;
  --line: #d7dee8;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --danger: #b42318;
  --warning: #b54708;
  --ok: #047857;
  --blue: #175cd3;
  --shadow: 0 12px 28px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 430px) minmax(420px, 1fr); background: linear-gradient(135deg, #eef7f5 0%, #f8fafc 65%, #eef2f8 100%); }
.login-panel { background: #fff; padding: 54px 46px; box-shadow: var(--shadow); }
.login-panel h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: 0; }
.login-panel p { margin: 0 0 26px; color: var(--muted); line-height: 1.5; }
.login-art { display: flex; align-items: center; padding: 56px; }
.login-art h2 { max-width: 780px; margin: 0 0 18px; font-size: 40px; letter-spacing: 0; }
.login-art p { max-width: 660px; color: var(--muted); line-height: 1.7; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button { flex: 1; min-height: 36px; border-radius: 6px; color: #344054; background: #eef2f6; font-weight: 700; }
.tabs button.active { background: var(--brand); color: #fff; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { color: #344054; font-weight: 700; font-size: 13px; }
.field input, .field select, .field textarea, .toolbar input, .toolbar select {
  width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px; background: #fff; color: var(--ink);
}
.field textarea { min-height: 86px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 14px; border-radius: 6px; background: var(--brand); color: #fff; font-weight: 800; }
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #e6ebf2; color: #25324a; }
.btn.danger { background: var(--danger); }
.btn.small { min-height: 30px; padding: 6px 9px; font-size: 12px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line); padding: 22px 18px; }
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.brand-mark { width: 36px; height: 36px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 900; }
.brand strong { display: block; }
.brand span { color: var(--muted); font-size: 12px; }
.nav { display: grid; gap: 8px; }
.nav button { text-align: left; padding: 11px 12px; border-radius: 6px; color: #344054; background: transparent; font-weight: 700; }
.nav button.active, .nav button:hover { background: #ecfdf5; color: #065f46; }
.user-box { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.55; }
.main { padding: 26px 30px 44px; min-width: 0; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.topbar h1 { margin: 0 0 7px; font-size: 26px; letter-spacing: 0; }
.topbar p { margin: 0; color: var(--muted); }
.toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 180px 180px; gap: 10px; margin-bottom: 16px; }
.section { margin-bottom: 14px; border: 1px solid var(--line); background: #fff; border-radius: 8px; overflow: hidden; }
.section-head { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; background: #fff; color: var(--ink); }
.section.payment .section-head { background: #ecfdf5; }
.section.priority .section-head { background: #fff7ed; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 900; }
.badge { min-width: 28px; height: 24px; border-radius: 999px; color: #fff; background: #667085; display: inline-grid; place-items: center; font-size: 12px; padding: 0 8px; }
.badge.payment { background: var(--ok); }
.badge.action { background: var(--warning); }
.request-row { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(140px, 1fr) 120px 130px 150px 130px; gap: 12px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); background: #fff; }
.request-row:hover { background: #f8fafc; }
.request-title strong { display: block; margin-bottom: 4px; }
.muted, .request-title span { color: var(--muted); font-size: 12px; }
.pill { display: inline-flex; min-height: 24px; align-items: center; justify-content: center; border-radius: 999px; padding: 3px 8px; background: #eef2f6; color: #344054; font-weight: 800; font-size: 12px; }
.pill.due { background: #fee4e2; color: var(--danger); }
.pill.warn { background: #fffaeb; color: var(--warning); }
.pill.ok { background: #dcfae6; color: var(--ok); }
.empty { padding: 22px 16px; color: var(--muted); border-top: 1px solid var(--line); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.panel h2 { margin: 0 0 14px; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.full { grid-column: 1 / -1; }
.readonly { background: #f2f4f7 !important; color: #475467 !important; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 9px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.steps { display: grid; gap: 10px; }
.step { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.step.active { border-color: #f79009; background: #fffaf0; }
.step.done { border-color: #12b76a; background: #f6fef9; }
.checklist { display: grid; gap: 8px; margin: 12px 0; }
.checklist label { display: flex; align-items: center; gap: 9px; }
.attachment { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
.admin-table th { background: #f2f4f7; }
.toast { position: fixed; right: 22px; bottom: 54px; background: #101828; color: #fff; padding: 12px 14px; border-radius: 7px; box-shadow: var(--shadow); z-index: 20; max-width: 360px; }
.version-badge { position: fixed; right: 14px; bottom: 12px; z-index: 40; color: #475467; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; font-size: 12px; box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
@media (max-width: 920px) {
  .login-wrap, .app-shell, .toolbar, .form-grid, .detail-layout { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .sidebar { position: static; height: auto; }
  .request-row { grid-template-columns: 1fr; }
}
