:root {
  --bg: #071421;
  --bg-2: #0e2233;
  --panel: #ffffff;
  --panel-soft: #f5f7fa;
  --text: #172334;
  --muted: #657386;
  --brand: #f36f21;
  --brand-dark: #c94f0a;
  --danger: #c1121f;
  --accent: #2d7dd2;
  --line: #dfe7ef;
  --success: #21a67a;
  --shadow: 0 24px 80px rgba(7, 20, 33, .22);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--panel-soft); }
a { color: inherit; }

.login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top left, rgba(243,111,33,.35), transparent 34%),
    radial-gradient(circle at bottom right, rgba(45,125,210,.25), transparent 38%),
    linear-gradient(135deg, #06111c, #102a40 55%, #071421);
}
.login-body main { flex: 1; display: grid; place-items: center; padding: 32px; }
.login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.login-brand-panel {
  padding: 56px;
  color: #fff;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(160deg, rgba(243,111,33,.88), rgba(10,30,48,.72)),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600"><g fill="none" stroke="rgba(255,255,255,.16)" stroke-width="2"><path d="M0 120 C140 40 250 200 390 120 S620 120 700 80"/><path d="M-50 280 C120 190 250 350 430 260 S640 300 720 200"/><path d="M0 440 C160 380 250 520 420 430 S650 450 720 390"/></g></svg>');
  background-size: cover;
}
.brand-lockup, .brand, .mobile-brand { display: flex; align-items: center; gap: 14px; }
.brand-logo-light { max-width: 220px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.brand-lockup span { font-weight: 900; letter-spacing: -.02em; }
.mobile-brand { display: none; margin-bottom: 24px; font-weight: 900; }
.mobile-brand img { max-width: 190px; }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .13em; font-size: .75rem; font-weight: 900; color: var(--brand); }
.login-brand-panel .eyebrow { color: rgba(255,255,255,.78); }
.login-brand-panel h1 { margin: 0; font-size: clamp(2rem, 5vw, 4.8rem); line-height: .95; letter-spacing: -.06em; }
.hero-copy { max-width: 580px; font-size: 1.25rem; line-height: 1.7; color: rgba(255,255,255,.86); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-grid div { padding: 18px; border-radius: 20px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18); }
.feature-grid span { display: block; font-weight: 900; font-size: 1.45rem; }
.feature-grid p { margin: 6px 0 0; color: rgba(255,255,255,.75); }
.login-card { padding: 56px; background: #fff; display: flex; flex-direction: column; justify-content: center; }
.login-card h1, .login-card h2 { margin: 0 0 8px; font-size: 2.15rem; letter-spacing: -.04em; }
.muted, .security-note, .login-card p { color: var(--muted); line-height: 1.6; }
form label { display: block; margin: 18px 0 8px; font-weight: 800; font-size: .9rem; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; font: inherit; outline: none; transition: .2s ease; background: #fff; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(243,111,33,.13); }
.primary-btn, .secondary-btn, .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-weight: 900; border: 0; cursor: pointer; font: inherit; }
.primary-btn, .btn.primary { width: 100%; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); box-shadow: 0 14px 28px rgba(243,111,33,.28); }
.btn { background: #eef3f8; color: var(--text); padding: 12px 18px; min-height: 44px; }
.secondary-btn { background: #fff; color: var(--text); border: 1px solid rgba(13,31,50,.1); }
.muted-link { display: inline-block; margin-top: 18px; color: var(--muted); font-weight: 800; text-decoration: none; }
.muted-link:hover { color: var(--brand-dark); }
.security-note { font-size: .82rem; margin-top: 20px; }
.alert { border-radius: 16px; padding: 14px 16px; margin: 16px 0; font-weight: 800; line-height: 1.45; }
.alert.error { background: #feecef; color: #9d1020; }
.alert.success { background: #eaf7ef; color: #12642e; }

.portal-body { background: #f4f7fb; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px min(5vw, 64px); background: rgba(255,255,255,.90); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(13, 31, 50, .08); }
.brand { text-decoration: none; color: var(--text); }
.brand img { width: 170px; max-height: 46px; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .75rem; font-weight: 800; }
.topnav { display: flex; gap: 6px; align-items: center; }
.topnav a { text-decoration: none; color: var(--muted); font-weight: 800; padding: 10px 14px; border-radius: 999px; }
.topnav a:hover { color: var(--text); background: #eef3f8; }
.ghost-btn { min-height: 42px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 900; cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap; }
main { overflow: hidden; }
.portal-hero { margin: 0 auto; max-width: 1240px; padding: 86px min(5vw, 64px) 52px; display: grid; grid-template-columns: 1.4fr .6fr; gap: 32px; align-items: stretch; }
.portal-hero h1 { margin: 0; max-width: 850px; font-size: clamp(2.5rem, 6vw, 5.8rem); line-height: .92; letter-spacing: -.07em; }
.portal-hero p { max-width: 720px; color: var(--muted); font-size: 1.15rem; line-height: 1.75; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-actions .primary-btn { width: auto; }
.status-card { align-self: end; border-radius: var(--radius); padding: 28px; background: var(--bg); color: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.status-card:after { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; bottom: -80px; background: radial-gradient(circle, rgba(243,111,33,.45), transparent 62%); }
.status-card h2 { margin: 18px 0 16px; letter-spacing: -.03em; position: relative; }
.status-card p { color: rgba(255,255,255,.75); margin: 8px 0; font-size: .98rem; position: relative; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: var(--success); box-shadow: 0 0 0 8px rgba(33,166,122,.16); }
.stats-strip { width: min(1110px, calc(100% - 40px)); margin: 0 auto 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats-strip div { padding: 22px; border-radius: 20px; background: #fff; border: 1px solid rgba(13,31,50,.08); }
.stats-strip strong { display: block; font-size: 2rem; color: var(--brand); }
.stats-strip span { color: var(--muted); font-weight: 800; }
.section { padding: 68px min(5vw, 64px); max-width: 1240px; margin: 0 auto; }
.alt-section { max-width: none; background: #fff; }
.alt-section > * { max-width: 1110px; margin-left: auto; margin-right: auto; }
.section-heading { margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.055em; }
.section-heading p:not(.eyebrow) { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.resource-card, .timeline-card, .panel { padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid rgba(13,31,50,.08); box-shadow: 0 10px 34px rgba(13,31,50,.06); }
.alt-section .resource-card, .alt-section .timeline-card { background: #f8fafc; }
.resource-card.wide { min-height: 100%; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.card-header h3 { margin: 0; font-size: 1rem; color: var(--muted); }
.pill { display: inline-flex; padding: 7px 12px; border-radius: 999px; background: #fff1e8; color: var(--brand-dark); font-weight: 900; font-size: .78rem; }
.pill.concrete { background: #eaf3ff; color: #21629f; }
.pill.agriculture { background: #e9f8ef; color: #227442; }
.pill.publicworks { background: #f0eefe; color: #5742b8; }
.resource-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 28px; }
.resource-card:not(.wide) .resource-list { columns: 1; }
.resource-list li { break-inside: avoid; padding: 9px 0; border-bottom: 1px solid rgba(13,31,50,.08); }
.resource-list a, .download-grid a, .training-grid a { font-weight: 800; color: var(--text); text-decoration: none; }
.resource-list a:hover, .download-grid a:hover, .training-grid a:hover { color: var(--brand-dark); }
.resource-list span { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; }
.timeline-wrap { display: grid; grid-template-columns: 1.4fr .6fr; gap: 18px; }
.timeline-card h3 { margin-top: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 14px 0; border-top: 1px solid rgba(13,31,50,.08); }
.timeline time { color: var(--brand-dark); font-weight: 900; }
.timeline p { margin: 0; font-weight: 700; line-height: 1.45; }
.empty-state { padding: 34px; border-radius: 18px; background: #eef8f3; color: #227442; font-weight: 900; }
.training-grid, .download-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.training-grid a, .download-grid a { min-height: 96px; padding: 20px; border-radius: 20px; background: #fff; border: 1px solid rgba(13,31,50,.08); display: flex; align-items: flex-end; box-shadow: 0 10px 34px rgba(13,31,50,.05); }
.alt-section .download-grid a { background: #f8fafc; }
.footer { padding: 28px min(5vw, 64px); background: var(--bg); color: #fff; display: flex; justify-content: space-between; gap: 20px; }
.footer p { margin: 0; font-weight: 900; }
.footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.login-body .footer { background: transparent; color: rgba(255,255,255,.72); }

.admin-wrap { max-width: 1240px; margin: 0 auto; padding: 46px min(5vw, 64px) 72px; }
.admin-head { display: grid; grid-template-columns: 1fr minmax(280px, 460px); gap: 20px; align-items: end; margin-bottom: 22px; }
.admin-head h1 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.7rem); line-height: .92; letter-spacing: -.07em; }
.admin-head p { color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.search { display: flex; gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 14px; align-items: end; }
.form-grid label { margin: 0; }
.check { display: flex; gap: 10px; align-items: center; }
.check input { width: auto; }
.bulkbar { display: grid; grid-template-columns: 220px minmax(180px,1fr) minmax(260px,2fr) auto; gap: 12px; align-items: start; margin-bottom: 16px; }
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid rgba(13,31,50,.08); }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th, td { padding: 12px; border-bottom: 1px solid #edf1f5; text-align: left; vertical-align: top; }
th { color: #5c6a79; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
.actions { white-space: nowrap; }
.linkbtn, .danger { border: 0; background: transparent; color: #1a5fb4; font-weight: 900; cursor: pointer; padding: 4px 6px; }
.danger { color: var(--danger); }

@media (max-width: 940px) {
  .login-shell, .portal-hero, .timeline-wrap, .admin-head { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .mobile-brand { display: flex; }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .topnav { order: 3; width: 100%; overflow-x: auto; }
  .stats-strip, .card-grid, .training-grid, .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-list { columns: 1; }
  .bulkbar { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .login-body main { padding: 16px; }
  .login-card { padding: 28px; }
  .stats-strip, .training-grid, .download-grid { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .footer { flex-direction: column; }
  .brand img { width: 145px; }
}
