:root {
  --brand: #ed1b2f;
  --brand-dark: #c81023;
  --brand-soft: #fff1f2;
  --ink: #17171c;
  --muted: #676772;
  --line: #e8e8ec;
  --surface: #fff;
  --canvas: #f7f7f9;
}

html { position: relative; min-height: 100%; font-size: 16px; }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); font-family: "Manrope", Arial, sans-serif; display: flex; flex-direction: column; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.site-main { flex: 1; }

.site-header { position: relative; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .navbar { min-height: 82px; padding: 12px 0; }
.site-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.site-brand:hover { color: var(--ink); }
.brand-mark { width: 48px; height: 48px; flex: 0 0 48px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--brand); border-radius: 4px; font-size: 22px; font-weight: 800; }
.site-brand span { display: flex; flex-direction: column; }
.site-brand strong { font-size: 20px; font-weight: 800; letter-spacing: .08em; line-height: 1.1; }
.site-brand small { max-width: 245px; color: var(--muted); font-size: 10px; line-height: 1.25; text-transform: uppercase; letter-spacing: .05em; }
.site-header .nav-link { margin: 0 6px; padding: 10px 12px !important; color: #34343b; font-size: 14px; font-weight: 600; }
.site-header .nav-link:hover { color: var(--brand); }
.nav-user { display: inline-block; max-width: 210px; padding: 10px 12px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.nav-login { margin-left: 8px; }
.btn-brand { color: #fff !important; background: var(--brand); border-color: var(--brand); font-weight: 700; box-shadow: 0 8px 20px rgb(237 27 47 / 18%); }
.btn-brand:hover, .btn-brand:focus { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.btn-outline-brand { color: var(--brand); border-color: #f1a4ac; font-weight: 700; }
.btn-outline-brand:hover { color: #fff; background: var(--brand); border-color: var(--brand); }
.btn { border-radius: 10px; transition: .18s ease; }
.btn-sm { padding: 8px 16px; }

.hero { position: relative; min-height: 600px; overflow: hidden; color: #fff; background: linear-gradient(125deg, #f02034 0%, #df1026 58%, #be0d20 100%); }
.hero-grid { position: relative; z-index: 2; min-height: 600px; display: flex; align-items: center; padding-top: 70px; padding-bottom: 70px; }
.hero-copy { max-width: 760px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; color: rgb(255 255 255 / 82%); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.eyebrow::before { width: 28px; height: 2px; content: ""; background: currentColor; }
.hero h1 { margin: 0 0 24px; font-size: clamp(42px, 5.1vw, 72px); font-weight: 800; line-height: 1.04; letter-spacing: -.045em; }
.hero h1 span { color: #fff; }
.hero-copy > p { max-width: 650px; margin-bottom: 34px; color: rgb(255 255 255 / 82%); font-size: 19px; line-height: 1.7; }
.hero-button { padding: 15px 22px; color: var(--brand); border: 0; font-size: 15px; font-weight: 800; box-shadow: 0 16px 35px rgb(96 0 9 / 25%); }
.hero-button:hover { color: var(--brand-dark); transform: translateY(-2px); }
.hero-button span { margin-left: 16px; font-size: 20px; }
.hero-shape { position: absolute; border: 1px solid rgb(255 255 255 / 13%); transform: rotate(45deg); }
.hero-shape-one { top: -230px; right: -110px; width: 610px; height: 610px; }
.hero-shape-two { bottom: -330px; left: 35%; width: 520px; height: 520px; }

.home-section, .page-section { padding: 86px 0; }
.section-heading { max-width: 650px; margin-bottom: 38px; }
.eyebrow-dark { margin-bottom: 12px; color: var(--brand); }
.section-heading h2, .content-card h1, .auth-heading h1 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 45px); font-weight: 800; letter-spacing: -.035em; }
.section-heading p, .page-lead, .auth-heading p, .content-card > p { color: var(--muted); line-height: 1.7; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card { position: relative; min-height: 245px; padding: 34px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgb(35 35 45 / 5%); transition: .2s ease; }
.feature-card:hover { border-color: #f4bec3; box-shadow: 0 18px 45px rgb(102 12 22 / 10%); transform: translateY(-4px); }
.feature-number { color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.feature-card h3 { margin: 56px 0 12px; font-size: 20px; font-weight: 800; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.page-section { min-height: 570px; background: radial-gradient(circle at 90% 0, #fff0f2 0, transparent 32%); }
.content-card, .auth-card { padding: clamp(28px, 5vw, 58px); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 55px rgb(30 30 40 / 7%); }
.narrow-card { max-width: 850px; }
.auth-section { display: flex; align-items: center; padding: 62px 0; }
.auth-card { max-width: 520px; margin: 0 auto; }
.auth-heading { margin-bottom: 30px; text-align: center; }
.auth-heading .eyebrow { justify-content: center; }
.auth-heading h1 { font-size: 34px; }
.auth-heading p { margin: 0; }
.brand-form { display: flex; flex-direction: column; gap: 20px; }
.form-group label { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.form-control { min-height: 54px; padding: 13px 15px; background: #fbfbfc; border: 1px solid #ddddE3; border-radius: 10px; }
.form-control:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgb(237 27 47 / 10%); }
.password-field { position: relative; }
.password-field .form-control { padding-right: 54px; }
.password-toggle { position: absolute; top: 14px; right: 15px; width: 26px; height: 26px; padding: 2px; color: #85858e; background: none; border: 0; }
.password-toggle svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.field-validation, .validation-summary { color: #c81023; font-size: 13px; }
.field-validation:empty, .validation-summary:empty { display: none; }
.validation-summary ul { margin: 0; padding-left: 18px; }
.auth-switch { margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.auth-switch a { font-weight: 800; text-decoration: none; }

.content-card > h1 { margin-bottom: 12px; }
.page-lead { margin-bottom: 30px; }
.brand-table { --bs-table-bg: transparent; margin: 20px 0 0; }
.brand-table thead th { padding: 14px 16px; color: var(--muted); border-bottom-color: var(--line); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.brand-table td { padding: 18px 16px; border-color: var(--line); }
.brand-table .access-action-column { min-width: 175px; }
.access-action-form { display: inline-block; margin: 0; }
.status-badge { display: inline-block; padding: 6px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.status-approved { color: #14753d; background: #e6f7ed; }
.status-pending { color: #9a5b00; background: #fff3d6; }
.alert { border: 0; border-radius: 10px; }

.site-footer { padding: 26px 0; color: #8b8b94; background: #17171c; font-size: 12px; }
.footer-content { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 15px; font-weight: 800; text-decoration: none; letter-spacing: .08em; }
.footer-brand:hover { color: #fff; }
.brand-mark-small { width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; }

/* Default Identity and error pages inherit the same card language. */
.site-main > h1, .site-main > h2, .site-main > h3, .site-main > p, .site-main > header, .site-main > .row, .site-main > .alert, .site-main > hr {
  width: min(100% - 40px, 1100px); margin-right: auto; margin-left: auto;
}
.site-main > h1, .site-main > header { margin-top: 70px; }
.site-main > .row, .site-main > header { padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.site-main > p:last-child, .site-main > .row:last-child, .site-main > header:last-child { margin-bottom: 70px; }

@media (max-width: 991px) {
  .site-header .navbar-collapse { padding: 16px 0 6px; border-top: 1px solid var(--line); margin-top: 12px; }
  .site-header .navbar-nav { align-items: stretch !important; }
  .nav-login { margin: 8px 12px; text-align: center; }
  .hero-grid { min-height: auto; padding-top: 85px; padding-bottom: 90px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 200px; }
  .feature-card h3 { margin-top: 35px; }
}
@media (max-width: 575px) {
  .site-brand small { display: none; }
  .hero { min-height: auto; }
  .hero-grid { padding-top: 65px; padding-bottom: 72px; }
  .hero h1 { font-size: 39px; }
  .hero-copy > p { font-size: 16px; }
  .home-section, .page-section { padding: 52px 0; }
  .content-card, .auth-card { padding: 28px 22px; border-radius: 15px; }
  .footer-content { flex-direction: column; align-items: flex-start; }
}

.app-shell{min-height:100vh;display:grid;grid-template-columns:250px 1fr;background:#f4f6f8}.app-sidebar{background:#202a36;color:#cbd3dc;padding:24px 16px}.app-brand{display:flex;align-items:center;gap:12px;padding:0 8px 24px;border-bottom:1px solid #34404d}.app-sidebar nav{display:flex;flex-direction:column;gap:5px;margin-top:22px}.app-sidebar nav a{padding:11px 13px;color:#cbd3dc;text-decoration:none;border-radius:7px;font-size:13px}.app-sidebar nav a:hover,.app-sidebar nav a.active{background:#2f3b49;color:#fff}.app-workspace{padding:28px 32px}.app-topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.app-topbar h1{margin:0;font-size:25px}.app-topbar p{margin:5px 0;color:#7b8490}.live-pill{padding:7px 11px;background:#e9f7ef;color:#20824d;border-radius:20px;font-size:11px}.dashboard-filters{display:grid;grid-template-columns:160px 240px minmax(0,360px) minmax(120px,320px);gap:10px;margin-bottom:18px}.dashboard-filters select,.dashboard-filters input{height:40px;padding:0 12px;background:#fff;border:1px solid #dfe3e8;border-radius:6px}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:14px}.metric-grid article,.panel{background:#fff;border:1px solid #e1e5e9;border-radius:8px}.metric-grid article{padding:18px}.metric-grid span{display:block;color:#78828d;font-size:11px}.metric-grid strong{display:block;margin:7px 0;font-size:26px}.metric-grid small{color:#9aa2ab;font-size:10px}.dashboard-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:14px}.panel{min-height:300px;padding:18px}.panel.wide{grid-column:1/-1;min-height:220px}.panel-head{display:flex;justify-content:space-between;border-bottom:1px solid #edf0f2;padding-bottom:14px}.panel-head h2{font-size:14px;margin:0}.empty-map,.empty-state{height:230px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#89939d;text-align:center}.empty-map{margin-top:12px;background:#f2f5f7;border:1px dashed #cbd3da}.chart-placeholder{height:145px;display:flex;align-items:end;gap:8px;padding:25px}.chart-placeholder i{flex:1;background:#d9e1e7;height:45%;border-radius:3px}.chart-placeholder i:nth-child(2n){height:75%}@media(max-width:900px){.app-shell{grid-template-columns:1fr}.app-sidebar{display:none}.dashboard-filters,.metric-grid{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}.panel.wide{grid-column:auto}}

.mvp-page{padding:28px 32px;max-width:1500px;margin:auto}.narrow-mvp{max-width:980px}.mvp-title{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:20px}.mvp-title h1{font-size:25px;font-weight:800;margin:4px 0}.mvp-title p{color:#7b8490;margin:0}.task-filters{display:grid;grid-template-columns:1fr 220px 120px;gap:10px;margin-bottom:14px}.task-filters input,.task-filters select{height:40px;border:1px solid #dfe3e8;border-radius:6px;padding:0 12px}.task-table{min-height:0}.task-table table{margin:0}.task-table td,.task-table th{padding:15px}.task-table td small{display:block;color:#8a939d;margin-top:4px;max-width:550px}.task-status{display:inline-block;padding:5px 9px;border-radius:14px;background:#eef2f5;color:#4f5d6b;font-size:11px;font-weight:700}.task-form{display:flex;flex-direction:column;gap:9px;padding:25px}.task-form label{font-size:12px;font-weight:700;margin-top:5px}.task-form h3{font-size:15px;margin:16px 0 2px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-actions,.task-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.task-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}.task-summary article{background:#fff;border:1px solid #e1e5e9;border-radius:8px;padding:15px}.task-summary span{display:block;color:#8a939d;font-size:10px;margin-bottom:6px}.task-summary b{font-size:12px}@media(max-width:700px){.mvp-page{padding:18px}.task-filters,.form-grid,.task-summary{grid-template-columns:1fr}.mvp-title{flex-direction:column}}

.source-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.source-card{display:flex;flex-direction:column;gap:7px;padding:18px;background:#fff;border:1px solid #e1e5e9;border-radius:8px;color:#27313b;text-decoration:none}.source-card span,.source-card small{color:#7f8994}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.setting-card{padding:18px;min-height:0}.setting-card>span{display:block;color:#89939d;font-size:10px}.setting-card>b{display:block;margin:5px 0 12px}.setting-card>div{display:flex;gap:8px}@media(max-width:800px){.source-grid,.settings-grid{grid-template-columns:1fr}}

/* Persistent authenticated application navigation */
.authenticated-app{display:block;background:#f4f6f8}.global-app-shell{min-height:100vh}.global-sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;display:flex;flex-direction:column}.global-sidebar .app-brand{color:#fff;text-decoration:none}.global-sidebar .app-brand span:last-child{display:flex;flex-direction:column}.global-sidebar .app-brand small{color:#82909f;font-size:11px}.global-sidebar nav{flex:1}.sidebar-account{margin-top:18px;padding-top:16px;border-top:1px solid #34404d}.sidebar-account .nav-user{display:block;color:#aeb8c3;padding:8px 10px}.sidebar-account form{margin:0}.sidebar-account .btn,.sidebar-account a{width:100%;margin:4px 0;text-align:left;color:#cbd3dc;box-shadow:none}.app-content{min-width:0;min-height:100vh}.authenticated-app .site-footer,.authenticated-app>.site-header{display:none}@media(max-width:900px){.global-sidebar{display:block;position:relative;height:auto}.global-app-shell{grid-template-columns:1fr}.global-sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.app-content{min-height:auto}}

/* Inner workspace spacing */
.global-app-shell{background:#f4f6f8}.app-content{padding:0}.app-content>.app-workspace,.app-content>.mvp-page,.app-content>.page-section{box-sizing:border-box;width:100%;max-width:none;margin:0;padding:28px 32px}.app-content>.page-section>.container{max-width:none;padding:0}.app-content>.app-workspace .dashboard-filters{margin-top:0}.app-content>.app-workspace .dashboard-grid{margin-bottom:28px}@media(max-width:700px){.app-content>.app-workspace,.app-content>.mvp-page,.app-content>.page-section{padding:18px}}

/* Live dashboard */
.dashboard-filters{align-items:end}.dashboard-filters label{display:block;font-size:12px;margin-bottom:5px;color:#66727e}.dashboard-filters select,.dashboard-filters input{width:100%;min-width:0}.dashboard-note{font-size:12px;color:#66727e;margin:12px 0}.dashboard-list{list-style:none;padding:0;margin:0}.dashboard-list li{padding:13px 0;border-bottom:1px solid #edf0f2}.dashboard-list a{color:#263440;text-decoration:none}.dashboard-list a:hover{text-decoration:underline}.dashboard-list small{display:block;margin-top:5px;color:#74808b;font-size:11px}.dashboard-trend{display:flex;gap:8px;overflow-x:auto;align-items:end;padding-top:18px;min-height:155px}.dashboard-day{flex:1;min-width:28px;text-align:center;display:flex;align-items:center;flex-direction:column;justify-content:end;gap:5px}.dashboard-day span,.dashboard-day small{font-size:10px;color:#66727e}.dashboard-day i{display:block;width:80%;background:#ed1b2f;border-radius:3px;min-height:1px}

@media(min-width:901px) and (max-width:1250px){.dashboard-filters{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr)}}
