: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; }
.brand-mark.small.brand-mark-dr { width: 38px; font: 900 13px/1 Arial, sans-serif; letter-spacing: -.3px; }
.sidebar-brand-name { display: grid; gap: 3px; line-height: 1; }
.sidebar-brand-name > span { font-size: 14px; letter-spacing: .6px; }
.sidebar-brand-name > small { color: #b9d2c7; font-size: 11px; font-weight: 600; letter-spacing: .8px; }
.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; }
.remember-login { display: flex; align-items: center; gap: 8px; margin-top: 13px; color: var(--muted); font-size: 12px; font-weight: 600; }
.remember-login input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.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-external { box-sizing: border-box; align-items: center; text-decoration: none; }
.nav-external span { font-size: 14px; }
.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; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.order-notification-wrap { position: relative; }
.order-notification-button { display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #b8d8c9; border-radius: 999px; background: #f3faf6; color: var(--green); font-weight: 800; cursor: pointer; }
.order-notification-button:hover { border-color: var(--green); background: white; }
.order-notification-count { display: inline-flex; min-width: 21px; height: 21px; align-items: center; justify-content: center; padding: 0 6px; border-radius: 999px; background: #e53935; color: white; font-size: 11px; line-height: 1; }
.order-notification-panel { position: absolute; z-index: 220; top: calc(100% + 10px); right: 0; width: min(390px, calc(100vw - 32px)); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 18px 50px rgba(20, 55, 40, .2); }
.order-notification-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px 12px; border-bottom: 1px solid var(--line); }
.order-notification-head strong, .order-notification-head small { display: block; }
.order-notification-head small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.order-notification-head .link-button { border: 0; background: transparent; color: var(--green); font-weight: 800; cursor: pointer; }
.order-notification-list { max-height: 420px; overflow-y: auto; }
.order-notification-item { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); background: white; color: inherit; text-align: left; cursor: pointer; }
.order-notification-item:hover, .order-notification-item.unread { background: #f1faf5; }
.order-notification-item strong, .order-notification-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-notification-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.order-notification-item time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.order-notification-empty { padding: 30px 18px; color: var(--muted); text-align: center; }
.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; }
.dashboard-period-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-period-grid .metric strong { font-size: clamp(24px, 2.2vw, 34px); }
.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-link { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.metric-link:hover { transform: translateY(-2px); border-color: #9fc9b6; box-shadow: 0 12px 28px rgba(18, 105, 75, .12); }
.metric-link:focus-visible { outline: 3px solid rgba(21, 117, 82, .22); outline-offset: 2px; }
.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; }
.dashboard-inquiry-metric { border-color: #b8dcca; background: linear-gradient(145deg, #ffffff, #f1faf5); }
.dashboard-inquiry-metric strong { color: var(--green); }
.dashboard-inquiry-dialog { width: min(920px, calc(100vw - 28px)); }
.dashboard-inquiry-dialog .dialog-head { margin-bottom: 8px; }
.dashboard-inquiry-dialog .muted { margin: 4px 0 16px; }
.dashboard-inquiry-table-wrap { max-height: min(560px, 65vh); border: 1px solid var(--line); border-radius: 14px; }
.dashboard-inquiry-table { min-width: 690px; }
.dashboard-inquiry-table thead { position: sticky; top: 0; z-index: 1; }
.dashboard-inquiry-table tbody tr:hover { background: #f5faf7; }
.dashboard-inquiry-table td:nth-child(2) { font-variant-numeric: tabular-nums; }
.dashboard-ranking-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.dashboard-ranking-panel { min-width: 0; padding: 18px; }
.dashboard-ranking-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.dashboard-ranking-panel > header h4 { margin: 2px 0 0; }
.dashboard-ranking-panel > header > span { padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--paper); font-size: 9px; white-space: nowrap; }
.dashboard-ranking-panel .eyebrow { margin: 0; color: var(--green); font-size: 9px; }
.dashboard-ranking-list { margin: 0; padding: 0; list-style: none; }
.dashboard-ranking-list li { border-top: 1px solid var(--line); }
.dashboard-ranking-list button { display: grid; width: 100%; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 11px 3px; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.ranking-product-row { display: grid; width: 100%; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 11px 3px; }
.dashboard-ranking-list button:hover { background: #f6faf7; }
.ranking-position { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; color: var(--green); background: var(--mint); font-size: 10px; font-weight: 800; }
.dashboard-ranking-list li:nth-child(-n+3) .ranking-position { color: white; background: var(--green); }
.ranking-customer { min-width: 0; }
.ranking-customer strong, .ranking-customer small, .ranking-value strong, .ranking-value small { display: block; }
.ranking-customer strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-customer small, .ranking-value small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.ranking-value { text-align: right; }
.ranking-value strong { color: var(--green); font-size: 17px; }
.ranking-empty { padding: 24px 4px; color: var(--muted); text-align: center; 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-metric-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 14px; padding: 11px 14px; border: 1px solid #b9dacb; border-radius: 12px; color: var(--green); background: var(--mint); }
.customer-metric-notice button { border: 0; color: var(--green); background: transparent; font-weight: 800; text-decoration: underline; cursor: pointer; }
.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; }
.customer-phone-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.customer-phone-line small { min-width: 0; overflow-wrap: anywhere; }
.customer-wa-contact { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 4px 9px; color: #fff; background: var(--green); font-size: 11px; font-weight: 700; cursor: pointer; }
.customer-wa-contact:hover { filter: brightness(.92); }
.history-link { border: 0; padding: 4px 8px; border-radius: 8px; color: var(--green); background: var(--mint); font-weight: 850; }
.table-sort { display: inline-flex; align-items: center; gap: 5px; padding: 4px 2px; border: 0; color: inherit; background: transparent; font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.table-sort:hover, .table-sort.active { color: var(--green); }
.sort-indicator { min-width: 12px; font-size: 13px; line-height: 1; }
.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; }
.order-service-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.order-service-card { overflow: hidden; border: 1px solid #d9e5df; border-radius: 14px; background: linear-gradient(145deg, #fff 0%, #f8fbf9 100%); box-shadow: 0 5px 16px rgba(21, 77, 56, .05); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.order-service-card:has(.order-switch input:checked) { border-color: #8fc6ae; box-shadow: 0 7px 22px rgba(20, 114, 79, .12); }
.order-service-card-wide { grid-column: 1 / -1; }
.order-service-toggle { display: grid; grid-template-columns: 42px minmax(0, 1fr) 46px; align-items: center; gap: 12px; margin: 0; padding: 14px 15px; cursor: pointer; }
.order-service-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #eaf5f0; color: var(--green-2); font-size: 15px; font-weight: 900; }
.order-service-card:has(.order-switch input:checked) .order-service-icon { background: var(--green-2); color: #fff; }
.order-service-copy { display: grid; gap: 3px; min-width: 0; }
.order-service-copy strong { color: #17251f; font-size: 14px; line-height: 1.3; }
.order-service-copy small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.order-switch { position: relative; width: 44px; height: 25px; }
.order-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.order-switch i { position: absolute; inset: 0; border-radius: 999px; background: #cfd9d4; box-shadow: inset 0 0 0 1px rgba(18, 58, 43, .08); transition: background .2s ease; }
.order-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .18); transition: transform .2s ease; }
.order-switch input:checked + i { background: var(--green-2); }
.order-switch input:checked + i::after { transform: translateX(19px); }
.order-switch input:focus-visible + i { outline: 3px solid rgba(30, 132, 94, .2); outline-offset: 2px; }
.order-service-detail { display: grid; gap: 7px; margin: 0 15px 15px; padding-top: 13px; border-top: 1px solid #e4ece8; }
.order-service-detail > span { color: #33483f; font-size: 12px; font-weight: 800; }
.order-service-detail em, .order-service-detail b { margin-left: 5px; padding: 2px 6px; border-radius: 999px; font-size: 10px; font-style: normal; }
.order-service-detail em { background: #fff0ed; color: #bf4d3a; }
.order-service-detail b { background: #edf3f0; color: #607269; }
.order-service-detail input, .order-service-detail select { background: #fff; }
.order-service-detail small { margin-top: -2px; color: var(--muted); font-size: 10px; }
.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; }
.special-edit-entry { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr); gap: 18px; align-items: end; margin: 20px 0 4px; padding: 16px 18px; border: 1px solid #e8c77a; border-radius: 14px; background: #fff8e7; }
.special-edit-copy strong { color: #8a5a00; }
.special-edit-copy p { margin: 5px 0 0; color: #7b6743; font-size: 12px; line-height: 1.55; }
.special-order-edit { border-color: #e1b75c !important; background: #fff6df !important; color: #8a5a00 !important; }
.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 120px 36px; gap: 8px; margin-bottom: 8px; }
.flavor-edit-row { display:grid; grid-template-columns:minmax(240px,2fr) minmax(120px,1fr); gap:10px; margin-bottom:10px; padding:10px; border:1px solid var(--line); border-radius:10px; background:#f8fbfa; }
.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: 10px 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: 165px 205px 300px minmax(560px, 1fr); height: clamp(620px, calc(100vh - 190px), 850px); min-height: 0; overflow: hidden; }
.wa-mobile-back { display: none; }
.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-load-more { display: block; width: calc(100% - 20px); margin: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f3f8f5; color: var(--green); font-weight: 800; cursor: pointer; }
.tracking-latest { max-width: 280px; color: #345c4a; white-space: normal; }
.tracking-error { max-width: 280px; color: #b33b32; white-space: normal; }
.tracking-refresh { margin-top: 5px; padding: 4px 8px; border: 1px solid #b9d4c6; border-radius: 8px; background: #eef8f3; color: var(--green); font-size: 11px; font-weight: 800; cursor: pointer; }
.tracking-detail { margin: 5px 0 0 5px; padding: 4px 8px; border: 1px solid #147653; border-radius: 8px; background: #147653; color: white; font-size: 11px; font-weight: 800; cursor: pointer; }
.tracking-exception-status { color: #d62828 !important; font-weight: 900; }
.tracking-timeline-dialog { width: min(720px, calc(100vw - 28px)); }
.tracking-timeline-summary { display: grid; gap: 5px; padding: 14px 16px; border-radius: 12px; background: #eef8f3; margin-bottom: 16px; }
.tracking-timeline-summary strong { font-size: 20px; }
.tracking-timeline-summary small { color: #60736a; }
.tracking-timeline-content { max-height: 58vh; overflow: auto; padding: 2px 12px 2px 5px; }
.tracking-timeline-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 10px; min-height: 82px; }
.tracking-timeline-item::before { content: ""; position: absolute; left: 9px; top: 19px; bottom: -1px; width: 2px; background: #cadbd2; }
.tracking-timeline-item:last-child::before { display: none; }
.tracking-timeline-dot { position: relative; z-index: 1; width: 18px; height: 18px; border: 3px solid #8aaca0; border-radius: 50%; background: white; }
.tracking-timeline-item.latest .tracking-timeline-dot { border-color: #20a967; background: #20a967; box-shadow: inset 0 0 0 3px white; }
.tracking-timeline-item div { display: grid; align-content: start; gap: 4px; padding-bottom: 18px; }
.tracking-timeline-item time { color: #64776e; font-size: 12px; }
.tracking-timeline-item strong { line-height: 1.45; }
.tracking-timeline-item small { color: #52665d; }
.knowledge-hero { background: linear-gradient(135deg, #174f3d, #24785b); }
.knowledge-toolbar { display: grid; grid-template-columns: minmax(300px, 1fr) 180px minmax(220px, 360px); gap: 12px; align-items: center; margin-bottom: 16px; }
.knowledge-learning-status { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; }
.knowledge-learning-status > div { display: grid; gap: 4px; padding: 10px 12px; border-right: 1px solid var(--line); }
.knowledge-learning-status > div:last-child { border-right: 0; }
.knowledge-learning-status small { color: #687970; }
.learning-ready { color: #147653; }
.knowledge-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.knowledge-tabs button { border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; background: white; color: #254b3d; font-weight: 800; cursor: pointer; }
.knowledge-tabs button.active { background: var(--green); color: white; border-color: var(--green); }
.knowledge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.knowledge-card { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 8px 24px rgba(20, 62, 47, .06); }
.knowledge-card header, .knowledge-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.knowledge-card h4 { margin: 0; font-size: 18px; }
.knowledge-category { padding: 5px 10px; border-radius: 999px; background: #e7f5ed; color: #146645; font-weight: 900; font-size: 12px; }
.knowledge-question, .knowledge-answer { padding: 12px; border-radius: 12px; background: #f6f9f7; }
.knowledge-answer { background: #eef8f2; }
.knowledge-question small, .knowledge-answer small { color: #62766c; font-weight: 800; }
.knowledge-question p, .knowledge-answer p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.6; }
.knowledge-meta { display: flex; gap: 8px 14px; flex-wrap: wrap; color: #61736a; font-size: 12px; }
.knowledge-card footer > small { color: #708078; }
.knowledge-approved { background: #dff4e7; color: #127149; }
.knowledge-pending { background: #fff1c9; color: #8a6100; }
.knowledge-rejected { background: #ffe1df; color: #a3312b; }
.knowledge-approve { background: #15724e !important; color: white !important; }
@media (max-width: 820px) {
  .knowledge-toolbar { grid-template-columns: 1fr; }
  .knowledge-learning-status { grid-template-columns: repeat(2, 1fr); }
  .knowledge-grid { grid-template-columns: 1fr; }
}
.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-swipe { position: relative; overflow: hidden; background: #e74941; }
.wa-conversation-swipe .wa-conversation-item { position: relative; z-index: 1; background: white; transition: transform .18s ease; }
.wa-conversation-swipe .wa-conversation-item:hover,
.wa-conversation-swipe .wa-conversation-item.active { background: #eaf5ef; }
.wa-swipe-delete { position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 76px; border: 0; background: #e74941; color: white; font-weight: 800; }
.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-assignee-badge { display: inline-flex; max-width: 100%; margin-top: 5px; padding: 2px 6px; border-radius: 8px; background: #fff0cf; color: #8a5a00; font-size: 9px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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-conversation-meta .wa-latest-order-date { margin-top: auto; color: #a26812; font-size: 9px; font-weight: 750; line-height: 1.35; text-align: right; white-space: nowrap; }
.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,
.wa-chat-contact-head #waCreateOrder { width: auto; min-width: 88px; height: 38px; padding: 8px 12px; white-space: nowrap; font-size: 12px; }
.wa-chat-contact-head #waGroupMembers { width:auto; min-width:84px; height:38px; padding:8px 12px; white-space:nowrap; font-size:12px; }
.wa-group-members-dialog{width:min(720px,calc(100vw - 28px));max-height:86vh;padding:0;border:0;border-radius:20px;overflow:hidden;box-shadow:0 28px 80px rgba(10,44,32,.28)}
.wa-group-members-dialog::backdrop{background:rgba(7,28,21,.46);backdrop-filter:blur(3px)}
.wa-group-members-dialog .dialog-head{padding:20px 22px 14px;border-bottom:1px solid var(--line)}
.wa-group-members-dialog>input{display:block;width:calc(100% - 44px);margin:16px 22px 10px}
.wa-group-members-list{display:grid;gap:8px;max-height:60vh;padding:4px 22px 22px;overflow:auto}
.wa-group-member{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid #dfe9e4;border-radius:14px;background:#fff}
.wa-group-member-copy{min-width:0;flex:1}.wa-group-member-copy strong,.wa-group-member-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wa-group-member-copy small{margin-top:4px;color:var(--muted);font-size:11px}.wa-group-member>button{flex:0 0 auto}
@media(max-width:700px){.wa-group-members-dialog{width:calc(100vw - 14px);max-height:94vh}.wa-group-members-list{max-height:68vh;padding-inline:12px}.wa-group-members-dialog .dialog-head{padding-inline:14px}.wa-group-members-dialog>input{width:calc(100% - 28px);margin-inline:14px}.wa-group-member{padding:10px}.wa-group-member>button{padding:7px 9px;font-size:11px}}
.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-load-older-wrap { position: sticky; top: 0; z-index: 3; display: flex; justify-content: center; width: 100%; margin: -10px 0 18px; pointer-events: none; }
.wa-load-older { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; min-width: 176px; min-height: 44px; padding: 7px 16px 7px 9px; border: 1px solid rgba(18,113,79,.18); border-radius: 999px; color: #125f45; background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(15,70,50,.13), inset 0 1px 0 rgba(255,255,255,.8); backdrop-filter: blur(10px); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.wa-load-older:hover { transform: translateY(-1px); border-color: rgba(18,113,79,.38); background: #fff; box-shadow: 0 11px 28px rgba(15,70,50,.18), inset 0 1px 0 #fff; }
.wa-load-older:focus-visible { outline: 3px solid rgba(31,151,105,.2); outline-offset: 2px; }
.wa-load-older:disabled { cursor: wait; opacity: .78; transform: none; }
.wa-load-older-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: linear-gradient(145deg,#16845c,#0e6848); box-shadow: 0 4px 10px rgba(16,105,73,.24); font-size: 15px; font-weight: 900; }
.wa-load-older-copy { display: grid; gap: 1px; text-align: left; line-height: 1.1; }
.wa-load-older-copy strong { font-size: 12px; font-weight: 850; letter-spacing: .1px; }
.wa-load-older-copy small { color: #70877e; font-size: 9px; font-weight: 600; }
.wa-load-older.loading .wa-load-older-icon { font-size: 0; }
.wa-load-older.loading .wa-load-older-icon::after { width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; content: ""; animation: wa-load-spin .7s linear infinite; }
@keyframes wa-load-spin { to { transform: rotate(360deg); } }
.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-message-bubble p { -webkit-user-select: text; user-select: text; }
.wa-message-bubble p.wa-text-selecting { outline: 2px solid rgba(25,112,74,.28); outline-offset: 4px; border-radius: 3px; }
.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 { display: block; width: 100%; margin-bottom: 8px; padding: 7px 9px; border: 0; border-left: 3px solid #49a477; border-radius: 6px; background: rgba(255,255,255,.58); text-align: left; font: inherit; }
.wa-quoted-content.is-clickable { cursor: pointer; }
.wa-quoted-content.is-clickable:hover { background: rgba(73,164,119,.13); }
.wa-quoted-content:focus-visible { outline: 3px solid rgba(18,112,77,.22); outline-offset: 2px; }
.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-message-jump-highlight .wa-message-bubble { animation: wa-message-jump-highlight 1.8s ease; }
@keyframes wa-message-jump-highlight { 0%, 35% { box-shadow: 0 0 0 4px rgba(255,181,36,.55), 0 4px 14px rgba(20,40,30,.18); } 100% { box-shadow: 0 2px 7px rgba(20,40,30,.09); } }
.wa-optimistic-row .wa-message-bubble { opacity: .82; }
.wa-optimistic-state { margin-left: 5px; color: #71847c; font-weight: 800; }
.wa-optimistic-row.failed .wa-message-bubble { border: 1px solid #e88780; opacity: 1; }
.wa-optimistic-row.failed .wa-optimistic-state { color: var(--danger); }
.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 .wa-reply-cancel { display: inline-grid; flex: none; width: 32px; height: 32px; padding: 0; place-items: center; border: 1px solid #d7e4dc; border-radius: 50%; background: #fff; color: #52685e; font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer; touch-action: manipulation; }
.wa-reply-preview .wa-reply-cancel:hover { border-color: #efb4ae; background: #fff2f1; color: var(--danger); }
.wa-reply-preview .wa-reply-cancel:focus-visible { outline: 3px solid rgba(18, 112, 77, .2); outline-offset: 2px; }
.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-pending-file { display: grid; grid-template-columns: 40px minmax(0, 1fr) 34px; align-items: center; gap: 10px; margin: 8px 12px 0; padding: 9px 10px; border: 1px solid #cfe0d8; border-radius: 12px; background: #f4faf7; color: #193e32; }
.wa-pending-file.hidden { display: none; }
.wa-pending-file-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #e3f2eb; font-size: 22px; }
.wa-pending-file-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wa-pending-file-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.wa-pending-file-info small { color: #6d8078; font-size: 11px; }
.wa-pending-file button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: white; color: var(--muted); cursor: pointer; }
.wa-pending-file.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-tag-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 3px; padding: 3px 2px; }
.wa-context-tag-row span { min-width: 0; padding: 0 6px; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wa-contact-context-menu .wa-context-tag-row button { width: auto; padding: 7px 6px; font-size: 11px; text-align: center; }
.wa-forward-dialog { width: min(430px, calc(100vw - 24px)); }
.wa-tag-dialog { width: min(520px, calc(100vw - 24px)); }
.wa-tag-dialog label { display: grid; gap: 8px; margin-top: 18px; font-weight: 700; }
.wa-tag-dialog select, .wa-tag-dialog input { width: 100%; }
.wa-tag-dialog small { color: var(--muted); font-weight: 400; }
.wa-tag-filter-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.wa-tag-filter-controls button { padding: 8px 10px; white-space: nowrap; font-size: 11px; }
.wa-manage-tags-list { display: grid; gap: 8px; max-height: 420px; margin-top: 16px; overflow-y: auto; }
.wa-manage-tag-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.wa-manage-tag-row span { min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wa-manage-tag-row button { padding: 7px 9px; }
.wa-tag-choice-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; color: var(--muted); }
.wa-tag-choice-divider::before, .wa-tag-choice-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.website-analytics-hero { background: linear-gradient(135deg, #153f34, #1f7055); color: white; }
.website-analytics-hero p { color: #dceee6; }
.website-center-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0; padding: 8px; border: 1px solid #dbe7e1; border-radius: 18px; background: rgba(255,255,255,.82); box-shadow: 0 12px 35px rgba(13,57,43,.06); }
.website-center-tabs button { position: relative; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; min-height: 72px; padding: 12px 16px; border: 0; border-radius: 13px; text-align: left; }
.website-center-tabs button > span { grid-row: 1 / 3; display: grid; place-items: center; align-self: center; width: 32px; height: 32px; border-radius: 10px; color: #537065; background: #edf3f0; font-size: 11px; font-weight: 900; }
.website-center-tabs button > b { align-self: end; font-size: 14px; }
.website-center-tabs button > small { align-self: start; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.website-center-tabs button.active { color: white; background: linear-gradient(135deg, #0f5a43, #197455); box-shadow: 0 9px 24px rgba(17,102,76,.22); }
.website-center-tabs button.active > span { color: white; background: rgba(255,255,255,.16); }
.website-center-tabs button.active > small { color: #cce8dc; }
.website-overview-toolbar, .website-task-toolbar { display: flex; align-items: end; gap: 16px; margin-bottom: 16px; padding: 16px; }
.website-overview-toolbar { align-items: center; min-height: 98px; padding: 18px 22px; border-color: #d8e6df; border-radius: 18px; background: linear-gradient(115deg, #fff 55%, #f1f8f5); box-shadow: 0 12px 34px rgba(13,57,43,.05); }
.website-selector-copy { min-width: 240px; }
.website-selector-copy strong, .website-selector-copy span { display: block; }
.website-selector-copy strong { margin: 3px 0 5px; font-size: 17px; }
.website-selector-copy span { color: var(--muted); font-size: 11px; }
.website-overview-toolbar label, .website-task-toolbar label { display: grid; gap: 6px; min-width: 320px; margin-left: auto; font-weight: 700; }
.website-overview-toolbar select { height: 48px; border-color: #bdd4c9; border-radius: 12px; background: white; font-weight: 800; box-shadow: 0 4px 14px rgba(18,77,58,.06); }
.website-live-status { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid #bce2cf; border-radius: 999px; color: #176b4e; background: #effaf4; font-size: 11px; font-weight: 800; white-space: nowrap; }
.website-live-status i { width: 8px; height: 8px; border-radius: 50%; background: #24ad70; box-shadow: 0 0 0 4px rgba(36,173,112,.12); }
.website-overview-toolbar span, .website-task-toolbar span { color: var(--muted); font-size: 12px; }
.website-overview-columns, .website-goal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.website-overview-columns > section, .website-goal-grid > section, .website-advice-panel { padding: 22px; border-color: #dce7e1; border-radius: 18px; box-shadow: 0 12px 34px rgba(13,57,43,.055); }
.website-section-title { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.website-section-title h3 { margin: 4px 0 12px; }
.source-tag { padding: 5px 9px; border-radius: 999px; color: var(--green); background: #e8f5ee; font-size: 10px; font-weight: 800; }
.source-tag.pending { color: #8d6a20; background: #fff5d8; }
.website-seo-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.website-seo-metric { position: relative; min-height: 116px; padding: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #fff, #f7fbf9); transition: transform .18s ease, box-shadow .18s ease; }
.website-seo-metric:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(12,63,46,.08); }
.website-seo-metric.ready::after { content: ""; position: absolute; right: -22px; bottom: -28px; width: 78px; height: 78px; border-radius: 50%; background: rgba(30,139,97,.07); }
.website-metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.website-metric-top i { padding: 3px 6px; border-radius: 999px; color: #277556; background: #e9f7f0; font-size: 8px; font-style: normal; font-weight: 900; }
.website-seo-metric.pending .website-metric-top i { color: #96701c; background: #fff1c9; }
.website-seo-metric span, .website-seo-metric small { display: block; color: var(--muted); font-size: 11px; }
.website-seo-metric strong { display: block; margin: 9px 0 6px; color: #123d30; font-size: 27px; letter-spacing: -.7px; }
.website-seo-metric.pending strong { color: #9b7a2f; font-size: 15px; }
.website-advice-list { display: grid; gap: 9px; }
.website-advice-list article { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e1ebe6; border-radius: 12px; background: linear-gradient(90deg, #f8fbf9, #fff); }
.website-advice-list b { display: grid; place-items: center; flex: none; width: 23px; height: 23px; border-radius: 50%; color: white; background: var(--green); }
.website-user-action.completed { border-color:#16845b!important; background:#eaf8f1!important; color:#0f6848; }
.website-user-action.completed b { background:#16845b; }
.website-user-action.overdue { border-color:#d94545!important; background:#fff0f0!important; color:#a32626; }
.website-user-action.overdue b { background:#d94545; }
.website-user-action span,.website-user-action small { display:block; }
.website-user-action small { margin-top:5px; color:var(--muted); }
.website-search-panel { margin-top: 16px; padding: 22px; border-color: #dce7e1; border-radius: 18px; box-shadow: 0 12px 34px rgba(13,57,43,.055); }
.website-search-panel table { min-width: 760px; }
.website-goal-list { display: grid; gap: 8px; }
.website-goal-list article { padding: 12px; border-left: 4px solid #bfcac4; background: #f7faf8; }
.website-goal-list article.completed { border-color: #16845b; background: #eaf8f1; color: #0f6848; }
.website-goal-list strong, .website-goal-list small { display: block; }
.website-goal-list small { margin-top: 5px; color: var(--muted); }
.website-week-grid { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 9px; overflow-x: auto; }
.website-week-grid > section { min-height: 190px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfb; }
.website-week-grid h4 { margin: 2px 0 10px; }
.website-task { display: flex; gap: 7px; margin-bottom: 8px; padding: 9px; border-left: 4px solid #81a897; border-radius: 8px; background: white; }
.website-task.completed { border-color: #16845b; background: #eaf8f1; color: #0f6848; }
.website-task.completed button { background: #16845b; border-color: #16845b; color: #fff; }
.website-task.overdue { border-color: #d94545; background: #fff0f0; }
.website-task.overdue strong, .website-task.overdue small { color: #a32626; }
.website-task button { flex: none; width: 25px; height: 25px; padding: 0; border-radius: 50%; }
.website-task strong, .website-task small { display: block; font-size: 10px; line-height: 1.35; }
.website-task small { margin-top: 4px; color: var(--muted); }
.website-carryover-panel { margin-top: 16px; border-color: #f0c7c7; background: linear-gradient(145deg,#fff,#fff8f8); }
.website-carryover-panel .website-section-title p { margin: 3px 0 12px; color: var(--muted); font-size: 11px; }
.website-carryover-panel .website-section-title > strong { color: #a32626; }
.website-carryover-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 9px; }
.website-carryover-grid .website-task { margin: 0; min-height: 66px; }
.website-carryover-grid .website-task strong { font-size: 11px; }
.backlink-toolbar { display: flex; align-items: end; gap: 12px; margin-bottom: 16px; padding: 18px; flex-wrap: wrap; }
.backlink-command-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: 28px; overflow: hidden; border-radius: 20px; color: white; background: radial-gradient(circle at 85% 0,rgba(63,205,144,.22),transparent 32%),linear-gradient(135deg,#092d24,#145c46); box-shadow: 0 18px 42px rgba(8,51,39,.18); }
.backlink-command-hero h2 { margin: 5px 0 8px; font-size: 25px; }.backlink-command-hero p { margin: 0; color: #cce4da; }.backlink-command-hero .eyebrow { color: #64d5a7; }
.backlink-ai-badge { display: grid; grid-template-columns: auto 1fr; gap: 3px 9px; min-width: 190px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }.backlink-ai-badge i { grid-row: 1/3; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: #55e5a9; box-shadow: 0 0 0 5px rgba(85,229,169,.12); }.backlink-ai-badge span,.backlink-ai-badge strong { display:block; }.backlink-ai-badge span { color:#b9d8cc;font-size:10px; }.backlink-ai-badge strong { font-size:13px; }
.backlink-toolbar label { display: grid; gap: 6px; min-width: 210px; color: var(--muted); font-size: 11px; font-weight: 800; }
.backlink-toolbar button { margin-left: auto; }
.backlink-summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; }
.backlink-summary article { padding: 16px; border: 1px solid #dbe7e1; border-radius: 14px; background: linear-gradient(145deg,#fff,#f4faf7); }
.backlink-summary span, .backlink-summary strong { display: block; }
.backlink-summary span { color: var(--muted); font-size: 11px; }
.backlink-summary strong { margin-top: 8px; font-size: 25px; }
.backlink-guidance, .backlink-table-panel { margin-bottom: 16px; padding: 20px; }
.backlink-ai-panel { margin-bottom: 16px; padding: 22px; border-color: #cfe2d9; background: linear-gradient(145deg,#fff,#f4faf7); box-shadow: 0 14px 35px rgba(11,69,50,.07); }.backlink-ai-panel .website-section-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }.backlink-ai-placeholder { display:grid;place-items:center;min-height:130px;margin-top:14px;border:1px dashed #bcd2c7;border-radius:14px;color:var(--muted);text-align:center; }.backlink-ai-placeholder strong,.backlink-ai-placeholder span { display:block; }.backlink-ai-placeholder strong { color:#214c3d;margin-bottom:5px; }.backlink-ai-summary { margin:15px 0;padding:14px;border-left:4px solid #1f8d65;border-radius:8px;background:#eaf7f1;font-weight:700; }.backlink-ai-grid { display:grid;grid-template-columns:repeat(5,minmax(160px,1fr));gap:10px;overflow-x:auto; }.backlink-ai-grid section { padding:13px;border:1px solid #dbe7e1;border-radius:12px;background:white; }.backlink-ai-grid h4 { margin:0 0 9px;color:#15583f; }.backlink-ai-grid ol { margin:0;padding-left:18px; }.backlink-ai-grid li { margin:6px 0;color:#49665b;font-size:10px;line-height:1.45; }
.backlink-market-tags { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.backlink-market-tags span { padding: 6px 10px; border-radius: 999px; color: #176b4e; background: #eaf7f0; font-size: 10px; font-weight: 800; }
.backlink-market-tags .future { color: #806a36; background: #faf3df; }
.backlink-table-panel table { min-width: 1120px; }
.backlink-table-panel td small { display: block; margin-top: 3px; color: var(--muted); }
.backlink-risk { padding: 4px 7px; border-radius: 999px; background: #edf4f0; font-size: 9px; }
.backlink-risk.high { color: #a32929; background: #ffe8e8; }
#backlinkDialog { width: min(760px,calc(100vw - 24px)); }
@media (max-width: 900px) { .backlink-summary { grid-template-columns: repeat(2,minmax(120px,1fr)); } }
@media (max-width: 900px) { .backlink-command-hero { align-items:flex-start;flex-direction:column; }.backlink-ai-badge { width:100%; }.backlink-ai-grid { grid-template-columns:repeat(5,220px); } }
.website-analytics-toolbar { display: flex; align-items: end; gap: 12px; margin: 16px 0; padding: 16px; flex-wrap: wrap; }
.website-analytics-toolbar label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.website-analytics-toolbar input { min-width: 160px; }
.website-analytics-metrics { margin-bottom: 16px; }
.website-analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.website-breakdown { min-height: 220px; padding: 18px; }
.website-breakdown h3 { margin: 0 0 14px; }
.website-breakdown-row { display: grid; grid-template-columns: minmax(100px, 1fr) 2fr auto; align-items: center; gap: 10px; margin: 9px 0; font-size: 12px; }
.website-breakdown-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.website-breakdown-bar { height: 8px; overflow: hidden; border-radius: 999px; background: #e6eee9; }
.website-breakdown-bar i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.website-breakdown-empty { color: var(--muted); font-size: 13px; }
.website-visitors-panel { padding: 18px; }
.website-visitors-head, .website-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.website-visitors-head h3 { margin: 3px 0 14px; }
.website-visitors-head span { color: var(--muted); font-size: 12px; }
.website-visitors-table { min-width: 1120px; }
.website-visitors-table td { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.website-management-panel { margin: 0 0 16px; padding: 18px; }
.website-management-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.website-management-actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.website-management-actions label { min-width: 280px; }
.website-management-head h3 { margin: 3px 0 6px; }
.website-management-head p { margin: 0; color: var(--muted); }
.website-api-checks { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 10px; margin: 16px 0; }
.website-api-check { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f7faf8; }
.website-api-check strong, .website-api-check small { display: block; }
.website-api-check small { margin-top: 5px; color: var(--muted); }
.website-api-check.ok { border-color: #a7d8c2; background: #f0faf5; }
.website-api-check.failed { border-color: #efb4ad; background: #fff5f3; }
.website-resource-tabs { display: flex; gap: 8px; margin: 6px 0 12px; }
.website-resource-tabs .active { color: white; border-color: var(--green); background: var(--green); }
.website-resource-table { max-height: 460px; overflow: auto; }
.website-resource-table table { min-width: 780px; }
.website-resource-table td { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .website-api-checks { grid-template-columns: repeat(2, minmax(130px, 1fr)); } }
.website-pagination { justify-content: center; margin-top: 16px; }
@media (max-width: 900px) { .website-analytics-grid { grid-template-columns: 1fr; } .website-analytics-toolbar > * { flex: 1 1 140px; } }
@media (max-width: 900px) { .website-center-tabs { grid-template-columns: 1fr; } .website-overview-toolbar { align-items: stretch; flex-direction: column; } .website-overview-toolbar label { width: 100%; min-width: 0; margin-left: 0; } .website-live-status { align-self: flex-start; } .website-overview-columns, .website-goal-grid { grid-template-columns: 1fr; } .website-seo-metrics { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .website-seo-metrics { grid-template-columns: 1fr; } }
.wa-forward-dialog select { width: 100%; }
.wa-chat-contact-head #waViewCustomer { width: auto; min-width: 112px; height: 38px; padding: 8px 12px; white-space: nowrap; font-size: 12px; }
.customer-detail-dialog { width: min(760px, calc(100vw - 24px)); }
.customer-detail-head { position: sticky; z-index: 3; top: 0; margin: -1px 0 16px; padding: 12px 0; background: white; }
.customer-detail-head > div { flex: 1; min-width: 0; }
.customer-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.customer-profile-grid > div, .customer-profile-stat { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfb; text-align: left; }
.customer-profile-grid .wide { grid-column: 1 / -1; }
.customer-profile-grid span, .customer-profile-grid small { display: block; color: var(--muted); font-size: 10px; }
.customer-profile-grid strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 14px; }
.customer-profile-stat { cursor: pointer; color: var(--green); }
.customer-profile-stat:hover { background: #edf7f1; }
.customer-profile-stat.complaint { color: var(--danger); }
.customer-profile-stat small { margin-top: 5px; }
.customer-profile-contacts { margin-top: 18px; }
.customer-profile-contacts h4 { margin: 0 0 10px; }
.customer-profile-contacts article { display: grid; grid-template-columns: 1.2fr .8fr 1fr 1fr 1.3fr; gap: 8px; padding: 11px; border-top: 1px solid var(--line); font-size: 11px; }
.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; }
#waEmojiPanel { display: grid; grid-template-columns: repeat(8, 1fr); width: min(390px, calc(100% - 24px)); max-height: 300px; overflow-y: auto; }
#waEmojiPanel button { display: grid; min-width: 34px; min-height: 34px; place-items: center; padding: 3px; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
.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; }
.whatsapp-active #whatsappPage { padding-right: 16px; padding-left: 16px; }
.whatsapp-active .topbar { padding-bottom: 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-status-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 18px; }
.wa-status-filter { display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--green); cursor: pointer; font-weight: 700; }
.wa-status-filter strong { min-width: 26px; padding: 3px 8px; border-radius: 20px; background: #edf5f1; text-align: center; }
.wa-status-filter.active { background: #176c50; color: white; border-color: #176c50; }
.wa-status-filter.active strong { background: #ffffff26; }
.wa-status-refresh { margin-left: auto; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--green); cursor: pointer; }
.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-detail-button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 13px 7px 9px;
  border: 1px solid rgba(22,104,73,.24); border-radius: 10px;
  background: linear-gradient(145deg, #ffffff 0%, #edf8f3 100%); color: var(--green-2);
  font-size: 12px; font-weight: 750; letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 5px 14px rgba(15,81,56,.09), inset 0 1px 0 rgba(255,255,255,.92);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}
.history-detail-icon {
  display: grid; width: 20px; height: 20px; place-items: center; border-radius: 7px;
  background: linear-gradient(145deg, var(--green), var(--green-2)); color: #fff;
  font-size: 12px; line-height: 1; box-shadow: 0 3px 8px rgba(15,81,56,.22);
}
.history-detail-button:hover { border-color: rgba(22,104,73,.5); color: #0b442f; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15,81,56,.15), inset 0 1px 0 #fff; }
.history-detail-button:active { transform: translateY(0); box-shadow: 0 3px 8px rgba(15,81,56,.12); }
.history-detail-button:focus-visible { outline: 3px solid rgba(22,104,73,.18); outline-offset: 2px; }
.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: 1100px) {
  html, body, .app, #appView, #whatsappPage { max-width: 100%; overflow-x: hidden !important; }
  .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; }
  .topbar-actions { margin-left: auto; }
  .order-notification-panel { position: fixed; top: 68px; right: 16px; left: 16px; width: auto; }
  .metric-grid, .dashboard-ranking-grid, .placeholder-grid, .form-grid { grid-template-columns: 1fr; }
  .order-service-options { grid-template-columns: 1fr; }
  .order-service-card-wide { grid-column: auto; }
  .order-item-labels { display: none; }
  .order-item-row { grid-template-columns: 1fr 65px 85px 95px 34px; }
  .flavor-entry-row { grid-template-columns: 1fr 90px 80px 80px 34px; }
  .flavor-edit-row { grid-template-columns:1fr; }
  .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; }
}

.wa-workbench-account { position: relative; }
.wa-unread-badge { display: inline-flex !important; min-width: 19px; height: 19px; align-items: center; justify-content: center; padding: 0 5px; border-radius: 999px; background: #e53935 !important; color: #fff !important; font-size: 11px; font-style: normal; font-weight: 800; line-height: 1; }
.wa-account-unread { position: absolute; top: 10px; right: 10px; }
.wa-website-binding { margin-block:6px; color:var(--green); }
.wa-inquiry-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin:10px 0; }
.wa-inquiry-metrics > div { display:grid; gap:2px; padding:9px; border:1px solid #dcebe3; border-radius:10px; background:#f4faf6; }
.wa-inquiry-metrics small,.wa-inquiry-metrics span,.wa-inquiry-metrics em { color:#63736b; font-size:11px; font-style:normal; }
.wa-inquiry-metrics strong { color:var(--green); font-size:22px; line-height:1; }
.wa-inquiry-metrics em { margin-top:3px; color:#8a6415; font-weight:700; }
.wa-mobile-navigation, .wa-mobile-account-drawer { display: none; }

@media (max-width: 1100px) {
  body.whatsapp-active { background: white; }
  body.whatsapp-active.wa-view-chat { overflow: hidden; }
  body.whatsapp-active.wa-view-accounts, body.whatsapp-active.wa-view-materials { overflow-y: auto; }
  .whatsapp-active .sidebar, .whatsapp-active .topbar { display: none; }
  .whatsapp-active #whatsappPage { min-height: 100dvh; height: auto; padding: 52px 0 0; overflow: visible; }
  .whatsapp-active.wa-view-chat #whatsappPage { height: 100dvh; overflow: hidden; }
  .whatsapp-active .wa-mobile-navigation { display: grid; position: fixed; z-index: 100; top: 0; right: 0; left: 0; grid-template-columns: auto 1fr auto; gap: 5px; height: 52px; box-sizing: border-box; padding: 7px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
  .wa-mobile-chat-open.whatsapp-active .wa-mobile-navigation { display: none; }
  .whatsapp-active .wa-mobile-navigation button { min-width: 0; padding: 9px 8px; border: 0; border-radius: 9px; background: #eef5f1; color: var(--green); font-size: 12px; font-weight: 800; white-space: nowrap; }
  .whatsapp-active .wa-mobile-navigation button:nth-child(2) { background: var(--green); color: white; }
  .whatsapp-active .whatsapp-subnav { display: grid; position: sticky; z-index: 20; top: 52px; width: 100%; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 0; padding: 5px; border-radius: 0; }
  .whatsapp-active .whatsapp-subnav button { min-width: 0; padding: 9px 4px; font-size: 11px; }
  .whatsapp-active.wa-view-chat .whatsapp-subnav { display: none; }
  .whatsapp-active.wa-view-chat #whatsappPage { padding-top: 52px; }
  .wa-mobile-chat-open.whatsapp-active.wa-view-chat #whatsappPage { padding-top: 0; }
  .whatsapp-active .whatsapp-chat-panel { position: relative; height: calc(100dvh - 52px); margin: 0; border-radius: 0; box-shadow: none; }
  .wa-mobile-chat-open.whatsapp-active .whatsapp-chat-panel { height: 100dvh; }
  .whatsapp-active .wa-workbench-head { display: none; }
  .whatsapp-active .wa-chat-layout { display: block; height: 100%; overflow: hidden; }
  .whatsapp-active .wa-staff-pane, .whatsapp-active .wa-account-pane { display: none; }
  .whatsapp-active .wa-conversation-pane { width: 100%; height: 100%; border: 0; }
  .whatsapp-active .wa-conversation-title { min-height: 38px; padding: 9px 13px; }
  .whatsapp-active .wa-conversation-tabs button { padding-block: 9px; }
  .whatsapp-active .wa-conversation-filters { grid-template-columns: minmax(0, 1fr) 112px; padding: 8px; }
  .whatsapp-active .wa-conversation-item { min-height: 70px; padding: 9px 12px; }
  .whatsapp-active .wa-conversation-swipe.revealed .wa-conversation-item { transform: translateX(-76px); }
  .whatsapp-active .wa-chat-main { display: none; position: fixed; z-index: 110; top: 0; right: 0; bottom: 0; left: 0; box-sizing: border-box; width: 100%; max-width: 100%; height: 100dvh; overflow: hidden; background: #edf4ef; }
  .wa-mobile-chat-open.whatsapp-active .wa-chat-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
  .wa-mobile-chat-open.whatsapp-active .wa-conversation-pane { display: none; }
  .whatsapp-active .wa-chat-contact-head { position: sticky; top: 0; z-index: 4; min-height: 56px; padding: 7px 9px; gap: 8px; }
  .whatsapp-active .wa-mobile-back { display: grid; flex: none; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #edf5f0; color: var(--green); font-size: 30px; line-height: 1; }
  .whatsapp-active .wa-chat-contact-head > div:first-of-type { min-width: 0; max-width: calc(100% - 150px); }
  .whatsapp-active .wa-chat-contact-head .card-actions select { display: none; }
  .whatsapp-active .wa-chat-contact-head #waCreateCustomer { max-width: 92px; min-width: 70px; padding-inline: 7px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
  .whatsapp-active .wa-chat-contact-head #waCreateOrder { max-width: 80px; min-width: 66px; padding-inline: 7px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
  .whatsapp-active .wa-chat-contact-head #waViewCustomer { max-width: 92px; min-width: 70px; padding-inline: 7px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
  .whatsapp-active #waMessageContextMenu { display: grid; position: fixed; right: 10px; bottom: 18px; left: 10px !important; top: auto !important; width: auto; max-height: none; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; border-radius: 16px; }
  .whatsapp-active #waMessageContextMenu button { padding: 14px 5px; text-align: center; font-size: 13px; font-weight: 800; }
  .whatsapp-active.wa-view-accounts .whatsapp-protocol-welcome.wa-account-view { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 0; margin: 0 8px 10px; padding: 12px 14px; border-radius: 14px; }
  .whatsapp-active.wa-view-accounts .whatsapp-protocol-welcome .eyebrow,
  .whatsapp-active.wa-view-accounts .whatsapp-protocol-welcome p:not(.eyebrow) { display: none; }
  .whatsapp-active.wa-view-accounts .whatsapp-protocol-welcome h3 { margin: 0; font-size: 18px; }
  .whatsapp-active.wa-view-accounts .whatsapp-protocol-welcome #addWhatsappAccount { padding: 9px 10px; font-size: 11px; white-space: nowrap; }
  #customerDialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  #customerDialog form { height: 100%; overflow-y: auto; padding-top: 0; }
  #customerDialog .dialog-head { position: sticky; z-index: 5; top: 0; margin: 0 -22px 14px; padding: 10px 14px; background: white; border-bottom: 1px solid var(--line); }
  #customerDialog .dialog-head h3 { font-size: 18px; }
  .customer-detail-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .customer-detail-dialog .dialog-body { height: 100%; overflow-y: auto; padding: 0 14px 20px; }
  .customer-detail-head { margin: 0 -14px 12px; padding: 10px; border-bottom: 1px solid var(--line); }
  .customer-detail-head .secondary, .customer-detail-head .primary { padding: 8px; font-size: 10px; }
  .customer-profile-grid { grid-template-columns: 1fr; }
  .customer-profile-grid .wide { grid-column: auto; }
  .customer-profile-contacts article { grid-template-columns: 1fr 1fr; }
  .whatsapp-active .wa-message-list { padding: 14px 10px; }
  .whatsapp-active .wa-load-older-wrap { margin: -3px 0 14px; }
  .whatsapp-active .wa-chat-contact-head, .whatsapp-active .wa-message-list, .whatsapp-active .wa-composer { box-sizing: border-box; width: 100%; max-width: 100%; overflow-x: hidden; }
  .whatsapp-active .wa-message-row { width: 100%; }
  .whatsapp-active .wa-message-bubble { max-width: 88%; min-width: 0; padding: 9px 11px 7px; overflow: hidden; }
  .whatsapp-active .wa-media-card { width: 100%; min-width: 0; }
  .whatsapp-active .wa-media-card img, .whatsapp-active .wa-media-card video { width: 100%; max-width: 100%; max-height: 280px; }
  .whatsapp-active .wa-media-card.document { min-width: 0; }
  .whatsapp-active .wa-composer { padding-bottom: env(safe-area-inset-bottom); }
  .whatsapp-active .wa-composer-tools { flex-wrap: nowrap; min-height: 40px; padding: 4px 6px; overflow-x: auto; }
  .whatsapp-active .wa-composer-tools > button { flex: none; padding: 5px 7px; }
  .whatsapp-active .wa-composer-tools > button span { display: none; }
  .whatsapp-active .wa-translate-control { flex: none; margin-left: 4px; }
  .whatsapp-active .wa-message-form { grid-template-columns: minmax(0, 1fr) 58px; gap: 6px; padding: 7px; }
  .whatsapp-active .wa-message-form textarea { min-height: 44px; max-height: 92px; padding: 10px; }
  .whatsapp-active .wa-message-form button { min-height: 44px; padding-inline: 8px; }
  .whatsapp-active .wa-tool-popover { position: fixed; z-index: 40; right: 8px; bottom: 112px; left: 8px; width: auto; max-height: 48dvh; overflow-y: auto; }
  .whatsapp-active #waEmojiPanel { grid-template-columns: repeat(7, minmax(34px, 1fr)); align-content: start; padding: 9px; }
  .whatsapp-active #waEmojiPanel button { min-height: 40px; font-size: 24px; }
  .whatsapp-active .wa-pending-image { margin: 5px 7px 0; }
  .whatsapp-active .wa-send-status { margin-inline: 7px; }
  .whatsapp-active .wa-mobile-account-drawer { display: block; position: absolute; z-index: 35; inset: 0; overflow-y: auto; padding: 12px; background: #f4f8f5; }
  .whatsapp-active .wa-mobile-account-drawer.hidden { display: none; }
  .whatsapp-active .wa-mobile-account-drawer > header { display: flex; position: sticky; z-index: 2; top: -12px; align-items: center; justify-content: space-between; margin: -12px -12px 10px; padding: 14px; border-bottom: 1px solid var(--line); background: white; }
  .whatsapp-active .wa-mobile-account-drawer > header button { padding: 8px 12px; border: 0; border-radius: 9px; color: var(--green); background: #e8f3ed; font-weight: 800; }
  .whatsapp-active .wa-mobile-account-drawer .wa-workbench-account { min-height: 96px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
  .whatsapp-active.wa-view-accounts .whatsapp-subnav { padding-block: 3px; }
  .whatsapp-active.wa-view-accounts .whatsapp-protocol-welcome { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 8px; padding: 13px 14px; border-radius: 14px; }
  .whatsapp-active.wa-view-accounts .whatsapp-protocol-welcome .eyebrow,
  .whatsapp-active.wa-view-accounts .whatsapp-protocol-welcome div > p:last-child { display: none; }
  .whatsapp-active.wa-view-accounts .whatsapp-protocol-welcome h3 { margin: 0; font-size: 18px; }
  .whatsapp-active.wa-view-accounts .whatsapp-protocol-welcome .primary { padding: 9px 11px; font-size: 11px; white-space: nowrap; }
  .whatsapp-active.wa-view-accounts #whatsappAccountGrid { grid-template-columns: 1fr; gap: 10px; padding: 0 8px 14px; }
  .whatsapp-active.wa-view-accounts .integration-card { padding: 14px; border-radius: 13px; }
}

/* 社媒群控 */
.social-hero {
  margin-bottom: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 25%, rgba(51,190,144,.25), transparent 22%),
    linear-gradient(125deg, #0b3b31, #176b50 62%, #248764);
}
.social-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.social-hero-actions .secondary {
  border-color: rgba(255,255,255,.28);
  color: #effff7;
  background: rgba(255,255,255,.08);
}
.social-hero-actions .secondary:hover { background: rgba(255,255,255,.16); }
.social-hero-actions .primary { background: #effff7; color: #0f5138; }
.social-hero-actions .primary:hover { background: white; }
.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; font-weight: 700;
}
.social-proxy-chip i {
  width: 8px; height: 8px; border-radius: 50%; background: #f0c36d;
  box-shadow: 0 0 0 4px rgba(240,195,109,.18);
}
.social-proxy-chip.online i { background: #6ff0ba; box-shadow: 0 0 0 4px rgba(111,240,186,.15); }

.social-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin: 0 0 16px; padding: 7px; border: 1px solid var(--line); border-radius: 16px;
  background: white; box-shadow: 0 8px 22px rgba(29,52,41,.045);
}
.social-tabs button {
  padding: 13px; border: 0; border-radius: 11px; background: transparent;
  color: var(--muted); font-weight: 800; cursor: pointer;
}
.social-tabs button.active {
  color: white; background: var(--green); box-shadow: 0 7px 18px rgba(14,111,77,.18);
}
.social-tab-panel { margin-bottom: 8px; }

.social-metric-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px;
}
.social-metric-grid article {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: white;
  box-shadow: 0 8px 22px rgba(29,52,41,.045);
}
.social-metric-grid small { color: var(--muted); font-size: 11px; font-weight: 700; }
.social-metric-grid strong { display: block; margin: 8px 0 4px; font-size: 28px; color: var(--green); letter-spacing: -.03em; }
.social-metric-grid span { color: var(--muted); font-size: 11px; line-height: 1.45; }

.social-control-layout {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .7fr); gap: 16px; align-items: start;
}
.social-matrix-panel, .social-side-panel, .social-task-panel, .social-composer-panel, .social-readiness-panel, .social-history-panel {
  padding: 20px;
}
.social-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 4px; }
.social-section-head h3, .social-platform-card h4, .social-readiness-panel h3 { margin: 0; }
.social-section-note { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.social-matrix-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.social-matrix-table { margin: 12px -20px 0; border-radius: 0; box-shadow: none; border-left: 0; border-right: 0; }
.social-matrix-table th { white-space: nowrap; }
.social-matrix-table small, .social-matrix-table em { display: block; margin-top: 3px; color: var(--muted); font-style: normal; font-size: 11px; }
.social-matrix-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.social-matrix-ops button {
  padding: 6px 9px; border: 1px solid #b8d8ca; border-radius: 9px;
  color: #106d4d; background: #e7f5ee; font-size: 11px; font-weight: 800;
}
.social-matrix-ops button:hover { background: #d8f0e4; }
.social-matrix-empty-row td { padding: 0; border: 0; }

.social-command-bar {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; margin-top: 16px;
}
.social-command-block {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #f7fbf9;
}
.social-command-block.accent {
  border-color: #b8ddcd;
  background: linear-gradient(145deg, #f1fbf6, #fff);
}
.social-command-block header {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.social-command-block header .eyebrow { margin: 0; }
.social-command-block header strong { font-size: 15px; }
.social-command-block header small { color: var(--muted); font-size: 11px; }
.social-action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.social-cmd {
  padding: 9px 12px; border: 1px solid #b8d8ca; border-radius: 10px;
  color: var(--green); background: white; font-weight: 800; font-size: 12px;
}
.social-cmd:hover { border-color: var(--green); background: #f4fbf7; }

.social-outreach-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.social-outreach-form { margin: 12px 0 14px; }
.social-outreach-table { margin: 0 -4px; }

.social-side-panel { position: sticky; top: 18px; }
.social-profile-list, .social-task-feed { display: grid; gap: 10px; margin-top: 12px; }
.social-profile-card, .social-task-card {
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f5faf7);
}
.social-profile-card header, .social-task-card header {
  display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 6px;
}
.social-profile-card header span, .social-task-card header span {
  padding: 4px 8px; border-radius: 999px; background: #e4f4ec; color: var(--green);
  font-size: 10px; font-weight: 800; white-space: nowrap;
}
.social-profile-card p, .social-task-card p { margin: 0 0 5px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.social-profile-card small, .social-task-card small { color: var(--muted); word-break: break-all; font-size: 10px; }
.social-side-empty {
  margin-top: 12px; padding: 22px 14px; border: 1px dashed #c9dbd2; border-radius: 14px;
  color: var(--muted); text-align: center; font-size: 12px; line-height: 1.55; background: #fafcfb;
}
.social-side-tasks { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.social-platform-grid { display: grid; grid-template-columns: repeat(4, 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 .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-card.tiktok .social-platform-logo { background: #101010; box-shadow: 3px 2px 0 #25f4ee, -3px -2px 0 #fe2c55; }
.social-oauth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.social-oauth-grid button { display: flex; align-items: center; gap: 12px; min-height: 74px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; }
.social-oauth-grid button:hover { border-color: var(--green); background: #f7fbf9; transform: translateY(-1px); }
.social-oauth-grid b { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--green); color: white; font-size: 18px; }
.social-oauth-grid span { display: grid; gap: 3px; font-weight: 800; }
.social-oauth-grid small { color: var(--muted); font-size: 12px; font-weight: 500; }
.social-browser-publish { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(420px, 1.6fr); gap: 18px; align-items: center; margin-top: 18px; padding: 18px; border: 1px solid #b8ddcd; border-radius: 16px; background: linear-gradient(135deg, #f1fbf6, #fff); }
.social-browser-publish h4 { margin: 2px 0 6px; font-size: 18px; }
.social-browser-publish small { color: var(--muted); }
.social-browser-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social-browser-buttons button { padding: 12px 14px; border: 1px solid #c9dcd3; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 800; cursor: pointer; }
.social-browser-buttons button:hover { border-color: var(--green); color: var(--green); background: #f8fffb; }
.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-name { max-width: 100%; padding: 0; border: 0; color: var(--ink); background: transparent; font: inherit; font-weight: 800; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-account-name:hover { color: var(--green); text-decoration: underline; }
.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-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: 16px; }
.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)); }
.instagram-detail-dialog { width: min(900px, calc(100vw - 28px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border-radius: 22px; }
.instagram-detail-dialog > .dialog-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg,#fbfffd,#f2faf6); }
.instagram-detail-dialog > .dialog-head h3 { margin: 3px 0 0; font-size: 22px; }
.instagram-detail-dialog > .dialog-actions { position: sticky; bottom: 0; margin: 0; padding: 14px 22px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.instagram-detail-body { display: grid; gap: 14px; max-height: calc(100vh - 190px); padding: 18px 22px 8px; overflow-y: auto; }
.instagram-detail-profile { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 15px; align-items: center; padding: 14px 16px; border: 1px solid #cfe3d9; border-radius: 16px; background: linear-gradient(135deg,#f7fcf9,#fff); }
.instagram-avatar-wrap { position: relative; width: 70px; height: 70px; }
.instagram-avatar-wrap > img, .instagram-detail-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; color: white; background: linear-gradient(145deg,#7b35b7,#e1306c 60%,#f9a437); font-size: 30px; }
.instagram-profile-copy { min-width: 0; }
.instagram-profile-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.instagram-profile-title strong { font-size: 17px; }
.instagram-profile-copy small { display: block; margin-top: 3px; color: var(--muted); }
.instagram-profile-copy p { margin: 8px 0 0; color: #526159; white-space: pre-line; line-height: 1.5; font-size: 12px; }
.instagram-sync-badge { padding: 4px 8px; border-radius: 999px; color: #865f00; background: #fff1c8; font-size: 9px; font-weight: 800; }
.instagram-sync-badge.ready { color: #086341; background: #ddf5e9; }
.instagram-detail-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.instagram-detail-metrics article { padding: 11px 14px; border: 1px solid var(--line); border-radius: 13px; text-align: center; background: #fff; }
.instagram-detail-metrics strong, .instagram-detail-metrics span { display: block; }
.instagram-detail-metrics strong { font-size: 23px; color: var(--green); }
.instagram-detail-metrics span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.instagram-detail-content { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.instagram-detail-section { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.instagram-detail-section > header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 11px; }
.instagram-detail-section .eyebrow { margin: 0 0 2px; font-size: 8px; }
.instagram-detail-section h4 { margin: 0; }
.instagram-detail-section header small { color: var(--muted); }
.instagram-post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.instagram-post-grid a { aspect-ratio: 1; border-radius: 11px; overflow: hidden; background: var(--paper); display: grid; place-items: center; color: var(--green); font-size: 11px; }
.instagram-post-grid img { width: 100%; height: 100%; object-fit: cover; }
.instagram-post-grid .empty-state { grid-column: 1/-1; }
.instagram-inbox-list { display: grid; gap: 7px; max-height: 260px; overflow: auto; }
.instagram-inbox-list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); text-decoration: none; }
.instagram-inbox-list a:hover, .instagram-inbox-list a.unread { border-color: #91cbb3; background: #f1faf6; }
.instagram-inbox-list img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.instagram-inbox-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.instagram-detail-empty { grid-column: 1/-1; display: grid; min-height: 126px; place-items: center; align-content: center; gap: 5px; padding: 18px; border: 1px dashed #cbded5; border-radius: 12px; color: var(--muted); text-align: center; background: #fafdfb; }
.instagram-detail-empty b { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--green); background: #e5f5ed; font-size: 16px; }
.instagram-detail-empty strong { color: #405048; font-size: 12px; }
.instagram-detail-empty span { font-size: 10px; }
.instagram-detail-sync { display: flex; align-items: center; gap: 7px; min-height: 22px; color: var(--muted); font-size: 10px; }
.instagram-detail-sync em { margin-left: auto; color: var(--danger); font-style: normal; }
.instagram-sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #d3a638; }
.instagram-sync-dot.ready { background: #23a875; box-shadow: 0 0 0 4px rgba(35,168,117,.1); }
.social-proxy-note { margin-top: 16px; color: #745500; background: #fff5d9; }
.social-task-panel { margin-bottom: 24px; }
#socialAgentTokenValue { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

@media (max-width: 1100px) {
  .social-platform-grid { grid-template-columns: 1fr 1fr; }
  .social-metric-grid, .social-control-layout, .social-control-grid, .social-command-bar, .social-browser-publish { grid-template-columns: 1fr; }
  .social-side-panel { position: static; }
  .social-platform-card { min-height: auto; }
  .marine-metric-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .marine-tabs, .marine-source-grid, .marine-exhibition-grid, .marine-metric-grid, .social-tabs, .social-metric-grid, .social-platform-grid { grid-template-columns: 1fr; }
  .marine-list article { grid-template-columns: 1fr; }
  .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%; }
  .instagram-post-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .instagram-detail-content { grid-template-columns: 1fr; }
  .instagram-detail-dialog > .dialog-head, .instagram-detail-body, .instagram-detail-dialog > .dialog-actions { padding-left: 14px; padding-right: 14px; }
}

/* 海上部队 */
.marine-hero { overflow: hidden; background: radial-gradient(circle at 78% 25%, rgba(51,190,144,.25), transparent 22%), linear-gradient(125deg, #0b3b31, #176b50 62%, #248764); }
.marine-radar { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.26); border-radius: 999px; color: white; background: rgba(255,255,255,.1); font-weight: 800; }
.marine-radar i { width: 9px; height: 9px; border-radius: 50%; background: #6ff0ba; box-shadow: 0 0 0 6px rgba(111,240,186,.13); }
.marine-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0; padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.marine-tabs button { padding: 13px; border: 0; border-radius: 11px; background: transparent; font-weight: 800; cursor: pointer; }
.marine-tabs button.active { color: white; background: var(--green); box-shadow: 0 7px 18px rgba(14,111,77,.18); }
.marine-ad-pagination { display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-top:14px; }
.marine-ad-pagination button { padding:8px 14px; border:1px solid var(--line); border-radius:10px; background:white; cursor:pointer; }
.marine-ad-pagination button:disabled { opacity:.45; cursor:default; }
.marine-lead-table-loading { opacity:.6; }
.marine-metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.marine-metric-grid article, .marine-source-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.marine-metric-grid strong { display: block; margin: 8px 0; font-size: 30px; color: var(--green); }
.marine-metric-grid article[role="button"]{cursor:pointer;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.marine-metric-grid article[role="button"]:hover,.marine-metric-grid article[role="button"]:focus{outline:0;transform:translateY(-2px);border-color:#7fc4aa;box-shadow:0 10px 24px rgba(14,111,77,.12)}
.marine-metric-grid span, .marine-metric-grid small, .marine-source-grid span { color: var(--muted); font-size: 11px; }
.marine-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.marine-source-grid b, .marine-source-grid span, .marine-source-grid em { display: block; }
.marine-source-grid b { font-size: 15px; }
.marine-source-grid span { min-height: 35px; margin: 7px 0 12px; line-height: 1.5; }
.marine-source-grid em { width: fit-content; padding: 5px 8px; border-radius: 999px; color: #87620a; background: #fff0c7; font-size: 10px; font-style: normal; font-weight: 800; }
.marine-source-grid em.ready { color: #0b6a49; background: #def5e9; }
.marine-social-source button { margin-top: 12px; border: 0; border-radius: 10px; padding: 9px 13px; color: white; background: #12714f; font-weight: 800; cursor: pointer; }
.marine-social-discovery { margin-top: 16px; padding: 22px; background: linear-gradient(135deg,#f8fcfa,#eef8f3); border-color: #badfce; }
.marine-social-discovery > div { margin-bottom: 16px; }
.marine-social-discovery > div h3 { margin: 4px 0; }
.marine-social-discovery > div span { color: var(--muted); }
.marine-social-discovery form { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; align-items: end; }
.marine-social-discovery form > label { display: grid; gap: 7px; font-size: 12px; font-weight: 800; }
.marine-social-discovery fieldset { display: flex; gap: 18px; min-height: 58px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; }
.marine-social-discovery fieldset label { display: flex; align-items: center; gap: 6px; }
.marine-social-actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.marine-social-actions .error { margin-right: auto; }
@media(max-width:1000px){.marine-social-discovery form{grid-template-columns:repeat(2,minmax(0,1fr))}.marine-social-actions{grid-column:1/-1}}
@media(max-width:650px){.marine-social-discovery form{grid-template-columns:1fr}.marine-social-actions{align-items:stretch;flex-direction:column}.marine-social-actions button{width:100%}}
.marine-task-builder { padding: 22px; }
.marine-form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.marine-list { display: grid; gap: 10px; margin-top: 14px; }
.marine-list article { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.marine-list small { display: block; margin-top: 5px; color: var(--muted); }
.marine-list span { padding: 6px 9px; border-radius: 999px; color: #87620a; background: #fff0c7; font-size: 11px; font-weight: 800; }
.marine-task-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.marine-task-actions button { padding: 7px 10px; border: 1px solid var(--green); border-radius: 9px; color: var(--green); background: white; font-weight: 800; cursor: pointer; }
.marine-table-panel { padding: 20px; }
.marine-exhibition-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.marine-exhibition-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg,#fff,#f2f9f5); }
.marine-exhibition-grid h3 { margin: 5px 0 16px; }
.marine-exhibition-grid article > div { display: flex; justify-content: space-between; gap: 12px; }
.marine-exhibition-grid b { color: #87620a; }
.marine-exhibition-grid a { color: var(--green); font-weight: 800; }
.marine-exhibition-panel{padding:20px}.marine-exhibition-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:14px}.marine-exhibition-head h3{margin:4px 0}.marine-exhibition-head span,.marine-exhibition-status{color:var(--muted)}.marine-exhibition-filters{display:flex;align-items:end;gap:10px}.marine-exhibition-filters label{min-width:150px}.marine-exhibition-filters select{display:block;width:100%;margin-top:5px}.marine-exhibition-filters button{min-height:42px;padding:9px 15px;border:0;border-radius:10px;background:var(--green);color:#fff;font-weight:800}.marine-exhibition-status{margin:0 0 14px}.marine-exhibition-card-top{align-items:center}.marine-exhibition-card-top p{margin:0}.marine-exhibition-card-top span{padding:4px 8px;border-radius:999px;background:#e4f4ec;color:var(--green);font-size:10px;font-weight:800}
@media(max-width:900px){.marine-exhibition-head{align-items:stretch;flex-direction:column}.marine-exhibition-filters{flex-wrap:wrap}.marine-exhibition-filters label{flex:1}}

/* 账号与权限管理 */
.account-admin-hero { margin-bottom: 14px; }
.account-security-note { margin-bottom: 14px; }
.account-table-panel td { vertical-align: middle; }
.account-table-panel td small { display: block; margin-top: 5px; color: var(--muted); }
.account-role-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.account-role-badges span { padding: 5px 8px; border-radius: 999px; color: var(--green); background: #e5f4ec; font-size: 10px; font-weight: 750; }
.account-dialog { width: min(760px, calc(100vw - 28px)); }
.managed-password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.managed-password-field input { border-radius: 10px 0 0 10px; }
.managed-password-field button { border: 1px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0; color: var(--green); background: var(--paper); font-weight: 750; }
.account-role-fieldset { margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.account-role-fieldset legend { padding: 0 6px; font-weight: 800; }
.account-role-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.account-role-card { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfb; }
.account-role-card input { width: 16px; margin: 2px 0 0; }
.account-role-card strong, .account-role-card small { display: block; }
.account-role-card small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.account-active { display: flex; align-items: center; gap: 9px; }
.account-active input { width: 18px; margin: 0; }
.wa-chat-loading { animation: account-pulse 1.1s ease-in-out infinite alternate; }
.order-price-summary { display: grid; gap: 6px; align-content: center; padding: 10px 14px; border-radius: 12px; background: var(--soft, #f2f7f4); }
.order-price-summary small { display: flex; justify-content: space-between; gap: 12px; }
@keyframes account-pulse { to { opacity: .45; } }
@media (max-width: 720px) {
  .account-role-options { grid-template-columns: 1fr; }
  .account-table-panel { overflow-x: auto; }
  .account-table-panel table { min-width: 760px; }
}
.order-detail-dialog { width: min(900px, calc(100vw - 32px)); }
.order-detail-content { display: grid; gap: 16px; }
.order-detail-loading { padding: 48px; text-align: center; color: var(--muted); }
.order-detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.order-detail-summary span, .order-detail-card { border: 1px solid #dce8e2; border-radius: 14px; background: #f8fbf9; }
.order-detail-summary span { padding: 13px 15px; }
.order-detail-summary small, .order-detail-grid small { display: block; color: var(--muted); margin-bottom: 5px; }
.order-detail-card { padding: 18px; background: #fff; }
.order-detail-card h4 { margin: 0 0 14px; color: #0d5e44; }
.order-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.order-detail-grid span { min-width: 0; }
.order-detail-grid .wide { grid-column: 1 / -1; }
.order-detail-grid strong { display: block; overflow-wrap: anywhere; }
.stripe-payment-link .stripe-link-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.stripe-payment-link .stripe-link-url { display: block; color: var(--green); font-weight: 700; overflow-wrap: anywhere; user-select: all; }
.order-detail-items { overflow-x: auto; }
.order-detail-item { display: grid; grid-template-columns: 1fr 1.5fr 1.3fr .45fr; gap: 12px; min-width: 620px; padding: 11px 8px; border-bottom: 1px solid #e6ece9; align-items: center; }
.order-detail-item-head { color: var(--muted); font-size: 12px; font-weight: 700; background: #f5f8f6; }
.order-detail-actions { position: sticky; bottom: -24px; z-index: 3; margin: 18px -24px -24px; padding: 15px 24px; border-top: 1px solid #dce8e2; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.order-detail-action-spacer { flex: 1; }
.order-detail-action { min-width: 126px; border-radius: 12px; font-weight: 800; box-shadow: 0 8px 20px rgba(13,94,68,.09); }
.order-detail-action:disabled { box-shadow: none; opacity: .48; cursor: not-allowed; }
.tracking-timeline-actions { position: sticky; bottom: -24px; margin: 18px -24px -24px; padding: 15px 24px; border-top: 1px solid #dce8e2; background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
@media (max-width: 640px) {
  .order-detail-dialog { width: calc(100vw - 16px); }
  .order-detail-summary { grid-template-columns: repeat(2, 1fr); }
  .order-detail-grid { grid-template-columns: 1fr; }
  .order-detail-grid .wide { grid-column: auto; }
  .order-detail-actions { flex-wrap: wrap; bottom: -15px; margin: 14px -15px -15px; padding: 12px 15px; }
  .order-detail-action-spacer { display: none; }
  .order-detail-actions button { flex: 1; min-width: 132px; }
}

/* 仓库人员仪表盘 */
.warehouse-metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.warehouse-metric { text-align: left; }
.warehouse-metric-danger strong { color: #c53b32; }
.warehouse-inventory-panel { margin-top: 18px; padding: 20px; }
.warehouse-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.warehouse-panel-head h4 { margin: 2px 0 0; font-size: 18px; }
.warehouse-stock-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.warehouse-stock-summary span { padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: #f7faf8; }
.warehouse-stock-summary small, .warehouse-stock-summary strong { display: block; }
.warehouse-stock-summary small { color: var(--muted); }
.warehouse-stock-summary strong { margin-top: 5px; color: var(--green); font-size: 22px; }
.warehouse-inventory-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.warehouse-stock-group { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.warehouse-stock-group > header { display: flex; justify-content: space-between; gap: 12px; padding: 13px 15px; background: #edf6f1; }
.warehouse-stock-group > header small { color: var(--muted); }
.warehouse-stock-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 58px); gap: 10px; align-items: center; padding: 11px 15px; border-top: 1px solid #edf1ef; }
.warehouse-stock-row:first-child { border-top: 0; }
.warehouse-stock-row span:first-child { min-width: 0; }
.warehouse-stock-row strong, .warehouse-stock-row small { display: block; }
.warehouse-stock-row span:first-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warehouse-stock-row small { color: var(--muted); font-size: 10px; }
.warehouse-inventory-empty { padding: 36px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
@media (max-width: 1180px) {
  .dashboard-period-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warehouse-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .warehouse-inventory-details { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .warehouse-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warehouse-panel-head { align-items: stretch; flex-direction: column; }
  .warehouse-stock-summary { grid-template-columns: 1fr; }
  .warehouse-stock-row { grid-template-columns: minmax(0, 1fr) repeat(3, 45px); padding-inline: 10px; }
}
.warehouse-assignment-items,.warehouse-tracking-fields{display:grid;gap:12px;margin:16px 0}.warehouse-assignment-row,.warehouse-tracking-row{display:grid;grid-template-columns:minmax(240px,1fr) minmax(220px,320px);gap:14px;align-items:end;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff}.warehouse-assignment-row strong{display:block}.warehouse-assignment-row small{display:block;color:var(--muted);margin-top:4px}@media(max-width:760px){.warehouse-assignment-row,.warehouse-tracking-row{grid-template-columns:1fr}}
.warehouse-allocation-controls{display:grid;gap:8px}.warehouse-allocation-row{display:grid;grid-template-columns:minmax(150px,1fr) 100px auto;gap:8px;align-items:center}.warehouse-allocation-row input,.warehouse-allocation-row select{min-width:0}.warehouse-allocation-controls>.add-warehouse-allocation{justify-self:end}@media(max-width:760px){.warehouse-allocation-row{grid-template-columns:1fr 90px}.warehouse-allocation-row .remove-warehouse-allocation{grid-column:1/-1}}
.warehouse-shipment-card{margin:0 0 14px;padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff}.warehouse-shipment-card h4{margin:0 0 12px;color:var(--green-900)}
.marine-city-picker-button{width:100%;min-height:42px;padding:9px 12px;text-align:left;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink)}
.marine-city-picker{padding:14px;border:1px solid #cfe2da;border-radius:14px;background:#f8fbfa}.marine-city-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:12px}.marine-city-options label{display:flex;align-items:center;gap:7px;min-width:0;padding:8px 10px;border:1px solid #dce8e3;border-radius:9px;background:#fff;cursor:pointer}.marine-city-options input{width:auto;margin:0}@media(max-width:1100px){.marine-city-options{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:680px){.marine-city-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
.customer-company-filter>span{display:block}.customer-company-filter>span:last-child{display:flex;align-items:center;gap:6px;min-height:42px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:#fff;white-space:nowrap}.customer-company-filter input{width:auto;margin:0}.customer-name-link{padding:0;border:0;background:none;color:var(--ink);font:inherit;font-weight:800;text-align:left;cursor:pointer}.customer-name-link:hover{text-decoration:underline;color:var(--green)}.customer-detail-actions{display:flex;gap:8px}.company-intelligence{margin-top:16px;padding:18px;border:1px solid #cfe2da;border-radius:16px;background:#f5faf7}.company-intelligence-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.company-intelligence h4{margin:0}.company-intelligence-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.company-intelligence-grid article{padding:13px;border-radius:12px;background:#fff}.company-intelligence-grid article.wide{grid-column:1/-1}.company-intelligence-grid strong,.company-intelligence-grid span{display:block}.company-intelligence-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.company-intelligence-links a{padding:6px 9px;border-radius:8px;background:#e4f4ec;color:var(--green);font-weight:700}@media(max-width:650px){.company-intelligence-grid{grid-template-columns:1fr}.customer-detail-actions{flex-direction:column}}
.marine-lead-website{display:inline-block;padding:5px 8px;border-radius:8px;background:#e4f4ec;color:var(--green);font-weight:800;white-space:nowrap}.marine-lead-website+small{display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.marine-marketed-badge{color:#fff!important;background:#16835d!important;border-color:#16835d!important}.marine-marketed-badge+small{display:block;margin-top:5px;color:#4d6b60;font-size:9px;line-height:1.35}
.marine-conversion-badge.won{color:#fff;background:#0d7651;border-color:#0d7651}.marine-conversion-badge.overdue{color:#8b2d2d;background:#ffe5e2;border-color:#f3b4ad}.marine-conversion-badge.unconverted{color:#76550b;background:#fff2ca;border-color:#ead28b}.marine-conversion-badge+small{display:block;margin-top:5px;color:#4d6b60;font-size:10px;line-height:1.4;white-space:nowrap}
.marine-lead-filters{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr)) auto;gap:12px;align-items:end;margin:18px 0;padding:16px;border:1px solid #dce8e2;border-radius:16px;background:#f7fbf9}.marine-lead-filters label{display:grid;gap:6px;font-size:12px;font-weight:800;color:#425b51}.marine-lead-filters select{width:100%;min-height:42px;border:1px solid #cbdcd4;border-radius:10px;background:#fff;padding:0 12px;color:#173d30}.marine-lead-filters button{min-height:42px;white-space:nowrap}@media(max-width:1000px){.marine-lead-filters{grid-template-columns:repeat(2,minmax(150px,1fr))}.marine-lead-filters button{width:100%}}
.marine-exhibition-actions{display:flex!important;align-items:center;gap:10px;flex-wrap:wrap}.marine-exhibition-actions button{border:1px solid #b8d8ca;border-radius:9px;background:#e7f5ee;color:#106d4d;padding:7px 10px;font-weight:800;cursor:pointer}.marine-exhibition-actions button:disabled{opacity:.6;cursor:wait}
.inventory-matrix-panel{padding:18px;background:#f4f8f6}.inventory-matrix-legend{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:16px;padding:11px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#496158;font-size:12px}.inventory-matrix-legend span,.inventory-select-all{display:flex;align-items:center;gap:7px}.inventory-matrix-legend small{margin-left:auto}.matrix-dot{width:10px;height:10px;border-radius:50%}.matrix-dot.available{background:#35a874}.matrix-dot.reserved{background:#e6a93c}.matrix-dot.low{background:#df5b57}.inventory-product-list{display:grid;gap:18px}.inventory-product-card{overflow:hidden;border:1px solid #d8e5df;border-radius:18px;background:#fff;box-shadow:0 7px 18px rgba(15,69,49,.05)}.inventory-product-head{display:grid;grid-template-columns:auto 180px minmax(220px,1fr) auto auto;gap:18px;align-items:center;padding:18px 20px;border-bottom:1px solid #dce7e2;background:linear-gradient(100deg,#f8fbfa,#eef7f3)}.inventory-product-image{display:flex;align-items:center;justify-content:center;width:180px;height:110px;overflow:hidden;border:1px solid #dbe7e1;border-radius:14px;background:#fff}.inventory-product-image img{width:100%;height:100%;object-fit:contain}.inventory-product-image span{font-size:24px;font-weight:900;color:var(--green)}.inventory-product-title p{margin:0 0 5px;color:var(--green);font-size:10px;font-weight:900;letter-spacing:1.4px}.inventory-product-title h3{margin:0 0 5px;font-size:22px}.inventory-product-title span{color:var(--muted)}.inventory-product-summary{display:flex;gap:8px}.inventory-product-summary span{min-width:82px;padding:9px 11px;border:1px solid #dce7e2;border-radius:11px;background:#fff;color:var(--muted);font-size:11px}.inventory-product-summary strong{display:block;margin-top:3px;color:var(--ink);font-size:19px}.inventory-product-actions{flex-direction:column}.inventory-matrix-scroll{overflow-x:auto}.inventory-matrix-table{width:100%;min-width:1080px;border-collapse:separate;border-spacing:0}.inventory-matrix-table th{position:sticky;top:0;padding:12px 10px;background:#f9fbfa;color:#446057;font-size:11px;white-space:nowrap;text-align:center}.inventory-matrix-table th:nth-child(2){text-align:left}.inventory-matrix-table td{padding:8px 9px;border-top:1px solid #e2ebe7;text-align:center;vertical-align:middle}.inventory-matrix-table tbody tr:hover{background:#fbfdfc}.inventory-matrix-table .matrix-sequence{width:46px;color:var(--muted)}.inventory-matrix-table .matrix-flavor{min-width:290px;text-align:left}.inventory-matrix-table .matrix-flavor strong{font-size:12px;line-height:1.4}.inventory-matrix-table .matrix-abbreviation{font-weight:900;color:var(--green)}.matrix-stock-cell{display:block;width:100%;min-width:96px;padding:7px 8px;border:1px solid transparent;border-radius:10px;background:#f4f8f6;color:var(--ink);cursor:default}.matrix-stock-cell[role=button],button.matrix-stock-cell{cursor:pointer}.matrix-stock-cell strong,.matrix-stock-cell small{display:block}.matrix-stock-cell strong{font-size:16px}.matrix-stock-cell small{margin-top:2px;color:#60766d;font-size:9px;white-space:nowrap}.matrix-stock-cell.available{background:#eaf7f0;border-color:#d0ebdc}.matrix-stock-cell.reserved{background:#fff6df;border-color:#f0ddb1}.matrix-stock-cell.low{background:#fff0ef;border-color:#efcecb;color:#b33b36}.matrix-stock-cell:hover{border-color:var(--green);box-shadow:0 0 0 2px rgba(20,119,83,.08)}.matrix-total strong,.matrix-available strong,.matrix-reserved strong{font-size:15px}.matrix-reserved strong{color:#b67812}.matrix-available strong{color:var(--green)}@media(max-width:1100px){.inventory-product-head{grid-template-columns:auto 130px 1fr}.inventory-product-image{width:130px;height:90px}.inventory-product-summary{grid-column:2/4}.inventory-product-actions{grid-column:3;grid-row:1}.inventory-matrix-legend small{width:100%;margin-left:0}}@media(max-width:680px){.inventory-product-head{grid-template-columns:auto 1fr}.inventory-product-image{grid-column:2;width:100%;height:120px}.inventory-product-title,.inventory-product-summary,.inventory-product-actions{grid-column:1/-1}.inventory-product-summary{overflow-x:auto}.inventory-product-actions{flex-direction:row}.inventory-matrix-panel{padding:10px}}
.order-sequence {
  width: 44px;
  min-width: 44px;
  color: #49645a;
  font-weight: 700;
  text-align: center;
}

/* 陆地部队 · Instagram 西班牙运营任务中心 */
.social-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.social-plan-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:14px; padding:24px 28px; border-radius:20px; color:#fff; background:linear-gradient(125deg,#0d4d3a,#147454 58%,#1f8a65); box-shadow:0 15px 34px rgba(13,77,58,.16); }
.social-plan-hero h2 { margin:4px 0 8px; font-size:24px; }
.social-plan-hero p { margin:0; color:rgba(255,255,255,.82); }
.social-plan-hero .eyebrow { color:#8fe0bd; }
.social-plan-hero-actions { display:flex; gap:10px; flex:0 0 auto; }
.social-plan-hero-actions button { min-height:43px; padding:10px 17px; border-radius:11px; font-weight:800; }
.social-plan-hero-actions .secondary { border-color:rgba(255,255,255,.38); color:#fff; background:rgba(255,255,255,.1); }
.social-plan-hero-actions .primary { color:#0d6045; background:#f4fff9; }
.social-plan-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.social-plan-summary article { padding:18px 20px; border:1px solid #d7e5de; border-radius:16px; background:#fff; }
.social-plan-summary small,.social-plan-summary span { display:block; color:var(--muted); }
.social-plan-summary strong { display:block; margin:7px 0 5px; color:#126d4e; font-size:25px; }
.social-plan-goals,.social-plan-review-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
.social-plan-goals .panel,.social-plan-review-layout .panel,.social-plan-week { padding:20px; }
.social-section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-bottom:15px; }
.social-section-head h3 { margin:3px 0 0; }
.social-section-head > span { color:var(--muted); font-size:11px; }
.social-plan-goal-list,.social-plan-review-list { display:grid; gap:9px; }
.social-plan-goal-list article { display:grid; grid-template-columns:31px minmax(0,1fr); gap:10px; padding:13px; border:1px solid #deebe5; border-radius:13px; background:#f9fcfa; }
.social-plan-goal-list button,.social-plan-week-grid article button { width:27px; height:27px; padding:0; border:1px solid #a7cdbd; border-radius:50%; color:#147454; background:#fff; font-weight:900; cursor:pointer; }
.social-plan-goal-list strong,.social-plan-goal-list small { display:block; }
.social-plan-goal-list small { margin-top:4px; color:#648075; }
.social-plan-goal-list p { margin:7px 0 0; color:var(--muted); font-size:11px; line-height:1.55; }
.social-plan-goal-list article.completed { opacity:.62; }
.social-plan-goal-list article.completed strong { text-decoration:line-through; }
.social-plan-week { margin-bottom:14px; }
.social-plan-week-grid { display:grid; grid-template-columns:repeat(7,minmax(145px,1fr)); gap:9px; overflow-x:auto; padding-bottom:4px; }
.social-plan-week-grid > section { min-height:220px; padding:11px; border:1px solid #dce9e3; border-radius:14px; background:#f8fbf9; }
.social-plan-week-grid > section.today { border-color:#24906b; background:#edf8f3; box-shadow:inset 0 3px #24906b; }
.social-plan-week-grid > section > header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; padding-bottom:9px; border-bottom:1px solid #dce9e3; }
.social-plan-week-grid > section > header small { color:var(--muted); }
.social-plan-week-grid article { display:grid; grid-template-columns:25px minmax(0,1fr); gap:8px; margin-bottom:8px; padding:10px; border-radius:11px; background:#fff; box-shadow:0 2px 8px rgba(24,73,55,.06); }
.social-plan-week-grid article button { width:23px; height:23px; font-size:11px; }
.social-plan-week-grid article strong,.social-plan-week-grid article small { display:block; }
.social-plan-week-grid article strong { font-size:12px; line-height:1.4; }
.social-plan-week-grid article small { margin-top:4px; color:#187252; font-size:9px; font-weight:800; }
.social-plan-week-grid article p { margin:6px 0 0; color:var(--muted); font-size:10px; line-height:1.45; }
.social-plan-week-grid article.completed { opacity:.58; }
.social-plan-week-grid article.completed strong { text-decoration:line-through; }
.social-plan-week-grid article.overdue { border-left:3px solid #d56359; }
.social-plan-day-empty,.social-plan-empty { padding:20px 10px; color:var(--muted); text-align:center; }
#socialPlanReviewForm { display:grid; gap:11px; }
#socialPlanReviewForm label { display:grid; gap:6px; color:#34584a; font-size:11px; font-weight:800; }
#socialPlanReviewForm textarea { resize:vertical; }
.social-plan-review-list article { padding:14px; border:1px solid #deebe5; border-radius:13px; background:#f9fcfa; }
.social-plan-review-list header { display:flex; justify-content:space-between; gap:12px; }
.social-plan-review-list header span { color:#147454; font-weight:800; }
.social-plan-review-list p { margin:9px 0 0; color:#566e65; font-size:11px; line-height:1.55; }
.social-plan-review-list b { margin-right:7px; color:#173e30; }
@media(max-width:1050px){.social-plan-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.social-plan-goals,.social-plan-review-layout{grid-template-columns:1fr}}
@media(max-width:650px){.social-plan-hero{align-items:stretch;flex-direction:column;padding:20px}.social-plan-hero-actions{display:grid;grid-template-columns:1fr 1fr}.social-plan-summary{grid-template-columns:1fr 1fr}.social-section-head{align-items:flex-start;flex-direction:column}.social-plan-goals .panel,.social-plan-review-layout .panel,.social-plan-week{padding:15px}}
.special-forces-hero {
  background: linear-gradient(135deg, #101828 0%, #1d2939 58%, #344054 100%);
  color: #fff;
}
.special-forces-hero .eyebrow, .special-forces-hero p { color: #d0d5dd; }
.special-forces-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.special-forces-metrics { margin: 18px 0; }
.special-forces-toolbar {
  display: flex; align-items: end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.special-forces-toolbar label { min-width: 180px; margin: 0; }
.special-forces-toolbar input { min-width: 280px; }
.special-forces-table-panel { overflow-x: auto; }
.special-forces-table-panel table { min-width: 1180px; }
.table-subline { display: block; margin-top: 5px; color: var(--muted, #667085); font-weight: 400; }
.special-forces-compliance { margin-top: 16px; }
.special-forces-dialog { width: min(760px, calc(100vw - 32px)); }
.special-forces-detail-body { padding: 4px 0 8px; }
.special-forces-detail-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.special-forces-detail-grid span {
  display: flex; flex-direction: column; gap: 6px; padding: 14px;
  border: 1px solid #eaecf0; border-radius: 12px; background: #f9fafb;
}
.special-forces-detail-grid small { color: #667085; }
.special-forces-detail-grid strong { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .special-forces-detail-grid { grid-template-columns: 1fr 1fr; }
  .special-forces-toolbar input { min-width: 0; width: 100%; }
}
.cloud-browser-hero { background:linear-gradient(135deg,#0b3b2c,#187455 65%,#23906b); color:#fff; }
.cloud-browser-hero p,.cloud-browser-hero .eyebrow,.cloud-browser-hero .muted { color:rgba(255,255,255,.82); }
.cloud-browser-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.cloud-browser-table-panel { margin-top:16px; overflow-x:auto; }
.cloud-browser-table-panel table { min-width:920px; }
.cloud-browser-profile strong,.cloud-browser-profile small { display:block; }
.cloud-browser-profile small { margin-top:5px; color:var(--muted); }
.cloud-browser-owner { min-width:180px; }
.cloud-browser-owner select { min-width:170px; }
.cloud-browser-buttons { display:flex; gap:8px; flex-wrap:wrap; }

#productSearch{max-width:300px;min-width:210px}
.inventory-external-card .inventory-product-head{grid-template-columns:130px minmax(240px,1fr) auto}
.inventory-external-card .inventory-product-image{width:130px;height:86px}
.inventory-external-card .inventory-product-image span{font-size:13px;text-align:center;overflow-wrap:anywhere;padding:8px}
.inventory-external-card .inventory-product-summary strong{font-size:14px}
.inventory-external-meta{padding:10px 20px;color:var(--muted);font-size:12px}
.inventory-external-flavors{padding:0 20px 14px}
.inventory-external-flavors summary{cursor:pointer;font-weight:700;color:var(--green)}
.inventory-external-flavors>div{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px}
.inventory-external-flavors>div span{padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:#f7faf8;font-size:11px}
@media(max-width:680px){.inventory-external-card .inventory-product-head{grid-template-columns:80px minmax(0,1fr)}.inventory-external-card .inventory-product-image{grid-column:1;grid-row:1;width:80px;height:70px}.inventory-external-card .inventory-product-title{grid-column:2;grid-row:1}.inventory-external-card .inventory-product-summary{grid-column:1/-1}}
.order-item-labels,.order-item-row{grid-template-columns:minmax(170px,1.3fr) minmax(180px,1.5fr) 75px 95px 110px 36px}
@media(max-width:800px){.order-item-labels{display:none}.order-item-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 72px 36px}.order-item-row .item-product,.order-item-row .item-flavor{grid-column:1/-1}.order-item-row .item-quantity{grid-column:1}.order-item-row .item-price{grid-column:2}.order-item-row .item-subtotal{grid-column:3}.order-item-row .remove-item{grid-column:4}}

/* Original article workspace */
.article-toolbar{display:flex;flex-wrap:wrap;align-items:end;gap:12px}.article-toolbar label{max-width:200px}.article-task-list{display:grid;gap:12px}.article-task{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;border:1px solid #ddd;background:white;border-radius:12px;text-align:left;width:100%;cursor:pointer}.article-task small,.article-image small,#articleWeeklyRows small{display:block;margin-top:6px;color:#667085}.article-badge{padding:6px 10px;border-radius:8px;font-size:13px;white-space:nowrap}.article-badge.success{background:#e3f4ea;color:#18613d}.article-badge.warning{background:#fff1d7;color:#805712}.article-dialog{width:min(1100px,94vw);max-height:90vh;overflow:auto}.article-editor-head{display:flex;justify-content:space-between;align-items:center}.article-editor-grid,.article-score-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}.article-dialog label{display:block}.article-dialog textarea,.article-dialog input:not([type=checkbox]),.article-dialog select{width:100%}.article-image-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.article-image{border:1px solid #ddd;border-radius:10px;padding:12px;overflow-wrap:anywhere}.article-image img{width:100%;height:140px;object-fit:contain;background:#f8f9fa}.article-issue{padding:16px;border:1px solid #d6dce4;border-radius:10px;margin:12px 0;overflow-wrap:anywhere}.article-issue.blocking{border-left:4px solid #c83d3d}.article-issue.improvement{border-left:4px solid #c59321}.article-issue blockquote{margin:12px 0;padding:10px;background:#f5f6f8}.article-score-grid>div{background:#f7f8fa;padding:12px;border-radius:8px}#articleSettingsDialog label,#articleAssignDialog label{display:block;margin:12px 0}#articleLanguageChoices label{display:flex;align-items:center;gap:8px}#articleEditorStatus{color:#667085}@media(max-width:700px){.article-editor-grid,.article-score-grid{grid-template-columns:1fr}.article-image-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.article-task{align-items:start;flex-direction:column}.article-dialog{width:96vw;padding:15px}.article-badge{white-space:normal}}
.article-dialog{padding:24px}.article-editor-head{position:sticky;top:-24px;z-index:2;background:white;padding:14px 0;border-bottom:1px solid var(--line)}.article-dialog .dialog-actions{position:sticky;bottom:-24px;background:white;padding:14px 0;border-top:1px solid var(--line);z-index:2}#articleAssignDialog,#articleSettingsDialog{padding:24px;width:min(600px,94vw)}#originalArticlesPage .table-panel{overflow-x:auto}#originalArticlesPage table{min-width:900px}#originalArticlesPage th,#originalArticlesPage td{display:table-cell;white-space:nowrap}.article-dialog h3{overflow-wrap:anywhere}@media(max-width:700px){.article-editor-head{top:-15px}.article-dialog .dialog-actions{bottom:-15px;display:flex;flex-wrap:wrap}.article-dialog .dialog-actions button{flex:1;min-width:120px}}

/* Social weekly tasks */
.social-week-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;margin:18px 0}
.social-week-count{font-size:32px;font-weight:700;color:var(--primary,#17694c);margin:10px 0}
.social-week-stats progress{width:100%;accent-color:#17694c}
.social-week-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.social-week-status{padding:6px 12px;border-radius:20px;font-size:13px;background:#fff2ce;color:#704f00}
.social-week-status.confirmed{background:#def3e6;color:#16592f}.social-week-status.rejected{background:#ffe4e4;color:#9b2424}
.social-week-post{margin-bottom:18px}.social-week-post video{width:100%;max-height:420px;margin-top:12px;background:#111}
.social-week-post details{margin:16px 0}.social-week-post form{margin:14px 0;display:grid;gap:10px}
.social-week-text{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;max-height:280px;overflow:auto}
.social-week-report{border-top:1px solid #dce6df;margin-top:18px;padding-top:12px}
.social-week-post a{overflow-wrap:anywhere}
@media (min-width: 761px){.sidebar nav{min-height:0;overflow-y:auto;flex:1;align-content:start;scrollbar-width:thin}.sidebar .logo-row,.sidebar-user{flex-shrink:0}.sidebar-user{margin-top:12px}}
#socialWeeklyPage > .panel{margin-top:18px}#socialWeeklyPage .toolbar{display:flex;align-items:flex-end;justify-content:flex-start;gap:12px;flex-wrap:wrap}#socialWeeklyPage .toolbar label{margin:0}#socialWeeklyPage .toolbar button{height:43px}

.wa-composer-tools .wa-ai-icon-button{width:32px;height:32px;padding:0;border:1px solid #d8e7df;border-radius:10px;background:linear-gradient(145deg,#fff,#eef8f3);color:#0f7655;font-size:16px;box-shadow:0 4px 12px rgba(15,118,85,.08)}.wa-composer-tools .wa-ai-icon-button:hover{border-color:#88c8ae;transform:translateY(-1px);box-shadow:0 7px 16px rgba(15,118,85,.14)}
.wa-ai-dialog{width:min(680px,calc(100vw - 28px));max-height:88vh;padding:0;border:0;border-radius:20px;overflow:hidden;box-shadow:0 28px 80px rgba(10,44,32,.28)}.wa-ai-dialog::backdrop{background:rgba(7,28,21,.46);backdrop-filter:blur(3px)}
.wa-ai-head{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;background:linear-gradient(135deg,#083e31,#137655);color:#fff}.wa-ai-head>div{display:flex;align-items:center;gap:12px}.wa-ai-head small{display:block;opacity:.7;font-size:10px;letter-spacing:.14em}.wa-ai-head h3{margin:3px 0 0;font-size:20px}.wa-ai-head .icon-button{color:#fff;border-color:rgba(255,255,255,.3);background:rgba(255,255,255,.1)}.wa-ai-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:rgba(255,255,255,.14);font-size:21px}
.wa-ai-body{padding:22px;overflow:auto;max-height:calc(88vh - 82px);background:#fbfdfc}.wa-ai-body label{display:grid;gap:8px;color:#24463b;font-weight:700;font-size:13px}.wa-ai-body textarea{width:100%;resize:vertical;border:1px solid #cfddd7;border-radius:12px;padding:12px;background:#fff;font:inherit;line-height:1.55;box-sizing:border-box}.wa-ai-body textarea:focus{outline:0;border-color:#13805d;box-shadow:0 0 0 3px rgba(19,128,93,.1)}.wa-ai-generate,.wa-ai-adopt{width:100%;margin-top:12px;min-height:44px}.wa-ai-result{display:grid;gap:14px;margin-top:18px;padding-top:18px;border-top:1px solid #e2ebe7}
.wa-ai-meta{display:flex;flex-wrap:wrap;gap:7px}.wa-ai-meta span{padding:6px 9px;border-radius:999px;background:#e9f5ef;color:#176247;font-size:11px;font-weight:700}.wa-ai-meta span[data-risk="medium"]{background:#fff3d8;color:#956312}.wa-ai-meta span[data-risk="high"]{background:#ffe5e4;color:#ae312c}.wa-ai-rewrite-actions{display:flex;gap:8px;flex-wrap:wrap}.wa-ai-rewrite-actions button{padding:7px 11px;border:1px solid #d4e2dc;border-radius:9px;background:#fff;color:#315c4d;font-size:12px}.wa-ai-note,.wa-ai-sources{padding:13px 14px;border:1px solid #dfeae5;border-radius:12px;background:#f3f8f6}.wa-ai-note strong,.wa-ai-sources strong{display:block;margin-bottom:6px;color:#173f32;font-size:12px}.wa-ai-note p{margin:0;color:#4c665d;font-size:13px;line-height:1.55}.wa-ai-note ul{margin:5px 0 0;padding-left:18px;color:#8b5f15;font-size:13px}.wa-ai-sources div{display:flex;flex-wrap:wrap;gap:6px}.wa-ai-sources span{padding:5px 8px;border-radius:8px;background:#fff;color:#587068;font-size:11px}.wa-ai-disclaimer{text-align:center;color:#7b8e87;line-height:1.45}@media(max-width:700px){.wa-ai-dialog{width:calc(100vw - 16px);max-height:94vh}.wa-ai-body{padding:16px;max-height:calc(94vh - 80px)}}

#orderDialog.wa-source-order{width:min(1480px,96vw);max-width:none;max-height:94vh;padding:20px}#orderDialog.wa-source-order #orderForm{display:grid;grid-template-columns:minmax(330px,42%) minmax(560px,58%);column-gap:22px;align-items:start}#orderDialog.wa-source-order #orderForm>.dialog-head{grid-column:1/-1}#orderDialog.wa-source-order #orderForm>:not(.dialog-head):not(.wa-order-source-preview){grid-column:2}#orderDialog.wa-source-order .wa-order-source-preview{grid-column:1;grid-row:2/span 20;position:sticky;top:0;max-height:calc(94vh - 105px);overflow:auto;border:1px solid #b8decf;border-radius:16px;background:linear-gradient(180deg,#f2fbf7,#fff);box-shadow:0 12px 35px rgba(17,106,77,.09)}
.wa-order-source-head{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;gap:12px;padding:15px 17px;border-bottom:1px solid #d8ebe3;background:rgba(242,251,247,.96);backdrop-filter:blur(6px)}.wa-order-source-head small{display:block;color:#17805c;font-size:10px;letter-spacing:.12em}.wa-order-source-head strong{display:block;margin-top:3px;color:#173f32}.wa-order-source-head span{align-self:center;padding:6px 9px;border-radius:999px;background:#dff3e9;color:#176247;font-size:11px}.wa-order-source-preview pre{margin:0;padding:18px;white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.62 ui-monospace,SFMono-Regular,Consolas,monospace;color:#263d35}.wa-order-import-warnings{margin:12px 16px 0;padding:11px 12px 11px 30px;border-radius:10px;background:#fff5df;color:#895d10;font-size:12px;line-height:1.5}.order-item-row.needs-confirmation{padding:8px;border:1px solid #e9b95b;border-radius:10px;background:#fffaf0}.wa-source-order-badge{display:block;margin:8px 0 2px;padding:7px 9px;border:1px solid #8fcfb5;border-radius:9px;background:#e9f7f1;color:#116344;font-size:11px;font-weight:700}.wa-contact-context-menu .wa-context-order{color:#0d7956;font-weight:700}
@media(max-width:980px){#orderDialog.wa-source-order #orderForm{display:block}#orderDialog.wa-source-order .wa-order-source-preview{position:relative;max-height:300px;margin-bottom:16px}}

/* Larger type for the WhatsApp source order preview. */
#waOrderSourceText{font-size:16px;line-height:1.8}
.wa-order-import-warnings{font-size:14px;line-height:1.7}
.wa-order-source-head strong{font-size:17px}
.wa-order-source-head small{font-size:12px}
.wa-order-source-head span{font-size:13px}
