/* WA Confirm admin panel */
:root {
  --green: #00a884;
  --green-dark: #075e54;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #111b21;
  --muted: #667781;
  --border: #e2e8f0;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 12px; }
h3 { font-size: 13px; margin: 16px 0 8px; }
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
code { background: #eef2f5; padding: 2px 6px; border-radius: 5px; font-size: 12px; word-break: break-all; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.error-text { color: #c0392b; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; background: var(--green-dark); color: #cfe9e3;
  display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh;
}
.brand { font-size: 17px; font-weight: 700; color: #fff; margin: 0 8px 20px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a, .sidebar .store-link {
  color: #cfe9e3; padding: 8px 10px; border-radius: 8px; display: block; font-weight: 500;
}
.sidebar nav a:hover, .store-link:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.sidebar nav a.active { background: var(--green); color: #fff; }
.sidebar-stores { margin-top: 22px; overflow-y: auto; }
.sidebar-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .7; margin: 0 10px 6px; }
.store-link { font-size: 13px; display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: #3ddc97; }
.dot-amber { background: #f5b942; }
.sidebar-bottom { margin-top: auto; padding: 10px; font-size: 12px; }
.whoami { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .75; margin-bottom: 4px; }
.sidebar-bottom a { color: #cfe9e3; }
.content { flex: 1; padding: 24px 28px; max-width: 1200px; }

/* Cards & tables */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px;
}
.table-wrap { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfc; }
tr:last-child td { border-bottom: none; }
td .empty, .empty { text-align: center; color: var(--muted); padding: 32px; }

/* Page head & filters */
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.sync-orders-form { margin-left: auto; }
.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filters input[type="search"] { min-width: 240px; }

/* Forms */
input, select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
  background: #fff; color: var(--text); width: 100%;
}
textarea { resize: vertical; white-space: pre-wrap; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 2px; }
label input, label select { margin-top: 4px; font-weight: 400; }
.stack { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.row > button { flex: 0; white-space: nowrap; }
.row-inline { display: inline-flex; gap: 6px; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline-block; margin-top: 10px; }
.filters select, .filters input { width: auto; }

/* Buttons */
.btn {
  display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid #cbd5e1;
  background: #fff; color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer;
}
.btn:hover { background: #f5f7f9; text-decoration: none; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: #029377; }
.btn-small { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* Badges & chips */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}
.badge-lg { font-size: 13px; padding: 4px 12px; }
.badge-green  { background: #d9f2e5; color: #0f7a4d; }
.badge-red    { background: #fde3e1; color: #b3261e; }
.badge-amber  { background: #fcf0d3; color: #93610a; }
.badge-blue   { background: #dcebfc; color: #1a5fb4; }
.badge-indigo { background: #e5e2fc; color: #4a3fb5; }
.badge-gray   { background: #e9edf0; color: #55606a; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 4px 12px; border-radius: 999px; background: #e9edf0; color: #55606a;
  font-size: 12px; font-weight: 600;
}
.chip-ok { background: #d9f2e5; color: #0f7a4d; }

/* Flash */
.flash {
  padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500;
  background: #d9f2e5; color: #0f7a4d; border: 1px solid #b1e3cb;
}
.flash-err { background: #fde3e1; color: #b3261e; border-color: #f6c1bd; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 8px 16px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab:hover { text-decoration: none; color: var(--text); }
.tab.active { color: var(--green-dark); border-bottom-color: var(--green); }

/* Details list */
.details { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.details dt { color: var(--muted); font-size: 12.5px; }
.details dd { margin: 0; }

/* Chat log */
.chat { display: flex; flex-direction: column; gap: 8px; background: #e5ddd5; padding: 14px; border-radius: 8px; }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.bubble-out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 2px; }
.bubble-in  { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.bubble-body { white-space: pre-wrap; word-break: break-word; }
.bubble-meta { font-size: 10.5px; color: var(--muted); margin-top: 4px; text-align: right; }

/* Stats & charts */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { text-align: center; padding: 14px 8px; margin-bottom: 0; }
.stat-num { font-size: 24px; font-weight: 700; }
.stat-num.green { color: #0f7a4d; } .stat-num.red { color: #b3261e; }
.stat-num.blue { color: #1a5fb4; } .stat-num.amber { color: #93610a; }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .grid-2 { grid-template-columns: 1fr; } .sidebar { width: 180px; } }
.bars { display: flex; align-items: stretch; gap: 2px; height: 175px; padding: 0 18px 0 2px; }
.bar-col { flex: 1; display: flex; flex-direction: column; min-width: 3px; }
/* every column gets the same fixed-height label row so all bars share one baseline */
.bar { flex: 1; display: flex; align-items: flex-end; border-bottom: 1px solid var(--border); }
.bar-fill { width: 100%; background: #cbd5e1; border-radius: 3px 3px 0 0; display: flex; align-items: flex-end; overflow: hidden; }
.bar-part-green { width: 100%; background: var(--green); }
.bar-label { height: 15px; flex-shrink: 0; font-size: 9.5px; color: var(--muted); white-space: nowrap; margin-top: 3px; }
.hbar { background: #eef2f5; border-radius: 999px; height: 10px; overflow: hidden; }
.hbar-fill { height: 100%; background: #e0716a; border-radius: 999px; }

/* Misc */
.orders-range { margin: 0 0 9px 2px; }
.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pagination a { padding: 5px 11px; border-radius: 7px; border: 1px solid var(--border); background: #fff; }
.pagination a.active { background: var(--green); border-color: var(--green); color: #fff; }
.pagination-gap { padding: 0 3px; color: var(--muted); }
.help-steps { padding-left: 20px; margin: 8px 0 16px; }
.help-steps li { margin-bottom: 6px; }
.callout { background: #eef7f4; border: 1px solid #bfe3d9; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chip { cursor: pointer; }
.var-chip:hover { background: #d9f2e5; }
.copyable { cursor: pointer; }
.resend-form { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--border); }

/* WhatsApp-style shared inbox */
.content-inbox {
  padding: 0; max-width: none; height: 100vh; min-width: 0; overflow: hidden;
}
.content-inbox > .flash {
  position: fixed; z-index: 1200; top: 16px; left: 50%; transform: translateX(-35%);
  box-shadow: 0 12px 35px rgba(17, 27, 33, .18);
}
.wa-inbox-shell {
  display: grid; grid-template-columns: minmax(250px, 290px) minmax(390px, 1fr) minmax(280px, 330px);
  width: 100%; height: 100%; min-width: 0; background: #fff; overflow: hidden;
}
.wa-eyebrow {
  display: block; color: var(--green); font-size: 10px; font-weight: 800;
  letter-spacing: .085em; line-height: 1.1; text-transform: uppercase; margin-bottom: 3px;
}

/* Left: customer/chat list */
.wa-people-panel {
  display: flex; flex-direction: column; min-width: 0; height: 100%;
  background: #fff; border-right: 1px solid #d9dee2; overflow: hidden;
}
.wa-list-header {
  min-height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px; background: #f7f9fa; border-bottom: 1px solid #e4e8eb;
}
.wa-list-header h1 { font-size: 21px; line-height: 1.1; }
.wa-chat-count {
  display: grid; place-items: center; min-width: 29px; height: 29px; padding: 0 8px;
  border-radius: 999px; background: #d9fdd3; color: #08775f; font-size: 12px; font-weight: 800;
}
.wa-list-filters { padding: 10px 11px; background: #fff; border-bottom: 1px solid #edf0f2; }
.wa-filter-row { display: flex; gap: 7px; margin-bottom: 8px; }
.wa-filter-row select {
  min-width: 0; height: 32px; padding: 4px 8px; border-color: #dce2e6;
  background: #f5f7f8; font-size: 12px;
}
.wa-search-box {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  height: 36px; padding-left: 10px; border-radius: 9px; background: #f0f2f5; color: var(--muted);
}
.wa-search-box input {
  height: 36px; min-width: 0; padding: 6px 8px; border: 0; outline: 0; background: transparent;
  font-size: 12.5px;
}
.wa-search-box input:focus { outline: 0; border: 0; }
.wa-search-submit {
  height: 28px; margin-right: 4px; padding: 0 8px; border: 0; border-radius: 6px;
  background: #fff; color: var(--green-dark); font-size: 11px; font-weight: 700; cursor: pointer;
}
.wa-user-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.wa-user-row {
  position: relative; display: flex; gap: 11px; align-items: center; min-width: 0;
  min-height: 82px; padding: 10px 11px; color: var(--text); border-bottom: 1px solid #edf0f2;
}
.wa-user-row:hover { background: #f5f7f8; text-decoration: none; }
.wa-user-row.is-active { background: #e9edef; }
.wa-user-row.is-active::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--green);
}
.conversation-avatar {
  width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center;
  border-radius: 50%; background: linear-gradient(145deg, #0b7569, #00a884); color: #fff;
  font-weight: 750; font-size: 17px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
}
.wa-user-summary { flex: 1; min-width: 0; }
.wa-user-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wa-user-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.wa-user-title time { flex: 0 0 auto; color: #8a969e; font-size: 10.5px; }
.wa-message-preview {
  height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 11.5px;
}
.wa-preview-tick, .wa-message-state { color: #53bdeb; font-weight: 800; }
.wa-message-kind { color: #08775f; font-weight: 700; }
.wa-user-footer { display: flex; align-items: center; gap: 6px; overflow: hidden; color: #89959c; font-size: 10px; }
.wa-user-footer > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-owner-label {
  max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 1px 6px; border-radius: 999px; background: #e6f5f1; color: #08775f; font-weight: 700;
}
.wa-owner-label.is-unassigned { background: #fff2cf; color: #875a04; }
.unread-count {
  display: grid; place-items: center; flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 20px; background: #25d366; color: #fff; font-size: 10.5px; font-weight: 800;
}
.wa-list-empty {
  min-height: 260px; display: grid; place-content: center; justify-items: center; padding: 24px;
  color: var(--muted); text-align: center;
}
.wa-list-empty > span { font-size: 32px; filter: grayscale(.25); }
.wa-list-empty b { color: var(--text); margin-top: 6px; }
.wa-list-empty p { margin: 2px 0 0; font-size: 12px; }

/* Middle: live conversation */
.wa-chat-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; background: #efeae2; }
.wa-chat-header {
  z-index: 2; min-height: 72px; display: flex; align-items: center; gap: 11px; padding: 10px 15px;
  background: #f7f9fa; border-bottom: 1px solid #d9dee2;
}
.wa-chat-avatar { width: 42px; height: 42px; flex-basis: 42px; }
.wa-chat-person { min-width: 0; flex: 1; }
.wa-chat-person h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.wa-chat-person > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11.5px; }
.wa-online-dot { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #25d366; }
.wa-chat-header-actions { display: flex; align-items: center; gap: 7px; }
.wa-icon-button, .wa-panel-close {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0;
  border-radius: 50%; background: transparent; color: #536168; font-size: 20px; cursor: pointer;
}
.wa-icon-button:hover, .wa-panel-close:hover { background: #e5e9ec; }
.wa-icon-button { display: none; }
.wa-mobile-back { display: none; color: var(--text); font-size: 30px; line-height: 1; }
.wa-chat-log {
  position: relative; flex: 1; min-height: 0; overflow-y: auto; gap: 7px; padding: 18px clamp(14px, 4vw, 58px);
  border-radius: 0; background-color: #efeae2;
  background-image: radial-gradient(rgba(92, 74, 62, .045) 1px, transparent 1px);
  background-size: 17px 17px; overscroll-behavior: contain;
}
.wa-day-marker { align-self: center; margin: 1px 0 7px; }
.wa-day-marker span {
  display: inline-block; padding: 5px 10px; border-radius: 7px; background: #fff;
  color: #667781; box-shadow: 0 1px 1px rgba(17,27,33,.08); font-size: 10.5px; text-transform: uppercase;
}
.bubble {
  position: relative; max-width: min(82%, 620px); padding: 7px 10px 5px; border-radius: 8px;
  font-size: 12.8px; box-shadow: 0 1px 1px rgba(11,20,26,.12);
}
.bubble-out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 1px; }
.bubble-in { align-self: flex-start; background: #fff; border-top-left-radius: 1px; }
.bubble-out::after, .bubble-in::after {
  content: ""; position: absolute; top: 0; width: 0; height: 0; border-style: solid;
}
.bubble-out::after { right: -7px; border-width: 0 8px 9px 0; border-color: transparent #d9fdd3 transparent transparent; }
.bubble-in::after { left: -7px; border-width: 0 0 9px 8px; border-color: transparent transparent transparent #fff; }
.bubble-body { white-space: pre-wrap; word-break: break-word; }
.wa-bubble-sender { margin-bottom: 2px; color: #08775f; font-size: 10.5px; font-weight: 800; }
.bubble-meta { min-height: 14px; margin-top: 2px; color: #718087; font-size: 9.5px; text-align: right; }
.wa-composer-area { padding: 8px 11px 7px; background: #f0f2f5; border-top: 1px solid #d9dee2; }
.chat-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 0; }
.wa-composer-input {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center;
  min-height: 42px; padding: 4px 12px; background: #fff; border-radius: 11px;
}
.wa-composer-input > span { filter: grayscale(.6); font-size: 15px; }
.wa-composer-input textarea {
  min-height: 32px; max-height: 108px; padding: 7px 0; resize: none; border: 0; border-radius: 0; outline: 0;
  line-height: 18px;
}
.wa-composer-input textarea:focus { border: 0; outline: 0; }
.wa-send-button { height: 42px; min-width: 76px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 11px; }
.wa-send-button b { font-size: 12px; }
.wa-composer-hint { min-height: 16px; margin: 3px 4px 0; color: #78858c; font-size: 9.5px; text-align: center; }
.wa-composer-hint.is-closed { color: #b3261e; font-weight: 600; }

/* Right: ownership, order and actions */
.wa-action-panel {
  display: flex; flex-direction: column; min-width: 0; height: 100%; background: #f7f9fa;
  border-left: 1px solid #d9dee2; overflow: hidden;
}
.wa-action-header {
  min-height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 13px 15px; background: #fff; border-bottom: 1px solid #e4e8eb;
}
.wa-action-header h2 { margin: 0; font-size: 15px; }
.wa-panel-close { display: none; }
.wa-action-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; }
.wa-action-section {
  display: block; padding: 13px; margin: 0 0 9px; border: 1px solid #e1e6e9;
  border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(17,27,33,.035);
}
.wa-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.wa-section-heading > span:first-child, .wa-activity-section > summary { font-size: 11.5px; font-weight: 800; color: #3b474d; }
.wa-section-heading > b { font-size: 12px; color: var(--green-dark); }
.wa-section-heading small { color: var(--muted); }
.wa-owner-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; }
.wa-owner-avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #d9f2e5; color: #08775f; font-size: 13px; font-weight: 800;
}
.wa-owner-card span { display: block; color: var(--muted); font-size: 10px; }
.wa-owner-card b { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.wa-action-buttons { display: grid; gap: 6px; margin-top: 10px; }
.wa-action-buttons form { margin: 0; }
.takeover-lock { color: #93610a; }
.wa-notice { padding: 8px 9px; margin-top: 9px; border-radius: 7px; background: #fff7dd; border: 1px solid #f4df9c; }
.wa-order-total { display: flex; align-items: baseline; gap: 4px; }
.wa-order-total > span:first-child { color: var(--muted); font-size: 10px; }
.wa-order-total strong { margin-right: auto; color: #17352e; font-size: 21px; }
.wa-product-summary { margin: 7px 0 10px; color: var(--muted); font-size: 11px; }

/* Order detail dialog */
.wa-order-modal {
  width: min(720px, calc(100vw - 32px)); max-height: min(84vh, 760px); padding: 0;
  border: 0; border-radius: 16px; background: #fff; color: var(--text);
  box-shadow: 0 24px 80px rgba(11, 20, 26, .32); overflow: hidden;
}
.wa-order-modal::backdrop { background: rgba(11, 20, 26, .58); backdrop-filter: blur(2px); }
.wa-order-modal[open] { animation: wa-modal-in .16s ease-out; }
@keyframes wa-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.wa-order-modal-shell { display: flex; flex-direction: column; max-height: min(84vh, 760px); }
.wa-order-modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 70px; padding: 14px 18px; border-bottom: 1px solid #e4e8eb; background: #fff;
}
.wa-order-modal-header h2 { margin: 0; color: #17352e; font-size: 20px; }
.wa-modal-close {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0;
  border-radius: 50%; background: #f0f2f5; color: #536168; font-size: 24px; cursor: pointer;
}
.wa-modal-close:hover { background: #e2e7ea; color: var(--text); }
.wa-order-modal-body { min-height: 0; overflow-y: auto; padding: 16px 18px; background: #f7f9fa; }
.wa-order-summary-band {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px;
  margin-bottom: 13px; border-radius: 12px; background: linear-gradient(135deg, #075e54, #0c8575); color: #fff;
}
.wa-order-summary-band > div:first-child > span { display: block; color: #c9eee7; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.wa-order-summary-band strong { display: block; font-size: 30px; line-height: 1.15; }
.wa-order-summary-band strong small { font-size: 12px; font-weight: 700; }
.wa-order-summary-meta { display: grid; justify-items: end; gap: 7px; text-align: right; }
.wa-order-summary-meta small { color: #d4efe9; font-size: 10.5px; }
.wa-order-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wa-modal-detail-card, .wa-modal-products, .wa-modal-error {
  padding: 14px; border: 1px solid #e1e6e9; border-radius: 11px; background: #fff;
}
.wa-modal-detail-card h3 { margin: 0 0 11px; color: #344249; font-size: 12px; }
.wa-modal-details { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 7px 10px; margin: 0; }
.wa-modal-details dt { color: var(--muted); font-size: 10.5px; }
.wa-modal-details dd { margin: 0; overflow-wrap: anywhere; font-size: 11.5px; font-weight: 550; }
.wa-modal-products { margin-top: 12px; }
.wa-modal-products .wa-section-heading { margin-bottom: 5px; }
.wa-modal-products p { margin: 0; color: #445158; font-size: 12px; }
.wa-modal-error { margin-top: 12px; border-color: #f1b8b3; background: #fff6f5; color: #a92d25; }
.wa-modal-error p { margin: 4px 0 0; font-size: 11px; }
.wa-order-modal-footer {
  display: flex; justify-content: flex-end; gap: 8px; padding: 11px 18px;
  border-top: 1px solid #e4e8eb; background: #fff;
}
.wa-order-modal-footer .btn { min-width: 94px; text-align: center; }
.wa-compact-form { gap: 7px; }
.wa-compact-form select { height: 34px; padding: 5px 8px; font-size: 11.5px; }
.wa-details { grid-template-columns: 72px minmax(0, 1fr); gap: 6px 8px; }
.wa-details dt { font-size: 10.5px; }
.wa-details dd { overflow-wrap: anywhere; font-size: 11px; }
.details-compact { grid-template-columns: 80px 1fr; }
.activity-list { display: flex; flex-direction: column; gap: 9px; font-size: 12px; }
.wa-activity-section > summary { display: flex; justify-content: space-between; cursor: pointer; list-style: none; }
.wa-activity-section > summary::-webkit-details-marker { display: none; }
.wa-activity-section > summary span { color: var(--muted); font-weight: 600; }
.wa-activity-section[open] > summary { margin-bottom: 10px; }
.wa-action-empty { background: #f7f9fa; }
.wa-action-placeholder {
  display: grid; place-content: center; justify-items: center; flex: 1; padding: 30px;
  color: var(--muted); font-size: 12px; text-align: center;
}
.wa-action-placeholder span { font-size: 26px; filter: grayscale(.5); }
.wa-chat-empty { display: grid; place-content: center; justify-items: center; padding: 40px; text-align: center; }
.wa-empty-illustration {
  display: grid; place-items: center; width: 92px; height: 92px; margin-bottom: 18px;
  border-radius: 50%; background: #d9f2e5; font-size: 38px;
}
.wa-chat-empty h2 { margin: 0 0 5px; color: #334047; font-size: 21px; }
.wa-chat-empty p { max-width: 380px; margin: 0; color: var(--muted); }
.wa-encrypted-note { margin-top: 28px; color: #87939a; font-size: 10.5px; }
.transfer-notice {
  position: fixed; z-index: 1000; right: 22px; bottom: 22px; max-width: 440px;
  display: flex; align-items: center; gap: 10px; padding: 15px;
  background: #fff; border: 2px solid var(--green); border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0,0,0,.22);
}
.transfer-countdown { font-weight: 700; color: #b3261e; }

@media (max-width: 1180px) {
  .wa-inbox-shell { grid-template-columns: minmax(240px, 275px) minmax(360px, 1fr); }
  .wa-action-panel {
    position: fixed; z-index: 1100; top: 0; right: 0; width: min(340px, 92vw);
    box-shadow: -14px 0 40px rgba(17,27,33,.2); transform: translateX(105%);
    transition: transform .2s ease;
  }
  .wa-inbox-shell.action-panel-open .wa-action-panel { transform: translateX(0); }
  .wa-icon-button, .wa-panel-close { display: grid; }
}
@media (max-width: 820px) {
  .wa-inbox-shell:not(.wa-inbox-shell--empty) { grid-template-columns: minmax(0, 1fr); }
  .wa-inbox-shell:not(.wa-inbox-shell--empty) .wa-people-panel { display: none; }
  .wa-inbox-shell--empty { grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); }
  .wa-mobile-back { display: block; }
}
@media (max-width: 660px) {
  .sidebar { width: 64px; padding: 16px 8px; }
  .brand { margin: 0 auto 20px; font-size: 0; }
  .brand::first-letter { font-size: 18px; }
  .sidebar nav a { overflow: hidden; height: 40px; padding: 9px 10px; white-space: nowrap; font-size: 0; text-align: center; }
  .sidebar nav a::first-letter { font-size: 17px; }
  .sidebar-stores, .sidebar-bottom { display: none; }
  .wa-inbox-shell--empty { grid-template-columns: 1fr; }
  .wa-inbox-shell--empty .wa-chat-panel { display: none; }
  .wa-chat-header { padding-inline: 9px; }
  .wa-chat-header .badge { display: none; }
  .wa-chat-log { padding-inline: 14px; }
  .bubble { max-width: 90%; }
  .wa-send-button { min-width: 44px; width: 44px; padding-inline: 0; border-radius: 50%; }
  .wa-send-button span { display: none; }
  .content-inbox > .flash { left: 74px; right: 10px; transform: none; }
  .wa-order-modal { width: calc(100vw - 18px); max-height: 90vh; border-radius: 13px; }
  .wa-order-modal-shell { max-height: 90vh; }
  .wa-order-modal-grid { grid-template-columns: 1fr; }
  .wa-order-summary-band { align-items: flex-start; }
  .wa-order-summary-band strong { font-size: 25px; }
  .wa-order-modal-footer { flex-wrap: wrap; }
  .wa-order-modal-footer .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-order-modal[open] { animation: none; }
}

/* Login */
.login-body { display: grid; place-items: center; min-height: 100vh; background: var(--green-dark); margin: 0; }
.login-card {
  background: #fff; border-radius: 14px; padding: 34px 30px; width: 340px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo { font-size: 40px; text-align: center; }
.login-card h1 { text-align: center; font-size: 20px; }
.login-card p { text-align: center; margin: -8px 0 4px; }
