/* BissLog demo — styles (brand: #7A00F8 / #9900CC / #FF8EA2 / #C39CD5, Montserrat) */
:root {
  --primary: #7A00F8; --primary-600: #6800d6; --secondary: #9900CC; --pink: #FF8EA2; --lavender: #C39CD5;
  --ink: #170b30; --heading: #1b1036; --text: #4c4566; --muted: #7d7794; --line: #ece6f6; --soft: #f6f0ff; --bg: #f7f5fb; --white: #fff;
  --dark: #12062a; --green: #138a52; --red: #d0284b; --amber: #b7791f; --blue: #2563eb;
  --grad: linear-gradient(135deg, #7A00F8 0%, #9900CC 100%);
  --grad-dark: linear-gradient(140deg, #1d0646 0%, #3a0a8a 55%, #6a00d8 100%);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 12px 32px -14px rgba(60, 0, 130, .22); --shadow-lg: 0 30px 60px -24px rgba(60, 0, 130, .38);
  --side-w: 260px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { color: var(--heading); margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; font-weight: 800; } h2 { font-size: 1.3rem; font-weight: 800; } h3 { font-size: 1.02rem; font-weight: 700; } h4 { font-size: .92rem; margin-top: 1.4em; }
p { margin: 0 0 .8em; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 6px; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: -3px; }
.i--xl { width: 40px; height: 40px; }
.flip { transform: rotate(180deg); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .block { display: block; } .mt { margin-top: 24px; }
.text-red { color: var(--red); } .text-green { color: var(--green); } .text-center { text-align: center; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack { display: grid; gap: 14px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; font-size: .88rem; line-height: 1.2; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s; white-space: nowrap; text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -10px rgba(122, 0, 248, .7); }
.btn--primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(122, 0, 248, .8); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--heading); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--white { background: #fff; color: var(--primary); }
.btn--white:hover { color: var(--secondary); transform: translateY(-1px); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { color: #fff; filter: brightness(1.08); }
.btn--danger-ghost { background: none; border-color: #f3c6d0; color: var(--red); margin-top: 8px; }
.btn--sm { padding: 7px 13px; font-size: .8rem; }
.btn--lg { padding: 14px 26px; font-size: .98rem; }
.btn--block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--soft); color: var(--primary); }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--heading); }
.brand:hover { color: var(--heading); }
.brand--light, .brand--light:hover { color: #fff; }
.brand__logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--grad); color: #fff; font-weight: 800; font-size: .9rem; letter-spacing: -.04em; }
.brand--light .brand__logo { background: #fff; color: var(--primary); }
.brand__logo--sm { display: inline-grid; width: 22px; height: 22px; border-radius: 7px; font-size: .6rem; vertical-align: middle; }
.beta-pill { font-size: .58rem; font-weight: 800; letter-spacing: .1em; background: var(--pink); color: var(--ink); padding: 3px 7px; border-radius: 6px; }

/* ---------- beta bars ---------- */
.beta-bar { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 8px 16px; background: #fff4d6; color: #7a5300; font-size: .8rem; text-align: center; border-bottom: 1px solid #f5e3ad; }
.beta-bar a { color: #7a5300; text-decoration: underline; font-weight: 700; }
.beta-bar--public { position: relative; z-index: 2; }
.preview-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 24px; background: var(--soft); color: var(--primary); font-size: .82rem; border-bottom: 1px solid #e4d3ff; }
.preview-bar button { margin-left: auto; border: 0; background: var(--primary); color: #fff; border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: .75rem; cursor: pointer; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 440px) 1fr; }
.auth__side { position: relative; overflow: hidden; background: var(--grad-dark); color: rgba(255, 255, 255, .8); padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth__side small { position: relative; color: rgba(255, 255, 255, .6); }
.auth__side small a { color: #fff; }
.auth__pitch { position: relative; }
.auth__pitch h2 { color: #fff; font-size: 1.8rem; line-height: 1.2; }
.auth__pitch ul { display: grid; gap: 10px; margin-top: 26px; }
.auth__pitch li { display: flex; gap: 10px; align-items: center; color: #fff; font-weight: 500; }
.auth__pitch li .i { color: var(--pink); }
.pattern { position: absolute; inset: 0; background: rgba(255, 255, 255, .05); -webkit-mask: url("../pattern.svg") 0 0 / 120px 67px repeat; mask: url("../pattern.svg") 0 0 / 120px 67px repeat; pointer-events: none; }
.auth__main { display: grid; place-items: center; padding: 40px 20px; }
.auth__card { width: 100%; max-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 36px; box-shadow: var(--shadow); }
.auth__switch { text-align: center; margin: 20px 0 0; font-size: .9rem; }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 10px 12px; margin-top: 16px; }
.note .i { color: var(--primary); margin-top: 1px; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.steps span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .76rem; font-weight: 700; }
.steps .is-done { background: #e8f7ef; color: var(--green); }
.steps .is-current { background: var(--soft); color: var(--primary); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: grid; gap: 6px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label, .form-grid > .field > label { font-weight: 600; font-size: .82rem; color: var(--heading); }
.field label b { color: var(--red); }
.field small { color: var(--muted); font-size: .75rem; }
.field input, .field select, .field textarea, .mini-select, .search, .inline-form input, .inline-form select, .share-box input {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fcfbfe; transition: border-color .2s, box-shadow .2s;
}
.field input[type=color] { padding: 4px; height: 42px; }
.field input:focus, .field select:focus, .field textarea:focus, .mini-select:focus, .search:focus, .inline-form input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(122, 0, 248, .1); }
.field textarea { resize: vertical; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: .86rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); margin-top: 2px; flex: none; }
.form-section { margin: 26px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .95rem; }
.form-section:first-child { margin-top: 0; padding-top: 0; border: 0; }
.form-actions { margin-top: 24px; display: flex; justify-content: flex-end; }
.mini-select { width: auto; padding: 7px 10px; font-size: .82rem; border-radius: 9px; }
.search { width: 260px; max-width: 100%; }
.inline-form { display: flex; gap: 8px; margin-bottom: 16px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 6px; }
.perm-grid fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 0; display: grid; gap: 8px; }
.perm-grid legend { font-weight: 700; font-size: .78rem; color: var(--primary); padding: 0 4px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; z-index: 40; overflow-y: auto; }
.sidebar .brand { padding: 4px 8px 16px; }
.biz-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--bg); margin-bottom: 14px; }
.biz-card__logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; font-weight: 800; flex: none; }
.biz-card strong { display: block; font-size: .85rem; color: var(--heading); line-height: 1.25; }
.biz-card small { color: var(--muted); font-size: .72rem; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: .87rem; transition: background .2s, color .2s; }
.side-nav a:hover { background: var(--soft); color: var(--primary); }
.side-nav a.is-active { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -10px rgba(122, 0, 248, .8); }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.side-label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; gap: 6px; align-items: center; padding: 0 4px; }
.side-label .i { width: 14px; height: 14px; }
.side-foot select { padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; font-size: .84rem; margin-bottom: 8px; background: #fff; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text); font-size: .84rem; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.side-link:hover { background: var(--soft); color: var(--primary); }
.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: rgba(247, 245, 251, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar__title { font-size: 1.15rem; margin: 0; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.topbar__date { font-size: .82rem; color: var(--muted); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip strong { display: block; font-size: .84rem; color: var(--heading); line-height: 1.2; }
.user-chip small { font-size: .72rem; color: var(--muted); }
.menu-btn { display: none; }
.view { padding: 28px; max-width: 1360px; width: 100%; }
.scrim { display: none; }

/* ---------- common layout ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h2 { margin-bottom: 2px; }
.page-head p { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .84rem; margin-bottom: 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel__head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.panel__head a { font-size: .82rem; font-weight: 700; }
.panel__head--pad { padding: 18px 22px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.grid--start { align-items: start; }
.grid-2 > .panel, .grid-2-1 > .panel { margin-bottom: 0; }
.grid-2, .grid-2-1 { margin-bottom: 20px; }
.cards-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-bottom: 20px; }
.sticky { position: sticky; top: 90px; }
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.welcome h2 { font-size: 1.5rem; margin: 0; }
.welcome p { margin: 0; }
.welcome__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- KPIs & stats ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpis--4 { grid-template-columns: repeat(4, 1fr); }
.kpi { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); transition: transform .2s, box-shadow .2s; }
a.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.kpi__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--soft); color: var(--primary); flex: none; }
.kpi__icon--green { background: #e8f7ef; color: var(--green); }
.kpi__icon--red { background: #fdecef; color: var(--red); }
.kpi small { display: block; font-size: .76rem; color: var(--muted); font-weight: 600; }
.kpi strong { display: block; font-size: 1.45rem; color: var(--heading); line-height: 1.2; margin: 2px 0; }
.kpi span { font-size: .74rem; color: var(--muted); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.stats-row > div { background: #fff; padding: 14px 18px; display: grid; gap: 4px; align-content: start; }
.stats-row small { font-size: .74rem; color: var(--muted); font-weight: 600; }
.stats-row strong { font-size: 1.05rem; color: var(--heading); }

/* ---------- badges, chips, avatars ---------- */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.badge--green { background: #e8f7ef; color: var(--green); } .badge--blue { background: #e8effd; color: var(--blue); } .badge--purple { background: var(--soft); color: var(--primary); }
.badge--amber { background: #fff4dc; color: var(--amber); } .badge--red { background: #fdecef; color: var(--red); } .badge--gray { background: #f1f0f4; color: #6b6780; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: .72rem; font-weight: 600; color: var(--text); }
.chip--lg { padding: 5px 12px 5px 5px; font-size: .82rem; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 800; font-size: .76rem; flex: none; }
.avatar--sm { width: 28px; height: 28px; font-size: .64rem; }
.avatar--xs { width: 22px; height: 22px; font-size: .55rem; }
.avatar--lg { width: 60px; height: 60px; font-size: 1.1rem; }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid #fff; margin-left: -8px; }
.avatars .avatar:first-child { margin-left: 0; }
.person { display: flex; align-items: center; gap: 10px; }
.person strong { display: block; color: var(--heading); font-size: .87rem; }
.person small { color: var(--muted); font-size: .74rem; }
.person--btn { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.person--btn:hover strong { color: var(--primary); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th { text-align: left; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 16px; background: #fbfaff; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fcfaff; }
.table .actions { text-align: right; white-space: nowrap; }
.table .num { text-align: right; white-space: nowrap; }
.table tr.is-done strong { text-decoration: line-through; color: var(--muted); }
.task-check { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* ---------- cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; color: var(--text); }
.card h3 { margin: 6px 0 0; }
.card p { margin: 0; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card__top h3 { margin: 0; }
.card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.progress { height: 7px; border-radius: 99px; background: #efe9f8; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .4s; }
.progress-row { display: flex; justify-content: space-between; font-size: .76rem; margin-top: 10px; color: var(--muted); }
.progress-row b { color: var(--heading); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .i { margin: 0 auto 12px; color: var(--lavender); }
.empty h3 { margin-bottom: 4px; }
.empty .btn { margin-top: 10px; }

/* ---------- filters & tabs ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.toolbar .filters, .panel__head .filters { margin-bottom: 0; }
.filter { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--heading); }
.filter span { color: var(--muted); font-weight: 700; margin-left: 2px; }
.filter:hover { border-color: var(--primary); color: var(--primary); }
.filter.is-active { background: var(--heading); color: #fff; border-color: var(--heading); }
.filter.is-active span { color: var(--lavender); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 700; font-size: .86rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.is-active { color: var(--primary); border-color: var(--primary); }

/* ---------- lists, feeds ---------- */
.list { display: grid; }
.list li, .list li > a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.list li > a:not(.icon-btn) { padding: 0; border: 0; width: 100%; }
.list li:last-child { border-bottom: 0; }
.list li div { flex: 1; min-width: 0; }
.list strong { display: block; color: var(--heading); font-size: .86rem; }
.list small { color: var(--muted); font-size: .74rem; }
.activity { display: grid; gap: 4px; }
.activity li { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.activity li .i { width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--soft); color: var(--primary); }
.activity p { margin: 0; flex: 1; font-size: .86rem; color: var(--heading); }
.activity small { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.feed { display: grid; gap: 14px; }
.feed li { display: flex; gap: 12px; }
.feed__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); margin-top: 6px; flex: none; box-shadow: 0 0 0 4px var(--soft); }
.feed p { margin: 2px 0 0; color: var(--heading); font-size: .88rem; }
.feed small { color: var(--muted); font-size: .74rem; }
.pipeline { display: grid; gap: 10px; }
.pipeline > div { display: grid; grid-template-columns: 90px 30px 1fr; align-items: center; gap: 10px; font-size: .84rem; }
.pipeline b { color: var(--heading); }

/* ---------- AI insights ---------- */
.ai-panel { background: linear-gradient(160deg, #fbf7ff, #fff 60%); border-color: #e7d8ff; }
.ai-panel .panel__head h3 .i { color: var(--primary); }
.insights { display: grid; gap: 10px; }
.insight { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.insight p { margin: 0; font-size: .86rem; color: var(--heading); }
.insight > .i { width: 30px; height: 30px; padding: 6px; border-radius: 9px; flex: none; }
.insight--good > .i { background: #e8f7ef; color: var(--green); }
.insight--warn > .i { background: #fff4dc; color: var(--amber); }
.insight--info > .i { background: var(--soft); color: var(--primary); }

/* ---------- charts ---------- */
.chart { overflow: visible; }
.chart .grid line { stroke: #efe9f8; }
.chart .axis text, .chart text { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.chart rect { transition: opacity .2s; }
.chart rect:hover { opacity: .8; }
.chart-x { display: flex; justify-content: space-between; padding: 4px 16px 0; font-size: .72rem; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: .78rem; margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .donut-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.donut { position: relative; width: 150px; margin: 0 auto 14px; }
.donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut__center strong { font-size: 1.3rem; color: var(--heading); line-height: 1.1; }
.donut__center small { font-size: .72rem; color: var(--muted); }
.donut-legend { display: grid; gap: 6px; }
.donut-legend li { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.donut-legend b { margin-left: auto; color: var(--heading); }
.bars { display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; align-items: center; gap: 12px; font-size: .84rem; }
.bars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-weight: 600; }
.bars__track { height: 10px; background: #f1ebfa; border-radius: 99px; overflow: hidden; }
.bars__track i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

/* ---------- projects ---------- */
.timeline { display: grid; gap: 8px; }
.timeline__scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-left: 140px; }
.timeline__row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; }
.timeline__label { font-size: .78rem; color: var(--heading); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline__track { position: relative; height: 18px; background: #faf8fe; border-radius: 6px; }
.timeline__bar { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; background: #d9c6fb; }
.timeline__bar--done { background: var(--grad); }
.timeline__bar--in-progress { background: var(--pink); }
.timeline__today { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--red); opacity: .6; }

/* ---------- leads kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban__col { background: #efeaf7; border-radius: 14px; padding: 10px; min-height: 200px; display: grid; gap: 10px; align-content: start; }
.kanban__head { display: flex; align-items: baseline; gap: 6px; padding: 4px 6px; }
.kanban__head span { font-weight: 800; color: var(--heading); font-size: .86rem; }
.kanban__head b { font-size: .75rem; background: #fff; border-radius: 99px; padding: 0 7px; }
.kanban__head small { margin-left: auto; color: var(--muted); font-size: .72rem; font-weight: 700; }
.kanban__empty { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px 0; }
.lead-card { background: #fff; border-radius: 12px; padding: 12px; display: grid; gap: 4px; cursor: pointer; border: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.lead-card:hover { border-color: #dcc7ff; box-shadow: var(--shadow); }
.lead-card strong { color: var(--heading); font-size: .88rem; }
.lead-card small { font-size: .74rem; }
.lead-card__row { display: flex; justify-content: space-between; align-items: center; }
.lead-card .mini-select { margin-top: 4px; width: 100%; }
.share-box { display: flex; gap: 6px; margin-top: 10px; }
.share-box input { font-size: .75rem; padding: 7px 10px; color: var(--muted); }
.answers { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .86rem; }
.answers dt { font-weight: 700; color: var(--heading); }
.answers dd { margin: 0; }
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.profile-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.profile-head p { margin: 2px 0; font-size: .86rem; }

/* ---------- products ---------- */
.stock-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; font-size: .84rem; }
.stock-btn .i { width: 13px; height: 13px; color: var(--muted); }
.stock-btn.is-low { background: #fdecef; color: var(--red); border-color: #f6c9d3; }

/* ---------- files ---------- */
.file-icon { position: relative; display: inline-grid; place-items: center; width: 46px; height: 54px; border-radius: 10px; background: var(--soft); color: var(--primary); }
.file-icon .i { width: 26px; height: 26px; }
.file-icon b { position: absolute; bottom: -6px; right: -8px; background: var(--primary); color: #fff; font-size: .55rem; padding: 2px 5px; border-radius: 5px; }
.file-icon--lg { width: 72px; height: 84px; margin: 0 auto 18px; }
.file-icon--lg .i { width: 38px; height: 38px; }

/* ---------- business preview ---------- */
.biz-preview { text-align: center; overflow: hidden; padding-top: 0; }
.biz-preview__cover { height: 90px; margin: 0 -22px 0; background: linear-gradient(135deg, var(--brand), #12062a); position: relative; }
.biz-preview__cover span { position: absolute; left: 50%; bottom: -30px; translate: -50% 0; width: 64px; height: 64px; border-radius: 18px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; border: 4px solid #fff; }
.biz-preview h3 { margin-top: 40px; }
.biz-preview .btn { margin-top: 12px; }

/* ---------- modal & toasts ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(18, 6, 42, .5); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: pop .25s cubic-bezier(.2, .7, .2, 1); }
.modal--sm { max-width: 420px; } .modal--lg { max-width: 780px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 1.1rem; margin: 0; }
.modal__body { padding: 22px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
#toasts { position: fixed; bottom: 22px; left: 50%; translate: -50% 0; z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: var(--dark); color: #fff; font-size: .86rem; font-weight: 600; box-shadow: var(--shadow-lg); animation: pop .25s; transition: opacity .3s, transform .3s; }
.toast--ok .i { color: #7fe0a8; } .toast--error { background: #8a1530; }
.toast.is-out { opacity: 0; transform: translateY(8px); }

/* ---------- public pages ---------- */
.public { min-height: 100vh; background: var(--bg); }
.public-hero { background: linear-gradient(135deg, var(--brand, #7A00F8), #12062a); color: rgba(255, 255, 255, .85); padding: 64px 24px 80px; }
.public-hero__inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.public-hero h1 { color: #fff; font-size: 2.3rem; margin-bottom: 6px; }
.public-hero p { font-size: 1.08rem; margin-bottom: 20px; }
.public-logo { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 26px; background: #fff; color: var(--brand, #7A00F8); font-weight: 800; font-size: 2.4rem; flex: none; box-shadow: var(--shadow-lg); }
.public-logo--sm { width: 44px; height: 44px; border-radius: 12px; font-size: 1.1rem; background: var(--brand, #7A00F8); color: #fff; box-shadow: none; }
.public-body { max-width: 1100px; margin: -40px auto 0; padding: 0 24px 40px; position: relative; }
.public-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.public-grid .panel { margin: 0; }
.public-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.public-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 4px; align-content: start; }
.public-item h3 { margin: 4px 0 0; font-size: .95rem; }
.public-item p { margin: 0; }
.public-item strong { color: var(--brand, var(--primary)); }
.contact-list { display: grid; gap: 10px; font-size: .88rem; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.contact-list .i { color: var(--brand, var(--primary)); margin-top: 2px; }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--soft); color: var(--brand, var(--primary)); }
.public-center { min-height: calc(100vh - 120px); display: grid; place-items: center; padding: 40px 20px; background: var(--bg); }
.public-center h1 { font-size: 1.5rem; }
.public-center .i--xl { margin: 0 auto 12px; color: var(--lavender); }
.public-foot { text-align: center; padding: 26px 20px; font-size: .82rem; color: var(--muted); }
.public-foot a { font-weight: 700; }
.form-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.form-brand strong { display: block; color: var(--heading); }
.form-brand small { color: var(--muted); }
.success-tick { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e8f7ef; color: var(--green); margin: 0 auto 16px; }
.success-tick .i { width: 32px; height: 32px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpis--4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1 { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s; box-shadow: 20px 0 40px -20px rgba(40, 0, 90, .3); }
  .side-open .sidebar { transform: none; }
  .side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(18, 6, 42, .4); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .topbar__date, .user-chip div { display: none; }
  .view { padding: 20px 16px; }
  .grid-2, .public-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__side { padding: 24px; gap: 16px; }
  .auth__pitch ul, .auth__side small { display: none; }
  .auth__pitch h2 { font-size: 1.25rem; margin: 0; }
  .auth__pitch p { margin: 6px 0 0; font-size: .88rem; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .beta-bar { font-size: .72rem; padding: 6px 12px; gap: 4px; }
  .beta-bar a { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .auth__card { padding: 24px 18px; border-radius: 18px; }
  .kpis, .kpis--4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; flex-direction: column; gap: 8px; }
  .kpi strong { font-size: 1.15rem; }
  .panel { padding: 16px; }
  .page-head .btn, .welcome__actions .btn { flex: 1; }
  .search { width: 100%; }
  .timeline__row { grid-template-columns: 90px 1fr; }
  .timeline__scale { margin-left: 100px; }
  .public-hero { padding: 40px 20px 70px; }
  .public-hero h1 { font-size: 1.7rem; }
  .public-logo { width: 72px; height: 72px; font-size: 1.8rem; }
  .modal-backdrop { padding: 0; place-items: end center; }
  .modal { max-height: 92vh; border-radius: 20px 20px 0 0; }
}
