/* WADesk application styles — account pages, dashboard and embedded forms.
   Design direction: clean green, white and dark navy. */

:root {
  --wd-brand: #0e7a4f;
  --wd-brand-strong: color-mix(in srgb, var(--wd-brand) 82%, #000);
  --wd-brand-soft: color-mix(in srgb, var(--wd-brand) 10%, #fff);
  --wd-brand-soft-2: color-mix(in srgb, var(--wd-brand) 18%, #fff);
  --wd-navy: var(--wd-dark);
  --wd-navy-2: var(--wd-dark-2);
  --wd-navy-3: var(--wd-dark-3);
  --wd-navy-text: var(--wd-on-dark);
  --wd-ink: #0e1b2c;
  --wd-ink-2: #3f4a5a;
  --wd-muted: #5b6676;
  --wd-faint: #8b98a8;
  --wd-line: #e4e7eb;
  --wd-line-2: #f0f1f3;
  --wd-bg: #f3f4f1;
  --wd-surface: #ffffff;
  --wd-green-bg: #e3f4ea; --wd-green-fg: #0b6641;
  --wd-amber-bg: #fdf0da; --wd-amber-fg: #8a3c06;
  --wd-red-bg: #fde6e4;   --wd-red-fg: #a42116;
  --wd-blue-bg: #e6eefd;  --wd-blue-fg: #1c43ae;
  --wd-gray-bg: #eef1f5;  --wd-gray-fg: #475467;
  --wd-radius: 14px;
  --wd-radius-sm: 8px;
  --wd-shadow: 0 1px 2px rgba(15, 29, 44, .05), 0 1px 3px rgba(15, 29, 44, .04);
  --wd-shadow-lg: 0 20px 45px -12px rgba(11, 31, 51, .28);
  --wd-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wd-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wd-sidebar: 256px;
  --wd-hl: #1fa971;
  --wd-dark: #0b1a2c;
  --wd-dark-2: color-mix(in srgb, var(--wd-dark) 94%, #fff);
  --wd-dark-3: color-mix(in srgb, var(--wd-dark) 84%, #fff);
  --wd-dark-4: color-mix(in srgb, var(--wd-dark) 72%, #fff);
  --wd-on-dark: color-mix(in srgb, var(--wd-dark) 22%, #fff);
  --wd-on-dark-2: color-mix(in srgb, var(--wd-dark) 42%, #fff);
  --wd-hl-light: color-mix(in srgb, var(--wd-hl) 70%, #fff);
  --wd-hl-soft: color-mix(in srgb, var(--wd-hl) 45%, #fff);
  --wd-hl-ring: color-mix(in srgb, var(--wd-hl) 20%, #fff);
}

/* ---------- Fonts (bundled, SIL Open Font License: fonts/Geist-OFL.txt) ---------- */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------- Base ---------- */
.wd-app-body, .wd-auth-body { margin: 0; background: var(--wd-bg); color: var(--wd-ink); font: 14px/1.5 var(--wd-font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.wd-auth-body *, .wd-app-body *, .wd-embed *, .wd-public-form * { box-sizing: border-box; }
.wd-app-body a, .wd-auth-body a { color: var(--wd-brand-strong); text-decoration: none; }
.wd-app-body a:hover, .wd-auth-body a:hover { text-decoration: underline; }
.wd-app-body h1, .wd-app-body h2, .wd-app-body h3, .wd-auth-body h1, .wd-auth-body h2 { color: var(--wd-ink); margin: 0; letter-spacing: -.01em; }
.wd-app-body p { margin: 0; }
:where(.wd-app-body) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.wd-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.wd-skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--wd-navy); color: #fff !important; padding: 8px 12px; border-radius: 6px; }
.wd-skip:focus { left: 8px; }
:where(.wd-app-body, .wd-auth-body) :focus-visible { outline: 2px solid var(--wd-brand); outline-offset: 2px; }
.wd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wd-mono { font-family: var(--wd-mono); font-size: 12.5px; }
.wd-muted { color: var(--wd-muted); }
.wd-small, .wd-app-body small { font-size: 12.5px; }
.wd-block { display: block; }
.wd-block, .wd-person small, .wd-mini-main small { color: var(--wd-muted); }
.wd-error-text { color: var(--wd-red-fg) !important; }
.wd-num { text-align: right; font-variant-numeric: tabular-nums; }
.wd-right { text-align: right; }
.wd-req { color: var(--wd-red-fg); }
[hidden] { display: none !important; }

/* ---------- Brand mark ---------- */
.wd-mark { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--wd-brand); color: #fff; flex: none; }
.wd-mark svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Buttons ---------- */
.wd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 15px; border-radius: 9px; border: 1px solid transparent; font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.wd-btn .wd-icon { width: 16px; height: 16px; }
.wd-btn-primary { background: var(--wd-brand); color: #fff !important; box-shadow: 0 1px 2px rgba(15, 29, 44, .12); }
.wd-btn-primary:hover { background: var(--wd-brand-strong); }
.wd-btn-secondary { background: #fff; color: var(--wd-ink) !important; border-color: var(--wd-line); box-shadow: 0 1px 2px rgba(15, 29, 44, .05); }
.wd-btn-secondary:hover { border-color: #c8d2dd; background: #fafbfc; }
.wd-btn-ghost { background: transparent; color: var(--wd-ink-2) !important; }
.wd-btn-ghost:hover { background: var(--wd-gray-bg); }
.wd-btn-danger { background: #c0281c; color: #fff !important; }
.wd-btn-danger:hover { background: #9d1f15; }
.wd-btn-danger-ghost { background: transparent; color: var(--wd-red-fg) !important; }
.wd-btn-danger-ghost:hover { background: var(--wd-red-bg); }
.wd-btn-sm { min-height: 32px; padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.wd-btn-block { width: 100%; }
.wd-btn[disabled], .wd-btn.is-busy { opacity: .55; cursor: not-allowed; }
.wd-btn.is-busy { position: relative; color: transparent !important; }
.wd-btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: wd-spin .7s linear infinite; }
.wd-btn-secondary.is-busy::after, .wd-btn-ghost.is-busy::after { border-color: #c8d2dd; border-top-color: var(--wd-ink); }
.wd-btn.is-static { cursor: default; }
@keyframes wd-spin { to { transform: rotate(360deg); } }
.wd-link { background: none; border: 0; padding: 0; color: var(--wd-brand-strong); font-weight: 600; cursor: pointer; font-size: 13.5px; }
.wd-link:hover { text-decoration: underline; }
.wd-link-danger { color: var(--wd-red-fg); }
.wd-icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.wd-icon-btn:hover { background: rgba(127, 144, 163, .14); }

/* ---------- Forms ---------- */
.wd-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; min-width: 0; }
.wd-field > label, .wd-label { font-weight: 600; font-size: 13px; color: var(--wd-ink-2); }
fieldset.wd-field { border: 0; padding: 0; }
fieldset.wd-field legend { margin-bottom: 6px; padding: 0; }
.wd-input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--wd-line); border-radius: 9px; background: #fff; color: var(--wd-ink); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
textarea.wd-input { resize: vertical; min-height: 64px; line-height: 1.45; }
select.wd-input { padding-right: 32px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f6f82' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
.wd-input:focus { outline: none; border-color: var(--wd-brand); box-shadow: 0 0 0 3px var(--wd-brand-soft-2); }
.wd-input[readonly], .wd-input:disabled { background: #f7f9fb; color: var(--wd-muted); }
.wd-input-sm { min-height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
select.wd-input-sm { padding-right: 28px; background-position: right 8px center; }
.wd-input-narrow { max-width: 180px; }
.wd-input-icon { position: relative; }
.wd-input-icon > .wd-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--wd-faint); width: 16px; height: 16px; pointer-events: none; }
.wd-input-icon .wd-input { padding-left: 34px; }
.wd-hint { color: var(--wd-muted); font-size: 12.5px; margin: -4px 0 12px; }
.wd-field .wd-hint { margin: 0; }
.wd-check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--wd-ink-2); cursor: pointer; margin: 0 0 12px; }
.wd-check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--wd-brand); flex: none; }
.wd-checks { justify-content: flex-end; }
.wd-checks .wd-check { margin-bottom: 6px; }
.wd-password { position: relative; display: block; }
.wd-password .wd-input { padding-right: 64px; }
.wd-password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--wd-brand-strong); font-weight: 600; font-size: 12.5px; padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.wd-grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.wd-span-2 { grid-column: span 2; }
.wd-kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; margin-bottom: 8px; }
.wd-form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.wd-inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wd-inline-form .wd-input { width: auto; flex: 1 1 180px; }
.wd-stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.wd-stack .wd-field { width: 100%; margin: 0; }
.wd-plain-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.wd-consent-box { border: 1px solid var(--wd-line); border-radius: 10px; padding: 12px 14px 4px; margin: 4px 0 14px; background: #fbfcfd; }
.wd-consent-box legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.wd-disclosure { margin: 8px 0 12px; }
.wd-disclosure summary { cursor: pointer; color: var(--wd-brand-strong); font-weight: 600; font-size: 13.5px; margin-bottom: 10px; }

/* ---------- Alerts / banners ---------- */
.wd-alert { padding: 11px 13px; border-radius: 9px; font-size: 13.5px; margin: 0 0 14px; border: 1px solid transparent; }
.wd-alert-error { background: var(--wd-red-bg); color: var(--wd-red-fg); border-color: #f7c9c4; }
.wd-alert-success { background: var(--wd-green-bg); color: var(--wd-green-fg); border-color: #b5e6cc; }
.wd-alert-info { background: #eef4fb; color: #22415f; border-color: #d3e1f0; }
.wd-banner { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 11px; margin: 0 0 18px; font-size: 13.5px; border: 1px solid transparent; }
.wd-banner .wd-icon { margin-top: 1px; }
.wd-banner-green { background: var(--wd-green-bg); color: var(--wd-green-fg); border-color: #b5e6cc; }
.wd-banner-amber { background: var(--wd-amber-bg); color: var(--wd-amber-fg); border-color: #f4dca6; }
.wd-banner-blue { background: var(--wd-blue-bg, #e8f0fd); color: var(--wd-blue-fg, #1d4fb8); border-color: #c9dbfa; }
.wd-banner-red { background: var(--wd-red-bg); color: var(--wd-red-fg); border-color: #f7c9c4; }
.wd-banner-navy { background: #eaf0f7; color: #17324d; border-color: #d2dfec; }
.wd-note { display: flex; gap: 8px; align-items: flex-start; color: var(--wd-amber-fg); font-size: 13px; margin: 0 0 16px; }
.wd-note .wd-icon { width: 16px; height: 16px; margin-top: 2px; }

/* ---------- Badges, chips, tags ---------- */
.wd-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.wd-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.wd-badge-green { background: var(--wd-green-bg); color: var(--wd-green-fg); }
.wd-badge-amber { background: var(--wd-amber-bg); color: var(--wd-amber-fg); }
.wd-badge-red { background: var(--wd-red-bg); color: var(--wd-red-fg); }
.wd-badge-blue { background: var(--wd-blue-bg); color: var(--wd-blue-fg); }
.wd-badge-gray { background: var(--wd-gray-bg); color: var(--wd-gray-fg); }
.wd-tag { display: inline-block; padding: 1px 8px; margin: 1px 4px 1px 0; border-radius: 6px; background: var(--wd-brand-soft); color: var(--wd-brand-strong); font-size: 12px; font-weight: 600; }
.wd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--wd-gray-bg); color: var(--wd-ink-2) !important; font-size: 12.5px; font-weight: 600; }
.wd-chip .wd-icon { width: 15px; height: 15px; }
.wd-chip-amber { background: var(--wd-amber-bg); color: var(--wd-amber-fg) !important; }
.wd-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--wd-brand); color: #fff; font-size: 11.5px; font-weight: 700; }
.wd-count-red { background: var(--wd-red-bg); color: var(--wd-red-fg); min-width: 34px; }
.wd-you { font-style: normal; font-size: 11px; font-weight: 600; color: var(--wd-muted); background: var(--wd-gray-bg); padding: 1px 6px; border-radius: 5px; margin-left: 4px; }
.wd-avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--wd-brand-soft-2); color: var(--wd-brand-strong); font-weight: 700; font-size: 13px; flex: none; }
.wd-avatar.sm { width: 32px; height: 32px; font-size: 12px; }

/* ---------- Auth pages ---------- */
.wd-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 44%) 1fr; }
.wd-auth-aside { background: radial-gradient(1000px 500px at -10% 110%, color-mix(in srgb, var(--wd-hl) 28%, transparent), transparent 60%), var(--wd-navy); color: #dbe6f1; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.wd-auth-brand { display: inline-flex; align-items: center; gap: 11px; color: #fff !important; font-weight: 700; font-size: 18px; text-decoration: none !important; }
.wd-auth-brand img { max-height: 36px; max-width: 160px; }
.wd-auth-pitch h2 { color: #fff; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 28px; max-width: 420px; }
.wd-auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; max-width: 440px; }
.wd-auth-points li { display: flex; gap: 14px; }
.wd-auth-points li > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--wd-hl) 22%, transparent); color: var(--wd-hl-light); font-weight: 700; font-size: 13px; flex: none; }
.wd-auth-points strong { display: block; color: #fff; font-size: 14.5px; }
.wd-auth-points small { display: block; color: #a9bbcd; font-size: 13px; line-height: 1.5; margin-top: 2px; }
.wd-auth-foot { font-size: 12.5px; color: #8fa3b8; margin: 0; }
.wd-auth-foot a { color: #b9cadb !important; }
.wd-auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; }
.wd-auth-brand-mobile { display: none; color: var(--wd-ink) !important; margin-bottom: 22px; }
.wd-auth-card { width: 100%; max-width: 430px; background: #fff; border: 1px solid var(--wd-line); border-radius: 16px; padding: 34px 32px; box-shadow: 0 12px 32px -18px rgba(11, 31, 51, .25); }
.wd-auth-card h1 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -.015em; }
.wd-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wd-brand-strong); margin: 0 0 6px; }
.wd-lead { color: var(--wd-muted); margin: 0 0 20px; font-size: 14px; }
.wd-form { margin-top: 18px; }
.wd-row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 13.5px; }
.wd-row-between .wd-check { margin: 0; }
.wd-after { text-align: center; color: var(--wd-muted); font-size: 13.5px; margin: 20px 0 0; }
.wd-small { font-size: 13px; }
.wd-invite-summary { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--wd-line); border-radius: 12px; background: #fbfcfd; margin: 16px 0; }
.wd-invite-summary small { display: block; color: var(--wd-muted); }
.wd-embed { display: flex; justify-content: center; padding: 24px 0; }

/* ---------- App shell ---------- */
.wd-app { display: grid; grid-template-columns: var(--wd-sidebar) minmax(0, 1fr); min-height: 100vh; }
.wd-sidebar { position: sticky; top: 0; height: 100vh; background: var(--wd-navy); color: var(--wd-navy-text); display: flex; flex-direction: column; padding: 16px 12px; overflow-y: auto; z-index: 60; }
.wd-sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 14px; }
.wd-sidebar-brand { display: flex; align-items: center; gap: 10px; color: #fff !important; font-weight: 700; font-size: 16px; text-decoration: none !important; }
.wd-sidebar-brand img { max-height: 32px; max-width: 150px; }
.wd-sidebar-close { display: none; color: #fff; }
.wd-org-switch { position: relative; margin: 0 0 12px; }
.wd-org-button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--wd-navy-2); border: 1px solid var(--wd-navy-3); color: #fff; cursor: pointer; text-align: left; }
.wd-org-button:hover { background: #163150; }
.wd-org-button .wd-icon { width: 16px; height: 16px; color: var(--wd-navy-text); margin-left: auto; }
.wd-org-text { min-width: 0; }
.wd-org-text strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-org-text small { display: block; color: #93a7bc; font-size: 11.5px; }
.wd-org-avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--wd-brand); color: #fff; font-weight: 700; font-size: 12px; flex: none; }
.wd-org-avatar.sm { width: 26px; height: 26px; font-size: 11px; border-radius: 7px; }
.wd-org-avatar.lg { width: 46px; height: 46px; font-size: 16px; border-radius: 12px; }
.wd-org-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; color: var(--wd-ink); border-radius: 12px; box-shadow: var(--wd-shadow-lg); padding: 8px; z-index: 80; max-height: 60vh; overflow: auto; }
.wd-menu-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--wd-faint); padding: 4px 8px 6px; margin: 0; }
.wd-org-menu a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: var(--wd-ink) !important; text-decoration: none !important; }
.wd-org-menu a:hover, .wd-org-menu a.is-current { background: var(--wd-bg); }
.wd-org-menu a strong { display: block; font-size: 13.5px; }
.wd-org-menu a small { display: block; color: var(--wd-muted); font-size: 12px; }
.wd-org-menu a .wd-icon { margin-left: auto; color: var(--wd-brand); }
.wd-org-menu .wd-menu-action { border-top: 1px solid var(--wd-line-2); margin-top: 6px; padding-top: 10px; color: var(--wd-brand-strong) !important; font-weight: 600; font-size: 13px; }
.wd-org-menu .wd-menu-action .wd-icon { margin: 0; color: currentColor; }
.wd-nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.wd-nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: var(--wd-navy-text) !important; font-weight: 500; font-size: 14px; text-decoration: none !important; transition: background .12s, color .12s; }
.wd-nav a:hover { background: var(--wd-navy-2); color: #fff !important; }
.wd-nav a.is-active { background: color-mix(in srgb, var(--wd-hl) 16%, transparent); color: #fff !important; box-shadow: inset 3px 0 0 var(--wd-brand); }
.wd-nav a.is-active .wd-icon { color: var(--wd-hl); }
.wd-nav-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6d839a; margin: 16px 10px 6px; }
.wd-nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--wd-brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.wd-sidebar-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--wd-navy-3); padding-top: 12px; margin-top: 12px; }
.wd-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px; border-radius: 9px; color: #fff !important; text-decoration: none !important; }
.wd-user:hover { background: var(--wd-navy-2); }
.wd-user .wd-avatar { background: var(--wd-navy-3); color: #fff; }
.wd-user strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-user small { display: block; color: #8aa0b6; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-user > span:last-child { min-width: 0; }
.wd-sidebar-foot .wd-icon-btn { color: var(--wd-navy-text); }
.wd-scrim { position: fixed; inset: 0; background: rgba(11, 31, 51, .45); z-index: 55; }
.wd-main-col { min-width: 0; display: flex; flex-direction: column; }
.wd-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 28px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--wd-line); }
.wd-menu-btn { display: none; }
.wd-topbar-title { display: none; font-weight: 700; }
.wd-search { position: relative; flex: 1; max-width: 460px; }
.wd-search > .wd-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--wd-faint); }
.wd-search input { width: 100%; height: 38px; border: 1px solid var(--wd-line); background: var(--wd-bg); border-radius: 10px; padding: 0 12px 0 36px; font-size: 14px; }
.wd-search input:focus { outline: none; background: #fff; border-color: var(--wd-brand); box-shadow: 0 0 0 3px var(--wd-brand-soft-2); }
.wd-topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.wd-content { padding: 28px 28px 56px; max-width: 1360px; width: 100%; outline: none; }

/* ---------- Page structure ---------- */
.wd-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 0 0 22px; }
.wd-page-head h1 { font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.wd-page-desc { color: var(--wd-muted); margin-top: 6px !important; max-width: 720px; font-size: 14px; }
.wd-page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wd-breadcrumb { font-size: 13px; color: var(--wd-muted); margin: 0 0 8px !important; }
.wd-section-title { font-size: 17px; margin: 26px 0 12px !important; }
.wd-card { background: var(--wd-surface); border: 1px solid var(--wd-line); border-radius: var(--wd-radius); padding: 20px 22px; box-shadow: var(--wd-shadow); margin: 0 0 18px; min-width: 0; }
.wd-card-flush { padding: 0; overflow: hidden; }
.wd-pad { padding: 16px 20px; }
.wd-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.wd-card-flush > .wd-card-head { margin: 0; border-bottom: 1px solid var(--wd-line-2); }
.wd-card-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.wd-card-title.wd-big { font-size: 22px; }
.wd-subtitle { font-size: 14px !important; margin: 18px 0 10px !important; }
.wd-card-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 12px; margin-top: auto; border-top: 1px solid var(--wd-line-2); }
.wd-narrow { max-width: 860px; }
.wd-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.wd-grid-2 > .wd-card { margin: 0; }
.wd-grid-2 + * { margin-top: 18px; }
.wd-align-start { align-items: start; }
.wd-grid-main-side { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.wd-state { padding: 40px 0; }
.wd-step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--wd-brand-soft); color: var(--wd-brand-strong); display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; }

/* ---------- Empty states ---------- */
.wd-empty { text-align: center; padding: 34px 16px; max-width: 520px; margin: 0 auto; }
.wd-empty-icon { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--wd-brand-soft); color: var(--wd-brand-strong); }
.wd-empty-icon .wd-icon { width: 24px; height: 24px; }
.wd-empty h3 { font-size: 16px; margin: 0 0 6px; }
.wd-empty p { color: var(--wd-muted); font-size: 14px; }
.wd-empty-action { margin-top: 16px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.wd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 0 0 18px; }
.wd-stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wd-stat { background: #fff; border: 1px solid var(--wd-line); border-radius: var(--wd-radius); padding: 16px 18px; box-shadow: var(--wd-shadow); min-width: 0; }
.wd-stat-label { display: block; color: var(--wd-muted); font-size: 13px; font-weight: 600; }
.wd-stat-value { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.wd-stat-sub { display: block; color: var(--wd-muted); font-size: 12.5px; }

/* ---------- Checklist ---------- */
.wd-checklist .wd-card-head { align-items: flex-start; }
.wd-progress { height: 8px; background: var(--wd-line-2); border-radius: 999px; overflow: hidden; min-width: 160px; }
.wd-progress span { display: block; height: 100%; background: var(--wd-brand); border-radius: 999px; transition: width .3s; }
.wd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wd-steps li { display: flex; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--wd-line-2); }
.wd-steps li:first-child { border-top: 0; }
.wd-steps li > div { flex: 1; min-width: 0; }
.wd-steps p { color: var(--wd-muted); font-size: 13px; }
.wd-step-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c7d2dd; display: grid; place-items: center; flex: none; }
.wd-steps li.is-done .wd-step-dot { background: var(--wd-brand); border-color: var(--wd-brand); color: #fff; }
.wd-step-dot .wd-icon { width: 14px; height: 14px; stroke-width: 3; }
.wd-steps li.is-done strong { color: var(--wd-muted); text-decoration: line-through; text-decoration-color: #b8c3cf; }
.wd-step-state { color: var(--wd-green-fg); font-size: 12.5px; font-weight: 600; }

/* ---------- Lists ---------- */
.wd-mini-list { list-style: none; margin: 0; padding: 0; }
.wd-mini-list li a { display: flex; gap: 12px; align-items: center; padding: 10px 6px; border-radius: 9px; color: var(--wd-ink) !important; text-decoration: none !important; }
.wd-mini-list li a:hover { background: var(--wd-bg); }
.wd-mini-main { flex: 1; min-width: 0; }
.wd-mini-main strong { display: block; font-size: 14px; }
.wd-mini-main small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-mini-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.wd-mini-end small { color: var(--wd-faint); }
.wd-activity { list-style: none; margin: 0; padding: 0; }
.wd-activity li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--wd-line-2); }
.wd-activity li:first-child { border-top: 0; }
.wd-activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wd-brand); margin-top: 7px; flex: none; }
.wd-activity p { font-size: 13.5px; }
.wd-activity small { color: var(--wd-muted); }
.wd-list { margin: 8px 0 0; padding-left: 18px; }

/* ---------- Toolbar / tabs ---------- */
.wd-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 16px; }
.wd-toolbar .wd-input { width: auto; }
.wd-grow { flex: 1 1 260px; }
.wd-grow .wd-input { width: 100%; }
.wd-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--wd-line); margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.wd-tabs a { padding: 9px 12px; color: var(--wd-muted) !important; font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.wd-tabs a:hover { color: var(--wd-ink) !important; }
.wd-tabs a.is-active { color: var(--wd-ink) !important; border-bottom-color: var(--wd-brand); }
.wd-tabs-sm { border: 0; margin: 0; }
.wd-tabs-sm a { font-size: 13px; padding: 5px 9px; border-radius: 7px; border: 0; margin: 0; }
.wd-tabs-sm a.is-active { background: var(--wd-brand-soft); color: var(--wd-brand-strong) !important; }
.wd-tab-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--wd-gray-bg); color: var(--wd-gray-fg); font-size: 11.5px; text-align: center; margin-left: 4px; }
.wd-segmented { display: inline-flex; background: var(--wd-gray-bg); border-radius: 10px; padding: 3px; gap: 2px; }
.wd-segmented button, .wd-segmented a { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--wd-muted) !important; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.wd-segmented [aria-selected="true"], .wd-segmented [aria-current="true"] { background: #fff; color: var(--wd-ink) !important; box-shadow: 0 1px 2px rgba(15, 29, 44, .12); }

/* ---------- Tables ---------- */
.wd-table-wrap { overflow-x: auto; }
.wd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wd-table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--wd-muted); background: #f8fafc; padding: 10px 16px; border-bottom: 1px solid var(--wd-line); white-space: nowrap; }
.wd-table td { padding: 12px 16px; border-bottom: 1px solid var(--wd-line-2); vertical-align: middle; }
.wd-table tbody tr:last-child td { border-bottom: 0; }
.wd-table tbody tr:hover td { background: #fbfcfd; }
.wd-table th.wd-num { text-align: right; }
.wd-col-check { width: 40px; }
.wd-col-check input { width: 16px; height: 16px; accent-color: var(--wd-brand); }
.wd-row-actions { text-align: right; white-space: nowrap; }
.wd-person { display: flex; gap: 10px; align-items: center; color: var(--wd-ink) !important; text-decoration: none !important; }
.wd-person strong { display: block; }
.wd-person small { display: block; }
.wd-matrix td, .wd-matrix th { text-align: center; }
.wd-matrix th[scope="row"] { text-align: left; text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 500; color: var(--wd-ink-2); background: transparent; white-space: normal; }
.wd-yes { color: var(--wd-brand); display: inline-grid; }
.wd-yes .wd-icon { stroke-width: 2.6; }
.wd-no { color: #c3ccd6; }
.wd-bulkbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: var(--wd-brand-soft); border-bottom: 1px solid var(--wd-brand-soft-2); font-weight: 600; font-size: 13.5px; }
.wd-pagination { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--wd-line-2); color: var(--wd-muted); font-size: 13px; }
.wd-pagination span { margin-right: auto; }
.wd-table-view { margin-top: 12px; font-size: 13px; }
.wd-table-view summary { cursor: pointer; color: var(--wd-brand-strong); font-weight: 600; }
.wd-table-view .wd-table { margin-top: 8px; }
.wd-table-view .wd-table td, .wd-table-view .wd-table th { padding: 6px 10px; }

/* ---------- Modals ---------- */
.wd-modal { border: 0; padding: 0; background: transparent; max-width: calc(100vw - 24px); width: 560px; max-height: calc(100vh - 32px); overflow: visible; color: var(--wd-ink); }
.wd-modal-wide { width: 920px; }
.wd-modal::backdrop { background: rgba(11, 31, 51, .5); backdrop-filter: blur(2px); }
.wd-modal[open] { animation: wd-pop .16s ease-out; }
@keyframes wd-pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.wd-modal-card { background: #fff; border-radius: 16px; box-shadow: var(--wd-shadow-lg); display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.wd-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--wd-line-2); }
.wd-modal-head h2 { font-size: 17px; }
.wd-modal-body { padding: 18px 20px; overflow-y: auto; }
.wd-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--wd-line-2); background: #fbfcfd; border-radius: 0 0 16px 16px; }
.wd-modal-body .wd-modal-foot { margin: 16px -20px -18px; }

/* ---------- Toasts / tooltip ---------- */
.wd-toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 300; max-width: min(420px, calc(100vw - 40px)); }
.wd-toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 11px; background: var(--wd-navy); color: #fff; box-shadow: var(--wd-shadow-lg); font-size: 13.5px; animation: wd-pop .18s ease-out; }
.wd-toast.is-error { background: #7a1a12; }
.wd-toast.is-warning { background: #6b3a05; }
.wd-toast button { margin-left: auto; background: transparent; border: 0; color: #fff; opacity: .7; cursor: pointer; font-size: 16px; line-height: 1; }
.wd-tip { position: fixed; z-index: 400; pointer-events: none; background: var(--wd-navy); color: #fff; padding: 6px 9px; border-radius: 7px; font-size: 12.5px; box-shadow: var(--wd-shadow-lg); white-space: nowrap; }

/* ---------- Copy boxes ---------- */
.wd-copy { max-width: 100%; display: flex; align-items: center; gap: 8px; background: #f6f8fa; border: 1px solid var(--wd-line); border-radius: 9px; padding: 6px 6px 6px 12px; margin: 8px 0; min-width: 0; }
.wd-copy code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-family: var(--wd-mono); font-size: 12.5px; color: var(--wd-ink-2); background: transparent; }
.wd-docs pre { background: var(--wd-navy); color: #d8e3ee; border-radius: 10px; padding: 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.6; }
.wd-docs pre code { font-family: var(--wd-mono); background: transparent; color: inherit; }

/* ---------- Onboarding ---------- */
.wd-onboard { max-width: 640px; margin: 20px auto; }
.wd-onboard h1 { font-size: 26px; margin-bottom: 6px !important; }
.wd-onboard .wd-page-desc { margin-bottom: 20px !important; }
.wd-form-card .wd-card-title { margin-bottom: 6px; }
.wd-form-card .wd-muted { margin-bottom: 14px; }

/* ---------- Inbox ---------- */
.wd-view-inbox .wd-content { padding: 0; max-width: none; }
.wd-inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 300px; height: calc(100vh - 60px); background: #fff; }
.wd-inbox:not(.has-details) { grid-template-columns: 340px minmax(0, 1fr); }
.wd-inbox-list { border-right: 1px solid var(--wd-line); display: flex; flex-direction: column; min-height: 0; background: #fff; }
.wd-inbox-list-head { padding: 18px 16px 12px; border-bottom: 1px solid var(--wd-line-2); display: grid; gap: 12px; }
.wd-inbox-list-head h1 { font-size: 20px; }
.wd-inbox-list-head .wd-segmented { display: flex; }
.wd-inbox-list-head .wd-segmented button { flex: 1; padding: 6px 4px; }
.wd-inbox-filters { display: grid; grid-template-columns: 1fr; gap: 8px; }
.wd-conv-list { overflow-y: auto; flex: 1; }
.wd-conv { display: flex; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--wd-line-2); cursor: pointer; background: #fff; border-left: 3px solid transparent; width: 100%; text-align: left; border-top: 0; border-right: 0; }
.wd-conv:hover { background: #f8fafc; }
.wd-conv.is-active { background: var(--wd-brand-soft); border-left-color: var(--wd-brand); }
.wd-conv-main { flex: 1; min-width: 0; }
.wd-conv-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.wd-conv-top strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-conv-top small { color: var(--wd-faint); flex: none; }
.wd-conv-last { color: var(--wd-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px !important; }
.wd-conv.is-unread .wd-conv-last { color: var(--wd-ink); font-weight: 600; }
.wd-conv-meta { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.wd-conv-meta .wd-badge { font-size: 11px; padding: 0 7px; }
.wd-conv-assignee { font-size: 11.5px; color: var(--wd-muted); }
.wd-skeleton-list span { display: block; height: 58px; margin: 10px 16px; border-radius: 10px; background: linear-gradient(90deg, #f1f4f7 25%, #e7ecf1 50%, #f1f4f7 75%); background-size: 200% 100%; animation: wd-shimmer 1.2s infinite; }
@keyframes wd-shimmer { to { background-position: -200% 0; } }
.wd-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f6f8f7; }
.wd-thread-empty { flex: 1; display: grid; place-items: center; padding: 24px; }
.wd-thread-main { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.wd-thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--wd-line); flex-wrap: wrap; }
.wd-thread-back { display: none; }
.wd-thread-who { min-width: 0; flex: 1; }
.wd-thread-who strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-thread-who small { color: var(--wd-muted); }
.wd-thread-controls { display: flex; gap: 8px; align-items: center; }
.wd-thread-controls .wd-input { width: auto; max-width: 170px; }
.wd-messages { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; background: #eef2ef url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23dfe6e2'/%3E%3C/svg%3E"); }
.wd-msg { max-width: min(560px, 78%); padding: 8px 12px 6px; border-radius: 12px; background: #fff; box-shadow: 0 1px 1px rgba(15, 29, 44, .08); font-size: 14px; line-height: 1.45; position: relative; }
.wd-msg p { white-space: pre-wrap; word-wrap: break-word; }
.wd-msg.is-in { align-self: flex-start; border-top-left-radius: 4px; }
.wd-msg.is-out { align-self: flex-end; background: #d9f7e8; border-top-right-radius: 4px; }
.wd-msg.is-failed { background: #fff1ef; border: 1px solid #f3c3bd; }
.wd-msg-meta { display: flex; gap: 6px; align-items: center; justify-content: flex-end; font-size: 11.5px; color: var(--wd-muted); margin-top: 3px; }
.wd-msg-by { font-size: 11.5px; font-weight: 600; color: var(--wd-brand-strong); margin-bottom: 2px !important; }
.wd-msg-tpl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--wd-muted); margin-bottom: 3px !important; }
.wd-msg-error { font-size: 12.5px; color: var(--wd-red-fg); margin-top: 6px !important; border-top: 1px dashed #f0b8b1; padding-top: 6px; }
.wd-msg-error button { margin-left: 6px; }
.wd-msg-media { display: inline-block; margin-bottom: 4px; font-weight: 600; }
.wd-note-item { align-self: center; max-width: min(620px, 90%); background: #fff8e6; border: 1px solid #f3e0ae; color: #5f4205; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.wd-note-item small { display: block; color: #8b6a1f; margin-top: 2px; }
.wd-day { align-self: center; font-size: 11.5px; font-weight: 600; color: var(--wd-muted); background: rgba(255, 255, 255, .85); padding: 3px 10px; border-radius: 999px; margin: 6px 0; }
.wd-status-icon { font-size: 11px; font-weight: 700; }
.wd-status-icon.is-read { color: #1d6fd1; }
.wd-composer { background: #fff; border-top: 1px solid var(--wd-line); padding: 10px 16px 14px; }
.wd-composer-tabs { display: flex; gap: 4px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.wd-composer-tabs button { border: 0; background: transparent; padding: 5px 10px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--wd-muted); cursor: pointer; }
.wd-composer-tabs button[aria-selected="true"] { background: var(--wd-gray-bg); color: var(--wd-ink); }
.wd-composer-tabs button[data-mode="note"][aria-selected="true"] { background: #fff3d1; color: #6d4b06; }
.wd-window { margin-left: auto; font-size: 12px; font-weight: 600; }
.wd-window.is-open { color: var(--wd-green-fg); }
.wd-window.is-closed { color: var(--wd-amber-fg); }
.wd-composer-form { display: flex; gap: 10px; align-items: flex-end; }
.wd-composer-form textarea { flex: 1; min-height: 44px; max-height: 180px; resize: none; }
.wd-composer-form[data-mode="note"] textarea { background: #fffbeb; border-color: #f3e0ae; }
.wd-composer-closed { background: var(--wd-amber-bg); color: var(--wd-amber-fg); border-radius: 9px; padding: 10px 12px; font-size: 13px; margin-bottom: 8px; }
.wd-template-send { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.wd-composer-template { max-height: 42vh; overflow-y: auto; }
.wd-tpl-vars { margin: 10px 0; }
.wd-details { border-left: 1px solid var(--wd-line); background: #fff; overflow-y: auto; min-height: 0; }
.wd-details-inner { padding: 20px; }
.wd-details-inner h3 { font-size: 16px; margin: 10px 0 2px; }
.wd-details-inner .wd-avatar { width: 56px; height: 56px; font-size: 18px; }
.wd-detail-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--wd-line-2); font-size: 13.5px; }
.wd-detail-row span { color: var(--wd-muted); }
.wd-detail-row b { text-align: right; font-weight: 600; word-break: break-word; }

/* ---------- Phone preview (templates) ---------- */
.wd-phone { border: 1px solid var(--wd-line); border-radius: 18px; overflow: hidden; background: #fff; max-width: 320px; }
.wd-phone-bar { background: var(--wd-navy); color: #fff; font-size: 12px; font-weight: 600; padding: 8px 12px; }
.wd-phone-screen { background: #e9efe9; padding: 14px 12px; min-height: 120px; }
.wd-bubble-tpl { background: #fff; border-radius: 4px 12px 12px 12px; padding: 9px 11px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); font-size: 13.5px; line-height: 1.45; }
.wd-bubble-tpl p { margin: 0 0 4px; white-space: pre-wrap; word-wrap: break-word; }
.wd-tpl-header { font-weight: 700; }
.wd-tpl-footer { color: var(--wd-muted); font-size: 12px; }
.wd-tpl-media { height: 90px; border-radius: 8px; background: #d7dfdb; display: grid; place-items: center; color: #53645b; font-size: 12.5px; margin-bottom: 8px; }
.wd-tpl-button { background: #fff; margin-top: 3px; border-radius: 8px; padding: 7px; text-align: center; color: #0a78c2; font-size: 13px; font-weight: 600; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
mark.wd-var { background: #fff1c7; color: #7a5200; border-radius: 4px; padding: 0 3px; font-weight: 600; }
mark.wd-var-filled { background: var(--wd-brand-soft-2); color: var(--wd-brand-strong); border-radius: 4px; padding: 0 3px; }
.wd-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.wd-template-grid > .wd-card { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.wd-template-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wd-template-card h3 { font-size: 15px; word-break: break-all; }
.wd-template-card header small { color: var(--wd-muted); }
.wd-template-card .wd-phone { max-width: none; }
.wd-template-card footer { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--wd-muted); }
.wd-template-draft .wd-phone-bar { background: #56687a; }
.wd-template-idea .wd-phone-bar { background: #8a98a7; }
.wd-legend-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.wd-kind { display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--wd-line); background: #fff; }
.wd-kind .wd-icon { padding: 5px; width: 28px; height: 28px; border-radius: 8px; flex: none; }
.wd-kind strong { display: block; font-size: 13.5px; }
.wd-kind small { display: block; color: var(--wd-muted); }
.wd-kind-approved .wd-icon { background: var(--wd-green-bg); color: var(--wd-green-fg); }
.wd-kind-meta .wd-icon { background: var(--wd-amber-bg); color: var(--wd-amber-fg); }
.wd-kind-local .wd-icon { background: var(--wd-gray-bg); color: var(--wd-gray-fg); }
.wd-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }

/* ---------- Campaign builder & report ---------- */
.wd-builder { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.wd-builder-side .wd-sticky { position: sticky; top: 80px; }
.wd-builder-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.wd-step-card .wd-card-title { margin-bottom: 16px; }
.wd-var-map { display: grid; gap: 10px; }
.wd-var-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--wd-line-2); border-radius: 10px; background: #fbfcfd; }
.wd-var-row .wd-field { margin: 0; }
.wd-var-row > strong { font-size: 13px; padding-bottom: 10px; }
.wd-radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.wd-radio-cards label, .wd-radio-list label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--wd-line); border-radius: 11px; padding: 12px; cursor: pointer; background: #fff; }
.wd-radio-cards label:has(input:checked), .wd-radio-list label:has(input:checked) { border-color: var(--wd-brand); background: var(--wd-brand-soft); box-shadow: 0 0 0 1px var(--wd-brand) inset; }
.wd-radio-cards label:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.wd-radio-cards input, .wd-radio-list input { accent-color: var(--wd-brand); margin-top: 2px; }
.wd-radio-cards strong, .wd-radio-list strong { display: block; font-size: 13.5px; }
.wd-radio-cards small, .wd-radio-list small { display: block; color: var(--wd-muted); }
.wd-radio-list { display: grid; gap: 8px; }
.wd-review-list { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 16px; margin: 0 0 14px; font-size: 14px; }
.wd-review-list dt { color: var(--wd-muted); font-weight: 600; }
.wd-review-list dd { margin: 0; }
.wd-review { border-color: var(--wd-brand); box-shadow: 0 0 0 3px var(--wd-brand-soft); }
.wd-status-line { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--wd-muted); font-size: 13.5px; margin: -8px 0 18px; }
.wd-funnel { display: grid; gap: 12px; }
.wd-funnel-row { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) 90px; gap: 16px; align-items: center; }
.wd-funnel-label strong { display: block; font-size: 14px; }
.wd-funnel-label small { display: block; color: var(--wd-muted); font-size: 12px; }
.wd-funnel-bar { height: 12px; border-radius: 999px; background: var(--wd-line-2); overflow: hidden; }
.wd-funnel-bar span { display: block; height: 100%; border-radius: 999px; background: var(--wd-brand); min-width: 0; }
.wd-funnel-queued .wd-funnel-bar span { background: #9aa9b8; }
.wd-funnel-accepted .wd-funnel-bar span { background: #2563b8; }
.wd-funnel-read .wd-funnel-bar span { background: #0b7f58; }
.wd-funnel-replied .wd-funnel-bar span { background: var(--wd-navy-3); }
.wd-funnel-failed .wd-funnel-bar span { background: #c0281c; }
.wd-funnel-num { text-align: right; }
.wd-funnel-num strong { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.wd-funnel-num small { color: var(--wd-muted); }
.wd-error-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wd-error-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #fbfcfd; border: 1px solid var(--wd-line-2); }
.wd-error-list p { color: var(--wd-muted); font-size: 13px; }
.wd-count-box { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; background: var(--wd-brand-soft); margin-top: 6px; }
.wd-count-box strong { font-size: 22px; color: var(--wd-brand-strong); }
.wd-count-box small { color: var(--wd-muted); }
.wd-chip-select { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-chip-select label { cursor: pointer; }
.wd-chip-select input { position: absolute; opacity: 0; }
.wd-chip-select span { display: inline-block; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--wd-line); font-size: 13px; background: #fff; }
.wd-chip-select input:checked + span { background: var(--wd-brand); border-color: var(--wd-brand); color: #fff; }
.wd-chip-select input:focus-visible + span { outline: 2px solid var(--wd-brand); outline-offset: 2px; }

/* ---------- Workflows ---------- */
.wd-flow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 18px; }
.wd-flow-grid > .wd-card { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.wd-flow-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.wd-flow-card h3 { font-size: 15px; }
.wd-flow-card header small { color: var(--wd-muted); }
.wd-flow-card.is-off { opacity: .75; }
.wd-flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wd-flow-steps li { display: flex; gap: 10px; align-items: flex-start; }
.wd-flow-steps li > span { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--wd-gray-bg); color: var(--wd-gray-fg); flex: none; }
.wd-flow-steps li > span .wd-icon { width: 14px; height: 14px; transform: rotate(-90deg); }
.wd-flow-steps li.is-trigger > span { background: var(--wd-brand-soft); color: var(--wd-brand-strong); }
.wd-flow-steps li.is-trigger > span .wd-icon { transform: none; }
.wd-flow-steps strong { display: block; font-size: 13.5px; }
.wd-flow-steps small { display: block; color: var(--wd-muted); }
.wd-delay { display: inline-block; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--wd-amber-fg); background: var(--wd-amber-bg); border-radius: 5px; padding: 0 6px; margin-bottom: 2px; }
.wd-flow-trigger { border: 1px solid var(--wd-brand-soft-2); background: var(--wd-brand-soft); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.wd-trigger-config { margin-top: 10px; }
.wd-step-editor { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.wd-step-editor > li { border: 1px solid var(--wd-line); border-radius: 12px; padding: 12px 14px; background: #fff; position: relative; }
.wd-step-editor > li::before { counter-increment: step; content: counter(step); position: absolute; left: -11px; top: 14px; width: 22px; height: 22px; border-radius: 50%; background: var(--wd-navy); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.wd-step-head { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 8px; align-items: end; margin-bottom: 10px; }
.wd-step-head .wd-field { margin: 0; }

/* ---------- Status grid (WhatsApp setup) ---------- */
.wd-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.wd-status-item { background: #fff; border: 1px solid var(--wd-line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.wd-status-item > span { font-size: 12.5px; font-weight: 600; color: var(--wd-muted); }
.wd-status-item small { color: var(--wd-muted); }
.wd-howto { margin: 0; padding-left: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; font-size: 13.5px; }
.wd-howto li { min-width: 0; }
.wd-howto .wd-btn { margin: 6px 8px 0 0; }
.wd-howto small { display: block; margin-top: 4px; }
.wd-danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-color: #f3c3bd; flex-wrap: wrap; }
.wd-danger-zone.wd-stack { align-items: flex-start; }

/* ---------- Contact detail ---------- */
.wd-custom-fields { margin: 4px 0 8px; }
.wd-msg-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wd-msg-log li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--wd-line-2); }
.wd-msg-log li:first-child { border-top: 0; }
.wd-msg-log li > div { flex: 1; min-width: 0; }
.wd-msg-log small { display: block; color: var(--wd-muted); }
.wd-msg-dir { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--wd-muted); width: 64px; flex: none; padding-top: 2px; }
.wd-msg-log li.is-in .wd-msg-dir { color: var(--wd-blue-fg); }
.wd-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--wd-line); display: grid; gap: 12px; }
.wd-timeline li { position: relative; font-size: 13.5px; }
.wd-timeline li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--wd-brand); border: 2px solid #fff; }
.wd-timeline li.is-revoked::before { background: #c0281c; }
.wd-timeline small { display: block; color: var(--wd-muted); }
.wd-notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.wd-notes li { background: #fff8e6; border: 1px solid #f3e0ae; border-radius: 10px; padding: 9px 11px; }
.wd-notes small { color: #8b6a1f; }
.wd-meta-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.wd-meta-card dt { color: var(--wd-muted); }
.wd-meta-card dd { margin: 0; text-align: right; }

/* ---------- Import ---------- */
.wd-stepper { display: flex; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; counter-reset: s; }
.wd-stepper li { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--wd-muted); padding-top: 8px; border-top: 3px solid var(--wd-line); }
.wd-stepper li.is-active, .wd-stepper li.is-done { color: var(--wd-ink); border-color: var(--wd-brand); }
.wd-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px; border: 2px dashed #c8d3de; border-radius: 12px; background: #fbfcfd; cursor: pointer; text-align: center; color: var(--wd-muted); }
.wd-drop:hover { border-color: var(--wd-brand); }
.wd-drop .wd-icon { width: 28px; height: 28px; color: var(--wd-brand); }
.wd-drop input { max-width: 100%; }
.wd-map-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wd-import-sample { margin: 6px 0 14px; border: 1px solid var(--wd-line); border-radius: 10px; }
.wd-import-sample .wd-table td, .wd-import-sample .wd-table th { padding: 6px 10px; font-size: 12.5px; white-space: nowrap; }
.wd-import-result dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.wd-import-result dl div { background: #fbfcfd; border: 1px solid var(--wd-line); border-radius: 10px; padding: 10px; }
.wd-import-result dt { font-size: 12px; color: var(--wd-muted); }
.wd-import-result dd { margin: 0; font-size: 20px; font-weight: 700; }

/* ---------- Charts ---------- */
.wd-chart-wrap { width: 100%; overflow: hidden; }
.wd-chart { width: 100%; height: 240px; display: block; }
.wd-chart .wd-grid { stroke: #edf1f5; stroke-width: 1; }
.wd-chart .wd-baseline { stroke: #c9d3dd; stroke-width: 1; }
.wd-chart .wd-axis { fill: #6b7a8c; font-size: 11px; font-family: var(--wd-font); }
.wd-chart .wd-bar-in { fill: #2563b8; }
.wd-chart .wd-bar-out { fill: var(--wd-brand); }
.wd-legend { display: flex; gap: 16px; font-size: 13px; color: var(--wd-ink-2); margin-bottom: 6px; }
.wd-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.wd-key-in { background: #2563b8; }
.wd-key-out { background: var(--wd-brand); }

/* ---------- Plans, meters, orgs ---------- */
.wd-meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.wd-meter-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.wd-meter-top span { color: var(--wd-muted); }
.wd-meter.is-high .wd-progress span { background: #d97706; }
.wd-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.wd-plan-grid > .wd-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.wd-plan.is-current { border-color: var(--wd-brand); box-shadow: 0 0 0 1px var(--wd-brand) inset; }
.wd-plan h3 { font-size: 17px; }
.wd-price strong { font-size: 28px; letter-spacing: -.02em; }
.wd-price span { color: var(--wd-muted); margin-left: 4px; }
.wd-checklist-plain { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 7px; font-size: 13.5px; flex: 1; }
.wd-checklist-plain li { display: flex; gap: 8px; align-items: flex-start; }
.wd-checklist-plain .wd-icon { color: var(--wd-brand); width: 16px; height: 16px; margin-top: 2px; stroke-width: 2.4; }
.wd-org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.wd-org-card { display: flex; gap: 14px; align-items: center; margin: 0; }
.wd-org-card > div { flex: 1; min-width: 0; }
.wd-org-card h3 { font-size: 15px; }
.wd-org-card small { color: var(--wd-muted); }
.wd-org-card.is-current { border-color: var(--wd-brand); }
.wd-key-list { list-style: none; margin: 14px 0 0; padding: 0; }
.wd-key-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--wd-line-2); }
.wd-key-list li.is-revoked { opacity: .6; }
.wd-key-list small { display: block; color: var(--wd-muted); }
.wd-new-key { margin-top: 12px; }

/* ---------- Public embedded forms ---------- */
.wd-public-form { max-width: 460px; font-family: var(--wd-font); color: var(--wd-ink); }
.wd-public-form .wd-btn { margin-top: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .wd-inbox, .wd-inbox:not(.has-details) { grid-template-columns: 300px minmax(0, 1fr); }
  .wd-inbox .wd-details { position: fixed; right: 0; top: 60px; bottom: 0; width: 320px; box-shadow: var(--wd-shadow-lg); z-index: 30; }
  .wd-stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wd-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .wd-builder, .wd-grid-main-side { grid-template-columns: 1fr; }
  .wd-builder-side { order: -1; }
  .wd-builder-side .wd-sticky { position: static; }
  .wd-grid-2 { grid-template-columns: 1fr; }
  .wd-template-send { grid-template-columns: 1fr; }
  .wd-map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .wd-app { grid-template-columns: 1fr; }
  .wd-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 288px; transform: translateX(-100%); transition: transform .2s ease; visibility: hidden; }
  .wd-sidebar.is-open { transform: none; visibility: visible; box-shadow: var(--wd-shadow-lg); }
  .wd-sidebar-close, .wd-menu-btn { display: inline-grid; }
  .wd-topbar { padding: 0 14px; gap: 10px; }
  .wd-topbar-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
  .wd-search { display: none; }
  .wd-topbar-actions .wd-chip span { display: none; }
  .wd-content { padding: 20px 16px 48px; }
  .wd-inbox, .wd-inbox:not(.has-details) { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 60px); }
  .wd-inbox .wd-thread { display: none; }
  .wd-inbox.is-thread .wd-inbox-list { display: none; }
  .wd-inbox.is-thread .wd-thread { display: flex; }
  .wd-thread-back { display: inline-grid; }
  .wd-inbox .wd-details { top: 60px; width: 100%; }
  .wd-thread-controls { width: 100%; }
  .wd-thread-controls .wd-input { flex: 1; max-width: none; }
  .wd-messages { padding: 14px; }
  .wd-msg { max-width: 88%; }
  .wd-legend-cards { grid-template-columns: 1fr; }
  .wd-funnel-row { grid-template-columns: 1fr 70px; }
  .wd-funnel-bar { grid-column: 1 / -1; order: 3; }
  .wd-var-row { grid-template-columns: 1fr; }
  .wd-step-head { grid-template-columns: 1fr 1fr; }
  .wd-meters { grid-template-columns: 1fr; }
  .wd-review-list { grid-template-columns: 1fr; gap: 2px; }
  .wd-review-list dd { margin-bottom: 8px; }
}
@media (max-width: 760px) {
  .wd-auth { grid-template-columns: 1fr; }
  .wd-auth-aside { display: none; }
  .wd-auth-brand-mobile { display: inline-flex; }
  .wd-auth-main { justify-content: flex-start; padding: 28px 16px; }
  .wd-auth-card { padding: 26px 20px; border-radius: 14px; }
  .wd-grid-form, .wd-examples { grid-template-columns: 1fr; }
  .wd-span-2 { grid-column: auto; }
  .wd-page-head { align-items: flex-start; }
  .wd-page-head h1 { font-size: 21px; }
  .wd-page-actions { width: 100%; }
  .wd-page-actions .wd-btn { flex: 1 1 auto; }
  .wd-stats, .wd-stats-4, .wd-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wd-stat { padding: 12px 14px; }
  .wd-stat-value { font-size: 22px; }
  .wd-card { padding: 16px; }
  .wd-card-flush { padding: 0; }
  .wd-map-grid { grid-template-columns: 1fr; }
  .wd-import-result dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wd-kv { grid-template-columns: 1fr; }
  .wd-modal { width: 100vw; max-width: 100vw; max-height: 100vh; margin: auto 0 0; }
  .wd-modal-card { border-radius: 16px 16px 0 0; max-height: 92vh; }
  .wd-modal-foot { border-radius: 0; }
  .wd-toolbar > * { flex: 1 1 140px; }
  .wd-toolbar .wd-input { width: 100%; }
  /* Tables become stacked cards */
  .wd-table-stack thead { display: none; }
  .wd-table-stack, .wd-table-stack tbody, .wd-table-stack tr, .wd-table-stack td { display: block; width: 100%; }
  .wd-table-stack tr { padding: 12px 16px; border-bottom: 1px solid var(--wd-line); }
  .wd-table-stack tbody tr:hover td { background: transparent; }
  .wd-table-stack td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .wd-table-stack td[data-label]::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--wd-muted); text-align: left; flex: none; }
  .wd-table-stack td:first-child, .wd-table-stack td:has(> .wd-person) { text-align: left; }
  .wd-table-stack td:has(> .wd-person)::before { display: none; }
  .wd-table-stack td:has(> .wd-person) { padding-bottom: 8px; }
  .wd-table-stack td:first-child::before { display: none; }
  .wd-table-stack td.wd-col-check { display: none; }
  .wd-table-stack .wd-row-actions { justify-content: flex-end; }
  .wd-table-stack td.wd-num { text-align: right; }
  .wd-danger-zone { flex-direction: column; align-items: flex-start; }
}

/* ===========================================================================
   14.2 — dashboard, limits, import, template library, test sends
   ======================================================================== */
.wd-badge-violet { background: #efe9fd; color: #5b33b8; }
.wd-dash-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; margin: 0 0 18px; }
.wd-dash-top > .wd-card { margin: 0; }
.wd-dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.wd-dash-head h2 { font-size: 16px; margin: 0; }
.wd-stats-6 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.wd-stat.is-warn .wd-stat-sub { color: var(--wd-amber-fg); font-weight: 600; }
.wd-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.wd-grid-3 > .wd-card { margin: 0; min-width: 0; }

.wd-capacity-main { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; margin: 4px 0 14px; }
.wd-capacity-figure strong { display: block; font-size: 40px; line-height: 1; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--wd-ink); }
.wd-capacity-figure span { display: block; margin-top: 6px; color: var(--wd-muted); font-size: 12.5px; max-width: 150px; }
.wd-number-health { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wd-line-2); }
.wd-number-health li { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--wd-line-2); font-size: 13.5px; flex-wrap: wrap; }
.wd-number-health-end { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.wd-number-health-end small { color: var(--wd-muted); }
.wd-fine { color: var(--wd-muted); font-size: 12px; margin: 10px 0 0; }

.wd-meters-stack { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.wd-capacity > .wd-card-head, .wd-plan-usage > .wd-card-head { flex-wrap: nowrap; align-items: flex-start; }
.wd-capacity > .wd-card-head > a, .wd-plan-usage > .wd-card-head > a { white-space: nowrap; }
.wd-meter-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; flex-wrap: wrap; }
.wd-meter-top span { color: var(--wd-ink-2); font-weight: 600; }
.wd-meter-top strong { font-variant-numeric: tabular-nums; }
.wd-meter-top em { font-style: normal; font-size: 12px; font-weight: 700; margin-left: 4px; }
.wd-meter.is-near .wd-meter-top em { color: var(--wd-amber-fg); }
.wd-meter.is-full .wd-meter-top em { color: var(--wd-red-fg); }
.wd-meter-bar { height: 8px; border-radius: 999px; background: var(--wd-gray-bg); overflow: hidden; }
.wd-meter-bar span { display: block; height: 100%; border-radius: 999px; background: var(--wd-brand); min-width: 2px; }
.wd-meter.is-near .wd-meter-bar span { background: #d99a27; }
.wd-meter.is-full .wd-meter-bar span { background: #d64534; }
.wd-meter small { display: block; color: var(--wd-muted); font-size: 12px; margin-top: 5px; }

.wd-camp-list { list-style: none; margin: 0; padding: 0; }
.wd-camp-list li a { display: block; padding: 10px 6px; border-radius: 9px; color: var(--wd-ink) !important; text-decoration: none !important; }
.wd-camp-list li a:hover { background: var(--wd-bg); }
.wd-camp-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.wd-camp-top strong { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-camp-bar { position: relative; height: 6px; border-radius: 999px; background: var(--wd-gray-bg); margin: 8px 0 6px; overflow: hidden; }
.wd-camp-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.wd-camp-bar .is-acc { background: var(--wd-brand-soft-2); }
.wd-camp-bar .is-del { background: var(--wd-brand); }
.wd-camp-list small { color: var(--wd-muted); font-size: 12px; }

/* Import */
.wd-alert-warning { background: var(--wd-amber-bg); color: var(--wd-amber-fg); border-color: #f4dca6; }
.wd-import-summary { margin: 0 0 10px; font-size: 14px; }
.wd-import-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.wd-import-tile { border: 1px solid var(--wd-line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.wd-import-tile strong { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wd-import-tile span { display: block; font-size: 13px; font-weight: 600; color: var(--wd-ink-2); }
.wd-import-tile small { display: block; font-size: 12px; color: var(--wd-muted); margin-top: 2px; }
.wd-import-tile.is-ok { border-color: #b5e6cc; background: var(--wd-green-bg); }
.wd-import-tile.is-ok strong { color: var(--wd-green-fg); }
.wd-import-tile.is-warn strong { color: var(--wd-amber-fg); }
.wd-import-stats.is-loading { opacity: .55; transition: opacity .15s; }
.wd-input-prefix { display: flex; align-items: stretch; }
.wd-input-prefix span { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--wd-line); border-right: 0; border-radius: 9px 0 0 9px; background: var(--wd-bg); color: var(--wd-muted); font-weight: 600; }
.wd-input-prefix .wd-input { border-radius: 0 9px 9px 0; }
.wd-optin-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid #b5e6cc; background: var(--wd-green-bg); border-radius: 12px; margin: 4px 0 16px; cursor: pointer; }
.wd-optin-box input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--wd-brand); flex: none; }
.wd-optin-box strong { display: block; font-size: 14.5px; color: var(--wd-ink); }
.wd-optin-box small { display: block; color: var(--wd-ink-2); font-size: 12.5px; margin-top: 3px; }
.wd-table-compact th, .wd-table-compact td { padding: 7px 10px; font-size: 13px; }
.wd-caption-left { caption-side: top; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--wd-muted); padding: 0 0 6px; }
.wd-plain-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--wd-ink-2); }
.wd-import-done { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 12px; background: var(--wd-green-bg); color: var(--wd-green-fg); margin-bottom: 16px; }
.wd-import-done .wd-icon { width: 26px; height: 26px; flex: none; }
.wd-import-done h3 { font-size: 16px; margin: 0 0 4px; color: inherit; }
.wd-import-done p { margin: 0; color: var(--wd-ink-2); font-size: 13.5px; }
.wd-import-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.wd-import-figures div { border: 1px solid var(--wd-line); border-radius: 10px; padding: 10px 12px; }
.wd-import-figures dt { font-size: 12.5px; color: var(--wd-muted); }
.wd-import-figures dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wd-drop span { display: flex; flex-direction: column; gap: 4px; }
.wd-drop small { font-size: 12.5px; }

/* Template library */
.wd-lib-intro { margin: 0 0 12px; }
.wd-lib-intro h2 { font-size: 16px; margin: 0 0 4px; }
.wd-lib-intro p { max-width: 760px; margin: 0; }
.wd-chip-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.wd-filter-chip { border: 1px solid var(--wd-line); background: #fff; color: var(--wd-ink-2); border-radius: 999px; padding: 6px 13px; font: 600 13px var(--wd-font); cursor: pointer; }
.wd-filter-chip:hover { border-color: #c8d3de; }
.wd-filter-chip.is-on { background: var(--wd-navy); border-color: var(--wd-navy); color: #fff; }
.wd-template-lib h3 { word-break: normal; overflow-wrap: anywhere; }
.wd-template-lib header { flex-wrap: wrap; }
.wd-lib-when { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 12.5px; color: var(--wd-muted); }
.wd-lib-when .wd-icon { width: 14px; height: 14px; margin-top: 2px; }
.wd-template-lib footer { align-items: center; margin-top: auto; }
.wd-lib-pick { margin-right: auto; font-size: 13px; color: var(--wd-ink-2); }
.wd-lib-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 16px; border-radius: 14px; background: var(--wd-navy); color: #fff; box-shadow: var(--wd-shadow-lg); flex-wrap: wrap; }
.wd-lint { margin-top: 12px; }
.wd-lint-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--wd-muted); }
.wd-lint-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wd-lint-list li { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; padding: 7px 9px; border-radius: 8px; }
.wd-lint-list li .wd-icon { width: 14px; height: 14px; margin-top: 2px; }
.wd-lint-list .is-error { background: var(--wd-red-bg); color: var(--wd-red-fg); }
.wd-lint-list .is-warn { background: var(--wd-amber-bg); color: var(--wd-amber-fg); }
.wd-lint-ok { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--wd-green-fg); }
.wd-lint-ok .wd-icon { width: 15px; height: 15px; }

/* Test sends */
.wd-test-name { margin: 0 0 12px; font-size: 14px; }
.wd-test-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.wd-test-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 10px; border-radius: 9px; }
.wd-test-list li .wd-icon { width: 15px; height: 15px; margin-top: 2px; flex: none; }
.wd-test-list .is-ok { background: var(--wd-green-bg); color: var(--wd-green-fg); }
.wd-test-list .is-bad { background: var(--wd-red-bg); color: var(--wd-red-fg); }

@media (max-width: 1180px) {
  .wd-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .wd-dash-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .wd-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .wd-import-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wd-capacity-main { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wd-capacity-figure span { max-width: none; }
  .wd-number-health-end { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =====================================================================
   14.3 design: Geist type, deeper navy and green, quieter surfaces
   ===================================================================== */
.wd-app-body, .wd-auth-body { font-feature-settings: "ss01" 0; }
.wd-tnum { font-variant-numeric: tabular-nums; }
.wd-app-body h1, .wd-app-body h2, .wd-app-body h3 { letter-spacing: -.015em; }
.wd-page-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -.025em; }
.wd-eyebrow { color: var(--wd-muted); font-size: 13px; margin: 0 0 2px !important; text-transform: none; letter-spacing: 0; font-weight: 400; }
.wd-card { box-shadow: none; border-radius: 14px; }
.wd-card-title { font-size: 15px; font-weight: 600; }
.wd-card-head .wd-muted { font-size: 13px; margin-top: 2px !important; }
.wd-btn { font-weight: 500; border-radius: 10px; min-height: 40px; }
.wd-btn-sm { min-height: 32px; border-radius: 8px; }
.wd-btn-secondary { box-shadow: none; border-color: #d3d8df; }
.wd-btn-primary { box-shadow: none; }
.wd-badge { font-weight: 500; }
.wd-table th { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; background: #fafbfa; }
.wd-segmented { background: #e9ebe6; }
.wd-segmented button, .wd-segmented a { font-weight: 500; padding: 7px 14px; }
.wd-stat, .wd-kpi { box-shadow: none; }
.wd-stat-value { font-weight: 600; }
.wd-fine { color: var(--wd-muted); font-size: 12.5px; margin-top: 10px !important; }

/* Sidebar */
.wd-sidebar { padding: 18px 14px 16px; }
.wd-sidebar-brand { font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.wd-org-button { background: var(--wd-dark-2); border-color: var(--wd-dark-3); min-height: 50px; }
.wd-org-avatar { background: #e9c46a; color: #2b1d00; }
.wd-nav a { min-height: 38px; padding: 0 10px; border-radius: 8px; }
.wd-nav a:hover { background: var(--wd-dark-2); }
.wd-nav a.is-active { background: var(--wd-dark-3); box-shadow: none; }
.wd-nav a .wd-icon { color: var(--wd-on-dark-2); }
.wd-nav a.is-active .wd-icon { color: var(--wd-hl); }
.wd-nav-label { color: var(--wd-on-dark-2); font-weight: 600; letter-spacing: .08em; margin: 14px 10px 4px; }
.wd-nav-count { background: var(--wd-hl); color: var(--wd-dark); font-weight: 600; }
.wd-sb-plan { margin: 14px 0 0; border: 1px solid var(--wd-dark-3); border-radius: 12px; padding: 13px 14px; background: var(--wd-dark-2); font-size: 12.5px; color: var(--wd-on-dark); }
.wd-sb-plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.wd-sb-plan-top strong { color: #fff; font-weight: 600; font-size: 13px; }
.wd-sb-plan-top a { color: var(--wd-hl-light) !important; }
.wd-sb-plan-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.wd-sb-plan-row .wd-tnum { color: #fff; }
.wd-sb-plan-bar { height: 6px; border-radius: 99px; background: var(--wd-dark-3); overflow: hidden; }
.wd-sb-plan-bar span { display: block; height: 100%; background: var(--wd-hl); border-radius: 99px; }
.wd-sb-plan-bar.is-near span { background: #f1b44c; }

/* Top bar */
.wd-topbar { background: #fff; backdrop-filter: none; height: 64px; }
.wd-search input { height: 40px; background: #f7f8f6; border-color: #dfe3e8; }
.wd-numpill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid #dfe3e8; border-radius: 10px; background: #fff; color: var(--wd-ink) !important; text-decoration: none !important; font-size: 13px; white-space: nowrap; }
.wd-numpill:hover { border-color: #c3cad3; }
.wd-numpill .wd-mono { font-size: 13px; }
.wd-numpill-q { color: var(--wd-muted); }
.wd-live { width: 8px; height: 8px; border-radius: 50%; background: #a9b3c1; box-shadow: 0 0 0 3px #edeff2; flex: none; }
.wd-numpill.is-green .wd-live { background: var(--wd-hl); box-shadow: 0 0 0 3px var(--wd-hl-ring); }
.wd-numpill.is-yellow .wd-live { background: #e0a526; box-shadow: 0 0 0 3px #fbedcc; }
.wd-numpill.is-red .wd-live { background: #d92d20; box-shadow: 0 0 0 3px #fbdcd9; }
@media (max-width: 1080px) { .wd-numpill-q { display: none; } }

/* Dashboard rows */
.wd-dash-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: stretch; margin: 0 0 18px; }
.wd-dash-row > .wd-card { margin: 0; }
.wd-dash-row.is-top { align-items: flex-start; }
.wd-dash-wide { flex: 2 1 600px; min-width: 0; }
.wd-dash-side { flex: 1 1 320px; min-width: 0; }
.wd-dash-half { flex: 1 1 420px; min-width: 0; }
.wd-dash-note { margin: -8px 0 18px !important; }

/* Daily limit card */
.wd-limit-card { flex: 2 1 420px; min-width: 0; background: var(--wd-navy); color: var(--wd-on-dark); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; }
.wd-limit-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.wd-limit-head h2 { color: #fff !important; font-size: 15px; font-weight: 600; }
.wd-limit-head p { color: var(--wd-on-dark-2); font-size: 13px; margin-top: 2px !important; }
.wd-limit-tier { background: var(--wd-dark-3); color: var(--wd-hl-light); border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.wd-limit-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.wd-limit-big strong { font-size: 46px; line-height: 1; font-weight: 600; letter-spacing: -.035em; color: #fff; }
.wd-limit-big span { font-size: 15px; }
.wd-limit-bar { height: 10px; border-radius: 99px; background: var(--wd-dark-3); overflow: hidden; margin: 18px 0 6px; }
.wd-limit-bar span { display: block; height: 100%; background: var(--wd-hl); border-radius: 99px; }
.wd-limit-scale { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--wd-on-dark-2); }
.wd-limit-scale em { color: #f6c26b; font-style: normal; font-weight: 600; }
.wd-limit-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--wd-dark-3); }
.wd-limit-stats dt { font-size: 12px; color: var(--wd-on-dark-2); margin: 0 0 3px; }
.wd-limit-stats dd { margin: 0; font-size: 16px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 7px; }
.wd-limit-foot { margin-top: 14px !important; font-size: 12.5px; color: var(--wd-on-dark-2); }
.wd-limit-foot a { color: var(--wd-hl-light) !important; }
.wd-qdot { width: 8px; height: 8px; border-radius: 50%; background: #a9b3c1; }
.wd-qdot.is-green { background: var(--wd-hl); } .wd-qdot.is-yellow { background: #f1b44c; } .wd-qdot.is-red { background: #ff7a6e; }

/* KPI tiles */
.wd-kpis { flex: 3 1 540px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.wd-kpi { background: #fff; border: 1px solid var(--wd-line); border-radius: 14px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wd-kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--wd-muted); font-size: 13px; }
.wd-kpi-value { font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -.025em; }
.wd-kpi small { color: var(--wd-muted); font-size: 12.5px; }
.wd-delta { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.wd-delta.is-up { background: var(--wd-green-bg); color: var(--wd-green-fg); }
.wd-delta.is-down { background: var(--wd-red-bg); color: var(--wd-red-fg); }
.wd-spark { width: 100%; height: 34px; display: block; margin-top: 2px; }
.wd-spark polyline { fill: none; stroke: var(--wd-hl); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.wd-spark line { stroke: #e4e7eb; stroke-width: 2; vector-effect: non-scaling-stroke; }
.wd-spark-gap { height: 36px; }

/* Delivery chart */
.wd-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--wd-ink-2); margin-bottom: 8px; }
.wd-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wd-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.wd-key-read { background: var(--wd-brand-strong); } .wd-key-del { background: var(--wd-hl-soft); } .wd-key-und { background: #a9b3c1; }
.wd-dchart { position: relative; height: 236px; margin: 10px 0 0 44px; }
.wd-dchart-grid { position: absolute; inset: 0 0 32px 0; }
.wd-dchart-grid span { position: absolute; left: 0; right: 0; border-top: 1px solid #eef0f2; }
.wd-dchart-grid em { position: absolute; right: calc(100% + 10px); top: -8px; font-style: normal; font-size: 11.5px; color: var(--wd-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wd-dchart-bars { position: absolute; inset: 0 0 32px 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(2px, calc(60px / var(--n)), 14px); align-items: end; }
.wd-dchart-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; outline: none; }
.wd-dchart-col:hover .wd-dchart-stack, .wd-dchart-col:focus-visible .wd-dchart-stack { filter: brightness(.92); }
.wd-dchart-col:focus-visible { box-shadow: 0 0 0 2px var(--wd-brand); border-radius: 4px; }
.wd-dchart-stack { display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 2px; }
.wd-dchart-stack i { display: block; flex-grow: 0; flex-shrink: 1; min-height: 0; }
.wd-dchart-stack .is-read { background: var(--wd-brand-strong); } .wd-dchart-stack .is-del { background: var(--wd-hl-soft); } .wd-dchart-stack .is-und { background: #a9b3c1; }
.wd-dchart-x { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); font-size: 11.5px; color: var(--wd-muted); white-space: nowrap; }

/* Funnel */
.wd-funnel2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.wd-funnel2 li > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: 13.5px; }
.wd-funnel2 strong { font-weight: 600; }
.wd-funnel2 small { color: var(--wd-muted); }
.wd-funnel2-bar, .wd-hbar { display: block; height: 10px; border-radius: 99px; background: #eef0f2; overflow: hidden; }
.wd-funnel2-bar i, .wd-hbar i { display: block; height: 100%; background: var(--wd-brand); border-radius: 99px; }
.wd-hbar { height: 8px; }
.wd-hbars { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.wd-hbars li > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 5px; }
.wd-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px !important; }
.wd-inline-alert { display: flex; gap: 10px; align-items: center; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.wd-inline-alert span { flex: 1; }
.wd-inline-alert.is-red { background: var(--wd-red-bg); color: #7a1a14; }
.wd-inline-alert a { color: inherit !important; font-weight: 600; white-space: nowrap; }

/* Inbox snapshot */
.wd-stat4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.wd-stat4 > div { background: #f6f7f5; border-radius: 10px; padding: 12px; font-size: 12.5px; color: var(--wd-muted); }
.wd-stat4 strong { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--wd-ink); }
.wd-stat4 > .is-warn strong { color: var(--wd-amber-fg); }
.wd-subhead { font-size: 12px !important; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wd-muted); margin: 14px 0 4px !important; }
.wd-agents { list-style: none; margin: 0; padding: 0; }
.wd-agents li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--wd-line-2); font-size: 13.5px; }
.wd-agents li > span:nth-child(2) { flex: 1; min-width: 0; font-weight: 500; }
.wd-agents small { color: var(--wd-muted); }
.wd-table-clean td { padding: 12px 16px; }
.wd-table-clean .wd-camp-bar { width: 120px; margin: 0 0 4px; }
.wd-camp-bar .is-acc { background: var(--wd-hl); }
.wd-strong-link { color: var(--wd-ink) !important; font-weight: 500; }

/* Inbox: pictures and contact panel */
.wd-messages { background: #eef1ec; }
.wd-msg.is-out { background: #ddf3e5; }
.wd-msg-img { display: block; margin: -4px -8px 6px; border-radius: 9px; overflow: hidden; max-width: 320px; background: #e2e6e0; }
.wd-msg-img img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; }
.wd-msg-img.is-sticker { background: transparent; max-width: 140px; }
.wd-msg-video { display: block; width: 100%; max-width: 320px; border-radius: 9px; margin-bottom: 6px; background: #000; }
.wd-msg-audio { display: block; width: 260px; max-width: 100%; margin-bottom: 4px; }
.wd-msg-media { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.wd-details-head { text-align: center; padding-bottom: 14px; }
.wd-details-head .wd-avatar.lg, .wd-details-inner .wd-avatar.lg { width: 64px; height: 64px; font-size: 20px; margin: 0 auto 8px; display: grid; }
.wd-details-head h3 { margin: 6px 0 2px !important; }
.wd-details-actions { margin-top: 10px !important; }
.wd-details-sec { border-top: 1px solid var(--wd-line-2); padding: 14px 0; }
.wd-details-sec h4 { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--wd-muted); }
.wd-details-sec .wd-detail-row { border-top: 0; padding: 5px 0; }
.wd-details-sec .wd-detail-row b { font-weight: 500; }
.wd-details-sec p .wd-icon { width: 15px; height: 15px; vertical-align: -3px; }
.wd-timeline { list-style: none; margin: 0; padding: 0; }
.wd-timeline li { position: relative; padding: 0 0 10px 18px; font-size: 13px; }
.wd-timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--wd-hl); box-shadow: 0 0 0 3px #e3f4ea; }
.wd-timeline small { display: block; color: var(--wd-muted); }
.wd-conv.is-active { background: var(--wd-brand-soft); border-left-color: transparent; }

/* Contacts */
.wd-cstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); background: #fff; border: 1px solid var(--wd-line); border-radius: 14px; margin: 0 0 16px; overflow: hidden; }
.wd-cstats > a, .wd-cstats > div { padding: 14px 18px; border-right: 1px solid var(--wd-line-2); color: var(--wd-muted) !important; text-decoration: none !important; font-size: 13px; }
.wd-cstats > :last-child { border-right: 0; }
.wd-cstats > a:hover { background: #fafbfa; }
.wd-cstats > a.is-current { background: var(--wd-brand-soft); box-shadow: inset 0 -2px 0 var(--wd-brand); }
.wd-cstats strong { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--wd-ink); margin-top: 2px; }
.wd-cstats .is-green strong { color: var(--wd-green-fg); }
.wd-cstats .is-amber strong { color: var(--wd-amber-fg); }
.wd-ctabs { margin-bottom: 14px; }
.wd-ctabs a { font-weight: 500; }
.wd-ctabs-new { display: inline-flex; align-items: center; gap: 6px; color: var(--wd-brand-strong) !important; }
.wd-ctabs-new .wd-icon { width: 15px; height: 15px; }
.wd-bulkbar { background: var(--wd-navy); color: #fff; border: 0; border-radius: 10px; margin: 10px 12px; padding: 8px 10px 8px 14px; }
.wd-bulkbar .wd-btn-secondary { background: var(--wd-dark-3); border-color: var(--wd-dark-3); color: #fff !important; }
.wd-bulkbar .wd-input { background: var(--wd-dark-2); border-color: var(--wd-dark-3); color: #fff; }

/* Phone previews */
.wd-phone { border: 0; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--wd-line); }
.wd-phone-bar { display: flex; align-items: center; gap: 10px; background: #0f5e40; padding: 10px 12px; font-weight: 400; }
.wd-phone-av { width: 30px; height: 30px; border-radius: 50%; background: #e9c46a; color: #2b1d00; display: grid; place-items: center; font-weight: 700; font-size: 11px; flex: none; }
.wd-phone-who { min-width: 0; }
.wd-phone-who strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-phone-who small { display: block; color: #cde9da; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-phone-screen { background: #eef1ec; }
.wd-tpl-media { flex-direction: column; gap: 2px; text-align: center; }
.wd-tpl-media small { font-size: 11.5px; opacity: .85; }
.wd-tpl-img { display: block; width: calc(100% + 22px); margin: -9px -11px 8px; max-height: 200px; object-fit: cover; border-radius: 4px 12px 0 0; }
.wd-tpl-button { color: #0f6f9e; font-weight: 500; }
.wd-cp-preview .wd-phone { background: var(--wd-dark); padding: 10px; border-radius: 34px; box-shadow: 0 24px 50px -20px rgba(11, 26, 44, .35); max-width: 330px; }
.wd-cp-preview .wd-phone-bar { border-radius: 24px 24px 0 0; padding: 14px; }
.wd-cp-preview .wd-phone-screen { border-radius: 0 0 24px 24px; min-height: 360px; padding: 16px 12px; }
.wd-side-limit { margin-top: 16px; background: #eef3fd; border: 1px solid #cfdcf7; color: #1a2f63; border-radius: 12px; padding: 12px 14px; font-size: 13px; max-width: 330px; }
.wd-side-limit strong { display: block; font-weight: 600; margin-bottom: 8px; }
.wd-side-limit-bar { display: block; height: 8px; border-radius: 99px; background: #d8e2f5; overflow: hidden; margin-bottom: 8px; }
.wd-side-limit-bar i { display: block; height: 100%; background: #2457c5; }
.wd-side-limit small { display: block; color: #2c437a; }
.wd-template-draft .wd-phone-bar { background: #56687a; }
.wd-template-idea .wd-phone-bar { background: #6b7a8a; }
@media (max-width: 640px) {
  .wd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .wd-kpi { padding: 14px; }
  .wd-kpi-value { font-size: 24px; }
  .wd-kpi-top { flex-wrap: wrap; }
  .wd-limit-big strong { font-size: 38px; }
  .wd-dchart { margin-left: 34px; }
}
.wd-thread-who { flex: 1 1 auto; min-width: 0; }
.wd-thread-who strong, .wd-thread-who small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-day { font-size: 12px; font-weight: 500; }

/* Installable app */
.wd-push-status { font-weight: 500; margin: 0 0 12px !important; }
.wd-push-invite { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--wd-dark); color: #fff; border-radius: 14px; padding: 12px 12px 12px 16px; box-shadow: var(--wd-shadow-lg); }
.wd-push-invite span { flex: 1 1 180px; font-weight: 500; }
.wd-push-invite .wd-btn-ghost { color: var(--wd-on-dark) !important; }
@media (display-mode: standalone) {
  .wd-topbar { padding-top: env(safe-area-inset-top); height: calc(64px + env(safe-area-inset-top)); }
  .wd-sidebar { padding-top: calc(18px + env(safe-area-inset-top)); }
}
.wd-msg-img.is-broken { display: flex; gap: 8px; align-items: center; padding: 12px; margin: 0 0 6px; background: #fff6e0; color: #6b4500 !important; border-radius: 9px; font-size: 13px; }
.wd-msg-img.is-broken .wd-icon { flex: none; }
.wd-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.wd-chip-row .wd-chip { cursor: pointer; border: 1px solid var(--wd-line); background: #fff; }
.wd-forward-rules { background: #f7f8f6; border: 1px solid var(--wd-line); border-radius: 12px; padding: 4px 16px 12px; margin: 14px 0; }
.wd-forward-rules li { margin-bottom: 6px; font-size: 13.5px; }
.wd-tpl-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px !important; }
@media (max-width: 640px) { .wd-forward-btn span { display: none; } }
@media (max-width: 640px) {
  .wd-topbar-actions .wd-numpill, .wd-topbar-actions .wd-chip:not(.wd-chip-amber) { display: none; }
  .wd-thread-controls { flex-wrap: wrap; }
}
