/* ==========================================================================
   ES Cloud 4.1 — design system.
   Dark collapsible sidebar, slim top bar, soft surfaces, one signal colour
   (Edderton Scott orange) used sparingly, status colours, light + dark modes.
   Syne for page titles only; Urbanist for the interface. No outside assets.
   ========================================================================== */

@font-face { font-family: "Syne"; src: url("../fonts/syne-variable.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Urbanist"; src: url("../fonts/urbanist-variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
	color-scheme: light;
	--bg: #f4f4f2; --paper: #ffffff; --panel: #efeeeb; --subtle: #f8f8f6; --hover: #f5f5f3;
	--ink: #17171a; --ink-2: #34343a; --muted: #6a6a72; --faint: #9b9ba3;
	--line: #ebeae6; --line-2: #dad9d4; --ring: rgba(23, 23, 26, .06);
	--signal: #e0531b; --signal-ink: #fff; --signal-soft: #fdeee6; --signal-line: #f6c9b3;
	--ok: #1d7a45; --ok-soft: #e5f4eb; --warn: #a96300; --warn-soft: #fcf1de;
	--err: #c2361f; --err-soft: #fcebe8; --info: #2b5bd0; --info-soft: #e9effc;
	--btn: #17171a; --btn-ink: #fff; --btn-hover: #2d2d33;
	--side-bg: #131315; --side-ink: #d4d4d9; --side-muted: #77777f; --side-line: #232327; --side-hover: rgba(255, 255, 255, .055); --side-on: rgba(255, 255, 255, .09);
	--display: "Syne", "Helvetica Neue", Arial, sans-serif; --text: "Urbanist", "Helvetica Neue", Arial, sans-serif; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--side: 244px; --rail: 64px; --top: 56px;
	--r: 8px; --r-sm: 6px; --r-lg: 12px;
	--shadow-xs: 0 1px 2px rgba(16, 16, 20, .05);
	--shadow: 0 0 0 1px var(--ring), 0 1px 2px rgba(16, 16, 20, .04), 0 2px 8px -2px rgba(16, 16, 20, .05);
	--shadow-hover: 0 0 0 1px rgba(23, 23, 26, .1), 0 2px 4px rgba(16, 16, 20, .05), 0 8px 20px -6px rgba(16, 16, 20, .1);
	--shadow-lg: 0 0 0 1px var(--ring), 0 12px 32px -8px rgba(16, 16, 20, .2), 0 4px 10px -4px rgba(16, 16, 20, .08);
	--ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #0e0e10; --paper: #17171a; --panel: #1f1f23; --subtle: #1b1b1e; --hover: #1e1e22;
	--ink: #ededf0; --ink-2: #c9c9cf; --muted: #93939c; --faint: #6c6c75;
	--line: #26262b; --line-2: #34343a; --ring: rgba(255, 255, 255, .06);
	--signal: #f26a30; --signal-soft: rgba(242, 106, 48, .14); --signal-line: rgba(242, 106, 48, .35);
	--ok: #4cc283; --ok-soft: rgba(76, 194, 131, .13); --warn: #e7a83a; --warn-soft: rgba(231, 168, 58, .13);
	--err: #f0705c; --err-soft: rgba(240, 112, 92, .13); --info: #7aa2ff; --info-soft: rgba(122, 162, 255, .13);
	--btn: #ededf0; --btn-ink: #121214; --btn-hover: #ffffff;
	--side-bg: #0a0a0b; --side-line: #1c1c20;
	--shadow: 0 0 0 1px var(--ring), 0 1px 2px rgba(0, 0, 0, .3);
	--shadow-hover: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 18px -6px rgba(0, 0, 0, .6);
	--shadow-lg: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 40px -10px rgba(0, 0, 0, .7);
}
/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "tnum" 0; }
a { color: inherit; }
a:hover { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; font-family: var(--text); }
p { margin: 0 0 .7em; }
p:last-child { margin-bottom: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--signal-soft); }
.ec-icon { flex: none; vertical-align: middle; }
.ec-skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 1000; border-radius: var(--r-sm); }
.ec-skip:focus { left: 8px; }
.ec-num, .ec-money, .ec-stat__value, .ec-table td, .ec-figure, .ec-kpi__value, time { font-variant-numeric: tabular-nums; }
.ec-kbd, kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--paper); color: var(--muted); font: 600 11px/1 var(--text); }

/* ---------- Shell ---------- */
.ec-shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .22s var(--ease); background: linear-gradient(to right, var(--side-bg) var(--side), transparent var(--side)); }
.ec-collapsed .ec-shell { background: linear-gradient(to right, var(--side-bg) var(--rail), transparent var(--rail)); }
.ec-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--side-bg); color: var(--side-ink); overflow: hidden; z-index: 40; }
.ec-side__top { display: flex; align-items: center; gap: 8px; height: var(--top); padding: 0 12px 0 14px; flex: none; }
.ec-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; color: inherit; }
.ec-brand:hover { color: inherit; }
.ec-brand__mark { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--signal); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 800 12px/1 var(--display); letter-spacing: -0.02em; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.ec-brand__words { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.ec-brand img { height: 22px; width: auto; }
.ec-brand__logo { display: block; height: 38px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.ec-brand:has(.ec-brand__logo) { flex: 1; }
.ec-brand--auth .ec-brand__logo { height: 44px; }
.ec-brand:has(.ec-brand__logo) .ec-brand__mark, .ec-brand:has(.ec-brand__logo) .ec-brand__words { display: none; }
.ec-collapsed .ec-brand .ec-brand__logo { display: none; }
.ec-collapsed .ec-brand:has(.ec-brand__logo) .ec-brand__mark { display: inline-flex; }
@media (max-width: 960px) { .ec-collapsed .ec-brand .ec-brand__logo { display: block; } .ec-collapsed .ec-brand:has(.ec-brand__logo) .ec-brand__mark { display: none; } }
.ec-brand__name { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.ec-brand__app { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--side-muted); }
.ec-nav { padding: 6px 10px 16px; flex: 1; overflow-y: auto; overflow-x: hidden; }
.ec-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.ec-nav__group { margin: 18px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--side-muted); white-space: nowrap; }
.ec-nav__sep { height: 1px; background: var(--side-line); margin: 14px 8px; }
.ec-nav__link { display: flex; align-items: center; gap: 11px; height: 34px; padding: 0 10px; border-radius: 7px; text-decoration: none; font-weight: 550; font-size: 13.5px; color: var(--side-ink); position: relative; white-space: nowrap; transition: background .12s, color .12s; }
.ec-nav__link .ec-icon { width: 17px; height: 17px; color: var(--side-muted); transition: color .12s; }
.ec-nav__link:hover { background: var(--side-hover); color: #fff; }
.ec-nav__link:hover .ec-icon { color: #e8e8ec; }
.ec-nav__link.is-on { background: var(--side-on); color: #fff; }
.ec-nav__link.is-on .ec-icon { color: var(--signal); }
.ec-nav__link.is-on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0; background: var(--signal); }
.ec-nav__link > span { overflow: hidden; text-overflow: ellipsis; }
.ec-nav__badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.ec-nav__link.is-on .ec-nav__badge, .ec-nav__badge.is-hot { background: var(--signal); }
.ec-side__foot { display: flex; align-items: center; gap: 4px; padding: 10px; border-top: 1px solid var(--side-line); flex: none; }
.ec-me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; padding: 6px; border-radius: 7px; color: inherit; }
.ec-me:hover { background: var(--side-hover); color: inherit; }
.ec-me > span:last-child { min-width: 0; }
.ec-me strong { display: block; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-me small { display: block; color: var(--side-muted); font-size: 11.5px; }
.ec-side .ec-avatar { background: #2a2a30; color: #fff; box-shadow: none; }
.ec-side .ec-icon-btn { color: var(--side-muted); }
.ec-side .ec-icon-btn:hover { background: var(--side-hover); color: #fff; border-color: transparent; }

/* Collapsed rail (desktop). */
.ec-collapsed .ec-shell { grid-template-columns: var(--rail) minmax(0, 1fr); }
.ec-collapsed .ec-brand__words, .ec-collapsed .ec-nav__group, .ec-collapsed .ec-nav__link > span, .ec-collapsed .ec-me > span:last-child, .ec-collapsed .ec-side__foot > .ec-icon-btn { display: none; }
.ec-collapsed .ec-side__top { padding: 0; justify-content: center; }
.ec-collapsed .ec-nav { padding: 6px 10px; }
.ec-collapsed .ec-nav__link { justify-content: center; padding: 0; }
.ec-collapsed .ec-nav__link.is-on::before { left: -10px; }
.ec-collapsed .ec-nav__group + ul, .ec-collapsed .ec-nav ul + .ec-nav__group { margin-top: 0; }
.ec-collapsed .ec-nav ul + p.ec-nav__group + ul { border-top: 1px solid var(--side-line); padding-top: 8px; margin-top: 8px; }
.ec-collapsed .ec-nav__badge { position: absolute; top: 3px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; background: var(--signal); }
.ec-collapsed .ec-side__foot { justify-content: center; padding: 10px 0; }
.ec-collapsed .ec-me { flex: none; padding: 4px; }
.ec-tip { position: fixed; z-index: 200; pointer-events: none; padding: 5px 9px; border-radius: 6px; background: #000; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-lg); transform: translateY(-50%); }

/* Top bar */
.ec-main-wrap { min-width: 0; display: flex; flex-direction: column; }
.ec-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: var(--top); padding: 0 24px 0 16px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.ec-menu-btn { display: inline-flex; }
.ec-top__crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; min-width: 0; }
.ec-top__crumb a { text-decoration: none; font-weight: 600; color: var(--muted); }
.ec-top__crumb a:hover { color: var(--ink); }
.ec-top__crumb strong { color: var(--ink); font-weight: 650; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.ec-top__crumb .ec-icon { width: 14px; height: 14px; color: var(--faint); }
.ec-top__search { flex: 0 1 380px; margin-left: auto; display: flex; align-items: center; gap: 8px; height: 34px; background: var(--paper); border-radius: var(--r); padding: 0 6px 0 10px; box-shadow: var(--shadow); color: var(--faint); cursor: text; transition: box-shadow .15s; }
.ec-top__search:hover { box-shadow: var(--shadow-hover); }
.ec-top__search .ec-icon { width: 16px; height: 16px; }
.ec-top__search input { border: 0; outline: 0; background: transparent; height: 32px; width: 100%; min-width: 0; font-size: 13.5px; color: var(--ink); }
.ec-top__search input::placeholder { color: var(--faint); }
.ec-top__search .ec-kbd { flex: none; }
.ec-top__right { display: flex; align-items: center; gap: 4px; }
.ec-quick, .ec-pop { position: relative; }
.ec-quick summary, .ec-pop summary { list-style: none; cursor: pointer; }
.ec-quick summary::-webkit-details-marker, .ec-pop summary::-webkit-details-marker { display: none; }
.ec-quick__menu, .ec-pop__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; animation: ec-pop .14s var(--ease); }
.ec-quick__menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-decoration: none; border-radius: var(--r-sm); font-weight: 600; font-size: 13.5px; }
.ec-quick__menu a .ec-icon { width: 16px; height: 16px; color: var(--muted); }
.ec-quick__menu a:hover { background: var(--hover); }
.ec-quick__menu a .ec-kbd { margin-left: auto; }
.ec-pop__menu { width: min(380px, calc(100vw - 24px)); padding: 0; }
.ec-pop__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; font-weight: 700; font-size: 13px; }
.ec-pop__body { max-height: 420px; overflow-y: auto; padding: 0 14px 10px; }
.ec-pop__foot { border-top: 1px solid var(--line); padding: 8px 14px; font-size: 13px; }
.ec-bell { position: relative; }
.ec-bell__dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px var(--bg); }
@keyframes ec-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.ec-main { padding: 26px 32px 72px; width: 100%; max-width: 1440px; }
.ec-theme-btn .ec-icon--sun { display: none; }
[data-theme="dark"] .ec-theme-btn .ec-icon--sun { display: block; }
[data-theme="dark"] .ec-theme-btn .ec-icon--moon { display: none; }

/* Loading bar for page changes. */
.ec-loadbar { position: fixed; left: 0; top: 0; height: 2px; width: 0; background: var(--signal); z-index: 300; opacity: 0; transition: width .3s ease, opacity .3s; }
.is-loading .ec-loadbar { opacity: 1; width: 82%; transition: width 8s cubic-bezier(.1, .7, .1, 1), opacity .1s; }

/* ---------- Header, tabs ---------- */
.ec-head { margin-bottom: 22px; }
.ec-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 10px; }
.ec-back .ec-icon { width: 15px; height: 15px; }
.ec-back:hover { color: var(--ink); }
.ec-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ec-head__text { min-width: 0; }
.ec-h1 { font-family: var(--display); font-size: 23px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.ec-head__sub { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.ec-head__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ec-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -8px 0 22px; overflow-x: auto; scrollbar-width: none; }
.ec-tabs::-webkit-scrollbar { display: none; }
.ec-tab { position: relative; padding: 10px 12px 11px; font-weight: 600; font-size: 13.5px; color: var(--muted); text-decoration: none; white-space: nowrap; border-radius: 6px 6px 0 0; transition: color .12s; }
.ec-tab:hover { color: var(--ink); }
.ec-tab.is-on { color: var(--ink); }
.ec-tab.is-on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 0; background: var(--signal); }
.ec-tab b { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; font-size: 11px; font-weight: 700; background: var(--signal-soft); color: var(--signal); }

/* ---------- Buttons ---------- */
.ec-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: var(--r); border: 1px solid transparent; background: var(--btn); color: var(--btn-ink); font-weight: 650; font-size: 13.5px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, box-shadow .12s, color .12s, transform .06s; box-shadow: var(--shadow-xs); user-select: none; }
.ec-btn:hover { background: var(--btn-hover); color: var(--btn-ink); }
.ec-btn:active { transform: translateY(1px); }
.ec-btn .ec-icon { width: 16px; height: 16px; }
.ec-btn--primary { background: var(--btn); color: var(--btn-ink); }
.ec-head__actions > .ec-btn--primary, .ec-head__actions > form > .ec-btn--primary, .ec-toolbar .ec-btn--primary, .ec-empty__cta .ec-btn--primary, .ec-btn--signal { background: var(--signal); color: var(--signal-ink); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12), var(--shadow-xs); }
.ec-head__actions > .ec-btn--primary:hover, .ec-head__actions > form > .ec-btn--primary:hover, .ec-toolbar .ec-btn--primary:hover, .ec-empty__cta .ec-btn--primary:hover, .ec-btn--signal:hover { background: color-mix(in srgb, var(--signal) 88%, #000); color: #fff; }
.ec-btn--ghost { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset, var(--shadow-xs); }
.ec-btn--ghost:hover { background: var(--hover); color: var(--ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--line-2) 60%, var(--ink)) inset, var(--shadow-xs); }
.ec-btn--danger { background: var(--paper); color: var(--err); box-shadow: 0 0 0 1px color-mix(in srgb, var(--err) 30%, transparent) inset; }
.ec-btn--danger:hover { background: var(--err); color: #fff; }
.ec-btn--link { background: none; border: 0; color: var(--ink); padding: 0; height: auto; box-shadow: none; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); font-weight: 600; }
.ec-btn--link:hover { background: none; color: var(--signal); text-decoration-color: currentColor; }
.ec-btn--sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; gap: 5px; }
.ec-btn--sm .ec-icon { width: 14px; height: 14px; }
.ec-btn[disabled], .ec-btn.is-busy { opacity: .6; cursor: progress; }
.ec-btn.is-busy::after { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ec-spin .6s linear infinite; }
@keyframes ec-spin { to { transform: rotate(360deg); } }
.ec-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid transparent; border-radius: var(--r); background: transparent; cursor: pointer; color: var(--muted); text-decoration: none; transition: background .12s, color .12s; position: relative; }
.ec-icon-btn:hover { background: var(--panel); color: var(--ink); }
.ec-icon-btn .ec-icon { width: 18px; height: 18px; }
.ec-linklike { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); cursor: pointer; font-weight: 600; }
.ec-linklike:hover { color: var(--signal); }
.ec-inline-form { display: inline; margin: 0; }
.ec-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Cards, grids ---------- */
.ec-card { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.ec-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 0; min-height: 46px; }
.ec-card__title { font-size: 14px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink); }
.ec-card__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ec-card__actions .ec-btn { height: 28px; padding: 0 10px; font-size: 12.5px; }
.ec-card__body { padding: 12px 18px 18px; }
.ec-card > .ec-card__body:first-child { padding-top: 18px; }
.ec-card--flush .ec-card__body { padding: 0; }
.ec-card--flush > .ec-card__head { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ec-card--signal { border-top-left-radius: 0; border-bottom-left-radius: 0; box-shadow: var(--shadow), inset 3px 0 0 var(--signal); }
.ec-card--dark { background: #17171a; color: #ededf0; }
.ec-card--dark .ec-card__title { color: #fff; }
.ec-grid { display: grid; gap: 18px; align-items: start; }
.ec-grid > .ec-grid__col > .ec-card:last-child, .ec-grid > div > .ec-card:last-child { margin-bottom: 0; }
.ec-grid { margin-bottom: 18px; }
.ec-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ec-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ec-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ec-grid--main { grid-template-columns: minmax(0, 1fr) 360px; }
.ec-grid--side { grid-template-columns: 280px minmax(0, 1fr); }
.ec-grid--chat { grid-template-columns: 280px minmax(0, 1fr); }

/* Stat / KPI tiles */
.ec-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.ec-stat { position: relative; display: flex; flex-direction: column; gap: 2px; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px 16px 14px; text-decoration: none; overflow: hidden; transition: box-shadow .15s, transform .15s; min-width: 0; }
a.ec-stat:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.ec-stat__label { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ec-stat__value { font-size: 26px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.2; margin-top: 2px; }
.ec-stat__sub { font-size: 12.5px; color: var(--faint); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ec-stat.is-alert .ec-stat__value { color: var(--signal); }
.ec-stat.is-warn .ec-stat__value { color: var(--warn); }
.ec-stat__spark { position: absolute; right: 12px; bottom: 14px; width: 30%; max-width: 84px; height: 28px; color: var(--signal); opacity: .9; }
.ec-stat__spark--muted { color: var(--faint); }
.ec-delta { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 9px; font-size: 11.5px; font-weight: 700; }
.ec-delta--up { background: var(--ok-soft); color: var(--ok); }
.ec-delta--down { background: var(--err-soft); color: var(--err); }
.ec-delta--flat { background: var(--panel); color: var(--muted); }

/* ---------- Tables, lists ---------- */
.ec-table-wrap { overflow-x: auto; }
.ec-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.ec-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--subtle); white-space: nowrap; }
.ec-table th:first-child { border-top-left-radius: var(--r-lg); }
.ec-table th:last-child { border-top-right-radius: var(--r-lg); }
.ec-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ec-table td:first-child, .ec-table th:first-child { padding-left: 18px; }
.ec-table td:last-child, .ec-table th:last-child { padding-right: 18px; }
.ec-table tbody tr:last-child td { border-bottom: 0; }
.ec-table tbody tr { transition: background .1s; }
.ec-table tbody tr:hover td { background: var(--hover); }
.ec-table tr.is-link { cursor: pointer; }
.ec-table td strong { font-weight: 650; }
.ec-table td small, .ec-sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.ec-table .ec-col-actions { text-align: right; white-space: nowrap; }
.ec-table .ec-col-amount, .ec-table .ec-col-total, .ec-table .ec-col-value, .ec-table .ec-col-balance, .ec-num { text-align: right; white-space: nowrap; }
.ec-card > .ec-card__body > .ec-table-wrap { margin: -12px -18px -18px; }
.ec-card > .ec-card__body:first-child > .ec-table-wrap { margin-top: -18px; }
.ec-card--flush > .ec-card__body > .ec-table-wrap { margin: 0; }
.ec-card--flush > .ec-card__head + .ec-card__body .ec-table th { border-radius: 0; }
.ec-col-act { white-space: nowrap; text-align: right; }
.ec-col-act .ec-inline-form { display: inline-block; margin-left: 4px; }
@media (hover: hover) and (min-width: 961px) {
	.ec-table tbody td.ec-col-act > *, .ec-table tbody td.ec-col-actions > * { opacity: .45; transition: opacity .12s; }
	.ec-table tbody tr:hover td.ec-col-act > *, .ec-table tbody tr:hover td.ec-col-actions > *, .ec-table tbody tr:focus-within td.ec-col-act > *, .ec-table tbody tr:focus-within td.ec-col-actions > * { opacity: 1; }
}
.ec-list { list-style: none; margin: 0; padding: 0; }
.ec-list li { border-bottom: 1px solid var(--line); }
.ec-list li:last-child { border-bottom: 0; }
.ec-list a, .ec-list .ec-list__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; }
.ec-list > li > a { margin: 0 -10px; padding: 10px; border-radius: var(--r-sm); transition: background .1s; }
.ec-list > li > a:hover { background: var(--hover); }
.ec-list a strong { font-weight: 650; }
.ec-list span { color: var(--muted); font-size: 12.5px; text-align: right; }
.ec-list .ec-icon { color: var(--muted); }
.ec-kv { margin: 0; display: grid; gap: 0; }
.ec-kv > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ec-kv > div:last-child { border-bottom: 0; }
.ec-kv dt { color: var(--muted); font-size: 13px; font-weight: 500; }
.ec-kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 550; }
.ec-kv dd a { text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.ec-feed { list-style: none; margin: 0; padding: 0; }
.ec-feed li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: flex-start; }
.ec-feed li:last-child { border-bottom: 0; }
.ec-feed .ec-avatar { width: 26px; height: 26px; font-size: 10px; }
.ec-feed time { font-size: 12px; color: var(--faint); }
.ec-feed p { margin: 0; color: var(--ink-2); }
.ec-feed p strong { color: var(--ink); font-weight: 650; }
.ec-feed a { text-decoration: none; font-weight: 600; color: var(--ink); }
.ec-feed a:hover { text-decoration: underline; }

/* ---------- Badges, chips, avatars ---------- */
.ec-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 650; background: var(--panel); color: var(--ink-2); white-space: nowrap; line-height: 1; vertical-align: middle; }
.ec-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.ec-badge--ok, .ec-badge--paid, .ec-badge--active, .ec-badge--published, .ec-badge--accepted, .ec-badge--delivered, .ec-badge--confirmed, .ec-badge--sent, .ec-badge--done, .ec-badge--connected, .ec-badge--replied, .ec-badge--converted, .ec-badge--won, .ec-badge--complete, .ec-badge--completed { background: var(--ok-soft); color: var(--ok); }
.ec-badge--warn, .ec-badge--overdue, .ec-badge--pending, .ec-badge--draft, .ec-badge--scheduled, .ec-badge--paused, .ec-badge--awaiting, .ec-badge--in_progress, .ec-badge--approval, .ec-badge--opened, .ec-badge--partial { background: var(--warn-soft); color: var(--warn); }
.ec-badge--err, .ec-badge--failed, .ec-badge--declined, .ec-badge--cancelled, .ec-badge--lost, .ec-badge--unsubscribed, .ec-badge--expired { background: var(--err-soft); color: var(--err); }
.ec-badge--info, .ec-badge--publishing, .ec-badge--sending, .ec-badge--contacted, .ec-badge--booked, .ec-badge--researched { background: var(--info-soft); color: var(--info); }
.ec-badge--draft, .ec-badge--pending { background: var(--panel); color: var(--muted); }
.ec-badge--overdue { background: var(--err-soft); color: var(--err); }
.ec-badge--signal { background: var(--signal-soft); color: var(--signal); }
.ec-badge--dark { background: var(--ink); color: var(--paper); }
.ec-badge--dark::before { display: none; }
.ec-chips { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-bottom: 16px; padding: 3px; background: var(--panel); border-radius: 9px; max-width: 100%; }
.ec-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--muted); white-space: nowrap; transition: background .12s, color .12s; }
.ec-chip:hover { color: var(--ink); }
.ec-chip.is-on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--ring); }
.ec-avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--signal-soft); color: var(--signal); font-size: 11px; font-weight: 750; letter-spacing: .02em; }
.ec-avatar--lg { width: 48px; height: 48px; font-size: 16px; border-radius: 12px; }
.ec-avatar--xl { width: 56px; height: 56px; font-size: 19px; border-radius: 14px; font-family: var(--display); }
.ec-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); vertical-align: 1px; margin-right: 6px; flex: none; }

/* ---------- Forms ---------- */
.ec-form { display: grid; gap: 14px; }
.ec-form--narrow { max-width: 560px; }
.ec-form--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ec-form--2 .ec-field--full, .ec-form--2 .ec-form__full { grid-column: 1 / -1; }
.ec-form--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ec-form--3 .ec-field--full { grid-column: 1 / -1; }
.ec-field { display: grid; gap: 6px; min-width: 0; }
.ec-field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ec-field label em { font-weight: 500; color: var(--faint); font-style: normal; }
.ec-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .ec-field select, .ec-field textarea, .ec-input, .ec-chanedit textarea, .ec-chat__form textarea { width: 100%; min-height: 36px; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s; font-size: 14px; }
.ec-field select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: 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='%239b9ba3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.ec-field input[type=file] { font-size: 13px; color: var(--muted); }
.ec-field input[type=file]::file-selector-button { margin-right: 10px; height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--panel); color: var(--ink); font-weight: 600; cursor: pointer; }
.ec-field textarea { resize: vertical; line-height: 1.5; }
.ec-field input:hover:not(:focus), .ec-field select:hover:not(:focus), .ec-field textarea:hover:not(:focus) { border-color: color-mix(in srgb, var(--line-2) 70%, var(--ink)); }
.ec-field input:focus, .ec-field select:focus, .ec-field textarea:focus, .ec-input:focus, .ec-chanedit textarea:focus, .ec-chat__form textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.ec-help { margin: 0; font-size: 12.5px; color: var(--muted); }
.ec-check, .ec-radio { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 550; cursor: pointer; font-size: 13.5px; }
.ec-check input, .ec-radio input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--signal); flex: none; }
.ec-checks, .ec-radios { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ec-radios { gap: 6px; }
.ec-radios .ec-radio { padding: 6px 11px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line-2) inset; align-items: center; }
.ec-radios .ec-radio input { margin-top: 0; }
.ec-radios .ec-radio:has(input:checked) { box-shadow: 0 0 0 1.5px var(--signal) inset; background: var(--signal-soft); }
.ec-money { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow-xs); }
.ec-money span { padding: 0 2px 0 11px; color: var(--muted); font-weight: 600; }
.ec-money input { border: 0 !important; box-shadow: none !important; padding-left: 2px !important; background: transparent !important; }
.ec-money:focus-within { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.ec-fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0; }
.ec-fieldset legend { font-weight: 700; padding: 0 6px; font-size: 13px; }
.ec-form > .ec-btn, .ec-form > button.ec-btn { justify-self: start; }
.ec-form__foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.ec-search { display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: var(--r); padding: 0 10px; min-width: 220px; height: 34px; box-shadow: 0 0 0 1px var(--line-2) inset, var(--shadow-xs); color: var(--faint); }
.ec-search:focus-within { box-shadow: 0 0 0 1px var(--signal) inset, 0 0 0 3px var(--signal-soft); }
.ec-search .ec-icon { width: 16px; height: 16px; }
.ec-search input { border: 0; outline: 0; height: 32px; background: transparent; width: 100%; color: var(--ink); font-size: 13.5px; }
.ec-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.ec-toolbar .ec-chips { margin: 0; }
.ec-toolbar select { appearance: none; -webkit-appearance: none; background-image: 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='%239b9ba3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.ec-toolbar select:focus, .ec-toolbar .ec-input:focus { outline: none; box-shadow: 0 0 0 1px var(--signal) inset, 0 0 0 3px var(--signal-soft); }
.ec-toolbar select, .ec-toolbar .ec-input { height: 34px; min-height: 34px; padding: 0 30px 0 11px; border: 0; border-radius: var(--r); background-color: var(--paper); box-shadow: 0 0 0 1px var(--line-2) inset, var(--shadow-xs); font-size: 13.5px; }
.ec-toolbar__right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ec-rte { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); overflow: hidden; }
.ec-rte:focus-within { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.ec-rte__bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); background: var(--subtle); }
.ec-rte__bar button { border: 0; background: transparent; padding: 4px 9px; border-radius: var(--r-sm); cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ec-rte__bar button:hover, .ec-rte__bar button.is-on { background: var(--panel); color: var(--ink); }
.ec-rte__area { min-height: 220px; padding: 12px 14px; outline: none; overflow-wrap: anywhere; }
.ec-rte__area h3 { font-size: 17px; margin: .6em 0 .3em; }
.ec-rte__src { width: 100%; border: 0; padding: 12px; font-family: var(--mono); font-size: 13px; min-height: 220px; background: var(--paper); }

/* ---------- Slide-over panels (all <dialog class="ec-dialog">) ---------- */
.ec-dialog { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(560px, 100vw); height: 100vh; height: 100dvh; max-height: none; max-width: 100vw; border: 0; border-radius: 0; padding: 0; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; }
.ec-dialog--wide { width: min(880px, 100vw); }
.ec-dialog[open] { display: flex; flex-direction: column; animation: ec-slide .26s var(--ease); }
.ec-dialog::backdrop { background: rgba(10, 10, 12, .38); backdrop-filter: blur(2px); animation: ec-fade .2s ease; }
@keyframes ec-slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ec-fade { from { opacity: 0; } to { opacity: 1; } }
.ec-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 14px 0 22px; height: 60px; border-bottom: 1px solid var(--line); flex: none; background: var(--paper); }
.ec-dialog__head h2 { font-size: 16px; font-weight: 700; font-family: var(--text); }
.ec-dialog__body { padding: 20px 22px 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.ec-dialog__body::after { content: ""; display: block; height: 22px; }
.ec-dialog__foot { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 8px; margin: 22px -22px -22px; padding: 14px 22px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }

/* ---------- Notices, toasts ---------- */
.ec-notice { display: block; padding: 11px 14px; border-radius: 0 var(--r) var(--r) 0; margin-bottom: 16px; font-size: 13.5px; border: 0; box-shadow: inset 3px 0 0 currentColor; }
.ec-notice .ec-icon { width: 16px; height: 16px; vertical-align: -3px; }
.ec-notice--info { background: var(--info-soft); color: var(--info); }
.ec-notice--ok { background: var(--ok-soft); color: var(--ok); }
.ec-notice--warn { background: var(--warn-soft); color: var(--warn); }
.ec-notice--err { background: var(--err-soft); color: var(--err); }
.ec-notice strong, .ec-notice a { color: inherit; }
.ec-notice > * { color: var(--ink); }
.ec-notice { color: var(--ink); }
.ec-notice--info { box-shadow: inset 3px 0 0 var(--info); }
.ec-notice--ok { box-shadow: inset 3px 0 0 var(--ok); }
.ec-notice--warn { box-shadow: inset 3px 0 0 var(--warn); }
.ec-notice--err { box-shadow: inset 3px 0 0 var(--err); }
.ec-flash { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: var(--r); margin-bottom: 14px; font-weight: 600; font-size: 13.5px; background: #17171a; color: #fff; }
.ec-flash--err { background: var(--err); }
.ec-flash__x { border: 0; background: transparent; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; opacity: .7; padding: 0 2px; }
.ec-flash__x:hover { opacity: 1; }
.ec-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; max-width: calc(100vw - 32px); }
.ec-toasts .ec-flash { pointer-events: auto; margin: 0; min-width: 260px; max-width: 420px; box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .06) inset; animation: ec-toast .3s var(--ease); }
.ec-toasts .ec-flash::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: #2fbf71 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.ec-toasts .ec-flash--err::before { background: rgba(255, 255, 255, .22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17v.01'/%3E%3C/svg%3E") center / 12px no-repeat; }
.ec-toasts .ec-flash > span { flex: 1; }
.ec-toasts .ec-flash.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
@keyframes ec-toast { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.ec-empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.ec-empty::before { content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9ba3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13l2.5-7h11L20 13'/%3E%3Cpath d='M4 13v6h16v-6h-5l-1 2h-4l-1-2z'/%3E%3C/svg%3E") center / 22px no-repeat; }
.ec-empty__title { font-weight: 700; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.ec-empty__text { font-size: 13px; max-width: 46ch; margin: 0 auto; }
.ec-card .ec-empty { padding: 18px 12px 14px; }
.ec-card .ec-empty::before { width: 36px; height: 36px; border-radius: 10px; background-size: 18px; margin-bottom: 10px; }
.ec-empty__cta { margin-top: 14px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Command palette ---------- */
.ec-pal { position: fixed; inset: 0; margin: 11vh auto auto; width: min(640px, calc(100vw - 24px)); max-height: 72vh; padding: 0; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg), 0 30px 80px -20px rgba(0, 0, 0, .45); overflow: hidden; }
.ec-pal[open] { display: flex; flex-direction: column; animation: ec-pop .16s var(--ease); }
.ec-pal::backdrop { background: rgba(10, 10, 12, .4); backdrop-filter: blur(3px); }
.ec-pal__input { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); flex: none; color: var(--faint); }
.ec-pal__input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; height: 54px; color: var(--ink); }
.ec-pal__list { overflow-y: auto; padding: 6px; flex: 1; }
.ec-pal__group { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
.ec-pal__item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; text-decoration: none; cursor: pointer; font-size: 14px; color: var(--ink); }
.ec-pal__item .ec-icon { width: 17px; height: 17px; color: var(--muted); flex: none; }
.ec-pal__item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-pal__item small { color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.ec-pal__item.is-on { background: var(--hover); border-radius: 0 8px 8px 0; box-shadow: inset 3px 0 0 var(--signal); }
.ec-pal__item.is-on .ec-icon { color: var(--signal); }
.ec-pal__empty { padding: 28px; text-align: center; color: var(--muted); }
.ec-pal__foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); flex: none; background: var(--subtle); }
.ec-pal__foot span { display: inline-flex; align-items: center; gap: 5px; }
.ec-skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--panel), var(--hover), var(--panel)); background-size: 200% 100%; animation: ec-shimmer 1.2s linear infinite; }
@keyframes ec-shimmer { to { background-position: -200% 0; } }
.ec-keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; margin: 0; font-size: 13.5px; }
.ec-keys dt { display: flex; gap: 4px; }
.ec-keys dd { margin: 0; color: var(--ink-2); }

/* ---------- Record header (lead, client, prospect, invoice) ---------- */
.ec-rec { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px 0; margin-bottom: 18px; }
.ec-rec__top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.ec-rec__main { flex: 1; min-width: 220px; }
.ec-rec__title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.ec-rec__title .ec-h1 { font-size: 22px; }
.ec-rec__sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.ec-rec__sub > span { display: inline-flex; align-items: center; gap: 5px; }
.ec-rec__sub .ec-icon { width: 14px; height: 14px; color: var(--faint); }
.ec-rec__sub a { text-decoration: none; }
.ec-rec__sub a:hover { color: var(--ink); text-decoration: underline; }
.ec-rec__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ec-rec__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 16px -20px 0; border-top: 1px solid var(--line); }
.ec-rec__facts > div { padding: 11px 20px 13px; border-right: 1px solid var(--line); min-width: 0; }
.ec-rec__facts > div:last-child { border-right: 0; }
.ec-rec__facts dt { font-size: 12px; color: var(--muted); font-weight: 500; }
.ec-rec__facts dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ec-rec__facts dd.is-signal { color: var(--signal); }
.ec-rec__facts dd.is-err { color: var(--err); font-weight: 700; }
.ec-card--err { box-shadow: var(--shadow), inset 3px 0 0 var(--err); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ec-card--err .ec-card__title { color: var(--err); }
.ec-missed h3 { margin: 0 0 8px; font-size: 14px; }
.ec-missed + .ec-missed { border-top: 1px solid var(--line); padding-top: 14px; }
.ec-override { padding: 6px 0; }
.ec-override + .ec-override { border-top: 1px solid var(--line); }
.ec-list li.is-err > a strong { color: var(--err); }
.ec-rec__facts dd.is-ok { color: var(--ok); }
.ec-rec + .ec-tabs { margin-top: 0; }
.ec-rec__stages { display: flex; gap: 3px; margin: 14px 0 0; }
.ec-rec__stages button, .ec-rec__stages span { flex: 1; height: 30px; display: flex; align-items: center; justify-content: center; padding: 0 8px; border: 0; background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%); transition: background .12s, color .12s; min-width: 0; }
.ec-rec__stages > :first-child { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.ec-rec__stages > :last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%); border-radius: 0 6px 6px 0; }
.ec-rec__stages button:hover { background: var(--line-2); color: var(--ink); }
.ec-rec__stages .is-past { background: color-mix(in srgb, var(--signal) 18%, var(--panel)); color: var(--ink-2); }
.ec-rec__stages .is-on { background: var(--signal); color: #fff; }
.ec-rec__stages .is-lost.is-on { background: var(--err); }
.ec-rec__stages .is-won.is-on { background: var(--ok); }
.ec-rec__stagesform { margin: 0 0 16px; }

/* ---------- Timeline ---------- */
.ec-timeline { list-style: none; margin: 0; padding: 4px 0 0; position: relative; }
.ec-event { display: flex; gap: 12px; padding: 0 0 18px; position: relative; }
.ec-event::before { content: ""; position: absolute; left: 14px; top: 32px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--line); }
.ec-event:last-child { padding-bottom: 0; }
.ec-event:last-child::before { display: none; }
.ec-event__icon { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--paper); color: var(--muted); flex: none; box-shadow: 0 0 0 1px var(--line-2) inset; position: relative; z-index: 1; }
.ec-event__icon .ec-icon { width: 14px; height: 14px; }
.ec-event.is-signal .ec-event__icon { background: var(--signal-soft); color: var(--signal); box-shadow: none; }
.ec-event.is-ok .ec-event__icon { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.ec-event__main { min-width: 0; flex: 1; padding-top: 5px; }
.ec-event__title { margin: 0; font-weight: 650; font-size: 13.5px; }
.ec-event__body { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); background: var(--subtle); box-shadow: 0 0 0 1px var(--line) inset; padding: 9px 12px; border-radius: var(--r); white-space: pre-wrap; overflow-wrap: anywhere; }
.ec-event__when { margin: 3px 0 0; font-size: 12px; color: var(--faint); }
.ec-composer { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 18px; }
.ec-composer textarea { flex: 1; min-height: 38px; max-height: 180px; resize: none; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); font-size: 13.5px; line-height: 1.45; }
.ec-composer textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }

/* ---------- Pipeline board ---------- */
.ec-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 14px; align-items: start; }
.ec-col { background: var(--panel); border-radius: var(--r-lg); padding: 8px; min-height: 140px; transition: background .12s, box-shadow .12s; }
.ec-col__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 10px; }
.ec-col__name { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.ec-col__meta { font-size: 12px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.ec-col__name .ec-col__meta { display: inline-flex; min-width: 20px; height: 18px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 9px; background: var(--paper); margin-left: 4px; }
.ec-col__list { display: grid; gap: 8px; min-height: 40px; }
.ec-col.is-over { background: var(--signal-soft); box-shadow: 0 0 0 2px var(--signal-line) inset; }
.ec-lead { background: var(--paper); border-radius: 10px; padding: 11px 12px; cursor: grab; text-decoration: none; display: block; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.ec-lead:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); color: inherit; }
.ec-lead.is-dragging { opacity: .45; transform: rotate(1.5deg); }
.ec-lead__name { font-weight: 700; font-size: 13.5px; display: block; }
.ec-lead__sub { font-size: 12.5px; color: var(--muted); display: block; margin-top: 2px; }
.ec-lead__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.ec-lead__foot > span:first-child { display: inline-flex; padding: 1px 7px; border-radius: 9px; background: var(--panel); font-weight: 600; }
.ec-lead__next { color: var(--signal); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.ec-lead__next .ec-icon { width: 13px; height: 13px; }

/* ---------- Dashboard pieces ---------- */
.ec-funnel { display: grid; gap: 8px; }
.ec-funnel__row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 92px; align-items: center; gap: 12px; text-decoration: none; padding: 3px 0; border-radius: 6px; }
.ec-funnel__row:hover .ec-funnel__name { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ec-funnel__name { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-funnel__track { height: 26px; border-radius: 6px; background: var(--subtle); position: relative; overflow: hidden; }
.ec-funnel__bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; min-width: 4px; opacity: .9; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; color: #fff; font-size: 12px; font-weight: 700; transition: width .6s var(--ease); }
.ec-funnel__num { text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ec-funnel__num strong { color: var(--ink); font-size: 13.5px; margin-right: 4px; }
.ec-chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding: 8px 0 0; border-bottom: 1px solid var(--line); position: relative; }
.ec-chart::before { content: ""; position: absolute; inset: 0 0 0 0; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--line) calc(25% - 1px), var(--line) 25%); opacity: .7; pointer-events: none; }
.ec-chart__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; z-index: 1; min-width: 0; }
.ec-chart__bar { width: min(36px, 70%); border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--signal) 30%, var(--panel)); min-height: 3px; position: relative; transition: background .12s; }
.ec-chart__col.is-now .ec-chart__bar { background: var(--signal); }
.ec-chart__col:hover .ec-chart__bar { background: color-mix(in srgb, var(--signal) 70%, var(--panel)); }
.ec-chart__val { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ec-chart__labels { display: flex; gap: 10px; padding-top: 6px; }
.ec-chart__labels span { flex: 1; text-align: center; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.ec-chart__labels span.is-now { color: var(--ink); }
.ec-agenda { list-style: none; margin: 0; padding: 0; position: relative; }
.ec-agenda li { display: grid; grid-template-columns: 54px 14px minmax(0, 1fr); gap: 10px; align-items: start; padding: 0 0 14px; position: relative; }
.ec-agenda li:last-child { padding-bottom: 0; }
.ec-agenda li::before { content: ""; position: absolute; left: 70px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.ec-agenda li:last-child::before { display: none; }
.ec-agenda time { font-size: 12.5px; font-weight: 700; color: var(--ink-2); padding-top: 1px; text-align: right; }
.ec-agenda i { width: 10px; height: 10px; margin: 5px 2px 0; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 2px var(--line-2); position: relative; z-index: 1; }
.ec-agenda .is-call i { box-shadow: 0 0 0 2px var(--signal); background: var(--signal); }
.ec-agenda .is-meeting i { box-shadow: 0 0 0 2px var(--info); background: var(--info); }
.ec-agenda .is-task i { box-shadow: 0 0 0 2px var(--line-2); }
.ec-agenda .is-past { opacity: .5; }
.ec-agenda a, .ec-agenda div { text-decoration: none; min-width: 0; }
.ec-agenda strong { display: block; font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-agenda a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.ec-agenda small { display: block; color: var(--muted); font-size: 12.5px; }
.ec-agenda__now { height: 0; border-top: 2px dashed var(--signal); margin: -6px 0 10px 64px; position: relative; }
.ec-agenda__now::before { content: "Now"; position: absolute; left: -64px; top: -9px; width: 54px; text-align: right; font-size: 11px; font-weight: 800; color: var(--signal); }
.ec-todo { list-style: none; margin: 0; padding: 0; }
.ec-todo li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ec-todo li:last-child { border-bottom: 0; }
.ec-todo__icon { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); color: var(--muted); flex: none; }
.ec-todo__icon .ec-icon { width: 15px; height: 15px; }
.ec-todo a { flex: 1; min-width: 0; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.ec-todo a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.ec-todo strong { display: block; font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-todo small { display: block; color: var(--muted); font-size: 12.5px; }
.ec-todo .ec-icon.is-arrow { width: 15px; height: 15px; color: var(--faint); margin-left: auto; }

/* Tasks */
.ec-tasks { list-style: none; margin: 0; padding: 0; }
.ec-task { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); transition: opacity .2s; }
.ec-task:last-child { border-bottom: 0; }
.ec-task__tick { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--paper); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: transparent; transition: border-color .12s, background .12s, color .12s; }
.ec-task__tick .ec-icon { width: 13px; height: 13px; }
.ec-task__tick:hover { border-color: var(--ok); color: var(--ok); }
.ec-task.is-done .ec-task__tick, .ec-task.is-ticking .ec-task__tick { background: var(--ok); border-color: var(--ok); color: #fff; cursor: default; }
.ec-task.is-ticking { opacity: .5; }
.ec-task__main { flex: 1; min-width: 0; }
.ec-task__main strong { display: block; font-weight: 600; font-size: 13.5px; }
.ec-task.is-done .ec-task__main strong { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.ec-task__main small { display: block; color: var(--muted); font-size: 12.5px; }
.ec-task__meta { text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ec-task__meta .is-late { color: var(--signal); font-weight: 700; }

/* ---------- Media grid, thumbs ---------- */
.ec-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.ec-tile { position: relative; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.ec-tile:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); color: inherit; }
.ec-tile__img { aspect-ratio: 4 / 3; background: var(--subtle); display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.ec-tile__img img { width: 100%; height: 100%; object-fit: cover; }
.ec-tile__body { padding: 9px 12px 11px; font-size: 13px; }
.ec-tile__body strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
.ec-tile__body small { color: var(--muted); }
.ec-tile input[type=checkbox] { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; accent-color: var(--signal); }
.ec-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r); background: var(--panel); display: inline-flex; align-items: center; justify-content: center; flex-direction: column; flex: none; }
.ec-thumb--icon small { font-size: 9px; font-weight: 800; color: var(--muted); }
.ec-tile__img .ec-thumb { width: 64px; height: 64px; }
.ec-file { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ec-file:last-child { border-bottom: 0; }
.ec-file__main { flex: 1; min-width: 0; }
.ec-file__main a { font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.ec-file__main a:hover { text-decoration: underline; }
.ec-file__main small { display: block; color: var(--muted); font-size: 12.5px; }
.ec-drop { position: relative; display: block; cursor: pointer; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 24px; text-align: center; color: var(--muted); background: var(--subtle); transition: border-color .12s, background .12s; }
.ec-drop:hover { border-color: color-mix(in srgb, var(--line-2) 50%, var(--ink)); }
.ec-drop.is-over { border-color: var(--signal); background: var(--signal-soft); color: var(--ink); }
.ec-drop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.ec-drop__note { display: block; margin-top: 4px; font-size: 12px; color: var(--faint); }
.ec-drop.has-files { border-color: var(--ok); background: var(--ok-soft); color: var(--ink); }
.ec-drop:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 2px; }
.ec-drop [data-drop-label] { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- Progress, misc ---------- */
.ec-progress { height: 6px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.ec-progress span { display: block; height: 100%; background: var(--signal); border-radius: 3px; }
.ec-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--panel); gap: 2px; }
.ec-bar span { display: block; height: 100%; }
.ec-muted { color: var(--muted); }
.ec-small { font-size: 12.5px; }
.ec-mono { font-family: var(--mono); font-size: 12.5px; }
.ec-right { text-align: right; }
.ec-nowrap { white-space: nowrap; }
.ec-mt { margin-top: 14px; }
.ec-mb0 { margin-bottom: 0; }
.ec-split { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ec-prose { max-width: 760px; font-size: 14.5px; line-height: 1.7; }
.ec-prose h2, .ec-prose h3 { margin: 1.3em 0 .45em; font-size: 18px; }
.ec-prose ul, .ec-prose ol { padding-left: 1.3em; }
.ec-prose img { height: auto; border-radius: var(--r); }
.ec-prose a { color: var(--signal); }
.ec-copyfield { display: flex; gap: 6px; }
.ec-copyfield input { flex: 1; font-family: var(--mono); font-size: 12.5px; }
.ec-copyfield--plain input { font-family: inherit; font-size: 14px; }
.ec-secret { font-family: var(--mono); letter-spacing: .06em; }
.ec-secret.is-shown { color: var(--ink); background: var(--warn-soft); padding: 1px 6px; border-radius: 5px; }
.ec-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; padding: 0; list-style: none; }
.ec-steps li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--faint); }
.ec-steps li::after { content: ""; width: 18px; height: 2px; border-radius: 0; background: var(--line-2); margin-left: 4px; }
.ec-steps li:last-child::after { display: none; }
.ec-steps li span { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1.5px currentColor inset; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.ec-steps li.is-done { color: var(--ok); }
.ec-steps li.is-done span { background: var(--ok-soft); box-shadow: none; }
.ec-steps li.is-on { color: var(--ink); }
.ec-steps li.is-on span { background: var(--signal); color: #fff; box-shadow: none; }
.ec-steps li.is-miss { color: var(--err); }
.ec-steps li.is-miss span { background: var(--err); color: #fff; box-shadow: none; font-weight: 800; }
.ec-steps li.is-over span { background: var(--ok-soft); box-shadow: 0 0 0 1.5px var(--ok) inset; }
.ec-steps li em { font-style: normal; font-weight: 500; color: var(--muted); }
.ec-steps li.is-skip { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.ec-steps--mini { margin: 0; }
.ec-steps--mini li { font-size: 12px; }
.ec-steps--mini li.is-on { color: var(--signal); }
.ec-pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.ec-pager span { margin-right: auto; }
.ec-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.ec-cal__h { padding: 8px 10px; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--subtle); }
.ec-cal__d { position: relative; min-height: 110px; padding: 6px; background: var(--paper); font-size: 12px; }
.ec-cal__d.is-out, .ec-cal__d.is-blank { background: var(--subtle); color: var(--faint); }
.ec-cal__d.is-today .ec-cal__n { background: var(--signal); color: #fff; }
.ec-cal__n { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.ec-cal__e { display: block; padding: 3px 7px; margin-bottom: 3px; border-radius: 0 5px 5px 0; background: var(--panel); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; box-shadow: inset 3px 0 0 var(--ink-2); }
.ec-cal__e:hover { filter: brightness(.97); }
.ec-cal__e.is-booking { box-shadow: inset 3px 0 0 var(--signal); background: var(--signal-soft); }
.ec-cal__e.is-post { box-shadow: inset 3px 0 0 var(--info); background: var(--info-soft); }
.ec-cal__e--published { box-shadow: inset 3px 0 0 var(--ok); background: var(--ok-soft); }
.ec-cal__e--scheduled { box-shadow: inset 3px 0 0 var(--info); background: var(--info-soft); }
.ec-cal__e--approval, .ec-cal__e--draft { box-shadow: inset 3px 0 0 var(--warn); background: var(--warn-soft); }
.ec-cal__e--failed, .ec-cal__e--partial { box-shadow: inset 3px 0 0 var(--err); background: var(--err-soft); }
.ec-cal__add { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 6px; display: none; align-items: center; justify-content: center; text-decoration: none; background: var(--ink); color: var(--paper); font-weight: 800; line-height: 1; }
.ec-cal__d:hover .ec-cal__add, .ec-cal__add:focus { display: inline-flex; }
.ec-chat { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 420px; }
.ec-chat__log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ec-msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 14px; }
.ec-msg--user { align-self: flex-end; background: var(--btn); color: var(--btn-ink); border-bottom-right-radius: 4px; }
.ec-msg--assistant { align-self: flex-start; background: var(--subtle); box-shadow: 0 0 0 1px var(--line) inset; border-bottom-left-radius: 4px; }
.ec-msg--busy { color: var(--muted); font-style: italic; }
.ec-chat__form { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.ec-chat__form textarea { min-height: 46px; max-height: 200px; resize: none; padding: 11px 13px; }
.ec-chat__tools { display: flex; align-items: center; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.ec-chat__tools .ec-check { margin-right: auto; font-size: 13px; }
.ec-chat__hello { margin: auto; max-width: 480px; text-align: left; color: var(--muted); }
.ec-chat__hello .ec-h3 { color: var(--ink); font-size: 19px; font-family: var(--display); }
.ec-figure { font-weight: 750; font-size: 32px; letter-spacing: -0.03em; line-height: 1.05; }
.ec-figure--signal { color: var(--signal); }
.ec-report { background: var(--paper); box-shadow: var(--shadow); border-radius: var(--r-lg); padding: 36px; max-width: 860px; }
.ec-report h1 { font-size: 27px; margin-bottom: 6px; font-family: var(--display); }
.ec-report h2 { font-size: 18px; margin: 26px 0 10px; }
.ec-h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.ec-err { color: var(--err); }
.ec-list--plain li { padding: 8px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ec-actions--stack { display: flex; flex-wrap: wrap; gap: 8px; }
.ec-crumbs { font-size: 13.5px; color: var(--muted); }
.ec-crumbs a { font-weight: 650; text-decoration: none; color: var(--ink-2); }
.ec-crumbs a:hover { text-decoration: underline; }
.ec-icon-btn--sm { width: 28px; height: 28px; }
.ec-icon-btn--sm .ec-icon { width: 15px; height: 15px; }

/* ---------- Social ---------- */
.ec-tiles--posts { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ec-tile__img--text { padding: 14px; font-size: 13px; line-height: 1.45; color: var(--muted); align-items: flex-start; justify-content: flex-start; text-align: left; }
.ec-tile__img--icon .ec-icon { width: 40px; height: 40px; color: var(--faint); }
.ec-tile--folder .ec-tile__img { aspect-ratio: 5 / 3; }
.ec-tile--folder .ec-tile__img--icon .ec-icon { color: var(--signal); opacity: .8; }
.ec-tile__body small .ec-badge { margin-right: 4px; }
.ec-chans { display: flex; gap: 4px; margin-top: 6px; }
.ec-chan { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); color: var(--muted); }
.ec-chan .ec-icon { width: 13px; height: 13px; }
.ec-chan--published { background: var(--ok-soft); color: var(--ok); }
.ec-chan--failed { background: var(--err-soft); color: var(--err); }
.ec-chan--manual { background: var(--warn-soft); color: var(--warn); }
.ec-chan--skipped { display: none; }
.ec-chanedit { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.ec-chanedit:first-child { padding-top: 0; }
.ec-chanedit:last-child { border-bottom: 0; padding-bottom: 0; }
.ec-chanedit .ec-check span { display: inline-flex; align-items: center; gap: 6px; }
.ec-chanedit.is-off { opacity: .55; }
.ec-media-pick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.ec-media-pick__item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; text-decoration: none; }
.ec-media-pick__item .ec-thumb { width: 96px; height: 96px; }
.ec-chanstatus { list-style: none; margin: 0; padding: 0; }
.ec-chanstatus__row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ec-chanstatus__row:last-child { border-bottom: 0; }
.ec-chanstatus__name { margin: 0 0 6px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ec-chanstatus__row .ec-small { margin: 6px 0 0; }

/* ---------- Files, office ---------- */
.ec-preview { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: var(--r); background: #111; }
.ec-preview--doc { width: 100%; height: 70vh; border: 0; background: #fff; }
.ec-card--preview .ec-card__body { padding: 12px; background: var(--subtle); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.ec-files { list-style: none; margin: 0; padding: 0; }
.ec-tree { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.ec-tree a { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 7px; text-decoration: none; font-weight: 550; font-size: 13.5px; color: var(--ink-2); }
.ec-tree a:hover { background: var(--hover); color: var(--ink); }
.ec-tree a.is-on { background: var(--signal-soft); color: var(--ink); font-weight: 650; }
.ec-tree a.is-on .ec-icon { color: var(--signal); }
.ec-tree a .ec-icon { width: 16px; height: 16px; flex: none; color: var(--muted); }
.ec-list small { display: block; color: var(--faint); font-size: 12px; white-space: nowrap; }
.ec-list a span { flex: 1; text-align: left; }

/* ---------- Team ---------- */
.ec-thoughts { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.ec-thought { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ec-thought header { display: flex; align-items: center; gap: 10px; }
.ec-thought header small { display: block; color: var(--muted); font-size: 12px; }
.ec-thought dl { margin: 0; }
.ec-thought dt { font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--signal); margin-top: 10px; }
.ec-thought dd { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-2); }
.ec-thought dd p { margin: 0 0 6px; }
.ec-thought footer { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.ec-hr { border-radius: var(--r); padding: 10px 14px; margin-bottom: 8px; background: var(--paper); box-shadow: var(--shadow); }
.ec-hr summary { cursor: pointer; font-weight: 600; }
.ec-table td .ec-avatar { vertical-align: middle; margin-right: 8px; }

/* ---------- AI ---------- */
.ec-grid--chat .ec-card { margin-bottom: 0; }
.ec-grid--chat .ec-chat { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ec-convs { list-style: none; margin: 0; padding: 6px; max-height: calc(100vh - 280px); overflow-y: auto; }
.ec-convs a { display: block; padding: 8px 10px; border-radius: 7px; text-decoration: none; font-size: 13.5px; font-weight: 600; }
.ec-convs a span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-convs a small { color: var(--faint); font-size: 12px; font-weight: 500; }
.ec-convs a:hover { background: var(--hover); }
.ec-convs a.is-on { background: var(--signal-soft); }
.ec-convs a.is-on small { color: var(--muted); }
.ec-convs .ec-icon { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- Sign-in ---------- */
.ec-auth { min-height: 100vh; display: block; background: var(--bg); background-image: radial-gradient(1200px 500px at 50% -10%, var(--signal-soft), transparent 70%); }
.ec-auth__wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.ec-auth__box { width: min(400px, 100%); background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 0 30px 28px; overflow: hidden; }
.ec-auth__brand { margin: 0 -30px 26px; padding: 20px 30px; background: #131315; }
.ec-auth__brand .ec-brand--auth { margin: 0; }
.ec-auth__brand .ec-brand__name { color: #fff; }
.ec-auth__box > .ec-h1:first-child { margin-top: 30px; }
.ec-auth__box .ec-h1 { margin-bottom: 6px; font-size: 24px; }
.ec-brand--auth { padding: 0; margin: 0 0 26px; gap: 10px; }
.ec-brand--auth .ec-brand__name { color: #fff; font-size: 15px; }
.ec-brand--auth .ec-brand__app { color: var(--signal); }
.ec-auth__text { color: var(--muted); margin-bottom: 18px; }
.ec-auth__err { color: var(--err); font-weight: 650; margin: 0; padding: 9px 12px; background: var(--err-soft); border-radius: var(--r); font-size: 13.5px; }
.ec-auth__ok { color: var(--ok); font-weight: 650; margin: 0; padding: 9px 12px; background: var(--ok-soft); border-radius: var(--r); font-size: 13.5px; }
.ec-auth__small { font-size: 13px; text-align: center; margin: 4px 0 0; color: var(--muted); }
.ec-auth .ec-btn { width: 100%; height: 40px; }
.ec-auth .ec-linklike { justify-self: center; font-size: 13px; }
.ec-auth__box--wide { max-width: 860px; width: 100%; }
.ec-auth__box--wide .ec-btn { width: auto; }

/* Client portal page (public, no sidebar). */
.ec-portal { background: var(--bg); }
.ec-portal .ec-top { background: var(--paper); padding: 0 24px; }
.ec-portal .ec-brand__name { color: var(--ink); }
.ec-portal .ec-main { max-width: 1080px; }

/* ---------- Small buttons inside dense lists ---------- */
.ec-thought footer .ec-btn, .ec-col-act .ec-btn, .ec-list--plain .ec-btn, .ec-table .ec-btn { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.ec-list .ec-btn span { color: inherit; font-size: inherit; text-align: inherit; }
.ec-list .ec-btn .ec-icon { color: inherit; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
	.ec-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ec-grid--main { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1100px) {
	.ec-grid--main { grid-template-columns: minmax(0, 1fr); }
	.ec-top__crumb { display: none; }
}
@media (max-width: 960px) {
	.ec-shell, .ec-collapsed .ec-shell { grid-template-columns: minmax(0, 1fr); }
	.ec-side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; height: 100%; z-index: 60; transform: translateX(-100%); transition: transform .24s var(--ease); box-shadow: 0 0 60px rgba(0, 0, 0, .35); }
	.ec-collapsed .ec-brand__words, .ec-collapsed .ec-nav__group, .ec-collapsed .ec-nav__link > span, .ec-collapsed .ec-me > span:last-child, .ec-collapsed .ec-side__foot > .ec-icon-btn { display: revert; }
	.ec-collapsed .ec-nav__link { justify-content: flex-start; padding: 0 10px; }
	.ec-collapsed .ec-nav__badge { position: static; }
	.ec-collapsed .ec-side__top { padding: 0 12px 0 14px; justify-content: flex-start; }
	.ec-collapsed .ec-me { flex: 1; }
	.ec-side-open .ec-side { transform: none; }
	.ec-side-open::after { content: ""; position: fixed; inset: 0; background: rgba(10, 10, 12, .45); z-index: 50; animation: ec-fade .2s; }
	.ec-top { padding: 0 12px; }
	.ec-top__search { flex: 1 1 auto; margin-left: 4px; }
	.ec-main { padding: 20px 16px 56px; }
	.ec-grid--2, .ec-grid--3, .ec-grid--side, .ec-grid--chat { grid-template-columns: minmax(0, 1fr); }
	.ec-form--2, .ec-form--3 { grid-template-columns: minmax(0, 1fr); }
	.ec-rec__stages { overflow-x: auto; }
	.ec-rec__stages button, .ec-rec__stages span { min-width: 92px; }
}
@media (max-width: 640px) {
	.ec-grid--4 { grid-template-columns: minmax(0, 1fr); }
	.ec-top__search .ec-kbd, .ec-top__search input::placeholder { display: none; color: transparent; }
	.ec-top__search { flex: 0 0 34px; width: 34px; padding: 0; justify-content: center; margin-left: auto; box-shadow: none; background: transparent; }
	.ec-top__search input { position: absolute; width: 1px; opacity: 0; pointer-events: none; }
	.ec-top__search .ec-icon { width: 18px; height: 18px; color: var(--muted); }
	.ec-h1 { font-size: 21px; }
	.ec-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ec-stat__value { font-size: 21px; }
	.ec-stat__spark { display: none; }
	.ec-kv > div { grid-template-columns: 1fr; gap: 2px; }
	.ec-table thead { display: none; }
	.ec-table, .ec-table tbody, .ec-table tr, .ec-table td { display: block; width: 100%; }
	.ec-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
	.ec-table tbody tr:last-child { border-bottom: 0; }
	.ec-table td { border: 0; padding: 3px 16px !important; text-align: left !important; }
	.ec-table td:empty { display: none; }
	.ec-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
	.ec-table td.ec-col-act::before, .ec-table td.ec-col-actions::before { display: none; }
	.ec-table .ec-col-actions { text-align: left; }
	.ec-head__actions { width: 100%; }
	.ec-cal { grid-template-columns: 1fr; }
	.ec-cal__h { display: none; }
	.ec-cal__d { min-height: 0; }
	.ec-cal__d.is-out { display: none; }
	.ec-msg { max-width: 94%; }
	.ec-thoughts { grid-template-columns: 1fr; }
	.ec-chat { height: calc(100vh - 170px); }
	.ec-funnel__row { grid-template-columns: 96px minmax(0, 1fr) 64px; gap: 8px; }
	.ec-rec__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ec-rec__facts > div:nth-child(2n) { border-right: 0; }
	.ec-rec__facts > div { border-bottom: 1px solid var(--line); }
	.ec-toasts { right: 12px; left: 12px; bottom: 12px; align-items: stretch; }
	.ec-toasts .ec-flash { max-width: none; min-width: 0; }
	.ec-dialog { width: 100vw; }
	.ec-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.ec-quick summary span { display: none; }
	.ec-quick summary { width: 34px; padding: 0; }
	.ec-top__right .ec-theme-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Print (reports, invoices) ---------- */
@media print {
	.ec-side, .ec-top, .ec-tabs, .ec-head__actions, .ec-rec__actions, .ec-flash, .ec-toasts, .ec-noprint, .ec-loadbar { display: none !important; }
	.ec-shell { display: block; }
	.ec-main { padding: 0; max-width: none; }
	body { background: #fff; }
	.ec-card, .ec-report, .ec-rec { box-shadow: none; border: 0; }
}

/* ---------- Assistant bubble + panel ---------- */
.ec-fab { position: fixed; right: 22px; bottom: 22px; z-index: 70; width: 52px; height: 52px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--signal); color: #fff; cursor: pointer; box-shadow: 0 10px 28px -6px color-mix(in srgb, var(--signal) 60%, transparent), 0 2px 6px rgba(0, 0, 0, .15); transition: transform .15s var(--ease), box-shadow .15s; }
.ec-fab:hover { transform: translateY(-2px) scale(1.04); }
.ec-fab .ec-icon { width: 24px; height: 24px; }
.ec-assist-open .ec-fab { transform: scale(0); pointer-events: none; }
.ec-assist { position: fixed; top: 0; right: 0; bottom: 0; z-index: 65; width: min(420px, 100vw); display: flex; flex-direction: column; background: var(--paper); box-shadow: var(--shadow-lg); transform: translateX(104%); transition: transform .25s var(--ease); }
.ec-assist.is-open { transform: none; }
.ec-assist__head { display: flex; align-items: center; gap: 2px; height: var(--top); padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.ec-assist__title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-right: auto; }
.ec-assist__title .ec-icon { color: var(--signal); }
.ec-chat--panel { flex: 1; height: auto; min-height: 0; }
.ec-chat--panel .ec-chat__log { padding: 16px; }
.ec-chat--panel .ec-msg { max-width: 90%; font-size: 13.5px; }
.ec-chat--panel .ec-chat__hello { margin: 8px 0; }
.ec-chat__hello .ec-linklike { text-align: left; font-weight: 500; text-decoration: none; color: var(--ink-2); padding: 8px 10px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line) inset; width: 100%; display: block; }
.ec-chat__hello .ec-linklike:hover { background: var(--hover); color: var(--ink); }
.ec-chat__hello .ec-list--plain li { padding: 4px 0; border: 0; }
.ec-msg--err { color: var(--err); background: var(--err-soft); box-shadow: none; }
.ec-msg--busy::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: ec-dots 1.2s steps(4, end) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes ec-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.ec-acts { align-self: flex-start; display: grid; gap: 4px; max-width: 90%; margin-top: -6px; }
.ec-act { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r); background: var(--ok-soft); color: var(--ink); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.ec-act .ec-icon { width: 14px; height: 14px; color: var(--ok); flex: none; }
.ec-act .ec-icon:last-child { color: var(--muted); margin-left: auto; }
a.ec-act:hover { box-shadow: 0 0 0 1px var(--ok) inset; color: var(--ink); }
.ec-act span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-toasts { bottom: 86px; }
@media (min-width: 1280px) {
	.ec-assist-open .ec-main-wrap { margin-right: 420px; }
	.ec-assist { box-shadow: -1px 0 0 var(--line), var(--shadow-lg); }
}
@media (max-width: 640px) {
	.ec-fab { right: 14px; bottom: 14px; width: 48px; height: 48px; }
	.ec-toasts { bottom: 72px; }
}
@media print { .ec-fab, .ec-assist { display: none !important; } }

/* ---------- Pay online (client portal) ---------- */
.ec-pay .ec-split { align-items: flex-start; }
.ec-pay__buttons { width: min(320px, 100%); min-height: 50px; }
.ec-pay__msg { margin: 10px 0 0; font-weight: 650; }
.ec-pay__msg.is-ok { color: var(--ok); }
.ec-pay__msg.is-err { color: var(--err); }
@media print { .ec-pay { display: none !important; } }
.ec-pay { max-width: 860px; }

/* ---------- 4.4: agreements, signing, sign-off, checklist ---------- */
.ec-agr { position: relative; }
.ec-agr__logo { height: 28px; width: auto; display: block; margin-bottom: 18px; }
.ec-agr h3 { font-size: 14px; margin: 18px 0 6px; }
.ec-agr ul { margin: 0 0 .7em; padding-left: 20px; }
.ec-agr li { margin: 3px 0; }
.ec-agr__facts { margin: 8px 0 6px; }
.ec-agr .ec-table tr.is-total td { border-top: 1.5px solid var(--ink); }
.ec-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 10px; }
.ec-sig__label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.ec-sig__line { min-height: 64px; border-bottom: 1.5px solid var(--ink-2); display: flex; align-items: flex-end; padding: 0 2px 4px; margin-bottom: 8px; color: #1b2550; }
:root[data-theme="dark"] .ec-sig__line { color: #c9d3ff; }
.ec-sig__typed { font-family: "Snell Roundhand", "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive; font-size: 30px; line-height: 1.1; }
.ec-sig__mark { display: block; width: 92px; height: 69px; margin-bottom: -6px; }
.ec-sig__img { max-height: 60px; width: auto; display: block; }
.ec-sig--preview { max-width: 260px; margin-top: 6px; }
.ec-agr__sec { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 8px; }
.ec-clause { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); margin: 0 0 8px; }
.ec-clause > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 14px; font-weight: 600; }
.ec-clause > summary::-webkit-details-marker { display: none; }
.ec-clause > summary::before { content: "›"; color: var(--faint); transition: transform .15s; margin-right: 2px; }
.ec-clause[open] > summary::before { transform: rotate(90deg); }
.ec-clause > summary > span:first-of-type { flex: 1; }
.ec-clause > .ec-form { padding: 4px 14px 14px; }
.ec-clause__badges { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ec-clause.is-off > summary { color: var(--faint); text-decoration: line-through; }
.ec-clause--new > summary { color: var(--muted); font-weight: 500; }
.ec-agr__care { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.ec-agr__care legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.ec-radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper); cursor: pointer; }
.ec-radio-card input { margin-top: 3px; accent-color: var(--signal); }
/* The chosen option gets the same straight orange line as other highlights. */
.ec-radio-card:has(input:checked) { border-color: var(--signal-line); border-top-left-radius: 0; border-bottom-left-radius: 0; box-shadow: inset 3px 0 0 var(--signal); }
.ec-agr__oneoff { display: none; padding: 12px 14px; background: var(--warn-soft); border-radius: var(--r); }
.ec-agr__care:has(input[data-oneoff]:checked) .ec-agr__oneoff { display: grid; gap: 10px; }
.ec-code { font-size: 22px; letter-spacing: .35em; font-family: var(--mono); max-width: 220px; text-align: center; }
.ec-sigpad { position: relative; border: 1px dashed var(--line-2); border-radius: var(--r); background: #fff; }
.ec-sigpad canvas { display: block; width: 100%; height: 160px; touch-action: none; cursor: crosshair; }
.ec-sigpad [data-sigpad-clear] { position: absolute; right: 8px; top: 8px; }
.ec-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ec-check-item { display: flex; gap: 10px; align-items: flex-start; }
.ec-check-item.is-done > span:last-child { color: var(--muted); text-decoration: line-through; }
.ec-check-item.is-done .ec-task__tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.ec-check-item .ec-inline-form { display: inline-flex; }
@media (max-width: 640px) { .ec-sigs { grid-template-columns: 1fr; } }
@media print { #sign, .ec-agr__care { display: none !important; } }
#sign { max-width: 860px; }
.ec-task__go { color: var(--muted); text-decoration: none; } .ec-task__go:hover { border-color: var(--signal); color: var(--signal); } .ec-task__go .ec-icon { width: 12px; height: 12px; }
.ec-tl-edit { margin-top: 6px; } .ec-tl-edit > summary { color: var(--faint); }

/* ---------- 4.6: plain-words help, next step, progress ---------- */
.ec-q { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin: 0 0 0 5px; padding: 0; border: 0; border-radius: 50%; background: var(--panel); color: var(--muted); font: 800 10.5px/1 var(--text); cursor: help; vertical-align: 1px; flex: none; text-transform: none; letter-spacing: 0; box-shadow: inset 0 0 0 1px var(--line-2); }
.ec-q:hover, .ec-q:focus-visible, .ec-q[aria-describedby] { background: var(--ink); color: var(--paper); box-shadow: none; }
.ec-qpop { position: fixed; z-index: 300; max-width: min(300px, calc(100vw - 16px)); padding: 9px 12px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 500; line-height: 1.45; text-align: left; white-space: normal; box-shadow: var(--shadow-lg); pointer-events: none; }
.ec-explain { margin: 0 0 18px; border-radius: var(--r-lg); background: var(--info-soft); }
.ec-explain > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 700; font-size: 13.5px; color: var(--info); }
.ec-explain > summary::-webkit-details-marker { display: none; }
.ec-explain > summary .ec-icon { width: 17px; height: 17px; }
.ec-explain__toggle { margin-left: auto; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.ec-explain__toggle::after { content: "Show"; }
.ec-explain[open] .ec-explain__toggle::after { content: "Hide"; }
.ec-explain__body { padding: 0 16px 14px 39px; font-size: 13.5px; line-height: 1.55; color: var(--ink); max-width: 860px; }
.ec-explain__body p { margin: 0 0 .6em; }
.ec-explain__body ol, .ec-explain__body ul { margin: 0 0 .7em; padding-left: 18px; }
.ec-explain__body li { margin: 3px 0; }
.ec-explain:not([open]) { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.ec-explain:not([open]) > summary { padding: 7px 14px; font-size: 13px; color: var(--muted); }
.ec-next { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 14px 18px; margin: 0 0 18px; border-radius: 0 var(--r-lg) var(--r-lg) 0; background: var(--paper); box-shadow: var(--shadow), inset 3px 0 0 var(--signal); }
.ec-next__text { flex: 1 1 300px; min-width: 0; }
.ec-next__label { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--signal); }
.ec-next__text p { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.ec-next__text p small { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; color: var(--muted); }
.ec-next__do { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ec-next__do .ec-inline-form { display: inline-flex; }
.ec-next--wait .ec-next__label { color: var(--info); }
.ec-next--done .ec-next__label { color: var(--ok); }
.ec-next--warn .ec-next__label { color: var(--err); }
.ec-steps--page { margin: 2px 0 16px; }
.ec-card__title .ec-q { vertical-align: 0; }
.ec-table th .ec-q { width: 15px; height: 15px; font-size: 9.5px; margin-left: 4px; }
.ec-sub { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
@media print { .ec-q, .ec-explain, .ec-next { display: none !important; } }
.ec-table th.ec-num { text-align: right; }
.ec-today { list-style: none; margin: 0; padding: 0; }
.ec-today__item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ec-today__item:first-child { border-top: 0; padding-top: 0; }
.ec-today__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--panel); color: var(--ink-2); }
.ec-today__icon .ec-icon { width: 15px; height: 15px; }
.ec-today__item p { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 1.45; }
.ec-today__do { flex: none; display: flex; gap: 6px; }
.ec-today__do .ec-btn { height: 30px; padding: 0 12px; font-size: 13px; }
.ec-today__item.is-warn .ec-today__icon { background: var(--err-soft); color: var(--err); }
.ec-today__item.is-wait .ec-today__icon { background: var(--info-soft); color: var(--info); }
.ec-today__wait { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ec-today__wait > summary { cursor: pointer; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.ec-today__wait .ec-today__item:first-child { padding-top: 6px; }
@media (max-width: 640px) { .ec-today__item { flex-wrap: wrap; } .ec-today__do { margin-left: 42px; } }
/* Stage bar: every stage readable; scrolls sideways when there are many. */
.ec-rec__stages { position: relative; overflow-x: auto; padding-bottom: 2px; }
.ec-rec__stages button, .ec-rec__stages span { flex: 1 0 auto; padding: 0 14px 0 17px; overflow: visible; text-overflow: clip; }
/* Phones and tablets: the sidebar slides in, so the shell has no dark sidebar column behind the page. */
@media (max-width: 960px) { .ec-shell, .ec-collapsed .ec-shell { background: var(--bg); } }
@media (max-width: 640px) {
	.ec-next { padding: 14px; gap: 10px; }
	.ec-next__text p { font-size: 14.5px; }
	.ec-next__do { width: 100%; }
	.ec-explain__body { padding-left: 16px; }
	.ec-today__item { gap: 10px; }
	.ec-today__do { margin-left: 40px; }
}
@media (max-width: 960px) { .ec-side { box-shadow: none; } .ec-side-open .ec-side { box-shadow: 0 0 60px rgba(0, 0, 0, .35); } }
@media (max-width: 640px) { .ec-today__item p { flex: 1 1 calc(100% - 50px); } .ec-today__do { margin-left: 40px; } }
/* Buttons inside lists keep their own shape (list links are padded rows). */
.ec-list a.ec-btn { display: inline-flex; justify-content: center; padding: 0 13px; margin: 0; flex: none; }
.ec-list .ec-btn span { flex: none; color: inherit; font-size: inherit; text-align: center; }
.ec-list .ec-btn--ghost:hover { background: var(--hover); }

/* ---------- 4.6.1: brand scrollbars, time back, the call page ---------- */
/* Scrollbars in the brand colours: a thin, straight orange bar on a quiet
   track, everywhere (page, sidebar, boards, dialogs, the client portal). */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { min-height: 36px; min-width: 36px; border: 3px solid transparent; border-radius: 0; background: var(--signal) padding-box; }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { border-width: 2px; }
@supports not selector(::-webkit-scrollbar) {
	* { scrollbar-color: var(--signal) transparent; scrollbar-width: thin; }
}

/* Time back: the hours a week our work gives back to the client's team. */
.ec-gain { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 18px; padding: 14px 18px; border-radius: 0 var(--r-lg) var(--r-lg) 0; background: var(--signal-soft); box-shadow: inset 3px 0 0 var(--signal); }
.ec-gain__fig { flex: none; display: flex; flex-direction: column; color: var(--signal); }
.ec-gain__fig strong { font-weight: 750; font-size: 34px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ec-gain__fig strong small { font-size: 17px; font-weight: 700; letter-spacing: 0; }
.ec-gain__fig > span { margin-top: 5px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ec-gain__text { flex: 1 1 260px; min-width: 0; }
.ec-gain__title { margin: 0; font-size: 15px; font-weight: 650; line-height: 1.4; color: var(--ink); }
.ec-gain__sub { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.ec-gain__do { flex: none; display: flex; gap: 8px; flex-wrap: wrap; }
.ec-report .ec-gain { margin: 22px 0; }
.ec-fixline { margin: 0 0 14px; padding: 4px 0 4px 14px; box-shadow: inset 3px 0 0 var(--signal); }
.ec-fixline__gain { display: block; margin-top: 2px; font-size: 13px; font-weight: 650; color: var(--signal); }
@media print { .ec-gain, .ec-fixline { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* The call page. */
.ec-callink { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.ec-callink a { font-weight: 700; }
.ec-callink span { font-size: 12.5px; overflow-wrap: anywhere; }
.ec-narrow { max-width: 760px; }
.ec-outcome__more { display: none; margin: -2px 0 6px 38px; }
.ec-outcome__more .ec-field { margin: 0; }
.ec-outcome__more input[type="date"] { max-width: 220px; }
.ec-outcome:has(input[value="follow_up"]:checked) .ec-outcome__more[data-for="follow_up"],
.ec-outcome:has(input[value="no_show"]:checked) .ec-outcome__more[data-for="no_show"] { display: block; }
@supports not selector(:has(a)) { .ec-outcome__more { display: block; } }
@media (max-width: 640px) { .ec-outcome__more { margin-left: 0; } .ec-gain__fig strong { font-size: 30px; } }
.ec-stat.is-good .ec-stat__value { color: var(--ok); }
/* Long lines in list rows wrap (the portal's "Waiting for you", say), and on phones the button drops below. */
.ec-list__row > span:first-child { flex: 1 1 auto; min-width: 0; }
.ec-list__row small, .ec-list > li > a > span small { white-space: normal; }
@media (max-width: 640px) { .ec-list__row { flex-wrap: wrap; } .ec-list__row > span:last-child { margin-left: auto; } }

/* =====================================================================
   5.0: one journey per company
   ===================================================================== */

/* Stage badge: coloured by stage. */
.ec-stage { background: color-mix(in srgb, var(--stage, #6b7280) 14%, transparent); color: var(--stage, #6b7280); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stage, #6b7280) 28%, transparent); }
:root[data-theme="dark"] .ec-stage { color: color-mix(in srgb, var(--stage, #6b7280) 60%, #fff); }

/* Journey strip: Lead → Call → Pilot → Proposal → Project → Live → Care. */
.ec-journey { display: flex; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: j; overflow-x: auto; scrollbar-width: none; }
.ec-journey::-webkit-scrollbar { display: none; }
.ec-journey li { flex: 1 1 0; min-width: 76px; position: relative; padding: 22px 4px 0; text-align: center; font-size: 12.5px; font-weight: 650; color: var(--faint); counter-increment: j; }
.ec-journey li::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 3px; background: var(--line-2); }
.ec-journey li:first-child::before { left: 50%; }
.ec-journey li:last-child::before { right: 50%; }
.ec-journey li::after { content: ""; position: absolute; top: 2px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 2px var(--line-2) inset; }
.ec-journey li.is-done { color: var(--ink-2); }
.ec-journey li.is-done::before, .ec-journey li.is-on::before { background: var(--ok); }
.ec-journey li.is-on::before { background: linear-gradient(90deg, var(--ok) 50%, var(--line-2) 50%); }
.ec-journey li:last-child.is-on::before { background: var(--ok); }
.ec-journey li.is-done::after { background: var(--ok); box-shadow: none; }
.ec-journey li.is-on { color: var(--ink); }
.ec-journey li.is-on::after { background: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft); }
.ec-journey.is-closed li { opacity: .55; }
.ec-journey__closed { margin: -8px 0 16px; font-size: 13.5px; color: var(--muted); }

/* Company page: section tabs under the next step. */
.ec-sectabs { margin-top: 4px; }
.ec-sectabs .ec-tabs { margin-top: 0; }
.ec-sectabs .ec-tabs b { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: var(--panel); font-size: 11px; line-height: 18px; text-align: center; color: var(--muted); }
.ec-sechead { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin: 0 0 14px; }
.ec-sechead h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ec-sechead .ec-steps { margin: 0; }
.ec-subhead { margin: 18px 0 6px; font-size: 14px; font-weight: 750; }

/* Pipeline board: one column per stage, the next step on each card. */
.ec-board--journey { grid-auto-columns: minmax(230px, 1fr); }
.ec-board--journey .ec-lead { cursor: pointer; }
.ec-lead__next { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.4; font-weight: 500; color: var(--ink-2); }
.ec-lead__next b { display: block; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--signal); }
.ec-lead.is-warn { box-shadow: var(--shadow), inset 3px 0 0 var(--err); }
.ec-lead.is-warn .ec-lead__next b { color: var(--err); }
.ec-lead.is-wait .ec-lead__next b { color: var(--muted); }
.ec-lead__foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 11.5px; color: var(--faint); }
.ec-col__empty { margin: 8px 4px; font-size: 12.5px; line-height: 1.45; color: var(--faint); }

/* Repeating rows. */
.ec-rep__rows { display: grid; gap: 8px; }
.ec-rep__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px 10px; align-items: end; padding: 10px 40px 10px 12px; position: relative; border-radius: var(--r); background: var(--panel); }
.ec-rep__cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; font-weight: 650; color: var(--muted); }
.ec-rep__cell.is-wide { grid-column: span 2; }
.ec-rep__cell input, .ec-rep__cell textarea, .ec-rep__cell select { width: 100%; min-width: 0; font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--paper); }
.ec-rep__cell textarea { resize: vertical; min-height: 36px; }
.ec-rep__del { position: absolute; top: 8px; right: 6px; }
.ec-rep > .ec-btn { margin-top: 8px; }
@media (max-width: 640px) { .ec-rep__cell.is-wide { grid-column: auto; } .ec-rep__row { grid-template-columns: 1fr; } }

/* Checklists (project, portal). */
.ec-checklist li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ec-checklist li .ec-icon { width: 15px; height: 15px; color: var(--faint); flex: none; }
.ec-checklist li.is-done > span { color: var(--muted); text-decoration: line-through; }
.ec-checklist li.is-done .ec-icon { color: var(--ok); }
.ec-checklist li > span { flex: 1; min-width: 0; }
.ec-tick { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--paper); color: var(--faint); cursor: pointer; padding: 0; }
.ec-tick[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.ec-tick[aria-pressed="true"] .ec-icon { color: #fff; }

/* Portal navigation. */
.ec-portal__nav { display: flex; gap: 4px; margin: 0 0 22px; padding: 4px; border-radius: 12px; background: var(--panel); overflow-x: auto; scrollbar-width: none; }
.ec-portal__nav::-webkit-scrollbar { display: none; }
.ec-portal__nav a { flex: none; padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 650; color: var(--ink-2); text-decoration: none; }
.ec-portal__nav a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.ec-portal .ec-main { padding-left: 16px; padding-right: 16px; }

/* Dashboard Today: stage badge instead of an icon. */
.ec-today__icon:has(.ec-stage) { width: auto; height: auto; background: none; border-radius: 0; min-width: 72px; justify-content: flex-start; }
.ec-today__item.is-warn p strong { color: var(--err); }
.ec-form--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .ec-form--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ec-form--4 { grid-template-columns: minmax(0, 1fr); } }

/* Dashboard: where everyone is, at a glance. */
.ec-glance { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.ec-glance__col { min-width: 0; padding: 10px; border-radius: var(--r); background: var(--panel); }
.ec-glance__head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 750; color: var(--ink); text-decoration: none; }
.ec-glance__head span { flex: 1; min-width: 0; }
.ec-glance__head b { font-size: 18px; font-variant-numeric: tabular-nums; }
.ec-glance ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.ec-glance li a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ink-2); text-decoration: none; padding: 3px 6px; border-radius: 6px; background: var(--paper); }
.ec-glance li a:hover { color: var(--signal); }
.ec-glance li a.is-warn { color: var(--err); box-shadow: inset 2px 0 0 var(--err); }
.ec-glance .ec-muted { margin: 8px 0 0; }
.ec-glance__more { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .ec-glance { grid-template-columns: repeat(7, 150px); } }
.ec-contacts td:last-child { white-space: nowrap; text-align: right; }
.ec-contacts .ec-icon-btn { display: inline-flex; }

/* ---------- 5.1: rich text, comments, projects ---------- */
.ec-rich { line-height: 1.6; overflow-wrap: anywhere; }
.ec-rich > :first-child { margin-top: 0; } .ec-rich > :last-child { margin-bottom: 0; }
.ec-rich p { margin: 0 0 .6em; } .ec-rich h3 { font-size: 15px; margin: .8em 0 .3em; }
.ec-rich ul, .ec-rich ol { margin: 0 0 .6em; padding-left: 1.3em; }
.ec-rich a { color: var(--info); }
.ec-thread { list-style: none; margin: 10px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.ec-comment { background: var(--subtle); border-radius: var(--r-sm); padding: 8px 10px; font-size: 13px; }
.ec-comment__meta { color: var(--muted); font-size: 12px; margin: 0 0 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ec-tl-comment { margin-top: 8px; } .ec-tl-comment > summary { color: var(--faint); cursor: pointer; font-size: 12px; }
.ec-tl-comment textarea, .ec-tl-comment .ec-input { width: 100%; }

/* Project list and tabs */
.ec-projlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ec-projlist li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); }
.ec-projlist li.is-on { background: var(--panel); }
.ec-projlist a { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: grid; }
.ec-projlist a span { color: var(--muted); font-size: 12px; }
.ec-projtabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 16px; padding-bottom: 2px; }
.ec-projtabs a { flex: 0 0 auto; display: grid; padding: 8px 12px; border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow); color: inherit; text-decoration: none; max-width: 240px; }
.ec-projtabs a span { font-size: 12px; color: var(--muted); }
.ec-projtabs a[aria-current] { box-shadow: 0 0 0 2px var(--signal); }

/* Gantt */
.ec-gantt { position: relative; font-size: 13px; }
.ec-gantt__head, .ec-gantt__row, .ec-gantt__overlay { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 12px; align-items: center; }
.ec-gantt__scale { position: relative; height: 22px; }
.ec-gantt__tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--faint); white-space: nowrap; }
.ec-gantt__tick:first-child { transform: none; }
.ec-gantt__rows { list-style: none; margin: 0; padding: 0; }
.ec-gantt__row { padding: 7px 0; border-top: 1px solid var(--line); }
.ec-gantt__label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ec-gantt__label > span:last-child { display: grid; min-width: 0; }
.ec-gantt__label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-gantt__label small { color: var(--muted); font-size: 12px; }
.ec-gantt__label form { margin: 0; }
.ec-gantt__label .ec-btn { padding: 2px 6px; min-height: 0; }
.ec-gantt__mark { color: var(--faint); display: inline-flex; }
.ec-gantt__track { position: relative; height: 22px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--subtle) 0 1px, transparent 1px 100%); background-color: var(--subtle); }
.ec-gantt__bar { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: var(--line-2); min-width: 6px; transition: background .15s var(--ease); }
.ec-gantt__row.is-on .ec-gantt__bar { background: var(--info); }
.ec-gantt__row.is-done .ec-gantt__bar { background: var(--ok); }
.ec-gantt__row.is-done .ec-gantt__mark, .ec-gantt__row.is-done .ec-gantt__label .ec-btn { color: var(--ok); }
.ec-gantt__row.is-late .ec-gantt__bar { background: var(--err); }
.ec-gantt__row.is-late small { color: var(--err); }
.ec-gantt__overlay { position: absolute; inset: 22px 0 0 0; pointer-events: none; }
.ec-gantt__overlay .ec-gantt__scale { height: 100%; }
.ec-gantt__today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--signal); }
.ec-gantt__today span { position: absolute; bottom: -18px; left: -16px; font-size: 10px; color: var(--signal); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ec-gantt { padding-bottom: 18px; }
@media (max-width: 640px) {
	.ec-gantt__head, .ec-gantt__row, .ec-gantt__overlay { grid-template-columns: 1fr; gap: 4px; }
	.ec-gantt__head .ec-gantt__label, .ec-gantt__overlay { display: none; }
}

/* Deliverables and updates */
.ec-delivs, .ec-updates { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ec-deliv, .ec-update { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.ec-deliv:first-child, .ec-update:first-child { border-top: 0; padding-top: 0; }
.ec-deliv__head, .ec-update__head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ec-deliv__acts { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.ec-update__head small { margin-left: auto; }
.ec-update.is-draft { opacity: .85; }
.ec-update-form { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.ec-updates:empty + .ec-update-form { border-top: 0; margin-top: 0; padding-top: 0; }
.ec-filechips { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.ec-filechips a { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--panel); color: inherit; text-decoration: none; font-size: 12px; max-width: 260px; }
.ec-filechips a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-filechips a:hover { background: var(--line-2); }
.ec-rep__cell--date input { min-width: 140px; }

/* Drafts */
.ec-drafts { list-style: none; margin: 0; padding: 0; }
.ec-drafts li { display: flex; align-items: center; border-top: 1px solid var(--line); }
.ec-drafts li:first-child { border-top: 0; }
.ec-drafts a, .ec-drafts__btn { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; padding: 10px 16px; color: inherit; text-decoration: none; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.ec-drafts a:hover, .ec-drafts__btn:hover { background: var(--hover); }
.ec-drafts__kind { flex: 0 0 auto; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--panel); border-radius: 999px; padding: 2px 8px; min-width: 64px; text-align: center; }
.ec-drafts__main { flex: 1; min-width: 0; display: grid; }
.ec-drafts__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-drafts__main small { color: var(--muted); font-size: 12px; }
.ec-drafts li > form { padding-right: 10px; }

/* Website chats */
.ec-chatrows { list-style: none; margin: 0; padding: 0; }
.ec-chatrows > li { border-top: 1px solid var(--line); }
.ec-chatrows > li:first-child { border-top: 0; }
.ec-chatrow > summary { list-style: none; cursor: pointer; padding: 10px 16px; }
.ec-chatrow > summary::-webkit-details-marker { display: none; }
.ec-chatrow > summary:hover { background: var(--hover); }
.ec-chatrow[open] { padding-bottom: 12px; }
.ec-chatrow[open] > :not(summary) { margin-left: 16px; margin-right: 16px; }
.ec-chatrow__main { display: grid; gap: 2px; }
.ec-chatrow__main small { color: var(--muted); font-size: 12px; }
.ec-chatrow__sum { color: var(--ink-2); font-size: 13px; }
ol.ec-chat { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ec-chat__msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; background: var(--subtle); }
.ec-chat__msg p { margin: 2px 0 0; }
.ec-chat__msg small { color: var(--muted); font-size: 11px; }
.ec-chat__msg.is-user { justify-self: end; background: var(--info-soft); }
.ec-chat__msg.is-principal { background: var(--ok-soft); }

/* Assistant confirmation cards */
.ec-confirm { margin: 8px 0 4px; padding: 12px 14px; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--signal-line), var(--shadow-xs); display: grid; gap: 8px; max-width: 520px; }
.ec-confirm__head { display: flex; gap: 8px; align-items: flex-start; }
.ec-confirm__head .ec-icon { color: var(--signal); flex: 0 0 auto; margin-top: 2px; }
.ec-confirm__lines { margin: 0; padding: 0 0 0 18px; color: var(--ink-2); font-size: 13px; }
.ec-confirm__preview summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.ec-confirm__preview .ec-rich { margin-top: 6px; padding: 8px 10px; background: var(--subtle); border-radius: var(--r-sm); font-size: 13px; max-height: 260px; overflow: auto; }
.ec-confirm__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ec-confirm__edit label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.ec-confirm__note { margin: 0; font-size: 12px; color: var(--muted); }
.ec-confirm__note.is-err { color: var(--err); }
.ec-confirm__status { margin: 0; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.ec-confirm.is-done { box-shadow: 0 0 0 1px var(--ok-soft), var(--shadow-xs); }
.ec-confirm.is-done .ec-confirm__status { color: var(--ok); }
.ec-confirm.is-cancelled { opacity: .7; box-shadow: 0 0 0 1px var(--line); }
.ec-confirm.is-cancelled .ec-confirm__head .ec-icon { color: var(--faint); }

/* Draft cards on a contact's tabs */
.ec-draftcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ec-draftcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); border-left: 3px solid var(--warn); }
.ec-draftcard:hover { background: var(--hover); }
.ec-draftcard__main { flex: 1; min-width: 0; display: grid; gap: 2px; color: inherit; text-decoration: none; }
.ec-draftcard__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-draftcard__main small { color: var(--muted); font-size: 12px; }
.ec-draftcard__kind { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--warn); }
.ec-draftcard__acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ec-draftcard__acts form { margin: 0; }
@media (max-width: 640px) { .ec-draftcard { flex-direction: column; align-items: stretch; } .ec-draftcard__acts { justify-content: flex-start; } }

/* Care choices and replies */
.ec-choice { padding: 14px; border-radius: var(--r); background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); }
.ec-choice h3 { font-size: 15px; margin: 0 0 6px; }
.ec-reply { margin-top: 6px; padding: 8px 10px; border-left: 3px solid var(--ok); background: var(--ok-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* 5.3: deleting contacts */
.ec-icon-btn--danger:hover { background: var(--err-soft); color: var(--err); }
.ec-icon-btn.is-off { opacity: .35; cursor: not-allowed; }
.ec-locked { display: flex; gap: 6px; align-items: center; color: var(--warn); }
.ec-locked .ec-icon { width: 15px; height: 15px; }
td .ec-inline-form { display: inline-flex; }
.ec-attach { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ec-attach li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ec-attach .ec-icon { width: 16px; height: 16px; color: var(--muted); }
.ec-attach .ec-check { margin-left: auto; }
.ec-file__acts { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.ec-filechips li { display: inline-flex; align-items: center; gap: 2px; }
.ec-filechips__x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: 50%; }
.ec-filechips__x:hover { background: var(--err-soft); color: var(--err); }

/* 5.3: documents in the Edderton Scott look (invoices, statements, agreements; team and portal) */
.ec-doc { --doc-ink: #151515; --doc-signal: #d9480f; --doc-line: #dad7ce; --doc-muted: #5b5a56; background: #fff; color: var(--doc-ink); font-family: "Urbanist", "Helvetica Neue", Helvetica, Arial, sans-serif; }
.ec-doc h1, .ec-doc h2, .ec-doc h3 { color: var(--doc-ink); font-family: "Urbanist", "Helvetica Neue", Helvetica, Arial, sans-serif; }
.ec-doc h2 { position: relative; padding-top: 10px; }
.ec-doc h2::before { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 3px; background: var(--doc-signal); }
.ec-doc .ec-muted, .ec-doc .ec-kv dt { color: var(--doc-muted); }
.ec-doc .ec-table th { color: var(--doc-muted); border-bottom: 2px solid var(--doc-signal); background: transparent; }
.ec-doc .ec-table td { border-color: var(--doc-line); color: var(--doc-ink); }
.ec-doc a { color: var(--doc-signal); }
.ec-doc__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--doc-line); position: relative; }
.ec-doc__head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 48px; height: 3px; background: var(--doc-signal); }
.ec-doc__logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--doc-ink); }
.ec-doc__logo img { height: 28px; width: auto; display: block; }
.ec-doc__logo span { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.ec-doc__label { text-align: right; display: grid; }
.ec-doc__label strong { font-size: 24px; line-height: 1.1; letter-spacing: -0.01em; }
.ec-doc__label span { color: var(--doc-muted); font-size: 13px; }
.ec-doc__foot { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--doc-line); font-size: 12px; color: var(--doc-muted); }
.ec-doc__foot p { margin: 0 0 4px; }
.ec-doc__foot strong { color: var(--doc-ink); }
.ec-doc .ec-badge { font-family: inherit; }
.ec-look { margin-top: 12px; }
.ec-look__frame { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: var(--r); background: #f6f5f1; }
button.ec-chip { border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.ec-doc a.ec-doc__logo, .ec-doc a.ec-doc__logo span { color: var(--doc-ink); text-decoration: none; }
/* The portal: the website's black button with the orange underline. */
.ec-portal .ec-btn--primary { box-shadow: inset 0 -3px 0 #d9480f; }
.ec-portal .ec-top .ec-brand img { height: 26px; width: auto; }

/* 5.4: notifications */
.ec-notices li { display: flex; gap: 10px; align-items: flex-start; }
.ec-notice-i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); color: var(--ink-2); }
.ec-notice-i .ec-icon { width: 14px; height: 14px; }
.ec-notices li.is-bad .ec-notice-i { background: var(--err-soft); color: var(--err); }
.ec-notices p { margin: 0; font-size: 13.5px; line-height: 1.4; }
.ec-notices a { color: var(--ink); text-decoration: none; }
.ec-notices a:hover { text-decoration: underline; }
.ec-pop__foot { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.ec-notify td, .ec-notify th { vertical-align: middle; }
.ec-notify .ec-c { text-align: center; width: 140px; }
.ec-notify__grp th { background: var(--panel); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; }
.ec-radio-dot input { width: 18px; height: 18px; accent-color: var(--signal); cursor: pointer; }

/* 5.4: file cards, the viewer and naming files on upload */
.ec-fcards { display: grid; gap: 8px; margin: 10px 0 0; }
.ec-fcard { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.ec-fcard__icon { flex: none; width: 46px; height: 54px; border-radius: 6px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--panel); color: var(--ink-2); border-bottom: 3px solid var(--line-2); overflow: hidden; }
.ec-fcard__icon .ec-icon { width: 18px; height: 18px; }
.ec-fcard__icon b { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; }
.ec-fcard__icon img { width: 100%; height: 100%; object-fit: cover; }
.ec-fk--pdf { background: #fbe7e1; color: #b3361b; border-bottom-color: #d9480f; }
.ec-fk--video, .ec-fk--audio { background: #ece8f7; color: #5a3fb0; border-bottom-color: #7b61d1; }
.ec-fk--doc { background: #e6eefb; color: #2b5bd0; border-bottom-color: #2b5bd0; }
.ec-fk--sheet { background: #e4f2e7; color: #2f6b3a; border-bottom-color: #2f6b3a; }
.ec-fk--slides { background: #fbefdc; color: #a35a00; border-bottom-color: #d98a00; }
.ec-fk--image { border-bottom-color: var(--signal); }
.ec-fcard__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ec-fcard__main strong { font-size: 14.5px; overflow-wrap: anywhere; }
.ec-fcard__main p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.ec-fcard__main small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ec-fcard__main .ec-badge { justify-self: start; margin-top: 4px; }
.ec-fcard__acts { flex: none; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.ec-fcard--compact { padding: 9px 11px; }
.ec-fcard--compact .ec-fcard__icon { width: 36px; height: 42px; }
@media (max-width: 640px) { .ec-fcard { flex-wrap: wrap; } .ec-fcard__acts { width: 100%; justify-content: flex-start; } }
.ec-viewer { width: min(1100px, 96vw); height: min(90vh, 900px); padding: 0; border: 0; border-radius: var(--r-lg); background: #111; color: #fff; overflow: hidden; }
.ec-viewer[open] { display: flex; flex-direction: column; }
.ec-viewer::backdrop { background: rgba(10,10,10,.75); }
.ec-viewer__bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; color: var(--ink); border-bottom: 3px solid var(--signal); }
.ec-viewer__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-viewer__body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.ec-viewer__body img, .ec-viewer__body video { max-width: 100%; max-height: 100%; }
.ec-viewer__body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.ec-viewer__body.is-audio { background: #fff; }
.ec-filemeta { display: grid; gap: 8px; margin-top: 8px; }
.ec-filemeta:empty { display: none; }
.ec-filemeta__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.6fr); gap: 8px; align-items: center; padding: 8px 10px; background: var(--panel); border-radius: var(--r); }
.ec-filemeta__file { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 760px) { .ec-filemeta__row { grid-template-columns: 1fr; } }
.ec-preview--pdf { width: 100%; height: 70vh; border: 0; background: #fff; }
.ec-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel); border-radius: 9px; margin-bottom: 10px; }
.ec-seg label { cursor: pointer; }
.ec-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ec-seg span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px; font-weight: 650; font-size: 13.5px; color: var(--muted); }
.ec-seg span .ec-icon { width: 15px; height: 15px; }
.ec-seg input:checked + span { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--ring); }
.ec-seg input:focus-visible + span { outline: 2px solid var(--signal); }
.ec-share .ec-share__email { display: none; }
.ec-share:has(input[value=email]:checked) .ec-share__email { display: block; }
.ec-share:has(input[value=email]:checked) .ec-share__linkhelp { display: none; }
.ec-share-ready .ec-copyfield { margin-top: 8px; }
.ec-sharebox { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.ec-sharebox > summary { cursor: pointer; font-weight: 650; }
.ec-sharebox[open] > summary { margin-bottom: 10px; }
.ec-picks { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.ec-pick { padding: 6px 8px; border-radius: 6px; }
.ec-pick:hover { background: var(--panel); }
.ec-sharebox { margin: 4px 0; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.ec-sharebox .ec-sharebox__more { display: none; margin-top: 10px; }
.ec-sharebox:has(input[name=share_on]:checked) .ec-sharebox__more { display: block; }
.ec-pf-opts { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.ec-pf-new { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

/* 5.4: reminders */
.ec-rems { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ec-rem { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.ec-rem.is-draft { border-style: dashed; background: var(--panel); }
.ec-rem.is-late { box-shadow: inset 3px 0 0 var(--err); }
.ec-rem__main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ec-rem__main small { color: var(--muted); font-size: 12px; display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.ec-rem__main small .ec-icon { width: 12px; height: 12px; }
.ec-rem__main .ec-badge { justify-self: start; }
.ec-rem__acts { display: flex; gap: 2px; align-items: center; flex: none; }

/* 5.4: Calendar */
.ec-cal__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ec-cal__nav { display: flex; align-items: center; gap: 6px; }
.ec-cal__title { font-size: 18px; margin: 0 0 0 8px; }
.ec-cal__opts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ec-cal__opts .ec-chips { margin: 0; }
.ec-cal__type { display: inline-flex; gap: 6px; align-items: center; }
.ec-wk { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.ec-wk__head, .ec-wk__body { display: grid; grid-template-columns: 56px repeat(var(--days, 7), minmax(0, 1fr)); }
.ec-wk--1 { --days: 1; } .ec-wk--7 { --days: 7; }
.ec-wk__head { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 2; }
.ec-wk__day { display: grid; justify-items: center; padding: 8px 4px; text-decoration: none; color: var(--ink); border-left: 1px solid var(--line); }
.ec-wk__day small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.ec-wk__day b { font-size: 18px; }
.ec-wk__day.is-today b { background: var(--signal); color: #fff; border-radius: 50%; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }
.ec-wk__body { height: calc(var(--h) * var(--hours)); position: relative; }
.ec-wk__axis { position: relative; border-right: 1px solid var(--line); }
.ec-wk__axis span { position: absolute; right: 6px; font-size: 11px; color: var(--muted); transform: translateY(-50%); }
.ec-wk__axis span:first-child { transform: none; }
.ec-wk__col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--h) - 1px), var(--line) calc(var(--h) - 1px), var(--line) var(--h)); }
.ec-wk__col.is-today { background-color: color-mix(in srgb, var(--signal) 3%, transparent); }
.ec-wk__now { position: absolute; left: 0; right: 0; height: 2px; background: var(--signal); z-index: 3; }
.ec-wk__now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.ec-ev { left: 3px; right: 3px; display: block; overflow: hidden; padding: 3px 7px; border-radius: 6px; font-size: 12px; line-height: 1.3; text-decoration: none; color: var(--ink); background: var(--panel); border: 0; text-align: left; font-family: inherit; z-index: 1; }
.ec-ev b { font-weight: 700; }
.ec-ev small { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-ev.is-call { background: var(--ink); color: #fff; box-shadow: inset 3px 0 0 var(--signal); }
.ec-ev.is-call small { color: rgba(255,255,255,.7); }
.ec-ev.is-call.tone-err { background: var(--err); box-shadow: none; }
.ec-ev.is-meeting { background: var(--info-soft); color: var(--info); box-shadow: inset 3px 0 0 var(--info); }
.ec-ev.is-block { background: repeating-linear-gradient(135deg, var(--panel), var(--panel) 6px, var(--line) 6px, var(--line) 8px); color: var(--ink-2); }
.ec-ev.is-block summary { cursor: pointer; list-style: none; }
.ec-ev.is-block[open] { height: auto !important; z-index: 4; background: var(--paper); box-shadow: var(--shadow); }
.ec-ev.is-reminder { background: var(--paper); border: 1px solid var(--signal); color: var(--ink); white-space: nowrap; z-index: 2; }
.ec-ev.is-reminder.is-done { opacity: .5; text-decoration: line-through; }
.ec-ev.is-free { background: transparent; border: 1px dashed color-mix(in srgb, var(--ok) 55%, transparent); color: var(--ok); cursor: pointer; opacity: .8; }
.ec-ev.is-free:hover { background: var(--ok-soft); opacity: 1; }
.ec-cal__legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.ec-cal__legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.ec-cal__legend .is-call::before { background: var(--ink); box-shadow: inset 2px 0 0 var(--signal); }
.ec-cal__legend .is-meeting::before { background: var(--info-soft); box-shadow: inset 2px 0 0 var(--info); }
.ec-cal__legend .is-block::before { background: var(--line); }
.ec-cal__legend .is-reminder::before { border: 1px solid var(--signal); }
.ec-cal__legend .is-free::before { border: 1px dashed var(--ok); }
.ec-month { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.ec-month__head, .ec-month__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ec-month__head span { padding: 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); }
.ec-month__day { min-height: 110px; padding: 6px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; align-content: start; gap: 3px; }
.ec-month__day:nth-child(7n+1) { border-left: 0; }
.ec-month__day.is-out { background: var(--bg); }
.ec-month__day.is-out .ec-month__n { color: var(--faint); }
.ec-month__n { font-weight: 700; font-size: 13px; color: var(--ink); text-decoration: none; justify-self: start; }
.ec-month__day.is-today .ec-month__n { background: var(--signal); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.ec-month .ec-ev { position: static; height: auto !important; white-space: nowrap; }
.ec-month .ec-ev small { display: none; }
.ec-month__more { font-size: 11.5px; color: var(--muted); }
@media (max-width: 900px) { .ec-wk--7 .ec-wk__head, .ec-wk--7 .ec-wk__body { min-width: 760px; } .ec-wk--7 { overflow-x: auto; } .ec-month__day { min-height: 70px; } .ec-month .ec-ev span { display: none; } }

/* 5.5: Funnel card (Dashboard) and Follow-ups steps (Outreach). */
.ec-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ec-funnel__step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label n" "sub sub"; gap: 0 10px; padding: 8px 10px; border-radius: var(--r); overflow: hidden; }
.ec-funnel__bar { position: absolute; inset: 0 auto 0 0; background: var(--signal-soft); border-radius: var(--r); z-index: 0; }
.ec-funnel__label, .ec-funnel__step b, .ec-funnel__step small { position: relative; z-index: 1; }
.ec-funnel__label { grid-area: label; font-weight: 600; font-size: 13.5px; }
.ec-funnel__step b { grid-area: n; font-family: var(--display); font-size: 16px; }
.ec-funnel__step small { grid-area: sub; color: var(--muted); font-size: 12px; }
.ec-flowstep { border: 1px solid var(--line); border-radius: var(--r); margin: 10px 0; background: var(--paper); }
.ec-flowstep > summary { cursor: pointer; padding: 10px 14px; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ec-flowstep > summary::-webkit-details-marker { display: none; }
.ec-flowstep[open] > summary { border-bottom: 1px solid var(--line); }
.ec-flowstep > .ec-form { padding: 12px 14px; }

/* 5.5.1: the Edderton Scott logo with "Platform" under it. */
.ec-brand__lockup { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.ec-brand__lockup .ec-brand__logo { width: 100%; max-width: 196px; height: auto; }
.ec-brand__tag { font-size: 10px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--side-muted); padding-left: 1px; line-height: 1; }
.ec-brand--auth .ec-brand__lockup .ec-brand__logo { max-width: 240px; height: auto; }
.ec-collapsed .ec-brand__lockup { display: none; }
@media (max-width: 960px) { .ec-collapsed .ec-brand__lockup { display: flex; } }
.ec-brand.no-logo .ec-brand__mark, .ec-brand.no-logo .ec-brand__words { display: inline-flex; }

/* 5.6: legal links under the portal */
.ec-portal__legal { max-width: 960px; margin: 8px auto 32px; padding: 0 20px; text-align: center; font-size: 12.5px; color: var(--muted, #6b6b6b); }
.ec-portal__legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ec-portal__legal a:hover { color: var(--ink, #151515); }

/* 5.7: a grid of equal cards (Settings → Payments: 2 by 2) */
.ec-grid--cards { align-items: stretch; }
.ec-grid--cards > .ec-card { margin: 0; height: 100%; display: flex; flex-direction: column; }
.ec-grid--cards > .ec-card > .ec-card__body { flex: 1; }
@media (max-width: 960px) { .ec-grid--cards { grid-template-columns: 1fr; } }

/* 5.7: a person confirms (unsubscribe) */
.ec-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ec-human { display: grid; gap: 14px; justify-items: start; margin: 18px 0 10px; }
.ec-human__tick { font-weight: 600; }

/* 5.7: filter bars and sortable headers */
.ec-filterbar { gap: 8px; }
.ec-filterbar .ec-search { flex: 1 1 220px; max-width: 340px; }
.ec-filterbar select.ec-input { width: auto; }
.ec-range { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ec-range__dates { display: none; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.ec-range.is-custom .ec-range__dates { display: inline-flex; }
.ec-toolbar .ec-range__dates input.ec-input { width: 150px; padding-right: 8px; }
.ec-filterbar__clear { color: var(--muted); }
.ec-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; white-space: nowrap; }
.ec-sort:hover { color: var(--ink); }
.ec-sort__arrow { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .25; }
.ec-sort.is-asc .ec-sort__arrow { border-top: 0; border-bottom: 5px solid currentColor; opacity: 1; color: var(--signal); }
.ec-sort.is-desc .ec-sort__arrow { opacity: 1; color: var(--signal); }
.ec-sort:hover .ec-sort__arrow { opacity: .7; }
.ec-countline { margin: -6px 0 12px; color: var(--muted); font-size: 13px; }

.ec-bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 12px; background: var(--panel); border-radius: var(--r); }
.ec-bulkbar .ec-input { height: 32px; min-height: 32px; width: auto; }
.ec-bulkbar .ec-check { margin-right: auto; font-size: 13px; }
.ec-col-pick { width: 34px; }

/* =====================================================================
   5.7 Social
   ===================================================================== */
.ec-spin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ec-spin .7s linear infinite; vertical-align: -1px; margin-right: 5px; flex: none; }
.ec-ok { color: var(--ok); font-weight: 650; }
.ec-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel); border-radius: 9px; }
.ec-seg__b { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.ec-seg__b .ec-icon { width: 15px; height: 15px; }
.ec-seg__b.is-on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-xs); }
.ec-head__actions .ec-seg { margin-left: 4px; }

/* Posts */
.ec-livestrip { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 11px 14px; border-radius: var(--r-lg); background: var(--signal-soft); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px var(--signal-line); }
.ec-livestrip .ec-spin { color: var(--signal); }
.ec-livestrip > span:nth-child(2) { flex: 1; }
.ec-tile.is-live { box-shadow: 0 0 0 2px var(--signal), var(--shadow); }
.ec-tile__img { position: relative; }
.ec-tile__count { position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 99px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; font-weight: 700; }
.ec-tiles--posts .ec-tile__img { aspect-ratio: 4 / 5; }
.ec-tile__theme { margin-left: auto; font-size: 11.5px; color: var(--muted); align-self: center; }
.ec-rowpost { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.ec-rowpost img, .ec-rowpost__none { width: 40px; height: 50px; border-radius: 6px; object-fit: cover; flex: none; background: var(--subtle); display: inline-flex; align-items: center; justify-content: center; color: var(--faint); }
.ec-rowpost strong { display: block; }
.ec-rowpost small { color: var(--muted); }
.ec-badge .ec-spin { width: 9px; height: 9px; border-width: 1.5px; margin-right: 4px; }

/* Editor: slides */
.ec-slides { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ec-slides:empty { display: none; }
.ec-slide { position: relative; display: flex; flex-direction: column; background: var(--paper); border-radius: var(--r); box-shadow: 0 0 0 1px var(--line-2) inset; overflow: hidden; cursor: grab; user-select: none; }
.ec-slide img, .ec-slide__vid { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--subtle); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); pointer-events: none; }
.ec-slide__n { position: absolute; top: 6px; left: 6px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ec-slide.is-cover { box-shadow: 0 0 0 2px var(--signal) inset; }
.ec-slide.is-cover .ec-slide__n { background: var(--signal); color: #fff; }
.ec-slide__name { padding: 6px 8px 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-slide__acts { display: flex; justify-content: space-between; padding: 4px; }
.ec-slide__acts .ec-icon-btn { width: 28px; height: 28px; font-size: 16px; }
.ec-slide.is-dragging { opacity: .4; }
.ec-slides--ro .ec-slide { cursor: default; }
.ec-slides--ro .ec-slide__name { padding-bottom: 8px; }
.ec-slides__format { margin: -2px 0 12px; font-size: 13px; font-weight: 650; }
.ec-uploads { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ec-uploads:empty { display: none; }
.ec-upload { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r); background: var(--subtle); font-size: 13px; }
.ec-upload.is-err { background: var(--err-soft); color: var(--err); }

/* Editor: AI and prompts */
.ec-aibox { padding: 14px; border-radius: var(--r-lg); background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); }
.ec-aibox__t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.ec-aibox__t .ec-icon { color: var(--signal); }
.ec-aibox__go .ec-btn { width: 100%; justify-content: center; }
.ec-aibox__more { margin: 2px 0 0; font-size: 13px; }
.ec-prompts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: none; }
.ec-prompt { padding: 12px; border-radius: var(--r); box-shadow: 0 0 0 1px var(--line-2) inset; background: var(--paper); }
.ec-prompt__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ec-prompt textarea { width: 100%; font-size: 13.5px; line-height: 1.5; }
.ec-prompt__on { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.ec-prompt__on input { flex: 1; height: 32px; }

/* Editor: where and when */
.ec-chanedit__own { margin-top: 6px; }
.ec-chanedit__own summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.ec-chanedit__own textarea { margin-top: 6px; }
.ec-radios--stack { display: grid; }
.ec-radios--stack .ec-radio { justify-content: flex-start; }
.ec-when__at { display: none; }
[data-when].is-at .ec-when__at { display: block; }
.ec-when__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ec-when__chips .ec-chip { border: 0; cursor: pointer; background: var(--panel); font: inherit; font-size: 12.5px; }
.ec-when__chips .ec-chip small { color: var(--muted); }
.ec-when__chips .ec-chip.is-on { background: var(--signal-soft); box-shadow: inset 0 0 0 1.5px var(--signal); }

/* Going out */
.ec-golive.is-live { box-shadow: 0 0 0 2px var(--signal), var(--shadow); }
.ec-golive.is-published { box-shadow: 0 0 0 1.5px var(--ok), var(--shadow); }
.ec-golive.is-failed, .ec-golive.is-partial { box-shadow: 0 0 0 1.5px var(--err), var(--shadow); }
.ec-golive__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ec-golive__head .ec-card__title { display: flex; align-items: center; }
.ec-golive__head .ec-spin { color: var(--signal); width: 14px; height: 14px; }
.ec-golive__time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.ec-golive__bar { height: 6px; border-radius: 99px; background: var(--panel); overflow: hidden; margin-bottom: 14px; }
.ec-golive__bar span { display: block; height: 100%; background: var(--signal); border-radius: inherit; transition: width .5s ease; }
.ec-golive.is-published .ec-golive__bar span { background: var(--ok); }
.ec-golive.is-live .ec-golive__bar span { background-image: linear-gradient(90deg, var(--signal) 0, color-mix(in srgb, var(--signal) 60%, #fff) 50%, var(--signal) 100%); background-size: 200% 100%; animation: ec-shimmer 1.4s linear infinite; }
@keyframes ec-shimmer { to { background-position: -200% 0; } }
.ec-golive__log { margin-top: 12px; font-size: 12.5px; }
.ec-golive__log summary { cursor: pointer; font-weight: 650; color: var(--muted); }
.ec-golive__log ol { list-style: none; margin: 8px 0 0; padding: 10px 12px; border-radius: var(--r); background: var(--subtle); max-height: 240px; overflow: auto; display: grid; gap: 4px; }
.ec-golive__log time { color: var(--faint); font-variant-numeric: tabular-nums; margin-right: 8px; }
.ec-golive__log li.is-ok { color: var(--ok); }
.ec-golive__log li.is-err { color: var(--err); }
.ec-golive__log li.is-warn { color: var(--warn); }
@media (prefers-reduced-motion: reduce) { .ec-spin, .ec-golive.is-live .ec-golive__bar span { animation: none; } }

/* Calendar: week board */
.ec-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.ec-week__day { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 260px; transition: box-shadow .12s; }
.ec-week__day.is-today { box-shadow: 0 0 0 1.5px var(--signal), var(--shadow); }
.ec-week__day.is-past { background: var(--subtle); }
.ec-week__head { display: flex; align-items: baseline; gap: 6px; padding: 10px 12px 8px; border-bottom: 1px solid var(--line); }
.ec-week__head span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ec-week__head b { font-size: 18px; }
.ec-week__head em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--signal); }
.ec-week__body { position: relative; flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.ec-week__none { margin: 6px 2px; font-size: 12px; color: var(--faint); }
.ec-week__add { align-self: flex-start; margin-top: auto; width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 800; opacity: 0; transition: opacity .12s; }
.ec-week__day:hover .ec-week__add, .ec-week__add:focus { opacity: 1; }
.ec-slot { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 7px 9px; font-size: 12px; color: var(--muted); display: grid; gap: 4px; transition: background .12s, border-color .12s; }
.ec-slot b { color: var(--ink); }
.ec-slot__add { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; color: var(--signal); text-decoration: none; }
.ec-slot__add .ec-icon { width: 13px; height: 13px; }
.ec-slot.is-past { opacity: .55; }
.ec-slot small { color: var(--faint); }
.ec-cal__e--card { display: flex; gap: 8px; align-items: flex-start; white-space: normal; padding: 7px 8px 7px 10px; border-radius: 0 var(--r) var(--r) 0; }
.ec-cal__e--card img { width: 34px; height: 42px; border-radius: 4px; object-fit: cover; flex: none; }
.ec-cal__e--card small { display: block; font-weight: 500; color: var(--muted); margin-top: 2px; }
.ec-cal__e[draggable=true] { cursor: grab; }
.ec-cal__e.is-dragging { opacity: .4; }
.ec-cal__ch .ec-icon { width: 12px; height: 12px; vertical-align: -2px; margin-left: 2px; }
.ec-cal__open { font-style: normal; color: var(--signal); margin-left: 4px; font-size: 14px; letter-spacing: 1px; }
.is-dragging-post [data-drop-day], .is-dragging-post [data-drop-at] { outline: 1.5px dashed var(--line-2); outline-offset: -3px; }
.is-dropover { background: var(--signal-soft) !important; outline: 2px solid var(--signal) !important; outline-offset: -2px; }
.ec-tray { display: flex; flex-wrap: wrap; gap: 8px; }
.ec-tray .ec-cal__e { width: 220px; margin: 0; }
@media (max-width: 1100px) { .ec-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ec-week { grid-template-columns: 1fr; } .ec-week__day { min-height: 0; } }

/* Settings */
.ec-checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.ec-checks li { display: flex; gap: 10px; align-items: flex-start; }
.ec-checks__mark { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.ec-checks .is-ok .ec-checks__mark { background: var(--ok-soft); color: var(--ok); }
.ec-checks .is-bad .ec-checks__mark { background: var(--err-soft); color: var(--err); }
.ec-checks .is-skip .ec-checks__mark { background: var(--panel); color: var(--muted); }
.ec-checks .is-bad strong { color: var(--err); }
.ec-guide { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; }
.ec-guide strong { display: block; word-break: break-word; }
.ec-guide small { color: var(--muted); }
.ec-guide__lock { width: 36px; height: 36px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--paper); }
.ec-guide__text { white-space: pre-wrap; font: 13px/1.55 var(--font, inherit); max-height: 60vh; overflow: auto; margin: 0; }

.ec-when__chips .ec-chip small { margin-left: 5px; }
.ec-badge:has(.ec-spin)::before { display: none; }
.ec-filterbar .ec-seg__b { padding: 4px 10px; }

/* 5.8: Instagram connection */
.ec-where { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14.5px; }
.ec-where .ec-icon { width: 20px; height: 20px; }
.ec-howto { margin: 14px 0; padding: 0; list-style: none; counter-reset: howto; display: grid; gap: 12px; }
.ec-howto li { position: relative; padding-left: 38px; line-height: 1.55; font-size: 14px; }
.ec-howto li::before { counter-increment: howto; content: counter(howto); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.ec-howto em { font-style: normal; font-weight: 650; }

/* 5.9 Outreach autopilot */
.ec-details { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.ec-details > summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.ec-details[open] > summary { color: var(--ink); }
#ec-autopilot .ec-checklist { margin: 12px 0 14px; }
#ec-autopilot .ec-checklist li { color: var(--muted); }
#ec-autopilot .ec-checklist li.is-done { color: var(--ink); }
.ec-lead-in { font-size: 15px; }

/* 5.10 Prospect logo */
.ec-logo-field__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ec-logo-field__img { display: inline-flex; align-items: center; justify-content: center; height: 48px; min-width: 48px; padding: 6px 10px; border: 1px solid var(--line); background: repeating-conic-gradient(#f1efe9 0% 25%, #fff 0% 50%) 50% / 12px 12px; }
.ec-logo-field__img img { max-height: 36px; max-width: 160px; display: block; }
.ec-optional { font-weight: 400; color: var(--muted); }

/* 5.11 Calendar: client time as a plain list */
.ec-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--signal); text-decoration: underline; cursor: pointer; }
.ec-calx__intro { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px 18px; margin: 0 0 20px; font-size: 14.5px; color: var(--ink-2); }
.ec-calx__intro summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.ec-calx__intro ul { margin: 10px 0 0; padding-left: 20px; }
.ec-calx__intro li { margin-bottom: 6px; line-height: 1.55; }
.ec-calx { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.ec-calx__day { margin-bottom: 22px; }
.ec-calx__day h2 { font: 600 14.5px/1.3 var(--text); color: var(--muted); margin: 0 0 8px; }
.ec-calx__day h2 b { color: var(--ink); font-size: 17px; font-weight: 800; margin-right: 4px; }
.ec-calx__day.is-late h2 b { color: var(--warn); }
.ec-calx__item { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 14px; align-items: start; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow), inset 4px 0 0 var(--k, var(--line-2)); padding: 14px 16px 14px 18px; margin-bottom: 8px; }
.ec-calx__item time { font-weight: 700; font-size: 15px; }
.ec-calx__item time small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.ec-calx__main h3 { margin: 0; font: 700 16px/1.35 var(--text); }
.ec-calx__main p { margin: 3px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.ec-calx__kind { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 8px; margin-bottom: 4px; background: var(--panel); color: var(--muted); }
.ec-calx__item.is-call { --k: var(--signal); }
.ec-calx__item.is-call .ec-calx__kind { background: var(--signal-soft); color: var(--signal); }
.ec-calx__item.is-todo { --k: var(--warn); }
.ec-calx__item.is-todo .ec-calx__kind { background: var(--warn-soft); color: var(--warn); }
.ec-calx__item.is-done { opacity: .65; }
.ec-calx__item.is-done h3 { text-decoration: line-through; }
.ec-calx__item.is-off { --k: var(--faint); background: var(--subtle); }
.ec-calx__need, .ec-calx__ok, .ec-calx__wait { margin-top: 10px; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.5; }
.ec-calx__need { background: var(--warn-soft); color: var(--ink); }
.ec-calx__ok { background: var(--ok-soft); color: var(--ok); }
.ec-calx__wait { background: var(--panel); color: var(--ink-2); }
.ec-calx__need > span, .ec-calx__ok > span { display: block; margin-top: 8px; }
.ec-calx__acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.ec-calx__acts .ec-inline-form, .ec-calx__acts .ec-btn { width: 100%; }
.ec-calx__acts .ec-inline-form .ec-btn { width: 100%; padding: 6px 12px; font-size: 13px; }
.ec-calx__empty { color: var(--ink-2); font-size: 14.5px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 8px; }
.ec-calx__more { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.ec-calx__back { color: var(--muted); font-size: 14px; }
.ec-calx__nav { margin: 0 0 14px; }
.ec-calx__panel { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px; }
.ec-calx__panel h2 { font: 700 18px/1.3 var(--text); margin: 0 0 6px; }
.ec-calx__panel > p { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.ec-calx__next { background: var(--ok-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; }
.ec-calx__next b { display: block; color: var(--ok); font-size: 16px; margin: 2px 0 8px; }
.ec-calx__next.is-none { background: var(--warn-soft); }
.ec-calx__hours { list-style: none; margin: 0; padding: 0; }
.ec-calx__hours li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ec-calx__hours li:first-child { border-top: 0; }
.ec-calx__hours .is-closed { color: var(--muted); }
.ec-calx__change { width: 100%; margin: 10px 0; justify-content: center; }
.ec-calx__lead { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.ec-calx__steps { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px; color: var(--muted); }
.ec-calx__steps li.is-on { color: var(--ink); font-weight: 700; }
.ec-calx__types { display: grid; gap: 8px; }
.ec-calx__type { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.ec-calx__type:has(input:checked) { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.ec-calx__type input { margin-top: 3px; accent-color: var(--signal); }
.ec-calx__type small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.ec-calx__times { display: grid; gap: 12px; max-height: 300px; overflow: auto; margin-bottom: 10px; }
.ec-calx__tday h4 { margin: 0 0 6px; font-size: 14px; }
.ec-calx__tday > div { display: flex; flex-wrap: wrap; gap: 6px; }
.ec-calx__tday label { cursor: pointer; }
.ec-calx__tday input { position: absolute; opacity: 0; pointer-events: none; }
.ec-calx__tday span { display: inline-block; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: 14px; }
.ec-calx__tday input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ec-calx__tday input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.ec-calx__err { color: var(--err); font-weight: 600; font-size: 14px; margin: 8px 0 0; }
.ec-calx__hrows { margin-bottom: 6px; }
.ec-calx__hrow { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.ec-calx__hrow:first-child { border-top: 0; }
.ec-calx__hset { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.ec-calx__hset input { width: auto; padding: 5px 7px; }
.ec-calx__hset em { font-style: normal; }
.ec-calx__hrow.is-off .ec-calx__hset { opacity: .4; }
@media (max-width: 1000px) { .ec-calx { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .ec-calx__item { grid-template-columns: 62px minmax(0, 1fr); } .ec-calx__acts { grid-column: 2; flex-direction: row; flex-wrap: wrap; } .ec-calx__acts .ec-inline-form, .ec-calx__acts .ec-btn { width: auto; } .ec-calx__hrow { grid-template-columns: 1fr; } }
.ec-calx__fold summary { cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 14px; margin: 4px 0 10px; }