:root { --ink:#0F172A; --red:#DC2626; --red-dark:#B91C1C; --tint:#FEF2F2; --soft:#F8FAFC; --slate:#475569; --muted:#64748B; --line:#E2E8F0; --ok:#15803D; --head:'Plus Jakarta Sans','Segoe UI',Arial,sans-serif; --body:Inter,'Segoe UI',Arial,sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
#app, .auth, .shell { min-height: 100vh; }
body { font-family: var(--body); color: var(--ink); background: var(--soft); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--head); letter-spacing: -.01em; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--red); }
.boot { min-height: 70vh; display: grid; place-items: center; }
.spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line, #E2E8F0); border-top-color: var(--red, #DC2626); animation: acspin .8s linear infinite; }
@keyframes acspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } }

/* Buttons & inputs */
.btn { border: 0; border-radius: 9px; padding: 9px 14px; font-family: var(--head); font-weight: 700; font-size: 14px; cursor: pointer; background: var(--red); color: #fff; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--red-dark); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.link { background: none; color: var(--red); padding: 4px 6px; }
.btn[disabled] { opacity: .6; cursor: wait; }
input, select, textarea { width: 100%; border: 1px solid #CBD5E1; border-radius: 9px; padding: 9px 11px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,.14); }
label { display: grid; gap: 5px; font-weight: 600; font-size: 13px; font-family: var(--head); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form { display: grid; gap: 12px; }
.msg { font-size: 14px; min-height: 1.3em; margin: 0; }
.msg.err { color: var(--red-dark); font-weight: 600; }
.msg.ok { color: var(--ok); font-weight: 600; }

/* Auth */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(800px 420px at 85% -10%, rgba(220,38,38,.35), transparent 60%), var(--ink); }
.auth__box { background: #fff; border-radius: 18px; padding: 34px; width: min(420px, 100%); border-top: 5px solid var(--red); box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.auth__box h1 { font-size: 24px; margin-bottom: 4px; }
.auth__box p.sub { color: var(--muted); margin: 0 0 18px; }
.auth__switch { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100%; }
.side { background: var(--ink); color: #CBD5E1; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side__brand { font-family: var(--head); font-weight: 800; color: #fff; font-size: 17px; padding: 0 10px 16px; }
.side__brand span { color: var(--red); }
.side button.nav { text-align: left; background: none; border: 0; color: #CBD5E1; padding: 10px 12px; border-radius: 9px; cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; }
.side button.nav:hover { background: rgba(255,255,255,.07); color: #fff; }
.side button.nav.on { background: var(--red); color: #fff; }
.side .count { background: rgba(255,255,255,.18); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.side__foot { margin-top: auto; font-size: 12.5px; padding: 10px; color: #94A3B8; word-break: break-all; }
.main { padding: 26px 30px 60px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.top h1 { font-size: 24px; }
.top__tools { display: flex; gap: 8px; align-items: center; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 13px; color: var(--slate); }
.seg button.on { background: var(--ink); color: #fff; }

/* Cards / stats */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat b { display: block; font-family: var(--head); font-size: 30px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card h3 { font-size: 15px; margin-bottom: 10px; }
.empty { color: var(--muted); padding: 14px 0; }

/* Badges */
.badge { display: inline-block; font-family: var(--head); font-weight: 700; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--slate); }
.badge.gdv { background: var(--tint); border-color: #FECACA; color: var(--red-dark); }
.badge.lcb { background: #EFF6FF; border-color: #BFDBFE; color: #1D4ED8; }
.badge.meet { background: #F0FDF4; border-color: #BBF7D0; color: var(--ok); }

/* Table */
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--head); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--soft); white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #FFFBFB; }
tr:last-child td { border-bottom: 0; }
td.clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pipeline */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: #EEF2F6; border-radius: 12px; padding: 10px; min-height: 120px; }
.col.over { outline: 2px dashed var(--red); }
.col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--slate); padding: 4px 6px 10px; display: flex; justify-content: space-between; }
.lead { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 8px; cursor: grab; }
.lead:hover { border-color: #FCA5A5; box-shadow: 0 8px 18px -12px rgba(15,23,42,.4); }
.lead b { display: block; font-family: var(--head); font-size: 14px; }
.lead small { color: var(--muted); display: block; margin: 2px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal__dow { font-family: var(--head); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 6px; }
.day { background: #fff; border: 1px solid var(--line); border-radius: 10px; min-height: 92px; padding: 7px; cursor: pointer; text-align: left; display: block; width: 100%; }
.day:hover { border-color: #FCA5A5; }
.day.out { background: transparent; border-style: dashed; cursor: default; }
.day.today { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.day.sel { background: var(--tint); }
.day__n { font-family: var(--head); font-weight: 700; font-size: 13px; }
.chip { display: block; margin-top: 4px; background: var(--red); color: #fff; border-radius: 6px; padding: 2px 6px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.lcb { background: #1D4ED8; }
.calwrap { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.meet { border-top: 1px solid var(--line); padding: 12px 0; }
.meet:first-of-type { border-top: 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 14px; margin: 8px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Drawer */
.scrim { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: #fff; z-index: 51; padding: 24px; overflow-y: auto; box-shadow: -30px 0 60px -30px rgba(15,23,42,.5); border-left: 4px solid var(--red); }
.drawer h2 { font-size: 21px; margin-bottom: 6px; padding-right: 40px; }
.drawer .x { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--soft); font-size: 22px; cursor: pointer; line-height: 1; }
.drawer hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .side__brand { width: 100%; padding-bottom: 6px; }
  .side__foot { margin: 0; width: 100%; }
  .main { padding: 18px 14px 50px; }
  .grid2, .calwrap, .row { grid-template-columns: 1fr; }
  .day { min-height: 62px; }
}

.badge.meet { padding: 2px 8px; border: 1px solid #BBF7D0; border-top: 1px solid #BBF7D0; }

.drawer.wide { width: min(880px, 100%); }
.bar { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; margin: 5px 0; border-radius: 8px; overflow: hidden; font-size: 13.5px; background: var(--soft); }
.bar__fill { position: absolute; left: 0; top: 0; bottom: 0; background: #FEE2E2; }
.bar__label, .bar b { position: relative; }
.bar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.qitems { font-size: 13.5px; }
table.qitems th, table.qitems td { padding: 6px 6px; }
table.qitems input, table.qitems select { padding: 6px 8px; }
.qtotals { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.qrow { display: flex; justify-content: space-between; padding: 3px 0; }
.qrow.strong { font-family: var(--head); font-weight: 800; font-size: 17px; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px; }

.ql-toolbar.ql-snow { border-radius: 10px 10px 0 0; border-color: #CBD5E1; }
.ql-container.ql-snow { border-radius: 0 0 10px 10px; border-color: #CBD5E1; font-family: Arial, sans-serif; font-size: 14px; }
.ql-editor { min-height: 220px; }
.ql-editor td { border: 1px solid #CBD5E1; padding: 6px 10px; }

.editor-wrap { display: flex; flex-direction: column; gap: 0; margin-bottom: 6px; }
.editor-wrap .ql-container.ql-snow { height: auto; }
.editor-wrap .ql-editor { min-height: 200px; max-height: 420px; overflow-y: auto; }
.editor-wrap > .actions { margin: 10px 0 0 !important; position: static; }
.drawer .form > .actions { position: static; clear: both; }

.attach-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; }
.attach-chip button { border: 0; background: #fff; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 15px; line-height: 1; }
.attach-chip button:hover { color: var(--red); }

/* ---------- Inbox ---------- */
.ib { display: grid; grid-template-columns: 200px minmax(260px, 360px) 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; height: calc(100vh - 130px); min-height: 520px; }
.ib-folders { border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; background: var(--soft); }
.ib-folders select { margin-bottom: 8px; font-size: 13px; }
.ib-folder { display: flex; justify-content: space-between; align-items: center; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--slate); }
.ib-folder:hover { background: #fff; }
.ib-folder.on { background: var(--red); color: #fff; }
.ib-folder b { font-size: 12px; background: rgba(15,23,42,.08); border-radius: 999px; padding: 0 7px; }
.ib-folder.on b { background: rgba(255,255,255,.25); }
.ib-list { border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.ib-search { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.ib-search .btn { padding: 6px 10px; }
.ib-row { text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 10px 14px; cursor: pointer; display: grid; gap: 2px; font: inherit; color: inherit; }
.ib-row:hover { background: #FFFBFB; }
.ib-row.on { background: var(--tint); box-shadow: inset 3px 0 0 var(--red); }
.ib-row__top { display: flex; justify-content: space-between; gap: 8px; }
.ib-from { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ib-subj { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-sum { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-row.unread .ib-from, .ib-row.unread .ib-subj { font-weight: 700; color: var(--ink); }
.ib-pane { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; }
.ib-empty { display: grid; place-items: center; color: var(--muted); }
.ib-h { font-size: 20px; margin: 0 0 8px; }
.ib-meta { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; display: grid; gap: 2px; }
.ib-frame { flex: 1; min-height: 360px; width: 100%; border: 0; }
@media (max-width: 1100px) { .ib { grid-template-columns: 1fr; height: auto; } .ib-folders { flex-direction: row; flex-wrap: wrap; } .ib-list { max-height: 420px; } }

/* ---------- Payments ---------- */
tr.pay-open td { background: var(--tint); }
tr.pay-detail { cursor: default; }
tr.pay-detail > td { background: #FFFBFB; padding: 16px 18px 20px; border-bottom: 2px solid #FECACA; }
tr.pay-detail .qrow { font-size: 13.5px; border-bottom: 1px dashed var(--line); }

/* ---------- Payments v2 ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-green { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }
.st-amber { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }
.st-red { background: var(--tint); color: var(--red-dark); border-color: #FECACA; }
.st-grey { background: var(--soft); color: var(--slate); border-color: var(--line); }
.st-mode { background: #fff; color: var(--muted); border-color: var(--line); }
.st-mode::before { display: none; }
.pc-list { display: grid; gap: 12px; }
.pc { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.pc:hover { border-color: #FCA5A5; box-shadow: 0 12px 28px -18px rgba(15,23,42,.35); }
.pc.open { border-color: #FCA5A5; box-shadow: 0 16px 34px -20px rgba(220,38,38,.45); }
.pc-head { width: 100%; display: grid; grid-template-columns: 1fr auto auto 20px; gap: 18px; align-items: center; padding: 16px 18px 6px; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.pc-who b { display: block; font-family: var(--head); font-size: 16px; }
.pc-who span, .pc-amt span { font-size: 13px; color: var(--muted); }
.pc-amt { text-align: right; }
.pc-amt b { display: block; font-family: var(--head); font-size: 20px; }
.pc-st { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pc-caret { color: var(--muted); }
.tl { display: flex; gap: 0; padding: 8px 18px 16px; }
.tl-step { flex: 1; position: relative; display: grid; justify-items: start; gap: 2px; font-size: 12.5px; color: var(--muted); }
.tl-step::after { content: ""; position: absolute; top: 11px; left: 26px; right: 4px; height: 2px; background: var(--line); }
.tl-step:last-child::after { display: none; }
.tl-step.done::after { background: #86EFAC; }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--soft); border: 1px solid var(--line); position: relative; z-index: 1; }
.tl-step.done .tl-dot { background: #16A34A; border-color: #16A34A; color: #fff; }
.tl-step.bad .tl-dot { background: var(--red); border-color: var(--red); }
.tl-step b { color: var(--ink); font-family: var(--head); font-size: 12.5px; }
.tl-step:not(.done) b { color: var(--muted); }
.pc-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 16px 18px 20px; border-top: 1px solid var(--line); background: #FFFBFB; }
.pc-body .qrow { font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.lbl { font-family: var(--head); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.opt-grid { display: grid; gap: 10px; }
.opt-grid.two { grid-template-columns: 1fr 1fr; }
.opt { text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; display: grid; gap: 4px; font: inherit; color: inherit; }
.opt b { font-family: var(--head); font-size: 15px; }
.opt span { color: var(--slate); font-size: 13.5px; }
.opt.on { border-color: var(--red); background: var(--tint); box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
.opt.off { opacity: .45; cursor: not-allowed; }
.opt.static { cursor: default; }
.pay-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pay-head b { display: block; font-family: var(--head); }
.pay-head span { color: var(--muted); font-size: 13px; }
.pv { background: var(--ink); color: #fff; border-radius: 14px; padding: 16px 18px; display: grid; gap: 6px; }
.pv .empty { color: #CBD5E1; }
.pv-row { display: flex; justify-content: space-between; gap: 10px; color: #CBD5E1; }
.pv-row b { color: #fff; font-family: var(--head); }
.pv-row.big b { font-size: 24px; }
.pv-note { margin: 6px 0 0; font-size: 12.5px; color: #94A3B8; }
@media (max-width: 900px) { .pc-head { grid-template-columns: 1fr; } .pc-amt { text-align: left; } .pc-st { justify-content: flex-start; } .pc-body, .opt-grid.two { grid-template-columns: 1fr; } .tl { overflow-x: auto; } }

/* ---------- Notification center ---------- */
.bell { position: relative; width: 40px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; font-size: 17px; }
.bell:hover { border-color: #FCA5A5; }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-family: var(--head); font-weight: 800; font-size: 11px; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.npanel { position: fixed; z-index: 120; width: min(400px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(15,23,42,.45); overflow: hidden; }
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 10px; }
.np-head b { font-family: var(--head); font-size: 16px; }
.np-ask { margin: 0 14px 8px; border: 1px dashed #FCA5A5; background: var(--tint); color: var(--red-dark); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.np-list { overflow-y: auto; border-top: 1px solid var(--line); }
.np-item { width: 100%; display: grid; grid-template-columns: 34px 1fr 10px; gap: 10px; align-items: start; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: inherit; }
.np-item:hover { background: var(--soft); }
.np-item.unread { background: #FFFBFB; }
.np-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); font-size: 16px; }
.np-ico.k-payment { background: #F0FDF4; } .np-ico.k-payment_failed { background: var(--tint); } .np-ico.k-meeting { background: #EFF6FF; } .np-ico.k-lead { background: #FFFBEB; }
.np-txt { display: grid; gap: 2px; min-width: 0; }
.np-txt b { font-size: 13.5px; }
.np-item:not(.unread) .np-txt b { font-weight: 600; color: var(--slate); }
.np-txt span { font-size: 12.5px; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-txt small { font-size: 11.5px; color: var(--muted); }
.np-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); margin-top: 6px; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 300; display: grid; gap: 10px; width: min(360px, calc(100vw - 36px)); }
.toast { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; text-align: left; background: var(--ink); color: #fff; border: 0; border-left: 4px solid var(--red); border-radius: 14px; padding: 12px 14px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.6); cursor: pointer; font: inherit; animation: toastIn .25s ease-out; transition: opacity .4s, transform .4s; }
.toast.k-payment { border-left-color: #22C55E; }
.toast b { display: block; font-family: var(--head); font-size: 14px; }
.toast span { display: block; font-size: 12.5px; color: #CBD5E1; margin-top: 2px; }
.toast-ico { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: 16px; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Notification icons: flat, theme colours */
.bell { color: var(--ink); }
.bell:hover, .bell.has { color: var(--red); }
.np-ico, .toast-ico { color: var(--slate); }
.np-ico.k-lead, .np-ico.k-system { background: var(--tint); color: var(--red); }
.np-ico.k-meeting { background: #EEF0FA; color: #3B4BA8; }
.np-ico.k-payment { background: #F0FDF4; color: #15803D; }
.np-ico.k-payment_failed { background: var(--tint); color: var(--red-dark); }
.np-ico.k-email_open, .np-ico.k-email_click { background: #EEF0FA; color: #3B4BA8; }
.toast-ico { color: #FCA5A5; }
.toast.k-payment .toast-ico { color: #86EFAC; }

/* Website activity v2 */
.wc { padding: 16px 18px; }
.wc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.wc-h h3 { margin: 0; }
.wc-h span { color: var(--muted); font-size: 12.5px; }
.wc-c { position: relative; }
.visit { border-top: 1px solid var(--line); }
.visit-h { width: 100%; display: grid; grid-template-columns: 1.3fr .7fr .6fr .6fr 1fr 1.4fr; gap: 10px; align-items: center; text-align: left; background: none; border: 0; padding: 10px 4px; font: inherit; font-size: 13.5px; color: inherit; cursor: pointer; }
.visit-h:hover { background: var(--soft); }
.visit.open .visit-h { background: var(--tint); }
.visit-b { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 4px 12px; }
.visit-p { background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
@media (max-width: 900px) { .visit-h { grid-template-columns: 1fr 1fr; } }

.np-sec { padding: 8px 14px 4px; font-family: var(--head); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--soft); border-bottom: 1px solid var(--line); }

/* ---------- Package manager ---------- */
.pk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.pk-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.pk-card.hot { border: 2px solid var(--red); box-shadow: 0 20px 40px -24px rgba(220,38,38,.55); }
.pk-flag { position: absolute; top: -12px; left: 20px; background: var(--red); color: #fff; font-family: var(--head); font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.pk-card h3 { font-size: 19px; margin: 0; }
.pk-who { color: var(--slate); font-size: 13.5px; margin: 4px 0 10px; min-height: 38px; }
.pk-price b { font-family: var(--head); font-size: 34px; letter-spacing: -.02em; }
.pk-price span { color: var(--muted); margin-left: 4px; }
.pk-sub { color: var(--slate); font-size: 13.5px; }
.pk-save { display: inline-block; margin-top: 8px; background: #F0FDF4; color: #15803D; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; }
.pk-li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.pk-li span:last-child { color: var(--muted); white-space: nowrap; }
.pk-li.total { border-bottom: 0; font-weight: 700; }
.pk-li.total span:last-child { color: var(--ink); }
.pl-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pl-row:first-of-type { border-top: 0; }
.pl-desc { color: var(--muted); font-size: 12.5px; }
.pl-price { text-align: right; display: grid; justify-items: end; }
.pl-price span { font-size: 12px; color: var(--muted); }
@media (max-width: 1100px) { .pk-grid { grid-template-columns: 1fr; } .pl-row { grid-template-columns: 1fr auto; } }

/* Sidebar groups */
.nav-group { display: grid; gap: 2px; }
.nav-parent .nav-r { display: inline-flex; gap: 6px; align-items: center; }
.nav-parent .chev { font-size: 11px; opacity: .7; transition: transform .15s; }
.nav-group:not(.open) .chev { transform: rotate(-90deg); }
.nav-group.has-on > .nav-parent { color: #fff; }
.nav-kids { display: grid; gap: 2px; padding-left: 10px; margin-left: 10px; border-left: 1px solid rgba(255,255,255,.12); }
.side button.nav.sub { font-weight: 500; font-size: 13.5px; padding: 8px 10px; }
@media (max-width: 900px) { .nav-group { width: 100%; } }

/* Leads import */
.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; }
@media (max-width: 900px) { .map-grid { grid-template-columns: 1fr 1fr; } }
tr.row-sel td { background: var(--tint); }

/* Sidebar: scroll inside instead of running past the dark panel */
.side { overflow-y: auto; scrollbar-width: thin; }
.side__foot { padding-top: 14px; }

/* Quote plan */
.plan-box { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .row3 { grid-template-columns: 1fr; } }

/* Notification toast icon: centred in its box (beats the generic ".toast span" rule) */
.toast .toast-ico { display: grid; place-items: center; margin-top: 0; color: #FCA5A5; line-height: 0; }
.toast .toast-ico svg { display: block; }
.toast.k-payment .toast-ico { color: #86EFAC; }
.np-ico svg { display: block; }

/* Security alerts in the bell */
.np-ico.k-security { background: var(--tint); color: var(--red-dark); }
.toast.k-security { border-left-color: #F59E0B; }

/* Sidebar scrolls on its own and keeps its position when a page is opened */
.side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #475569 transparent; }
.side > * { flex-shrink: 0; }

.qtabs { display: flex; gap: 6px; margin-bottom: 8px; }
.qtab { border: 1px solid var(--line); background: #fff; color: var(--slate); border-radius: 99px; padding: 7px 16px; font-family: var(--head); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.qtab.on { background: var(--red); border-color: var(--red); color: #fff; }

/* Legal Client Boost view: navy + gold (GDV keeps red). Colours come from the --red variables, so the whole admin follows. */
:root[data-brand="lcb"] { --red: #184B79; --red-dark: #0F3556; --tint: #EEF4FA; --gold: #DFB75B; }
:root[data-brand="lcb"] .side { background: #0F2A44; }
:root[data-brand="lcb"] .side__brand span { color: #DFB75B; }
:root[data-brand="lcb"] .side button.nav.on { background: #184B79; box-shadow: inset 3px 0 0 #DFB75B; }
:root[data-brand="lcb"] input:focus, :root[data-brand="lcb"] select:focus, :root[data-brand="lcb"] textarea:focus { box-shadow: 0 0 0 3px rgba(24,75,121,.18); }
:root[data-brand="lcb"] .drawer { border-left-color: #DFB75B; }
:root[data-brand="lcb"] .badge.gdv { background: #FEF2F2; border-color: #FECACA; color: #B91C1C; }
:root[data-brand="lcb"] .chip:not(.lcb) { background: #DC2626; }
.badge.lcb { background: #EEF4FA; border-color: #BFD3E6; color: #0F3556; }
.chip.lcb { background: #184B79; }
.brandtabs { display: flex; gap: 6px; margin: 0 0 14px; padding: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; width: max-content; max-width: 100%; }
.brandtabs button { border: 0; background: none; padding: 8px 18px; border-radius: 9px; font-family: var(--head); font-weight: 700; font-size: 13.5px; color: var(--slate); cursor: pointer; }
.brandtabs button.on[data-b="gdv"] { background: #DC2626; color: #fff; }
.brandtabs button.on[data-b="lcb"] { background: #184B79; color: #fff; box-shadow: inset 0 -3px 0 #DFB75B; }
