/* Agorà — CRM with sales pipeline. Everything in @layer app (the Feudera shell stays unlayered). */
@layer app {
  body { background: #f5f6f8; }

  .agora {
    --sans: "Albert Sans", ui-sans-serif, system-ui, sans-serif;
    --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --side-w: 236px;
    --top-h: 64px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --spring: cubic-bezier(.34, 1.45, .64, 1);

    --bg: #f5f6f8;
    --surface: #ffffff;
    --col: #eceef2;
    --col-2: #e3e6ec;
    --line: #e3e6eb;
    --line-2: #d2d7df;
    --ink: #111827;
    --ink-2: #475063;
    --ink-3: #5d6577;
    --accent: #2f6bff;
    --accent-2: #2a62f0;
    --accent-3: #1f55e0;
    --accent-soft: #e9f0ff;
    --good: #08804a;
    --good-fill: #12a15a;
    --good-soft: #e5f6ec;
    --bad: #d23f3f;
    --bad-soft: #fdecec;
    --warn: #a35f00;
    --warn-soft: #fff4e0;
    --s-new: #8792a8;
    --s-qualified: #1ea5d6;
    --s-proposal: #7c5cff;
    --s-negotiation: #f0a020;
    --s-won: #12a15a;
    --s-lost: #d64545;
    --shadow-card: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px rgba(16, 24, 40, .06);
    --shadow-hover: 0 8px 22px -10px rgba(16, 24, 40, .22), 0 0 0 1px rgba(16, 24, 40, .08);
    --shadow-pop: 0 24px 60px -18px rgba(16, 24, 40, .3), 0 0 0 1px rgba(16, 24, 40, .08);

    position: relative;
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
    height: calc(100svh - var(--fs-bar-h));
    min-height: 620px;
    background: var(--bg);
    color: var(--ink);
    font: 400 14px/1.45 var(--sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: light;
    overflow: hidden;
  }
  .agora *, .agora *::before, .agora *::after { box-sizing: border-box; }
  .agora [hidden] { display: none !important; }
  .agora :where(h2, h3, h4, p, ol, ul, fieldset, legend, figure) { margin: 0; padding: 0; }
  .agora :where(ol, ul) { list-style: none; }
  .agora :where(button, input, select, textarea) { font: inherit; color: inherit; }
  .agora :where(button) { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  .agora :where(a) { color: inherit; text-decoration: none; }
  .agora :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
  .agora .a-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .agora .a-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .a-mono, .a-num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
  .a-kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--ink-3); font: 500 11px/1 var(--mono); }

  /* ------------------------------------------------------------ brand + sidebar */
  .a-mark { width: 30px; height: 30px; flex: none; }
  .a-mark__bg { fill: var(--accent); }
  .a-mark__fg { fill: #fff; }
  .a-side {
    display: flex; flex-direction: column; gap: 20px; min-height: 0; padding: 18px 14px 16px;
    background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: none;
  }
  .a-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; border-radius: 10px; }
  .a-brand__name { font: 750 21px/1 var(--sans); letter-spacing: -.04em; }
  .a-brand__tag { margin-top: 2px; padding: 3px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-3); font: 500 10.5px/1 var(--mono); letter-spacing: .06em; }
  .a-nav ul { display: grid; gap: 2px; }
  .a-nav__a {
    position: relative; display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 11px;
    color: var(--ink-2); font-weight: 550; font-size: 14.5px; letter-spacing: -.01em; transition: background .2s, color .2s;
  }
  .a-nav__a .a-ico { color: var(--ink-3); transition: color .2s; }
  .a-nav__a:hover { background: var(--bg); color: var(--ink); }
  .a-nav__a.is-active { background: var(--accent-soft); color: var(--accent-3); }
  .a-nav__a.is-active .a-ico { color: var(--accent); }
  .a-nav__count {
    margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; display: inline-grid; place-items: center;
    background: var(--col); color: var(--ink-2); font: 500 11.5px/1 var(--mono);
  }
  .a-nav__a.is-active .a-nav__count { background: #fff; color: var(--accent-3); }
  .a-nav__count.is-late { background: var(--bad-soft); color: var(--bad); }

  .a-goal { margin-top: auto; padding: 14px; border-radius: 14px; background: linear-gradient(160deg, #f1f5ff, #fff 70%); border: 1px solid #dfe7fb; }
  .a-goal__label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
  .a-goal__label .a-ico { width: 16px; height: 16px; color: var(--accent); }
  .a-goal__value { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 10px; }
  .a-goal__value strong { font: 750 26px/1 var(--sans); letter-spacing: -.04em; }
  .a-goal__value span { font-size: 12.5px; color: var(--ink-3); }
  .a-goal__bar { display: block; height: 6px; border-radius: 99px; background: #dfe6f7; overflow: hidden; }
  .a-goal__bar i { display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--accent), #6f9bff); transition: width .8s var(--ease); }
  .a-me { display: flex; align-items: center; gap: 10px; padding: 4px 4px 0; }
  .a-me p { display: grid; line-height: 1.25; min-width: 0; }
  .a-me strong { font-size: 13.5px; font-weight: 650; }
  .a-me span { font-size: 12px; color: var(--ink-3); }

  .a-av {
    display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
    background: color-mix(in srgb, var(--c) 16%, #fff); color: color-mix(in srgb, var(--c) 72%, #000);
    font: 700 10.5px/1 var(--sans); letter-spacing: .02em; box-shadow: 0 0 0 2px #fff;
  }
  .a-av--lg { width: 36px; height: 36px; font-size: 12.5px; }
  .a-logo {
    display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px;
    background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 80%, #000);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent);
    font: 700 11.5px/1 var(--sans); letter-spacing: .02em;
  }

  /* ------------------------------------------------------------ top bar */
  .a-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
  .a-top { position: relative; z-index: 20; display: flex; align-items: center; gap: 12px; height: var(--top-h); padding: 0 24px; flex: none; background: var(--surface); border-bottom: 1px solid var(--line); }
  .a-search { position: relative; display: flex; align-items: center; flex: 1; max-width: 420px; min-width: 0; }
  .a-search > .a-ico { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
  .a-search input {
    width: 100%; height: 40px; padding: 0 40px 0 38px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg);
    font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
  }
  .a-search input::placeholder { color: var(--ink-3); }
  .a-search input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
  .a-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
  .a-search .a-kbd { position: absolute; right: 10px; pointer-events: none; }
  .a-search input:focus ~ .a-kbd, .a-search input:not(:placeholder-shown) ~ .a-kbd { opacity: 0; }

  .a-owners { display: flex; align-items: center; padding-left: 4px; }
  .a-ofilter { position: relative; margin-left: -6px; border-radius: 50%; transition: transform .25s var(--spring), z-index 0s; }
  .a-ofilter .a-av { width: 32px; height: 32px; font-size: 11px; box-shadow: 0 0 0 2px #fff; transition: box-shadow .2s, background .2s, color .2s; }
  .a-ofilter:hover { transform: translateY(-2px); z-index: 2; }
  .a-ofilter[aria-pressed="true"] { z-index: 1; }
  .a-ofilter[aria-pressed="true"] .a-av { background: var(--c); color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
  .a-owners.has-filter .a-ofilter[aria-pressed="false"] .a-av { opacity: .55; }

  .a-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 15px; border-radius: 11px;
    font-weight: 650; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; border: 1px solid transparent;
    transition: background .2s, border-color .2s, box-shadow .2s, transform .2s var(--ease), color .2s;
  }
  .a-btn .a-ico { width: 17px; height: 17px; }
  .a-btn:active { transform: scale(.97); }
  .a-btn--primary { background: var(--accent-2); color: #fff; box-shadow: 0 8px 20px -10px rgba(42, 98, 240, .8), inset 0 1px 0 rgba(255, 255, 255, .18); }
  .a-btn--primary:hover { background: var(--accent-3); }
  .a-btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
  .a-btn--ghost:hover { border-color: #b9c1cd; color: var(--ink); }
  .a-btn--danger { background: var(--surface); border-color: #f1c4c4; color: var(--bad); }
  .a-btn--danger:hover { background: var(--bad-soft); }
  .a-btn--sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
  .a-iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--ink-2); transition: background .2s, color .2s; flex: none; }
  .a-iconbtn:hover { background: var(--bg); color: var(--ink); }
  .a-new { margin-left: auto; }

  .a-tagf { position: relative; }
  .a-tagf__btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-3); }
  .a-tagf__n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent-2); color: #fff; font: 500 11px/20px var(--mono); }
  .a-tagf__chev { width: 15px; height: 15px; transition: transform .25s var(--ease); }
  .a-tagf__btn[aria-expanded="true"] .a-tagf__chev { transform: rotate(180deg); }
  .a-pop {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 220px; padding: 8px; border-radius: 14px;
    background: var(--surface); box-shadow: var(--shadow-pop); display: grid; gap: 2px; transform-origin: top left; animation: a-pop .22s var(--ease);
  }
  @keyframes a-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
  .a-tagf__pop { min-width: 250px; gap: 8px; max-height: min(70vh, 520px); overflow-y: auto; }
  .a-pop__group { display: grid; gap: 2px; border: 0; margin: 0; padding: 0; min-width: 0; }
  .a-pop__group + .a-pop__group { padding-top: 8px; border-top: 1px solid var(--line); }
  .a-pop__group legend { padding: 4px 8px 6px; font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
  .a-check .a-av { width: 24px; height: 24px; font-size: 9.5px; box-shadow: none; }
  .a-check > span:last-child:not(.a-tag) { font-size: 13.5px; font-weight: 550; }
  .a-check { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
  .a-check:hover { background: var(--bg); }
  .a-check input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; cursor: pointer; }
  .a-check__box { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); transition: background .15s, border-color .15s; }
  .a-check__box .a-ico { width: 13px; height: 13px; stroke-width: 2.6; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .15s, transform .25s var(--spring); }
  .a-check input:checked + .a-check__box { background: var(--accent-2); border-color: var(--accent-2); }
  .a-check input:checked + .a-check__box .a-ico { opacity: 1; transform: none; }
  .a-check input:focus-visible + .a-check__box { outline: 2px solid var(--accent); outline-offset: 2px; }

  /* ------------------------------------------------------------ views */
  .a-view { flex: 1; min-height: 0; overflow: auto; }
  .a-view--pipeline { display: flex; flex-direction: column; overflow: hidden; }
  .a-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(300px, 380px); align-items: end; gap: 22px 28px; padding: 22px 24px 16px; flex: none; }
  .a-eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .04em; color: var(--ink-3); text-transform: uppercase; }
  .a-h { margin-top: 8px; font: 750 30px/1.05 var(--sans); letter-spacing: -.04em; }
  .a-head__sub { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
  .a-kpis { display: flex; gap: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-card); }
  .a-kpi { display: grid; gap: 4px; padding: 12px 18px; min-width: 132px; border-left: 1px solid var(--line); }
  .a-kpi:first-child { border-left: 0; }
  .a-kpi__label { font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
  .a-kpi__value { font: 700 20px/1.1 var(--sans); letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .a-kpi.is-won .a-kpi__value { color: var(--good); }
  .a-kpi__sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

  .a-forecast { padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-card); }
  .a-forecast__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .a-forecast__label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
  .a-forecast__pct { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
  .a-forecast__pct span { font: 500 12.5px/1 var(--mono); color: var(--accent-3); }
  .a-forecast__value { margin: 4px 0 10px; font: 750 26px/1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
  .a-forecast__bar { position: relative; display: flex; height: 10px; border-radius: 99px; background: var(--col); overflow: visible; }
  .a-forecast__won { height: 100%; width: calc(var(--won) * 100%); border-radius: 99px 0 0 99px; background: var(--good-fill); transition: width .8s var(--ease); }
  .a-forecast__w {
    height: 100%; width: calc(var(--wt) * 100%); transition: width .8s var(--ease);
    background: repeating-linear-gradient(135deg, var(--accent) 0 4px, #6f9bff 4px 7px); border-radius: 0 99px 99px 0;
  }
  .a-forecast__goal { position: absolute; right: 0; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--ink); }
  .a-forecast__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
  .a-forecast__legend span { display: inline-flex; align-items: center; gap: 6px; }
  .a-forecast__legend span::before { content: ""; width: 10px; height: 8px; border-radius: 2px; }
  .a-forecast__legend .is-won::before { background: var(--good-fill); }
  .a-forecast__legend .is-w::before { background: repeating-linear-gradient(135deg, var(--accent) 0 3px, #6f9bff 3px 5px); }
  .a-forecast__legend .is-goal::before { width: 2px; height: 12px; background: var(--ink); }
  .a-forecast__legend b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); }
  .a-forecast.is-bump .a-forecast__value { animation: a-bump .6s var(--spring); }
  @keyframes a-bump { 30% { transform: scale(1.04); color: var(--accent-3); } }

  .a-active { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 24px 12px; flex: none; }
  .a-active__chip {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border-radius: 99px;
    background: var(--surface); box-shadow: var(--shadow-card); font-size: 12.5px; color: var(--ink-2);
  }
  .a-active__chip button { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--ink-3); }
  .a-active__chip button:hover { background: var(--bg); color: var(--ink); }
  .a-active__chip .a-ico { width: 13px; height: 13px; }
  .a-active__clear { height: 28px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--accent-3); }
  .a-active__clear:hover { background: var(--accent-soft); }
  .a-active__count { font-size: 12.5px; color: var(--ink-3); margin-right: 4px; }

  /* ------------------------------------------------------------ board */
  .a-board {
    position: relative; flex: 1; min-height: 0; display: flex; align-items: stretch; gap: 12px;
    padding: 2px 24px 18px; overflow-x: auto; overflow-y: hidden; outline: none;
    scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; overscroll-behavior-x: contain;
  }
  .a-col {
    --sc: var(--s-new);
    position: relative; flex: 0 0 272px; display: flex; flex-direction: column; min-height: 0;
    border-radius: 16px; background: var(--col); transition: background-color .25s, box-shadow .25s;
  }
  .a-col[data-stage="qualified"] { --sc: var(--s-qualified); }
  .a-col[data-stage="proposal"] { --sc: var(--s-proposal); }
  .a-col[data-stage="negotiation"] { --sc: var(--s-negotiation); }
  .a-col[data-stage="won"] { --sc: var(--s-won); background: #e6f3ec; }
  .a-col[data-stage="lost"] { --sc: var(--s-lost); background: #f1eeee; }
  .a-col.is-over { background: color-mix(in srgb, var(--sc) 13%, var(--col)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--sc) 55%, transparent); }
  .a-col__head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "title count prob" "sum sum sum" "bar bar bar"; align-items: center; gap: 4px 6px; padding: 12px 14px 10px; }
  .a-col__title { grid-area: title; display: flex; align-items: center; gap: 8px; min-width: 0; font: 700 14px/1.2 var(--sans); letter-spacing: -.015em; }
  .a-col__title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .a-col__dot { width: 9px; height: 9px; border-radius: 3px; flex: none; background: var(--sc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 22%, transparent); }
  .a-col__ico { width: 16px; height: 16px; color: var(--sc); }
  .a-col__count { grid-area: count; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .8); font: 500 11.5px/1 var(--mono); color: var(--ink-2); }
  .a-col__count.is-pop { animation: a-pop2 .45s var(--spring); }
  @keyframes a-pop2 { 40% { transform: scale(1.3); background: var(--sc); color: #fff; } }
  .a-col__prob { grid-area: prob; font: 500 11px/1 var(--mono); color: var(--ink-3); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2); }
  .a-col__sum { grid-area: sum; margin-top: 2px; font: 500 15px/1.2 var(--mono); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
  .a-col__bar { grid-area: bar; display: block; height: 3px; margin-top: 6px; border-radius: 3px; background: rgba(255, 255, 255, .7); overflow: hidden; }
  .a-col__bar i { display: block; height: 100%; width: calc(var(--share, 0) * 100%); background: var(--sc); border-radius: inherit; transition: width .7s var(--ease); }
  .a-col__list {
    position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 2px 10px 10px;
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
  }
  .a-col__list:empty::before, .a-col__list.is-empty::before {
    content: attr(data-empty); display: grid; place-items: center; min-height: 92px; padding: 12px; border-radius: 12px;
    border: 1.5px dashed var(--line-2); color: var(--ink-3); font-size: 12.5px; text-align: center;
  }
  .a-col__add {
    display: flex; align-items: center; gap: 8px; margin: 0 10px 10px; height: 38px; padding: 0 10px; border-radius: 10px;
    color: var(--ink-3); font-size: 13px; font-weight: 600; transition: background .2s, color .2s; flex: none;
  }
  .a-col__add .a-ico { width: 16px; height: 16px; }
  .a-col__add:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }

  /* ------------------------------------------------------------ cards */
  .a-card {
    position: relative; display: grid; gap: 8px; padding: 12px 12px 11px; border-radius: 13px; flex: none;
    background: var(--surface); box-shadow: var(--shadow-card); cursor: grab; outline: none;
    transition: box-shadow .2s, transform .2s var(--ease), opacity .25s;
    -webkit-user-select: none; user-select: none; touch-action: manipulation; -webkit-touch-callout: none;
  }
  .a-card:hover { box-shadow: var(--shadow-hover); }
  .a-card:focus-visible { box-shadow: 0 0 0 2px var(--accent), var(--shadow-hover); }
  .a-card.is-hidden { display: none; }
  .a-card.is-flash { animation: a-flash 1.4s var(--ease); }
  @keyframes a-flash { 0%, 30% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent), var(--shadow-hover); } }
  .a-card.is-new { animation: a-cardin .5s var(--spring), a-flash 1.6s var(--ease); }
  @keyframes a-cardin { from { opacity: 0; transform: translateY(-8px) scale(.96); } }
  .a-card.is-kbd { cursor: grabbing; transform: rotate(-1.2deg) scale(1.02); box-shadow: 0 0 0 2px var(--accent), 0 16px 34px -14px rgba(16, 24, 40, .4); }
  .a-card__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .a-card__co { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
  .a-card__company { font-size: 13px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .a-card__city { font-size: 12px; color: var(--ink-3); }
  .a-card__title { font: 600 14px/1.3 var(--sans); letter-spacing: -.01em; color: var(--ink-2); }
  .a-card__mid { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .a-card__value { font: 500 16px/1 var(--mono); letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
  .a-prob { display: inline-flex; align-items: center; gap: 5px; font: 500 11.5px/1 var(--mono); color: var(--ink-3); }
  .a-ring { width: 16px; height: 16px; }
  .a-ring__bg { fill: none; stroke: var(--col-2); stroke-width: 2.6; }
  .a-ring__fg { fill: none; stroke: var(--sc, var(--accent)); stroke-width: 2.6; stroke-linecap: round; transition: stroke-dasharray .6s var(--ease); }
  .a-col .a-card .a-ring__fg { stroke: var(--sc); }
  .a-tags { display: flex; flex-wrap: wrap; gap: 4px; }
  .a-tag {
    display: inline-flex; align-items: center; gap: 3px; height: 21px; padding: 0 7px; border-radius: 6px;
    font-size: 11.5px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
    background: #eef1f5; color: #44526b;
  }
  .a-tag[data-tag="hot"] { background: #fff0eb; color: #c2410c; }
  .a-tag[data-tag="enterprise"] { background: #eef0ff; color: #3b47c4; }
  .a-tag[data-tag="smb"] { background: #e6f6f3; color: #0f766e; }
  .a-tag[data-tag="renewal"] { background: #e8f1fd; color: #1d5fbf; }
  .a-tag[data-tag="newbiz"] { background: #eaf7ee; color: #1f7a3d; }
  .a-tag[data-tag="referral"] { background: #fdf4e3; color: #8a5a00; }
  .a-tag__ico { width: 12px; height: 12px; stroke-width: 2; }
  .a-card__next {
    display: flex; align-items: center; gap: 7px; margin: 2px -12px -11px; padding: 8px 12px 9px; border-top: 1px solid var(--line);
    font-size: 12.5px; color: var(--ink-2); border-radius: 0 0 13px 13px;
  }
  .a-card__next .a-ico { width: 15px; height: 15px; color: var(--ink-3); }
  .a-card__due { margin-left: auto; font: 500 11.5px/1 var(--mono); color: var(--ink-3); white-space: nowrap; }
  .a-card__next.is-today .a-card__due { color: var(--warn); }
  .a-card__next.is-today .a-ico { color: var(--warn); }
  .a-card__next.is-late { background: #fff7f7; }
  .a-card__next.is-late .a-card__due, .a-card__next.is-late .a-ico { color: var(--bad); }
  .a-card__next.is-won { color: var(--good); }
  .a-card__next.is-won .a-ico { color: var(--good); }
  .a-card__next.is-lost .a-ico { color: var(--bad); }
  .a-col[data-stage="lost"] .a-card { opacity: .78; }
  .a-col[data-stage="lost"] .a-card__value { text-decoration: line-through; text-decoration-color: rgba(210, 63, 63, .5); }

  /* ------------------------------------------------------------ drag & drop */
  .a-ghost {
    position: fixed; left: 0; top: 0; z-index: 9000; margin: 0; pointer-events: none; cursor: grabbing;
    box-shadow: 0 22px 50px -16px rgba(16, 24, 40, .45), 0 0 0 1px rgba(16, 24, 40, .08);
    transition: box-shadow .2s; will-change: transform;
  }
  .a-ghost.is-dropping { transition: transform .26s var(--ease), box-shadow .26s; }
  .a-placeholder {
    flex: none; border-radius: 13px; border: 2px dashed color-mix(in srgb, var(--sc) 70%, transparent);
    background: color-mix(in srgb, var(--sc) 9%, transparent);
  }
  .agora.is-dragging, .agora.is-dragging * { cursor: grabbing !important; }
  .agora.is-dragging .a-board { scroll-snap-type: none; }
  .a-dock__short { display: none; }
  .a-dock__zone b { font-weight: 650; }
  .agora.is-dragging .a-card:hover { box-shadow: var(--shadow-card); }
  .a-dock {
    position: fixed; z-index: 8000; display: flex; gap: 10px; padding: 8px; border-radius: 20px;
    top: calc(var(--fs-bar-h) + var(--top-h) + 22px); left: calc(var(--side-w) + (100vw - var(--side-w)) / 2);
    background: rgba(17, 24, 39, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 24px 50px -16px rgba(16, 24, 40, .5); transform: translate(-50%, -24px) scale(.96); opacity: 0;
    transition: transform .38s var(--spring), opacity .2s; pointer-events: none;
  }
  .agora.is-dragging .a-dock { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
  .agora.is-dragging .a-head { opacity: .35; filter: saturate(.6); transition: opacity .25s, filter .25s; }
  .a-head { transition: opacity .25s, filter .25s; }
  .a-dock__zone {
    display: flex; align-items: center; gap: 10px; min-width: 184px; height: 56px; padding: 0 18px; border-radius: 14px;
    color: #fff; font-weight: 650; font-size: 14px; border: 1.5px dashed rgba(255, 255, 255, .25); transition: background .2s, border-color .2s, transform .25s var(--spring);
  }
  .a-dock__zone .a-ico { width: 22px; height: 22px; }
  .a-dock__zone small { display: block; font-weight: 500; font-size: 11.5px; opacity: .7; }
  .a-dock__zone[data-zone="won"] .a-ico { color: #4ade80; }
  .a-dock__zone[data-zone="lost"] .a-ico { color: #fb8a8a; }
  .a-dock__zone.is-over { transform: scale(1.05); border-style: solid; }
  .a-dock__zone[data-zone="won"].is-over { background: rgba(18, 161, 90, .35); border-color: #4ade80; }
  .a-dock__zone[data-zone="lost"].is-over { background: rgba(214, 69, 69, .35); border-color: #fb8a8a; }

  /* ------------------------------------------------------------ drawer */
  .a-drawer, .a-modal { padding: 0; border: 0; background: transparent; color: var(--ink); max-width: none; max-height: none; overflow: visible; font-family: var(--sans); }
  .a-drawer { width: min(500px, 100vw); height: 100%; margin: 0 0 0 auto; }
  .a-drawer::backdrop, .a-modal::backdrop { background: rgba(17, 24, 39, .32); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
  .a-drawer[open] { animation: a-drawerin .42s var(--ease); }
  .a-drawer[open]::backdrop, .a-modal[open]::backdrop { animation: a-fade .3s ease; }
  .a-drawer.is-closing { animation: a-drawerout .28s var(--ease) forwards; }
  @keyframes a-drawerin { from { transform: translateX(48px); opacity: 0; } }
  @keyframes a-drawerout { to { transform: translateX(48px); opacity: 0; } }
  @keyframes a-fade { from { opacity: 0; } }
  .a-dr { display: flex; flex-direction: column; height: 100%; background: var(--surface); box-shadow: -30px 0 80px -30px rgba(16, 24, 40, .35); }
  .a-dr__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 18px 18px 14px 22px; border-bottom: 1px solid var(--line); }
  .a-dr__head .a-logo { width: 42px; height: 42px; border-radius: 12px; font-size: 14px; }
  .a-dr__co { display: grid; gap: 2px; min-width: 0; }
  .a-dr__co strong { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .a-dr__co span { font-size: 12.5px; color: var(--ink-3); }
  .a-dr__body { flex: 1; overflow-y: auto; padding: 18px 22px 28px; display: grid; align-content: start; gap: 22px; overscroll-behavior: contain; }
  .a-dr__id { font: 500 11.5px/1 var(--mono); color: var(--ink-3); letter-spacing: .02em; }
  .a-dr__title { margin-top: 6px; font: 750 22px/1.15 var(--sans); letter-spacing: -.03em; }
  .a-dr__value { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
  .a-dr__value strong { font: 500 28px/1 var(--mono); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
  .a-dr__edit { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; color: var(--accent-3); font-size: 13px; font-weight: 600; }
  .a-dr__edit:hover { background: var(--accent-soft); }
  .a-dr__edit .a-ico { width: 15px; height: 15px; }
  .a-dr__valform { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
  .a-dr__valform .a-input { width: 190px; }
  .a-dr__valform .a-input input { font: 500 20px/1 var(--mono); }
  .a-dr__err { color: var(--bad); font-size: 12.5px; }
  .a-sec__h { margin-bottom: 10px; font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

  .a-stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .a-step {
    position: relative; display: grid; gap: 6px; padding: 8px 6px 0; text-align: left; border-radius: 8px;
    font-size: 11.5px; font-weight: 600; color: var(--ink-3); transition: color .2s;
  }
  .a-step::before { content: ""; height: 6px; border-radius: 99px; background: var(--col); transition: background .3s var(--ease); order: -1; }
  .a-step span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .a-step:hover { color: var(--ink); }
  .a-step.is-done::before { background: color-mix(in srgb, var(--accent) 45%, #fff); }
  .a-step.is-current { color: var(--accent-3); }
  .a-step.is-current::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .a-stepper.is-won .a-step::before { background: var(--good-fill); }
  .a-stepper.is-won .a-step.is-current { color: var(--good); }
  .a-stepper.is-lost .a-step::before { background: #f3d6d6; }
  .a-dr__outcome { display: flex; gap: 8px; margin-top: 12px; }
  .a-dr__outcome .a-btn { flex: 1; height: 38px; }
  .a-dr__outcome .a-badge { height: 38px; padding: 0 14px; border-radius: 11px; font-size: 13.5px; }
  .a-dr__outcome [data-reopen] { flex: 0 0 auto; margin-left: auto; }
  .a-dr__reason { flex: 1; height: 38px; max-width: 220px; }
  .a-dr__reason select { font-size: 13.5px; }
  .a-btn--won { background: var(--good-soft); color: var(--good); border-color: #bfe5cf; }
  .a-btn--won:hover { background: #d4efdf; }
  .a-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 650; }
  .a-badge .a-ico { width: 15px; height: 15px; }
  .a-badge--won { background: var(--good-soft); color: var(--good); }
  .a-badge--lost { background: var(--bad-soft); color: var(--bad); }

  .a-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .a-meta__item { display: grid; gap: 5px; min-width: 0; }
  .a-meta__item > span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
  .a-meta__item .a-select, .a-meta__item input[type="date"] { height: 38px; }
  .a-meta__val { display: flex; align-items: center; gap: 8px; min-height: 38px; font-size: 13.5px; }
  .a-range { display: flex; align-items: center; gap: 10px; height: 38px; }
  .a-range input { flex: 1; min-width: 0; width: 100%; accent-color: var(--accent-2); }
  .a-range output { min-width: 38px; text-align: right; font: 500 13px/1 var(--mono); }

  .a-next { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
  .a-next.is-late { background: #fff7f7; border-color: #f6d3d3; }
  .a-next__ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--accent-3); box-shadow: var(--shadow-card); flex: none; }
  .a-next.is-late .a-next__ico { color: var(--bad); }
  .a-next p { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
  .a-next strong { font-size: 13.5px; }
  .a-next span { font-size: 12.5px; color: var(--ink-3); }
  .a-next.is-late span { color: var(--bad); }
  .a-next--plan { flex-wrap: wrap; }
  .a-planrow { display: flex; gap: 8px; width: 100%; padding-left: 48px; }
  .a-planrow .a-select { flex: 1; height: 34px; border-radius: 9px; }
  .a-planrow .a-select select { font-size: 13px; }

  .a-contacts { display: grid; gap: 8px; }
  .a-contact { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
  .a-contact .a-av { width: 34px; height: 34px; font-size: 11.5px; }
  .a-contact p { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
  .a-contact strong { font-size: 13.5px; }
  .a-contact span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .a-contact .a-iconbtn { width: 34px; height: 34px; border: 1px solid var(--line); }
  .a-contact .a-iconbtn .a-ico { width: 16px; height: 16px; }
  .a-contact .a-iconbtn:hover { color: var(--accent-3); border-color: #c5d5fb; background: var(--accent-soft); }

  .a-composer { display: grid; gap: 8px; }
  .a-composer textarea {
    width: 100%; min-height: 76px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2);
    background: var(--bg); font-size: 13.5px; line-height: 1.45; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
  }
  .a-composer textarea:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
  .a-composer__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-3); }
  .a-tl { position: relative; display: grid; gap: 2px; }
  .a-tl::before { content: ""; position: absolute; left: 15px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--line); }
  .a-tl__item { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 7px 0; }
  .a-tl__item.is-new { animation: a-cardin .5s var(--spring); }
  .a-tl__ico { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid var(--line-2); color: var(--ink-2); }
  .a-tl__ico .a-ico { width: 15px; height: 15px; }
  .a-tl__item[data-type="note"] .a-tl__ico { background: #fff8e6; border-color: #f2dfae; color: #8a5a00; }
  .a-tl__item[data-type="stage"] .a-tl__ico { background: var(--accent-soft); border-color: #c9d8fb; color: var(--accent-3); }
  .a-tl__item[data-type="won"] .a-tl__ico { background: var(--good-soft); border-color: #bfe5cf; color: var(--good); }
  .a-tl__item[data-type="lost"] .a-tl__ico { background: var(--bad-soft); border-color: #f1c4c4; color: var(--bad); }
  .a-tl__body { display: grid; gap: 2px; padding-top: 2px; min-width: 0; }
  .a-tl__text { font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
  .a-tl__meta { font-size: 12px; color: var(--ink-3); }

  /* ------------------------------------------------------------ modal (new deal) */
  .a-modal { width: min(600px, calc(100vw - 24px)); margin: auto; }
  .a-modal[open] { animation: a-modalin .32s var(--spring); }
  @keyframes a-modalin { from { opacity: 0; transform: translateY(12px) scale(.97); } }
  .a-modal__box { border-radius: 20px; background: var(--surface); box-shadow: 0 40px 100px -30px rgba(16, 24, 40, .45), 0 0 0 1px rgba(16, 24, 40, .06); overflow: hidden; }
  .a-modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 22px 6px 24px; }
  .a-modal__head h3 { font: 750 21px/1.2 var(--sans); letter-spacing: -.03em; }
  .a-modal__head p { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
  .a-modal__body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 16px 24px 20px; max-height: min(64vh, 560px); overflow-y: auto; }
  .a-modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid var(--line); background: var(--bg); }
  .a-field { display: grid; gap: 6px; align-content: start; min-width: 0; border: 0; }
  .a-field--full { grid-column: 1 / -1; }
  .a-field label, .a-field legend { font-size: 13px; font-weight: 650; color: var(--ink-2); }
  .a-field > input, .a-input, .a-select, .a-meta input[type="date"] {
    width: 100%; height: 42px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface);
    font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s;
  }
  .a-field > input { padding: 0 12px; }
  .a-field > input:focus, .a-input:focus-within, .a-select:focus-within, .a-meta input[type="date"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
  .a-meta input[type="date"] { padding: 0 10px; font: 500 13px/1 var(--mono); color: var(--ink); }
  .a-input { display: flex; align-items: center; }
  .a-input > span { padding: 0 2px 0 12px; color: var(--ink-3); font-family: var(--mono); }
  .a-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; padding: 0 12px 0 6px; font: 500 14px/1 var(--mono); }
  .a-select { position: relative; display: flex; align-items: center; }
  .a-select select { appearance: none; width: 100%; height: 100%; padding: 0 36px 0 12px; border: 0; outline: none; background: transparent; font-size: 14px; cursor: pointer; }
  .a-select .a-ico { position: absolute; right: 11px; width: 16px; height: 16px; color: var(--ink-3); pointer-events: none; }
  .a-field.is-invalid > input, .a-field.is-invalid .a-input { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
  .a-field__err { min-height: 0; font-size: 12.5px; color: var(--bad); }
  .a-field__err:empty { display: none; }
  .a-field.is-invalid { animation: a-shake .4s; }
  @keyframes a-shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
  .a-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .a-chips legend { width: 100%; margin-bottom: 6px; }
  .a-chip { position: relative; cursor: pointer; }
  .a-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
  .a-chip .a-tag { height: 30px; padding: 0 11px; border-radius: 9px; font-size: 12.5px; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .2s, transform .2s var(--spring); }
  .a-chip input:checked + .a-tag { box-shadow: inset 0 0 0 1.5px currentColor; }
  .a-chip input:checked + .a-tag::before { content: "✓"; font-weight: 800; margin-right: 3px; }
  .a-chip input:focus-visible + .a-tag { outline: 2px solid var(--accent); outline-offset: 2px; }

  /* ------------------------------------------------------------ toasts + confetti */
  .a-toasts {
    position: fixed; inset: auto auto 24px 50%; z-index: 9500; display: grid; gap: 8px; justify-items: center; transform: translateX(-50%); pointer-events: none;
    margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; width: max-content; max-width: calc(100vw - 24px); color: inherit;
  }
  .a-toasts[popover]:not(:popover-open) { display: none; }
  .a-toast {
    display: flex; align-items: center; gap: 12px; max-width: min(460px, calc(100vw - 32px)); padding: 10px 10px 10px 14px; border-radius: 14px;
    background: #111827; color: #fff; box-shadow: 0 20px 44px -16px rgba(16, 24, 40, .55); font-size: 13.5px; pointer-events: auto;
    animation: a-toast .45s var(--spring);
  }
  .a-toast .a-ico { width: 18px; height: 18px; color: #7ea6ff; }
  .a-toast.is-won .a-ico { color: #4ade80; }
  .a-toast.is-lost .a-ico { color: #fb8a8a; }
  .a-toast__msg { display: grid; line-height: 1.3; }
  .a-toast__msg small { color: rgba(255, 255, 255, .65); font-size: 12px; }
  .a-toast__undo { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 650; font-size: 13px; white-space: nowrap; }
  .a-toast__undo:hover { background: rgba(255, 255, 255, .18); }
  .a-toast__undo .a-ico { width: 15px; height: 15px; color: #fff; }
  .a-toast.is-out { animation: a-toastout .3s var(--ease) forwards; }
  @keyframes a-toast { from { opacity: 0; transform: translateY(16px) scale(.95); } }
  @keyframes a-toastout { to { opacity: 0; transform: translateY(10px) scale(.97); } }
  .agora.is-dragging .a-toasts { opacity: 0; }
  .a-confetti { position: fixed; inset: 0; z-index: 9400; width: 100vw; height: 100vh; pointer-events: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; max-width: none; max-height: none; }
  .a-confetti[popover]:not(:popover-open) { display: none; }

  /* ------------------------------------------------------------ secondary views */
  .a-page { padding: 24px 24px 40px; display: grid; gap: 18px; align-content: start; max-width: 1400px; }
  .a-page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  .a-page__head .a-h { margin-top: 6px; }
  .a-panel { border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); }
  .a-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px 18px 6px; }
  .a-panel__head h3 { font: 700 15px/1.3 var(--sans); letter-spacing: -.015em; }
  .a-panel__head p { font-size: 12.5px; color: var(--ink-3); }
  .a-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  .a-table th, .a-table td { height: 54px; padding: 0 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
  .a-table thead th { height: 40px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
  .a-table tbody tr { transition: background .2s; }
  .a-table tbody tr:hover { background: #fafbfc; }
  .a-table tbody tr:last-child td, .a-table tbody tr:last-child th { border-bottom: 0; }
  .a-table .a-person { display: flex; align-items: center; gap: 10px; font-weight: 650; }
  .a-table .a-muted { color: var(--ink-3); }
  .a-table .a-num { text-align: right; }
  .a-table__wrap { overflow-x: auto; }
  .a-link { color: var(--accent-3); font-weight: 600; }
  .a-link:hover { text-decoration: underline; }
  .a-empty { display: grid; justify-items: center; gap: 8px; padding: 46px 20px; text-align: center; color: var(--ink-3); }
  .a-empty strong { color: var(--ink); font-size: 15px; }

  .a-cos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
  .a-co {
    display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); text-align: left;
    transition: box-shadow .2s, transform .25s var(--ease);
  }
  .a-co:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
  .a-co__top { display: flex; align-items: center; gap: 12px; }
  .a-co__top .a-logo { width: 42px; height: 42px; border-radius: 12px; font-size: 14px; }
  .a-co__top p { display: grid; min-width: 0; line-height: 1.3; }
  .a-co__top strong { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .a-co__top span { font-size: 12.5px; color: var(--ink-3); }
  .a-co__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
  .a-co__stats span { display: grid; gap: 2px; font-size: 11.5px; color: var(--ink-3); }
  .a-co__stats b { font: 500 14px/1.2 var(--mono); color: var(--ink); letter-spacing: -.03em; }

  .a-agenda { display: grid; gap: 16px; }
  .a-agenda__group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px 4px; font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
  .a-agenda__group h3 b { font-weight: 500; padding: 3px 7px; border-radius: 99px; background: var(--col); color: var(--ink-2); letter-spacing: 0; }
  .a-agenda__group.is-late h3 { color: var(--bad); }
  .a-agenda__group.is-late h3 b { background: var(--bad-soft); color: var(--bad); }
  .a-task { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-card); margin-bottom: 6px; transition: opacity .3s, transform .3s var(--ease); }
  .a-task.is-done { opacity: .55; }
  .a-task.is-done .a-task__title { text-decoration: line-through; }
  .a-task .a-check { padding: 0; }
  .a-task .a-check:hover { background: none; }
  .a-task__ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-3); flex: none; }
  .a-task__ico .a-ico { width: 16px; height: 16px; }
  .a-task__body { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
  .a-task__title { font-size: 14px; font-weight: 650; }
  .a-task__sub { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .a-task__due { font: 500 12px/1 var(--mono); color: var(--ink-3); white-space: nowrap; }
  .a-task.is-late .a-task__due { color: var(--bad); }
  .a-task.is-today .a-task__due { color: var(--warn); }

  .a-rep { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
  .a-rep > * { grid-column: span 6; }
  .a-rep .a-rep__kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .a-rep__kpi { padding: 16px 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); display: grid; gap: 4px; }
  .a-rep__kpi span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
  .a-rep__kpi strong { font: 750 26px/1.1 var(--sans); letter-spacing: -.04em; }
  .a-rep__kpi small { font-size: 12px; color: var(--ink-3); }
  .a-hbars { display: grid; gap: 10px; padding: 8px 18px 18px; }
  .a-hbar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 96px; align-items: center; gap: 12px; font-size: 13px; }
  .a-hbar__name { display: flex; align-items: center; gap: 8px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .a-hbar__track { height: 12px; border-radius: 4px; background: var(--bg); overflow: hidden; }
  .a-hbar__fill { display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: 0 4px 4px 0; background: var(--c, var(--accent)); transform-origin: left; animation: a-grow .8s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
  @keyframes a-grow { from { transform: scaleX(0); } }
  .a-hbar__val { text-align: right; font: 500 13px/1 var(--mono); letter-spacing: -.03em; }
  .a-cols { display: flex; align-items: stretch; gap: 12px; height: 220px; padding: 24px 18px 0; }
  .a-cols__c { flex: 1; display: grid; grid-template-rows: 158px 30px; gap: 8px; text-align: center; }
  .a-cols__bar { position: relative; align-self: end; height: calc(var(--h) * 100%); border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--accent) 55%, #fff); transform-origin: bottom; animation: a-growy .8s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
  .a-cols__c.is-cur .a-cols__bar { background: var(--accent-2); }
  .a-cols__bar b { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); font: 500 11.5px/1 var(--mono); color: var(--ink-2); white-space: nowrap; }
  .a-cols__l { font-size: 12px; line-height: 16px; color: var(--ink-3); text-transform: capitalize; }
  @keyframes a-growy { from { transform: scaleY(0); } }
  .a-cols__wrap { position: relative; }
  .a-cols__goal { position: absolute; left: 18px; right: 18px; height: 0; border-top: 1.5px dashed var(--ink-3); }
  .a-cols__goal span { position: absolute; right: 0; top: -20px; font: 500 11px/1 var(--mono); color: var(--ink-3); background: var(--surface); padding: 2px 4px; }
  .a-leader { display: grid; gap: 4px; padding: 6px 12px 14px; }
  .a-leader__row { display: grid; grid-template-columns: 22px 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; }
  .a-leader__row:hover { background: #fafbfc; }
  .a-leader__rank { font: 500 12px/1 var(--mono); color: var(--ink-3); text-align: center; }
  .a-leader__row .a-av { width: 32px; height: 32px; font-size: 11px; }
  .a-leader__name { display: grid; min-width: 0; line-height: 1.3; }
  .a-leader__name strong { font-size: 13.5px; }
  .a-leader__name span { font-size: 12px; color: var(--ink-3); }
  .a-leader__val { text-align: right; font: 500 14px/1.2 var(--mono); letter-spacing: -.03em; }
  .a-leader__val small { display: block; font-size: 11.5px; color: var(--ink-3); }


  /* ------------------------------------------------------------ responsive */
  @media (max-width: 1320px) {
    .a-head { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); }
    .a-kpis { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  }
  @media (max-width: 1100px) {
    .a-kpi { min-width: 0; }
    .a-owners { display: none; }
    .a-rep > * { grid-column: span 12; }
  }
  @media (max-width: 900px) {
    .agora { --side-w: 76px; }
    .a-brand__name, .a-brand__tag, .a-nav__a span:not(.a-nav__count), .a-goal, .a-me p { display: none; }
    .a-nav__a { justify-content: center; padding: 0; }
    .a-nav__count { position: absolute; top: 2px; right: 4px; min-width: 18px; height: 16px; padding: 0 4px; font-size: 10px; }
    .a-side { align-items: center; padding: 18px 10px; }
    .a-brand { padding: 2px; }
    .a-nav ul { width: 52px; }
    .a-me { margin-top: auto; padding: 0; }
    .a-head { grid-template-columns: minmax(0, 1fr); }
    .a-kpis { grid-row: auto; }
    .a-rep .a-rep__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 640px) {
    .agora {
      grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
      height: calc(100svh - var(--fs-bar-h)); min-height: 560px;
    }
    .a-side {
      grid-row: 2; flex-direction: row; justify-content: center; gap: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
      border-right: 0; border-top: 1px solid var(--line); overflow: visible; z-index: 30;
    }
    .a-brand, .a-goal, .a-me { display: none; }
    .a-nav { width: 100%; }
    .a-nav ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; }
    .a-nav__a { flex-direction: column; justify-content: center; gap: 3px; height: 52px; padding: 0; border-radius: 12px; font-size: 11px; font-weight: 600; }
    .a-nav__a span:not(.a-nav__count) { display: block; font-size: 11px; }
    .a-nav__a .a-ico { width: 21px; height: 21px; }
    .a-nav__count { position: absolute; top: 2px; left: calc(50% + 5px); right: auto; min-width: 17px; height: 16px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--surface); }
    .a-nav__a.is-active .a-nav__count { background: var(--accent-2); color: #fff; }
    .a-nav__a.is-active { background: transparent; }
    .a-nav__a.is-active::after { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
    .a-top { gap: 8px; height: 60px; padding: 0 12px; }
    .a-search input { height: 40px; }
    .a-search .a-kbd { display: none; }
    .a-tagf__btn span:not(.a-tagf__n), .a-tagf__chev { display: none; }
    .a-tagf__btn { width: 40px; padding: 0; }
    .a-tagf__n { position: absolute; top: -6px; right: -6px; }
    .a-pop { left: auto; right: -52px; }
    .a-new { width: 40px; padding: 0; margin-left: 0; }
    .a-new span { display: none; }
    .a-head { padding: 14px 16px 10px; gap: 12px; }
    .a-h { font-size: 24px; margin-top: 6px; }
    .a-head__sub { display: none; }
    .a-kpis { display: none; }
    .a-forecast { padding: 12px 14px; }
    .a-forecast__value { font-size: 22px; margin: 2px 0 8px; }
    .a-forecast__legend { display: none; }
    .a-active { padding: 0 16px 10px; }
    .a-board { gap: 10px; padding: 0 16px 14px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
    .a-col { flex-basis: min(84vw, 330px); scroll-snap-align: start; }
    .a-dock { left: 50%; top: calc(var(--fs-bar-h) + 70px); width: calc(100vw - 24px); }
    .a-dock__zone { min-width: 0; flex: 1; padding: 0 12px; }
    .a-dock__long { display: none; }
    .a-dock__short { display: inline; }
    .a-toasts { inset: auto auto 84px 50%; }
    .a-drawer { width: 100vw; height: 100%; margin: 0; }
    .a-drawer[open] { animation: a-sheetin .42s var(--ease); }
    @keyframes a-sheetin { from { transform: translateY(40px); opacity: 0; } }
    .a-modal__body { grid-template-columns: 1fr; }
    .a-page { padding: 18px 16px 32px; }
    .a-rep .a-rep__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .a-hbar { grid-template-columns: 92px minmax(0, 1fr) 76px; gap: 8px; }
    .a-table .a-hide-sm { display: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .agora *, .agora *::before, .agora *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  }
}
