/* UI-only theme. Palette and spacing reference: original Owner green theme.
   No API, permission, business-state or external integration changes. */
@font-face {
  font-family: Prompt;
  src: url('/fonts/Prompt-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Prompt;
  src: url('/fonts/Prompt-Medium.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Prompt;
  src: url('/fonts/Prompt-SemiBold.ttf') format('truetype');
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}
:root {
  --navy: #111d2d;
  --navy2: #1e3149;
  --gold: #16856a;
  --cream: #eef3f6;
  --paper: #fff;
  --ink: #243244;
  --muted: #526174;
  --line: #d9e1e7;
  --green: #116d56;
  --red: #a32e3b;
  --amber: #785111;
  --radius: 16px;
  font-family: Prompt, 'Leelawadee UI', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}
body { background: var(--cream); }
button, input, textarea, select { font-family: inherit; font-size: 16px; }
button { min-height: 46px; border-radius: 9px; padding: 10px 16px; line-height: 1.5; }
button:hover:not(:disabled) { border-color: #8bc8b7; background: #edf8f4; }
button.primary, button.gold { background: var(--green); border-color: var(--green); color: #fff; }
button.primary:hover:not(:disabled), button.gold:hover:not(:disabled) { background: #0d5946; border-color: #0d5946; }
button.danger { color: var(--red); background: #fff5f5; border-color: #e3b3bc; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid #1876a1; outline-offset: 3px; }
button:disabled { opacity: .65; }
h1 { font-size: 28px; line-height: 1.45; font-weight: 600; }
h2 { font-size: 21px; line-height: 1.5; font-weight: 600; }
h3 { font-size: 18px; line-height: 1.6; font-weight: 600; }
p { line-height: 1.75; }
small { font-size: 14px; }
strong, b { font-weight: 600; }
code, pre { font-size: 14px; line-height: 1.7; }
a { color: #116d56; text-underline-offset: 3px; }
.shell { grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { background: linear-gradient(180deg, #111d2d, #0b1421); padding: 24px 14px; border-right: 0; box-shadow: 4px 0 24px #0f172a12; }
.brand { gap: 12px; padding: 0 8px 28px; }
.brandmark { width: 44px; height: 44px; border: 1px solid #568477; background: #123b32; color: #fff; border-radius: 9px; font-size: 18px; }
.brand strong { font-size: 16px; color: #fff; }
.brand small { font-size: 13px; color: #c9d4e4; margin-top: 2px; }
.nav { gap: 5px; }
.nav button { color: #e0e7ef; padding: 12px; font-size: 16px; font-weight: 400; gap: 10px; min-height: 48px; }
.nav button.active { background: #16856a; border-color: #16856a; color: #fff; box-shadow: none; font-weight: 500; }
.nav button:hover { background: #1e3149; color: #fff; border-color: transparent; }
.nav button.active:hover { background: #116d56; }
.navicon { color: inherit; width: 23px; font-size: 21px; }
.nav-count { margin-left: auto; font-size: 14px; color: #123b32; background: #e5f4ed; border-radius: 6px; }
.sidefoot { padding: 20px 9px 0; }
.sidefoot p { font-size: 14px; color: #d5deea; }
.sidefoot .badge { padding: 7px 9px; }
.topbar { min-height: 92px; padding: 20px 28px; gap: 16px; }
.topbar-left strong { font-size: 20px; color: #123b32; font-weight: 600; }
.topbar small { font-size: 14px; }
.topbar-actions { gap: 8px; }
.scope-label { padding: 9px 28px; font-size: 14px; color: #526174; background: #f8fafb; }
.main { padding: 24px 28px 40px; max-width: 1650px; }
.pagehead { margin-bottom: 20px; }
.pagehead p { font-size: 16px; color: #526174; }
.eyebrow { color: #116d56; font-size: 14px; letter-spacing: .8px; }
.badge { font-size: 14px; line-height: 1.55; padding: 4px 9px; font-weight: 500; }
.badge.green { color: #116044; background: #eaf7f0; border-color: #b6dccc; }
.badge.amber { color: #785111; background: #fff6df; border-color: #e1cd96; }
.badge.blue { color: #17638a; background: #e8f3f8; border-color: #a7d2e3; }
.badge.gray { color: #526174; background: #f1f4f6; border-color: #cbd5df; }
.badge.red { color: #a32e3b; border-color: #e3b3bc; }
.grid { gap: 16px; }
.card { padding: 20px; box-shadow: 0 2px 14px #1f37480a; border-color: #d9e1e7; }
.card + .card { margin-top: 16px; }
.stat { border-top: 3px solid #16856a; }
.stat strong { font-size: 32px; }
.stat small, .metric-caption { font-size: 14px; }
.worker-role { font-size: 14px; }
.worker dl { font-size: 15px; grid-template-columns: 90px minmax(0, 1fr); }
.avatar { border-radius: 12px; background: #eaf7f0; color: #116d56; }
.worker .avatar { background: #edf8f4; border-color: #a9d7ca; }
.banner { padding: 12px 16px; font-size: 15px; background: #fff8e7; border-color: #e1cd96; color: #644813; }
.banner.info { background: #e8f3f8; border-color: #a7d2e3; color: #195d7e; }
.notice { font-size: 16px; }
.notice button { min-width: 44px; min-height: 44px; }
.empty { font-size: 16px; }
.field span { font-size: 15px; color: #34465a; font-weight: 500; }
input, select, textarea { min-height: 46px; border-color: #bac8d3; background: #f8fafb; padding: 11px 12px; }
input::placeholder, textarea::placeholder { color: #637083; opacity: 1; }
textarea { line-height: 1.75; min-height: 106px; }
.form { gap: 16px; }
.formcols { gap: 14px; }
.form-note, .check, .login-foot { font-size: 14px; line-height: 1.7; }
.check input { width: 20px; height: 20px; min-height: 20px; flex: none; accent-color: #116d56; }
details { padding: 14px 16px; }
summary { font-size: 16px; min-height: 30px; }
.inbox { grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
.case-list { border-radius: 16px; }
.case-list-head { padding: 16px; }
.case-item { padding: 16px; line-height: 1.65; }
.case-item.active { background: #eaf7f0; box-shadow: inset 3px 0 #16856a; }
.case-item p { font-size: 15px; color: #526174; margin: 10px 0; white-space: normal; }
.case-item strong { font-size: 16px; }
.case-item small { font-size: 14px; }
.case-header { padding-bottom: 18px; }
.case-header > .muted { font-size: 15px; margin-top: 10px; }
.chat { min-height: 200px; max-height: 520px; gap: 18px; padding: 22px 0; scrollbar-color: #7bb8aa #e8eef1; }
.bubble { background: #243246; color: #fff; padding: 14px 18px; border-radius: 6px 16px 16px 16px; }
.bubble p { font-size: 17px; line-height: 1.85; }
.bubble small { color: #d6e2ec; font-size: 14px; }
.bubble.sent { background: #eaf7f0; color: #183f34; border: 1px solid #b6dccc; }
.bubble.sent small { color: #48645b; }
.attachment { font-size: 14px; min-height: 44px; color: #116d56; padding: 8px 12px; }
.record p { font-size: 16px; }
.actions { gap: 8px; }
.actions button { font-size: 14px; min-height: 44px; padding: 9px 12px; }
table { font-size: 15px; }
th { font-size: 14px; color: #465769; background: #f5f8fa; }
th, td { padding: 13px 12px; }
.timeline li { font-size: 15px; border-color: #a9d7ca; }
.timeline small { font-size: 14px; }
.document { font-size: 16px; }
.footer { font-size: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
.linkbutton { min-height: 44px; font-size: 15px; }
.crm-figures { gap: 12px; margin: 16px 0; }
.crm-figures > div { padding: 12px; background: #f1f7f4; border: 1px solid #e0ece5; }
.crm-figures p { font-size: 14px; color: #52665b; }
.crm-figures strong { font-size: 16px; }
.crm-links { gap: 12px; margin-bottom: 12px; }
.error-code { font-size: 14px; }
.login { background: #123b32; }
.login-hero { padding: 64px; }
.login-hero h1 { font-size: 38px; color: #fff; }
.login-hero p { color: #d2e8e0; font-size: 18px; }
.login-card-area { background: #eef3f6; }
.login-card { max-width: 460px; }
@media (max-width: 1200px) {
  .inbox { grid-template-columns: 250px minmax(0, 1fr); }
  .main { padding: 22px; }
  .topbar { padding: 18px 22px; flex-wrap: wrap; }
  .scope-label { padding: 9px 22px; }
}
@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar { padding: 16px 18px 0; background: #fff; border: 0; box-shadow: none; }
  .brand { padding: 0 0 16px; }
  .brand strong { color: #123b32; font-size: 18px; }
  .brand small { color: #526174; font-size: 14px; }
  .nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid #d9e1e7; scrollbar-width: thin; scrollbar-color: #7bb8aa #e8eef1; }
  .nav button { color: #34465a; padding: 10px 14px; font-size: 16px; flex: none; min-height: 46px; }
  .nav button:hover { background: #edf8f4; color: #123b32; }
  .nav button.active:hover { color: #fff; }
  .sidefoot { display: none; }
  .topbar { padding: 14px 18px; gap: 12px; min-height: 0; }
  .topbar-left strong { font-size: 18px; }
  .topbar-actions { justify-content: flex-start; }
  .topbar-actions button { font-size: 14px; min-height: 44px; }
  .scope-label { padding: 10px 18px; font-size: 14px; }
  .main { padding: 20px 18px 32px; }
  .inbox { grid-template-columns: 1fr; }
  .case-list { max-height: 320px; }
  .card { padding: 18px; }
  .pagehead h1 { font-size: 25px; }
  .login-hero { padding: 32px; }
  .login-hero h1 { font-size: 29px; }
  .login-hero p { font-size: 16px; }
}
@media (max-width: 520px) {
  .sidebar { padding: 14px 14px 0; }
  .brand strong { font-size: 17px; }
  .topbar { padding: 12px 14px; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .topbar-actions .badge { max-width: none; }
  .scope-label { padding: 10px 14px; }
  .main { padding: 18px 12px 30px; }
  .pagehead h1 { font-size: 24px; }
  .pagehead p { font-size: 15px; }
  .card { padding: 16px; border-radius: 16px; }
  .banner { padding: 12px 14px; }
  .grid.four { gap: 12px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 28px; }
  .case-header .row.space { align-items: flex-start; }
  .crm-figures { grid-template-columns: 1fr; gap: 8px; }
  .bubble { max-width: 100%; padding: 14px; }
  .bubble p { font-size: 17px; }
  .actions button { flex: 1 1 140px; }
  .chat { min-height: 180px; }
  .form-foot { flex-wrap: wrap; }
  .toolbar input { min-width: 0; }
  .split > * { min-width: 0; }
  .row > *, .topbar > * { min-width: 0; overflow-wrap: anywhere; }
}
