:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --text: #16211c;
  --text-muted: rgba(22, 33, 28, 0.62);
  --border: rgba(0, 0, 0, 0.1);
  --accent: #0a7a4f;
  --accent-strong: #075c3b;
  --accent-fg: #ffffff;
  --accent-soft: #e6f3ec;
  --highlight: #f6c445;
  --danger: #c8102e;
  --danger-soft: #fbe9ec;
  --warn: #9a6400;
  --warn-soft: #fff4d6;
  --whatsapp: #1fa855;
  --primary-action: var(--accent);
  --primary-action-fg: var(--accent-fg);
  --radius: 8px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--text-muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Layout */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { padding: 6px 10px; border-radius: 6px; color: var(--text); font-weight: 500; }
.nav a:hover, .nav a.active { background: var(--accent-soft); color: var(--accent-strong); text-decoration: none; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.lang-switch button { border: 0; background: transparent; padding: 4px 9px; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; color: var(--text-muted); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
.container { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
.narrow { max-width: 560px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat .value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--text-muted); font-size: 0.85rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.footer { border-top: 1px solid var(--border); padding: 20px 16px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 38px; }
.btn:hover { text-decoration: none; border-color: rgba(0, 0, 0, 0.25); }
.btn-primary { background: var(--primary-action); border-color: var(--primary-action); color: var(--primary-action-fg); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-whatsapp { background: var(--whatsapp); border-color: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { filter: brightness(0.93); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: 0.85rem; }
.btn-lg { padding: 12px 22px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.inline { display: inline; }
.wa-icon { width: 16px; height: 16px; fill: currentColor; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--accent-soft); color: var(--accent-strong); }
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--danger-soft); color: var(--danger); }
.badge-open { background: #eef0f3; color: #3b4652; }
.badge-neutral { background: #eef0f3; color: #3b4652; }

/* Forms */
form p { margin: 0 0 14px; }
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=datetime-local], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 6px; font: inherit; background: #fff; color: var(--text); min-height: 40px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type=checkbox] { width: 18px; height: 18px; vertical-align: middle; margin-right: 6px; }
.checkbox-label { display: flex; align-items: center; font-weight: 500; }
.helptext, .form-help { display: block; color: var(--text-muted); font-size: 0.82rem; margin-top: 3px; font-weight: 400; }
.errorlist { list-style: none; padding: 0; margin: 4px 0; color: var(--danger); font-size: 0.85rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filters > * { flex: 0 1 auto; }
.filters input, .filters select { width: auto; min-width: 140px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }

/* Messages */
.messages { list-style: none; padding: 0; margin: 0 0 18px; }
.messages li { padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; border: 1px solid var(--border); background: var(--surface); }
.messages .success { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); }
.messages .error { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.messages .warning { background: var(--warn-soft); border-color: transparent; color: var(--warn); }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.game-line { font-weight: 600; }
.meta { color: var(--text-muted); font-size: 0.85rem; }
.conflicts { margin: 4px 0 0; padding-left: 18px; color: var(--danger); font-size: 0.85rem; }
.empty { color: var(--text-muted); padding: 20px 0; text-align: center; }
.code-box { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; letter-spacing: 0.12em; background: var(--accent-soft); color: var(--accent-strong); padding: 8px 14px; border-radius: 6px; display: inline-block; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; align-items: center; }
details summary { cursor: pointer; font-weight: 600; }

/* Landing */
.hero { background: var(--accent-strong); color: #fff; }
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 64px 16px 72px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; margin-bottom: 16px; }
.hero p.lead { font-size: 1.15rem; color: rgba(255, 255, 255, 0.86); max-width: 560px; }
.hero .btn { border-color: transparent; }
.hero .btn-light { background: #fff; color: var(--accent-strong); }
.hero .btn-yellow { background: var(--highlight); color: #2b2100; }
.hero-flag { display: flex; height: 6px; }
.hero-flag span { flex: 1; }
.phone-mock { background: #e9e2d6; border-radius: 22px; padding: 16px; max-width: 360px; margin-left: auto; border: 8px solid #0d1f17; }
.bubble { background: #fff; color: #111; border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; line-height: 1.45; white-space: pre-line; margin-bottom: 10px; max-width: 92%; }
.bubble.me { background: #d9fdd3; margin-left: auto; width: fit-content; }
.section { max-width: 1200px; margin: 0 auto; padding: 56px 16px; }
.section h2 { font-size: 1.7rem; margin-bottom: 8px; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feature { padding: 4px 0; }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature .icon { width: 40px; height: 40px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 10px; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.steps li::before { content: counter(step); display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--highlight); color: #2b2100; font-weight: 800; align-items: center; justify-content: center; margin-bottom: 8px; }
.cta-band { background: var(--text); color: #fff; text-align: center; }
.cta-band .section { padding: 48px 16px; }

/* Respond page */
.respond-card { max-width: 480px; margin: 24px auto; }
.respond-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; padding: 40px 16px 48px; }
  .phone-mock { margin: 0 auto; }
  .topbar-inner { gap: 8px 12px; }
  .nav { order: 3; flex: 1 0 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .nav a { white-space: nowrap; }
  .hide-sm { display: none; }
  .container { padding-top: 16px; }
}

/* Football redesign */
.ico { width: 28px; height: 28px; flex: none; color: var(--accent-strong); }
.hero-pitch { position: relative; overflow: hidden; background: #075c3b; }
.hero-pitch > .pitch-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; --pitch: transparent; }
.hero-pitch .hero-inner { position: relative; padding: 80px 16px 88px; }
.hero-pitch h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.hero-badges { display: flex; gap: 10px; margin-bottom: 18px; }
.hero-badges .ico { width: 44px; height: 44px; color: #fff; background: rgba(255,255,255,.12); border-radius: 50%; padding: 8px; }
.btn-yellow { background: var(--highlight); color: #2b2100; border-color: var(--highlight); }
.btn-yellow:hover { filter: brightness(.95); }
.hero-card { background: #efe7da; border-radius: 18px; padding: 14px; max-width: 340px; margin-left: auto; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.hero-card-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #0d1f17; margin-bottom: 10px; }
.hero-card-head .ico { width: 22px; height: 22px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 12px; font-weight: 700; }
.tile .ico { width: 44px; height: 44px; }
.pitch-section { text-align: center; }
.pitch { position: relative; aspect-ratio: 105 / 68; width: 100%; border-radius: 10px; overflow: visible; margin: 28px auto 24px; }
.pitch > .pitch-svg { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 10px; }
.pitch-demo { max-width: 860px; }
.pitch-chip { position: absolute; transform: translate(-50%, -50%); background: #fff; border-radius: 999px; padding: 5px 12px 5px 8px; display: flex; align-items: center; gap: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.25); border: 3px solid #cfd6d2; max-width: 46%; white-space: nowrap; font-size: .82rem; }
.pitch-chip .ico { width: 20px; height: 20px; }
.pitch-chip .pitch-role { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.pitch-chip .pitch-name { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.pitch-accepted { border-color: #1fa855; }
.pitch-pending { border-color: var(--highlight); }
.pitch-declined { border-color: var(--danger); }
.pitch-open { border-color: #cfd6d2; border-style: dashed; }
.pitch-crew-wrap { margin: 18px 0 8px; padding: 0 4px; }
.pitch-crew-wrap .pitch { margin: 22px auto; max-width: 760px; }
.pitch-crew-wrap .pitch-chip { flex-direction: column; align-items: flex-start; gap: 0; border-radius: 10px; padding: 4px 10px; line-height: 1.25; }
.steps-icons li { display: flex; align-items: center; gap: 12px; }
.steps-icons li::before { margin-bottom: 0; flex: none; }
.steps-icons .ico { width: 32px; height: 32px; }
@media (max-width: 800px) {
  .hero-card { margin: 0 auto; }
  .pitch-chip { font-size: .68rem; padding: 3px 8px 3px 5px; border-width: 2px; }
  .pitch-chip .ico { display: none; }
  .pitch-crew-wrap .pitch-chip .pitch-name { display: none; }
}

/* Assignor layout: left menu + games in the middle */
.topbar-inner.wide { max-width: none; }
.sidebar-toggle { display: none; font-size: 1.1rem; }
.app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 56px); }
.sidebar { background: #0d1f17; color: #dfe9e3; padding: 10px 0 24px; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; }
.sidebar a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 18px; color: #dfe9e3; font-size: .9rem; border-bottom: 1px solid rgba(255,255,255,.05); }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.09); color: #fff; text-decoration: none; }
.sidebar a.active { box-shadow: inset 4px 0 0 var(--highlight); font-weight: 600; }
.side-head { display: flex; align-items: center; gap: 8px; padding: 16px 18px 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(223,233,227,.65); font-weight: 700; }
.side-head .ico { width: 18px; height: 18px; color: var(--highlight); }
.count { min-width: 24px; padding: 0 7px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: .75rem; font-weight: 700; text-align: center; color: #fff; }
.count-bad { background: var(--danger); }
.count-pending { background: var(--highlight); color: #2b2100; }
.count-ok { background: #1fa855; }
.app-main { padding: 22px 24px 48px; min-width: 0; }
.app-main.narrow { max-width: 600px; }
.title-ico { display: flex; align-items: center; gap: 10px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 14px; margin-bottom: 12px; }
.toolbar-search { display: flex; gap: 6px; margin-left: auto; }
.toolbar-search input { min-height: 32px; padding: 4px 10px; width: 220px; }
.filter-panel { padding: 10px 14px; margin-bottom: 12px; }
.filter-panel summary { cursor: pointer; font-weight: 700; }
.filter-panel .filters { margin: 12px 0 0; }
.crew-legend { margin: 4px 0 10px; font-size: .85rem; }
.game-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; background: var(--surface); border: 1px solid var(--border); border-left: 6px solid #cfd6d2; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.game-card.pub-cancelled { border-left-color: var(--danger); background: #fdf1f1; }
.game-card.pub-draft { border-left-color: #9aa3a0; background: #f3f4f4; }
.game-card.pub-live { border-left-color: #1fa855; }
.game-info { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.game-when { font-size: 1.15rem; font-weight: 700; }
.game-venue { font-weight: 600; color: var(--text-muted); }
.game-teams { font-weight: 700; color: var(--text); font-size: 1rem; }
.crew-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; margin-bottom: 6px; }
.crew-row select { min-height: 34px; padding: 5px 8px; font-size: .88rem; }
.crew-row select.changed { border-color: var(--accent); background: var(--accent-soft); }
.crew-pos { margin: 0; font-size: .82rem; }
.crew-status { display: flex; gap: 4px; align-items: center; }
.crew-status .btn { min-height: 26px; padding: 2px 6px; }
.crew-warn { grid-column: 2 / -1; color: var(--danger); font-size: .78rem; }
.crew-warn:empty { display: none; }
.crew-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.crew-actions .checkbox-label { margin: 0; font-size: .85rem; }
@media (max-width: 900px) {
  .sidebar-toggle { display: inline-flex; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  body.sidebar-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .app-main { padding: 16px 12px 40px; }
  .game-card { grid-template-columns: 1fr; }
  .crew-row { grid-template-columns: minmax(0, 1fr); }
  .crew-status:empty { display: none; }
  .crew-warn { grid-column: 1 / -1; }
  .toolbar-search { margin-left: 0; width: 100%; }
  .toolbar-search input { flex: 1; width: auto; min-width: 0; }
}

/* Scores and standings */
.score { display: inline-block; min-width: 56px; padding: 1px 8px; border-radius: 6px; background: #0d1f17; color: #fff; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.score-big { font-size: 1.5rem; padding: 4px 14px; }
.score-card .score-line { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; font-weight: 700; }
.score-card .score-line span:first-child { text-align: right; }
.center { text-align: center; justify-content: center; }
.score-grid { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 70px); gap: 6px 8px; align-items: center; margin-bottom: 10px; }
.score-grid input { min-height: 36px; padding: 4px 6px; text-align: center; }
.standings { margin-bottom: 14px; overflow: hidden; }
.standings-title { margin: 0; padding: 10px 14px; background: var(--accent); color: #fff; font-size: 1rem; }
.standings td, .standings th { padding: 6px 8px; }
.form-dot { display: inline-block; width: 20px; height: 20px; line-height: 20px; margin-right: 2px; border-radius: 50%; font-size: .68rem; font-weight: 700; text-align: center; color: #fff; }
.form-W { background: #1fa855; } .form-D { background: #8a948f; } .form-L { background: var(--danger); }
.fixture { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); }
.fixture .right { text-align: right; }
.fx-team { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-venue { grid-column: 2 / -1; text-align: center; }
.input-xs { width: 80px; min-height: 30px; padding: 3px 6px; }
.badge-draft { background: #e3e6e5; color: #4d5652; }
.count-draft { background: #8d9692; }
.btn-publish { background: #1fa855; border-color: #1fa855; color: #fff; }
.legend { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: -1px; }
.legend-draft { background: #9aa3a0; }
.legend-live { background: #1fa855; }
.legend-cancelled { background: var(--danger); }
.score-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.score-row:last-child { border-bottom: 0; }
.score-row .teams { flex: 1 1 260px; }
.score-row input[type=number] { width: 4.2em; text-align: center; }

/* Ndamba assistant */
.ndamba { position: fixed; right: 16px; bottom: 16px; z-index: 30; }
.ndamba-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 16px 10px 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(7, 92, 59, 0.35); }
.ndamba-toggle .ico { width: 26px; height: 26px; color: var(--accent-strong); }
.ndamba-toggle:hover { background: var(--accent-strong); }
.ndamba.open .ndamba-toggle { display: none; }
.ndamba-panel { width: 370px; max-width: calc(100vw - 32px); height: min(560px, calc(100vh - 100px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); overflow: hidden; }
.ndamba-panel[hidden] { display: none; }
.ndamba-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(135deg, var(--accent-strong), var(--accent)); color: #fff; }
.ndamba-head .muted { color: rgba(255, 255, 255, 0.8); font-size: 0.8rem; }
.ndamba-head > div { flex: 1; line-height: 1.2; }
.ndamba-head .btn { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.ndamba-avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--accent-strong); }
.ndamba-avatar .ico { width: 28px; height: 28px; }
.ndamba-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.ndamba-msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; font-size: 0.92rem; }
.ndamba-msg p { margin: 0; white-space: pre-line; }
.ndamba-msg .btn { margin: 6px 6px 0 0; }
.ndamba-msg.from-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.ndamba-msg.from-user { align-self: flex-end; background: var(--accent-soft); color: var(--accent-strong); border-bottom-right-radius: 4px; }
.ndamba-msg.typing { color: var(--text-muted); }
.ndamba-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 0; }
.ndamba-chip { flex: none; border: 1px solid var(--accent); color: var(--accent-strong); background: var(--surface); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 0.8rem; cursor: pointer; }
.ndamba-chip:hover { background: var(--accent-soft); }
.ndamba-form { display: flex; gap: 6px; padding: 8px 12px; }
.ndamba-form input { flex: 1; min-height: 36px; }
.ndamba-note { margin: 0; padding: 0 12px 8px; font-size: 0.72rem; color: var(--text-muted); }
@media (max-width: 600px) {
  .ndamba { right: 10px; bottom: 10px; }
  .ndamba-panel { height: calc(100vh - 80px); }
}
