:root {
  --ink: #132238;
  --muted: #6b7a90;
  --line: #e5eaf1;
  --paper: #f6f8fb;
  --white: #fff;
  --navy: #132b4f;
  --blue: #2563eb;
  --gold: #d89b32;
  --green: #14825e;
  --red: #c44747;
  --shadow: 0 18px 45px rgba(20, 42, 76, .08);
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, monospace; direction: ltr; text-align: left; }
.toast { position: fixed; z-index: 20; left: 24px; bottom: 24px; max-width: 360px; padding: 13px 17px; border-radius: 12px; color: #fff; background: var(--navy); box-shadow: var(--shadow); }
.toast.error { background: var(--red); }

.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; background: #102542; }
.login-art { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 8vw; color: #fff; background: radial-gradient(circle at 24% 24%, #28517d 0, transparent 34%), linear-gradient(140deg, #0d203b 0%, #173b65 100%); }
.login-art:after { content: ""; position: absolute; width: 480px; height: 480px; border: 1px solid rgba(216,155,50,.4); border-radius: 50%; left: -180px; top: -130px; box-shadow: 0 0 0 55px rgba(216,155,50,.04), 0 0 0 110px rgba(216,155,50,.035); }
.brand-mark { position: absolute; top: 42px; right: 8vw; letter-spacing: .1em; font-size: 13px; color: #f2c36d; }
.art-copy { position: relative; z-index: 1; max-width: 560px; }
.art-copy h1 { margin: 0 0 20px; font-size: clamp(32px, 4vw, 62px); line-height: 1.2; font-weight: 700; }
.art-copy p { margin: 0; max-width: 470px; color: #b9cce2; line-height: 2.1; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 32px; background: #fff; }
.login-card { width: min(420px, 100%); }
.login-logo { display: block; width: 58px; height: 58px; margin: 0 auto 16px; object-fit: contain; }
.login-card h2 { margin: 0 0 8px; font-size: 29px; }
.login-card .lead { margin: 0 0 30px; color: var(--muted); line-height: 1.9; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: #44546b; }
input, select, textarea { width: 100%; border: 1px solid #dce3ec; border-radius: 9px; padding: 11px 12px; outline: none; color: var(--ink); background: #fff; transition: border .2s, box-shadow .2s; font-size: 14px; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #6b9bf2; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; border: 0; border-radius: 9px; padding: 0 16px; font-weight: 600; color: #fff; background: var(--blue); transition: transform .15s, filter .15s; }
.button:hover { filter: brightness(.95); transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button.secondary { color: var(--ink); background: #eef2f7; }
.button.danger { background: var(--red); }
.button.success { background: var(--green); }
.button.gold { color: #35240c; background: #efbd62; }
.button.full { width: 100%; }
.form-error { min-height: 22px; margin: 9px 0; color: var(--red); font-size: 13px; }

.app { min-height: 100vh; display: grid; grid-template-columns: 1fr 256px; direction: rtl; }
.sidebar { direction: rtl; position: sticky; top: 0; height: 100vh; padding: 28px 16px 18px; color: #dae5f4; background: var(--navy); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 12px 28px; border-bottom: 1px solid rgba(255,255,255,.1); }
.side-emblem { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; color: #2a1d07; font-weight: 800; background: #eeb75a; }
.side-logo { width: 38px; height: 38px; object-fit: contain; }
.side-brand strong { display: block; font-size: 14px; color: #fff; }
.side-brand small { color: #8fa5c1; font-size: 10px; }
.nav { display: grid; gap: 5px; margin-top: 24px; }
.nav button { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; border-radius: 9px; padding: 11px 12px; text-align: right; color: #aabbd0; background: transparent; }
.nav button:hover, .nav button.active { color: #fff; background: rgba(255,255,255,.1); }
.nav .nav-icon { width: 20px; color: #dca34a; text-align: center; font-size: 16px; }
.side-footer { position: absolute; right: 16px; bottom: 18px; left: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); color: #91a5be; font-size: 11px; }
.side-footer strong { display: block; margin-bottom: 4px; color: #fff; font-size: 12px; }
.main { direction: rtl; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px clamp(18px, 4vw, 52px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); }
.topbar h1 { margin: 0; font-size: 22px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.mobile-menu { display: none; }
.content { padding: 30px clamp(18px, 4vw, 52px) 52px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { position: relative; overflow: hidden; padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 5px 15px rgba(20,42,76,.03); }
.stat:after { content: ""; position: absolute; left: -20px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: rgba(216,155,50,.08); }
.stat .label { color: var(--muted); font-size: 12px; }
.stat strong { display: block; margin-top: 12px; font-size: 25px; }
.stat small { display: block; margin-top: 5px; color: var(--green); font-size: 11px; }
.grid-2 { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 5px 15px rgba(20,42,76,.03); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 14px; }
.panel-body { padding: 18px 20px; }
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pipeline-col { min-height: 190px; padding: 10px; border-radius: 10px; background: #f8fafc; }
.pipeline-col h4 { margin: 0 0 11px; color: #53647a; font-size: 11px; }
.pipeline-count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-right: 4px; border-radius: 50%; color: #345073; background: #e8eef7; }
.lead-card { margin-bottom: 7px; padding: 10px; border: 1px solid #e5eaf1; border-radius: 8px; background: #fff; }
.lead-card strong { display: block; font-size: 11px; }
.lead-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { padding: 13px 16px; border-bottom: 1px solid #edf0f4; text-align: right; font-size: 12px; vertical-align: middle; }
th { color: var(--muted); font-size: 11px; font-weight: 600; background: #fbfcfd; }
tr:last-child td { border-bottom: 0; }
.person { display: flex; align-items: center; gap: 9px; }
.avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: #fff; font-size: 11px; background: #3970b7; }
.person strong { display: block; font-size: 12px; }
.person small { color: var(--muted); font-size: 10px; }
.badge { display: inline-flex; align-items: center; border-radius: 20px; padding: 5px 9px; color: #35536f; background: #edf3fa; font-size: 10px; white-space: nowrap; }
.badge.green { color: #08704c; background: #e6f6ef; }
.badge.gold { color: #805713; background: #fff4da; }
.badge.red { color: #9c3131; background: #fdeaea; }
.row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.mini { min-height: 29px; padding: 0 9px; border-radius: 7px; font-size: 14px; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid .wide { grid-column: span 2; }
.form-actions { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; }
.notice { margin-bottom: 18px; padding: 13px 15px; border-right: 3px solid var(--gold); border-radius: 8px; color: #68511c; background: #fff8e8; font-size: 12px; line-height: 1.8; }
.loading { display: grid; place-items: center; min-height: 300px; color: var(--muted); }
.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(12, 29, 51, .62); backdrop-filter: blur(4px); }
.modal { width: min(720px, 100%); max-height: min(90vh, 760px); overflow-x: hidden; overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.22); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close { width: 32px; height: 32px; border: 0; border-radius: 8px; color: var(--muted); background: #f0f3f7; font-size: 20px; }
.modal-body { padding: 22px; }
.modal-body .form-grid { grid-template-columns: repeat(2, 1fr); }
.modal-body .form-actions { justify-content: flex-start; }
.create-panel > form, .panel:has(> form#course-form), .panel:has(> form#campaign-form), .panel:has(> form#user-form), .panel:has(> form#complement-form), .panel:has(> form#lost-reason-form), #lead-form:not(.modal-body), #payment-form:not(.modal-body), #activity-form:not(.modal-body), #lost-reason-form:not(.modal-body) { display: none; }
.modal-help { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.spinner { display: inline-block; width: 22px; height: 22px; margin-left: 8px; border: 2px solid #dce5f2; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .login-page { display: block; }
  .login-art { min-height: 220px; padding: 34px 26px; }
  .brand-mark { top: 23px; right: 26px; }
  .art-copy h1 { margin-bottom: 8px; font-size: 30px; }
  .art-copy p { font-size: 12px; }
  .login-panel { min-height: calc(100vh - 220px); padding: 30px 22px; }
  .app { display: block; }
  .sidebar { position: fixed; z-index: 10; right: 0; width: 250px; transform: translateX(100%); transition: transform .2s; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 16px 18px; }
  .topbar h1 { font-size: 18px; }
  .top-actions .button:not(.mobile-menu) { display: none; }
  .content { padding: 22px 15px 38px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .stats { gap: 9px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 20px; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .modal-body .form-grid { grid-template-columns: 1fr; }
}

/* Reference-console visual language */
.target-app { min-height: 100vh; display: block; direction: rtl; background: #f7f9fc; color: #111827; overflow-x: hidden; }
.sidebar-overlay { display: none; }
.target-sidebar { position: fixed; top: 0; right: 0; width: 252px; height: 100vh; z-index: 10; box-sizing: border-box; padding: 18px 14px; background: #fff; border-left: 1px solid #e3e8f0; color: #18253a; }
.brand-row { display: flex; align-items: center; gap: 10px; padding: 2px 8px 20px; border-bottom: 1px solid #edf1f6; }
.brand-row strong { display: block; font-size: 18px; }
.brand-row small { display: block; margin-top: 3px; color: #2681e9; font-size: 10px; }
.quick-course { display: block; width: 100%; margin: 18px 0 10px; padding: 12px; border: 1px solid #91caff; border-radius: 11px; color: #0782db; background: #f2faff; font-weight: 700; }
.target-nav { display: grid; gap: 3px; }
.target-nav button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; border: 0; border-radius: 10px; padding: 8px 12px; color: #253247; background: transparent; text-align: right; font-size: 14px; }
.target-nav button span { width: 20px; color: #44789a; text-align: center; font-size: 17px; }
.target-nav button b { min-width: 18px; margin-right: auto; border-radius: 6px; color: #3c65b4; background: #eef3fb; text-align: center; font-size: 10px; }
.target-nav button:hover, .target-nav button.active { color: #087eda; background: #eaf7ff; box-shadow: inset -3px 0 #0790df; }
.target-main { width: auto; min-width: 0; margin-right: 252px; direction: rtl; }
.target-topbar { height: 64px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding: 0 28px; border-bottom: 1px solid #e8edf3; background: #fff; }
.global-search { width: min(460px, 100%); justify-self: center; border: 1px solid #e3e9f1; border-radius: 12px; padding: 10px 15px; color: #9aa5b5; background: #f7f9fc; font-size: 14px; line-height: 24px; }.global-search span { float: left; font-size: 18px; color: #7992b1; }
.top-user { display: flex; align-items: center; justify-self: start; gap: 9px; font-size: 12px; }.top-user small { color: #8793a3; font-size: 10px; }.user-menu { position: relative; }.user-menu-trigger { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid #dce5f0; border-radius: 9px; color: #18253a; background: #fff; font-weight: 600; }.user-menu-trigger small { font-weight: 400; }.user-menu-dropdown { position: absolute; z-index: 25; top: calc(100% + 5px); right: 0; display: none; min-width: 170px; padding: 6px; border: 1px solid #e0e7f0; border-radius: 10px; background: #fff; box-shadow: 0 10px 25px rgba(28,54,84,.12); }.user-menu:hover .user-menu-dropdown, .user-menu:focus-within .user-menu-dropdown { display: grid; }.user-menu-dropdown button { border: 0; border-radius: 7px; padding: 10px; color: #253247; background: transparent; text-align: right; font-size: 11px; }.user-menu-dropdown button:hover { color: #087eda; background: #eaf7ff; }
.target-content { padding: 26px 32px 55px; }.page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }.page-title-row h1 { margin: 0; font-size: 22px; }.page-title-row p { margin: 7px 0 0; color: #788698; font-size: 12px; }.toolbar { display: flex; gap: 8px; align-items: center; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 24px; }.metric-grid.three { grid-template-columns: repeat(3, 1fr); }.metric-card { position: relative; overflow: hidden; min-height: 125px; border: 1px solid #e1e8f1; border-radius: 14px; padding: 17px 20px; background: #fff; box-shadow: 0 4px 13px rgba(28,54,84,.035); }.metric-card:after { content: ''; position: absolute; left: -28px; bottom: -35px; width: 105px; height: 105px; border-radius: 50%; background: #f5f8ff; }.metric-head { display: flex; justify-content: space-between; color: #6e7c90; font-size: 14px; }.metric-head span { color: #348df2; font-size: 18px; }.metric-card strong { display: block; margin-top: 17px; font-size: 25px; }.metric-card small { display: block; margin-top: 8px; color: #159060; font-size: 12px; }.metric-card.purple strong { color: #5640f5; }.metric-card.gold strong { color: #111; }.metric-card.green strong { color: #0a9b69; }
.dashboard-page { display: grid; gap: 0; }.dashboard-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }.dashboard-controls { margin: 18px 0 0; }.dashboard-controls-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 20px 0; }.dashboard-controls-head h2 { margin: 0; font-size: 15px; }.dashboard-controls-head p { margin: 5px 0 0; color: #7e8a9b; font-size: 11px; }.dashboard-data-basis { color: #7a8798; font-size: 10px; }.dashboard-periods { display: flex; flex-wrap: wrap; gap: 6px; padding: 15px 20px 0; }.dashboard-filter-selects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 10px; padding: 15px 20px 18px; }.dashboard-filter-selects label { display: grid; gap: 6px; color: #68788d; font-size: 11px; font-weight: 600; }.dashboard-filter-selects select { width: 100%; }.dashboard-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 20px; }.dashboard-action-grid .target-panel { min-width: 0; margin: 0; }.dashboard-queue-panel .panel-title { min-height: 76px; }.dashboard-queue-panel .panel-title h2 { display: flex; align-items: center; gap: 7px; }.dashboard-count { display: inline-grid; place-items: center; min-width: 24px; height: 21px; border-radius: 99px; padding: 0 6px; color: #4c5fd2; background: #eef2ff; font-size: 10px; }.dashboard-queue-list { display: grid; gap: 7px; padding: 12px; }.dashboard-queue-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; border: 1px solid #e2e9f1; border-radius: 9px; padding: 9px 10px; color: inherit; background: #fff; text-align: right; cursor: pointer; }.dashboard-queue-row:hover { border-color: #7d9bea; background: #f7f9ff; }.dashboard-queue-row > span { min-width: 0; }.dashboard-queue-row b, .dashboard-queue-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.dashboard-queue-row b { color: #263852; font-size: 11px; }.dashboard-queue-row small { margin-top: 4px; color: #7b899a; font-size: 9px; }.dashboard-queue-row strong { flex: 0 0 auto; color: #5062c9; font-size: 10px; }.dashboard-queue-row.overdue { border-right: 3px solid #c44747; }.dashboard-queue-row.overdue strong { color: #c44747; }.dashboard-more-action { margin: 0 12px 12px; }.dashboard-funnel { margin-bottom: 18px; }.dashboard-clickable-row { cursor: pointer; }.dashboard-clickable-row:hover { background: #f7f9ff; }.dashboard-team .target-table { min-width: 620px; }.dashboard-consistency { min-width: 0; }.dashboard-consistency-list { display: grid; gap: 0; padding: 8px 20px 15px; }.dashboard-consistency-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf1f6; color: #52647c; font-size: 11px; }.dashboard-consistency-row:last-child { border-bottom: 0; }.dashboard-basis-note { padding: 20px; color: #607188; font-size: 12px; line-height: 2; }
.target-panel { margin-bottom: 20px; border: 1px solid #e1e8f1; border-radius: 14px; background: #fff; box-shadow: 0 4px 13px rgba(28,54,84,.035); }.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 21px; border-bottom: 1px solid #edf1f6; }.panel-title h2 { margin: 0; font-size: 16px; }.panel-title h2 small { color: #7b8797; font-size: 10px; }.panel-title p, .panel-title span { margin: 5px 0 0; color: #7e8a9b; font-size: 11px; }.target-panel > .panel-body, .target-panel .panel-body { padding: 20px; }
.alert-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; padding: 14px 17px; border: 1px solid #ffd77d; border-radius: 13px; color: #6e4c04; background: #fff9e6; }.alert-banner > span { font-size: 22px; }.alert-banner div { flex: 1; }.alert-banner b, .alert-banner small { display: block; }.alert-banner small { margin-top: 5px; font-size: 11px; }
.funnel-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 20px; }.funnel-card { min-height: 112px; border: 1px solid #e2e8ef; border-top: 3px solid #3684ef; border-radius: 12px; padding: 15px; background: #fbfcfe; cursor: pointer; }.funnel-card.trust { border-top-color: #694cf2; }.funnel-card.target { border-top-color: #ab3bed; }.funnel-card.payment { border-top-color: #fa9b0d; }.funnel-card.won { border-top-color: #08ab7d; }.funnel-card div { display: flex; justify-content: space-between; }.funnel-card small { font-weight: 700; }.funnel-card b { font-size: 23px; }.funnel-card span { display: block; margin-top: 22px; color: #5061df; font-size: 10px; }
.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; padding: 20px; }.rule-grid div { display: flex; flex-direction: column; gap: 6px; padding: 17px; border-radius: 11px; background: #f7f9fd; }.rule-grid b { color: #7057f6; font-size: 14px; }.rule-grid strong { font-size: 26px; }.rule-grid small { color: #7b8796; font-size: 12px;}
.dashboard-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.dashboard-columns .target-panel { min-width: 0; }.agent-row, .campaign-row { display: flex; align-items: center; gap: 10px; margin: 10px 15px; padding: 11px; border: 1px solid #ebeff5; border-radius: 9px; }.agent-row div, .campaign-row { flex: 1; }.agent-row small, .campaign-row small { display: block; color: #8b96a5; font-size: 12px; }.agent-row strong, .campaign-row strong { color: #0b9a6d; font-size: 11px; }.campaign-row b { display: block; font-size: 14px; }
.table-panel { overflow: hidden; }.table-head, .filter-bar { display: flex; align-items: center; gap: 10px; padding: 15px 20px; }.table-head { justify-content: space-between; border-bottom: 1px solid #edf1f6; }.filter-bar { margin-bottom: 14px; border: 1px solid #e5ebf2; border-radius: 12px; background: #fff; }.filter-bar > * { flex: 1; }.table-scroll { overflow-x: auto; }.target-table { width: 100%; min-width: 870px; border-collapse: collapse; }.target-table th, .target-table td { padding: 14px 17px; border-bottom: 1px solid #edf1f5; text-align: right; vertical-align: middle; font-size: 14px; }.target-table th { color: #708096; background: #fbfcfe; font-weight: 700; }.target-table td small { display: block; margin-top: 5px; color: #8591a1; font-size: 12px;}.target-table tr:hover { background: #fcfdff; }.person-cell { display: inline-flex; align-items: center; gap: 9px; border: 0; padding: 0; color: inherit; background: transparent; text-align: right; }.person-cell b, .person-cell small { display: block; font-size: 14px;}.person-cell small { color: #8a96a5; font-size: 10px; }.overdue { color: #ec3b5b; font-weight: 700; }.success-text { color: #08966c !important; }.mono { direction: ltr; text-align: left; font-family: Consolas, monospace; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 310px; }.row-actions .button { white-space: nowrap; }
.role-permission-list { display: grid; gap: 9px; min-width: 390px; }.role-permission-group { display: grid; gap: 5px; }.role-permission-group > b { color: #52657d; font-size: 11px; }.role-permission-group > div { display: flex; flex-wrap: wrap; gap: 5px; }.role-permission-chip { display: inline-flex; border: 1px solid #d8e5f3; border-radius: 999px; padding: 4px 8px; color: #315d91; background: #f4f8fd; font-size: 11px; line-height: 1.4; }.role-permission-chip.legacy { color: #836018; border-color: #f0dca8; background: #fff9e8; }
.spotplayer-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px 20px; border-top: 1px solid #edf1f6; color: #708096; }.spotplayer-pagination .button:disabled { opacity: .45; cursor: not-allowed; }.spotplayer-pagination + * { margin-top: 0; }
.tag { display: inline-flex; align-items: center; width: max-content; border-radius: 6px; padding: 4px 8px; color: #5065c8; background: #eef2ff; font-size: 10px; }.tag.success { color: #078b62; background: #e6faf2; }.tag.warning { color: #a76d00; background: #fff5d9; }.tag.danger { color: #d83856; background: #ffedf0; }.tag.purple { color: #7939dc; background: #f4edff; }.tag.info { color: #0874ca; background: #eaf6ff; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(215px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 15px; }.kanban-column { min-height: 620px; padding: 11px; border-radius: 13px; background: #f3f7fb; border-top: 4px solid #347ee9; }.kanban-column.trust { border-top-color: #684df4; }.kanban-column.target { border-top-color: #a33be8; }.kanban-column.payment { border-top-color: #f49a0c; }.kanban-column header { display: flex; justify-content: space-between; padding: 5px 4px 12px; font-size: 14px; font-weight: bold; }.kanban-column header b { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 8px; color: #5870b2; background: #e3eaf6; }.kanban-empty { display: grid; place-items: center; min-height: 180px; border: 1px dashed #ccd7e5; border-radius: 11px; color: #9aa7b7; font-size: 11px; }.kanban-card { margin-bottom: 11px; padding: 13px; border: 1px solid #e1e8f0; border-radius: 11px; background: #fff; box-shadow: 0 3px 10px rgba(24,49,78,.05); cursor: grab; }.kanban-card .card-top { display: flex; justify-content: space-between; align-items: center; }.kanban-card .card-top span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #fff; background: #4978e8; font-size: 9px; }.kanban-card > small, .kanban-card > em { display: block; margin-top: 7px; color: #778597; font-size: 14px; font-style: normal; }.course-chip { display: block; margin-top: 9px; border: 1px solid #dbe4ff; border-radius: 5px; padding: 5px; color: #4e62d6; background: #f4f6ff; font-size: 10px; }.kanban-card footer { display: flex; justify-content: space-between; gap: 4px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #edf1f6; }.kanban-card footer button { border: 0; color: #445bdd; background: none; font-size: 12px; font-weight: bold;}
.course-grid, .campaign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }.course-card, .campaign-card { border: 1px solid #e1e8f1; border-radius: 15px; padding: 18px; background: #fff; box-shadow: 0 4px 13px rgba(28,54,84,.035); }.course-card header, .campaign-card header, .course-card footer, .campaign-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.course-card header button { border: 0; color: #8390a0; background: none; }.course-card h2, .campaign-card h2 { min-height: 43px; margin: 17px 0 9px; font-size: 15px; }.course-card p, .campaign-card p { min-height: 36px; color: #738093; font-size: 11px; line-height: 1.8; }.course-price { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 13px; border-radius: 10px; background: #f5f8fb; }.course-price strong { color: #14244e; font-size: 17px; }.course-price small { color: #7d8999; }.course-terms { display: grid; gap: 5px; padding: 15px 0; font-size: 14px; }.course-terms b { color: #d87819; }.complement-alert { margin: 8px 0 18px; padding: 11px; border: 1px solid #ead6ff; border-radius: 10px; color: #7d3bd3; background: #fbf5ff; font-size: 12px; }.course-card footer, .campaign-card footer { padding-top: 12px; border-top: 1px solid #edf1f5; color: #758296; font-size: 10px; }.campaign-card { min-height: 240px; }.campaign-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 15px 0; }.campaign-stats div { padding: 11px; border-radius: 8px; background: #f7f9fc; }.campaign-stats small, .campaign-stats b { display: block; }.campaign-stats small { color: #7c899a; }.campaign-stats b { margin-top: 7px; color: #07956b; }
.report-tabs, .filter-pills { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid #e1e8f0; border-radius: 12px; background: #fff; }.report-tabs button, .filter-pills button { flex: 1; border: 0; border-radius: 9px; padding: 10px; color: #5f6d80; background: transparent; font-size: 14px; }.report-tabs button.active, .filter-pills button.active { color: #fff; background: #5142ef; }.role-help { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }.role-help div { padding: 16px; border: 1px solid #dce6ff; border-radius: 12px; background: #f3f6ff; }.role-help b, .role-help small { display: block; }.role-help small { margin-top: 8px; color: #6e7b90; font-size: 10px; line-height: 1.8; }.permission-table th, .permission-table td { text-align: center; }.permission-table td:first-child, .permission-table th:first-child { min-width: 245px; text-align: right; }.permission-table td small { display: block; color: #6257e9; font-size: 9px; }
.info-strip, .code-box { padding: 14px 18px; color: #0872c3; background: #edf8ff; font-size: 11px; display: none; }.code-box { display: flex; align-items: center; justify-content: space-between; margin: 17px; border: 1px solid #d6ebfa; border-radius: 8px; direction: ltr; font-family: Consolas, monospace; }.code-box button { border: 0; border-radius: 6px; padding: 7px 10px; color: #fff; background: #5239ee; }.distribution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px; }.distribution-grid button { min-height: 76px; border: 1px solid #dbe5f1; border-radius: 10px; color: #29354a; background: #fff; font-weight: 700; }.distribution-grid button.selected { border-color: #6651ef; box-shadow: 0 0 0 2px #e7e3ff; }.distribution-grid small { display: block; margin-top: 8px; color: #8490a0; font-weight: 400; }.range-row { margin: 0 18px 18px; padding: 15px; border-radius: 10px; background: #f6f8fc; }.range-row input { padding: 0; accent-color: #553ef1; }.agent-capacity { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin: 12px 18px; padding: 12px; border: 1px solid #ebeff5; border-radius: 9px; }.agent-capacity small { display: block; color: #8090a3; }.agent-capacity progress { grid-column: 1 / -1; width: 100%; height: 7px; accent-color: #5a4af0; }.empty { padding: 38px; color: #8592a3; text-align: center; font-size: 12px; }.link { border: 0; color: #4d55dc; background: none; font-size: 11px; }
.drawer-backdrop { position: fixed; z-index: 30; inset: 0; background: rgba(24,35,57,.48); backdrop-filter: blur(3px); }.lead-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(670px, 100%); overflow-y: auto; background: #fff; box-shadow: -10px 0 35px rgba(0,0,0,.18); }.lead-drawer > header { display: flex; align-items: center; gap: 12px; padding: 20px; border-bottom: 1px solid #e5eaf1; }.lead-drawer > header div { flex: 1; }.lead-drawer header b, .lead-drawer header small { display: block; }.lead-drawer header button:first-child { border: 0; color: #8995a5; background: none; font-size: 22px; }.drawer-tabs { display: flex; gap: 18px; overflow-x: auto; padding: 13px 18px; border-bottom: 1px solid #e6ebf1; white-space: nowrap; color: #68788d; font-size: 11px; }.drawer-tabs .active { color: #4a36ee; border-bottom: 2px solid #4a36ee; padding-bottom: 11px; }.drawer-body { padding: 20px; }.lead-owner { display: flex; align-items: center; justify-content: space-between; padding: 15px; border: 1px solid #e1e8f0; border-radius: 12px; }.lead-owner small, .lead-owner b { display: block; }.drawer-card, .drawer-status { margin-top: 16px; padding: 17px; border: 1px solid #e1e8f0; border-radius: 12px; }.drawer-card h3 { color: #4e3bdb; }.drawer-card select { margin-top: 12px; }.drawer-status.purple { color: #6c2bcc; background: #fbf2ff; border-color: #e9ccff; }.drawer-status.danger { color: #e02748; background: #fff1f3; border-color: #ffcbd4; }
.drawer-tabs button { border: 0; padding: 0 0 11px; color: inherit; background: transparent; white-space: nowrap; font-size: inherit; }.drawer-tabs button.active { color: #4a36ee; border-bottom: 2px solid #4a36ee; font-weight: 700; }.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.workspace-activity { margin-top: 12px; padding: 12px; border: 1px solid #edf1f5; border-radius: 9px; background: #fbfcfe; }.workspace-activity b, .workspace-activity small { display: block; }.workspace-activity small { color: #8390a0; font-size: 10px; }.workspace-activity p { margin: 7px 0 0; color: #536276; font-size: 11px; }.payment-lead-picker { position: relative; }.payment-lead-results { display: grid; gap: 5px; max-height: 180px; overflow-y: auto; margin-top: 5px; padding: 5px; border: 1px solid #e1e8f0; border-radius: 9px; background: #fff; }.payment-lead-option { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 1px solid #e1e8f0; border-radius: 8px; padding: 9px 10px; color: var(--ink); background: #fbfcfe; text-align: right; }.payment-lead-option:hover { border-color: #6b9bf2; background: #f3f7ff; }.payment-lead-option small { margin-top: 3px; color: var(--muted); font-size: 10px; }.payment-lead-empty { padding: 8px; color: var(--muted); font-size: 11px; }.modal .button { min-height: 40px; padding: 9px 16px; }.modal-body .form-actions { grid-column: 1 / -1; justify-content: flex-start; }.modal-body .form-actions .button { min-width: 120px; }
.modal-body .field:has([data-payment-amount]) { grid-column: 1 / -1; }
.permission-groups { display: grid; gap: 18px; }
.permission-group { margin: 0; border: 1px solid #e2e8f0; border-radius: 12px; background: #fbfcfe; overflow: hidden; }
.permission-group h4 { margin: 0; padding: 12px 14px; border-bottom: 1px solid #e5ebf2; color: #243b63; background: #f3f6fb; font-size: 13px; }
.permission-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.permission-card { display: flex; align-items: center; gap: 10px; min-height: 58px; margin: 0; border: 1px solid #dfe7f0; border-radius: 10px; padding: 10px 12px; color: #26364f; background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.permission-card:hover { border-color: #8aaaf1; background: #f8fbff; }
.permission-card input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: #4d55dc; cursor: pointer; }
.permission-card span { display: grid; gap: 3px; min-width: 0; }
.permission-card b { font-size: 12px; line-height: 1.5; }
.permission-card small { direction: ltr; color: #7c8ba0; font: 10px/1.4 Consolas, monospace; text-align: right; }
.permission-card:has(input:checked) { border-color: #6478e8; background: #f1f3ff; box-shadow: 0 0 0 2px #e5e8ff; }
.permission-card:has(input:checked) b { color: #3d45b7; }
.jalali-picker { position: relative; display: flex; align-items: stretch; gap: 6px; }
.jalali-picker > input { flex: 1; }
.jalali-picker-button { flex: 0 0 42px; border: 1px solid #dce3ec; border-radius: 9px; color: #4056c8; background: #f4f6ff; cursor: pointer; }
.jalali-calendar { position: absolute; z-index: 50; top: calc(100% + 6px); right: 0; width: 270px; padding: 10px; border: 1px solid #dbe4ef; border-radius: 12px; background: #fff; box-shadow: 0 18px 40px rgba(24, 49, 78, .18); }
.jalali-calendar header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: #263b69; }
.jalali-calendar header b { font-size: 12px; }
.jalali-calendar header button { width: 28px; height: 28px; border: 0; border-radius: 7px; color: #4056c8; background: #f1f4ff; font-size: 20px; line-height: 1; }
.jalali-weekdays, .jalali-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.jalali-weekdays { margin-bottom: 4px; color: #8491a3; font-size: 10px; }
.jalali-days button, .jalali-day-empty { min-height: 29px; border: 0; border-radius: 7px; background: transparent; font-size: 11px; }
.jalali-days button { color: #26364f; cursor: pointer; }
.jalali-days button:hover { color: #fff; background: #4d55dc; }
.jalali-days button.jalali-today { border: 2px solid #d99a2b; color: #9a6100; font-weight: 800; }.jalali-days button.jalali-selected { color: #fff; background: #4d55dc; }
.course-picker-field { grid-column: 1 / -1; }
.course-picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 8px; }
.course-picker-card { display: flex; align-items: center; gap: 9px; min-height: 52px; border: 1px solid #dfe7f0; border-radius: 10px; padding: 9px 11px; background: #fff; cursor: pointer; }
.course-picker-card:hover { border-color: #8aaaf1; background: #f8fbff; }
.course-picker-card > input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: #4d55dc; }
.course-picker-card span { display: grid; gap: 3px; min-width: 0; }.course-picker-card b { font-size: 12px; line-height: 1.5; }.course-picker-card small { color: #7c8ba0; font-size: 10px; }
.course-picker-card span input[data-campaign-price] { width: 100%; min-height: 34px; margin-top: 4px; padding: 6px 8px; border: 1px solid #d8e1ed; border-radius: 7px; font-size: 12px; box-sizing: border-box; }
.course-picker-empty { margin-top: 8px; border: 1px dashed #e2a0a0; border-radius: 9px; padding: 12px; color: #a03e3e; background: #fff7f7; font-size: 12px; }
.course-picker-card:has(input:checked) { border-color: #6478e8; background: #f1f3ff; box-shadow: 0 0 0 2px #e5e8ff; }
.check-field { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; border: 1px solid #dfe7f0; border-radius: 10px; padding: 10px 12px; color: #26364f; background: #fff; cursor: pointer; }
.check-field:hover { border-color: #8aaaf1; background: #f8fbff; }.check-field input { width: 18px; height: 18px; margin: 0; accent-color: #4d55dc; cursor: pointer; }.check-field:has(input:checked) { border-color: #6478e8; background: #f1f3ff; box-shadow: 0 0 0 2px #e5e8ff; }
.report-filters { margin-bottom: 18px; }.report-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 10px; padding: 18px 20px; }.report-filter-grid label { display: grid; gap: 6px; color: #68788d; font-size: 11px; font-weight: 600; }.report-filter-grid .button { align-self: end; }.report-definitions { overflow: hidden; }.definition-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px 20px; }.definition-grid details { border: 1px solid #e5ebf2; border-radius: 9px; padding: 10px 12px; background: #fbfcfe; }.definition-grid summary { cursor: pointer; color: #3f50bf; font-size: 12px; font-weight: 700; }.definition-grid p { color: #5f6e82; font-size: 11px; line-height: 1.9; }.definition-grid small { color: #8793a3; font-size: 10px; line-height: 1.8; }.report-summary-list { display: grid; gap: 4px; padding: 18px 20px; color: #59697d; font-size: 13px; }.report-summary-list p { margin: 0; }.report-summary-list b { color: #17294a; }.financial-notice { margin: 16px; }.metric-card.warning strong { color: #a66b00; }.metric-card.danger strong { color: #ce3d55; }
.integration-note { margin: 0 18px 18px; color: #64748b; font-size: 11px; line-height: 1.9; }.integration-note code, .integration-guide code { direction: ltr; unicode-bidi: plaintext; border-radius: 4px; padding: 2px 5px; color: #4d3bdc; background: #f0edff; font-family: Consolas, monospace; }.integration-rules { display: grid; gap: 10px; margin: 0; padding: 18px 38px 20px 20px; color: #536276; font-size: 11px; line-height: 1.9; }.integration-rules li::marker { color: #5b45ee; font-weight: 700; }.integration-guide { overflow: hidden; }.integration-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; padding: 20px; color: #536276; font-size: 11px; line-height: 2; }.integration-columns ul, .integration-columns ol { margin: 8px 0 0; padding-right: 20px; }.integration-columns p { margin: 8px 0 0; }.integration-code { margin: 8px 0 0; overflow-x: auto; border: 1px solid #dce7f2; border-radius: 9px; padding: 13px; direction: ltr; text-align: left; color: #19416a; background: #f5f9fd; font: 11px/1.8 Consolas, monospace; white-space: pre-wrap; }.integration-guide .panel-title p { max-width: 700px; }
@media (max-width: 1000px) { .metric-grid, .course-grid, .campaign-grid { grid-template-columns: repeat(2, 1fr); }.funnel-grid { grid-template-columns: repeat(3, 1fr); }.dashboard-columns { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .target-app { display: block; }.target-sidebar { right: 0; width: 250px; transform: translateX(100%); transition: transform .2s; }.target-sidebar.open { transform: translateX(0); }.sidebar-overlay { display: block; position: fixed; z-index: 9; inset: 0; border: 0; background: rgba(15, 31, 55, .32); }.target-main { width: 100%; margin-right: 0; }.target-topbar { grid-template-columns: auto 1fr; height: auto; gap: 10px; padding: 12px 18px; }.global-search { order: 3; width: 100%; grid-column: 1 / -1; }.target-content { padding: 18px 13px 35px; }.metric-grid, .metric-grid.three, .course-grid, .campaign-grid, .rule-grid, .role-help, .distribution-grid { grid-template-columns: 1fr; }.funnel-grid { grid-template-columns: repeat(2, 1fr); padding: 12px; }.page-title-row { align-items: flex-start; flex-direction: column; }.dashboard-columns { grid-template-columns: 1fr; }.target-nav { max-height: calc(100vh - 180px); overflow-y: auto; } }
@media (max-width: 720px) { .integration-columns { grid-template-columns: 1fr; gap: 10px; } .integration-rules { padding-right: 30px; } .report-filter-grid, .definition-grid { grid-template-columns: 1fr; } .permission-card-grid, .course-picker-grid { grid-template-columns: 1fr; } .jalali-calendar { right: auto; left: 0; width: min(270px, calc(100vw - 44px)); } }

.pipeline-calendar { margin-top: 18px; }
.calendar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 18px; }
.calendar-day { min-height: 120px; border: 1px solid #e1e8f0; border-radius: 10px; padding: 10px; background: #fbfdff; }
.calendar-day header { display: flex; justify-content: space-between; margin-bottom: 8px; color: #45617d; font-size: 12px; }
.calendar-day header span { display: grid; place-items: center; min-width: 21px; height: 21px; border-radius: 50%; color: #fff; background: #4978e8; }
.calendar-item { display: grid; gap: 2px; margin-top: 6px; border-right: 3px solid #6a4df5; border-radius: 5px; padding: 6px 8px; background: #f1f4ff; font-size: 11px; }
.calendar-item b, .calendar-item small { color: #64748b; font-size: 10px; }
.followup-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px; }
.followup-columns h3 { margin: 0 0 8px; color: #44566d; font-size: 13px; }
.followup-row { display: flex; flex-direction: column; align-items: flex-start; width: 100%; margin-bottom: 6px; border: 1px solid #e1e8f0; border-radius: 8px; padding: 8px 10px; color: inherit; background: #fff; text-align: right; }
.followup-row:hover { border-color: #6b9bf2; background: #f3f7ff; }
.followup-row small { margin-top: 3px; color: #778597; font-size: 10px; }
.followup-row.overdue { border-right: 3px solid #e05252; }
.overdue-text { color: #c53e3e !important; }
.modal-wide { max-width: 980px !important; }
.modal-wide > .target-panel { margin: 0 20px 20px; }
.modal-body#pipeline-stage-form { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; }
#pipeline-stage-form .field { grid-column: span 3; align-content: start; align-self: start; }
#pipeline-stage-form .field input, #pipeline-stage-form .field select { min-height: 46px; }
#pipeline-stage-form .field small { min-height: 34px; line-height: 1.8; }
#pipeline-stage-form > .check-field { grid-column: span 2; align-self: start; }
#pipeline-stage-form > .form-actions { grid-column: 1 / -1; align-items: center; flex-wrap: wrap; }
.pipeline-stage-help { grid-column: 1 / -1; margin: -4px 0 2px; color: #637388; font-size: 12px; line-height: 1.9; }
.pipeline-stage-help strong { color: #263b69; }
.pipeline-stage-list { margin: 0 20px 20px; border: 1px solid #e1e8f1; border-radius: 12px; overflow: hidden; }
.pipeline-stage-list-head, .pipeline-stage-list-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 55px 70px 70px minmax(0, 1.4fr); gap: 10px; align-items: center; padding: 12px 14px; }
.pipeline-stage-list-head { color: #708096; background: #fbfcfe; font-size: 11px; font-weight: 700; }
.pipeline-stage-list-row { border-top: 1px solid #edf1f5; color: #26364f; font-size: 12px; }
.pipeline-stage-list-row > * { min-width: 0; }
.pipeline-stage-list-row .stage-id { direction: ltr; overflow: hidden; text-overflow: ellipsis; font-family: Consolas, monospace; text-align: right; }
.pipeline-stage-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.pipeline-stage-actions .button { white-space: nowrap; }
.kanban-card small { line-height: 1.6; }
@media (max-width: 720px) { .followup-columns { grid-template-columns: 1fr; } .calendar-grid { grid-template-columns: 1fr; } }

@media (max-width: 1200px) {
  .dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .dashboard-metrics, .dashboard-action-grid { grid-template-columns: 1fr; }
  .dashboard-controls-head { align-items: flex-start; flex-direction: column; padding: 15px 15px 0; }
  .dashboard-periods, .dashboard-filter-selects { padding-left: 15px; padding-right: 15px; }
  .dashboard-filter-selects { grid-template-columns: 1fr; }
  .dashboard-data-basis { line-height: 1.8; }
}

/* Pipeline board: keep every stage in one horizontal track and scroll leads per stage. */
.kanban {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 3px 16px;
  scrollbar-color: #b9c8dc #edf2f8;
  scrollbar-width: thin;
}
.kanban-column {
  flex: 0 0 clamp(235px, 18vw, 310px);
  width: clamp(235px, 18vw, 310px);
  height: min(680px, calc(100vh - 245px));
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #b9c8dc transparent;
  scrollbar-width: thin;
}
.kanban-column header {
  position: sticky;
  z-index: 1;
  top: -11px;
  margin: -11px -11px 12px;
  padding: 16px 15px 12px;
  background: #f3f7fb;
}
.kanban-column::-webkit-scrollbar, .kanban::-webkit-scrollbar { width: 7px; height: 7px; }
.kanban-column::-webkit-scrollbar-thumb, .kanban::-webkit-scrollbar-thumb { border-radius: 99px; background: #b9c8dc; }

/* Pipeline controls use a compact control bar instead of generic buttons. */
.pipeline-toolbar {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px;
  border: 1px solid #e0e7f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(28, 54, 84, .05);
}
.pipeline-toolbar [data-pipeline-mode] {
  min-height: 38px;
  border: 1px solid #e0e7f1;
  color: #607089;
  background: #f7f9fc;
  font-size: 12px;
}
.pipeline-toolbar [data-pipeline-mode]:hover {
  color: #4054c9;
  border-color: #b9c8ff;
  background: #f2f4ff;
}
.pipeline-toolbar [data-pipeline-mode].active {
  color: #fff;
  border-color: #5142ef;
  background: linear-gradient(135deg, #5142ef, #7160f4);
  box-shadow: 0 5px 12px rgba(81, 66, 239, .2);
}
.pipeline-toolbar [data-modal="pipeline-stage"] {
  min-height: 38px;
  border: 1px solid #e5b85c;
  color: #51370b;
  background: linear-gradient(135deg, #f8d17c, #edb54f);
  box-shadow: 0 5px 12px rgba(216, 155, 50, .18);
}
.pipeline-toolbar [data-modal="pipeline-stage"]:hover {
  filter: brightness(.98);
  box-shadow: 0 7px 15px rgba(216, 155, 50, .25);
}
.pipeline-toolbar select {
  width: auto;
  min-width: 165px;
  min-height: 38px;
  border-color: #e0e7f1;
  border-radius: 9px;
  color: #40516b;
  background-color: #fbfcfe;
  font-size: 11px;
}
.stage-change-context {
  display: grid;
  gap: 5px;
  border: 1px solid #dfe5ff;
  border-right: 4px solid #5142ef;
  border-radius: 10px;
  padding: 13px 15px;
  color: #263852;
  background: #f5f6ff;
}
.stage-change-context b { font-size: 14px; }
.stage-change-context span { color: #5142ef; font-size: 12px; font-weight: 700; }
.stage-change-context small { color: #718096; font-size: 11px; }

@media (max-width: 720px) {
  .pipeline-toolbar { width: 100%; }
  .pipeline-toolbar [data-pipeline-mode], .pipeline-toolbar [data-modal="pipeline-stage"] { flex: 1 1 auto; }
  .pipeline-toolbar select { flex: 1 1 180px; min-width: 0; }
  .kanban-column { flex-basis: min(82vw, 310px); width: min(82vw, 310px); height: min(620px, calc(100vh - 310px)); }
  .pipeline-stage-list { margin-right: 13px; margin-left: 13px; }
  .pipeline-stage-list-head { display: none; }
  .pipeline-stage-list-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 13px; }
  .pipeline-stage-list-row > span:nth-child(1)::before { content: 'عنوان: '; color: #7b8797; }
  .pipeline-stage-list-row > span:nth-child(2)::before { content: 'شناسه: '; color: #7b8797; }
  .pipeline-stage-list-row > span:nth-child(3)::before { content: 'ترتیب: '; color: #7b8797; }
  .pipeline-stage-list-row > span:nth-child(4)::before { content: 'احتمال: '; color: #7b8797; }
  .pipeline-stage-list-row > span:nth-child(5) { justify-self: start; }
  .pipeline-stage-list-row > .pipeline-stage-actions { grid-column: 1 / -1; }
  .modal-body#pipeline-stage-form { grid-template-columns: 1fr; }
  #pipeline-stage-form .field, #pipeline-stage-form > .check-field { grid-column: 1 / -1; }
}

/* UX stability overrides */
html { direction: rtl; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(37, 99, 235, .42); outline-offset: 2px; }
button[aria-busy="true"] { position: relative; cursor: wait; }
button[aria-busy="true"]::after { content: ''; width: 13px; height: 13px; margin-inline-start: 4px; border: 2px solid currentColor; border-left-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.ui-overlay-open { overflow: hidden; }
.inline-form-error { grid-column: 1 / -1; margin-bottom: 10px; border-right: 3px solid var(--red); border-radius: 8px; padding: 10px 12px; color: #9c3131; background: #fff1f1; font-size: 12px; line-height: 1.8; }
.error-text { color: var(--red) !important; }
.global-search-wrap { position: relative; width: min(460px, 100%); justify-self: center; }
.global-search-wrap .global-search { width: 100%; }
.global-search { color: #18253a; }
.global-search::placeholder { color: #637388; opacity: 1; }
.global-search-results { position: absolute; z-index: 40; top: calc(100% + 7px); right: 0; left: 0; display: grid; max-height: min(65vh, 430px); overflow-y: auto; padding: 6px; border: 1px solid #dfe7f1; border-radius: 12px; background: #fff; box-shadow: 0 16px 35px rgba(28, 54, 84, .16); }
.global-search-result { position: relative; display: grid; gap: 2px; width: 100%; border: 0; border-radius: 8px; padding: 10px 12px; color: #18253a; background: #fff; text-align: right; }
.global-search-result:hover, .global-search-result:focus-visible { background: #edf7ff; }
.global-search-result small { color: #637388; font-size: 11px; }
.global-search-result span { position: absolute; left: 10px; top: 10px; color: #4775c2; font-size: 10px; }
.global-search-empty { padding: 14px; color: #637388; text-align: center; font-size: 12px; }
.filter-bar { flex-wrap: wrap; }
.filter-bar > * { min-width: 160px; }
.payment-search-bar { margin: 0 0 14px; }
.client-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 14px 18px; border-top: 1px solid #edf1f6; color: #637388; font-size: 11px; }
.client-pagination .button[aria-current="page"] { color: #fff; background: #5142ef; }
.info-strip { display: block !important; margin-bottom: 20px; border: 1px solid #d6ebfa; border-radius: 10px; }
.target-table td small, .panel-title p, .panel-title span, .metric-card small { color: #637388; }

@media (max-width: 720px) {
  .target-topbar { grid-template-columns: auto 1fr; }
  .top-user { min-width: 0; }
  .top-user .user-menu-trigger { max-width: 145px; overflow: hidden; padding: 0 9px; }
  .top-user .user-menu-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .global-search-wrap { grid-column: 1 / -1; order: 3; }
  .filter-bar { align-items: stretch; }
  .filter-bar > * { flex: 1 1 100%; min-width: 0; }
  .target-table { min-width: 720px; }
  .modal-backdrop { align-items: start; padding: 10px; overflow-y: auto; }
  .modal { max-height: calc(100vh - 20px); }
  .lead-drawer > header, .drawer-body { padding: 15px; }
}

/* Person dossier workspace */
.person-page { display: grid; gap: 18px; }
.person-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px; border: 1px solid #dfe7f1; border-radius: 16px; background: linear-gradient(135deg, #fff 0%, #f6fbff 100%); box-shadow: 0 8px 24px rgba(28,54,84,.05); }
.person-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.person-avatar { display: grid; place-items: center; flex: 0 0 58px; width: 58px; height: 58px; border-radius: 17px; color: #fff; background: linear-gradient(145deg, #3c67d9, #6c4ce9); font-size: 18px; font-weight: 800; }
.person-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.person-name-line h1 { margin: 0; font-size: 23px; }
.person-identity p { margin: 4px 0; color: #40536d; font-size: 13px; }
.person-identity small { color: #7c8999; font-size: 11px; }
.person-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.person-actions a { text-decoration: none; }
.person-more-actions { position: relative; }
.person-more-actions summary { list-style: none; cursor: pointer; border: 0; border-radius: 9px; padding: 10px 13px; color: #617087; background: #eef2f7; font-size: 12px; }
.person-more-actions summary::-webkit-details-marker { display: none; }
.person-more-actions[open] summary { color: #fff; background: #5142ef; }
.person-more-actions > div { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; display: grid; min-width: 180px; gap: 6px; padding: 8px; border: 1px solid #dfe7f1; border-radius: 11px; background: #fff; box-shadow: 0 10px 25px rgba(28,54,84,.14); }
.person-more-actions > div .button { width: 100%; text-align: right; }
.person-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 5px; border: 1px solid #dfe7f1; border-radius: 13px; background: #fff; scrollbar-width: thin; }
.person-tabs button { flex: 0 0 auto; border: 0; border-radius: 9px; padding: 11px 14px; color: #617087; background: transparent; white-space: nowrap; font-size: 12px; }
.person-tabs button:hover, .person-tabs button.active { color: #fff; background: #5142ef; }
.person-tabs button:disabled { color: #b5bdc9; cursor: not-allowed; background: #f5f7fa; }
.person-tab-content { min-width: 0; }
.person-summary-rail { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px; border: 1px solid #e0e8f2; border-radius: 12px; background: #fff; }
.person-summary-rail span { flex: 1 1 130px; padding: 7px 12px; border-left: 1px solid #edf1f6; color: #718096; font-size: 11px; }
.person-summary-rail span:last-child { border-left: 0; }
.person-summary-rail b { margin-left: 4px; color: #263e69; font-size: 14px; }
.person-summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.person-summary-card { min-height: 112px; padding: 16px; border: 1px solid #e0e8f2; border-radius: 13px; background: #fff; box-shadow: 0 4px 13px rgba(28,54,84,.03); }
.person-summary-card span, .person-summary-card small { display: block; color: #718096; font-size: 11px; }
.person-summary-card strong { display: block; margin: 12px 0 6px; color: #243c68; font-size: 20px; }
.person-summary-card.financial strong { color: #0a9b69; font-size: 16px; }
.person-summary-card.restricted strong { color: #a66b00; font-size: 17px; }
.person-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.person-overview-list { display: grid; gap: 0; padding: 4px 20px 14px; }
.person-overview-list div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid #edf1f6; color: #5e6e84; font-size: 12px; }
.person-overview-list div:last-child { border-bottom: 0; }
.person-overview-list b { color: #263852; }
.person-action-panel { display: grid; grid-template-columns: minmax(240px, 1.4fr) minmax(260px, 1fr) auto; align-items: center; gap: 18px; padding: 17px 20px; border: 1px solid #cfdcff; border-right: 4px solid #5142ef; border-radius: 14px; background: linear-gradient(110deg, #fff 0%, #f5f8ff 100%); }
.person-action-panel.overdue { border-color: #f0c5c5; border-right-color: #c44747; background: #fff8f8; }
.person-action-kicker { display: block; margin-bottom: 5px; color: #5142ef; font-size: 11px; font-weight: 700; }
.person-action-panel.overdue .person-action-kicker { color: #b33c3c; }
.person-action-panel strong { color: #263852; font-size: 15px; }
.person-action-panel p { margin: 5px 0 0; color: #68788d; font-size: 11px; line-height: 1.7; }
.person-followup-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.person-followup-facts span { display: grid; gap: 5px; padding: 9px 11px; border: 1px solid #e0e8f2; border-radius: 9px; background: rgba(255,255,255,.72); }
.person-followup-facts b { color: #718096; font-size: 12px; }
.person-followup-facts strong { font-size: 14px; }
.person-action-cta { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.person-timeline-heading { align-items: center; }
.person-timeline-heading select { min-width: 150px; }
.person-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px; }
.person-tab-loading, .person-page-loading { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 180px; color: #718096; }
.person-tab-error { display: grid; gap: 8px; margin: 18px; border-right: 3px solid #c44747; border-radius: 10px; padding: 14px; color: #8f3030; background: #fff3f3; font-size: 12px; }
.person-tab-error span { color: #a24b4b; }
.person-timeline { display: grid; gap: 0; padding: 17px 22px 8px; }
.person-timeline-item { position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 13px; min-height: 78px; padding-bottom: 18px; }
.person-timeline-item:before { content: ''; position: absolute; top: 12px; right: 6px; bottom: 0; width: 1px; background: #dbe4ef; }
.person-timeline-item:last-child:before { display: none; }
.person-timeline-dot { position: relative; z-index: 1; width: 13px; height: 13px; margin-top: 4px; border: 3px solid #dfe5ff; border-radius: 50%; background: #5142ef; }
.person-timeline-item.system .person-timeline-dot { border-color: #f3e5ff; background: #9a4be1; }
.person-timeline-head { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.person-timeline-head small { margin-right: auto; color: #8793a3; font-size: 10px; }
.person-timeline-item p { margin: 8px 0 4px; color: #52647c; font-size: 12px; line-height: 1.8; }
.person-timeline-item > div > small { color: #8a96a6; font-size: 10px; }
.person-profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.person-profile-form .wide, .person-profile-form .form-actions { grid-column: 1 / -1; }
.person-profile-form .field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.person-profile-form .field > label { color: #40516a; font-size: 12px; font-weight: 700; }
.person-profile-form input, .person-profile-form select { width: 100%; min-height: 42px; border: 1px solid #d9e2ec; border-radius: 9px; padding: 9px 11px; background: #fff; color: #263852; }
.person-profile-form input:focus, .person-profile-form select:focus { border-color: #5142ef; outline: 3px solid rgba(81, 66, 239, .12); }
.person-profile-form #person-phone { direction: ltr; text-align: left; }
.person-profile-form .form-actions { display: flex; justify-content: flex-start; padding-top: 4px; }
.person-profile-form .button[aria-busy="true"] { cursor: wait; opacity: .72; }
.person-pagination { margin: 0; }
.person-page .table-panel { margin-bottom: 16px; }
.person-page .target-table { min-width: 720px; }
.person-workflow { overflow: hidden; }
.person-workflow-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 10px; padding: 16px; }
.person-workflow-step { display: grid; align-content: start; gap: 8px; min-width: 0; min-height: 168px; border: 1px solid #dfe7f1; border-top: 3px solid #5a66df; border-radius: 12px; padding: 13px; background: #fbfcff; }
.person-workflow-step.financial-step { border-top-color: #d99a2b; }
.person-workflow-step.license-step { border-top-color: #0a9b69; }
.person-workflow-step > span { color: #6b7890; font-size: 11px; font-weight: 700; }
.person-workflow-step > strong { overflow: hidden; color: #263852; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.person-workflow-step > small { color: #637388; font-size: 10px; line-height: 1.7; }
.workflow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; }
.workflow-actions .button { min-height: 30px; }
.restricted-text { color: #a66b00 !important; }
.license-error { display: block; color: #c44747 !important; font-size: 10px; line-height: 1.7; }
.person-workflow .badge { width: max-content; }
.person-context { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.person-context span { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid #e0e8f2; border-radius: 12px; background: #fff; }
.person-context small { color: #718096; font-size: 11px; }
.person-context strong { color: #243c68; font-size: 13px; line-height: 1.7; }
.person-action-main { display: flex; align-items: center; justify-content: flex-start; gap: 18px; }
.person-phone { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.person-phone b { font-weight: 700; }
.sale-block { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 14px; border: 1px solid #e5ebf2; border-radius: 12px; background: #fbfcfe; }
.sale-block legend { grid-column: 1 / -1; padding: 0; color: #243c68; font-weight: 800; }
.sale-block .wide, .sale-block .form-actions { grid-column: 1 / -1; }
.sale-note { grid-column: 1 / -1; margin: 0; color: #637388; font-size: 12px; line-height: 1.8; }
.person-action-panel { grid-template-columns: minmax(0, 1.7fr) minmax(220px, .9fr); }
.person-tabs { align-items: stretch; gap: 0; }
.person-tab-group { display: flex; align-items: center; gap: 6px; padding: 0 8px; border-left: 1px solid #e7edf4; }
.person-tab-group:last-child { border-left: 0; }
.person-tab-label { color: #8b97a8; font-size: 10px; font-weight: 700; white-space: nowrap; }
.person-tab-buttons { display: flex; gap: 4px; }
.person-workflow-note { margin: -6px 2px 0; color: #6d7c90; font-size: 12px; }
.person-cockpit { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr); gap: 14px; align-items: start; }
.person-side { display: grid; gap: 14px; }
.person-related { display: grid; }
.person-related button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; border-bottom: 1px solid #edf1f6; padding: 12px 16px; text-align: right; background: transparent; }
.person-related button:last-child { border-bottom: 0; }
.person-related button:hover { background: #f8fafc; }
.person-related span { display: grid; gap: 3px; }
.person-related b { color: #243c68; font-size: 13px; }
.person-related small { color: #718096; font-size: 11px; }
.person-related strong { color: #263e69; font-size: 13px; white-space: nowrap; }
.person-activity-preview .person-timeline-item { min-height: 62px; }
.person-workflow-step { position: relative; min-height: 150px; }
.person-workflow-step > strong { white-space: normal; }
.person-workflow-step .step-state { color: #7b8798; font-size: 10px; font-style: normal; font-weight: 800; }
.person-workflow-step.is-complete { border-top-color: #14825e; background: #f7fbf9; }
.person-workflow-step.is-current { border-color: #c9c4ff; border-top-color: #5142ef; background: #f7f6ff; box-shadow: 0 8px 18px rgba(81, 66, 239, .08); }
.person-workflow-step.is-current .step-state { color: #5142ef; }
.person-workflow-step.is-upcoming,
.person-workflow-step.is-upcoming.financial-step,
.person-workflow-step.is-upcoming.license-step { border-top-color: #d7e0ea; background: #fbfcfe; }
.person-workflow-step.is-complete.financial-step,
.person-workflow-step.is-complete.license-step { border-top-color: #14825e; }
.person-workflow-step.is-current.financial-step,
.person-workflow-step.is-current.license-step { border-top-color: #5142ef; }
.person-workflow-step.is-upcoming strong, .person-workflow-step.is-upcoming small { color: #8b97a8; }
.person-workflow-step.is-blocked { border-top-color: #c44747; background: #fff8f8; }
.person-workflow-step.is-blocked .step-state { color: #b33c3c; }
.person-workflow-step.is-restricted { border-top-color: #d99a2b; background: #fffaf2; }
.person-workflow-step.is-restricted .step-state { color: #a66b00; }
.report-workflow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px; }
.report-workflow-grid article { display: grid; gap: 8px; border: 1px solid #e0e8f2; border-radius: 10px; padding: 12px; background: #fbfcfe; }
.report-workflow-grid b { color: #68788d; font-size: 11px; }
.report-workflow-grid strong { color: #263852; font-size: 20px; }
.report-workflow-panel > .dashboard-columns { padding: 0 16px 16px; }

@media (max-width: 1100px) {
  .person-context { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .person-cockpit { grid-template-columns: 1fr; }
  .person-workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .person-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .report-workflow-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .person-header { align-items: flex-start; flex-direction: column; padding: 16px; }
  .person-actions { justify-content: flex-start; width: 100%; }
  .person-actions .button { flex: 1 1 auto; }
  .person-name-line h1 { font-size: 19px; }
  .person-summary-grid, .person-overview-grid, .person-profile-form, .person-workflow-grid, .person-context, .person-cockpit { grid-template-columns: 1fr; }
  .report-workflow-grid { grid-template-columns: 1fr; }
  .person-summary-rail span { flex-basis: 42%; border-left: 0; }
  .person-action-panel { grid-template-columns: 1fr; gap: 12px; }
  .person-action-main { align-items: stretch; flex-direction: column; }
  .sale-block { grid-template-columns: 1fr; }
  .person-action-cta { justify-content: flex-start; }
  .person-more-actions > div { left: auto; right: 0; }
  .person-timeline-heading { align-items: stretch; }
  .person-timeline-heading select { width: 100%; }
  .person-profile-form .wide, .person-profile-form .form-actions { grid-column: auto; }
  .person-tabs { align-items: stretch; }
  .person-tab-group { align-items: flex-start; flex-direction: column; border-left: 0; padding: 6px 0; }
  .person-tabs button { padding: 10px 12px; }
}

.inbox-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.inbox-tabs button { border: 1px solid #d9e2ee; border-radius: 999px; padding: 8px 14px; background: #fff; color: var(--ink); font-weight: 600; }
.inbox-tabs button b { margin-right: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.inbox-tabs button.active { border-color: #2563eb; color: #1e3a8a; background: #eef4ff; }
.inbox-new-row { background: #fff8eb; }
.kanban-column.won { border-top-color: var(--green); }
.kanban-column.lost { border-top-color: var(--red); }
.kanban-column header { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; }
.kanban-column-value { grid-column: 1 / -1; color: var(--muted); font-size: 11px; font-weight: 500; }
.kanban-more { width: 100%; margin-top: 4px; }
.kanban-card.aging-warn { border-color: #f0c36d; box-shadow: 0 0 0 1px rgba(216,155,50,.25); }
.kanban-card.aging-danger { border-color: #e08a8a; box-shadow: 0 0 0 1px rgba(196,71,71,.2); }
.kanban-card .stage-age { color: var(--muted); }
.kanban-card.aging-warn .stage-age { color: #b7791f; }
.kanban-card.aging-danger .stage-age { color: var(--red); }
.kanban-card footer button { cursor: pointer; padding: 4px 2px; }
.outcome-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.outcome-choices label { display: inline-flex; align-items: center; gap: 6px; margin: 0; border: 1px solid #dbe3ee; border-radius: 999px; padding: 7px 10px; background: #f8fafc; font-size: 12px; font-weight: 600; cursor: pointer; }
.outcome-choices input { width: auto; margin: 0; }
.outcome-choices label:has(input:checked) { border-color: #5142ef; background: #f3f1ff; color: #3d34c4; }
.contact-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.contact-action-grid .button { text-decoration: none; }
.contact-actions .muted { display: block; margin-top: 12px; color: #708096; font-size: 12px; line-height: 1.8; }
