:root {
  color-scheme: light;
  --ink: #17201c;
  --muted: #66736c;
  --line: #dfe6e1;
  --paper: #f5f7f4;
  --card: #ffffff;
  --green: #166849;
  --green-2: #0f5138;
  --mint: #dff4ea;
  --amber: #f6ead0;
  --danger: #a93c37;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 6px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.brand-mark {
  display: grid; width: 52px; height: 52px; place-items: center; border-radius: 15px;
  background: var(--green); color: white; font: 800 25px Georgia, serif;
  box-shadow: 0 12px 30px rgba(22, 104, 73, .22);
}
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; box-shadow: none; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(circle at 15% 10%, #dff4ea 0, transparent 32%),
  radial-gradient(circle at 90% 90%, #efe6cf 0, transparent 35%), #f5f7f4; }
.login-card { width: min(430px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 25px 65px rgba(31,52,42,.12); }
.login-logo {
  display: block;
  width: min(168px, 55%);
  aspect-ratio: 1.44 / 1;
  margin: 0 0 24px;
  border-radius: 14px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 12px 30px rgba(12, 20, 17, .2);
}
h1 { margin: 0 0 8px; font-size: 35px; letter-spacing: -.04em; }
label { display: grid; gap: 7px; margin-top: 16px; color: #3c4841; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #ccd6d0; border-radius: 10px; padding: 11px 12px; color: var(--ink); background: white; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,104,73,.12); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 46px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 7px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  color: #68766f;
  background: transparent;
}
.password-toggle:hover { color: var(--green); background: var(--mint); }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button.primary { border: 0; border-radius: 10px; padding: 11px 18px; background: var(--green); color: white; font-weight: 750; }
button.primary:hover { background: var(--green-2); }
.login-card button.primary { width: 100%; margin-top: 22px; }
.error { min-height: 20px; color: var(--danger); font-size: 13px; }
.compact-error { min-height: 0; margin: 8px 0; }
.whatsapp-protocol-welcome { margin-bottom: 18px; }
.integration-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.integration-card-head h4 { margin-top: 0; }
.badge.success { color: #0f6847; background: #ddf5e9; }
.badge.warning { color: #8a5a00; background: #fff0c8; }
.card-actions { display: flex; gap: 9px; margin-top: 16px; }
.whatsapp-qr-dialog { width: min(480px, calc(100vw - 32px)); }
.whatsapp-qr-body { display: grid; min-height: 330px; place-items: center; padding: 18px; border-radius: 16px; background: #f7faf8; }
.whatsapp-qr-image { display: block; width: min(300px, 100%); height: auto; border-radius: 10px; }
.qr-placeholder { color: var(--muted); text-align: center; }
.wa-connected { display: grid; justify-items: center; gap: 10px; color: var(--green); text-align: center; font-size: 48px; }
.wa-connected strong { font-size: 22px; }
.wa-connected span { color: var(--muted); font-size: 14px; }
.wa-connection-failed { display: grid; max-width: 330px; justify-items: center; gap: 13px; text-align: center; }
.wa-connection-failed strong { font-size: 20px; }
.wa-connection-failed span { color: var(--danger); font-size: 13px; line-height: 1.6; }
.wa-pairing-code { display: grid; justify-items: center; gap: 16px; text-align: center; }
.wa-pairing-code strong { padding: 12px 18px; border-radius: 12px; color: var(--green); background: var(--mint); font-size: 32px; letter-spacing: .18em; }
.wa-pairing-code span { font-weight: 750; }
.wa-pairing-code small { max-width: 310px; color: var(--muted); line-height: 1.6; }
.app { display: grid; min-height: 100vh; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; color: white; background: #11251d; }
.logo-row { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { display: flex; justify-content: space-between; width: 100%; padding: 11px 13px; border: 0; border-radius: 10px; background: transparent; color: #c4d2cb; text-align: left; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.1); color: white; }
.nav-item span { font-size: 10px; opacity: .55; }
.nav-item.disabled { cursor: default; opacity: .55; }
.sidebar-user { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user small { display: block; margin-top: 3px; color: #9bb1a7; }
.text-button { border: 0; background: transparent; color: #b7c9c0; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 26px 34px 20px; }
.topbar h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.date-chip, .badge { padding: 7px 11px; border-radius: 999px; background: white; border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; }
.page { padding: 4px 34px 34px; }
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 27px 30px; border-radius: 20px; color: white; background: linear-gradient(125deg, #174f3b, #207b57); box-shadow: 0 17px 40px rgba(20,80,58,.16); }
.welcome h3 { margin: 0 0 6px; font-size: 27px; }
.welcome p:not(.eyebrow) { margin: 0; color: #d5e9df; }
.welcome .eyebrow { color: #aee0ca; }
.welcome .badge { color: #173f30; }
.notice { margin-top: 18px; padding: 13px 16px; border: 1px solid #e8d8b4; border-radius: 11px; background: var(--amber); color: #6a4d14; }
.notice button { border: 0; background: transparent; color: #6a4d14; font-weight: 800; text-decoration: underline; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 18px; }
.metric, .panel { border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 8px 22px rgba(29,52,41,.045); }
.metric { padding: 20px; }
.metric span, .metric small { display: block; color: var(--muted); }
.metric strong { display: block; margin: 9px 0 4px; font-size: 31px; letter-spacing: -.04em; }
.metric small { font-size: 11px; }
.placeholder-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-top: 18px; }
.panel { padding: 22px; }
.panel h4 { margin: 0 0 16px; font-size: 15px; }
.empty-chart { display: grid; min-height: 190px; place-items: center; align-content: center; border-radius: 12px; background: repeating-linear-gradient(0deg,#f7f9f7,#f7f9f7 37px,#edf1ee 38px); color: var(--muted); text-align: center; line-height: 2; }
.clean-list { margin: 0; padding: 0; list-style: none; }
.clean-list li { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.5; }
.toolbar { display: flex; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.toolbar input { max-width: 470px; }
.toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.customer-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.customer-filters { display: grid; grid-template-columns: minmax(190px, 1.5fr) repeat(6, minmax(105px, .8fr)) repeat(2, minmax(130px, 1fr)) auto auto; align-items: end; gap: 9px; min-width: 0; }
.customer-filters label { min-width: 0; margin: 0; font-size: 11px; }
.customer-filters input, .customer-filters select { min-width: 0; max-width: none; padding: 8px 9px; font-size: 12px; }
.customer-filters button { align-self: end; height: 36px; white-space: nowrap; }
.additional-contacts-section { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #f8faf8; }
.subsection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.subsection-head small { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; }
#additionalContacts { display: grid; gap: 9px; margin-top: 12px; }
.additional-contact-row { display: grid; grid-template-columns: 1fr .8fr 1.2fr 1fr 1fr auto; align-items: center; gap: 8px; }
.additional-contact-row input { min-width: 0; padding: 9px; font-size: 12px; }
.danger-button { height: 38px; padding: 0 15px; border: 1px solid #e3b9b7; border-radius: 10px; color: var(--danger); background: #fff5f4; font-weight: 800; white-space: nowrap; }
.danger-button:hover { color: white; background: var(--danger); }
.compact-danger { height: auto; padding: 7px 10px; font-size: 12px; }
.return-button { height: 38px; padding: 0 15px; border: 1px solid #e2cf9f; border-radius: 10px; color: #765410; background: #fff9e9; font-weight: 800; white-space: nowrap; }
.return-button:hover { color: white; background: #8a651c; }
.row-check { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.section-help { margin: auto 0; color: var(--muted); font-size: 13px; }
.order-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}
.order-toolbar > .primary,
.order-toolbar > .toolbar-actions .primary {
  align-self: end;
  width: auto;
  min-width: 104px;
  height: 38px;
  padding: 0 18px;
  white-space: nowrap;
}
.order-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(115px, 1fr)) auto auto;
  align-items: end;
  gap: 9px;
  width: 100%;
  min-width: 0;
}
.order-filters label { min-width: 0; margin: 0; font-size: 11px; }
.order-filters input, .order-filters select { min-width: 0; width: 100%; padding: 8px 9px; font-size: 12px; }
.order-filters button { align-self: end; height: 36px; white-space: nowrap; }
.filter-reset { padding: 8px; color: var(--green); }
.table-panel { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: middle; }
th { color: var(--muted); background: #fafbfa; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
td strong { display: block; }
td small { color: var(--muted); }
.table-action { border: 0; border-radius: 8px; padding: 7px 10px; color: var(--green); background: var(--mint); font-weight: 750; }
.table-action.compact { padding: 4px 8px; font-size: 11px; }
.history-link { border: 0; padding: 4px 8px; border-radius: 8px; color: var(--green); background: var(--mint); font-weight: 850; }
.complaint-count { border: 0; padding: 4px 8px; border-radius: 8px; color: var(--danger); background: #fff0ef; font-weight: 850; }
.table-action.after-sales { color: #75500a; background: #fff5d9; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 90px; }
.stock-low { color: var(--danger); }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; color: var(--green-2); background: var(--mint); font-size: 11px; font-weight: 800; }
.empty-state { padding: 45px; color: var(--muted); text-align: center; }
dialog { width: min(720px, calc(100% - 28px)); max-height: calc(100vh - 40px); overflow: auto; padding: 0; border: 0; border-radius: 18px; box-shadow: 0 25px 70px rgba(18,37,29,.28); }
dialog::backdrop { background: rgba(9,20,15,.56); backdrop-filter: blur(3px); }
dialog form { padding: 24px; }
.dialog-body { padding: 24px; }
.wide-dialog { width: min(920px, calc(100% - 28px)); }
.dialog-head { display: flex; justify-content: space-between; align-items: start; }
.dialog-head h3 { margin: 0; font-size: 23px; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--paper); font-size: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.order-item-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 10px; }
.order-item-labels, .order-item-row { display: grid; grid-template-columns: minmax(180px, 2fr) 85px 110px 125px 36px; gap: 8px; }
.order-item-labels { margin: 0 0 6px; padding: 0 2px; color: var(--muted); font-size: 11px; font-weight: 800; }
.order-item-row { margin-bottom: 8px; }
.item-subtotal { display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; border-radius: 9px; background: var(--paper); color: var(--green-2); font-size: 12px; font-weight: 800; white-space: nowrap; }
.flavor-entry-row { display: grid; grid-template-columns: minmax(180px, 2fr) 120px 120px 36px; gap: 8px; margin-bottom: 8px; }
.flavor-stock-list { display: grid; gap: 7px; min-width: 280px; }
.flavor-stock-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.flavor-stock-line:last-child { padding-bottom: 0; border-bottom: 0; }
.warehouse-flavor-line { align-items: flex-start; }
.warehouse-flavor-line > strong { min-width: 85px; }
.warehouse-flavor-line > div { display: grid; flex: 1; gap: 5px; }
.warehouse-stock-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.order-item-row input, .order-item-row select { margin: 0; }
.order-total { margin-top: 16px; padding: 13px 15px; border-radius: 10px; background: var(--paper); text-align: right; }
.order-total strong { margin-left: 8px; color: var(--green); font-size: 18px; }
.receipt-entry { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0 14px; margin-top: 12px; padding: 4px 15px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfb; }
.receipt-entry p { grid-column: 1 / -1; margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.finance-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.finance-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.finance-card > span { display: block; color: var(--muted); font-size: 12px; }
.finance-card strong { display: block; margin-top: 8px; font-size: 19px; }
.finance-card small { display: block; margin-top: 5px; color: var(--muted); }
.finance-toolbar { display: block; }
.finance-filters { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) auto auto; align-items: end; gap: 9px; }
.finance-filters label { margin: 0; font-size: 11px; }
.finance-filters input, .finance-filters select { padding: 8px 9px; font-size: 12px; }
.money-lines { display: grid; gap: 2px; }
.money-lines span { white-space: nowrap; }
.whatsapp-welcome { margin-bottom: 18px; }
.whatsapp-subnav { display: inline-flex; gap: 5px; margin-bottom: 18px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 5px 18px rgba(22,61,45,.06); }
.whatsapp-subnav button { padding: 10px 18px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; }
.whatsapp-subnav button.active { background: var(--green); color: white; box-shadow: 0 5px 14px rgba(20,112,74,.2); }
.wa-view-hidden { display: none !important; }
.whatsapp-chat-panel { margin: 18px 0; padding: 0; overflow: hidden; border: 0; border-radius: 20px; box-shadow: 0 14px 45px rgba(22,61,45,.12); }
.wa-workbench-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.wa-workbench-head h3 { margin: 3px 0 0; }
.wa-chat-layout { display: grid; grid-template-columns: 180px 220px 310px minmax(500px, 1fr); height: clamp(520px, calc(100vh - 245px), 700px); min-height: 0; overflow: hidden; }
.wa-staff-pane, .wa-account-pane { min-width: 0; overflow-y: auto; border-right: 1px solid var(--line); background: white; }
.wa-pane-title { position: sticky; top: 0; z-index: 1; padding: 13px 14px; border-bottom: 1px solid var(--line); background: #f8faf8; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.wa-staff-list, .wa-workbench-accounts { display: grid; }
.wa-staff-item, .wa-workbench-account { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: center; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: white; text-align: left; }
.wa-staff-item:hover, .wa-staff-item.active, .wa-workbench-account:hover, .wa-workbench-account.active { background: #eaf5ef; }
.wa-staff-item strong, .wa-staff-item small, .wa-workbench-account strong, .wa-workbench-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-staff-item small, .wa-workbench-account small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.wa-staff-item .wa-avatar { width: 34px; height: 34px; }
.wa-workbench-account { grid-template-columns: minmax(0, 1fr) auto; }
.wa-workbench-account small { grid-column: 1 / -1; }
.wa-workbench-account .wa-account-conversation-count { margin-top: 0; color: var(--green); font-weight: 700; }
.wa-workbench-account .badge { grid-column: 2; grid-row: 1; font-size: 9px; }
.wa-conversation-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid var(--line); background: #fbfcfb; }
.wa-conversation-title { display: flex; align-items: center; justify-content: space-between; min-height: 43px; }
.wa-list-scroll-controls { display: inline-flex; gap: 4px; }
.wa-list-scroll-controls button { display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 1px solid #d7e1dc; border-radius: 7px; background: white; color: var(--green); font-size: 10px; }
.wa-list-scroll-controls button:hover { border-color: var(--green); background: #eaf5ef; }
.wa-conversation-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); background: white; }
.wa-conversation-tabs button { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; padding: 10px 6px 9px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.wa-conversation-tabs button:hover { background: #f2f8f5; color: var(--green); }
.wa-conversation-tabs button.active { border-bottom-color: var(--green); background: #f4faf7; color: var(--green); }
.wa-conversation-tabs em { min-width: 20px; padding: 2px 6px; border-radius: 10px; background: #e7eeea; color: inherit; font-size: 9px; font-style: normal; }
.wa-conversation-tabs button.active em { background: #d7eee2; }
.wa-conversation-filters { display: grid; grid-template-columns: minmax(0, 1fr) 105px; gap: 7px; padding: 12px 10px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.wa-conversation-filters input, .wa-conversation-filters select { width: 100%; min-width: 0; margin: 0; padding: 9px 10px; font-size: 11px; }
.wa-conversation-filters select { padding-right: 25px; }
.wa-conversation-list { flex: 1 1 0; width: 100%; height: 0; min-height: 0; overflow-x: hidden; overflow-y: scroll; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-color: #8db4a2 #edf3ef; scrollbar-width: auto; }
.wa-conversation-list::-webkit-scrollbar { width: 10px; }
.wa-conversation-list::-webkit-scrollbar-track { background: #edf3ef; }
.wa-conversation-list::-webkit-scrollbar-thumb { border: 2px solid #edf3ef; border-radius: 9px; background: #8db4a2; }
.wa-conversation-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; width: 100%; gap: 10px; align-items: center; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.wa-conversation-item:hover, .wa-conversation-item.active { background: #eaf5ef; }
.wa-conversation-item.group .wa-avatar { border-radius: 13px; background: #356b91; }
.wa-conversation-item.group .wa-conversation-copy strong::after { content: "群"; display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 7px; background: #e4eff7; color: #356b91; font-size: 8px; vertical-align: 1px; }
.wa-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: white; font-weight: 800; }
.wa-contact-avatar { position: relative; overflow: hidden; }
.wa-contact-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; background: var(--green); }
.wa-conversation-copy { min-width: 0; }
.wa-conversation-copy strong, .wa-conversation-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-conversation-copy small { margin-top: 5px; color: var(--muted); }
.wa-contact-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.wa-contact-tags em { padding: 2px 5px; border-radius: 7px; background: #dff2e7; color: var(--green); font-size: 9px; font-style: normal; font-weight: 700; }
.wa-conversation-meta { align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; color: var(--muted); font-size: 10px; }
.wa-conversation-meta em { padding: 3px 6px; border-radius: 9px; background: #dff2e7; color: var(--green); font-style: normal; }
.wa-chat-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; overflow: hidden; background: #f2f6f3; }
.wa-chat-contact-head { display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 8px 14px; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.wa-chat-contact-head > div:first-child { min-width: 0; max-width: 52%; }
.wa-chat-contact-head strong, .wa-chat-contact-head small { display: block; }
.wa-chat-contact-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.wa-chat-contact-head small { margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.wa-chat-contact-head .card-actions { flex-wrap: nowrap; flex: 0 0 auto; gap: 8px; }
.wa-chat-contact-head .card-actions select { width: 148px; min-width: 148px; height: 38px; margin: 0; padding: 7px 28px 7px 9px; font-size: 11px; }
.wa-chat-contact-head #waCreateCustomer { width: auto; min-width: 112px; height: 38px; padding: 8px 12px; white-space: nowrap; font-size: 12px; }
.wa-message-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 26px 30px; background-color: #edf4ef; background-image: radial-gradient(rgba(26,112,77,.055) 1px, transparent 1px), linear-gradient(135deg, rgba(255,255,255,.4), transparent); background-size: 20px 20px, auto; }
.wa-message-row { display: flex; margin: 8px 0; }
.wa-message-row.outbound { justify-content: flex-end; }
.wa-message-bubble { max-width: min(76%, 650px); padding: 11px 14px 8px; border-radius: 15px 15px 15px 4px; background: white; box-shadow: 0 2px 7px rgba(20,40,30,.09); }
.wa-message-row.outbound .wa-message-bubble { border-radius: 12px 12px 3px 12px; background: #d9f5df; }
.wa-message-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.wa-media-card { display: grid; gap: 6px; min-width: 210px; margin-bottom: 7px; }
.wa-media-card img, .wa-media-card video { display: block; width: min(360px, 100%); max-height: 320px; border-radius: 9px; background: #17221d; object-fit: contain; }
.wa-media-card.document { min-width: 250px; padding: 10px; border-radius: 8px; background: rgba(255,255,255,.65); }
.wa-media-card.document span { overflow-wrap: anywhere; font-size: 12px; }
.wa-media-download { color: var(--green); font-size: 10px; font-weight: 700; text-decoration: none; }
.wa-media-download:hover { text-decoration: underline; }
.wa-quoted-content { margin-bottom: 8px; padding: 7px 9px; border-left: 3px solid #49a477; border-radius: 6px; background: rgba(255,255,255,.58); }
.wa-quoted-content strong, .wa-quoted-content span { display: block; }
.wa-quoted-content strong { color: var(--green); font-size: 9px; }
.wa-quoted-content span { margin-top: 2px; overflow: hidden; color: #52685e; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.wa-message-bubble small { display: block; margin-top: 5px; color: var(--muted); text-align: right; font-size: 9px; }
.wa-reply-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 12px 0; padding: 8px 10px; border-left: 4px solid var(--green); border-radius: 8px; background: #edf7f1; }
.wa-reply-preview > div { min-width: 0; }
.wa-reply-preview strong { display: block; color: var(--green); font-size: 10px; }
.wa-reply-preview p { margin: 3px 0 0; overflow: hidden; color: #4c6358; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.wa-reply-preview button { flex: none; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; background: white; color: var(--muted); }
.wa-pending-image { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 8px 12px 0; padding: 8px; border: 1px solid #b9d9c8; border-radius: 10px; background: #f0f8f3; }
.wa-pending-image img { width: 74px; height: 58px; border-radius: 7px; background: white; object-fit: contain; }
.wa-pending-image strong, .wa-pending-image span { display: block; }
.wa-pending-image strong { color: var(--green); font-size: 11px; }
.wa-pending-image span { margin-top: 4px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.wa-pending-image button { width: 27px; height: 27px; padding: 0; border: 0; border-radius: 50%; background: white; color: var(--muted); }
.wa-pending-image.sending { opacity: .62; pointer-events: none; }
.wa-send-status { margin: 6px 14px 0; padding: 7px 10px; border-radius: 7px; font-size: 10px; }
.wa-send-status.sending { background: #fff4d8; color: #8a6413; }
.wa-send-status.success { background: #e2f5e9; color: var(--green); }
.wa-send-status.error { background: #fde8e6; color: var(--danger); }
.wa-contact-context-menu { position: fixed; z-index: 1000; width: 190px; max-height: min(420px, calc(100vh - 20px)); overflow-y: auto; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 12px 32px rgba(18,48,35,.22); }
.wa-contact-context-menu button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); text-align: left; font-size: 12px; }
.wa-contact-context-menu button:hover { background: #eaf5ef; }
.wa-contact-context-menu button.danger { color: var(--danger); }
.wa-contact-context-menu p { margin: 5px 8px; color: var(--muted); font-size: 10px; }
.wa-context-separator { height: 1px; margin: 5px 0; background: var(--line); }
.wa-delivery-status { margin-left: 3px; font-size: 12px; font-weight: 900; letter-spacing: -3px; }
.wa-delivery-status.sent, .wa-delivery-status.delivered { color: #82938b; }
.wa-delivery-status.read { color: #1689c7; }
.wa-delivery-status.pending { color: #9b8a62; letter-spacing: 0; }
.wa-delivery-status.failed { display: inline-grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; background: var(--danger); color: white; letter-spacing: 0; }
.wa-translation { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(20,80,55,.18); color: #376653; font-size: 12px; line-height: 1.45; }
.wa-composer { position: relative; z-index: 2; flex: none; border-top: 1px solid var(--line); background: white; }
.wa-composer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; min-height: 45px; padding: 6px 12px; border-bottom: 1px solid #edf0ee; }
.wa-composer-tools > button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 6px 9px; border: 0; border-radius: 8px; background: transparent; color: #476258; }
.wa-composer-tools > button:hover { background: #e8f4ed; color: var(--green); }
.wa-composer-tools > button span { font-size: 11px; }
.wa-translate-control { display: inline-flex; align-items: center; gap: 6px; margin: 0 4px 0 auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.wa-translate-control input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.wa-composer-tools select { width: auto; min-width: 96px; margin: 0; padding: 7px 27px 7px 9px; font-size: 11px; }
.wa-tool-popover { position: absolute; z-index: 5; bottom: 104px; left: 12px; display: flex; flex-wrap: wrap; width: 290px; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 12px 35px rgba(15,50,35,.18); }
.wa-tool-popover button { padding: 6px; border: 0; border-radius: 7px; background: transparent; font-size: 21px; }
.wa-tool-popover button:hover { background: #eaf5ef; }
.wa-quick-panel { display: grid; width: 390px; }
.wa-quick-panel button { padding: 9px 10px; color: var(--ink); font-size: 12px; text-align: left; }
.wa-message-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 12px; border-top: 1px solid var(--line); background: white; }
.wa-message-form { border-top: 0; }
.wa-message-form textarea { min-height: 52px; max-height: 140px; margin: 0; resize: vertical; border-radius: 13px; background: #f8faf8; }
.wa-message-form button { min-height: 46px; }
.wa-share-dialog { width: min(560px, calc(100% - 28px)); }
.wa-material-hero { margin-bottom: 14px; }
.wa-material-toolbar { display: grid; grid-template-columns: minmax(300px, 1fr) 150px 260px; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px; }
.wa-material-scope { display: flex; gap: 5px; }
.wa-material-scope button { padding: 9px 14px; border: 0; border-radius: 8px; background: #f0f4f1; color: var(--muted); }
.wa-material-scope button.active { background: var(--green); color: white; }
.wa-material-toolbar input, .wa-material-toolbar select { margin: 0; }
.wa-material-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.wa-material-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 6px 20px rgba(22,61,45,.06); }
.wa-material-preview { display: grid; place-items: center; height: 150px; overflow: hidden; background: #eef4f0; }
.wa-material-preview img, .wa-material-preview video { width: 100%; height: 100%; object-fit: cover; }
.wa-material-preview.text { place-items: start; padding: 15px; }
.wa-material-preview.text p { display: -webkit-box; margin: 0; overflow: hidden; color: #345448; line-height: 1.55; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.wa-material-card-body { padding: 13px; }
.wa-material-card-body > small { margin-left: 7px; color: var(--muted); }
.wa-material-card-body h4 { margin: 10px 0 6px; }
.wa-material-card-body p { margin: 0; color: var(--muted); font-size: 10px; }
.wa-chat-material-panel { display: grid; width: min(430px, calc(100% - 24px)); max-height: 330px; overflow-y: auto; }
.wa-chat-material-panel button { display: block; padding: 10px; color: var(--ink); font-size: 12px; text-align: left; }
.wa-chat-material-panel button strong, .wa-chat-material-panel button small { display: block; }
.wa-chat-material-panel button small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.wa-number-check { margin-top: 14px; padding: 11px 13px; border-radius: 10px; font-size: 12px; }
.wa-number-check.valid { border: 1px solid #b9dec8; background: #edf9f2; color: var(--green); }
.wa-number-check.invalid { border: 1px solid #edc5c1; background: #fff4f3; color: var(--danger); }
.wa-compose-translation { margin: 8px 12px 0; padding: 9px 12px; border: 1px solid #cde4d6; border-radius: 10px; background: #f1faf5; }
.wa-compose-translation span { display: block; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.wa-compose-translation p { margin: 5px 0 0; color: #284c3d; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.integration-settings { margin-bottom: 18px; }
.integration-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; }
.integration-form label { margin: 0; }
.integration-form button { height: 42px; }
.integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.integration-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.integration-card h4 { margin: 8px 0; font-size: 18px; }
.integration-card p { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.wa-account-owner-control { display: block; margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.wa-account-owner-control select { margin-top: 6px; padding: 8px 30px 8px 10px; font-size: 12px; }
.integration-card .wa-sync-summary { margin-bottom: 12px; padding: 8px 10px; border-radius: 8px; background: #f2f7f4; color: #45665a; line-height: 1.5; }
.integration-card .wa-sync-summary small { color: var(--muted); }
.check-label { display: flex; grid-template-columns: none; align-items: center; gap: 9px; padding: 12px 0; font-size: 15px; }
.check-label input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.fields-disabled { opacity: .48; }
.form-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; color: var(--muted); background: var(--paper); font-size: 11px; line-height: 1.5; }
.customer-order-history { display: grid; gap: 12px; margin-top: 20px; }
.history-order { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.history-order > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; background: #fafbfa; }
.history-order header small { display: block; margin-top: 3px; color: var(--muted); }
.history-summary { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.history-items { display: grid; }
.history-items > div { display: grid; grid-template-columns: minmax(220px, 1fr) 70px 180px; gap: 12px; padding: 10px 15px; border-top: 1px solid var(--line); font-size: 12px; }
.history-items > div span:last-child { color: var(--muted); text-align: right; }
.history-complaints { padding: 12px 15px; border-top: 1px solid #ead0ce; background: #fff9f8; }
.history-complaints > strong { display: block; margin-bottom: 8px; color: var(--danger); font-size: 12px; }
.history-complaints > div { display: grid; grid-template-columns: 120px 170px 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px dashed #ead0ce; align-items: start; font-size: 12px; }
.history-complaints time, .history-complaints small { color: var(--muted); }
.history-complaints p { margin: 0; line-height: 1.5; }
.embedded-form { margin-top: 18px; padding: 16px; border-radius: 12px; background: var(--paper); }
.history-heading { margin: 22px 0 10px; }
.complaint-history { display: grid; gap: 10px; }
.complaint-entry { padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.complaint-entry header { display: flex; justify-content: space-between; gap: 10px; }
.complaint-entry p { margin: 10px 0; line-height: 1.6; white-space: pre-wrap; }
.complaint-entry small { color: var(--muted); }
.secondary { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; background: white; color: var(--ink); }
label small { color: var(--muted); font-weight: 500; }
@media (max-width: 900px) {
  .app { grid-template-columns: 78px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .logo-row strong, .nav-item span, .sidebar-user div, .text-button { display: none; }
  .nav-item { justify-content: center; padding-inline: 5px; font-size: 11px; }
  .logo-row { justify-content: center; padding-inline: 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .order-filters { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .customer-toolbar { grid-template-columns: 1fr; }
  .customer-filters { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .customer-toolbar > .toolbar-actions { justify-self: end; }
  .finance-summary { grid-template-columns: 1fr 1fr; }
  .integration-grid { grid-template-columns: 1fr 1fr; }
  .wa-material-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wa-material-toolbar { grid-template-columns: 1fr 140px; }
  .wa-material-toolbar input { grid-column: 1 / -1; }
  .wa-chat-layout { grid-template-columns: 150px 180px 260px minmax(380px, 1fr); overflow-x: auto; }
  .finance-filters { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .order-toolbar { grid-template-columns: 1fr; }
  .order-toolbar > .primary, .order-toolbar > .toolbar-actions { justify-self: end; }
}
@media (max-width: 650px) {
  .app { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 12px; }
  .sidebar nav { grid-template-columns: 1fr 1fr; }
  .sidebar-user { display: none; }
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .topbar .date-chip { display: none; }
  .metric-grid, .placeholder-grid, .form-grid { grid-template-columns: 1fr; }
  .order-item-labels { display: none; }
  .order-item-row { grid-template-columns: 1fr 65px 85px 95px 34px; }
  .flavor-entry-row { grid-template-columns: 1fr 80px 80px 34px; }
  .receipt-entry { grid-template-columns: 1fr; }
  .receipt-entry p { grid-column: auto; }
  .finance-summary, .finance-filters { grid-template-columns: 1fr 1fr; }
  .integration-grid, .integration-form { grid-template-columns: 1fr; }
  .wa-material-grid { grid-template-columns: 1fr 1fr; }
  .wa-material-toolbar { grid-template-columns: 1fr; }
  .wa-material-toolbar input { grid-column: auto; }
  .wa-chat-layout { grid-template-columns: 1fr; height: auto; }
  .wa-staff-pane, .wa-account-pane { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .wa-conversation-pane { height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .wa-chat-main { height: 520px; }
  .form-grid .wide { grid-column: auto; }
  .welcome { align-items: start; flex-direction: column; }
  .order-toolbar { align-items: stretch; }
  .order-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .customer-filters { grid-template-columns: 1fr 1fr; }
  .additional-contact-row { grid-template-columns: 1fr 1fr; }
  .additional-contact-row .remove-contact { justify-self: end; }
  .customer-toolbar > .toolbar-actions { justify-self: stretch; }
  .customer-toolbar > .toolbar-actions > * { flex: 1; }
  .order-toolbar > .primary, .order-toolbar > .toolbar-actions { justify-self: stretch; width: 100%; }
  .order-toolbar > .toolbar-actions > * { flex: 1; }
  th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { display: none; }
}

/* 社媒群控 */
.social-hero { margin-bottom: 18px; background: linear-gradient(125deg, #0b4e38, #1c7654 66%, #27805d); }
.social-hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.social-proxy-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.26); border-radius: 999px; color: #effff7; background: rgba(0,0,0,.12); font-size: 12px; }
.social-proxy-chip i { width: 8px; height: 8px; border-radius: 50%; background: #69e7a8; box-shadow: 0 0 0 4px rgba(105,231,168,.15); }
.social-platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.social-platform-card { min-height: 248px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 12px 28px rgba(25,59,43,.06); }
.social-platform-card > header { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.social-platform-card h4, .social-section-head h3, .social-readiness-panel h3 { margin: 0; }
.social-platform-card .eyebrow { margin-bottom: 3px; }
.social-platform-logo { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: white; font-size: 24px; font-weight: 850; }
.social-platform-card.facebook .social-platform-logo { background: #1877f2; }
.social-platform-card.instagram .social-platform-logo { background: linear-gradient(145deg, #7b35b7, #e1306c 60%, #f9a437); }
.social-platform-card.youtube .social-platform-logo { background: #ff0033; font-size: 18px; }
.social-platform-count { padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--paper); font-size: 11px; white-space: nowrap; }
.social-capability { margin: 0; padding: 11px 18px; color: var(--muted); background: #fafcfb; font-size: 11px; }
.social-account-list { display: grid; gap: 9px; padding: 12px; }
.social-account-empty { display: grid; min-height: 94px; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }
.social-account-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.social-account-item strong, .social-account-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-account-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.social-account-status { align-self: start; padding: 5px 8px; border-radius: 999px; color: #815900; background: #fff1c9; font-size: 10px; }
.social-account-status.ready { color: #086341; background: #ddf5e9; }
.social-account-actions { grid-column: 1 / -1; display: flex; gap: 7px; flex-wrap: wrap; }
.social-account-actions button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--green); background: white; font-size: 10px; }
.social-account-actions button.danger { color: var(--danger); }
.social-account-error { grid-column: 1 / -1; color: var(--danger); font-size: 10px; line-height: 1.45; }
.social-control-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .7fr); gap: 18px; margin-bottom: 18px; }
.social-composer-panel, .social-readiness-panel, .social-history-panel { padding: 20px; }
.social-section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.social-upload-state { padding: 6px 9px; border-radius: 999px; color: var(--muted); background: var(--paper); font-size: 10px; }
.social-media-drop { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 16px; padding: 12px; border: 1px dashed #b9cbc1; border-radius: 13px; background: #f9fcfa; }
.social-media-preview { min-height: 50px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.social-media-preview img, .social-media-preview video { width: 76px; height: 52px; border-radius: 9px; object-fit: cover; background: #e9efeb; }
.social-targets { margin: 18px 0 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; }
.social-targets legend { padding: 0 7px; color: #3c4841; font-size: 12px; font-weight: 750; }
.social-target-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.social-target-option { display: flex; align-items: center; gap: 9px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 650; }
.social-target-option input { width: 16px; margin: 0; }
.social-target-option span { min-width: 0; }
.social-target-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.social-target-option.disabled { opacity: .45; }
.social-publish-notice { margin-top: 13px; }
.social-publish-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 8px; }
.social-publish-actions span { color: var(--muted); font-size: 11px; }
.social-check-list { display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.social-check-list li { position: relative; padding: 13px 0 13px 27px; border-top: 1px solid var(--line); }
.social-check-list li::before { content: "!"; position: absolute; left: 0; top: 14px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #8b6500; background: #fff0c7; font-size: 10px; font-weight: 800; }
.social-check-list li.ok::before { content: "✓"; color: white; background: var(--green); }
.social-check-list strong, .social-check-list span { display: block; }
.social-check-list strong { font-size: 12px; }
.social-check-list span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.social-history-panel { margin-bottom: 24px; }
.social-history-table { margin: 15px -20px -20px; border-radius: 0 0 16px 16px; box-shadow: none; }
.social-history-table td { vertical-align: top; }
.social-history-table small { display: block; margin-top: 4px; color: var(--muted); }
.social-target-badges { display: flex; gap: 5px; flex-wrap: wrap; max-width: 360px; }
.social-target-badge { padding: 5px 7px; border-radius: 7px; color: #4e5e56; background: var(--paper); font-size: 10px; }
.social-target-badge.success { color: #086341; background: #ddf5e9; }
.social-target-badge.failure { color: var(--danger); background: #ffebe9; }
.social-account-dialog { width: min(680px, calc(100vw - 32px)); }
.social-proxy-note { margin-top: 16px; color: #745500; background: #fff5d9; }

@media (max-width: 1100px) {
  .social-platform-grid { grid-template-columns: 1fr; }
  .social-platform-card { min-height: auto; }
  .social-control-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .social-hero-actions { justify-content: flex-start; }
  .social-platform-card > header { grid-template-columns: 42px minmax(0, 1fr); }
  .social-platform-count { grid-column: 2; justify-self: start; }
  .social-media-drop, .social-target-list { grid-template-columns: 1fr; }
  .social-publish-actions { align-items: stretch; flex-direction: column; }
  .social-publish-actions button { width: 100%; }
}
