:root {
  color-scheme: light;
  --ink: #111f1b;
  --muted: #55645e;
  --border: #e2e8e4;
  --green: #11674e;
  --dark: #10261f;
  --bg: #f4f7f5;
  --paper: #fff;
  font: 14px/1.45 Inter, "Instrument Sans", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #21a77f; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 3vw, 2.7rem); letter-spacing: -.055em; line-height: 1.12; }
h2 { line-height: 1.25; letter-spacing: -.025em; font-size: 1.19rem; }
small { display: block; }
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--dark); color: #d3e0da; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 27px 16px 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; margin: 0 9px; color: #f9fffb; }
.brand-mark { width: 39px; height: 39px; border-radius: 11px; background: #b5edce; color: #155640; display: grid; place-items: center; }
.brand-mark svg { stroke-width: 3.6; }
.brand strong { display: block; font-size: 25px; line-height: 1; letter-spacing: -.065em; }
.brand strong span { color: #9de4bb; }
.brand small { color: #a2c7b5; font-size: 9px; letter-spacing: .19em; margin-top: 5px; font-weight: 750; }
.sidebar nav { display: grid; gap: 5px; margin-top: 43px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 550; border: 1px solid transparent; }
.sidebar nav a svg { flex-shrink: 0; color: #8fada0; }
.sidebar nav a:hover { background: #1a362c; }
.sidebar nav a[aria-current] { background: #214338; border-color: #2d5244; color: #f6fffa; }
.sidebar nav a[aria-current] svg { color: #a1e3bc; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 2px 2px; border-top: 1px solid #2a4139; }
.account-avatar { border-radius: 50%; width: 32px; height: 32px; display: grid; place-items: center; background: #274a3c; color: #c9f3dd; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.account-text { flex: 1; min-width: 0; }
.account-text strong { font-size: 12px; color: #f5fff9; }
.account-text small { font-size: 11px; color: #a4bcb0; }
.icon-button { border: 0; color: #aecbbd; background: transparent; padding: 7px; border-radius: 6px; display: grid; place-items: center; }
.icon-button:hover { background: #284438; }
.workspace { min-width: 0; }
.topbar { min-height: 64px; background: #fff; padding: 10px 30px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--ink); }
.slash { opacity: .6; }
.environment { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 11px; font-weight: 700; color: #236549; background: #edf8f0; padding: 5px 9px; border: 1px solid #d9ecdf; border-radius: 20px; }
.environment i { display: block; width: 6px; height: 6px; background: #37865c; border-radius: 50%; }
.content { padding: 29px 30px 46px; max-width: 1510px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 23px; }
.page-head p { color: var(--muted); margin-top: 7px; }
.button { display: inline-flex; justify-content: center; align-items: center; padding: 9px 14px; min-height: 40px; gap: 7px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.primary { background: var(--green); color: white; }
.primary:hover { background: #0c523e; }
.secondary { color: #185c47; background: #f2f8f4; border-color: #dce9e1; }
.secondary:hover { background: #e7f3ec; }
.hero { background: #05251c; color: white; border-radius: 15px; overflow: hidden; min-height: 246px; position: relative; display: flex; align-items: center; }
.hero::before { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, #092d23 0%, #092d23 24%, transparent 62%), url('/static/expo-hero.webp') right 46% / 66% auto no-repeat; }
.hero-content { padding: 29px 36px; z-index: 1; }
.hero-date { color: #b8e9cc; font-size: 11px; font-weight: 750; letter-spacing: .12em; display: flex; align-items: center; gap: 7px; }
.hero h2 { margin: 8px 0 7px; font-size: clamp(2.25rem, 4vw, 4.05rem); letter-spacing: -.065em; }
.hero p { display: flex; align-items: center; gap: 6px; color: #c8ded2; }
.hero-button { margin-top: 22px; background: #c1efd2; color: #123c2c; }
.hero-button:hover { background: #e1f7e9; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 23px 0 12px; gap: 8px; }
.muted { color: var(--muted); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat, .panel { border: 1px solid var(--border); border-radius: 12px; background: var(--paper); min-width: 0; }
.stat { padding: 14px 16px; }
.stat-icon, .empty-icon, .timeline-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #1d6f54; background: #e9f6ee; }
.stat-icon.blue { color: #326783; background: #eaf3f8; }
.stat-icon.purple { color: #67519a; background: #f0edf8; }
.stat-icon.sand { color: #795d29; background: #fff4dd; }
.stat-label { margin-top: 9px; color: #43524b; font-size: 12px; font-weight: 650; }
.stat strong { margin-top: 2px; display: block; font-size: 28px; letter-spacing: -.055em; }
.stat small, .panel-head p, .empty p, .flow-body p { color: var(--muted); }
.stat small { font-size: 11px; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(245px, 1fr); gap: 14px; margin-top: 19px; align-items: start; }
.panel + .panel { margin-top: 16px; }
.dashboard-columns .panel, .flow-grid .panel { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 17px 19px; border-bottom: 1px solid var(--border); }
.panel-head p { margin-top: 4px; font-size: 12px; }
.text-link, .empty a { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; font-weight: 700; color: var(--green); font-size: 12px; }
.text-link:hover, .empty a:hover { text-decoration: underline; }
.empty { color: var(--muted); padding: 26px 18px; text-align: center; }
.empty .empty-icon { margin: 0 auto 10px; width: 42px; height: 42px; }
.empty strong { display: block; color: var(--ink); }
.empty p { margin: 4px 0 8px; font-size: 12px; }
.empty.compact { padding: 29px 14px; }
.timeline { padding: 0; margin: 0; list-style: none; }
.timeline li { display: flex; gap: 10px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.timeline-icon { flex-shrink: 0; width: 29px; height: 29px; }
.timeline strong { font-size: 12px; }
.timeline small { color: var(--muted); margin-top: 3px; font-size: 10px; }
.timeline a:hover { text-decoration: underline; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
th { background: #f7f9f8; color: var(--muted); font-size: 11px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td small, summary small { margin-top: 3px; color: var(--muted); }
.entity { font-weight: 700; }
.entity:hover { color: var(--green); text-decoration: underline; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; background: #f1f4f2; color: #45534e; padding: 4px 8px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.badge > span { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.badge.held { background: #fff3db; color: #755218; }
.badge.confirmed { background: #eaf7ee; color: #216749; }
.badge.expired, .badge.released { background: #f8ece9; color: #8e4337; }
.count, .code { border-radius: 6px; background: #edf3f0; color: #345447; padding: 4px 8px; font-size: 12px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px 16px; padding: 16px 19px; }
form label { display: grid; align-content: start; gap: 5px; font-size: 12px; font-weight: 650; }
input, select, textarea { display: block; width: 100%; padding: 8px 10px; min-height: 39px; border: 1px solid #cddad2; background: #fff; border-radius: 7px; color: var(--ink); font-weight: 400; }
textarea { min-height: 68px; resize: vertical; }
.form-actions { grid-column: 1 / -1; margin-top: 4px; }
.record { border-bottom: 1px solid var(--border); }
.record:last-child { border-bottom: 0; }
.record summary { list-style: none; cursor: pointer; padding: 14px 19px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.record summary::-webkit-details-marker { display: none; }
.record summary:hover { background: #f7faf8; }
.record[open] summary > svg { transform: rotate(180deg); }
.record-body { padding: 3px 19px 16px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.inline-form label { width: min(100%, 290px); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 13px; margin: 0 0 14px; }
.summary-grid dt { color: var(--muted); font-size: 12px; }
.summary-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.overview { padding: 16px 19px; }
.overview dl { margin: 0; }
.overview dd { font-size: 17px; }
.back { margin-bottom: 8px; }
.flow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin: 16px 0; }
.flow-card .panel-head h2 { display: flex; gap: 8px; align-items: center; }
.flow-card .panel-head svg { color: var(--green); }
.flow-body { padding: 14px 19px 18px; }
.flow-body .summary-grid { margin: 12px 0 0; }
.stack { display: grid; gap: 9px; max-width: 345px; justify-items: start; }
.stack label { width: 100%; }
.job-ref { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.checklist { list-style: none; margin: 11px 0; padding: 0; }
.checklist li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.flash { margin: 12px 0; padding: 10px 14px; border-radius: 8px; display: flex; align-items: center; gap: 7px; }
.flash.error { background: #fbeae5; color: #802f23; }
.flash.success { background: #e9f7ee; color: #155b3d; }
.login-page { min-height: 100dvh; padding: 22px; display: grid; place-items: center; background: linear-gradient(120deg, #0a2d22, transparent 95%), url('/static/expo-hero.webp') center / cover, var(--dark); }
.login-card { width: min(100%, 410px); background: var(--paper); padding: 32px; border-radius: 17px; box-shadow: 0 20px 65px #01181268; }
.login-brand { margin: 0 0 22px; color: var(--dark); }
.login-brand small { color: #386a55; }
.login-brand strong span { color: #176f50; }
.login-card p { margin: 8px 0 17px; color: var(--muted); }
.login-card form { display: grid; gap: 14px; }
.login-note { margin-top: 16px; color: var(--muted); display: flex; gap: 6px; align-items: center; font-size: 12px; }
@media (max-width: 1060px) {
  .shell { grid-template-columns: 184px minmax(0, 1fr); }
  .topbar, .content { padding-left: 18px; padding-right: 18px; }
  .dashboard-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: 12px; display: grid; grid-template-columns: 1fr auto; }
  .sidebar nav { order: 2; grid-column: 1 / -1; display: flex; flex-wrap: wrap; margin-top: 11px; }
  .sidebar nav a { min-height: 35px; font-size: 12px; padding: 5px 7px; gap: 5px; }
  .sidebar nav a svg { width: 15px; height: 15px; }
  .sidebar-foot { border: 0; margin: 0; padding: 0; }
  .account-text { display: none; }
  .topbar { min-height: 47px; }
  .content { padding-top: 20px; }
  .hero-content { padding: 19px; }
  .hero { min-height: 205px; }
  .hero::before { background: linear-gradient(90deg, #092d23 0%, #092d23 18%, #092d2360 68%), url('/static/expo-hero.webp') right center / auto 100% no-repeat; }
  .stats, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .page-head { flex-wrap: wrap; }
  .topbar, .content { padding-left: 12px; padding-right: 12px; }
  .flow-grid, .form-grid { grid-template-columns: 1fr; }
  .stat { padding: 11px; }
  .hero h2 { font-size: 2.25rem; }
  .breadcrumb > span:not(.slash), .breadcrumb .slash { display: none; }
}
.email-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.check-field { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; }
.check-field input { flex-shrink: 0; width: auto; min-height: auto; }
.inbox-draft { max-width: 720px; }

.agency-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
  gap: 9px;
  margin: 0;
  padding: 15px 19px 17px;
  list-style: none;
}
.agency-team li { padding: 10px 11px; border: 1px solid var(--border); border-radius: 8px; background: #f7faf8; }
.agency-team small { margin-top: 4px; color: var(--muted); }
.agency-role-label { display: flex; align-items: center; gap: 7px; }
.agency-role-label svg { color: var(--green); flex-shrink: 0; }
.agency-task-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.agency-task-form label { flex: 0 1 340px; min-width: 0; }
.agency-request { padding: 16px 19px 18px; }
.agency-request + .agency-request { border-top: 1px solid var(--border); }
.agency-item-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.agency-item-head h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.agency-item-head small { color: var(--muted); margin-top: 3px; }
.agency-scope { margin: 13px 0 0; }
.agency-decision, .agency-rule-form { display: grid; gap: 10px; max-width: 42rem; }
.agency-decision { margin-top: 16px; }
.agency-rule-form { margin-top: 12px; }
.agency-rule-form .button { justify-self: start; }
.agency-rule-form small { color: var(--muted); }
.agency-rule-limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); gap: 10px; }
.agency-draft { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 10px; }
.agency-disclosure { border: 1px solid var(--border); background: #f7faf8; border-radius: 8px; padding: 10px 12px; margin-top: 12px; }
.agency-disclosure summary { cursor: pointer; font-weight: 700; }
.agency-disclosure > p { margin-top: 7px; color: var(--muted); }
.agency-danger { color: #802f23; border-color: #e5c0b8; background: #fff5f2; }
.agency-danger:hover { background: #fbeae5; }
.agency-audit p { color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .agency-team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .agency-team, .agency-request { padding-inline: 13px; }
  .agency-team li { min-width: 0; overflow-wrap: anywhere; }
}
.agency-item-head > div { min-width: 0; }
.agency-decision .button, .agency-rule-form .button { max-width: 100%; white-space: normal; text-align: center; }
.agency-subhead { margin: 0; font-size: 14px; }
