/* ALFAMEDIA CRM styles */
:root {
  --bg: #f4f6f5; --panel: #ffffff; --panel-2: #f6f8f7; --text: #1c2522; --muted: #66706c; --line: #e1e6e3;
  --brand: #15803d; --brand-2: #16a34a; --brand-dark: #0f5f2e; --brand-soft: #e8f5ec;
  --ok: #15803d; --ok-soft: #e7f6ec; --warn: #b45309; --warn-soft: #fff5e1; --bad: #c62828; --bad-soft: #fdecec;
  --info: #1d4ed8; --info-soft: #e8efff; --grey-soft: #eef1ef; --purple: #7c3aed; --purple-soft: #f1eaff;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 40, 24, .05), 0 1px 3px rgba(16, 40, 24, .06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; }
h2 { font-size: 22px; } h3 { font-size: 15px; } h4 { margin: 16px 0 8px; font-size: 14px; }
small { font-size: 12px; }
code { background: var(--grey-soft); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.danger, .danger-t { color: var(--bad); } .warn, .warn-t { color: var(--warn); } .good-t { color: var(--ok); }
.r { text-align: right; } .center { text-align: center; margin: 12px; } .grow { flex: 1; }
.loading { padding: 60px; text-align: center; color: var(--muted); }

/* layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 236px; background: #10261a; color: #e5efe8; border-right: 1px solid #0b1c12; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; }
.brand b { display: block; letter-spacing: .5px; } .brand small { color: var(--muted); }
.sidebar .brand small, .sidebar .me small { color: #9fb8a8; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--brand-dark), var(--brand-2)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.brand.big .logo { width: 46px; height: 46px; font-size: 24px; }
.brand.big b { font-size: 20px; }
.sidebar nav { display: flex; flex-direction: column; padding: 6px 10px; gap: 2px; flex: 1; overflow: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #d4e3d9; font-weight: 500; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.sidebar .ico { width: 20px; text-align: center; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.1); padding: 12px; display: grid; gap: 10px; }
.sidebar-foot .btn { color: #d4e3d9; border-color: rgba(255,255,255,.2); }
.sidebar-foot .btn:hover { background: rgba(255,255,255,.08); }
.me { display: flex; gap: 10px; align-items: center; } .me b { display: block; } .me small { color: var(--muted); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 18px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; }
.view { padding: 20px 24px 40px; max-width: 1400px; width: 100%; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ai { background: var(--purple-soft); border-color: #e0d2ff; color: var(--purple); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger.ghost { background: transparent; color: var(--bad); border-color: var(--line); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.btn-col { display: flex; flex-direction: column; gap: 8px; }
.icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.small { font-size: 12px; padding: 2px 6px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand-2); }
textarea { resize: vertical; }
input[type=checkbox] { width: auto; accent-color: var(--brand); }
select.mini { padding: 3px 6px; font-size: 12px; width: auto; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.field > span { color: var(--muted); font-weight: 500; }
.field.full { grid-column: 1 / -1; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; } .field.inline select { width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.form-error { background: var(--bad-soft); color: var(--bad); padding: 8px 12px; border-radius: 8px; margin-top: 12px; }
.chk-label { display: flex; gap: 6px; align-items: center; white-space: nowrap; color: var(--muted); }

/* toolbar */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }
.toolbar p { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: var(--panel); padding: 8px 12px; cursor: pointer; font: inherit; color: var(--muted); }
.seg button.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow-x: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head:not(:first-child) { margin-top: 20px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols.wide-left { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.hello { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.hello p { margin: 2px 0 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; color: var(--text); box-shadow: var(--shadow); border-left: 4px solid var(--brand); }
a.stat:hover { text-decoration: none; border-color: var(--brand-2); }
.stat small { color: var(--muted); font-weight: 500; }
.stat.warn { border-left-color: var(--warn); } .stat.warn b { color: var(--warn); }
.stat b { font-size: 20px; line-height: 1.25; }
.stat.bad { border-left-color: var(--bad); } .stat.bad b { color: var(--bad); }
.stat.good { border-left-color: var(--ok); }

.progress { height: 8px; background: var(--grey-soft); border-radius: 99px; overflow: hidden; }
.progress.big { height: 12px; margin-bottom: 10px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 99px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dot.ok { background: var(--ok); } .dot.prog { background: var(--info); } .dot.todo { background: #a1a1aa; } .dot.bad { background: var(--bad); }

/* tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl.compact th, .tbl.compact td { padding: 7px 8px; }
.card:not(.flush) .tbl th { background: transparent; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.click:hover td, .tbl td.click:hover { background: var(--panel-2); cursor: pointer; }
.tbl tr.done td { opacity: .55; } .tbl tr.done b { text-decoration: line-through; }
.tbl tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--bad); }

/* badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--grey-soft); color: var(--muted); white-space: nowrap; }
.b-lead, .b-new-lead, .b-not-started, .b-not-submitted { background: var(--grey-soft); color: var(--muted); }
.b-assigned, .b-topic-finalised, .b-meeting-scheduled { background: var(--purple-soft); color: var(--purple); }
.b-accepted, .b-scripting, .b-in-production, .b-waiting-for-information { background: var(--info-soft); color: var(--info); }
.b-submitted-for-review, .b-pending-review, .b-in-review, .b-proposal-sent, .b-negotiation, .b-unpaid { background: var(--warn-soft); color: var(--warn); }
.b-revision-required, .b-revision { background: var(--bad-soft); color: var(--bad); }
.b-approved, .b-completed, .b-published, .b-client, .b-received { background: var(--ok-soft); color: var(--ok); }
.b-estimated { background: #fff3cd; color: #8a6100; font-size: 11px; }
.b-unconfirmed { background: var(--grey-soft); color: var(--muted); font-size: 11px; font-weight: 500; border: 1px dashed #c4ccc8; }
.b-contacted, .b-in-progress, .b-due { background: var(--info-soft); color: var(--info); }
.b-proposal, .b-review, .b-partial { background: var(--warn-soft); color: var(--warn); }
.b-won, .b-done, .b-delivered, .b-paid { background: var(--ok-soft); color: var(--ok); }
.b-lost, .b-cancelled, .b-overdue { background: var(--bad-soft); color: var(--bad); }
.b-on-hold, .b-planning, .b-to-do { background: var(--grey-soft); color: var(--muted); }
.badge.p.b-low { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.badge.p.b-medium { background: var(--info-soft); color: var(--info); }
.badge.p.b-high { background: var(--warn-soft); color: var(--warn); }
.badge.p.b-urgent { background: var(--bad); color: #fff; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 1px 7px; border-radius: 99px; }
.due { font-size: 12px; white-space: nowrap; }
.due.danger { color: var(--bad); font-weight: 600; } .due.warn { color: var(--warn); font-weight: 600; }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; min-width: 26px; max-height: 26px; line-height: 1; box-sizing: border-box; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 700; flex-shrink: 0; vertical-align: middle; }
.avatar.empty { background: var(--grey-soft); color: var(--muted); }

/* lists */
.task-list, .simple, .activity, .notes, .bars, .sugg { list-style: none; margin: 0; padding: 0; }
.task-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.task-row:last-child, .simple li:last-child, .activity li:last-child, .notes li:last-child { border-bottom: none; }
.task-row.done .t-title { text-decoration: line-through; color: var(--muted); }
.t-title { font-weight: 500; }
.chk { width: 17px; height: 17px; cursor: pointer; flex-shrink: 0; }
.simple li { display: flex; align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.click { cursor: pointer; }
.simple li.click:hover { background: var(--panel-2); }
.activity li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.act-ico { width: 22px; text-align: center; }
.bars li { display: grid; grid-template-columns: 100px 1fr 110px; align-items: center; gap: 10px; padding: 6px 0; }
.bar { height: 10px; background: var(--grey-soft); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; min-width: 2px; }
.bar i.b-won { background: var(--ok); } .bar i.b-lost { background: var(--bad); } .bar i.b-proposal { background: var(--warn); } .bar i.b-contacted { background: var(--info); }
.bars .val { text-align: right; font-size: 12px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; }
.empty-ico { font-size: 26px; opacity: .6; }
.empty p { margin: 6px 0; }

/* detail pages */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.detail-head h2 { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.detail-head p { margin: 4px 0 0; }
.stage-bar { display: flex; gap: 0; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.stage { flex: 1; border: none; background: transparent; padding: 9px 6px; cursor: pointer; font: inherit; color: var(--muted); border-right: 1px solid var(--line); }
.stage:last-child { border-right: none; }
.stage:hover { background: var(--panel-2); }
.stage.on { background: var(--brand); color: #fff; font-weight: 600; }
.stage.on.s-lost { background: var(--bad); }
.stage.on.s-won { background: var(--ok); } .stage.on.s-lost { background: var(--bad); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 10px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.profile-notes { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.profile-notes p { margin: 4px 0 0; white-space: pre-wrap; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.note-form { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.notes li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.note-meta { display: flex; align-items: center; gap: 8px; }
.note-meta .icon-btn { margin-left: auto; }
.note-body { white-space: pre-wrap; margin: 6px 0 0 34px; }

/* project cards */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; color: var(--text); box-shadow: var(--shadow); }
.pcard:hover { border-color: var(--brand-2); text-decoration: none; }
.pc-top { display: flex; gap: 6px; align-items: center; }
.pc-title { font-size: 15px; }
.pc-foot { display: flex; align-items: center; gap: 8px; }

/* kanban boards */
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.board.tasks { grid-template-columns: repeat(5, minmax(210px, 1fr)); }
.board.pipeline { grid-template-columns: repeat(7, minmax(190px, 1fr)); }
.col { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); min-height: 200px; display: flex; flex-direction: column; }
.col.over { outline: 2px dashed var(--brand-2); background: var(--brand-soft); }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: grab; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.kcard:hover { border-color: var(--brand-2); }
.kcard.dragging { opacity: .4; }
.kcard.overdue { border-left: 3px solid var(--bad); }
.kmeta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; }

/* modal */
.modal-wrap { position: fixed; inset: 0; background: rgba(15, 17, 26, .45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s; }
.modal { background: var(--panel); border-radius: 14px; width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal.wide { width: min(720px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px 18px 18px; overflow: auto; }
.modal-body p { margin-top: 0; }
.modal-foot-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }

/* invoices */
.inv-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.inv-sum > div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.inv-sum b { font-size: 17px; }
.pay-form { display: grid; grid-template-columns: 1fr 1fr 1fr 1.3fr auto; gap: 8px; align-items: end; margin-top: 14px; background: var(--panel-2); padding: 12px; border-radius: 10px; }

/* AI */
.ai-result { border: 1px solid #e0d2ff; background: linear-gradient(180deg, var(--purple-soft), transparent 120px); border-radius: 12px; padding: 14px 16px; margin-top: 12px; }
.ai-card { padding: 4px 8px; }
.ai-card .ai-result { margin: 8px 0; border: none; }
.ai-text p { margin: 0 0 4px; } .ai-text ul { margin: 4px 0 8px; padding-left: 20px; } .ai-text h3, .ai-text h4, .ai-text h5 { margin: 10px 0 4px; }
.ai-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ai-loading { display: flex; gap: 10px; align-items: center; color: var(--brand); padding: 14px 4px; }
.spin { width: 16px; height: 16px; border: 2px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { background: var(--warn-soft); border-radius: 10px; padding: 12px 14px; margin: 8px 0; }
.notice.err { background: var(--bad-soft); color: var(--bad); }
.notice ol { margin: 8px 0; padding-left: 20px; } .notice li { margin: 4px 0; }
.sugg li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sugg label { display: flex; gap: 10px; align-items: flex-start; flex: 1; cursor: pointer; }
.sugg input { margin-top: 3px; }

/* dropdown */
.dropdown { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: 6px; min-width: 180px; z-index: 30; }
.menu button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 9px 10px; border-radius: 6px; font: inherit; color: var(--text); cursor: pointer; }
.menu button:hover { background: var(--panel-2); }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, var(--brand-soft), transparent 50%), var(--bg); }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; width: min(380px, 100%); display: grid; gap: 14px; box-shadow: 0 20px 50px rgba(30, 20, 60, .1); }
.login-card .brand { padding: 0 0 6px; }
.login-card p { margin: 0; }

/* toasts */
#toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 200; }
.toast { background: #1f2330; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); transition: opacity .4s, transform .4s; max-width: 360px; }
.toast.err { background: var(--bad); }
.toast.hide { opacity: 0; transform: translateY(8px); }

/* responsive */
@media (max-width: 1000px) {
  .cols, .cols.wide-left { grid-template-columns: 1fr; }
  .pay-form { grid-template-columns: 1fr 1fr; }
  .inv-sum { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-block; }
  .view { padding: 14px; }
  .topbar { padding: 12px 14px; }
  .grid2 { grid-template-columns: 1fr; }
  .stage-bar { flex-wrap: wrap; }
  .toolbar input[type=search] { max-width: none; }
  .note-form { flex-direction: column; } .note-form .btn { align-self: flex-end; }
}

/* --- v2 additions --- */
.section-label { margin: 6px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs.inline { border-bottom: none; margin-bottom: 0; background: var(--grey-soft); padding: 3px; border-radius: 9px; }
.tab { border: none; background: none; padding: 10px 14px; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs.inline .tab { padding: 6px 12px; border-radius: 7px; border-bottom: none; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs.inline .tab.on { background: var(--panel); box-shadow: var(--shadow); }
.mini-stats { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.mini-stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; display: flex; flex-direction: column; min-width: 120px; }
.mini-stats b { font-size: 18px; }
.total-row td { font-weight: 700; background: var(--panel-2); }
.pre { white-space: pre-wrap; word-break: break-word; }
.nowrap { white-space: nowrap; }
.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.timeline li { padding: 10px 0 10px 12px; border-left: 3px solid var(--line); margin-bottom: 4px; }
.timeline li.k-submission { border-left-color: var(--warn); } .timeline li.k-revision { border-left-color: var(--bad); }
.timeline li.k-approved { border-left-color: var(--ok); } .timeline li.k-progress { border-left-color: var(--info); }
.timeline .note-body { margin-left: 26px; }
.upd-form { display: grid; gap: 8px; }
.upd-row { display: flex; gap: 8px; } .upd-row select { width: auto; }
.review-card { border-color: var(--warn); background: linear-gradient(180deg, var(--warn-soft), var(--panel) 90px); }
.review-card textarea { margin-top: 6px; }
.action-card { border-color: var(--brand-2); background: linear-gradient(180deg, var(--brand-soft), var(--panel) 90px); }
.status-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pill { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.pill.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.submit-form { display: grid; grid-template-columns: 2fr 1.3fr auto; gap: 8px; align-items: end; }
.bell { position: relative; font-size: 18px; }
.bell-count { position: absolute; top: -2px; right: -2px; background: var(--bad); color: #fff; border-radius: 99px; font-size: 10px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.notif-menu { width: 340px; max-height: 420px; overflow: auto; padding: 0; }
.menu-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); }
.notif { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); }
.notif:hover { background: var(--panel-2); text-decoration: none; }
.notif.unread { background: var(--brand-soft); }
.dual-bar { display: grid; gap: 3px; } .dual-bar i { display: block; height: 7px; border-radius: 99px; min-width: 2px; }
.dual-bar .inc { background: var(--ok); } .dual-bar .exp { background: var(--bad); opacity: .7; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.company-card .brand { padding: 0 0 6px; }
.notice.small { font-size: 12px; margin-top: 10px; }
.field small { font-size: 11px; }
@media (max-width: 760px) { .submit-form { grid-template-columns: 1fr; } }

/* WhatsApp */
.wa-btn { background: #25d366; color: #fff; border-color: #1fb457; }
.wa-btn:hover { background: #1fb457; }
.wa-mini { border: 1px solid #b7ebc9; background: #e9f9ef; border-radius: 6px; padding: 1px 5px; font-size: 13px; cursor: pointer; margin-right: 4px; }
.wa-mini:hover { background: #25d366; }
.wa-tpl { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.wa-tpl .x { margin-left: 6px; opacity: .5; }
.wa-tpl .x:hover { opacity: 1; color: #b91c1c; }
label.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-size: 14px; }
