:root {
  --navy: #0b1715;
  --green: #0a3b32;
  --green-2: #0f6a55;
  --lime: #d7f277;
  --paper: #ffffff;
  --canvas: #f3f4ef;
  --line: #dde2dc;
  --ink: #14231f;
  --muted: #6d7b77;
  --danger: #a13934;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, select { font: inherit; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; padding: 28px 18px; display: flex; flex-direction: column; color: white; background: var(--navy); }
.admin-brand { padding: 0 10px 34px; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: 21px 17px; color: white; text-decoration: none; }
.admin-brand > span { grid-row: 1 / 3; width: 36px; height: 36px; padding: 4px; display: grid; place-items: center; border-radius: 10px; background: #fffdfa; }
.admin-brand > span img { width: 100%; height: 100%; display: block; object-fit: contain; }
.admin-brand strong { font-size: 15px; }
.admin-brand small { color: #7f9992; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
nav { display: grid; gap: 6px; }
.nav-item { width: 100%; padding: 11px 12px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 9px; color: #9eb0ab; background: transparent; cursor: pointer; text-align: left; font-size: 13px; font-weight: 700; }
.nav-item span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #334a44; border-radius: 7px; font-size: 9px; }
.nav-item:hover, .nav-item.active { color: white; background: #152a26; }
.nav-item.active span { color: var(--green); border-color: var(--lime); background: var(--lime); }
.sidebar-footer { margin-top: auto; display: grid; gap: 6px; }
.store-link { padding: 10px 12px; color: #81958f; text-decoration: none; font-size: 11px; }
.signout-button { width: 100%; padding: 10px 12px; border: 1px solid #2d423d; border-radius: 8px; color: #9db0aa; background: transparent; cursor: pointer; text-align: left; font-size: 11px; }
.signout-button:hover { color: white; border-color: #536c65; }
main { min-height: 100vh; margin-left: 240px; padding: 36px clamp(24px, 4vw, 64px) 70px; }
.topbar { margin-bottom: 28px; display: flex; align-items: center; justify-content: space-between; }
.topbar-tools { display: flex; align-items: center; gap: 12px; }
.agent-switcher { display: flex; align-items: center; gap: 8px; }
.agent-switcher select { min-width: 155px; }
.topbar p, .kicker { margin: 0 0 5px; color: var(--green-2); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; }
.topbar h1 { margin: 0; font-family: Georgia, serif; font-size: 37px; font-weight: 400; letter-spacing: -.035em; }
.live-state { padding: 8px 12px; border: 1px solid #cfd9d3; border-radius: 100px; color: var(--muted); background: #f9faf7; font-size: 10px; font-weight: 800; }
.live-state span { width: 7px; height: 7px; margin-right: 6px; display: inline-block; border-radius: 50%; background: #27a36b; box-shadow: 0 0 0 3px #d9efe4; }
.panel { padding: 28px; border: 1px solid #e0e4de; border-radius: 14px; background: var(--paper); box-shadow: 0 8px 35px rgba(27,53,46,.05); }
.panel-heading { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.panel-heading h2 { margin: 0 0 5px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.panel-heading p:not(.kicker) { margin: 0; color: var(--muted); font-size: 12px; }
.controls, .filter-bar { display: flex; align-items: flex-end; gap: 9px; }
label { display: grid; gap: 6px; color: #64726e; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
input, select { min-height: 39px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fbfcfa; outline: 0; font-size: 12px; text-transform: none; letter-spacing: 0; }
input:focus, select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(15,106,85,.09); }
button.refresh, .filter-bar button, button.quiet, .table-action { min-height: 39px; padding: 0 14px; border: 0; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 900; }
button.refresh, .filter-bar button { color: var(--green); background: var(--lime); }
button.quiet { color: var(--green); background: #edf3f0; }
.filter-bar { margin: -4px 0 22px; padding: 16px; align-items: flex-end; border-radius: 10px; background: #f5f7f3; }
.filter-bar label:first-child { flex: 1; }
.table-shell { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { padding: 11px 13px; color: #75817e; background: #f5f7f4; text-align: left; text-transform: uppercase; letter-spacing: .07em; font-size: 8px; white-space: nowrap; }
td { padding: 13px; border-top: 1px solid #e7eae5; color: #34443f; vertical-align: top; }
tbody tr:hover { background: #fbfcf9; }
.status { display: inline-flex; padding: 5px 8px; border-radius: 100px; color: #596762; background: #edf0ed; text-transform: capitalize; font-size: 9px; font-weight: 900; }
.status.success, .status.done, .status.completed { color: #146947; background: #e1f2e9; }
.status.failed, .status.rejected, .status.missing { color: var(--danger); background: #fae8e5; }
.status.pending, .status.processing { color: #8b6409; background: #fcf1d6; }
.table-action { min-height: 28px; padding: 0 9px; color: white; background: var(--green); }
.empty-row { padding: 40px 20px; color: #88938f; text-align: center; }
.notice { margin-bottom: 16px; padding: 12px 14px; border-radius: 8px; color: var(--danger); background: #fcedea; font-size: 12px; }
.info-banner { margin: 0 0 20px; padding: 14px 16px; border-left: 3px solid var(--green-2); border-radius: 7px; color: #52635d; background: #edf5f1; font-size: 11px; line-height: 1.6; }
.info-banner strong { color: var(--green); }
.info-banner code { padding: 2px 5px; border-radius: 4px; color: var(--green); background: #dcece4; font-size: 10px; }
.ledger-note { margin: 14px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.items-drawer { margin-top: 28px; padding: 24px; border: 1px solid #cfdad4; border-radius: 12px; background: #f8faf7; }
.subheading { margin: 28px 0 10px; color: #465650; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.empty-feature { max-width: 680px; margin: 25px auto; padding: 45px; text-align: center; }
.empty-icon { width: 62px; height: 62px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--lime); font-family: Georgia, serif; font-size: 25px; }
.empty-feature h2 { margin: 5px 0 16px; font-family: Georgia, serif; font-size: 30px; font-weight: 400; }
.empty-feature > p:not(.kicker) { color: var(--muted); font-size: 13px; line-height: 1.7; }
.requirements { margin-top: 26px; padding: 19px; display: grid; gap: 10px; border-radius: 10px; text-align: left; background: #f3f6f2; font-size: 12px; }
.requirements span::before { content: "—"; margin-right: 8px; color: var(--green-2); }
.agent-summary-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.agent-card { padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 8px 25px rgba(27,53,46,.04); }
.agent-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.agent-card h2 { margin: 0 0 4px; font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.agent-card p { margin: 0; color: var(--muted); font-size: 10px; }
.agent-metrics { margin: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.agent-metrics div { padding: 10px; border-radius: 8px; background: #f5f7f3; }
.agent-metrics span { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.agent-metrics strong { display: block; margin-top: 5px; color: var(--green); font-size: 12px; }
.agent-card button { width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; color: var(--green); background: white; cursor: pointer; font-size: 10px; font-weight: 900; }
.agent-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.agent-form label small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.4; }
.active-check { display: flex; align-items: center; gap: 9px; }
.active-check input { min-height: auto; width: 17px; height: 17px; }
.secret-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.agent-save { grid-column: 1 / -1; min-height: 44px; border: 0; border-radius: 8px; color: var(--green); background: var(--lime); cursor: pointer; font-weight: 900; }
.settlement-panel { margin-top: 20px; }
.settlement-form { margin-top: 0; }

/* Branded admin sign-in */
.login-page { min-height: 100vh; color: white; background: var(--green); }
.login-shell { min-height: 100vh; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(440px, .82fr); }
.login-story { min-height: 100vh; padding: clamp(30px, 5vw, 70px); display: flex; flex-direction: column; position: relative; overflow: hidden; background: radial-gradient(circle at 18% 88%, rgba(215,242,119,.11) 0 2px, transparent 3px) 0 0 / 25px 25px, linear-gradient(145deg, #073b32, #052a24); }
.login-story::after { content: ""; position: absolute; width: 390px; height: 390px; right: -260px; bottom: -130px; border: 1px solid rgba(215,242,119,.17); border-radius: 50%; box-shadow: 0 0 0 70px rgba(215,242,119,.025), 0 0 0 140px rgba(215,242,119,.018); }
.login-brand { display: flex; align-items: center; gap: 10px; color: white; text-decoration: none; font-size: 18px; letter-spacing: -.03em; position: relative; z-index: 1; }
.login-brand > span { width: 37px; height: 37px; padding: 4px; display: grid; place-items: center; border-radius: 10px; background: #fffdfa; }
.login-brand > span img { width: 100%; height: 100%; display: block; object-fit: contain; }
.login-brand strong { font-weight: 600; }
.login-copy { margin: auto 0; max-width: 650px; position: relative; z-index: 1; }
.login-eyebrow { margin: 0 0 25px; display: flex; align-items: center; gap: 9px; color: var(--lime); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 900; }
.login-eyebrow span { width: 24px; height: 2px; background: var(--lime); }
.login-copy h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(48px, 5.2vw, 78px); font-weight: 400; line-height: .98; letter-spacing: -.055em; }
.login-copy h1 em { color: var(--lime); font-weight: 400; }
.login-copy > p:last-child { max-width: 530px; margin: 28px 0 0; color: #b9cbc6; font-size: 16px; line-height: 1.7; }
.login-foot { margin: 0; color: #7f9992; font-size: 10px; position: relative; z-index: 1; }
.login-form-side { min-height: 100vh; padding: 35px; display: grid; place-items: center; position: relative; color: var(--ink); background: var(--canvas); }
.login-card { width: min(100%, 430px); padding: clamp(28px, 4vw, 44px); border: 1px solid #e0e4de; border-radius: 16px; background: white; box-shadow: 0 24px 70px rgba(1,30,24,.13); }
.login-card-heading { margin-bottom: 28px; text-align: center; }
.login-lock { width: 58px; height: 58px; margin: 0 auto 16px; padding: 5px; display: grid; place-items: center; border: 1px solid #e2e6de; border-radius: 14px; background: #f8f7f1; }
.login-lock img { width: 100%; height: 100%; display: block; object-fit: contain; }
.login-card-heading p { margin: 0 0 6px; color: var(--green-2); text-transform: uppercase; letter-spacing: .13em; font-size: 9px; font-weight: 900; }
.login-card-heading h2 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 31px; font-weight: 500; letter-spacing: -.03em; }
.login-card-heading > span:last-child { color: var(--muted); font-size: 12px; }
.login-card form { display: grid; gap: 9px; }
.login-card form label { margin-top: 7px; }
.login-card form input { width: 100%; min-height: 49px; padding: 0 14px; font-size: 13px; }
.password-field { position: relative; }
.password-field input { padding-right: 61px !important; }
.password-field button { position: absolute; right: 5px; top: 5px; height: 39px; padding: 0 10px; border: 0; color: var(--green-2); background: transparent; cursor: pointer; font-size: 10px; font-weight: 900; }
.login-submit { min-height: 52px; margin-top: 13px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 9px; color: var(--green); background: var(--lime); cursor: pointer; font-size: 12px; font-weight: 900; }
.login-submit:hover { background: #e2fa8d; }
.login-message { margin-bottom: 17px; padding: 11px 13px; border-radius: 8px; color: var(--danger); background: #fcedea; font-size: 11px; line-height: 1.5; }
.login-security { margin: 13px 0 0; color: #8b9692; text-align: center; font-size: 9px; }
.back-store { position: absolute; bottom: 28px; color: #7d8985; text-decoration: none; font-size: 10px; }
[hidden] { display: none !important; }
@media (max-width: 800px) {
  .sidebar { position: static; width: 100%; padding: 18px; }
  .admin-brand { padding-bottom: 18px; }
  nav { grid-template-columns: repeat(2, 1fr); }
  .sidebar-footer { display: none; }
  main { margin: 0; padding: 24px 14px 50px; }
  .topbar, .panel-heading { align-items: flex-start; }
  .topbar-tools { align-items: flex-end; flex-direction: column; }
  .panel { padding: 18px; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar label, .filter-bar button { width: 100%; }
  .agent-form { grid-template-columns: 1fr; }
  .pricing-head { display: none; }
  .pricing-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 850px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: 330px; padding: 28px; }
  .login-copy { margin: 65px 0 25px; }
  .login-copy h1 { font-size: 48px; }
  .login-copy > p:last-child, .login-foot { display: none; }
  .login-form-side { min-height: 560px; padding: 28px 18px 70px; }
}
@media (max-width: 480px) {
  .topbar .live-state { display: none; }
  .panel-heading { flex-direction: column; }
  .controls { width: 100%; }
  .controls label { flex: 1; }
}
