/* G Sığorta CRM — dizayn sistemi */
:root {
  --bg: #f3f1ec; --surface: #ffffff; --surface-2: #faf9f6; --ink: #1b2430; --muted: #68737f; --line: #e5e1d7;
  --brand: #0b6e5f; --brand-d: #085449; --brand-soft: #e1f1ed; --accent: #c98408; --accent-soft: #fbf0d8;
  --bad: #b83227; --bad-soft: #fbe6e3; --ok: #1d8a57; --ok-soft: #dff3e8; --warn: #a8700a; --warn-soft: #fbf0d8;
  --side: #0f222b; --side-ink: #b9c9c6; --side-hi: #ffffff; --side-line: #1c3540;
  --shadow: 0 1px 2px rgba(20,30,40,.05), 0 6px 18px -8px rgba(20,30,40,.12);
  --r: 14px; --r-sm: 9px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}
[data-theme="dark"] {
  --bg: #0c1317; --surface: #141e24; --surface-2: #111a1f; --ink: #e7eded; --muted: #8b9ba2; --line: #233039;
  --brand: #35b8a0; --brand-d: #2a9a85; --brand-soft: #12332f; --accent: #e3a92f; --accent-soft: #33290f;
  --bad: #ef6a5e; --bad-soft: #3a1a17; --ok: #4fc58a; --ok-soft: #123324; --warn: #e3a92f; --warn-soft: #33290f;
  --side: #090f12; --side-line: #172329;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 22px -10px rgba(0,0,0,.5);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
.ic { flex: none; vertical-align: -3px; }
.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
.hidden { display: none !important; }
.uc { text-transform: uppercase; }

/* ---- Düzən ---- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 22px 20px 18px; color: var(--side-hi); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: #fff; display: grid; place-items: center; padding: 3px; flex: none; }
.brand-mark.dark { background: transparent; padding: 0; width: 46px; height: 46px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand b { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: .2px; display: block; }
.brand small { font-size: 11px; color: #6f8a88; letter-spacing: .08em; text-transform: uppercase; }
.nav { padding: 6px 12px 12px; flex: 1; }
.nav-title { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #5f7a7a; padding: 16px 10px 7px; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--side-ink); font-weight: 600; font-size: 13.5px; margin-bottom: 2px; text-decoration: none; }
.nav a:hover { background: var(--side-line); color: var(--side-hi); }
.nav a.active { background: #16403f; color: #fff; box-shadow: inset 3px 0 0 #3ccdb3; }
.nav .badge { margin-left: auto; background: var(--accent); color: #1b1200; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 1px 7px; min-width: 20px; text-align: center; }
.nav .badge.red { background: #e5584a; color: #fff; }
.side-foot { padding: 14px 16px; border-top: 1px solid var(--side-line); font-size: 11.5px; color: #5f7a7a; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.topbar .grow { flex: 1; }
.menu-btn { display: none; }
.userbox { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none; border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.userbox .nm { font-weight: 700; font-size: 13px; line-height: 1.2; }
.userbox .rl { font-size: 11.5px; color: var(--muted); }
.content { padding: 26px 28px 60px; max-width: 1360px; width: 100%; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head h1 { font-family: var(--serif); font-size: 29px; font-weight: 600; letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- Kartlar ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-h h3 { font-size: 15px; font-weight: 700; }
.card-b { padding: 20px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.stat .val { font-family: var(--serif); font-size: 28px; font-weight: 600; margin-top: 8px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat .val small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.stat.warn::after { background: var(--accent); } .stat.bad::after { background: var(--bad); } .stat.ok::after { background: var(--ok); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 12.5px; } .kv dd { margin: 0; font-weight: 600; }

/* ---- Cədvəl ---- */
.tbl-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--surface-2); }
.t .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.t td.strong { font-weight: 700; }
.t tr.row-bad td { background: color-mix(in srgb, var(--bad-soft) 55%, transparent); }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; opacity: .4; margin-bottom: 8px; }

/* ---- Pill / badge ---- */
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill-brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

/* ---- Düymələr ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 13px var(--font); cursor: pointer; text-decoration: none !important; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: #c9c4b6; background: var(--surface-2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #1b1200; }
.btn-danger { color: var(--bad); } .btn-danger:hover { background: var(--bad-soft); border-color: transparent; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; padding: 0; }

/* ---- Formalar ---- */
.field { margin-bottom: 14px; }
.field label, .lbl-t { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 600 14px var(--font); transition: .15s; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea.input { min-height: 84px; resize: vertical; font-weight: 500; }
.input[readonly] { background: var(--surface-2); color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.filters .field { margin: 0; min-width: 140px; } .filters .field.grow { flex: 1; min-width: 200px; }
.inline { display: inline; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.input-group { display: flex; gap: 8px; margin-bottom: 8px; }
.input-group .input { flex: 1; }

/* ---- Seçim çipləri, radio kartlar ---- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.chip { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font: 700 12.5px var(--font); cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--brand); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-weight: 700; font-size: 13.5px; background: var(--surface); color: var(--ink); }
.seg input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.panel-credit { border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, transparent); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); border-radius: var(--r); padding: 18px; margin-top: 14px; }
.preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.preview div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.preview small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.preview b { font-family: var(--serif); font-size: 18px; font-variant-numeric: tabular-nums; }

/* ---- Müştəri seçici ---- */
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); margin-top: 4px; max-height: 300px; overflow-y: auto; }
.picker-item { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none; cursor: pointer; font: 600 13.5px var(--font); color: var(--ink); border-bottom: 1px solid var(--line); }
.picker-item:hover { background: var(--brand-soft); }
.picker-item small { display: block; color: var(--muted); font-weight: 500; }
.picked { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--brand); background: var(--brand-soft); border-radius: var(--r); }
.picked .grow { flex: 1; min-width: 0; }

/* ---- Alertlər ---- */
.flash { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 14px; font-weight: 600; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.flash-error { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.flash-info { background: var(--accent-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.flash .ic { margin-top: 2px; }

/* ---- Səhifələmə, tablar ---- */
.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); gap: 12px; flex-wrap: wrap; }
.pager .pg { display: flex; gap: 4px; }
.pager a, .pager span.cur { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; }
.pager span.cur { background: var(--brand); color: #fff; border-color: var(--brand); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 99px; font-weight: 700; font-size: 13px; color: var(--muted); border: 1px solid transparent; text-decoration: none; }
.tabs a:hover { background: var(--surface); }
.tabs a.on { background: var(--surface); color: var(--brand); border-color: var(--line); box-shadow: var(--shadow); }

/* ---- Qrafiklər ---- */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bar-fill { width: 100%; background: linear-gradient(180deg, #17a38b, var(--brand)); border-radius: 8px 8px 3px 3px; min-height: 3px; }
.bar-val { font-size: 11px; font-weight: 700; color: var(--muted); height: 16px; }
.bar-lbl { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: 7px; }
.progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 99px; }
.progress.accent .progress-fill { background: var(--accent); } .progress.bad .progress-fill { background: var(--bad); }
.ring { --s: 64px; --deg: 0deg; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c, var(--brand)) var(--deg), var(--line) 0); position: relative; flex: none; }
.ring::before { content: ''; position: absolute; inset: 7px; background: var(--surface); border-radius: 50%; }
.ring span { position: relative; font-family: var(--serif); font-weight: 700; font-size: calc(var(--s) * .3); }
.ring-ok { --c: var(--ok); } .ring-mid { --c: var(--accent); } .ring-low { --c: var(--bad); }
.ring-empty { background: var(--line); }
.spark { color: var(--brand); }
.share { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; margin-bottom: 14px; }
.share .progress { grid-column: 1 / -1; }

/* ---- Kredit ---- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--surface-2); border: 2px solid var(--line); color: var(--muted); }
.dot.paid { background: var(--ok); border-color: var(--ok); color: #fff; }
.dot.late { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.dot.part { background: var(--accent-soft); border-color: var(--accent); color: var(--warn); }

/* ---- Yazışma ---- */
.chat { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 190px); min-height: 480px; overflow: hidden; }
.chat-side { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-side a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.chat-side a:hover, .chat-side a.on { background: var(--brand-soft); }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.msg { max-width: 72%; padding: 9px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.msg small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.msg.mine { align-self: flex-end; background: var(--brand); color: #fff; border-color: var(--brand); }
.msg.mine small { color: rgba(255,255,255,.75); }
.chat-form { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 44px; max-height: 120px; resize: none; }

/* ---- Giriş ---- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(1200px 600px at 10% -10%, #17606a 0, transparent 60%), linear-gradient(160deg, #0f222b, #0a1a21); color: #d6e4e1; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h2 { font-family: var(--serif); font-size: 44px; line-height: 1.1; font-weight: 600; max-width: 460px; color: #fff; letter-spacing: -1px; }
.auth-art p { max-width: 420px; color: #9bb3b0; font-size: 15px; }
.auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-art li { display: flex; gap: 12px; align-items: center; color: #b9cfcb; font-weight: 600; }
.auth-art li .ic { color: #3ccdb3; }
.auth-box { display: grid; place-items: center; padding: 32px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; margin-bottom: 6px; }
.err-page { text-align: center; padding: 70px 20px; }
.err-page .code { font-family: var(--serif); font-size: 96px; font-weight: 600; color: var(--brand); line-height: 1; }

/* ---- Mobil ---- */
.backdrop { display: none; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 50; transform: translateX(-100%); transition: transform .25s; }
  .side.open { transform: none; }
  .backdrop.on { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }
  .menu-btn { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .chat { grid-template-columns: 1fr; } .chat.has-thread .chat-side { display: none; } .chat:not(.has-thread) .chat-main { display: none; }
}
@media (max-width: 640px) { .g2, .g3, .g4, .row-2, .row-3 { grid-template-columns: 1fr; } .page-head h1 { font-size: 24px; } .userbox .meta { display: none; } .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; } }
@media print { .side, .topbar, .actions, .btn, .filters, .pager { display: none !important; } .app { display: block; } .content { padding: 0; } .card { box-shadow: none; } }
.sticky { position: sticky; top: 84px; align-self: start; }
.kv.box { padding: 14px 16px; background: var(--brand-soft); border-radius: var(--r-sm); margin-top: 6px; }
.btn.block { display: flex; width: 100%; justify-content: center; margin-top: 14px; }
.bad { color: var(--bad); font-weight: 700; } .ok-t { color: var(--ok); }
.back-btn { display: none; } @media (max-width: 900px) { .back-btn { display: inline-flex; margin-right: 8px; } }
/* Bildirişlər */
.bell { position: relative; }
.bell-count { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font: 800 10px/17px var(--font); text-align: center; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-width: 92vw; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 18px 50px rgba(0,0,0,.22); z-index: 60; overflow: hidden; }
.bell-head, .bell-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; }
.bell-head { border-bottom: 1px solid var(--line); } .bell-foot { border-top: 1px solid var(--line); font-size: 13px; }
.bell-list { max-height: 380px; overflow-y: auto; }
.bell-item { display: block; padding: 11px 14px 11px 17px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); position: relative; border-left: 3px solid transparent; }
.bell-item:hover { background: var(--brand-soft); } .bell-item b { display: block; font-size: 13px; } .bell-item span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; } .bell-item small { color: var(--muted); font-size: 11px; }
.bell-item.unread { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); } .bell-item.unread b::before { content: '● '; color: var(--accent); }
.t-escalation { border-left-color: var(--bad) !important; } .t-overdue { border-left-color: var(--accent) !important; } .t-expiring { border-left-color: var(--warn) !important; }
.t-birthday { border-left-color: var(--ok) !important; } .t-message { border-left-color: var(--brand) !important; } .t-info { border-left-color: var(--muted) !important; }
.toasts { position: fixed; top: 76px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; width: 340px; max-width: calc(100vw - 36px); }
.toast { display: flex; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--r-sm); box-shadow: 0 14px 40px rgba(0,0,0,.25); animation: toast-in .35s cubic-bezier(.2,.8,.2,1); transition: opacity .4s, transform .4s; }
.toast.out { opacity: 0; transform: translateX(30px); }
.toast a { flex: 1; padding: 12px 14px; text-decoration: none; color: var(--ink); } .toast a b { display: block; font-size: 13.5px; } .toast a span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.toast-x { background: none; border: 0; font-size: 20px; padding: 0 12px; cursor: pointer; color: var(--muted); }
.toast.t-escalation { animation: toast-in .35s, pulse-bad 1.6s 2; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes pulse-bad { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 35%, transparent), 0 14px 40px rgba(0,0,0,.25); } }
/* Gündəlik plan */
.plan { list-style: none; margin: 0; padding: 0; } .plan li { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.plan li:last-child { border-bottom: 0; } .plan .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.score { display: flex; gap: 16px; align-items: center; } .score .big { font: 600 38px var(--serif); }
/* Qəbz / çap */
.print-body { background: var(--bg); } .receipt { max-width: 680px; margin: 0 auto; padding: 24px 16px; }
.receipt-bar { display: flex; justify-content: space-between; margin-bottom: 16px; }
.receipt-sheet { background: #fff; color: #111; border: 1px solid var(--line); border-radius: var(--r); padding: 34px; box-shadow: var(--shadow); }
.receipt-sheet .kv dt { color: #666; } .receipt-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #111; padding-bottom: 16px; }
.receipt-amount { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 18px; border: 2px solid #111; border-radius: 10px; } .receipt-amount b { font: 700 30px var(--serif); }
.receipt-sign { display: flex; justify-content: space-between; margin-top: 46px; font-size: 13px; }
@media print { .no-print, .side, .topbar, .toasts, .bell { display: none !important; } .app { display: block; } .main { margin: 0; } .content { padding: 0; } body, .print-body { background: #fff; } .receipt-sheet { border: 0; box-shadow: none; padding: 0; } .card { box-shadow: none; break-inside: avoid; } }
.codes { background: var(--brand-soft); border-radius: var(--r-sm); padding: 14px; font: 700 15px/1.7 ui-monospace, Menlo, monospace; letter-spacing: .06em; white-space: pre-wrap; user-select: all; }
/* AI köməkçi */
.ai-log { height: min(56vh, 520px); overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; background: var(--surface-2, var(--brand-soft)); line-height: 1.55; }
.ai-msg p { margin: 0 0 6px; } .ai-msg p:last-child, .ai-msg ul:last-child { margin-bottom: 0; } .ai-msg ul { margin: 4px 0 6px; padding-left: 18px; }
.ai-msg.me { align-self: flex-end; background: var(--brand); color: #fff; } .ai-msg.err { background: var(--bad-soft); color: var(--bad); } .ai-msg.wait { opacity: .6; }
.ai-sug { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; } .ai-form { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.ai-form textarea { min-height: 44px; max-height: 120px; resize: none; }
/* Mobil: bildiriş paneli ekrandan çıxmasın (topbar backdrop-filter olduğu üçün fixed yox, absolute işlədilir) */
@media (max-width: 640px) {
  .bell { position: static; }
  .bell-panel { left: 10px; right: 10px; width: auto; max-width: none; top: calc(100% + 6px); }
  .bell-list { max-height: 60vh; }
  .toasts { left: 10px; right: 10px; width: auto; top: 72px; }
}
