/* Customer after-sales workspace: compact, RTL-safe and mobile-first. */
.customers-page { display: grid; gap: 12px; }
.customers-page > .customers-tabs { display: flex; }
.customer-activity-page > .customers-tabs { display: flex; }
.customers-page .customers-header { min-height: 0; padding-block: 8px; }
.customers-page .customers-header h1 { margin: 0; font-size: 24px; }
.customers-page .customers-header p { margin: 4px 0 0; font-size: 11px; }
.customers-header { align-items: center; gap: 16px; }
.customers-header-actions { display: flex; align-items: center; gap: 8px; }
.customers-header-actions .customer-create-button { white-space: nowrap; }
.customers-tabs { display: flex; align-items: center; gap: 6px; padding: 5px; border: 1px solid var(--line, #e8e9f2); border-radius: 13px; background: #f8fafc; overflow-x: auto; }
.customers-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 14px; border-radius: 9px; color: var(--muted); white-space: nowrap; text-decoration: none; font-size: 13px; font-weight: 700; }
.customers-tabs a:hover { color: var(--text); background: #fff; }
.customers-tabs a.is-active { color: #fff; background: var(--primary); box-shadow: 0 5px 14px rgba(91,80,230,.18); }
.customer-hero { margin-bottom: 14px; padding: 6px 0 0; }
.customer-detail-page { display: grid; gap: 12px; }
.customer-detail-page > .customer-hero { margin-bottom: 0; padding: 4px 0; }
.customer-detail-page > .customer-hero h1 { margin: 2px 0 0; font-size: clamp(22px, 3vw, 30px); }
.customer-detail-page > .customer-hero p { margin: 3px 0 0; font-size: 12px; }
.customer-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.customers-filters { align-items: end; }
.customers-filters label { flex: 1 1 360px; }
.customers-filter-panel { margin: 0 0 16px; padding: 0; overflow: hidden; }
.customers-filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; padding: 13px 16px; }
.customers-filter-summary::-webkit-details-marker { display: none; }
.customers-filter-summary > span:first-child { display: grid; gap: 3px; }
.customers-filter-summary strong { color: var(--primary, #174b78); font-size: 13px; }
.customers-filter-summary small { font-size: 10px; }
.customers-filter-body { border-top: 1px solid #e7edf2; padding: 14px 16px; background: #fbfdfe; }
.customers-filter-body .customers-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.customers-filter-body .customers-filters label { display: grid; gap: 5px; min-width: 0; color: var(--muted, #6b7d90); font-size: 10px; font-weight: 600; }
.customers-filter-body .customers-filters input, .customers-filter-body .customers-filters select { width: 100%; min-height: 36px; box-sizing: border-box; padding: 7px 10px; border: 1px solid #d5e0e8; border-radius: 8px; background: #fff; font: inherit; font-size: 11px; }
.customers-filter-body .customers-filters label:first-child { grid-column: span 2; }
.customers-filter-body .filter-actions { display: flex; align-items: end; gap: 7px; }
.customer-filter-persistence { grid-column: 1 / -1; color: var(--muted, #6b7d90); font-size: 10px; }
.customers-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.customers-summary > div { display: grid; gap: 3px; min-height: 48px; padding: 9px 12px; border: 1px solid var(--border, #e4e9ef); border-radius: 11px; background: var(--surface, #fff); }
.customers-summary strong { color: var(--text, #17324d); font-size: 1.05rem; }
.customers-table-card > .panel-header { padding-block: 11px; }
.customers-table-card > .panel-header h2 { font-size: 16px; }
.customer-row-actions { justify-content: center; gap: 5px; }
.customer-row-actions .lead-row-action { width: 34px; height: 34px; }
.customer-phone-list a { direction: ltr; display: inline-block; }
.customer-phone-list details { position: relative; display: inline-block; }
.customer-phone-list details > div { position: absolute; z-index: 20; inset-inline-end: 0; top: calc(100% + 5px); display: grid; gap: 4px; min-width: 190px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.customer-phone-list details > div a { padding: 6px 8px; border-radius: 7px; white-space: nowrap; }
.customer-phone-list details > div a:hover { background: #f3f6fb; }
.customer-phone-menu { position: relative; display: inline-block; }
.customer-phone-menu > summary { list-style: none; cursor: pointer; }
.customer-phone-menu > summary::-webkit-details-marker { display: none; }
.customer-phone-menu > a { position: relative; z-index: 10; display: block; min-width: 160px; padding: 7px 10px; border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none; }
.customer-phone-menu > a:first-of-type { margin-top: 5px; border-radius: 9px 9px 0 0; }
.customer-phone-menu > a:last-child { border-radius: 0 0 9px 9px; }
.customer-search-field { position: relative; }
.customer-search-results { position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 5px); display: grid; gap: 3px; max-height: 280px; overflow: auto; padding: 6px; border: 1px solid #dfe6ee; border-radius: 11px; background: #fff; box-shadow: 0 14px 30px rgba(30,50,75,.14); }
.customer-search-item { display: grid; gap: 2px; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.customer-search-item:hover, .customer-search-item:focus { background: #eef5fb; outline: none; }
.customer-search-item small { color: var(--muted); direction: rtl; }
.customer-search-empty { padding: 10px; color: var(--muted); font-size: 11px; }
.customer-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.customer-detail-grid > .panel { min-width: 0; overflow: hidden; }
.customer-detail-grid > .panel > .panel-header { min-height: auto; padding: 16px 18px 12px; }
.customer-detail-grid > .panel > form { display: grid; gap: 11px; padding: 0 18px 18px; }
.customer-detail-grid > .panel > form label { display: grid; gap: 6px; min-width: 0; }
.customer-detail-grid > .panel > form input,
.customer-detail-grid > .panel > form select,
.customer-detail-grid > .panel > form textarea { width: 100%; min-width: 0; }
.customer-detail-page > .customer-detail-grid + .panel + .customer-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-detail-page > .customer-detail-grid + .panel + .customer-detail-grid { display: none; }
.customer-contact-card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.customer-contact-card > div { display: grid; gap: 5px; padding: 12px 14px; border-radius: 12px; background: #f7fafc; }
.customer-phone-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.customer-phone-list a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid var(--border, #dfe5ee); border-radius: 9px; background: #fff; text-decoration: none; }
.customer-phone-list a:hover { border-color: var(--primary, #164b7a); background: #f2f7fc; }
.customer-phone-list a span { color: var(--muted, #64748b); font-size: .78rem; }
.customer-phone-list a strong { direction: ltr; unicode-bidi: plaintext; }
.customer-create-card { overflow: hidden; }
.customer-create-modal-body { display: grid; gap: 16px; }
.customer-create-modal-body .customer-create-form { padding: 0; }
.customer-create-modal-body .customer-form-section { background: #fbfcff; }
.customer-create-card > .panel-header { padding-block: 14px; }
.customer-create-form { display: grid; gap: 16px; padding: 0 18px 18px; }
.customer-form-section { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcff; }
.customer-form-section h3 { margin: 0 0 12px; font-size: 14px; }
.customer-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.customer-form-grid label { display: grid; gap: 6px; min-width: 0; }
.customer-form-grid label:nth-last-child(-n+2) { grid-column: span 1; }
.customer-form-grid input, .customer-form-grid select { width: 100%; min-width: 0; }
.customer-form-grid label:has(textarea), .customer-form-grid textarea { min-height: 86px; }
.customer-create-form .form-actions { margin-top: 0; }
.customer-contact-card strong { direction: ltr; text-align: right; }
.customer-contact-card > div:first-child { grid-column: span 2; }
.customer-contact-card > div:first-child > small { margin-bottom: 2px; }
.customer-detail-page > .customer-contact-card { display: none; }
.customer-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 2px; }
.customer-summary-card { min-width: 0; overflow: hidden; border: 1px solid #e6e9f0; box-shadow: 0 8px 22px rgba(35,39,84,.05); }
.customer-summary-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid #edf0f4; background: linear-gradient(180deg, #fff, #fafbfe); }
.customer-summary-card-header h2 { margin: 3px 0 0; color: var(--text); font-size: 15px; }
.customer-summary-card-header small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.customer-summary-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; color: var(--primary); background: var(--primary-soft); font-size: 18px; font-weight: 800; }
.customer-summary-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; padding: 8px 16px 12px; }
.customer-summary-list > div { display: grid; gap: 4px; min-width: 0; padding: 8px 0; border-bottom: 1px solid #f0f2f6; }
.customer-summary-list > div:nth-last-child(-n+2) { border-bottom: 0; }
.customer-summary-list span, .customer-summary-metrics span { color: var(--muted); font-size: 10px; }
.customer-summary-list strong, .customer-summary-metrics strong { min-width: 0; color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.customer-summary-phone-row { grid-column: 1 / -1; }
.customer-summary-phone-list { display: flex; flex-wrap: wrap; gap: 6px; }
.customer-summary-phone { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid #e2e7ee; border-radius: 8px; color: var(--text); background: #fff; text-decoration: none; }
.customer-summary-phone:hover { border-color: var(--primary); background: #f7f6ff; }
.customer-summary-phone span { color: var(--muted); font-size: 9px; }
.customer-summary-phone strong { direction: ltr; unicode-bidi: plaintext; }
.customer-summary-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 16px 16px; }
.customer-summary-metrics > div { display: grid; gap: 5px; padding: 10px; border-radius: 10px; background: #f7f8fc; }
.customer-summary-metrics strong { color: var(--primary-dark); }
.customer-summary-metrics .customer-status-at_risk { color: #b26a11; }
.customer-summary-metrics .customer-status-closed { color: var(--danger); }
.customer-detail-page > .customer-summary-grid { margin: 14px 0 18px; }
.customer-summary-card { position: relative; border-color: #e1e6ef; border-radius: 16px; background: #fff; box-shadow: 0 10px 28px rgba(25, 42, 70, .06); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.customer-summary-card:hover { border-color: #cfd8e6; box-shadow: 0 14px 34px rgba(25, 42, 70, .1); transform: translateY(-2px); }
.customer-summary-card-header { min-height: 74px; align-items: center; padding: 15px 17px 13px; background: linear-gradient(135deg, #fff 0%, #f9fbff 100%); }
.customer-summary-card-header h2 { font-size: 15px; line-height: 1.5; letter-spacing: -.1px; }
.customer-summary-card-header small { max-width: 245px; line-height: 1.7; }
.customer-summary-icon { flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid #dbe5f1; border-radius: 12px; background: #eef5ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.customer-summary-icon svg { width: 21px; height: 21px; fill: currentColor; }
.customer-summary-icon-student { color: #3867a5; background: #edf5ff; }
.customer-summary-icon-contact { color: #1f7a72; background: #ebfaf7; border-color: #d4eee9; }
.customer-summary-icon-status { color: #9b6a1e; background: #fff7e6; border-color: #f1e2bd; }
.customer-summary-list { gap: 0 18px; padding: 7px 17px 13px; }
.customer-summary-list > div { min-height: 55px; align-content: center; padding: 9px 0; border-bottom-color: #eef1f5; }
.customer-summary-list > div:nth-last-child(-n+2) { border-bottom: 0; }
.customer-summary-list span, .customer-summary-metrics span { font-size: 10px; line-height: 1.5; }
.customer-summary-list strong, .customer-summary-metrics strong { font-size: 12px; line-height: 1.65; }
.customer-summary-phone-row { min-height: 70px !important; }
.customer-summary-phone-list { gap: 7px; }
.customer-summary-phone { min-height: 34px; padding: 7px 9px; border-color: #dce4ee; border-radius: 10px; background: #fbfdff; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.customer-summary-phone:hover { border-color: var(--primary); background: #f3f7ff; transform: translateY(-1px); }
.customer-summary-phone span { font-size: 9px; }
.customer-summary-phone strong { font-size: 12px; }
.customer-summary-metrics { gap: 9px; padding: 13px 17px 17px; }
.customer-summary-metrics > div { min-height: 57px; align-content: center; padding: 10px 11px; border: 1px solid #edf0f5; background: #f8faff; }
.customer-summary-metrics > div:first-child { background: #f0f7ff; border-color: #deebfb; }
.customer-summary-metrics > div:nth-child(2) { background: #f1fbf8; border-color: #dcefe9; }
@media (max-width: 1050px) {
  .customer-detail-page > .customer-summary-grid { margin-top: 12px; }
}

/* Call evaluation read model — one complete, paginated call list. */
.evaluation-stats-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:16px}
.evaluation-filter{align-items:end;flex-wrap:wrap}
.evaluation-filter label{display:grid;gap:6px;min-width:190px;color:var(--muted);font-size:11px;font-weight:700}
.evaluation-filter select{width:100%;min-height:38px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--text);font:inherit;font-size:12px}
.evaluation-filter .muted{flex:1 1 240px;min-width:220px;line-height:1.8}
.evaluation-list-panel{margin-top:16px;overflow:hidden}
.evaluation-list-panel .table-card{border:0;border-radius:0}
.evaluation-list-panel .panel-header{padding-bottom:12px}
.evaluation-status-badge{display:inline-flex;align-items:center;justify-content:center;min-width:104px;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}
.evaluation-status-badge.evaluated{background:#e9f8f0;color:#237c5d}
.evaluation-status-badge.pending{background:#fff5dd;color:#9a6b13}
.evaluation-list-panel .pagination{justify-content:space-between;align-items:center;padding:12px 16px 16px;border-top:1px solid var(--line);margin-top:0}
.evaluation-list-panel .pagination>div{display:flex;gap:7px;flex-wrap:wrap}
@media(max-width:800px){.evaluation-stats-grid{grid-template-columns:1fr 1fr}.evaluation-filter{align-items:stretch;flex-direction:column}.evaluation-filter label,.evaluation-filter .muted{width:100%;min-width:0}.evaluation-filter .button{width:100%}.evaluation-list-panel .pagination{align-items:stretch;flex-direction:column}.evaluation-list-panel .pagination>div{width:100%}.evaluation-list-panel .pagination .button{flex:1;text-align:center}}
@media(max-width:520px){.evaluation-stats-grid{grid-template-columns:1fr}.evaluation-status-badge{min-width:0}}
@media (max-width: 1050px) { .customer-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .customer-summary-card-status { grid-column: 1 / -1; } }
@media (max-width: 700px) { .customer-detail-page > .customer-summary-grid { margin: 9px 0 14px; } .customer-summary-grid { grid-template-columns: 1fr; gap: 9px; } .customer-summary-card-status { grid-column: auto; } .customer-summary-card:hover { transform: none; } .customer-summary-list { padding-inline: 13px; } .customer-summary-card-header { min-height: 68px; padding-inline: 13px; } .customer-summary-metrics { padding-inline: 13px; } }
.activity-list { display: grid; gap: 10px; }
.activity-item { padding: 12px 14px; border: 1px solid var(--border, #e4e9ef); border-radius: 12px; background: #fff; }
.activity-item small, .activity-item p { display: block; margin-top: 6px; color: var(--muted, #6c7a89); }
.customer-activity-page .panel-header { align-items: center; }
.customer-timeline-card { margin-top: 2px; }
.customer-empty-activity { margin: 0; padding: 18px; }
.customer-timeline { display: grid; gap: 0; padding: 4px 18px 16px; }
.customer-timeline-item { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; padding: 10px 0 14px; }
.customer-timeline-item:not(:last-child)::before { content: ''; position: absolute; inset-inline-start: 6px; top: 22px; bottom: -2px; width: 2px; background: #e7eaf3; }
.customer-timeline-marker { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: 3px; border: 3px solid #fff; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.customer-timeline-followup .customer-timeline-marker { background: var(--success); box-shadow: 0 0 0 1px var(--success); }
.customer-timeline-sale .customer-timeline-marker { background: #2d8a68; box-shadow: 0 0 0 1px #2d8a68; }
.customer-row-drawer { position: relative; display: inline-block; }
.customer-row-drawer summary { list-style: none; cursor: pointer; }
.customer-row-drawer summary::-webkit-details-marker { display: none; }
.customer-row-drawer-menu { position: absolute; z-index: 20; inset-inline-end: 0; top: calc(100% + 5px); display: grid; min-width: 150px; padding: 6px; border: 1px solid #dce5eb; border-radius: 10px; background: #fff; box-shadow: 0 10px 24px rgba(25,50,69,.14); }
.customer-row-drawer-menu a { padding: 8px 10px; border-radius: 7px; color: #3e5365; font-size: 11px; white-space: nowrap; }
.customer-row-drawer-menu a:hover, .customer-row-drawer-menu a:focus-visible { color: var(--primary); background: #f0f8f3; }
.customer-timeline-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.customer-timeline-heading time { color: var(--muted); direction: ltr; font-size: 11px; white-space: nowrap; }
.customer-timeline-item small { display: block; margin-top: 4px; color: var(--muted); }
.customer-timeline-item p { margin: 5px 0 0; color: var(--text); line-height: 1.7; }
.customer-call-actions { display: inline-flex; align-items: center; gap: 5px; }
.customer-call-actions .icon-button { width: 32px; height: 32px; }
.customer-call-actions .icon-button.danger { color: var(--danger); }
.customers-table-card tr.is-voided, .customer-activity-page tr.is-voided { opacity: .68; }
.customer-activity-page .status-pill { display: inline-flex; margin-top: 4px; font-size: 10px; }
.customer-call-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.customer-call-wizard { display: grid; gap: 16px; }
.customer-call-wizard .call-wizard-step { display: grid; gap: 12px; }
.customer-call-wizard .call-wizard-step h3 { margin: 0; font-size: 15px; }
.customer-call-wizard .call-wizard-choice { display: flex; flex-wrap: wrap; gap: 10px; }
.customer-call-wizard .call-wizard-choice label { display: flex; align-items: center; gap: 7px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; }
.customer-call-wizard [data-followup-fields], .customer-call-wizard [data-lost-fields] { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft, #f7f9fc); }
.customer-call-wizard .customer-call-sale-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft, #f7f9fc); }
.customer-call-wizard .customer-call-sale-grid label { min-width: 0; }
.customer-call-wizard .customer-call-sale-grid input, .customer-call-wizard .customer-call-sale-grid select { width: 100%; }
.customer-call-wizard .customer-call-sale-validation { margin: 0; padding: 9px 11px; border: 1px solid #f2b8b5; border-radius: 9px; color: #9f2d29; background: #fff5f4; }
.needs-assessment-record { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.needs-assessment-empty { margin-top: 12px; }
.customer-needs-form .form-notice { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel-soft, #f7f9fc); color: var(--muted, #667085); }
@media (max-width: 640px) { .customer-call-wizard .customer-call-sale-grid { grid-template-columns: 1fr; } }
.customer-call-wizard [hidden] { display: none !important; }
.customer-call-edit-form label { display: grid; gap: 6px; }
.customer-call-edit-form label:nth-last-of-type(2), .customer-call-edit-form label:nth-last-of-type(1), .customer-call-edit-form .form-actions { grid-column: 1 / -1; }
.customer-call-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.customer-call-summary > div { min-height: 76px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft, #f7f9fc); }
.customer-call-summary strong { font-size: 1.25rem; color: var(--primary); }
.customer-call-filters { margin-bottom: 16px; }
.customer-call-filters .lead-filters { align-items: end; }
.customer-call-filters label { min-width: 150px; }
.customer-call-filters .filter-search { min-width: 230px; flex: 1 1 260px; }
@media (max-width: 900px) {
  .customer-contact-card > div:first-child { grid-column: auto; }
  .customer-timeline-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
}
@media (max-width: 900px) {
  .customers-summary, .customer-detail-grid, .customer-contact-card, .customer-form-grid { grid-template-columns: 1fr; }
  .customers-header { align-items: stretch; }
  .customers-header-actions, .customers-header-actions .button { width: 100%; }
  .customers-header-actions .button { justify-content: center; }
  .customers-header-actions .status-pill { width: 100%; justify-content: center; text-align: center; }
  .customers-filter-body .customers-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customers-filter-body .customers-filters label:first-child, .customer-filter-persistence { grid-column: 1 / -1; }
  .customers-filter-body .filter-actions { grid-column: 1 / -1; }
  .customer-hero-actions { width: 100%; }
  .customer-hero-actions .button { flex: 1 1 180px; justify-content: center; }
  .customers-tabs { margin-inline: -2px; }
  .customers-page .customers-header h1 { font-size: 21px; }
  .customer-call-edit-form { grid-template-columns: 1fr; }
  .customer-call-edit-form label, .customer-call-edit-form label:nth-last-of-type(2), .customer-call-edit-form label:nth-last-of-type(1), .customer-call-edit-form .form-actions { grid-column: auto; }
  .customer-call-summary { grid-template-columns: 1fr; gap: 8px; }
  .customer-call-filters .lead-filters { display: grid; grid-template-columns: 1fr; }
  .customer-call-filters label, .customer-call-filters .filter-search { min-width: 0; width: 100%; }
  .customer-activity-page .responsive-table { overflow-x: auto; }
  .customer-activity-page table { min-width: 760px; }
}

@media (max-width: 600px) {
  .customer-create-modal-body { gap: 12px; }
  .customer-create-modal-body .customer-form-section { padding: 11px; }
  .customer-create-modal-body .customer-form-section h3 { font-size: 13px; }
}

/* Academic report cards: RTL, compact, printable and mobile-first. */
.report-cards-page { gap: 14px; }
.report-cards-page .panel-header { align-items: center; }
.report-card-form-shell { display: grid; gap: 16px; }
.report-card-form { display: grid; gap: 16px; }
.report-card-form-section { display: grid; gap: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcff; }
.report-card-form-section h3 { margin: 0; font-size: 15px; }
.report-card-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.report-card-form-grid label, .report-card-form-section label:not(.report-card-mode) { display: grid; gap: 6px; min-width: 0; }
.report-card-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.report-card-section-heading > div { flex: 1 1 260px; }
.report-card-mode { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; white-space: nowrap; }
.report-card-mode input { margin: 0; accent-color: var(--primary); }
.report-card-items { display: grid; gap: 8px; }
.report-card-item { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(120px, .7fr) auto; gap: 8px; align-items: center; }
.report-card-live-average { padding: 10px 12px; border-radius: 10px; color: #245579; background: #eaf3fb; }
.report-card-live-average strong { direction: ltr; display: inline-block; margin-inline-start: 4px; }
.report-card-detail { display: grid; gap: 14px; }
.report-card-detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.report-card-paper { width: min(900px, 100%); margin-inline: auto; padding: 28px; }
.report-card-paper-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 2px solid #e5edf4; }
.report-card-paper-header h1 { margin: 5px 0; font-size: clamp(23px, 4vw, 32px); }
.report-card-paper-header p { margin: 0; color: var(--muted); }
.report-card-average { display: grid; min-width: 120px; padding: 14px; border-radius: 14px; text-align: center; color: #fff; background: #164b7a; }
.report-card-average strong { direction: ltr; font-size: 28px; line-height: 1.2; }
.report-card-average span, .report-card-average small { opacity: .84; }
.report-card-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.report-card-meta > div { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.report-card-items-detail { margin-top: 20px; }
.report-card-items-detail h2 { margin: 0 0 10px; font-size: 17px; }
.report-card-manual-note { margin-top: 20px; padding: 14px; border: 1px dashed #b9cfe1; border-radius: 10px; color: #315a78; background: #f5faff; }
.report-card-paper-footer { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
@media (max-width: 700px) {
  .report-card-form-grid, .report-card-meta { grid-template-columns: 1fr; }
  .report-card-item { grid-template-columns: 1fr; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
  .report-card-item .button { width: 100%; justify-content: center; }
  .report-card-paper { padding: 16px; }
  .report-card-paper-header { flex-direction: column; }
  .report-card-average { width: 100%; }
}
@media print {
  .report-card-detail-actions, .sidebar, .topbar, .mobile-nav, .flash-stack { display: none !important; }
  .app-shell, .main-content, .page-content { display: block !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
  .report-card-paper { width: 100%; max-width: none; border: 1px solid #d5dde5; box-shadow: none; }
  .report-card-paper-header { break-inside: avoid; }
  body { background: #fff !important; }
}

/* Invoice multi-line editor */
.invoice-items-wrap {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid var(--line, #dfe5ec);
  border-radius: 16px;
  background: #f8fafc;
}
.invoice-create-panel { margin-bottom: 20px; }
.invoice-form [data-invoice-sales] { min-height: 112px; padding: 8px; line-height: 1.8; }
.invoice-form [data-invoice-sales] option { padding: 7px 9px; border-radius: 7px; }
.invoice-form [data-invoice-sales] option:checked { color: #173f68; background: #e8f2fb; font-weight: 800; }
.invoice-sales-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.invoice-sales-picker { position: relative; display: grid; gap: 8px; }
.invoice-sales-trigger { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text); font: inherit; text-align: right; cursor: pointer; }
.invoice-sales-trigger:hover, .invoice-sales-trigger[aria-expanded="true"] { border-color: #9db8d0; box-shadow: 0 0 0 3px rgba(39, 91, 133, .08); }
.invoice-sales-trigger-count { min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: #245579; background: #e4eef7; font-size: 12px; font-weight: 800; }
.invoice-sales-menu { display: grid; gap: 5px; max-height: 260px; overflow: auto; padding: 7px; border: 1px solid #cbd8e4; border-radius: 12px; background: #fff; box-shadow: 0 14px 32px rgba(27, 52, 77, .14); }
.invoice-sales-option { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; padding: 10px; border: 1px solid transparent; border-radius: 9px; color: #334154; cursor: pointer; }
.invoice-sales-option:hover { background: #f2f6fa; border-color: #dbe6ef; }
.invoice-sales-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.invoice-sales-option span { display: grid; gap: 2px; min-width: 0; }
.invoice-sales-option small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-sales-picker-warning { margin-top: 8px; padding: 10px 12px; border-inline-start: 4px solid var(--danger); border-radius: 9px; color: #8f1d2c; background: #fff1f0; line-height: 1.8; }
.invoice-sales-collapsible { margin-bottom: 2px; border: 1px solid #e1e7ef; border-radius: 14px; background: #f8fafc; overflow: visible; }
.invoice-sales-collapsible[open] { box-shadow: 0 8px 22px rgba(35, 39, 84, .06); }
.invoice-sales-collapsible > summary { list-style: none; cursor: pointer; }
.invoice-sales-collapsible > summary::-webkit-details-marker { display: none; }
.invoice-collapsible-summary { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.invoice-collapsible-summary > span:first-child { display: grid; gap: 2px; }
.invoice-collapsible-summary strong { color: var(--text); font-size: 13px; }
.invoice-collapsible-summary small { line-height: 1.7; }
.invoice-collapsible-chevron { color: var(--muted); font-size: 20px; line-height: 1; transition: transform .18s ease; }
.invoice-collapsible[open] .invoice-collapsible-chevron { transform: rotate(180deg); }
.invoice-sales-collapsible-body { padding: 0 16px 16px; }
.invoice-sales-field { display: grid; gap: 7px; }
.invoice-payment-dashboard { margin-top: 20px; padding: 0; overflow: hidden; }
.invoice-payment-dashboard > .invoice-collapsible-summary { background: #fff; }
.invoice-payment-cards { padding: 0 16px 16px; }
.invoice-page-header > div:first-child > small { display: block; max-width: 780px; margin-top: 5px; line-height: 1.8; }
.invoice-payment-source-note { display: block; padding: 8px 10px; border-inline-start: 3px solid #d7a443; border-radius: 7px; color: #694d1e; background: #fff9eb; font-size: .78rem; line-height: 1.8; }
.invoice-payment-card .button { justify-self: start; }
.invoice-create-panel > .panel-header { min-height: 76px; padding: 18px 24px; align-items: flex-start; }
.invoice-create-panel > .panel-header h3 { font-size: 16px; line-height: 1.5; }
.invoice-create-panel > .panel-header small { display: block; margin-top: 3px; line-height: 1.8; }
.invoice-form { padding: 22px 24px 24px; gap: 17px 18px; align-items: start; }
.invoice-form > label { min-width: 0; gap: 7px; }
.invoice-form > label > input,
.invoice-form > label > select,
.invoice-form > label > textarea { background: #fff; }
.invoice-form .form-actions { margin-top: 0; padding-top: 2px; }
.invoice-form .form-actions .button { min-width: 132px; }
.invoice-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e8edf3;
}
.invoice-items-head strong { color: var(--text); font-size: 13px; }
.invoice-items {
  display: grid;
  gap: 9px;
  overflow-x: auto;
}
.invoice-item-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(190px, 1.65fr) 88px 122px 108px 92px 118px 68px;
  align-items: end;
  gap: 10px;
  min-width: 980px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: var(--surface, #fff);
  box-shadow: 0 2px 8px rgba(35,39,84,.025);
}
.invoice-item-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #68738a;
  font-size: .78rem;
  font-weight: 700;
}
.invoice-item-row input,
.invoice-item-row select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding-inline: 10px;
}
.invoice-row-total {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 8px 9px;
  border: 1px solid #e6ebf2;
  border-radius: 9px;
  color: var(--text);
  background: #f4f7fa;
  font-size: .84rem;
  font-weight: 800;
  white-space: nowrap;
}
.invoice-item-row > .button {
  min-height: 42px;
  padding-inline: 10px;
}
.invoice-total-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 16px 18px;
  border: 1px solid #e1e7ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #f4f7fa 100%);
}
.invoice-total-card > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-inline: 14px;
  border-inline-start: 1px solid #e3e8ef;
}
.invoice-total-card > div:first-child { padding-inline-start: 0; border-inline-start: 0; }
.invoice-total-card > div:last-child { padding-inline-end: 0; }
.invoice-total-card span {
  color: var(--muted, #667085);
  font-size: .78rem;
  white-space: nowrap;
}
.invoice-total-card strong {
  font-size: 1.05rem;
  white-space: nowrap;
}
.invoice-total-card .invoice-grand-total {
  padding-inline-start: 18px;
  border-inline-start: 3px solid var(--primary, #2563eb);
}
.invoice-grand-total strong {
  color: var(--primary, #2563eb);
  font-size: 1.2rem;
}
.invoice-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.invoice-status-issued { color: #155eef; background: #eff8ff; }
.invoice-status-partial { color: #b54708; background: #fffaeb; }
.invoice-status-paid { color: #027a48; background: #ecfdf3; }
.invoice-status-void { color: #b42318; background: #fff1f0; }
.invoice-void-row { background: #fffafa; }
.invoice-void-detail { display: block; max-width: 260px; margin-top: 5px; color: #b42318; line-height: 1.7; }
.invoice-event-list { display: grid; gap: 10px; }
.invoice-event { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.invoice-event > span { color: var(--muted); font-size: .82rem; }
.invoice-event p { margin: 4px 0 0; }
.invoice-event details { margin-top: 5px; direction: ltr; text-align: left; }
.invoice-event code { display: block; overflow: auto; padding: 6px; border-radius: 6px; background: #f6f7fb; white-space: pre-wrap; word-break: break-word; }
.invoice-payment-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.invoice-payment-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.invoice-payment-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.invoice-payment-metrics { display: grid; gap: 4px; color: var(--muted); font-size: .84rem; }
.invoice-payment-metrics b { color: var(--text); }
.invoice-payment-progress { height: 7px; overflow: hidden; border-radius: 99px; background: #edf0f5; }
.invoice-payment-progress span { display: block; height: 100%; border-radius: inherit; background: var(--success); }
.invoice-payment-list { display: grid; gap: 10px; }
.invoice-payment-summary { padding: 10px; border-radius: 9px; background: var(--primary-soft); }
.invoice-payment-form { margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.invoice-payment-row { display: grid; gap: 5px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.invoice-payment-row > div { display: flex; justify-content: space-between; gap: 8px; }
.invoice-payment-row > div span, .invoice-payment-row small { color: var(--muted); font-size: .82rem; }
.invoice-payment-confirmed { border-inline-start: 4px solid var(--success); }
.invoice-payment-reversed { opacity: .75; border-inline-start: 4px solid var(--danger); }
.invoice-payment-status-confirmed { color: #027a48; background: #ecfdf3; }
.invoice-payment-status-reversed { color: #b42318; background: #fff1f0; }
.invoice-setup-warning { border-inline-start: 4px solid var(--danger); color: #8f1d2c; }
.invoice-setup-warning p { margin: 6px 0 0; }
.invoice-payment-dashboard { margin-bottom: 20px; }
.invoice-create-panel + .panel { margin-top: 20px; }
.invoice-create-panel + .panel .panel-header { min-height: 62px; }
.invoice-create-panel + .panel .table-card { border-radius: 0 0 14px 14px; border-inline: 0; border-bottom: 0; box-shadow: none; }
.invoice-create-panel + .panel table { min-width: 860px; }
.invoice-create-panel + .panel td:last-child { min-width: 220px; }
.invoice-create-panel + .panel td:last-child .button { margin: 2px; }
.invoice-page-header{align-items:center;gap:14px}.invoice-header-badge{padding:7px 10px;border:1px solid #cfe1d6;border-radius:999px;background:#f1faf4;color:#246b47;font-size:11px;white-space:nowrap}
.invoice-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:0 0 20px}.invoice-summary-grid article{display:grid;gap:5px;min-height:76px;padding:12px;border:1px solid #e1e8ef;border-radius:12px;background:linear-gradient(145deg,#fff,#f8fbfd);box-shadow:0 4px 12px rgba(30,55,78,.04)}.invoice-summary-grid article span{color:var(--muted);font-size:10px}.invoice-summary-grid article strong{color:var(--primary);font-size:18px}.invoice-summary-grid article.is-money{background:linear-gradient(145deg,#f7fcf9,#eef8f1);border-color:#d3e8d9}.invoice-summary-grid article.is-money strong{color:#18724a;font-size:15px;overflow-wrap:anywhere}
.invoice-history-panel .panel-header{align-items:center;gap:12px}.invoice-filter-panel{margin:0 0 18px;padding:0;overflow:hidden}.invoice-filter-summary{display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:pointer;list-style:none;padding:13px 16px}.invoice-filter-summary::-webkit-details-marker{display:none}.invoice-filter-summary>span:first-child{display:grid;gap:3px}.invoice-filter-summary strong{color:var(--primary);font-size:13px}.invoice-filter-summary small{font-size:10px}.invoice-filter-body{border-top:1px solid #e7edf2;padding:14px 16px;background:#fbfdfe}.invoice-history-tools{display:grid;grid-template-columns:minmax(180px,1.5fr) repeat(3,minmax(130px,1fr)) auto;align-items:end;gap:10px}.invoice-history-tools label{display:grid;gap:5px;color:var(--muted);font-size:10px;font-weight:600}.invoice-history-tools input,.invoice-history-tools select{width:100%;box-sizing:border-box;min-height:36px;padding:7px 10px;border:1px solid #d5e0e8;border-radius:8px;background:#fff;font:inherit;font-size:11px}.invoice-filter-actions{display:flex;align-items:center;gap:7px;padding-bottom:1px}.invoice-history-empty,.invoice-empty-state{padding:22px;color:var(--muted);text-align:center}.invoice-empty-state strong{display:block;color:var(--primary);margin-bottom:5px}.invoice-pagination{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin:14px 0}
.invoice-pagination-status{align-self:center;color:var(--muted);font-size:11px;padding-inline:5px}.invoice-pagination-ellipsis{align-self:center;color:var(--muted);padding-inline:3px}.invoice-pagination .button[aria-current="page"]{box-shadow:0 0 0 2px rgba(92,80,220,.16)}.invoice-summary-hint{margin:0 0 7px;color:var(--muted);font-size:10px}.invoice-readonly-notice{margin:0 0 14px;padding:10px 13px;font-size:11px}
.accounting-profile-panel{max-width:980px;margin-inline:auto}.accounting-profile-notice{margin:0 0 14px;padding:10px 13px;font-size:11px;line-height:1.9}.accounting-profile-form{gap:14px}.accounting-profile-form label{display:grid;gap:6px}.accounting-profile-form input:not([type=checkbox]),.accounting-profile-form select,.accounting-profile-form textarea{width:100%;box-sizing:border-box}.accounting-profile-toggle{display:flex!important;align-items:center;gap:9px;grid-column:1/-1;padding:11px 13px;border:1px solid #dce7ef;border-radius:10px;background:#f8fbfd;color:var(--ink);font-weight:700}.accounting-profile-toggle input{width:18px;height:18px;accent-color:var(--primary)}.accounting-profile-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.accounting-profile-facts>div{display:grid;gap:5px;padding:11px 13px;border:1px solid #e0e8ef;border-radius:10px;background:#f8fafc}.accounting-profile-facts small{color:var(--muted);font-size:10px}.accounting-profile-facts strong{color:var(--ink);font-size:12px}.accounting-profile-form .field-help{line-height:1.8}
.invoice-snapshot-warning{display:flex;align-items:flex-start;gap:10px;margin:0 0 14px;padding:12px 14px;border:1px solid #f2d7a3;border-inline-start:4px solid #c68219;border-radius:12px;background:#fffaf0;color:#684b19}.invoice-snapshot-warning strong{display:block;color:#704b10;font-size:12px}.invoice-snapshot-warning p{margin:3px 0 0;font-size:11px;line-height:1.9}
@media(max-width:1100px){.invoice-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.accounting-profile-panel{max-width:none}.accounting-profile-facts{grid-template-columns:1fr}}
@media(max-width:760px){.invoice-page-header{align-items:flex-start;flex-direction:column}.invoice-header-badge{white-space:normal}.invoice-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.invoice-summary-grid article{min-height:68px;padding:10px}.invoice-summary-grid article strong{font-size:16px}.invoice-history-panel .panel-header{align-items:stretch;flex-direction:column}.invoice-filter-summary{padding:12px}.invoice-filter-body{padding:12px}.invoice-history-tools{grid-template-columns:1fr 1fr}.invoice-history-tools label:first-child{grid-column:1/-1}.invoice-filter-actions{grid-column:1/-1;justify-content:flex-start}.invoice-pagination{gap:4px}.invoice-pagination .button{min-height:36px;padding-inline:9px}.invoice-snapshot-warning{padding:10px 11px}.invoice-page-header > div:first-child > small{line-height:1.9}.invoice-payment-card .button{width:100%;justify-content:center}.mobile-nav-accounting{position:relative;min-width:0}.mobile-nav-accounting>summary{list-style:none;cursor:pointer}.mobile-nav-accounting>summary::-webkit-details-marker{display:none}.mobile-nav-accounting-menu{position:absolute;z-index:60;inset-inline-end:0;bottom:calc(100% + 10px);display:grid;gap:4px;min-width:190px;padding:8px;border:1px solid #dce4ee;border-radius:14px;background:#fff;box-shadow:0 12px 32px rgba(24,39,65,.18)}.mobile-nav-accounting-menu .nav-item{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:42px;padding:8px 10px;border-radius:9px;color:var(--ink);font-size:12px}.mobile-nav-accounting-menu .nav-item svg{flex:0 0 18px}.mobile-nav-accounting-menu .nav-item span{max-width:none;text-overflow:clip}}
.sale-batch-lines { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.sale-batch-lines > .sale-batch-add { justify-self: start; }
.sale-batch-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .75fr) auto; gap: 10px; align-items: end; padding: 10px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.sale-batch-line > label { min-width: 0; }
.sale-batch-remove { min-height: 41px; }

/* Grouped navigation: keep the primary menu quiet and predictable. */
.main-nav > .nav-group { min-width: 0; }
.main-nav > .nav-group > .nav-group-items { overflow: hidden; }
.nav-group-toggle { user-select: none; }
.nav-group-items .nav-item { min-width: 0; }

@media (max-width: 760px) {
  .invoice-create-panel > .panel-header { padding: 16px; }
  .invoice-form { padding: 16px; gap: 14px; }
  .invoice-collapsible-summary { min-height: 58px; padding: 12px; }
  .invoice-sales-collapsible-body { padding: 0 10px 10px; }
  .invoice-sales-trigger { min-height: 48px; }
  .invoice-sales-menu { max-height: 42vh; }
  .invoice-sales-option { min-height: 48px; padding: 9px; }
  .invoice-payment-dashboard { margin-top: 14px; }
  .invoice-payment-cards { padding-inline: 10px; }
  .sale-batch-line { grid-template-columns: 1fr; }
  .sale-batch-line .button { width: 100%; }
  .invoice-items-wrap {
    padding: 10px;
  }
  .invoice-items-head {
    align-items: stretch;
    flex-direction: column;
  }
  .invoice-items-head .button {
    width: 100%;
  }
  .invoice-item-row {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }
  .invoice-item-row label:nth-child(1),
  .invoice-item-row label:nth-child(2),
  .invoice-row-total,
  .invoice-item-row > .button {
    grid-column: 1 / -1;
  }
  .invoice-item-row > .button {
    width: 100%;
  }
  .invoice-total-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 0;
    padding: 14px;
  }
  .invoice-total-card > div,
  .invoice-total-card > div:first-child,
  .invoice-total-card > div:last-child { padding-inline: 10px; border-inline-start: 1px solid #e3e8ef; }
  .invoice-total-card > div:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
  .invoice-total-card .invoice-grand-total {
    grid-column: 1 / -1;
    border-inline-start: 0;
    border-top: 3px solid var(--primary, #2563eb);
    padding-inline-start: 0;
    padding-top: 8px;
  }
  .sidebar {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .sidebar .main-nav { padding-bottom: 10px; }
  body.sidebar-menu-open { overflow: hidden; touch-action: none; }
  body.sidebar-menu-open .sidebar { touch-action: pan-y; }
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.nav-item svg, .quick-action svg, .button svg, .icon-button svg, .note-icon-button svg {
  flex: 0 0 auto;
  transition: transform .16s ease, stroke-width .16s ease;
}
.nav-item:hover svg, .quick-action:hover svg, .button:hover svg { transform: translateY(-.5px); }
.nav-item.active svg { stroke-width: 2.1; }
.control-nav svg { vector-effect: non-scaling-stroke; }

.app-shell { min-height: 100vh; display: flex; background: var(--bg); }
.sidebar {
  width: 256px; flex: 0 0 256px; min-height: 100vh; padding: 24px 16px 18px;
  display: flex; flex-direction: column; background: #fff; border-inline-end: 1px solid var(--line);
}
.brand { display: flex; gap: 10px; align-items: center; padding: 0 12px 27px; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, #766df5, #4d42d6); color: #fff; font: 800 19px Arial, sans-serif;
  box-shadow: 0 8px 16px rgba(91, 80, 230, .25);
}
.main-nav { display: grid; gap: 6px; }
.nav-group { display: block; }
.nav-group > summary { list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group-toggle {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 13px;
  border-radius: 11px; color: #676b85; cursor: pointer; transition: .15s ease;
}
.nav-group-toggle:hover { background: #f7f7fb; color: var(--primary); }
.nav-group-toggle.is-active { color: var(--primary); font-weight: 700; background: var(--primary-soft); }
.nav-group-toggle svg { flex: 0 0 auto; }
.nav-group-chevron { margin-inline-start: auto; font-size: 16px; line-height: 1; transition: transform .15s ease; }
.nav-group[open] .nav-group-chevron { transform: rotate(180deg); }
.nav-group-items { display: grid; gap: 3px; margin: 3px 0 4px; padding-inline-start: 13px; border-inline-start: 1px solid #e8e9f2; }
.nav-group-items .nav-item { min-height: 40px; padding-inline: 11px; font-size: 12px; }
.nav-group-items .nav-item svg { width: 17px; height: 17px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 13px; border-radius: 11px;
  color: #676b85; transition: .15s ease;
}
.nav-item:hover { background: #f7f7fb; color: var(--primary); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-item.active svg { stroke-width: 2.3; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding: 17px 5px 0; }
.app-landing-link { display: block; padding: 7px 6px 10px; color: #73758a; font-size: 12px; font-weight: 700; text-decoration: none; }
.app-landing-link:hover { color: var(--navy); }
.user-card { display: flex; gap: 10px; align-items: center; padding: 0 6px 15px; min-width: 0; color: inherit; text-decoration: none; cursor: pointer; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; border-radius: 50%; color: #564bd6; background: #e9e8ff; font-weight: 800; }
.avatar-image { object-fit: cover; object-position: center; }
.user-card-copy { display: grid; min-width: 0; }
.user-card-copy strong, .user-card-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-copy small { color: var(--muted); font-size: 11px; direction: ltr; text-align: right; }
.logout-button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; padding: 9px 6px; color: #73758a; background: transparent; text-align: right; }
.logout-button:hover { color: var(--danger); }
.logout-button svg { width: 18px; height: 18px; }

.main-content { min-width: 0; flex: 1; }
.topbar { min-height: 93px; padding: 20px 43px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255,255,255,.88); border-bottom: 1px solid var(--line); }
.topbar-title h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.4px; }
.eyebrow { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; }
.topbar-meta { color: #767c95; font-size: 12px; display: flex; align-items: center; gap: 8px; }
.secure-dot { width: 8px; height: 8px; border-radius: 50%; background: #6ccda5; box-shadow: 0 0 0 4px #e7f8f1; }
.menu-toggle { display: none; background: none; border: 0; font-size: 22px; color: var(--text); }
.sidebar-overlay { display: none; }
.content-wrap { padding: 32px 42px 45px; max-width: 1550px; }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.page-header h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.4px; }
.page-header p { margin: 0; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 7px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; transition: .15s ease; }
.button svg { width: 17px; height: 17px; }
.button.primary { color: #fff; background: var(--primary); box-shadow: 0 6px 14px rgba(91,80,230,.22); }
.button.primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.button.outline { color: #656a84; background: #fff; border-color: var(--line); }
.button.outline:hover { color: var(--primary); border-color: #cbc6fb; }
.button.danger { color: var(--danger); background: #fff6f7; border-color: #ffe2e7; }
.button.full { width: 100%; min-height: 47px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 17px; margin-bottom: 27px; }
.stat-card { position: relative; overflow: hidden; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 14px rgba(35,39,84,.025); }
.stat-card .stat-icon { display: inline-grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); }
.stat-card:nth-child(2) .stat-icon { color: #2b9bcb; background: #e5f6fe; }
.stat-card:nth-child(3) .stat-icon { color: #ec982e; background: #fff4df; }
.stat-card:nth-child(4) .stat-icon { color: #35a77f; background: #e6f8f0; }
.stat-label { display: block; margin-top: 15px; color: var(--muted); font-size: 13px; }
.stat-value { display: block; margin-top: 2px; font-size: 27px; font-weight: 800; letter-spacing: -.7px; }
.stat-hint { display: block; margin-top: 2px; color: #9a9db0; font-size: 11px; }
.stat-card-link { display: block; color: inherit; text-decoration: none; }
.stat-card-actionable { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.stat-card-actionable:hover, .stat-card-actionable:focus-within { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 8px 22px rgba(35,39,84,.10); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); gap: 20px; }
.panel { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 14px rgba(35,39,84,.025); }
.panel-header { min-height: 67px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 0; font-size: 15px; }
.panel-header a { color: var(--primary); font-size: 12px; font-weight: 700; }
.panel-header-action { border: 0; padding: 5px 8px; border-radius: 7px; color: var(--primary); background: #f0efff; font-size: 11px; font-weight: 800; cursor: pointer; }
.panel-header-action:hover { color: #fff; background: var(--primary); }
.recent-list { display: grid; }
.recent-item { display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid #f0f1f6; }
.recent-item:last-child { border-bottom: 0; }
.recent-avatar { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; color: #4f4b8e; background: #f0effd; font-weight: 800; }
.recent-copy { min-width: 0; flex: 1; }
.recent-copy strong, .recent-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-copy small { color: var(--muted); font-size: 12px; }
.recent-date { color: #a2a4b2; font-size: 11px; white-space: nowrap; }
.quick-actions { padding: 15px 20px 20px; display: grid; gap: 10px; }
.quick-action { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: #565a74; background: #fff; }
.quick-action:hover { border-color: #cfc9fa; color: var(--primary); background: #fbfaff; }
.quick-action svg { color: var(--primary); width: 19px; }
.role-dashboard-intro { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0 0 18px; padding:16px 19px; border:1px solid #dfe5f3; border-radius:14px; background:linear-gradient(135deg,#fff,#f8f9ff); }
.role-dashboard-intro > div { display:grid; gap:4px; }
.role-dashboard-intro strong { color:#34305f; font-size:17px; }
.role-dashboard-intro p { margin:0; color:#85879b; font-size:11px; }
.role-dashboard-scope { flex:0 0 auto; padding:7px 10px; border:1px solid #d8e9df; border-radius:999px; color:#28724d; background:#f0fbf5; font-size:11px; }
.role-dashboard-stats { margin-bottom:20px; }
.role-dashboard-grid { align-items:start; }
.role-dashboard-actions .quick-actions { min-height:190px; }
.role-dashboard-recent, .role-dashboard-empty { min-height:250px; }
.role-dashboard-global-note, .role-dashboard-empty { display:grid; align-content:center; justify-items:center; gap:8px; min-height:185px; padding:20px; text-align:center; color:#7c8094; }
.role-dashboard-global-note strong { color:#3b3973; }
.role-dashboard-global-note p, .role-dashboard-empty p { max-width:360px; margin:0; font-size:12px; line-height:1.9; }
@media (max-width: 650px) { .role-dashboard-intro { align-items:flex-start; flex-direction:column; gap:10px; } .role-dashboard-scope { align-self:flex-start; } }
.dashboard-metric-meta { display:flex; flex-wrap:wrap; align-items:center; gap:7px 14px; margin:-7px 0 12px; color:#7c8793; font-size:10px; }
.dashboard-metric-meta span { padding:5px 8px; border:1px solid #e2e9ee; border-radius:999px; background:#fbfdfe; }
.dashboard-metric-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.dashboard-metric-card { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; min-width:0; min-height:108px; padding:15px; border:1px solid var(--line); border-radius:14px; color:inherit; background:var(--surface); box-shadow:0 4px 14px rgba(35,39,84,.025); text-decoration:none; }
.dashboard-metric-card[href] { cursor:pointer; transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.dashboard-metric-card[href]:hover,.dashboard-metric-card[href]:focus-visible { transform:translateY(-2px); border-color:var(--primary); box-shadow:0 8px 22px rgba(35,39,84,.10); }
.dashboard-metric-icon { display:inline-grid; place-items:center; width:36px; height:36px; border-radius:10px; color:#286a8d; background:#edf7fc; }
.dashboard-metric-icon svg { width:18px; height:18px; }
.dashboard-metric-copy { display:grid; min-width:0; gap:3px; }
.dashboard-metric-copy strong { overflow:hidden; color:#29364a; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-metric-copy small { overflow:hidden; color:#8993a0; font-size:9px; line-height:1.7; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-metric-value { grid-column:2 / -1; color:#183f66; font-size:22px; font-weight:900; line-height:1.2; direction:rtl; }
.dashboard-metric-state { grid-column:1 / -1; justify-self:start; padding:4px 7px; border-radius:999px; font-size:9px; font-weight:800; }
.dashboard-metric-message { grid-column:1 / -1; color:#8993a0; font-size:9px; line-height:1.7; }
.dashboard-metric-card.state-stalled { border-color:#eadcae; background:#fffdf5; }
.dashboard-metric-card.state-stalled .dashboard-metric-state { color:#8b6a10; background:#fff2c7; }
.dashboard-metric-card.state-error { border-color:#efcaca; background:#fffafa; }
.dashboard-metric-card.state-error .dashboard-metric-state { color:#a03f3f; background:#ffe8e8; }
.dashboard-metric-card.state-partial { border-color:#f0d4a9; background:#fffaf1; }
.dashboard-metric-card.state-partial .dashboard-metric-state { color:#9b651a; background:#ffefcf; }
.dashboard-metric-card.state-ready .dashboard-metric-state { color:#28724d; background:#edf9f1; }
@media (max-width:1000px) { .dashboard-metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:520px) { .dashboard-metric-grid { grid-template-columns:1fr; } .dashboard-metric-meta { align-items:flex-start; flex-direction:column; gap:5px; } }
.quick-action span:last-child { margin-inline-start: auto; color: #a6a7b4; }
.dashboard-action-center { margin: 0 0 20px; overflow: hidden; }
.dashboard-action-center .panel-header { align-items: center; }
.dashboard-action-count { flex: 0 0 auto; padding: 6px 10px; border: 1px solid #dbe9e0; border-radius: 999px; color: #28724d; background: #f2fbf5; font-size: 10px; font-weight: 800; }
.dashboard-action-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 14px 18px 18px; }
.dashboard-action-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; border: 1px solid #e4e9ef; border-radius: 11px; color: #4d5368; background: #fff; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.dashboard-action-item:hover, .dashboard-action-item:focus-visible { border-color: #c7d9e8; box-shadow: 0 6px 16px rgba(31,55,78,.08); transform: translateY(-1px); }
.dashboard-action-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #27658a; background: #edf6fb; }
.dashboard-action-icon svg { width: 17px; height: 17px; }
.dashboard-action-item.red .dashboard-action-icon { color: #b95050; background: #fff1f1; }
.dashboard-action-item.yellow .dashboard-action-icon { color: #a87915; background: #fff8e7; }
.dashboard-action-item.green .dashboard-action-icon { color: #28724d; background: #edf9f1; }
.dashboard-action-copy { display: grid; gap: 3px; min-width: 0; }
.dashboard-action-copy strong { overflow: hidden; color: #3d4358; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-action-copy small { overflow: hidden; color: #9297a6; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-action-value { color: #263d54; font-size: 15px; font-weight: 900; }
.dashboard-action-arrow { color: #a6a7b4; font-size: 14px; }
.dashboard-action-empty { display: grid; gap: 5px; padding: 26px 18px; color: #888e9d; text-align: center; }
.dashboard-action-empty strong { color: #367050; font-size: 12px; }
.dashboard-action-empty span { font-size: 11px; }
@media (max-width: 700px) { .dashboard-action-list { grid-template-columns: 1fr; padding-inline: 12px; } .dashboard-action-center .panel-header { align-items: flex-start; flex-direction: column; } }
.detail-side-card { min-width: 0; }
.detail-side-card .compact-list { padding: 13px 15px 15px; }
.detail-side-card .panel-inner { padding: 16px 15px 18px; }
.sales-card .panel-header {
  min-height: 61px;
  padding: 14px 17px;
}
.sales-card .panel-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 64px;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid #e0e4e9;
  background: #f7f8fa;
}
.sales-card .panel-header-action svg {
  width: 13px;
  height: 13px;
}
.sales-card .panel-header-action:hover {
  border-color: var(--primary);
  background: var(--primary);
}
.sales-card .sales-list {
  padding: 14px 16px 17px;
}
.detail-empty { display: grid; justify-items: center; gap: 7px; padding: 24px 12px 25px; color: #5c6275; text-align: center; }
.detail-empty-icon { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 2px; border-radius: 12px; color: var(--primary); background: #f0efff; }
.detail-empty-icon svg { width: 20px; height: 20px; }
.detail-empty strong { font-size: 13px; }
.detail-empty small { max-width: 260px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.detail-empty .button { margin-top: 4px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 16px; }
.search-box { position: relative; width: min(380px, 100%); }
.search-box svg { position: absolute; top: 11px; inset-inline-start: 12px; width: 18px; color: #9699ae; }
.search-box input { width: 100%; height: 41px; padding-block: 0; padding-inline: 40px 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--text); background: #fff; }
.search-box input:focus { border-color: #aaa4f6; box-shadow: 0 0 0 3px #efedff; }
.table-card { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 14px rgba(35,39,84,.025); }
.sales-filter-panel, .sales-bulk-panel { margin-bottom: 12px; }
.sales-filter-panel, .sales-bulk-panel { overflow: hidden; }
.sales-filter-panel > .panel-header, .sales-bulk-panel > .panel-header { display: none; }
.sales-collapsible-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 10px 14px; cursor: pointer; list-style: none; border-bottom: 1px solid transparent; }
.sales-collapsible-summary::-webkit-details-marker { display: none; }
.sales-collapsible-summary strong { color: var(--text); font-size: 14px; }
.sales-collapsible-summary > span { color: var(--muted); font-size: 11px; }
.sales-collapsible-summary > i { color: var(--primary); font-style: normal; font-size: 16px; transition: transform .18s ease; }
.sales-filter-panel[open] > .sales-collapsible-summary, .sales-bulk-panel[open] > .sales-collapsible-summary { border-bottom-color: var(--line); }
.sales-filter-panel[open] > .sales-collapsible-summary > i, .sales-bulk-panel[open] > .sales-collapsible-summary > i { transform: rotate(180deg); }
.sales-filter-panel .panel-header, .sales-bulk-panel .panel-header { padding-block: 11px; }
.sales-filter-panel .panel-header h3, .sales-bulk-panel .panel-header h3 { margin: 0; font-size: 15px; }
.sales-filter-panel .panel-inner, .sales-bulk-panel .panel-inner { padding: 12px 14px 14px; }
.sales-filter-grid, .sales-bulk-form { gap: 10px; }
.sales-filter-grid label, .sales-bulk-form label { gap: 5px; }
.sales-filter-grid input, .sales-filter-grid select, .sales-bulk-form input, .sales-bulk-form select { min-height: 38px; }
.sales-bulk-panel .notice { margin-bottom: 10px; }
.sales-bulk-form .field-help { align-self: end; }
.sales-bulk-progress { margin: 0 14px 10px; padding: 11px 12px; border: 1px solid #dfe9e5; border-radius: 10px; background: #fbfdfc; }
.sales-bulk-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--primary); font-size: 12px; }
.sales-bulk-progress-head b { font-size: 14px; }
.sales-bulk-progress-track { height: 8px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #e8efec; }
.sales-bulk-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b9b72, #176b4d); transition: width .25s ease; }
.sales-bulk-progress-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.sales-bulk-history { margin-block: 0 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcff; color: var(--muted); font-size: 11px; }
.sales-bulk-history > summary { cursor: pointer; color: var(--text); font-weight: 700; }
.sales-bulk-history-body { display: grid; gap: 8px; margin-block-start: 8px; }
.sales-period-context { margin-block-start: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 710px; }
.leads-table { min-width: 1120px; width: 100%; table-layout: auto; }
.leads-table tbody td { font-family: var(--lead-row-font-family, inherit); font-size: var(--lead-row-font-size, inherit); font-weight: var(--lead-row-font-weight, inherit); }
.leads-table tbody td .entity-name, .leads-table tbody td .lead-priority-label, .leads-table tbody td .stage, .leads-table tbody td .status-dot { font-family: var(--lead-row-font-family, inherit); font-weight: var(--lead-row-font-weight, inherit); }
.leads-table tbody td[style*="--lead-cell"] { font-family: var(--lead-cell-font-family, var(--lead-row-font-family, inherit)); font-size: var(--lead-cell-font-size, var(--lead-row-font-size, inherit)); font-weight: var(--lead-cell-font-weight, var(--lead-row-font-weight, inherit)); }
.leads-table tbody td[style*="--lead-cell"] .entity-name, .leads-table tbody td[style*="--lead-cell"] .lead-priority-label, .leads-table tbody td[style*="--lead-cell"] .stage, .leads-table tbody td[style*="--lead-cell"] .status-dot { font-family: var(--lead-cell-font-family, var(--lead-row-font-family, inherit)); font-weight: var(--lead-cell-font-weight, var(--lead-row-font-weight, inherit)); }
.leads-table tbody tr { transition: background .16s ease; }
.leads-table tbody tr:hover { background: #fbfcff; }
.leads-table td, .leads-table th { white-space: nowrap; }
.leads-table th { min-width: 88px; }
.leads-table th:first-child, .leads-table td:first-child { min-width: 48px; }
.leads-table .lead-name-cell { position: relative; min-width: 220px; padding-inline: 28px 18px; }
.leads-table .lead-name-cell .entity-name { min-width: 180px; }
.leads-table .contact-cell a { color: var(--primary); direction: ltr; text-align: right; }
.leads-table td[data-label="مدرسه"] { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.lead-view-switcher { display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px; margin: 18px 0 24px; direction: rtl; vertical-align: middle; }
.lead-view-switcher-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.lead-view-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; transition: color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.lead-view-button svg { width: 16px; height: 16px; }
.lead-view-button:hover { color: var(--primary); border-color: #b7cde0; background: #f7fbff; }
.lead-view-button.is-active { color: #fff; border-color: var(--primary); background: var(--primary); box-shadow: 0 5px 14px rgba(29,92,145,.18); }
.lead-sort-control{display:inline-flex;align-items:center;gap:7px;min-height:36px;margin:18px 0 24px 18px;padding:5px 8px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--muted);font-size:11px;font-weight:800;vertical-align:middle}
.lead-sort-control svg{width:16px;height:16px;color:var(--primary)}
.lead-sort-control-label{white-space:nowrap}
.lead-sort-control select{max-width:160px;border:0;background:transparent;color:var(--text);font:inherit;font-size:11px;font-weight:800;outline:0;cursor:pointer}
.lead-sort-control:focus-within{border-color:#b7cde0;box-shadow:0 0 0 3px rgba(29,92,145,.1)}
.lead-results-view{clear:both;margin-top:8px}
.lead-results-view[hidden] { display: none !important; }
.lead-results-cards { min-width: 0; }
.lead-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lead-card { position: relative; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 5px 16px rgba(35,39,84,.045); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.lead-card:hover { border-color: #b9cde0; box-shadow: 0 9px 24px rgba(35,39,84,.09); transform: translateY(-1px); }
.lead-card.lead-row-priority-hot { border-inline-start: 4px solid #d94c44; }
.lead-card.lead-row-priority-warm { border-inline-start: 4px solid #db8b27; }
.lead-card.lead-row-priority-cold { border-inline-start: 4px solid #4e83c2; }
.lead-card.lead-row-stage-l8 { background: linear-gradient(135deg, rgba(126,97,162,.045), #fff); }
.lead-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #edf0f5; }
.lead-card-title { min-width: 0; color: var(--text); text-decoration: none; font-weight: 800; }
.lead-card-title .entity { min-width: 0; }
.lead-card-title .entity-name { white-space: normal; overflow-wrap: anywhere; }
.lead-card-select { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.lead-card-select input { appearance: none; -webkit-appearance: none; display: inline-grid; place-items: center; box-sizing: border-box; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; padding: 0; border: 1.5px solid #bdc9d6; border-radius: 4px; background: #fff; cursor: pointer; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.lead-card-select input:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,92,145,.12); }
.lead-card-select input:checked { border-color: var(--primary); background: var(--primary); }
.lead-card-select input:checked::after { content: ""; display: block; width: 5px; height: 9px; margin: 0; border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); transform-origin: center; }
.lead-card-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding: 13px 0 7px; }
.lead-card-fact { min-width: 0; }
.lead-card-fact.is-wide { grid-column: span 2; }
.lead-card-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.lead-card-value { min-width: 0; color: var(--text); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.lead-card-value a { color: var(--primary); direction: ltr; }
.lead-card-value .lead-priority-label { font-size: 10px; }
.lead-card-actions { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 11px; border-top: 1px solid #edf0f5; }
.lead-card-actions .button { min-height: 34px; padding: 6px 10px; font-size: 10px; }
.lead-card-actions .button:focus-visible, .lead-view-button:focus-visible, .lead-card-select input:focus-visible { outline: 3px solid rgba(29,92,145,.2); outline-offset: 2px; }
.lead-results-table .table-card { overflow-x: auto; }
.lead-results-table .leads-table td, .lead-results-table .leads-table th { padding-block: 10px; }
.lead-priority-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; }
.lead-priority-label::before { width: 8px; height: 8px; border-radius: 50%; background: currentColor; content: ""; }
.lead-priority-label.priority-hot { color: #d94c44; }
.lead-priority-label.priority-warm { color: #db8b27; }
.lead-priority-label.priority-cold { color: #4e83c2; }
.lead-priority-dot { position: absolute; top: 12px; inset-inline-start: 10px; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 3px #fff; }
.lead-filter-panel > form.lead-filters { display: grid; }
.lead-multi-filter-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcff; }
.lead-multi-filter-form .multi-filter-heading { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; color: #27324a; font-weight: 800; }
.lead-multi-filter-form .multi-filter-heading small { color: #7c8496; font-size: 11px; font-weight: 500; }
.lead-multi-filter-form label { display: grid; gap: 6px; color: #646d80; font-size: 12px; font-weight: 700; }
.lead-multi-filter-form select[multiple] { min-height: 84px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #28334a; }
.lead-multi-filter-form select[multiple] option { padding: 6px; border-radius: 6px; }
.lead-multi-filter-form select[multiple] option:checked { color: #173f68; background: #e7f0fb; font-weight: 800; }
.lead-multi-filter-form .filter-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.lead-multi-filter-form { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; }
.lead-multi-filter-form .multi-filter-heading { min-height: 28px; align-items: center; }
.lead-multi-filter-form .multi-filter-heading small { line-height: 1.8; }
.lead-multi-filter-form label { min-width: 0; }
.lead-multi-filter-form select.multi-filter-source { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.multi-picker { position: relative; min-width: 0; }
.multi-picker-toggle { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: #28334a; cursor: pointer; text-align: right; font: inherit; }
.multi-picker-toggle::after { content: "⌄"; color: var(--muted); font-size: 16px; line-height: 1; }
.multi-picker-toggle:hover, .multi-picker.open .multi-picker-toggle { border-color: #9db8d0; box-shadow: 0 0 0 3px rgba(39, 91, 133, .08); }
.multi-picker-toggle.has-value { border-color: #7ea8c9; background: #f4f9fd; color: #173f68; }
.multi-picker-caption { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-picker-count { flex: 0 0 auto; min-width: 21px; height: 21px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #e4eef7; color: #245579; font-size: 11px; }
.multi-picker:not(.open) .multi-picker-count:empty { display: none; }
.multi-picker-menu { display: none; position: absolute; z-index: 80; inset-inline: 0; top: calc(100% + 7px); min-width: 220px; max-height: 300px; overflow: auto; padding: 7px; border: 1px solid #cbd8e4; border-radius: 13px; background: #fff; box-shadow: 0 14px 32px rgba(27, 52, 77, .16); }
.multi-picker.open .multi-picker-menu { display: grid; gap: 2px; }
.multi-picker-menu-actions { display: flex; justify-content: flex-start; padding: 2px 3px 6px; border-bottom: 1px solid #edf1f5; margin-bottom: 3px; }
.multi-picker-clear { border: 0; background: transparent; color: #6f7d8c; cursor: pointer; font: inherit; font-size: 11px; }
.multi-picker-clear:hover { color: #b44949; }
.multi-picker-option { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 8px !important; padding: 8px 7px; border-radius: 8px; color: #334154 !important; font-size: 12px !important; font-weight: 600 !important; cursor: pointer; }
.multi-picker-option:hover { background: #f2f6fa; }
.multi-picker-option input { width: 16px; height: 16px; margin: 0; accent-color: #245a84; }
.multi-picker-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-multi-filter-form .filter-actions { margin-top: 2px; }
.multi-filter-collapse-bar { display: flex; justify-content: flex-start; align-items: center; margin-top: 12px; }
.multi-filter-collapse { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 11px; border: 1px solid #d9e1eb; border-radius: 10px; background: #fff; color: #52647a; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; transition: .18s ease; }
.multi-filter-collapse:hover, .multi-filter-collapse:focus-visible { border-color: #9db8d0; color: #173f68; box-shadow: 0 3px 12px rgba(39, 91, 133, .10); outline: none; }
.multi-filter-collapse-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; background: #eef4f9; color: #245a84; font-size: 14px; line-height: 1; }
.lead-multi-filter-form.is-collapsed { display: none; }
.multi-filter-collapse.is-collapsed { background: #f5f8fb; color: #245a84; }
.priority-dot-priority-hot { background: #e04b3f; }
.priority-dot-priority-warm { background: #ee941d; }
.priority-dot-priority-cold { background: #478bc1; }
.leads-table tbody tr.lead-row-priority-hot { box-shadow: inset -3px 0 0 #e04b3f; }
.leads-table tbody tr.lead-row-priority-warm { box-shadow: inset -3px 0 0 #ee941d; }
.leads-table tbody tr.lead-row-priority-cold { box-shadow: inset -3px 0 0 #478bc1; }
.leads-table tbody tr.lead-row-stage-l8 { background: linear-gradient(90deg, rgba(126, 97, 162, 0.035), rgba(255, 255, 255, 0)); }
th { padding: 14px 18px; color: #85889c; background: #fbfbfd; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; text-align: right; white-space: nowrap; }
td { padding: 15px 18px; border-bottom: 1px solid #f0f1f6; color: #50546c; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.entity-name { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #363950; }
.entity-avatar { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; color: #5a50da; background: #efedff; font-size: 13px; }
.subtext { display: block; margin-top: 2px; color: #9598aa; font-size: 11px; }
.muted { color: var(--muted); }
.empty-state { display: grid; place-items: center; padding: 70px 20px; text-align: center; }
.empty-state > svg { width: 45px; height: 45px; margin-bottom: 12px; color: #8d87e8; stroke-width: 1.3; }
.empty-state h3 { margin: 0 0 5px; font-size: 17px; }
.empty-state p { max-width: 420px; margin: 0 0 17px; color: var(--muted); }
.inline-form { display: inline; }
.table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.icon-button { border: 0; padding: 6px; color: #989bad; background: transparent; border-radius: 7px; }
.icon-button:hover { color: var(--danger); background: #fff1f3; }
.icon-button svg { width: 18px; }
.stage { display: inline-flex; align-items: center; min-height: 27px; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.stage-lead { color: #6a6396; background: #eeedf6; }
.stage-negotiation { color: #277fa9; background: #e4f5fc; }
.stage-proposal { color: #a0681d; background: #fff1dc; }
.stage-won { color: #1f8966; background: #e3f7ef; }
.stage-lost { color: #ba5262; background: #feecef; }
.stage-select { padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; color: #5f637a; background: #fff; }
.notice { margin-bottom: 18px; padding: 11px 13px; border-radius: 10px; font-size: 13px; }
.notice.success { color: #1e7f61; background: #e8f8f1; border: 1px solid #cbeede; }
.notice.error { color: #b53e50; background: #fff0f2; border: 1px solid #ffd9df; }

.modal { position: fixed; z-index: 20; inset: 0; display: none; padding: 24px; align-items: center; justify-content: center; }
.modal.is-open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(29, 31, 55, .46); backdrop-filter: blur(2px); }
.modal-card { position: relative; width: min(620px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 26px; border-radius: 16px; background: #fff; box-shadow: 0 25px 70px rgba(24,27,57,.25); }
.modal-card h2 { margin: 0 0 20px; font-size: 18px; }
.bulk-phone-less-review { display: flex; background: rgba(29, 31, 55, .46); backdrop-filter: blur(2px); border: 0; max-width: none; max-height: none; width: 100%; height: 100%; padding: 24px; align-items: center; justify-content: center; }
.bulk-phone-less-review::backdrop { background: rgba(29, 31, 55, .46); }
.bulk-phone-less-review .modal-card { width: min(1180px, 100%); max-height: calc(100vh - 48px); overflow: auto; }
.bulk-phone-less-review .modal-header { align-items: flex-start; }
.bulk-phone-less-review .info-grid { margin: 16px 0; }
.bulk-phone-less-review .table-card { max-height: 46vh; overflow: auto; }
.bulk-phone-less-review table { min-width: 760px; }
.bulk-phone-less-review td small { display: block; margin-top: 4px; }
.bulk-phone-less-card .notice { margin-top: 4px; }
.modal-close { position: absolute; inset-inline-end: 14px; top: 12px; width: 31px; height: 31px; border: 0; border-radius: 7px; color: #70738a; background: #f5f5f9; font-size: 24px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full-row { grid-column: 1 / -1; }
.form-grid .form-span-2 { grid-column: 1 / -1; }
.form-field-registry-custom { grid-column: 1 / -1; min-width: 0; margin: 2px 0 0; padding: 14px; border: 1px solid #e5e7ef; border-radius: 12px; background: #fbfcfe; box-sizing: border-box; }
.form-field-registry-custom > legend { margin-inline: 8px; padding: 0 6px; color: #4d5270; font-size: 12px; font-weight: 800; }
.form-field-registry-custom > .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; min-width: 0; }
.form-field-registry-custom > .form-grid > label { min-width: 0; overflow-wrap: anywhere; }
.form-field-registry-custom > .form-grid > label:has(textarea) { grid-column: 1 / -1; }
.form-field-registry-custom input,
.form-field-registry-custom select,
.form-field-registry-custom textarea { min-width: 0; box-sizing: border-box; }
.form-field-registry-custom textarea { min-height: 96px; }
.form-field-registry-item { min-width: 0; overflow-wrap: anywhere; }
.form-field-registry-item--wide { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .form-field-registry-custom > .form-grid { grid-template-columns: 1fr; }
  .form-field-registry-custom > .form-grid > label,
  .form-field-registry-item--wide { grid-column: auto; }
}
label { display: grid; gap: 6px; color: #53566e; font-size: 12px; font-weight: 700; }
.form-field-caption { display: inline-flex !important; align-items: baseline !important; column-gap: 8px !important; min-width: 0 !important; line-height: 1.7 !important; direction: rtl; }
.form-field-caption > span:first-child { min-width: 0 !important; }
.required-hint { display: inline-flex !important; align-items: center !important; flex: 0 0 auto !important; margin-inline-start: 3px !important; margin-inline-end: 0 !important; padding: 1px 5px !important; border: 1px solid #e7e9ee !important; border-radius: 999px !important; color: #9aa1ad !important; background: #f7f8fa !important; font-size: 10px !important; font-weight: 500 !important; line-height: 1.45 !important; white-space: nowrap !important; }
.form-field-caption + input,
.form-field-caption + select,
.form-field-caption + textarea { margin-top: 0; }
input, select, textarea { width: 100%; border: 1px solid #dedfe9; border-radius: 9px; outline: 0; color: var(--text); background: #fff; }
input, select { min-height: 41px; padding: 8px 11px; }
textarea { min-height: 82px; padding: 9px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #a6a0f2; box-shadow: 0 0 0 3px #f0efff; }
.form-actions { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin-top: 22px; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(430px, .85fr); background: #fff; }
.login-visual { position: relative; overflow: hidden; padding: 46px clamp(45px, 7vw, 128px); display: flex; flex-direction: column; color: #fff; background: linear-gradient(140deg, #6256e7 0%, #3d35ba 100%); }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; }
.login-brand .brand-mark { background: rgba(255,255,255,.18); box-shadow: none; }
.visual-copy { position: relative; z-index: 1; max-width: 560px; margin: auto 0; }
.visual-label { display: inline-block; margin-bottom: 18px; padding: 6px 11px; border-radius: 99px; background: rgba(255,255,255,.15); font-size: 12px; }
.visual-copy h1 { max-width: 520px; margin: 0 0 17px; font-size: clamp(30px, 3.1vw, 47px); line-height: 1.42; letter-spacing: -1.2px; }
.visual-copy p { max-width: 460px; margin: 0; color: rgba(255,255,255,.76); font-size: 16px; }
.visual-orbs::before, .visual-orbs::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.09); }
.visual-orbs::before { width: 510px; height: 510px; left: -220px; bottom: -230px; box-shadow: 0 0 0 55px rgba(255,255,255,.03), 0 0 0 110px rgba(255,255,255,.025); }
.visual-orbs::after { width: 290px; height: 290px; top: -110px; left: 11%; background: rgba(255,255,255,.035); }
.login-panel { display: grid; place-items: center; padding: 35px; background: #f9f9fc; }
.login-card { width: min(400px, 100%); padding: 12px; }
.panel-kicker { color: var(--primary); font-size: 12px; font-weight: 800; }
.login-card h2 { margin: 5px 0; font-size: 25px; letter-spacing: -.6px; }
.login-card .muted { margin: 0 0 27px; }
.login-card label { margin-bottom: 16px; }
.login-card input { min-height: 47px; background: #fff; }
.register-card { width: min(620px, 100%); }
.register-card .form-grid { margin-bottom: 8px; }
.auth-switch { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.auth-switch a { color: var(--primary); font-weight: 800; text-decoration: none; }
.login-footer { margin: 20px 0 0; color: #9a9cad; font-size: 11px; text-align: center; }

.installer-body { min-height: 100vh; padding: 42px 20px; background: linear-gradient(145deg, #f1f0ff 0%, #f8f9fc 42%, #f4f7ff 100%); }
.installer-wrap { display: grid; place-items: center; min-height: calc(100vh - 84px); }
.installer-card { width: min(760px, 100%); padding: clamp(25px, 5vw, 44px); border: 1px solid rgba(222,223,233,.9); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.installer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 29px; }
.installer-brand div { display: grid; line-height: 1.4; }
.installer-brand small { color: var(--muted); font-size: 11px; }
.installer-card > h1 { margin: 0 0 5px; font-size: 23px; }
.installer-card > p { margin: 0 0 25px; color: var(--muted); }
.installer-card form > h2 { margin: 27px 0 13px; color: #464961; font-size: 14px; }
.installer-note { margin: 24px 0 0 !important; padding-top: 18px; border-top: 1px solid var(--line); color: #8b8ea1 !important; font-size: 11px; }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .content-wrap { padding: 27px 25px; }
  .topbar { padding: 20px 26px; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; z-index: 60; top: 0; bottom: 0; inset-inline-start: -265px; transition: inset-inline-start .2s ease; box-shadow: -10px 0 30px rgba(31,33,70,.13); }
  .sidebar.is-open { inset-inline-start: 0; }
  .sidebar-overlay { display: block; position: fixed; z-index: 50; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(22, 35, 52, .24); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
  .sidebar-overlay.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
  .menu-toggle { display: block; }
  .topbar { min-height: 76px; padding: 16px 18px; }
  .topbar-meta {
    display: flex;
    gap: 0;
    flex: 0 0 auto;
  }
  .topbar-meta > .secure-dot,
  .topbar-meta > span:nth-child(2) {
    display: none;
  }
  .topbar-meta .notification-summary {
    position: relative;
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    justify-content: center;
    gap: 0;
    border-radius: 10px;
  }
  .topbar-meta .notification-summary-label {
    display: none;
  }
  .topbar-meta .notification-summary-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }
  .topbar-meta .notification-summary-icon svg {
    width: 19px;
    height: 19px;
  }
  .topbar-meta .notification-summary .notification-badge {
    position: absolute;
    top: -5px;
    inset-inline-end: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid #fff;
    font-size: 9px;
    line-height: 14px;
  }
  .content-wrap { padding: 22px 16px 32px; }
  .page-header { align-items: stretch; flex-direction: column; }
  .page-header .button { align-self: flex-start; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .filter-toolbar .inline-form, .filter-toolbar .inline-form select,
  .lead-filters, .lead-filters label, .lead-filters input, .lead-filters select { width: 100%; }
  .filter-toolbar .inline-form select { min-height: 43px; }
  .filter-group { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: thin; }
  .filter-chip { flex: 0 0 auto; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 15px; }
  .dashboard-grid .panel-header { min-height: 58px; padding: 14px 15px; }
  .recent-item { gap: 9px; padding: 13px 14px; }
  .recent-copy { min-width: 0; }
  .recent-copy strong { font-size: 12px; }
  .recent-copy small { font-size: 10px; line-height: 1.7; }
  .recent-date { align-self: flex-start; font-size: 10px; white-space: nowrap; }
  .stat-value { font-size: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full-row { grid-column: auto; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; padding: 24px; background: linear-gradient(180deg, #f5f4ff 0, #fff 42%); }
}

/* CRM educational V1 additions: shared tokens are owned by crm-ui-foundation.css. */
.brand-mark { background: linear-gradient(135deg, #1d5c91, #0d3154); }
.brand-image { width: 34px; height: 34px; border-radius: 11px; object-fit: cover; }
.sidebar-caption { margin: -18px 12px 20px; color: #9aa5b5; font-size: 10px; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); }
.button.primary { background: var(--primary); box-shadow: 0 6px 14px rgba(18,58,99,.22); }
.button.primary:hover { background: var(--primary-dark); }
.login-visual { background: linear-gradient(140deg, #164d7e 0%, #0a2d50 100%); }
.notification-badge, .count-badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; color: #fff; background: var(--danger); font-size: 10px; }
.count-badge { color: var(--primary); background: var(--primary-soft); vertical-align: middle; }
.filter-toolbar { align-items: flex-start; flex-wrap: wrap; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { min-height: 31px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: #70768a; background: #fff; font-size: 11px; }
.filter-chip.active, .filter-chip:hover { color: var(--primary); border-color: #a9bfd4; background: var(--primary-soft); }
.lead-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 33, 70, .05);
}
.lead-filters label {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}
.lead-filters label > span {
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}
.lead-filters input,
.lead-filters select {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #dfe3eb;
  border-radius: 10px;
  color: var(--text);
  background: #fbfcfe;
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.lead-filters input:focus,
.lead-filters select:focus {
  border-color: #9bb6d0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 58, 99, .1);
}
.lead-filters .filter-search {
  position: relative;
  grid-column: span 2;
  display: block;
  padding-top: 0;
}
.lead-filters .filter-search svg {
  position: absolute;
  top: 12px;
  inset-inline-start: 11px;
  width: 17px;
  height: 17px;
  color: #8c96a8;
  pointer-events: none;
}
.lead-filters .filter-search input {
  min-height: 40px;
  padding-inline-start: 37px;
}
.lead-global-search {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d7e4ef;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7fbff 0%, #ffffff 72%);
}
.lead-global-search-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.lead-global-search-heading label {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}
.lead-global-search-heading small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
  text-align: left;
}
.lead-global-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.lead-global-search-row input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 9px 40px 9px 12px;
  border: 1px solid #dfe3eb;
  border-radius: 11px;
  color: var(--text);
  background: #fff;
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lead-global-search-row input:focus {
  border-color: #8eafd0;
  box-shadow: 0 0 0 3px rgba(18, 58, 99, .1);
}
.lead-global-search-icon {
  position: absolute;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 42px;
  color: #71859a;
  pointer-events: none;
}
.lead-global-search-icon svg {
  width: 17px;
  height: 17px;
}
.lead-filter-persistence-note {
  display: block;
  color: #4f6d86;
  font-size: 10px;
  line-height: 1.8;
}
.lead-global-search-row .button {
  flex: 0 0 auto;
  min-height: 44px;
  white-space: nowrap;
}
.lead-quick-search-results {
  display: grid;
  gap: 4px;
  margin-top: 2px;
  padding: 5px;
  border: 1px solid #d9e4ee;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 58, 99, .1);
}
.lead-quick-search-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 9px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.lead-quick-search-item:hover,
.lead-quick-search-item:focus-visible {
  background: #f3f8fc;
  transform: translateX(-2px);
}
.lead-quick-search-avatar {
  display: inline-grid;
  flex: 0 0 31px;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  color: #17577e;
  background: #eaf4fb;
  font-weight: 800;
}
.lead-quick-search-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}
.lead-quick-search-copy strong,
.lead-quick-search-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-quick-search-copy strong { font-size: 12px; }
.lead-quick-search-copy small { color: var(--muted); font-size: 10px; }
.lead-quick-search-arrow {
  color: #7892a6;
  font-size: 18px;
  line-height: 1;
}
.lead-quick-search-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.sale-detail-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 66px;
  padding: 11px 16px 11px 18px;
  border: 1px solid #e5e8ec;
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(32, 45, 61, .03);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.sale-detail-trigger:hover,
.sale-detail-trigger:focus-visible {
  border-color: #cbd3dc;
  background: #fff;
  box-shadow: 0 5px 14px rgba(32, 45, 61, .08);
  transform: translateX(-2px);
}
.sale-detail-trigger:focus-visible {
  outline: 2px solid #aeb8c3;
  outline-offset: 2px;
}
.sales-list {
  display: grid;
  gap: 8px;
}
.sales-list .compact-item {
  border-bottom: 0;
}
.sale-detail-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  color: #59636e;
  background: #f0f2f4;
}
.sale-detail-trigger-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 5px;
  padding-inline: 2px;
}
.sale-detail-trigger-copy strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.7;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sale-detail-trigger-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sale-detail-trigger-arrow {
  display: inline-grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #dfe3e7;
  border-radius: 8px;
  color: #59636e;
  background: #f7f8f9;
  line-height: 1;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.sale-detail-trigger:hover .sale-detail-trigger-arrow,
.sale-detail-trigger:focus-visible .sale-detail-trigger-arrow {
  border-color: #c4cbd2;
  color: #20262d;
  background: #eceff2;
}
.sale-detail-trigger-arrow svg {
  width: 14px;
  height: 14px;
}
.sale-detail-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e9ef;
  border-radius: 12px;
  background: #fff;
}
.sale-detail-summary > div {
  display: grid;
  gap: 3px;
}
.sale-detail-summary small {
  color: var(--muted);
  font-size: 11px;
}
.sale-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.sale-detail-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #edf0f3;
  border-radius: 9px;
  background: #fff;
}
.sale-detail-grid span {
  color: var(--muted);
  font-size: 10px;
}
.sale-detail-grid strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}
.sale-detail-items { margin-top: 14px; min-width: 0; }
.sale-detail-items h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; font-size: 13px; }
.sale-detail-items .table-wrap { max-height: 310px; overflow: auto; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; }
.sale-detail-items table { min-width: 620px; }
.sale-detail-items td:first-child { min-width: 190px; }
.sale-detail-items .subtext { display: block; margin-top: 3px; }
.sale-item-snapshot { margin-top: 5px; color: var(--muted); font-size: 11px; }
.sale-item-snapshot summary { width: fit-content; cursor: pointer; color: var(--primary, #4f46e5); }
.sale-item-snapshot p { margin: 6px 0; line-height: 1.7; white-space: normal; }
.sale-item-snapshot dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; margin: 6px 0; }
.sale-item-snapshot dl div { display: flex; flex-wrap: wrap; gap: 4px; }
.sale-item-snapshot dt { font-weight: 700; }
.sale-item-snapshot dd { margin: 0; }
.lead-comments-panel {
  margin-top: 16px;
  border: 1px solid #e1e5ea;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f5f7f9 100%);
  box-shadow: 0 12px 28px rgba(32, 45, 61, .06);
  overflow: hidden;
}
.lead-comments-panel > .section-heading { padding: 14px 16px 10px; margin: 0; border-bottom: 1px solid #e5e9ed; background: rgba(255,255,255,.78); }
.lead-comments-panel > .section-heading h3 { display: flex; align-items: center; gap: 7px; margin: 0; }
.lead-comments-panel > .section-heading .subtext { display: block; max-width: 650px; margin-top: 5px; line-height: 1.8; }
.lead-comment-audience {
  padding: 5px 9px;
  border: 1px solid #dfe3e8;
  border-radius: 999px;
  color: #68717c;
  background: #fff;
  font-size: 10px;
  white-space: nowrap;
}
.lead-comment-thread {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding: 14px 16px 10px;
  scrollbar-width: thin;
}
.lead-comment {
  max-width: 92%;
  padding: 11px 13px;
  border: 1px solid #e0e4e8;
  border-radius: 12px 12px 12px 4px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(32, 45, 61, .04);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.lead-comment:hover { border-color: #cbd3db; box-shadow: 0 7px 18px rgba(32, 45, 61, .08); transform: translateY(-1px); }
.lead-comment.is-mine {
  margin-inline-start: auto;
  border-color: #d7dce2;
  border-radius: 12px 12px 4px 12px;
  background: #f0f2f5;
}
.lead-comment.is-public { border-inline-start: 3px solid #4c8d68; }
.lead-comment.is-private { border-inline-start: 3px solid #a8b2bd; }
.lead-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}
.lead-comment-head strong { font-size: 12px; }
.lead-comment-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.lead-comment-head time,
.lead-comment-recipient {
  color: var(--muted);
  font-size: 10px;
}
.lead-comment-visibility { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; color: #5b6874; background: #eef1f4; }
.lead-comment.is-public .lead-comment-visibility { color: #28704a; background: #e9f5ed; }
.lead-comment p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.9;
  white-space: normal;
  overflow-wrap: anywhere;
}
.lead-comment-recipient {
  display: block;
  margin-top: 5px;
}
.lead-comment-reply {
  margin-top: 8px;
  border-top: 1px solid #e4e7eb;
  padding-top: 7px;
}
.lead-comment-reply summary {
  color: #5e6874;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.lead-comment-form {
  display: grid;
  gap: 8px;
  margin: 8px 16px 16px;
  padding: 12px;
  border: 1px solid #e0e5e9;
  border-radius: 12px;
  background: rgba(255,255,255,.86);
}
.lead-comment-form label { display: grid; gap: 5px; color: #5b6671; font-size: 11px; font-weight: 700; }
.lead-comment-form select { width: 100%; min-height: 38px; border: 1px solid #d9dee4; border-radius: 9px; padding: 7px 9px; background: #fff; color: var(--text); font: inherit; }
.lead-comment-form select:focus { border-color: #82909e; outline: 0; box-shadow: 0 0 0 3px rgba(70, 82, 96, .1); }
.lead-comment-form textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1px solid #d9dee4;
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.lead-comment-form textarea:focus {
  border-color: #9ba5b0;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(70, 82, 96, .1);
}
.lead-comment-empty { margin: 4px 0 10px; }
@media (max-width: 700px) {
  .lead-comments-panel > .section-heading { padding: 12px; }
  .lead-comment-thread { padding: 12px; max-height: 60vh; }
  .lead-comment { max-width: 96%; }
  .lead-comment-form { margin-inline: 12px; }
}
.filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  min-width: 0;
}
.filter-actions .button {
  min-height: 40px;
  white-space: nowrap;
}
.lead-filter-panel { width: 100%; }
.lead-filter-panel > summary { display: none; }
.lead-status-badge, .lead-stage-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 9px;
  border: 1px solid #dfe7ef;
  border-radius: 999px;
  color: #38627f;
  background: #f1f7fb;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.lead-stage-badge { color: #625b91; border-color: #e4e1f2; background: #f5f3fb; }
.lead-row-actions { display: inline-flex; align-items: center; gap: 4px; }
.lead-row-action { width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; border: 1px solid #e5eaf1; color: var(--primary); background: #fff; }
.lead-row-action:hover { color: #fff; background: var(--primary); }
.lead-delete-button { color: #b42318; border-color: #f1b7b2; font-size: 22px; line-height: 1; }
.lead-delete-button:hover, .lead-delete-button:focus-visible { background: #fff1f0; color: #8a160f; }
.trash-toolbar { margin-bottom: 16px; }
.trash-page .table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.trash-page { max-width: 1380px; margin-inline: auto; }
.trash-page .page-header { margin-bottom: 14px; }
.trash-page .page-header h1 { margin-bottom: 6px; font-size: clamp(24px, 2.4vw, 34px); }
.trash-page .page-header p { max-width: 720px; line-height: 1.9; }
.trash-overview-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: center; margin-bottom: 14px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 14px; background: linear-gradient(135deg, #ffffff, #f8fbff); box-shadow: 0 7px 22px rgba(19, 52, 88, .045); }
.trash-overview-item { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 4px 8px; }
.trash-overview-item strong, .trash-overview-item small { display: block; }
.trash-overview-item strong { color: var(--primary); font-size: 12px; }
.trash-overview-item small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.trash-overview-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px; color: #8b5e00; background: #fff7dc; font-size: 18px; font-weight: 800; }
.trash-overview-icon.restore { color: #176b4a; background: #eaf8f0; }
.trash-overview-icon.danger { color: #b42318; background: #fff0ee; }
.trash-overview-count { display: grid; min-width: 106px; justify-items: center; padding: 6px 12px; border-inline-start: 1px solid #e2e8f0; text-align: center; }
.trash-overview-count strong { color: var(--primary); font-size: 19px; line-height: 1.2; }
.trash-overview-count small { margin-top: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.trash-toolbar { padding: 0; overflow: hidden; }
.trash-toolbar form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(150px, .45fr) minmax(130px, .35fr) auto; align-items: end; gap: 12px; padding: 16px; }
.trash-toolbar label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.trash-toolbar select, .trash-toolbar input[type="search"] { min-height: 40px; border-radius: 9px; }
.trash-toolbar input[type="search"]:focus-visible, .trash-toolbar select:focus-visible { outline: 3px solid rgba(44, 105, 190, .22); outline-offset: 1px; border-color: var(--primary); }
.trash-toolbar .form-actions { margin: 0; }
.trash-page .table-card { overflow: hidden; }
.trash-bulk-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin: -2px -2px 10px; border-bottom: 1px solid #e8eef5; background: #fbfdff; }
.trash-bulk-toolbar .muted { font-size: 12px; }
.trash-page .table-card table { min-width: 760px; }
.trash-page .table-card tbody tr { transition: background .16s ease; }
.trash-page .table-card tbody tr:hover { background: #f8fbff; }
.trash-page .table-card td, .trash-page .table-card th { vertical-align: middle; }
.trash-page .table-card td:nth-child(2) { font-weight: 700; color: var(--text); }
.trash-page .table-card td:nth-child(2) .subtext { display: block; margin-top: 3px; font-weight: 500; }
.trash-page .table-actions { justify-content: flex-start; }
.trash-page .table-actions .button { min-height: 34px; }
.trash-page .pagination { justify-content: space-between; align-items: center; padding: 13px 16px 3px; }
@media (max-width: 900px) { .trash-overview-strip { grid-template-columns: 1fr 1fr; } .trash-overview-count { justify-items: start; border-inline-start: 0; border-top: 1px solid #e2e8f0; text-align: start; } .trash-toolbar form { grid-template-columns: 1fr 1fr; } .trash-toolbar .form-actions { grid-column: 1 / -1; } }
@media (max-width: 620px) { .trash-overview-strip { grid-template-columns: 1fr; } .trash-overview-item { padding-inline: 2px; } .trash-overview-count { grid-column: auto; } .trash-toolbar form { grid-template-columns: 1fr; } .trash-toolbar .form-actions { grid-column: auto; } .trash-toolbar .button { width: 100%; } .trash-page .pagination { align-items: stretch; flex-direction: column; } }
.trash-delete-review { max-width: 980px; margin-inline: auto; }
.trash-warning-card { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; padding: 17px 20px; border-color: #f0d79b; background: #fffaf0; }
.trash-warning-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; color: #8b5e00; background: #ffe9a8; font-weight: 900; font-size: 20px; }
.trash-warning-card h2 { margin: 0 0 5px; color: #7b5200; font-size: 15px; }
.trash-warning-card p { margin: 0; color: #765f31; line-height: 1.9; font-size: 12px; }
.trash-review-panel { margin-bottom: 14px; overflow: hidden; }
.trash-review-panel .panel-header { min-height: 58px; }
.trash-count-badge { padding: 6px 10px; border-radius: 999px; color: #145c42; background: #eaf8f0; font-size: 11px; font-weight: 800; white-space: nowrap; }
.trash-sales-list { display: grid; gap: 0; }
.trash-sales-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid #edf1f5; font-size: 12px; }
.trash-sales-row:last-child { border-bottom: 0; }
.trash-sales-row span { color: var(--muted); font-size: 11px; }
.trash-sales-row b { color: var(--primary); white-space: nowrap; }
.trash-transfer-form { padding: 16px 18px; }
.trash-duplicate-options { display: grid; gap: 9px; }
.trash-duplicate-option { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid #e1e8f0; border-radius: 10px; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.trash-duplicate-option:hover, .trash-duplicate-option:has(input:checked) { border-color: #9bb9d5; background: #f5f9fd; }
.trash-duplicate-option input { accent-color: var(--primary); }
.trash-duplicate-option strong, .trash-duplicate-option small { display: block; }
.trash-duplicate-option strong { color: var(--text); font-size: 12px; }
.trash-duplicate-option small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.trash-no-target { padding: 18px; color: var(--muted); }
.trash-no-target strong { display: block; color: #8b5e00; margin-bottom: 5px; }
.trash-no-target p { line-height: 1.8; }
@media (max-width: 680px) { .trash-warning-card { padding: 14px; } .trash-sales-row { grid-template-columns: 1fr; gap: 4px; } .trash-sales-row b { justify-self: start; } }
.trash-delete-review { max-width: 1080px; padding-bottom: 28px; }
.trash-review-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-bottom: 14px; }
.trash-review-hero h1 { margin: 4px 0 5px; font-size: clamp(20px, 2.1vw, 28px); letter-spacing: -.3px; }
.trash-review-hero p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.trash-review-hero-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #ffd5dc; border-radius: 14px; color: var(--danger); background: #fff4f5; font-size: 28px; font-weight: 300; }
.trash-back-button { white-space: nowrap; }
.trash-review-steps { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcff; overflow-x: auto; }
.trash-review-steps span { display: inline-flex; align-items: center; gap: 7px; min-height: 31px; padding: 5px 10px; border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.trash-review-steps b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: currentColor; background: #edf0f5; font-size: 10px; }
.trash-review-steps .is-done { color: var(--success); background: #eefaf5; }
.trash-review-steps .is-active { color: var(--primary); background: var(--primary-soft); }
.trash-review-steps .is-done b { background: #d8f3e8; }
.trash-review-steps .is-active b { color: #fff; background: var(--primary); }
.trash-lead-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 16px; }
.trash-lead-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--primary); background: var(--primary-soft); font-size: 17px; font-weight: 800; }
.trash-lead-summary-main { display: grid; gap: 3px; min-width: 0; }
.trash-lead-summary-main strong { color: var(--text); font-size: 15px; }
.trash-lead-summary-main small { color: var(--muted); direction: ltr; text-align: right; font-size: 10px; }
.trash-lead-summary-stat { display: grid; gap: 4px; min-width: 120px; padding-inline: 16px; border-inline-start: 1px solid var(--line); }
.trash-lead-summary-stat span { color: var(--muted); font-size: 10px; }
.trash-lead-summary-stat strong { color: var(--primary); font-size: 13px; }
.trash-lead-summary-stat strong.is-danger { color: var(--danger); }
.trash-warning-card { align-items: center; margin-bottom: 14px; padding: 14px 16px; }
.trash-warning-card h2 { font-size: 14px; }
.trash-warning-card p { line-height: 1.75; }
.trash-review-panel { margin-bottom: 14px; }
.trash-review-panel .panel-header { align-items: center; padding: 15px 17px 13px; }
.trash-review-panel .panel-header h2 { margin: 3px 0 4px; font-size: 15px; }
.section-kicker { display: inline-block; color: var(--primary); font-size: 10px; font-weight: 800; }
.trash-sales-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 11px 17px; }
.trash-sales-row > div { display: grid; gap: 3px; min-width: 0; }
.trash-sales-row small { color: var(--muted); font-size: 10px; }
.trash-sales-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--success); background: #edf9f4; font-size: 16px; }
.trash-transfer-form { padding: 14px 17px 17px; }
.trash-duplicate-options { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.trash-duplicate-option { position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border-color: var(--line); border-radius: 12px; background: #fff; }
.trash-duplicate-option:hover, .trash-duplicate-option:has(input:focus-visible), .trash-duplicate-option:has(input:checked) { border-color: var(--primary); background: #f8f7ff; box-shadow: 0 0 0 3px rgba(91,80,230,.08); }
.trash-duplicate-option input { position: absolute; opacity: 0; pointer-events: none; }
.trash-radio-mark { width: 19px; height: 19px; border: 2px solid #b9c2d0; border-radius: 50%; background: #fff; }
.trash-duplicate-option:has(input:checked) .trash-radio-mark { border: 5px solid var(--primary); }
.trash-duplicate-content { display: grid; gap: 4px; min-width: 0; }
.trash-duplicate-content strong { font-size: 12px; }
.trash-duplicate-content small { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 0; font-size: 10px; }
.trash-duplicate-content small b { color: var(--primary); direction: ltr; }
.trash-duplicate-content small i { color: var(--muted); font-style: normal; }
.trash-option-arrow { color: #a6aec0; font-size: 18px; transition: transform .16s ease, color .16s ease; }
.trash-duplicate-option:has(input:checked) .trash-option-arrow { color: var(--primary); transform: translateX(-3px); }
.trash-selection-hint { margin-top: 11px; padding: 9px 11px; border-radius: 9px; color: var(--muted); background: #f7f8fb; font-size: 10px; }
.trash-review-actions { position: sticky; bottom: 12px; z-index: 3; justify-content: flex-start; margin-top: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: 0 10px 26px rgba(35,39,84,.10); backdrop-filter: blur(10px); }
.trash-review-actions .button.danger { margin-inline-start: auto; }
.trash-review-actions .button.danger span { font-size: 17px; line-height: 0; vertical-align: -1px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 720px) { .trash-review-hero { grid-template-columns: auto 1fr; } .trash-back-button { grid-column: 1 / -1; justify-self: start; } .trash-lead-summary { grid-template-columns: auto minmax(0,1fr); } .trash-lead-summary-stat { padding: 9px 0 0; border-inline-start: 0; border-top: 1px solid var(--line); } .trash-lead-summary-stat:nth-last-child(2) { grid-column: 1 / 2; } .trash-lead-summary-stat:last-child { grid-column: 2 / 3; } }
@media (max-width: 520px) { .trash-delete-review { padding-inline: 2px; } .trash-review-hero { align-items: start; } .trash-review-hero-icon { width: 38px; height: 38px; } .trash-review-hero h1 { font-size: 19px; } .trash-duplicate-option { grid-template-columns: auto auto minmax(0,1fr); } .trash-option-arrow { display: none; } .trash-review-actions { align-items: stretch; flex-direction: column-reverse; } .trash-review-actions .button, .trash-review-actions .button.danger { width: 100%; margin: 0; } }
.lead-row-action svg { width: 17px; height: 17px; }
.lead-table-scroll-top { display: none; }
.is-hidden-on-leads { display: none !important; }
@media (max-width: 900px) {
  .lead-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-filters .filter-search { grid-column: 1 / -1; }
  .lead-global-search-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
}
@media (max-width: 560px) {
  .lead-filters { grid-template-columns: 1fr; padding: 11px; }
  .lead-filters .filter-search { grid-column: auto; }
  .lead-global-search-row { align-items: stretch; flex-wrap: wrap; }
  .lead-global-search-row input { flex-basis: 100%; }
  .lead-global-search-row .button { flex: 1 1 0; }
  .filter-actions { align-items: stretch; }
  .filter-actions .button { flex: 1; }
}
.priority { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.priority::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.priority-hot { color: #c84458; background: #fff0f2; }
.priority-warm { color: #be7d17; background: #fff7e8; }
.priority-cold { color: #4783a9; background: #edf7fc; }
.stage-l0 { color: #697287; background: #eef1f5; }
.stage-l1 { color: #35759c; background: #eaf6fb; }
.stage-l2 { color: #5c5da5; background: #efefff; }
.stage-l3 { color: #a36b1e; background: #fff4df; }
.stage-l4 { color: #a4506b; background: #fff0f4; }
.stage-l5 { color: #7e61a2; background: #f3edff; }
.stage-l6 { color: #1b8d68; background: #e5f8f0; }
.stage-l7 { color: #9e5660; background: #fcecef; }
.button.small { min-height: 31px; padding: 4px 10px; font-size: 11px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 15px; color: var(--muted); font-size: 12px; }
.detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.detail-header h2 { margin: 5px 0 0; font-size: 25px; }
.detail-header p { margin: 0; color: var(--muted); }
.back-link { color: var(--primary); font-size: 12px; font-weight: 700; }
.detail-actions { display: flex; gap: 9px; }
.info-grid small, .mini-facts span { color: var(--muted); font-size: 11px; }
.lead-details-card { margin-bottom: 19px; overflow: hidden; }
.lead-details-card .panel-header { align-items: flex-start; }
.detail-card-badge { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #dbe8f1; border-radius: 9px; background: #f3f8fb; color: var(--primary); direction: ltr; font-size: 10px; font-weight: 800; }
.lead-details-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; padding: 0 20px 20px; }
.lead-detail-group { min-width: 0; padding: 14px; border: 1px solid #edf0f5; border-radius: 14px; background: #fbfcfe; }
.lead-detail-group h4 { margin: 0 0 12px; color: var(--ink); font-size: 13px; }
.lead-detail-list { display: grid; gap: 9px; }
.lead-detail-item { display: grid; grid-template-columns: minmax(92px,.8fr) minmax(0,1.2fr); gap: 10px; align-items: start; min-width: 0; }
.lead-detail-item > span:first-child { color: var(--muted); font-size: 10px; line-height: 1.8; }
.lead-detail-item > strong, .lead-detail-item > a { min-width: 0; overflow-wrap: anywhere; color: #42495a; font-size: 12px; line-height: 1.8; }
.lead-detail-item > strong small { display: block; color: var(--muted); font-size: 10px; font-weight: 500; }
.lead-detail-item > a { color: var(--primary); direction: ltr; text-align: right; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(275px,.7fr); gap: 19px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 19px; }
.panel-inner { padding: 19px 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.section-heading h3 { margin: 0; font-size: 15px; }
.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; }
.info-grid > div { display: grid; gap: 3px; color: #4f5667; }
.info-grid a { color: var(--primary); direction: ltr; text-align: right; }
.funnel-track { display: grid; grid-template-columns: repeat(8, minmax(64px,1fr)); gap: 3px; padding: 19px 20px 12px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.funnel-step { position: relative; display: grid; gap: 4px; min-width: 68px; padding: 8px 5px; color: #a0a7b2; text-align: center; }
.funnel-step::before { content: ""; display: block; width: 13px; height: 13px; margin: 0 auto 1px; border: 2px solid currentColor; border-radius: 50%; background: #fff; }
.funnel-step:not(:last-child)::after { content: ""; position: absolute; top: 14px; inset-inline-start: calc(-50% + 8px); inset-inline-end: calc(50% + 8px); height: 2px; background: #e5e9ef; }
.funnel-step.passed, .funnel-step.current { color: var(--primary); }
.funnel-step.passed::before, .funnel-step.current::before { background: currentColor; box-shadow: inset 0 0 0 3px #fff; }
.funnel-step small { font-size: 9px; white-space: nowrap; }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; display: flex; gap: 13px; padding: 0 0 21px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; inset-inline-start: 5px; top: 14px; bottom: -2px; width: 1px; background: #dfe5ec; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: relative; z-index: 1; flex: 0 0 11px; width: 11px; height: 11px; margin-top: 4px; border: 3px solid #fff; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 1px #9eb7cd; }
.timeline-item strong, .timeline-item small, .timeline-item p { display: block; }
.timeline-item > div { min-width: 0; flex: 1; }
.timeline-item small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.timeline-item p { margin: 8px 0; color: #626b7c; }
.call-detail-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 7px; color: #667085; font-size: 11px; }
.call-detail-meta span { padding: 3px 7px; border: 1px solid #e8edf3; border-radius: 999px; background: #f8fafc; }
.timeline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.timeline-actions form { margin: 0; }
.timeline-actions .button { min-height: 30px; padding: 4px 9px; font-size: 11px; }
.history-list, .compact-list { display: grid; gap: 11px; }
.history-item { display: grid; grid-template-columns: 105px 1fr auto; gap: 10px; align-items: center; padding-bottom: 9px; border-bottom: 1px solid #f0f2f5; font-size: 12px; }
.history-item:last-child { border-bottom: 0; }
.history-time, .history-item small { color: var(--muted); font-size: 10px; }
.compact-item { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #f0f2f5; }
.compact-item:last-child { border-bottom: 0; }
.compact-item > div { min-width: 0; display: grid; }
.compact-item strong, .compact-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-item small { color: var(--muted); font-size: 11px; }
.due-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; }
.due-dot.overdue, .due-label.overdue { color: #c94c5d; background-color: #fff0f2; }
.due-dot.overdue { background: #d85263; }
.due-dot.today, .due-label.today { color: #b47716; background-color: #fff6e6; }
.due-dot.today { background: #e1a42d; }
.due-dot.upcoming, .due-label.upcoming { color: #248662; background-color: #e8f8f1; }
.due-dot.upcoming { background: #38a77f; }
.due-dot.done { background: #a6afba; }
.due-label { display: inline-block; padding: 3px 7px; border-radius: 6px; font-size: 11px; }
.note-item { padding: 9px; border-radius: 8px; background: #fafbfd; }
.note-item p { margin: 0 0 5px; color: #505a6c; white-space: pre-line; }
.note-item small { color: var(--muted); font-size: 10px; }
.note-item { display: flex; align-items: flex-start; gap: 10px; }
.note-item-body { min-width: 0; flex: 1; }
.note-item-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.note-icon-button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e5eaf2; border-radius: 10px; background: #fff; color: #1e5687; cursor: pointer; line-height: 1; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.note-icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.note-icon-button:focus-visible { outline: 3px solid rgba(30,106,168,.18); outline-offset: 2px; }
.note-icon-button:active { transform: scale(.95); }
.note-icon-button:hover { background: #eef6ff; border-color: #bcd7ef; }
.note-icon-button.danger { color: #c94e5b; }
.note-icon-button.danger:hover { background: #fff1f2; border-color: #f0c6cb; }
.assignment-form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.assignment-form select, .assignment-form input { min-height: 31px; width: auto; padding: 4px 7px; font-size: 11px; }
.assignment-form input { max-width: 130px; }
.product-view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.product-view-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.product-view-summary strong { color: var(--text); font-size: 13px; }
.product-view-summary > span { padding: 3px 8px; border: 1px solid #e7ebf2; border-radius: 999px; color: var(--muted); background: #f8f9fc; font-size: 10px; white-space: nowrap; }
.product-view-form { display: flex; align-items: end; gap: 8px; margin: 0; }
.product-view-form label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.product-view-form select { min-width: 138px; min-height: 34px; padding: 5px 28px 5px 8px; border: 1px solid #d9e0e9; border-radius: 8px; color: var(--text); background-color: #fff; font: inherit; font-size: 11px; cursor: pointer; }
.product-view-form select:focus-visible { outline: 3px solid rgba(30,106,168,.16); outline-offset: 1px; border-color: var(--primary); }
.product-view-form .button { min-height: 34px; }
.product-filter-panel { margin: 0 0 12px; padding: 11px 12px; }
.product-filter-form { display: grid; grid-template-columns: minmax(190px,1.5fr) repeat(4,minmax(112px,.8fr)) auto; align-items: end; gap: 9px; }
.product-filter-form > label { display: grid; min-width: 0; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.product-filter-form input,
.product-filter-form select { width: 100%; min-width: 0; min-height: 35px; padding: 5px 8px; border: 1px solid #d9e0e9; border-radius: 8px; color: var(--text); background: #fff; font: inherit; font-size: 11px; }
.product-filter-form input:focus-visible,
.product-filter-form select:focus-visible { outline: 3px solid rgba(30,106,168,.16); outline-offset: 1px; border-color: var(--primary); }
.product-filter-actions { display: flex; align-items: center; gap: 6px; }
.product-filter-actions .button { min-height: 35px; white-space: nowrap; }
.product-open-link { color: inherit; text-decoration: none; }
.product-open-link:hover h3 { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.product-open-link:focus-visible { border-radius: 4px; outline: 3px solid rgba(30,106,168,.2); outline-offset: 2px; }
.product-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin: 12px 0 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.product-pagination-summary { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.product-pagination-links { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.product-pagination-links .button { min-width: 34px; min-height: 32px; padding: 4px 8px; }
.product-dossier-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 4px 0 13px; }
.product-dossier-header h1 { margin: 4px 0; font-size: 22px; }
.product-dossier-header p { margin: 0; color: var(--muted); font-size: 12px; }
.product-back-link { color: var(--primary); font-size: 11px; font-weight: 700; text-decoration: none; }
.product-back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.product-dossier-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.product-dossier-actions form { margin: 0; }
.product-dossier-card { padding: 16px; }
.product-dossier-identity { display: flex; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid #edf0f4; }
.product-dossier-identity > div { min-width: 0; flex: 1; }
.product-dossier-identity h2 { margin: 0 0 3px; color: var(--text); font-size: 17px; }
.product-dossier-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 14px 0 0; }
.product-dossier-fields > div { min-width: 0; }
.product-dossier-fields dt { margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.product-dossier-fields dd { margin: 0; color: var(--text); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.product-dossier-fields .product-dossier-description { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #edf0f4; }
.product-sales-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.product-sales-summary .panel { display: grid; gap: 5px; padding: 12px 14px; }
.product-sales-summary span { color: var(--muted); font-size: 10px; }
.product-sales-summary strong { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.product-recent-sales { padding: 13px; }
.product-section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-bottom: 9px; }
.product-section-heading h2 { margin: 0; font-size: 14px; }
.product-section-heading > span { color: var(--muted); font-size: 10px; }
.product-sales-privacy-note { margin-top: 12px; padding: 12px 14px; }
.product-sales-privacy-note strong { color: var(--text); font-size: 12px; }
.product-sales-privacy-note p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.product-card { display: flex; min-width: 0; flex-direction: column; align-items: stretch; gap: 8px; padding: 19px; border-top: 4px solid var(--product-accent, #1e6aa8); }
.product-card-leading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; }
.product-check { display: inline-grid; flex: 0 0 20px; width: 20px; height: 20px; place-items: center; margin: 0; cursor: pointer; }
.product-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.product-card-title { min-width: 0; }
.product-card-title h3 { overflow: hidden; margin: 8px 0 2px; color: var(--text); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.product-card-category { color: var(--muted); font-size: 11px; }
.product-card-price { display: block; margin: 8px 0 0; color: var(--primary-dark, #174d7c); font-size: 18px; font-variant-numeric: tabular-nums; }
.product-card-description { display: -webkit-box; min-height: 46px; margin: 0 0 5px; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.product-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; min-width: 0; padding-top: 7px; border-top: 1px solid #eef1f5; }
.product-card-meta .status-dot, .product-card-meta .subtext { flex: 0 1 auto; min-width: 0; margin: 0; }
.product-card-meta .subtext { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-icon { flex: 0 0 38px; width: 38px; height: 38px; overflow: hidden; color: var(--product-accent, #1e6aa8); }
.product-icon svg { display: block; width: 24px; height: 24px; fill: currentColor; }
.product-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 5px; }
.product-actions form { margin: 0; }
.product-actions .button { min-height: 34px; }
.product-list-heading { display: none; }
.product-grid.is-list-view { display: flex; flex-direction: column; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgba(35,39,84,.025); }
.product-grid.is-list-view > .product-list-heading,
.product-grid.is-list-view > .product-card { display: grid; grid-template-columns: 44px minmax(135px,1.05fr) minmax(92px,.62fr) minmax(120px,1.05fr) minmax(112px,.86fr) minmax(116px,auto); align-items: center; gap: 7px 10px; }
.product-grid.is-list-view > .product-list-heading { padding: 7px 10px; border-bottom: 1px solid #e8edf3; color: var(--muted); background: #f8fafd; font-size: 9px; font-weight: 800; }
.product-grid.is-list-view > .product-card { min-height: 54px; padding: 6px 10px; border: 0; border-bottom: 1px solid #edf0f4; border-inline-start: 3px solid var(--product-accent, #1e6aa8); border-radius: 0; box-shadow: none; transition: background .16s ease; }
.product-grid.is-list-view > .product-card:hover { background: #f9fbfe; }
.product-grid.is-list-view > .product-card:last-of-type { border-bottom: 0; }
.product-grid.is-list-view .product-card-leading { justify-content: flex-start; }
.product-grid.is-list-view .product-card-leading { min-height: 30px; gap: 6px; }
.product-grid.is-list-view .product-icon { flex-basis: 30px; width: 30px; height: 30px; }
.product-grid.is-list-view .product-icon svg { width: 19px; height: 19px; }
.product-grid.is-list-view .product-card-title h3 { margin: 0 0 1px; font-size: 12px; line-height: 1.5; }
.product-grid.is-list-view .product-card-category { font-size: 9px; }
.product-grid.is-list-view .product-card-price { margin: 0; font-size: 12px; white-space: nowrap; }
.product-grid.is-list-view .product-card-description { min-height: 0; margin: 0; font-size: 10px; line-height: 1.55; -webkit-line-clamp: 2; }
.product-grid.is-list-view .product-card-meta { display: grid; justify-items: start; gap: 2px; padding: 0; border: 0; }
.product-grid.is-list-view .product-card-meta .status-dot,
.product-grid.is-list-view .product-card-meta .subtext { font-size: 9px; }
.product-grid.is-list-view .product-actions { justify-content: flex-end; gap: 5px; margin: 0; padding: 0; }
.product-grid.is-list-view .product-actions .button { min-height: 28px; padding: 3px 7px; font-size: 9px; }
@media (max-width: 900px) {
  .product-filter-form { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .product-filter-search { grid-column: span 2; }
  .product-grid.is-list-view > .product-list-heading { display: none; }
  .product-grid.is-list-view > .product-card { grid-template-columns: 40px minmax(120px,1fr) minmax(100px,.7fr); align-items: start; gap: 6px 8px; padding: 8px 9px; }
  .product-grid.is-list-view .product-card-leading { grid-column: 1; grid-row: 1 / 5; align-items: flex-start; }
  .product-grid.is-list-view .product-card-title { grid-column: 2; }
  .product-grid.is-list-view .product-card-price { grid-column: 3; justify-self: end; }
  .product-grid.is-list-view .product-card-description,
  .product-grid.is-list-view .product-card-meta,
  .product-grid.is-list-view .product-actions { grid-column: 2 / 4; }
  .product-grid.is-list-view .product-card-meta { display: flex; justify-content: space-between; flex-wrap: wrap; }
  .product-grid.is-list-view .product-actions { justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .product-filter-panel { padding: 9px; }
  .product-filter-form { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .product-filter-search { grid-column: 1 / -1; }
  .product-filter-actions { grid-column: 1 / -1; }
  .product-filter-actions .button { flex: 1; justify-content: center; }
  .product-view-toolbar { align-items: stretch; flex-direction: column; gap: 9px; padding: 11px; }
  .product-view-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; }
  .product-view-form label { min-width: 0; }
  .product-view-form select { width: 100%; min-width: 0; }
  .product-view-form .button { min-height: 38px; }
  .product-grid.is-list-view > .product-card { grid-template-columns: 34px minmax(0,1fr); gap: 6px 8px; padding: 8px; }
  .product-grid.is-list-view .product-card-leading { grid-column: 1; grid-row: 1 / 5; flex-direction: column; align-items: center; }
  .product-grid.is-list-view .product-card-title,
  .product-grid.is-list-view .product-card-price,
  .product-grid.is-list-view .product-card-description,
  .product-grid.is-list-view .product-card-meta,
  .product-grid.is-list-view .product-actions { grid-column: 2; }
  .product-grid.is-list-view .product-card-price { justify-self: start; }
  .product-grid.is-list-view .product-card-meta { align-items: flex-start; flex-direction: column; }
  .product-grid.is-list-view .product-actions .button { min-height: 34px; }
  .product-pagination { align-items: flex-start; flex-direction: column; }
  .product-pagination-links { width: 100%; }
  .product-pagination-links .button { flex: 1; }
  .product-dossier-header { align-items: flex-start; }
  .product-dossier-fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .product-sales-summary { gap: 7px; }
  .product-sales-summary .panel { padding: 10px; }
  .product-sales-summary strong { font-size: 15px; }
}
.folder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.folder-card { border-top: 4px solid var(--folder-accent, #1e6aa8); padding: 20px; }
.folder-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.folder-check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.folder-color { width: 13px; height: 13px; border-radius: 50%; background: var(--folder-accent, #1e6aa8); box-shadow: 0 0 0 5px color-mix(in srgb, var(--folder-accent, #1e6aa8) 14%, transparent); }
.folder-card h3 { margin: 18px 0 4px; }
.folder-card p { min-height: 44px; color: var(--muted); line-height: 1.8; }
.folder-meta { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.folder-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.folder-detail-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 5px solid var(--folder-accent, #1e6aa8); margin-bottom: 16px; }
.folder-detail-hero h2 { margin: 8px 0 6px; }
.folder-detail-hero p { margin: 0; color: var(--muted); line-height: 1.9; }
.folder-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.folder-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.folder-kpis .panel { padding: 16px; }
.folder-kpis small, .folder-custom-grid small { display: block; color: var(--muted); margin-bottom: 8px; }
.folder-kpis strong { display: block; font-size: 17px; }
.folder-custom-summary { margin-bottom: 16px; }
.folder-custom-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.folder-custom-grid > div { background: #f7f9fc; border: 1px solid #edf0f5; border-radius: 12px; padding: 13px; min-width: 0; }
.folder-custom-grid span { display: block; overflow-wrap: anywhere; }
.bulk-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 14px; margin-bottom: 14px; background: #f7f9fc; border: 1px solid #e7edf3; border-radius: 12px; }
.bulk-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.bulk-toolbar select { min-width: 190px; }
.lead-bulk-toolbar { display: grid; gap: 13px; margin-top: 14px; }
.bulk-selection { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.bulk-select-all { display: inline-flex !important; align-items: center; gap: 7px; margin-inline-end: auto; color: var(--text) !important; font-weight: 800; }
.bulk-select-all input, .select-column input { width: 17px; height: 17px; accent-color: var(--primary); }
.bulk-selection-count { color: var(--primary); font-size: 12px; font-weight: 800; }
.bulk-edit-panel { border-top: 1px solid #e3eaf1; padding-top: 10px; }
.bulk-edit-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; color: var(--text); cursor: pointer; list-style: none; font-size: 13px; font-weight: 800; }
.bulk-edit-panel > summary::-webkit-details-marker { display: none; }
.bulk-edit-panel > summary::after { content: "⌄"; color: var(--primary); font-size: 18px; transition: transform .18s ease; }
.bulk-edit-panel[open] > summary::after { transform: rotate(180deg); }
.bulk-edit-panel > summary small { margin-inline-start: auto; color: var(--muted); font-size: 11px; font-weight: 500; }
.lead-bulk-toolbar.has-selection { border-color: #b8cee0; box-shadow: 0 8px 24px rgba(37, 84, 122, .08); }
.bulk-edit-panel.is-ready > summary { color: var(--primary); }
.is-lead-range-selecting, .is-lead-range-selecting * { user-select: none !important; cursor: crosshair !important; }
[data-lead-row] { transition: background-color .12s ease; }
[data-lead-row]:has([data-lead-select]:checked) { background: #f4f7ff; }
.bulk-fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 10px; padding-top: 4px; }
.bulk-fields label { min-width: 0; }
.bulk-fields select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 40px; padding: 8px 9px; border: 1px solid #dfe3eb; border-radius: 10px; background: #fff; color: var(--text); font: inherit; }
.bulk-fields select.multi-filter-source { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.bulk-multi-help { margin: -2px 0 4px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.bulk-fields .multi-picker { width: 100%; }
.bulk-fields .button { min-height: 40px; white-space: nowrap; }
.bulk-fields .button.danger { border-color: #f2c8cf; background: #fff3f5; color: #bd4052; }
.bulk-fields .button.danger:hover { border-color: #e7aab4; background: #ffe8ec; }
.select-column { width: 48px; text-align: center; }
.date-time-fields { display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; width: 100%; }
.date-time-fields input { box-sizing: border-box; width: 100%; min-height: 42px; }
.calendar-picker { position: fixed; z-index: 80; display: none; padding: 12px; border: 1px solid #dfe3ec; border-radius: 14px; background: #fff; box-shadow: 0 18px 55px rgba(27,35,70,.2); direction: rtl; }
.calendar-picker.is-open { display: block; }
.calendar-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.calendar-picker-head > button, .calendar-picker-foot button { min-width: 31px; min-height: 31px; border: 0; border-radius: 8px; color: var(--primary); background: #f1f3fb; cursor: pointer; font-size: 20px; line-height: 1; }
.calendar-picker-head > button:hover, .calendar-picker-foot button:hover { color: #fff; background: var(--primary); }
.calendar-picker-selects { display: grid; grid-template-columns: 1fr .75fr; gap: 6px; flex: 1; }
.calendar-picker-selects select { min-height: 34px; padding: 4px 7px; border-radius: 8px; font-size: 11px; }
.calendar-picker-weekdays, .calendar-picker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.calendar-picker-weekdays { margin-bottom: 5px; color: #9298aa; font-size: 10px; font-weight: 700; }
.calendar-day, .calendar-picker-empty { min-height: 34px; }
.calendar-day { border: 1px solid transparent; border-radius: 8px; color: #4c5369; background: #fff; cursor: pointer; font-size: 12px; }
  .calendar-day:hover { border-color: #c8c3fb; color: var(--primary); background: #f4f2ff; }
  .calendar-day.is-holiday, .calendar-day.is-weekend { color: #c0392b; background: #fff4f3; font-weight: 800; }
  .calendar-day.is-holiday:hover, .calendar-day.is-weekend:hover { border-color: #e9a7a0; color: #a52d22; background: #ffe9e7; }
  .calendar-day.is-selected { border-color: var(--primary); color: #fff; background: var(--primary); font-weight: 800; }
  .calendar-day.is-selected.is-holiday, .calendar-day.is-selected.is-weekend { border-color: #9f2a21; color: #fff; background: #c0392b; }
.calendar-picker-foot { display: flex; justify-content: space-between; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #eef0f5; }
.calendar-picker-foot button { min-width: auto; padding: 5px 10px; font-size: 11px; }
.calendar-picker-foot .calendar-close { color: #697084; background: #f6f7fa; }
.followup-status-form { display: grid; gap: 13px; }
.followup-status-block[hidden] { display: none !important; }
.followup-status-block { display: grid; gap: 10px; padding: 11px; border: 1px solid #e8edf3; border-radius: 12px; background: #fbfcfe; }
.followup-status-block textarea { min-height: 88px; }
.followups-table-card { overflow: hidden; }
.followups-table { min-width: 1120px; }
.followups-table td { vertical-align: top; }
.followup-person { display: block; font-weight: 700; color: var(--text, #172033); line-height: 1.7; }
.followup-assign-form { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.followup-assign-form select { min-width: 145px; min-height: 34px; padding: 6px 8px; font-size: 11px; }
.followup-assign-form .button { white-space: nowrap; }
.folder-lead-table-wrap { overflow-x: auto; }
.folder-lead-table { min-width: 760px; }
.folder-lead-table td, .folder-lead-table th { white-space: nowrap; }
.objection-list { display: grid; gap: 10px; }
.objection-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 13px 14px; border: 1px solid #f0d9b8; border-inline-start: 4px solid #d99835; border-radius: 12px; background: #fffaf2; }
.objection-item.is-resolved { border-color: #cce9dc; border-inline-start-color: #38a77f; background: #f4fbf7; }
.objection-main { min-width: 0; flex: 1; }
.objection-title { display: flex; align-items: center; gap: 9px; }
.objection-title strong { color: #344054; }
.objection-status { padding: 3px 8px; border-radius: 99px; color: #996218; background: #ffedc7; font-size: 10px; }
.is-resolved .objection-status { color: #197252; background: #dff5e9; }
.objection-item p { margin: 8px 0; color: #5f6877; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.objection-item small { color: var(--muted); font-size: 10px; }
@media (max-width: 800px) {
    .folder-detail-hero { align-items: stretch; flex-direction: column; }
    .folder-kpis, .folder-custom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .folder-kpis, .folder-custom-grid { grid-template-columns: 1fr; }
    .bulk-toolbar { align-items: stretch; flex-direction: column; }
    .bulk-select-all { margin-inline-end: 0; }
    .bulk-toolbar select { width: 100%; }
    .bulk-fields { grid-template-columns: 1fr; }
    .bulk-selection { align-items: flex-start; flex-direction: column; gap: 9px; }
    .bulk-edit-panel > summary { align-items: flex-start; flex-wrap: wrap; }
    .bulk-edit-panel > summary small { flex: 0 0 100%; margin-inline-start: 0; line-height: 1.8; }
    .date-time-fields { grid-template-columns: 1fr; }
}
.import-hero { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:18px; padding:24px; }
.import-hero h2 { margin:8px 0 7px; font-size:22px; }
.import-hero p { max-width:760px; margin:0; color:var(--muted); line-height:1.9; }
.import-badge { padding:8px 12px; border-radius:999px; color:#4f7f6a; background:#eaf6ef; font-size:12px; white-space:nowrap; }
.import-card { margin-bottom:18px; padding:22px; }
.import-form { display:grid; gap:18px; max-width:900px; }
.import-dropzone { display:grid; gap:8px; padding:24px; border:1px dashed #bfc6dc; border-radius:16px; background:#fafbff; cursor:pointer; }
.import-dropzone strong { font-size:15px; }
.import-dropzone small { color:var(--muted); }
.import-dropzone input { display:block; width:100%; }
.import-rules { display:grid; gap:8px; padding:14px 16px; border-radius:12px; color:var(--muted); background:#f5f6fb; font-size:12px; line-height:1.8; }
.import-loading { display:none; color:var(--muted); font-size:12px; align-items:center; gap:8px; }
.import-loading::before { content:""; width:14px; height:14px; border:2px solid #cbd3e6; border-top-color:var(--primary); border-radius:50%; animation:crm-spin .8s linear infinite; }
.import-form.is-loading .import-loading { display:inline-flex; }
.import-form.is-loading .import-dropzone, .import-form.is-loading select, .import-form.is-loading button { opacity:.65; }
@keyframes crm-spin { to { transform:rotate(360deg); } }
.status-dot { display: inline-flex; align-items: center; gap: 5px; color: #8a94a2; font-size: 11px; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-dot.online { color: var(--success); }
.status-dot.offline { color: #a3aab5; }
.progress-value { margin-bottom: 4px; color: var(--primary); font-size: 11px; }
.progress { min-width: 90px; height: 5px; overflow: hidden; border-radius: 99px; background: #edf0f4; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.report-filter { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.report-filter label { min-width: 150px; }
.funnel-report { display: grid; gap: 7px; padding: 19px 20px; }
.funnel-report-row { display: grid; grid-template-columns: minmax(190px, .7fr) 45px minmax(100px,1fr); align-items: center; gap: 12px; padding: 7px 0; color: #596477; font-size: 12px; }
.funnel-report-row strong { color: var(--primary); }
.funnel-bar { height: 7px; overflow: hidden; border-radius: 99px; background: #edf1f5; }
.funnel-bar i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.score-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 15px; }
.score-grid label input { text-align: center; }
.evaluation-weight-note { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #dce7f2; border-radius: 10px; background: #f7fbff; color: var(--muted); font-size: 12px; line-height: 1.8; }
.evaluation-summary { display: flex; align-items: center; gap: 16px; margin: 0 0 14px; padding: 14px; border: 1px solid #e3e8ef; border-radius: 15px; background: #fafbfd; }
.evaluation-score-ring { --evaluation-score: 0%; display: grid; width: 86px; height: 86px; flex: 0 0 86px; place-items: center; align-content: center; border-radius: 50%; background: conic-gradient(var(--evaluation-tone, #3b82f6) var(--evaluation-score), #e9eef4 0); box-shadow: inset 0 0 0 9px #fff; color: var(--text); }
.evaluation-score-ring strong { font-size: 22px; line-height: 1; }
.evaluation-score-ring span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.evaluation-summary-copy { min-width: 0; flex: 1; }
.evaluation-summary-copy > strong { display: block; color: var(--evaluation-tone, #2563eb); font-size: 15px; }
.evaluation-summary-copy p { margin: 4px 0 9px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.evaluation-summary.weak { --evaluation-tone: #d65b63; }
.evaluation-summary.medium { --evaluation-tone: #c58a20; }
.evaluation-summary.excellent { --evaluation-tone: #29966d; }
.evaluation-progress, .evaluation-mini-progress { height: 8px; overflow: hidden; border-radius: 99px; background: #e9eef4; }
.evaluation-progress span, .evaluation-mini-progress span { display: block; height: 100%; border-radius: inherit; background: var(--evaluation-tone, #3b82f6); transition: width .2s ease, background .2s ease; }
.evaluation-criteria-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.evaluation-criterion { display: grid; gap: 7px; padding: 12px; border: 1px solid #e6eaf0; border-radius: 12px; background: #fff; }
.evaluation-criterion-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.evaluation-criterion-head strong { color: var(--text); font-size: 12px; }
.evaluation-criterion-head small { color: var(--primary); font-size: 10px; white-space: nowrap; }
.evaluation-criterion input { height: 43px; border-color: #d9e1ea; font-size: 16px; font-weight: 800; }
.evaluation-score-hint { color: var(--muted); font-size: 10px; }
.evaluation-score-badge { display: inline-flex; align-items: center; min-width: 62px; justify-content: center; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.evaluation-score-badge.weak { color: #a64049; background: #fdecef; }
.evaluation-score-badge.medium { color: #9a6b13; background: #fff5dd; }
.evaluation-score-badge.excellent { color: #237c5d; background: #e8f7ef; }
.evaluation-mini-progress { min-width: 80px; height: 5px; margin-top: 6px; }
.evaluation-mini-progress.large { height: 8px; margin-top: 13px; }
.evaluation-mini-progress span.weak { background: #d65b63; }
.evaluation-mini-progress span.medium { background: #c58a20; }
.evaluation-mini-progress span.excellent { background: #29966d; }
.evaluation-comparison-panel { margin-top: 18px; }
.evaluation-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.evaluation-comparison-card { padding: 14px; border: 1px solid #e6eaf0; border-radius: 14px; background: #fff; }
.evaluation-comparison-head { display: flex; align-items: center; gap: 9px; }
.evaluation-comparison-head > div { min-width: 0; flex: 1; }
.evaluation-comparison-head strong, .evaluation-comparison-head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evaluation-comparison-head strong { font-size: 12px; }
.evaluation-comparison-head small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.evaluation-comparison-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.settings-card { margin-bottom: 18px; }
.setting-row { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid #f0f2f5; }
.setting-row:last-child { border-bottom: 0; }
.setting-row code { color: var(--primary); font-family: Tahoma, sans-serif; }
.settings-page { display: grid; gap: 22px; min-width: 0; }
.settings-overview-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); gap: 16px; align-items: stretch; }
.settings-overview-grid > .settings-card { min-width: 0; margin: 0; overflow: hidden; }
.settings-overview-grid .panel-header { min-height: 66px; align-items: center; }
.settings-kicker { display: block; margin-bottom: 3px; color: var(--muted, #777b96); font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.settings-overview-grid .panel-header h3 { margin: 0; font-size: 16px; }
.settings-status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid #e4e8f0; border-radius: 999px; color: #59647b; background: #f7f9fc; font-size: 10px; font-weight: 700; white-space: nowrap; }
.settings-system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.settings-system-grid > div { min-width: 0; padding: 10px 12px; border: 1px solid #edf0f5; border-radius: 11px; background: #fbfcfe; }
.settings-system-grid dt { margin: 0 0 4px; color: var(--muted, #777b96); font-size: 10px; }
.settings-system-grid dd { margin: 0; color: var(--text, #202239); font-size: 12px; font-weight: 750; line-height: 1.7; overflow-wrap: anywhere; }
.settings-heading-icon { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 12px; color: #286b9b; background: #edf6fc; }
.settings-heading-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.settings-calendar-form { display: grid; gap: 9px; }
.settings-calendar-form > label { color: var(--text, #202239); font-size: 12px; font-weight: 700; }
.settings-calendar-form select { width: 100%; min-height: 42px; }
.settings-calendar-form .field-help { display: block; line-height: 1.8; }
.settings-calendar-form .form-actions { margin-top: 3px; }
.settings-tools-section { min-width: 0; }
.settings-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 11px; }
.settings-section-heading h2 { margin: 0; color: var(--text, #202239); font-size: 17px; }
.settings-section-heading p { margin: 4px 0 0; color: var(--muted, #777b96); font-size: 11px; line-height: 1.8; }
.settings-tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-tool-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-width: 0; padding: 17px; border: 1px solid #e6eaf1; border-radius: 15px; background: #fff; box-shadow: 0 5px 18px rgba(34, 48, 74, .035); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.settings-tool-card:hover { transform: translateY(-2px); border-color: #c8d7e7; box-shadow: 0 12px 28px rgba(34, 48, 74, .08); }
.settings-tool-icon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 13px; color: #236b9c; background: #edf6fc; }
.settings-tool-merge .settings-tool-icon { color: #197a61; background: #eaf8f2; }
.settings-tool-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.settings-tool-copy { min-width: 0; }
.settings-tool-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.settings-tool-title-row h3 { margin: 0; color: var(--text, #202239); font-size: 13px; line-height: 1.7; }
.settings-tool-badge { padding: 3px 7px; border-radius: 999px; color: #4e6680; background: #f0f4f8; font-size: 9px; font-weight: 750; white-space: nowrap; }
.settings-tool-copy p { margin: 4px 0 0; color: var(--muted, #777b96); font-size: 10px; line-height: 1.9; }
.settings-tool-action { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; white-space: nowrap; }
.settings-tool-action svg,.settings-calendar-form .button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-modal-body { display: grid; gap: 12px; }
.settings-modal-intro { margin: 0; color: var(--muted, #777b96); font-size: 12px; line-height: 1.9; }
.settings-modal-form { gap: 13px; }
.settings-modal-form label { min-width: 0; line-height: 1.8; }
.settings-modal-form select { width: 100%; min-width: 0; }
.settings-modal-form .notice,.settings-modal-notice { margin: 0; line-height: 1.9; }
.settings-modal-form .form-actions,.settings-modal-actions { margin-top: 0; padding-top: 3px; }
.settings-page #settings-bulk-phone-less .modal-card { width: min(760px, 100%); }
.settings-page #settings-duplicate-merge .modal-card { width: min(640px, 100%); }
@media (max-width: 980px) {
  .settings-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-tools-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .settings-page { gap: 17px; }
  .settings-system-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-section-heading { align-items: flex-start; }
  .settings-tool-card { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 14px; }
  .settings-tool-icon { width: 38px; height: 38px; }
  .settings-tool-action { grid-column: 1 / -1; width: 100%; }
}
.profile-hero { display: flex; align-items: center; gap: 13px; margin-bottom: 25px; }
.avatar.large { width: 52px; height: 52px; font-size: 20px; }
.avatar.profile-avatar { width: var(--profile-avatar-size, 92px); height: var(--profile-avatar-size, 92px); flex-basis: var(--profile-avatar-size, 92px); border-radius: 50%; object-fit: cover; object-position: center; border: 4px solid #f0effd; box-shadow: 0 8px 24px rgba(48, 39, 125, .12); }
.profile-avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.profile-avatar-help { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.profile-hero h2 { margin: 0; font-size: 19px; }
.profile-hero p { margin: 2px 0 0; color: var(--muted); }
.mobile-nav { display: none; }
.mobile-fab-group { position: fixed; z-index: 35; left: var(--crm-fab-offset, 10px); right: auto; bottom: var(--crm-fab-desktop-bottom, 28px); display: grid; justify-items: start; gap: 10px; }
.mobile-fab-group[data-fab-side="right"] { left: auto; right: var(--crm-fab-offset, 10px); justify-items: end; }
.mobile-fab-group[data-fab-side="right"] .mobile-fab-actions { justify-items: end; transform-origin: bottom right; }
.mobile-fab { display: grid; place-items: center; width: var(--crm-fab-size, 48px); height: var(--crm-fab-size, 48px); padding: 0; border: 1px solid #d8dee6; border-radius: 50%; color: #455363; background: #fff; box-shadow: 0 8px 20px rgba(41,55,72,.14); cursor: pointer; }
.mobile-fab svg { width: 20px; height: 20px; }
.mobile-fab-actions { display: grid; justify-items: start; gap: 7px; opacity: 0; visibility: hidden; transform: translateY(6px); transform-origin: bottom left; transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
.mobile-fab-group.is-open .mobile-fab-actions { opacity: 1; visibility: visible; transform: none; }
.mobile-fab-action { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 7px 11px; border: 1px solid #d8dee6; border-radius: 11px; color: #4a5664; background: #fff; box-shadow: 0 6px 16px rgba(41,55,72,.12); cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; }
.mobile-fab-action svg { width: 16px; height: 16px; }
.support-page, .support-admin-page { display: grid; gap: 18px; }
.support-layout, .support-admin-layout { display: grid; grid-template-columns: minmax(230px, .65fr) minmax(0, 1.5fr); gap: 16px; align-items: stretch; }
.support-thread-list { min-width: 0; overflow: hidden; }
.support-thread-items { display: grid; gap: 6px; padding: 10px; }
.support-thread-link { display: grid; gap: 4px; padding: 12px; border: 1px solid transparent; border-radius: 11px; color: var(--text); background: #fff; }
.support-thread-link:hover, .support-thread-link.active { border-color: #c9d8e5; background: #f3f7fa; }
.support-thread-link strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.support-thread-link small { color: var(--muted); font-size: 10px; line-height: 1.7; }
.support-chat { min-width: 0; display: grid; grid-template-rows: auto minmax(280px, 1fr) auto; overflow: hidden; }
.support-messages { display: grid; align-content: start; gap: 10px; min-height: 280px; max-height: 58vh; overflow: auto; padding: 16px; background: #f7f9fc; }
.support-message { max-width: 78%; padding: 11px 13px; border: 1px solid #e3e9f0; border-radius: 14px 14px 4px 14px; background: #fff; box-shadow: 0 3px 10px rgba(35,39,84,.035); }
.support-message.is-user { justify-self: end; border-color: #cddfec; background: #eef6fb; border-radius: 14px 14px 14px 4px; }
.support-message.is-control { justify-self: start; }
.support-message-meta { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.support-message p { margin: 0; color: var(--text); line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-attachment { display: inline-flex; margin-top: 8px; color: var(--primary); font-size: 11px; font-weight: 700; }
.support-reply-form, .support-form { display: grid; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: #fff; }
.support-reply-form textarea, .support-form textarea { min-height: 100px; resize: vertical; }
.support-file-input small { color: var(--muted); font-size: 10px; font-weight: 400; }
.support-empty { padding: 20px 12px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.9; }
.support-empty-large { display: grid; min-height: 320px; place-items: center; }
.support-closed { padding: 15px; color: var(--muted); text-align: center; font-size: 12px; }
.support-foundation-summary { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.support-foundation-summary strong { color: var(--text); font-weight: 800; }
.support-timeline { margin: 0 14px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.support-timeline summary { padding: 9px 11px; color: var(--text); cursor: pointer; font-size: 11px; font-weight: 800; }
.support-timeline ol { display: grid; gap: 7px; margin: 0; padding: 0 28px 12px 12px; }
.support-timeline li { display: grid; gap: 2px; color: var(--text); font-size: 11px; }
.support-timeline li small { color: var(--muted); font-size: 10px; }
.support-reply-form label, .support-form label { display: grid; gap: 5px; color: var(--text); font-size: 11px; font-weight: 700; }
.support-reply-form select, .support-form select { min-height: 36px; }
@media (max-width: 760px) {
  .support-layout, .support-admin-layout { grid-template-columns: 1fr; }
  .support-chat { grid-template-rows: auto minmax(220px, 1fr) auto; }
  .support-message { max-width: 92%; }
  .support-foundation-summary { gap: 5px 8px; }
}

/* Release 2026.08.18.5: stable responsive detail and timeline layout */
html, body { overflow-x: hidden; }
.lead-path {
  overflow-x: auto;
  padding: 18px 20px 20px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.lead-path-track {
  position: relative;
  display: flex;
  min-width: 760px;
  padding-top: 2px;
}
.lead-path-track::before {
  content: "";
  position: absolute;
  top: 17px;
  right: 34px;
  left: 34px;
  height: 3px;
  border-radius: 99px;
  background: #e6ebf1;
}
.lead-path-step {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1 0 95px;
  justify-items: center;
  gap: 7px;
  min-width: 95px;
  color: #9aa5b1;
  text-align: center;
}
.lead-path-node {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 3px solid currentColor;
  border-radius: 50%;
  color: inherit;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}
.lead-path-label {
  max-width: 92px;
  color: #6e7988;
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.lead-path-step.passed, .lead-path-step.current { color: var(--primary); }
.lead-path-step.current .lead-path-node { box-shadow: 0 0 0 4px rgba(42, 102, 143, .12); }
.lead-path-step.current .lead-path-label { color: var(--primary); font-weight: 800; }
.lead-history {
  position: relative;
  display: grid;
  gap: 0;
  padding-inline-start: 12px;
}
.lead-history::before {
  content: "";
  position: absolute;
  top: 18px;
  inset-inline-start: 5px;
  bottom: 18px;
  width: 2px;
  background: #dce5ee;
}
.lead-history-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0 15px;
}
.lead-history-node {
  position: relative;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: var(--primary);
  background: #dcecf7;
  box-shadow: 0 0 0 1px #9eb7cd;
  font-size: 9px;
  font-weight: 800;
}
.lead-history-content {
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f2f5;
}
.lead-history-item:last-child .lead-history-content { border-bottom: 0; }
.lead-history-meta {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}
.lead-history-content strong { display: block; font-size: 13px; line-height: 1.7; }
.lead-history-content p { margin: 4px 0 0; color: #697384; font-size: 11px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.needs-facts { display: grid; gap: 10px; }
.needs-fact {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #edf0f4;
  border-radius: 11px;
  background: #fbfcfd;
}
.needs-fact span { color: var(--muted); font-size: 11px; }
.needs-fact strong { color: #29364a; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.educational-needs-panel { background: linear-gradient(180deg, #fff 0%, #fbfdff 100%); }
.educational-needs-panel .section-heading { align-items: flex-start; }
.customer-needs-history .panel-header { align-items: flex-start; gap: 14px; }
.customer-needs-form { display: grid; gap: 16px; }
.customer-needs-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.customer-needs-form-grid label { display: grid; gap: 6px; min-width: 0; }
.customer-needs-form-grid input, .customer-needs-form-grid select, .customer-needs-form-grid textarea { width: 100%; min-width: 0; }
.customer-needs-form-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-needs-form-wide textarea { min-height: 92px; resize: vertical; }
@media (max-width: 760px) { .customer-needs-form-grid, .customer-needs-form-wide { grid-template-columns: 1fr; } .customer-needs-history .panel-header { align-items: stretch; } }

/* Customer detail density and alignment contract. Keep this scoped to the
 * profile page so global CRM panels retain their existing rhythm. */
.customer-detail-page { gap: 9px; }
.customer-detail-page > .customer-hero { padding-block: 2px; }
.customer-detail-page > .customer-hero h1 { line-height: 1.35; }
.customer-detail-page > .customer-hero p { margin-top: 2px; }
.customer-detail-page > .customer-contact-card { gap: 8px; padding: 8px; }
.customer-detail-page > .customer-contact-card > div { gap: 4px; padding: 9px 11px; border-radius: 10px; }
.customer-detail-page > .customer-detail-grid { grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, .9fr)); gap: 10px; }
.customer-detail-page > .customer-detail-grid > .panel > .panel-header { min-height: 0; padding: 11px 14px 9px; }
.customer-detail-page > .customer-detail-grid > .panel > .panel-header h2 { font-size: 15px; }
.customer-detail-page > .customer-detail-grid > .panel > form { gap: 8px; padding: 0 14px 14px; }
.customer-detail-page > .customer-detail-grid > .panel > form label { gap: 4px; font-size: 12px; }
.customer-detail-page > .panel.table-card { border-radius: 12px; }
.customer-detail-page > .panel.table-card > .panel-header { min-height: 0; padding: 11px 16px; }
.customer-detail-page > .panel.table-card > .panel-header h2 { margin: 0; font-size: 16px; line-height: 1.45; }
.customer-detail-page > .panel.table-card > .panel-header .subtext { display: block; margin-top: 2px; font-size: 11px; }
.customer-detail-page > .panel.table-card > .customer-empty-activity { padding: 11px 16px 13px; font-size: 12px; }
.customer-detail-page > .panel.table-card > .responsive-table { margin: 0; }
.customer-detail-page > .panel.table-card table th,
.customer-detail-page > .panel.table-card table td { padding-block: 9px; }
.customer-detail-page > .customer-needs-history .panel-header { align-items: center; }
.customer-detail-page > .customer-needs-history .panel-header > div { min-width: 0; }
.customer-detail-page > .customer-needs-history .button { flex: 0 0 auto; }
.customer-detail-page > .customer-timeline-card > .panel-header { min-height: 0; padding: 11px 16px; }
.customer-detail-page > .customer-timeline-card .customer-timeline { padding: 2px 16px 10px; }
.customer-detail-page > .customer-detail-grid + .panel + .customer-detail-grid { gap: 10px; }
@media (max-width: 900px) {
  .customer-detail-page > .customer-detail-grid { gap: 8px; }
  .customer-detail-page > .customer-contact-card { gap: 7px; }
  .customer-detail-page > .customer-needs-history .panel-header { align-items: flex-start; }
}
.profile-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.profile-detail-item { min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; border: 1px solid #e6edf4; border-radius: 13px; background: #fff; box-shadow: 0 2px 8px rgba(35, 57, 79, .035); }
.profile-detail-item.is-wide { grid-column: span 2; }
.profile-detail-icon { flex: 0 0 34px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: #1e668f; background: #edf6fc; }
.profile-detail-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:first-child { grid-column: 1 / -1; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel { border-radius: 14px; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > .panel-header { padding: 11px 15px 9px; border-bottom-color: #edf1f5; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > .panel-header h2 { margin: 0; font-size: 14px; line-height: 1.5; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 11px; padding: 11px 15px 14px; align-content: start; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > form label { gap: 4px; min-width: 0; font-size: 11px; line-height: 1.45; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > form input,
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > form select { min-height: 36px; height: 36px; padding: 7px 10px; font-size: 12px; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > form textarea { min-height: 74px; height: 74px; padding: 8px 10px; font-size: 12px; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:first-child > form > label:nth-last-of-type(1),
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:first-child > form > button,
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:nth-child(2) > form > label:nth-last-of-type(1),
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:nth-child(2) > form > button,
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:nth-child(3) > form > label:nth-last-of-type(1),
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:nth-child(3) > form > button { grid-column: 1 / -1; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > form > button { min-height: 37px; margin-top: 1px; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:nth-child(2) > form > label:nth-child(5) { grid-column: 1 / -1; }
.customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:nth-child(3) > form > label:nth-child(3) { grid-column: 1 / -1; }
@media (min-width: 901px) {
  .customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:first-child > form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:first-child > form > label:nth-last-of-type(1),
  .customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:first-child > form > button { grid-column: span 2; }
}
@media (max-width: 900px) {
  .customer-detail-page > .customer-contact-card + .customer-detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .customer-detail-page > .customer-contact-card + .customer-detail-grid { grid-template-columns: 1fr; gap: 9px; }
  .customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:first-child { grid-column: auto; }
  .customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel:first-child > form { grid-template-columns: 1fr; }
  .customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > form { grid-template-columns: 1fr; }
  .customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > form > label,
  .customer-detail-page > .customer-contact-card + .customer-detail-grid > .panel > form > button { grid-column: auto !important; }
}

/* Compact customer call entry: keep the result and its next action in one scan. */
.customer-detail-page .customer-call-entry { min-width: 0; }
.customer-detail-page .customer-call-entry > .panel-header { padding: 10px 14px 8px; }
.customer-detail-page .customer-call-entry > .panel-header .subtext { font-size: 11px; line-height: 1.65; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 7px 10px;
  padding: 10px 14px 13px;
}
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label,
.customer-detail-page .customer-call-entry > form.customer-service-call-form > .field {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label:has(select[name="call_result"]),
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label:has(select[name="contact_target"]) { grid-column: span 1; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label:has(input[name="result"]),
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label:has(input[name="duration_seconds"]) { grid-column: span 1; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label:has(textarea[name="summary"]),
.customer-detail-page .customer-call-entry > form.customer-service-call-form > fieldset,
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label[data-customer-escalation-fields],
.customer-detail-page .customer-call-entry > form.customer-service-call-form > button { grid-column: 1 / -1; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form > input,
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label input,
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label select,
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 35px;
  height: 35px;
  padding: 6px 9px;
  font-size: 12px;
}
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label textarea,
.customer-detail-page .customer-call-entry > form.customer-service-call-form > label:has(textarea[name="summary"]) textarea { min-height: 58px; height: 58px; resize: vertical; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form > fieldset.customer-service-next-step {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 9px;
  min-width: 0;
  margin: 1px 0 0;
  padding: 8px 9px 9px;
  border: 1px solid #e7edf4;
  border-radius: 10px;
  background: #f8fafc;
}
.customer-detail-page .customer-call-entry > form.customer-service-call-form > fieldset.customer-service-next-step > legend { padding-inline: 5px; font-size: 11px; font-weight: 700; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form > fieldset.customer-service-next-step > label { display: grid; gap: 3px; min-width: 0; margin: 0; font-size: 10px; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form > fieldset.customer-service-next-step > label:has(input[name="followup_reason"]),
.customer-detail-page .customer-call-entry > form.customer-service-call-form > fieldset.customer-service-next-step > .field-help { grid-column: 1 / -1; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form > fieldset.customer-service-next-step input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 33px; height: 33px; padding: 5px 8px; font-size: 11px; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form > fieldset.customer-service-next-step > .field-help { margin: 0; font-size: 10px; line-height: 1.6; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form > button { justify-self: start; min-height: 36px; margin-top: 0; padding: 7px 15px; }
.customer-detail-page .customer-call-entry > form.customer-service-call-form [hidden] { display: none !important; }
.customer-service-call-form[data-customer-call-wizard] { display: grid; gap: 12px; min-width: 0; }
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 12px; margin: 0; padding: 0; border: 0; }
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step][hidden] { display: none !important; }
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] > label,
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] > .field { display: grid; align-content: start; gap: 5px; min-width: 0; margin: 0; }
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] > label:has(textarea),
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] > fieldset,
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] > [data-customer-escalation-fields] { grid-column: 1 / -1; }
.customer-service-call-form[data-customer-call-wizard] .customer-call-wizard-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 1px solid #e4eaf4; border-radius: 10px; background: #f8faff; color: #68758a; font-size: 12px; }
.customer-service-call-form[data-customer-call-wizard] .customer-call-wizard-progress strong { color: #172b4d; font-size: 13px; }
.customer-service-call-form[data-customer-call-wizard] .customer-call-review { grid-column: 1 / -1; display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #f5f4ff; color: #52627a; font-size: 12px; line-height: 1.8; }
.customer-service-call-form[data-customer-call-wizard] .customer-call-review strong { color: #4137a4; font-size: 13px; }
.customer-service-call-form[data-customer-call-wizard] .customer-service-next-step { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; min-width: 0; margin: 0; padding: 12px; border: 1px solid #e4eaf4; border-radius: 10px; background: #fbfcff; }
.customer-service-call-form[data-customer-call-wizard] .customer-service-next-step > legend { padding-inline: 6px; color: #52627a; font-size: 12px; font-weight: 700; }
.customer-service-call-form[data-customer-call-wizard] .customer-service-next-step > label,
.customer-service-call-form[data-customer-call-wizard] [data-customer-escalation-fields] { display: grid; gap: 5px; min-width: 0; margin: 0; }
.customer-service-call-form[data-customer-call-wizard] .customer-service-next-step > label:has([name="followup_reason"]) { grid-column: 1 / -1; }
.customer-service-call-form[data-customer-call-wizard] .customer-service-next-step .field-help { grid-column: 1 / -1; margin: 0; color: #78869c; font-size: 11px; line-height: 1.7; }
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] input,
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] select,
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] textarea { box-sizing: border-box; width: 100%; min-width: 0; }
.customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] textarea { min-height: 74px; resize: vertical; }
.customer-service-call-form[data-customer-call-wizard] .customer-call-wizard-actions { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding-top: 2px; border-top: 1px solid #edf0f5; }
.customer-service-call-form[data-customer-call-wizard] [hidden] { display: none !important; }
@media (max-width: 620px) {
  .customer-service-call-form[data-customer-call-wizard] [data-customer-call-step] { grid-template-columns: 1fr; gap: 10px; }
  .customer-service-call-form[data-customer-call-wizard] .customer-service-next-step { grid-template-columns: 1fr; }
  .customer-service-call-form[data-customer-call-wizard] .customer-call-wizard-progress { align-items: flex-start; flex-direction: column; gap: 3px; }
  .customer-service-call-form[data-customer-call-wizard] .customer-call-wizard-actions > button { flex: 1; min-height: 42px; }
}
@media (max-width: 620px) {
  .customer-detail-page .customer-call-entry > form.customer-service-call-form { grid-template-columns: 1fr; gap: 8px; padding: 10px 12px 12px; }
  .customer-detail-page .customer-call-entry > form.customer-service-call-form > label,
  .customer-detail-page .customer-call-entry > form.customer-service-call-form > .field,
  .customer-detail-page .customer-call-entry > form.customer-service-call-form > fieldset,
  .customer-detail-page .customer-call-entry > form.customer-service-call-form > button { grid-column: 1 / -1; }
  .customer-detail-page .customer-call-entry > form.customer-service-call-form > fieldset.customer-service-next-step { grid-template-columns: 1fr 1fr; }
}

/* Organization chart */
.org-chart-shell { display: grid; gap: 12px; }
.org-chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; border: 1px solid #e5eaf2; background: linear-gradient(135deg, #fff, #f8fbff); }
.org-chart-toolbar-copy { min-width: 0; }
.org-chart-toolbar-copy h2 { margin: 3px 0 4px; color: var(--text); font-size: 18px; }
.org-chart-toolbar-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.org-chart-toolbar-stats { display: flex; align-items: center; gap: 7px; margin-inline-start: auto; }
.org-chart-toolbar-stats > span { display: grid; min-width: 66px; padding: 7px 9px; border: 1px solid #e4eaf2; border-radius: 10px; text-align: center; background: rgba(255,255,255,.78); }
.org-chart-toolbar-stats strong { color: var(--primary-dark, #174d7c); font-size: 14px; line-height: 1.2; }
.org-chart-toolbar-stats small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.org-chart-toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.org-chart-toolbar-actions .button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.org-chart-dirty-state { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #dcefe8; border-radius: 999px; color: #267768; background: #f1fbf8; font-size: 11px; white-space: nowrap; }
.org-chart-dirty-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #35a58e; }
.org-chart-dirty-state.is-dirty { border-color: #f0dfb9; color: #986b1f; background: #fff9ec; }
.org-chart-dirty-state.is-dirty::before { background: #d89228; }
.org-chart-workspace { display: grid; grid-template-columns: minmax(220px, .32fr) minmax(0, 1fr); gap: 12px; align-items: stretch; min-width: 0; }
.org-chart-roster, .org-chart-canvas { min-width: 0; overflow: hidden; border: 1px solid #e5eaf2; }
.org-chart-roster .panel-header, .org-chart-canvas .panel-header { min-height: 0; padding: 14px 16px; border-bottom: 1px solid #edf1f5; }
.org-chart-roster .panel-header h3, .org-chart-canvas .panel-header h3 { margin: 0; color: var(--text); font-size: 14px; }
.org-chart-roster-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; color: #376da5; background: #edf5ff; }
.org-chart-roster-badge svg, .org-chart-canvas-hint svg, .org-chart-canvas-footer svg, .org-chart-root-drop svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.org-chart-roster-tools { padding: 11px 13px 0; }
.org-chart-search { position: relative; display: block; }
.org-chart-search input { width: 100%; min-height: 37px; padding-inline: 36px 11px; border: 1px solid #dfe6ef; border-radius: 10px; background: #fbfdff; font-size: 12px; }
.org-chart-search svg { position: absolute; inset-inline-end: 11px; top: 10px; width: 16px; height: 16px; fill: none; stroke: #91a0b4; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.org-chart-roster-list { display: grid; gap: 7px; max-height: 620px; padding: 11px 13px 14px; overflow: auto; }
.org-chart-roster-card { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 10px; border: 1px solid #e5eaf1; border-radius: 11px; background: #fff; cursor: grab; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.org-chart-roster-card:hover { border-color: #bfcfe3; background: #f8fbff; box-shadow: 0 5px 14px rgba(31, 64, 102, .07); transform: translateY(-1px); }
.org-chart-roster-card:active, .org-chart-roster-card.is-dragging { cursor: grabbing; opacity: .62; }
.org-chart-roster-card > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.org-chart-roster-card strong, .org-chart-roster-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-chart-roster-card strong { color: var(--text); font-size: 12px; }
.org-chart-roster-card small { color: var(--muted); font-size: 10px; }
.org-chart-roster-avatar, .org-chart-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 50%; color: #1f578b; background: #eaf3ff; font-weight: 800; }
.org-chart-roster-avatar { width: 30px; height: 30px; font-size: 12px; }
.org-chart-roster-drag { margin-inline-start: auto; color: #a2aec0; font-size: 17px; line-height: 1; letter-spacing: -4px; }
.org-chart-canvas { display: flex; flex-direction: column; min-height: 690px; }
.org-chart-canvas .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.org-chart-canvas-hint { display: inline-flex; align-items: center; gap: 6px; color: #5e7d9f; font-size: 10px; white-space: nowrap; }
.org-chart-canvas-scroll { flex: 1 1 auto; min-height: 520px; padding: 20px; overflow: auto; background: radial-gradient(circle at 50% 0, #f8fbff, #fff 58%); }
.org-chart-tree-root, .org-chart-children { display: flex; justify-content: center; gap: 30px; min-width: max-content; margin: 0; padding: 0; list-style: none; }
.org-chart-tree-root { position: relative; align-items: flex-start; min-height: 440px; padding: 12px 18px 38px; }
.org-chart-children { position: relative; align-items: flex-start; margin-top: 29px; padding-top: 24px; }
.org-chart-children::before { content: ''; position: absolute; inset-inline: 18px; top: 0; height: 1px; background: #cfdbea; }
.org-chart-node { position: relative; display: grid; justify-items: center; min-width: 174px; }
.org-chart-node > .org-chart-node::before { content: ''; }
.org-chart-node > .org-chart-children::before { content: ''; }
.org-chart-children > .org-chart-node::before { content: ''; position: absolute; top: -24px; inset-inline-start: 50%; width: 1px; height: 24px; background: #cfdbea; }
.org-chart-person { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; width: 174px; min-height: 58px; padding: 9px 10px; border: 1px solid #dce5f0; border-radius: 13px; background: #fff; box-shadow: 0 7px 18px rgba(39, 70, 108, .08); cursor: grab; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.org-chart-person:hover, .org-chart-person.is-over { border-color: #4e91ca; box-shadow: 0 0 0 4px rgba(78, 145, 202, .14), 0 10px 22px rgba(39, 70, 108, .13); transform: translateY(-2px); }
.org-chart-person.is-selected { border-color: #d28a28; background: #fffaf0; box-shadow: 0 0 0 4px rgba(210, 138, 40, .16), 0 10px 22px rgba(125, 83, 20, .12); }
.org-chart-person:active, .org-chart-person.is-dragging { cursor: grabbing; opacity: .6; }
.org-chart-drag-handle { flex: 0 0 auto; color: #a7b5c7; font-size: 13px; line-height: 1; letter-spacing: -4px; writing-mode: vertical-rl; }
.org-chart-avatar { width: 34px; height: 34px; font-size: 13px; }
.org-chart-person-copy { display: grid; gap: 2px; min-width: 0; text-align: start; }
.org-chart-person-copy strong, .org-chart-person-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-chart-person-copy strong { color: var(--text); font-size: 12px; }
.org-chart-person-copy small { color: var(--muted); font-size: 9px; }
.org-chart-person-state { flex: 0 0 auto; width: 7px; height: 7px; margin-inline-start: auto; border-radius: 50%; background: #42b59c; box-shadow: 0 0 0 3px #e8f8f3; }
.org-chart-drop-target { width: 142px; min-height: 19px; margin-top: 7px; padding: 3px 6px; border: 1px dashed transparent; border-radius: 7px; color: transparent; font-size: 9px; text-align: center; transition: color .16s ease, border-color .16s ease, background .16s ease; }
.org-chart-node:hover > .org-chart-drop-target, .org-chart-drop-target.is-over { border-color: #92b7dd; color: #4174a6; background: #eff6ff; }
.org-chart-root-drop { display: flex; align-items: center; justify-content: center; min-width: 220px; min-height: 38px; margin: 0 auto 22px; padding: 8px 13px; border: 1px dashed #bfd0e3; border-radius: 10px; color: #65809b; background: rgba(245, 249, 254, .9); font-size: 11px; text-align: center; transition: border-color .16s ease, color .16s ease, background .16s ease; }
.org-chart-root-drop.is-over { border-color: #538ec6; color: #1e5c91; background: #eaf4ff; }
.org-chart-canvas-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px; border-top: 1px solid #edf1f5; color: var(--muted); font-size: 10px; }
.org-chart-canvas-footer > span { display: inline-flex; align-items: center; gap: 6px; }
.org-chart-migration-notice { display: flex; align-items: center; gap: 15px; padding: 22px; border: 1px solid #f0dfb8; background: #fffaf0; }
.org-chart-migration-notice h2 { margin: 0 0 5px; font-size: 16px; }
.org-chart-migration-notice p { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.org-chart-migration-notice code { direction: ltr; display: inline-block; padding: 4px 7px; border-radius: 6px; color: #80591a; background: #fff0c9; font-size: 11px; }
.org-chart-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 13px; color: #996d20; background: #fff0c9; }
.org-chart-empty-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) {
  .org-chart-toolbar { align-items: flex-start; flex-direction: column; }
  .org-chart-toolbar-actions { width: 100%; justify-content: space-between; }
  .org-chart-toolbar-stats { width: 100%; margin-inline-start: 0; }
  .org-chart-toolbar-stats > span { flex: 1 1 0; }
  .org-chart-workspace { grid-template-columns: 1fr; }
  .org-chart-roster-list { max-height: 260px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-chart-canvas { min-height: 560px; }
}
@media (max-width: 600px) {
  .org-chart-toolbar { padding: 14px; }
  .org-chart-toolbar-actions { align-items: stretch; flex-direction: column; }
  .org-chart-toolbar-actions .button, .org-chart-dirty-state { justify-content: center; width: 100%; }
  .org-chart-roster-list { grid-template-columns: 1fr; }
  .org-chart-canvas-scroll { padding: 12px; }
  .org-chart-canvas-footer { align-items: stretch; flex-direction: column; }
}
.org-chart-tree-root { display: block; min-width: max-content; min-height: 440px; padding: 12px 18px 38px; }
.org-chart-root-branches { display: flex; justify-content: center; align-items: flex-start; gap: 30px; min-width: max-content; margin: 0; padding: 0; list-style: none; }
.org-chart-unassigned { display: grid; justify-items: start; gap: 12px; width: max-content; max-width: 100%; margin: 28px auto 0; padding: 14px 16px; border: 1px dashed #d7e1ed; border-radius: 12px; background: rgba(247, 250, 254, .82); }
.org-chart-unassigned > strong { color: #71859d; font-size: 11px; font-weight: 600; }
.org-chart-unassigned-branches { justify-content: flex-start; flex-wrap: wrap; gap: 18px; min-width: 0; }
.org-chart-root-drop { margin-bottom: 22px; }
.org-chart-shell.is-dragging .org-chart-drop-target { border-color: #b8cee5; color: #4e77a0; background: #f4f8fd; }
.org-chart-shell.is-dragging .org-chart-person { border-color: #c4d7eb; }
.org-chart-shell.is-dragging .org-chart-person:hover, .org-chart-shell.is-dragging .org-chart-person.is-over { border-color: #4389c5; background: #eef7ff; box-shadow: 0 0 0 4px rgba(67, 137, 197, .16), 0 10px 22px rgba(39, 70, 108, .13); }
.org-chart-dirty-state.is-selecting { border-color: #e9d2a4; color: #986b1f; background: #fff9ec; }
.org-chart-dirty-state.is-selecting::before { background: #d89228; }
.org-chart-roster-card.is-selected { border-color: #d28a28; background: #fffaf0; box-shadow: 0 0 0 3px rgba(210, 138, 40, .12); }
.org-chart-scope-notice { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; padding: 10px 13px; border: 1px solid #ead7a6; border-radius: 11px; color: #765b1b; background: #fff9e9; font-size: 11px; line-height: 1.8; }
.org-chart-scope-notice strong { flex: 0 0 auto; color: #765b1b; }
.org-chart-scope-notice.is-error { border-color: #efc4c8; color: #983d49; background: #fff3f4; }
.org-chart-scope-notice.is-error strong { color: #983d49; }
.org-chart-validation { margin: 0; padding: 0; border: 0 solid transparent; border-radius: 10px; color: #98414b; background: transparent; font-size: 11px; line-height: 1.8; }
.org-chart-validation:not([hidden]) { margin: 0 0 12px; padding: 9px 12px; border-width: 1px; border-color: #f0c8cc; background: #fff5f6; }
.org-chart-person.is-locked { border-color: #b7c9dc; color: #264a6b; background: linear-gradient(135deg, #f1f7fd, #fff); cursor: default; box-shadow: 0 5px 14px rgba(39, 70, 108, .09); }
.org-chart-person.is-locked .org-chart-drag-handle { color: #3c719e; font-size: 11px; letter-spacing: 0; }
.org-chart-person.is-locked.is-over { border-color: #4389c5; box-shadow: 0 0 0 4px rgba(67, 137, 197, .16), 0 10px 22px rgba(39, 70, 108, .13); }
.org-chart-roster-card.is-locked { border-color: #c9d7e5; background: #f5f9fd; cursor: default; }
.org-chart-roster-card.is-locked .org-chart-roster-drag { color: #6384a4; font-size: 11px; letter-spacing: 0; }
.org-chart-roster-card.is-role-changed { border-color: #9bcbbb; background: #f3fbf7; }
.org-chart-root-drop[aria-disabled="true"] { border-style: solid; color: #3e668b; background: #f2f7fc; cursor: default; }
.org-chart-shell.is-dragging .org-chart-person.is-locked { border-color: #82acd0; }
@media (max-width: 600px) {
  .org-chart-scope-notice { align-items: flex-start; flex-direction: column; gap: 2px; }
}
.profile-detail-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.profile-detail-copy > span { color: var(--muted); font-size: 11px; line-height: 1.6; }
.profile-detail-copy strong { min-width: 0; color: #29364a; font-size: 13px; font-weight: 700; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.funnel-track {
  display: flex;
  gap: 0;
  min-width: max-content;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.funnel-step {
  flex: 0 0 104px;
  min-width: 104px;
}
.funnel-step small {
  white-space: normal;
  line-height: 1.45;
}
.history-list {
  position: relative;
  display: grid;
  gap: 0;
  padding-inline-start: 15px;
}
.history-list::before {
  content: "";
  position: absolute;
  top: 9px;
  inset-inline-start: 4px;
  bottom: 9px;
  width: 2px;
  border-radius: 2px;
  background: #dce5ee;
}
.history-item {
  position: relative;
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr) minmax(90px, auto);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding-block: 8px;
  padding-inline: 17px 0;
  border-bottom: 1px solid #f0f2f5;
}
.history-item::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 18px;
  width: 10px;
  height: 10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px #9eb7cd;
}
.history-item:last-child { border-bottom: 0; }
.followup-item { align-items: flex-start; }
.followup-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.followup-copy small { white-space: normal; line-height: 1.6; }
.contact-choice-grid { display: grid; gap: 10px; }
.contact-choice-grid .button { justify-content: space-between; }
.contact-choice-grid .button span { display: block; direction: ltr; font-size: 11px; opacity: .7; }
.field-help { color: var(--muted); font-size: 10px; font-weight: 400; }

/* 2026.09.08.13 — technical Excel trace dashboard. */
.excel-trace-header { align-items: flex-start; }
.excel-trace-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.excel-trace-actions { align-items: center; flex-wrap: wrap; }
.excel-trace-runtime { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 14px 18px 0; padding: 10px 12px; border: 1px solid #cbe9d5; border-radius: 10px; background: #edf9f1; color: #17653d; font-size: 11px; }
.excel-trace-runtime.is-warning { border-color: #f0c7ca; background: #fff4f4; color: #9b2d35; }
.excel-trace-runtime-dot { width: 9px; height: 9px; border-radius: 50%; background: #1f9d72; box-shadow: 0 0 0 4px rgba(31,157,114,.12); }
.is-warning .excel-trace-runtime-dot { background: #c94c5d; box-shadow: 0 0 0 4px rgba(201,76,93,.12); }
.excel-trace-runtime code, .excel-trace-meta code { padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,.75); font-size: 10px; overflow-wrap: anywhere; }
.excel-trace-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 18px; color: var(--muted); font-size: 10px; }
.excel-trace-meta span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fafcfa; }
.excel-trace-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 18px 12px; }
.excel-trace-summary > div { display: flex; flex-direction: column; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfb; }
.excel-trace-summary strong { color: var(--primary); font-size: 19px; }
.excel-trace-summary span { color: var(--muted); font-size: 10px; }
.excel-trace-summary .is-danger strong { color: #b4233c; }.excel-trace-summary .is-success strong { color: #1e7f61; }
.excel-trace-toolbar { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; margin: 0 18px 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbf9; }
.excel-trace-toolbar label { display: grid; gap: 4px; min-width: 210px; color: var(--muted); font-size: 10px; }.excel-trace-toolbar input,.excel-trace-toolbar select { min-height: 35px; padding: 7px 9px; border: 1px solid #d5e2d9; border-radius: 8px; background: #fff; font: inherit; }
.excel-trace-list { display: grid; gap: 7px; margin: 0 18px; max-height: 620px; overflow: auto; }
.excel-trace-entry { border: 1px solid #dfe8e2; border-radius: 9px; background: #fff; }.excel-trace-entry.is-error { border-inline-start: 4px solid #c94c5d; }.excel-trace-entry summary { display: grid; grid-template-columns: 160px minmax(130px, 1fr) minmax(110px, auto); align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }.excel-trace-entry summary::-webkit-details-marker { display: none; }.excel-trace-entry-time,.excel-trace-entry-trace { color: var(--muted); font-family: ui-monospace,Consolas,monospace; font-size: 10px; }.excel-trace-entry-event { color: var(--primary); font-size: 12px; }.excel-trace-entry-body { padding: 0 12px 12px; border-top: 1px solid #edf1ee; }.excel-trace-entry-body p { margin: 9px 0; font-size: 12px; }.excel-trace-entry-message { color: #a32d3a; }.excel-trace-entry pre { max-height: 230px; margin: 0; padding: 9px; overflow: auto; border-radius: 7px; background: #f6f8f7; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.7 ui-monospace,Consolas,monospace; }.excel-trace-empty { margin: 0 18px; padding: 18px; border: 1px dashed #cbd9cf; border-radius: 10px; background: #fafcfa; color: var(--muted); text-align: center; }
@media (max-width: 760px) { .excel-trace-header { align-items: stretch; }.excel-trace-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: 12px; }.excel-trace-toolbar,.excel-trace-meta,.excel-trace-list { margin-inline: 12px; }.excel-trace-toolbar label { min-width: 100%; }.excel-trace-entry summary { grid-template-columns: 1fr; gap: 4px; }.excel-trace-actions { width: 100%; }.excel-trace-actions > * { flex: 1 1 auto; } }
.form-actions { flex-wrap: wrap; }

@media (max-width: 1050px) {
  .detail-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lead-details-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .content-wrap { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .lead-view-switcher { display:flex; justify-content: stretch; margin: 10px 0 12px; }
  .lead-view-switcher-label { display: none; }
  .lead-view-button { flex: 1 1 0; min-height: 40px; }
  .lead-sort-control{display:flex;flex:1 1 100%;margin:0 0 18px;justify-content:center}
  .lead-sort-control select{max-width:none;flex:1}
  .lead-results-view{margin-top:0}
  .lead-card-grid { grid-template-columns: 1fr; gap: 10px; }
  .lead-card { padding: 12px; border-radius: 14px; }
  .lead-card-header { gap: 8px; padding-bottom: 10px; }
  .lead-card-select { gap: 5px; font-size: 9px; }
  .lead-card-select input { flex-basis: 20px; width: 20px; height: 20px; border-radius: 4px; }
  .lead-card-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 10px; padding-top: 11px; }
  .lead-card-fact.is-wide { grid-column: 1 / -1; }
  .lead-card-label { font-size: 9px; }
  .lead-card-value { font-size: 10px; line-height: 1.7; }
  .lead-card-actions .button { flex: 1 1 auto; min-width: 0; }
  .pagination {
    position: relative;
    z-index: 41;
    justify-content: center;
    flex-wrap: wrap;
    margin: 16px 0 calc(92px + env(safe-area-inset-bottom));
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 4px 14px rgba(35,39,84,.06);
  }
  .pagination > span {
    flex: 0 0 100%;
    text-align: center;
    line-height: 1.9;
  }
  .pagination .button {
    min-width: 92px;
    min-height: 44px;
  }
  .topbar-title h1 { max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .detail-header { align-items: stretch; flex-direction: column; }
  .detail-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-actions .button { width: 100%; min-width: 0; }
  .lead-details-grid { grid-template-columns: 1fr; }
  .lead-details-grid { padding: 0 12px 12px; }
  .lead-details-card .panel-header { padding: 15px 12px; }
  .lead-detail-item { grid-template-columns: 1fr; gap: 2px; }
  .info-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .info-grid > div { overflow-wrap: anywhere; }
  .panel-header { padding: 14px 15px; }
  .panel-inner { padding: 15px; }
  .detail-side { gap: 12px; }
  .detail-side-card { border-radius: 13px; box-shadow: 0 3px 12px rgba(35,39,84,.035); }
  .detail-side-card .panel-header { min-height: 56px; padding: 13px 14px; }
  .detail-side-card .panel-header h3 { font-size: 14px; }
  .detail-side-card .compact-list { padding: 10px 12px 12px; }
  .detail-side-card .panel-inner { padding: 12px; }
  .detail-side-card .compact-item { min-width: 0; padding: 11px 1px; }
  .detail-side-card .compact-item > div { min-width: 0; }
  .detail-side-card .compact-item strong, .detail-side-card .compact-item small { overflow-wrap: anywhere; line-height: 1.8; }
  .sales-card .panel-header { min-height: 57px; padding: 12px 13px; }
  .sales-card .panel-header-action { min-width: 60px; min-height: 32px; padding: 6px 9px; }
  .sales-card .sales-list { gap: 7px; padding: 11px 12px 13px; }
  .sales-card .sale-detail-trigger { min-height: 64px; padding: 10px 14px 10px 16px; }
  .sales-card .sale-detail-icon { flex-basis: 32px; width: 32px; height: 32px; }
  .sales-card .sale-detail-trigger-copy { gap: 3px; }
  .sales-card .sale-detail-trigger-copy strong { font-size: 11px; }
  .sales-card .sale-detail-trigger-copy small { font-size: 9px; line-height: 1.7; }
  .sales-card .sale-detail-trigger-arrow { flex-basis: 26px; width: 26px; height: 26px; }
  .educational-needs-panel .section-heading { gap: 10px; }
  .profile-details-grid { grid-template-columns: 1fr; gap: 9px; }
  .profile-detail-item.is-wide { grid-column: auto; }
  .profile-detail-item { padding: 10px 11px; }
  .detail-empty { padding: 21px 10px 22px; }
  .detail-empty small { line-height: 1.9; }
  .lead-path { margin-inline: -15px; padding-inline: 15px; }
  .lead-path-track { min-width: 690px; }
  .lead-path-step { flex-basis: 82px; min-width: 82px; }
  .lead-path-label { max-width: 78px; font-size: 9px; }
  .lead-history-item { grid-template-columns: 30px minmax(0, 1fr); gap: 9px; }
  .funnel-track { margin-inline: -15px; padding-inline: 15px; }
  .funnel-step { flex-basis: 88px; min-width: 88px; padding-inline: 3px; }
  .funnel-step:not(:last-child)::after { right: calc(-50% + 7px); left: calc(50% + 7px); }
  .history-item {
    grid-template-columns: 1fr;
    gap: 1px;
    padding: 8px 17px 10px 0;
  }
  .history-item small { margin-top: 2px; }
  .assignment-form { width: 100%; justify-content: stretch; }
  .assignment-form select, .assignment-form input, .assignment-form .button { flex: 1 1 100%; width: 100%; max-width: none; min-height: 39px; }
  .followup-item .icon-button { flex: 0 0 auto; }
  .note-item { align-items: flex-start; gap: 8px; }
  .note-item-actions { gap: 4px; }
  .note-icon-button { width: 30px; height: 30px; }
  .table-card { overflow-x: auto; background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(35,39,84,.025); }
  .table-card table { display: table; width: 100%; min-width: 640px; }
  .table-card .leads-table { min-width: 1120px; }
  .table-card thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; clip-path: none; }
  .table-card tbody { display: table-row-group; }
  .table-card tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .table-card th, .table-card td { display: table-cell; width: auto; min-height: 0; padding: 12px 14px; border-bottom: 1px solid #f0f1f6; text-align: right; }
  .table-card td::before { content: none; }
  .table-card td:first-child { display: table-cell; padding-top: 12px; }
  .table-card td:first-child .entity-name { min-height: 0; }
  .table-card td[data-label="عملیات"] { display: table-cell; }
  .table-card td[data-label="عملیات"]::before { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .report-filter { align-items: stretch; flex-direction: column; }
  .report-filter label { width: 100%; }
  .score-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .evaluation-summary { align-items: flex-start; padding: 12px; }
  .evaluation-score-ring { width: 76px; height: 76px; flex-basis: 76px; box-shadow: inset 0 0 0 8px #fff; }
  .evaluation-score-ring strong { font-size: 19px; }
  .evaluation-summary-copy p { margin-top: 2px; }
  .evaluation-criteria-grid { grid-template-columns: 1fr; gap: 9px; }
  .evaluation-criterion { padding: 11px; }
  .evaluation-criterion input { min-height: 52px; }
  .evaluation-comparison-grid { grid-template-columns: 1fr; padding: 10px; }
  .evaluation-comparison-card { padding: 12px; }
  .evaluation-comparison-meta { line-height: 1.8; }
  .funnel-report-row { grid-template-columns: minmax(130px, .8fr) 35px minmax(70px,1fr); }
  .mobile-nav { position: fixed; z-index: 12; inset-inline: 10px; bottom: 8px; display: grid; grid-template-columns: repeat(5,1fr); padding: 3px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 9px 22px rgba(23,38,58,.13); backdrop-filter: blur(8px); }
  .mobile-nav .nav-item { min-height: 43px; padding: 2px; display: grid; justify-items: center; gap: 0; border-radius: 9px; font-size: 9px; }
  .mobile-nav .nav-item svg { width: 18px; height: 18px; }
  .table-card { overflow: visible; }
  .table-card table:not(.leads-table) { display: block; width: 100%; min-width: 0; }
  .table-card:not(:has(.leads-table)) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
  .table-card:not(:has(.leads-table)) tbody { display: grid; gap: 10px; padding: 10px; }
  .table-card:not(:has(.leads-table)) tr { display: block; margin: 0; padding: 12px; border: 1px solid #e8edf3; border-radius: 14px; background: #fff; box-shadow: 0 3px 12px rgba(35,39,84,.045); }
  .table-card:not(:has(.leads-table)) td { display: grid; grid-template-columns: minmax(92px, 34%) minmax(0, 1fr); align-items: start; gap: 10px; width: 100%; min-height: 0; padding: 9px 0; border-bottom: 1px solid #f0f1f6; text-align: right; overflow-wrap: anywhere; }
  .table-card:not(:has(.leads-table)) td:last-child { border-bottom: 0; }
  .table-card:not(:has(.leads-table)) td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.8; }
  .table-card:not(:has(.leads-table)) td:first-child { padding-top: 0; }
  .table-card:not(:has(.leads-table)) td[data-label="عملیات"] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .table-card:not(:has(.leads-table)) td[data-label="عملیات"]::before { flex: 0 0 100%; }
  .button, .logout-button, .icon-button, .note-icon-button, .panel-header-action { min-height: 44px; }
  .button.small { min-height: 42px; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { min-height: 48px; }
  textarea { min-height: 110px; }
  .mobile-nav { z-index: 40; bottom: max(8px, env(safe-area-inset-bottom)); border-radius: 14px; }
  .mobile-nav .nav-item { min-height: 46px; padding: 3px 2px; align-content: center; gap: 1px; font-size: 9px; font-weight: 700; }
  .mobile-nav .nav-item svg { width: 20px; height: 20px; }
  .mobile-fab-group { position: fixed; z-index: 45; left: var(--crm-fab-offset, 2px); right: auto; bottom: calc(var(--crm-fab-mobile-bottom, 70px) + env(safe-area-inset-bottom)); display: grid; justify-items: start; gap: 8px; }
  .mobile-fab-group[data-fab-side="right"] { left: auto; right: var(--crm-fab-offset, 2px); justify-items: end; }
  .mobile-fab-group[data-fab-side="right"] .mobile-fab-actions { justify-items: end; transform-origin: bottom right; }
  .mobile-fab { display: grid; place-items: center; width: var(--crm-fab-size, 42px); height: var(--crm-fab-size, 42px); padding: 0; border: 1px solid #d4dbe3; border-radius: 50%; color: #5b6876; background: #fff; box-shadow: 0 7px 16px rgba(41,55,72,.16); cursor: pointer; }
  .mobile-fab svg { width: 19px; height: 19px; transition: transform .18s ease; }
  .mobile-fab-group.is-open .mobile-fab svg { transform: rotate(45deg); }
  .mobile-fab-actions { display: grid; justify-items: start; gap: 8px; opacity: 0; visibility: hidden; transform: translateY(8px) scale(.96); transform-origin: bottom left; transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
  .mobile-fab-group.is-open .mobile-fab-actions { opacity: 1; visibility: visible; transform: none; }
  .mobile-fab-action { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 9px 13px; border: 1px solid #dce6ef; border-radius: 13px; color: #173852; background: #fff; box-shadow: 0 7px 18px rgba(23,38,58,.14); font-size: 12px; font-weight: 800; }
  .mobile-fab-action svg { width: 18px; height: 18px; }
  .table-card:has(.leads-table) { overflow-x: auto; overflow-y: visible; scrollbar-width: thin; scrollbar-color: #8ca0b3 #edf2f6; }
  .table-card:has(.leads-table)::-webkit-scrollbar { height: 11px; }
  .table-card:has(.leads-table)::-webkit-scrollbar-track { border-radius: 99px; background: #edf2f6; }
  .table-card:has(.leads-table)::-webkit-scrollbar-thumb { border: 3px solid #edf2f6; border-radius: 99px; background: #8ca0b3; }
  .lead-table-scroll-top { display: block; overflow-x: auto; overflow-y: hidden; height: 12px; margin: 0 10px 8px; border-radius: 99px; scrollbar-width: thin; scrollbar-color: #8ca0b3 #edf2f6; }
  .lead-table-scroll-top > div { height: 1px; min-width: 1120px; }
  .lead-table-scroll-top::-webkit-scrollbar { height: 10px; }
  .lead-table-scroll-top::-webkit-scrollbar-track { border-radius: 99px; background: #edf2f6; }
  .lead-table-scroll-top::-webkit-scrollbar-thumb { border: 3px solid #edf2f6; border-radius: 99px; background: #8ca0b3; }
  .leads-table .lead-name-cell, .leads-table .lead-column { position: sticky; inset-inline-start: 0; z-index: 4; background: #fff; box-shadow: -8px 0 12px -12px rgba(21,49,75,.45); }
  .leads-table.has-select-column .lead-name-cell, .leads-table.has-select-column .lead-column { inset-inline-start: 48px; }
  .leads-table tbody tr:hover .lead-name-cell { background: #fbfcff; }
  .leads-table .select-column { position: sticky; inset-inline-start: 0; z-index: 5; background: #fff; }
  .leads-table thead .select-column, .leads-table thead .lead-column { background: #fbfbfd; }
  .lead-filter-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: #fff; cursor: pointer; list-style: none; font-size: 12px; font-weight: 800; }
  .lead-filter-panel > summary::-webkit-details-marker { display: none; }
  .lead-filter-panel > summary::after { content: "⌄"; color: var(--primary); font-size: 18px; line-height: 1; transition: transform .18s ease; }
  .lead-filter-panel[open] > summary { border-color: #b9cde0; border-radius: 14px 14px 0 0; }
  .lead-filter-panel[open] > summary::after { transform: rotate(180deg); }
  .lead-filter-panel > summary span { display: inline-flex; align-items: center; gap: 7px; }
  .lead-filter-panel > summary svg { width: 17px; height: 17px; color: var(--primary); }
  .lead-filter-panel > summary small { color: var(--muted); font-size: 10px; font-weight: 500; }
  .lead-filter-panel .lead-filters { border-radius: 0 0 16px 16px; }
  .select-column input, .bulk-select-all input {
    appearance: none;
    width: 22px;
    height: 22px;
    margin: 0;
    border: 2px solid #bdc9d6;
    border-radius: 7px;
    background: #fff;
    vertical-align: middle;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  }
  .select-column input:hover, .bulk-select-all input:hover { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(29,92,145,.1); }
  .select-column input:checked, .bulk-select-all input:checked { border-color: var(--primary); background: var(--primary); box-shadow: 0 3px 8px rgba(29,92,145,.2); }
  .select-column input:checked::after, .bulk-select-all input:checked::after { content: ""; display: block; width: 6px; height: 11px; margin: 2px auto 0; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
  .select-column input:indeterminate, .bulk-select-all input:indeterminate { border-color: var(--primary); background: linear-gradient(var(--primary), var(--primary)) center / 10px 2px no-repeat, #fff; }
  .is-lead-range-selecting .select-column input { transform: scale(1.04); }
  .lead-bulk-toolbar .bulk-selection { padding: 2px 0; }
  .modal { z-index: 60; padding: 0; align-items: stretch; }
  body.modal-open { overflow: hidden; }
  .modal-card { width: 100%; height: 100dvh; max-height: 100dvh; padding: 22px 16px calc(28px + env(safe-area-inset-bottom)); border-radius: 0; }
  .modal-card h2 { padding-inline: 48px 4px; font-size: 18px; line-height: 1.8; }
  .modal-close { position: absolute; top: 14px; inset-inline-start: 12px; width: 46px; height: 46px; }
}
@media (max-width: 430px) {
  .profile-details-grid { grid-template-columns: 1fr; }
  .profile-detail-item.is-wide { grid-column: auto; }
  .educational-needs-panel .section-heading { align-items: stretch; }
  .educational-needs-panel .section-heading > .button { align-self: flex-start; }
}

/* Workspace selector */
.workspace-page { display: grid; gap: 22px; }
.workspace-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.workspace-page-header h2 { margin: 6px 0 8px; }
.workspace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; align-items: stretch; }
.workspace-card { display: grid; grid-template-rows: auto minmax(74px, 1fr) auto; gap: 16px; min-width: 0; min-height: 238px; height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(35,39,84,.06); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.workspace-card:hover { border-color: #b8cce0; box-shadow: 0 12px 30px rgba(18,58,99,.10); transform: translateY(-2px); }
.workspace-card.is-current { border-color: #8fb5d3; box-shadow: 0 10px 28px rgba(18,58,99,.13); }
.workspace-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.workspace-card-mark, .workspace-switcher-mark { display: grid; flex: 0 0 auto; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #1d5c91, #0d3154); font-weight: 800; }
.workspace-card-status { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; min-width: 0; padding-top: 3px; }
.workspace-card-copy { min-width: 0; display: grid; align-content: center; gap: 8px; }
.workspace-card-copy h3 { display: -webkit-box; overflow: hidden; margin: 0; color: var(--text); font-size: 16px; line-height: 1.8; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.workspace-card-copy small, .workspace-status { color: var(--muted); font-size: 12px; }
.workspace-status { display: inline-flex; color: #2d9b68; font-weight: 800; }
.workspace-current-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 99px; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 800; }
.workspace-card-meta { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: 11px; }
.workspace-card-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card-meta span + span { padding-inline-start: 7px; border-inline-start: 1px solid var(--line); }
.workspace-card-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.workspace-card-action { min-width: 0; }
.workspace-card-action .button { width: 100%; min-height: 42px; }
.workspace-manage-action { white-space: nowrap; }
.workspace-admin-page { display: grid; gap: 22px; }
.workspace-admin-layout { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.8fr); gap: 18px; align-items: start; }
.workspace-admin-detail { display: grid; gap: 18px; }
.workspace-admin-list .panel-inner { padding: 10px; }
.workspace-admin-link { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: inherit; text-decoration: none; }
.workspace-admin-link:hover, .workspace-admin-link.is-active { background: #f3f5ff; }
.workspace-admin-link > span:last-child { min-width: 0; display: grid; gap: 3px; }
.workspace-admin-link strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-admin-link small { color: var(--muted); font-size: 11px; }
.workspace-members-table { display: grid; gap: 8px; }
.workspace-member-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.workspace-member-row:last-child { border-bottom: 0; }
.workspace-member-row > div:first-child { min-width: 0; display: grid; gap: 4px; }
.workspace-member-row small { color: var(--muted); font-size: 11px; }
.workspace-member-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.workspace-invite-card { max-width: 560px; margin: 30px auto; padding: 28px; display: grid; gap: 12px; text-align: center; }
.workspace-empty { display: grid; gap: 8px; padding: 24px; }
.workspace-switcher { display: inline-flex; align-items: center; gap: 8px; min-width: 150px; max-width: 260px; margin-inline: 12px; padding: 6px 10px 6px 7px; border: 1px solid var(--line); border-radius: 13px; color: inherit; background: #fff; text-decoration: none; }
.workspace-switcher-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.workspace-switcher-copy { display: grid; min-width: 0; line-height: 1.25; }
.workspace-switcher-copy small { color: var(--muted); font-size: 10px; }
.workspace-switcher-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.workspace-switcher-chevron { margin-inline-start: auto; color: var(--muted); font-size: 18px; line-height: 1; }
@media (max-width: 700px) {
  .workspace-switcher { order: 3; min-width: 0; max-width: 180px; margin: 8px 0 0; }
  .topbar { flex-wrap: wrap; }
  .workspace-page-header { display: block; }
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace-card { min-height: 218px; }
  .workspace-card-actions { grid-template-columns: minmax(0, 1fr) auto; }
  .workspace-admin-layout { grid-template-columns: 1fr; }
.workspace-page-header .button { margin-top: 14px; }
  .workspace-management-actions { align-items: stretch; }
  .workspace-member-row { align-items: flex-start; flex-direction: column; }
  .workspace-member-actions { width: 100%; justify-content: flex-start; }
}

.workspace-management-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.workspace-management-actions .inline-form { display: inline-flex; }
.workspace-import-panel {
  border-color: #cfe0ed;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}
.workspace-import-page-header { margin-bottom: 14px; }
.workspace-import-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 14px;
}
.workspace-import-upload-card,
.workspace-import-status-card { min-width: 0; }
.workspace-import-upload-card .panel-inner,
.workspace-import-status-card .panel-inner { display: grid; gap: 12px; }
.workspace-import-transfer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #71808c;
  font-size: 11px;
}
.workspace-import-transfer-meta strong { color: #29465e; }
.workspace-import-transfer-meta span {
  padding-inline-start: 10px;
  border-inline-start: 1px solid #dce6ed;
}
.workspace-import-operation-progress { margin: 0; }
.workspace-import-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: #517565;
  font-size: 10px;
  font-weight: 700;
}
.workspace-import-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid #edf2f5;
}
.workspace-import-actions form { display: inline-flex; align-items: end; gap: 8px; }
.workspace-import-apply-form { flex-wrap: wrap; width: 100%; }
.workspace-import-apply-form .workspace-transfer-policy { min-width: 180px; flex: 1 1 180px; }
.workspace-import-history-panel { margin-top: 14px; }
.workspace-import-history-panel .panel-inner { padding-top: 16px; }
.workspace-import-history-list { display: grid; gap: 9px; }
.workspace-import-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid #e3ebf1;
  border-radius: 10px;
  background: #fff;
}
.workspace-import-history-main { display: grid; gap: 4px; min-width: 0; }
.workspace-import-history-main strong,
.workspace-import-history-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-import-history-main small { color: #7b8996; font-size: 11px; }
.workspace-import-history-summary { color: #4e7966 !important; font-weight: 700; }
.workspace-import-history-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
}
.workspace-import-history-error { width: min(100%, 620px); margin-top: 4px; }
.workspace-import-error {
  border: 1px solid #f0cbd0;
  border-radius: 9px;
  background: #fff7f8;
  color: #9f3343;
  overflow: hidden;
}
.workspace-import-error summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}
.workspace-import-copy-error { flex: 0 0 auto; }
.workspace-import-error-text {
  display: block;
  width: calc(100% - 20px);
  height: 82px;
  min-height: 82px;
  margin: 0 10px 10px;
  padding: 7px 8px;
  resize: vertical;
  direction: ltr;
  text-align: left;
  border: 1px solid #efd9dc;
  border-radius: 7px;
  color: #6f2734;
  background: #fff;
  font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.workspace-import-error pre {
  max-height: 150px;
  margin: 0;
  padding: 8px 10px;
  overflow: auto;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  border-top: 1px solid #f4dce0;
  font: 10px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.workspace-exports-panel {
  grid-column: 1 / -1;
  border-color: #cfe0ed;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}
.workspace-export-list { display: grid; gap: 8px; }
.workspace-export-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #e3ebf1;
  border-radius: 10px;
  background: #fff;
}
.workspace-export-main { display: grid; gap: 4px; min-width: 0; }
.workspace-export-main strong,
.workspace-export-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-export-main small { color: #7b8996; font-size: 11px; }
.workspace-export-actions { flex: 0 0 auto; }
.workspace-export-pending {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f3f6f8;
  color: #71808c;
  font-size: 11px;
  font-weight: 700;
}
.workspace-export-error {
  display: block;
  width: min(100%, 620px);
  margin-top: 5px;
  border: 1px solid #f0cbd0;
  border-radius: 9px;
  background: #fff7f8;
  color: #9f3343;
  overflow: hidden;
}
.workspace-export-error-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 5px 9px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.workspace-export-error-summary::-webkit-details-marker { display: none; }
.workspace-export-error-summary::after {
  content: '⌄';
  color: #b14b59;
  font-size: 14px;
  line-height: 1;
  transition: transform .18s ease;
}
.workspace-export-error[open] .workspace-export-error-summary::after {
  transform: rotate(180deg);
}
.workspace-export-error-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
}
.workspace-export-error-title i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d35c6a;
}
.workspace-export-error-hint {
  margin-inline-start: auto;
  color: #b06a73;
  font-size: 10px;
  font-weight: 600;
}
.workspace-export-error-body {
  display: grid;
  gap: 5px;
  padding: 0 9px 8px;
  border-top: 1px solid #f4dce0;
}
.workspace-export-error-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 29px;
  color: #a24955;
  font-size: 10px;
}
.workspace-export-copy { flex: 0 0 auto; }
.workspace-export-error-text {
  width: 100%;
  height: 54px;
  min-height: 54px;
  resize: vertical;
  direction: ltr;
  text-align: left;
  border: 1px solid #efd9dc;
  border-radius: 7px;
  padding: 6px 8px;
  color: #6f2734;
  background: #fff;
  font: 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.workspace-export-stage { color: #7b8996; }
.workspace-export-progress {
  display: grid;
  gap: 6px;
  width: min(100%, 520px);
  margin-top: 5px;
  padding: 7px 9px;
  border: 1px solid #dce8ef;
  border-radius: 8px;
  background: #f8fbfd;
}
.workspace-export-progress-head,
.workspace-export-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.workspace-export-progress-head {
  color: #29465e;
  font-size: 10px;
  font-weight: 800;
}
.workspace-export-progress-head strong {
  color: #155987;
  font-size: 11px;
  direction: ltr;
}
.workspace-export-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5edf2;
}
.workspace-export-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #174c78, #52a1c8);
  box-shadow: 0 0 8px rgba(39, 124, 170, .25);
  transition: width .35s ease;
}
.workspace-export-progress-meta {
  color: #7b8996;
  font-size: 10px;
  font-weight: 600;
}
.workspace-export-unavailable { color: #9f3343; font-size: 11px; font-weight: 700; }
.workspace-export-empty {
  padding: 14px;
  border: 1px dashed #d8e2e9;
  border-radius: 9px;
  color: #7b8996;
  text-align: center;
}
.workspace-import-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
}
.workspace-import-form label {
  display: grid;
  gap: 6px;
  color: #526274;
  font-size: 12px;
  font-weight: 700;
}
.workspace-import-form input,
.workspace-import-form select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #d5e0e8;
  border-radius: 9px;
  background: #fff;
}
.workspace-import-form input[type="file"] { padding: 8px; font-size: 11px; }
.workspace-import-form small { color: #7b8996; font-size: 10px; line-height: 1.7; font-weight: 500; }
.workspace-import-progress {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid #cfe0ed;
  border-radius: 9px;
  background: #f3f8fb;
  color: #496579;
  font-size: 12px;
  font-weight: 700;
}
.workspace-transfer-import-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}
.workspace-transfer-progress {
  display: grid;
  gap: 9px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #dce8ef;
  border-radius: 11px;
  background: #f8fbfd;
}
.workspace-transfer-progress-head,
.workspace-transfer-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.workspace-transfer-progress-head { color: #29465e; font-size: 12px; }
.workspace-transfer-progress-head span,
.workspace-transfer-progress-meta { color: #728493; font-size: 11px; }
.workspace-transfer-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5edf2;
}
.workspace-transfer-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1c5b88, #4b9ac2);
  transition: width .35s ease;
}
.workspace-transfer-progress.is-awaiting-action {
  border-color: #d9e4ed;
  background: #fbfcfd;
}
.workspace-transfer-progress.is-awaiting-action .workspace-transfer-progress-track i {
  background: #8aa4b8;
}
.workspace-transfer-progress.is-cancelled {
  border-color: #f0d5d5;
  background: #fffafa;
}
.workspace-transfer-progress.is-cancelled .workspace-transfer-progress-track i {
  background: #c8a1a1;
}
.workspace-import-awaiting-action {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin: 10px 0;
  padding: 9px 12px;
  border: 1px solid #d7e6f0;
  border-radius: 9px;
  background: #f4f9fc;
  color: #426176;
  font-size: 11px;
  line-height: 1.8;
}
.workspace-import-awaiting-action strong {
  color: #214f72;
  white-space: nowrap;
}
.workspace-import-awaiting-action span {
  color: #668095;
}
.workspace-transfer-final-report {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #d8e4ec;
  border-radius: 9px;
  background: #f7fafc;
  color: #526a7b;
  font-size: 11px;
  line-height: 1.8;
}
.workspace-transfer-final-report strong {
  color: #234d6b;
  font-size: 12px;
}
.workspace-transfer-final-report small {
  color: #647b8b;
}
.workspace-transfer-final-report.status-completed,
.workspace-transfer-final-report.status-core_completed {
  border-color: #c7e8d5;
  background: #f1fbf5;
}
.workspace-transfer-final-report.status-completed strong,
.workspace-transfer-final-report.status-core_completed strong {
  color: #1d714a;
}
.workspace-transfer-final-report.status-cancelled {
  border-color: #e8d6d6;
  background: #fffafa;
}
.workspace-transfer-final-report.status-cancelled strong {
  color: #8a4e4e;
}
.workspace-transfer-final-report.status-failed {
  border-color: #f0d0c8;
  background: #fff7f5;
}
.workspace-transfer-final-report.status-failed strong {
  color: #9a4034;
}
.workspace-transfer-compatibility {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 11px;
}
.workspace-transfer-compatibility.is-ready { color: #176346; background: #edf9f2; border: 1px solid #c8ead7; }
.workspace-transfer-compatibility.is-blocked { color: #8a3e32; background: #fff4f1; border: 1px solid #f0d0c8; }
.workspace-transfer-compatibility small { flex-basis: 100%; line-height: 1.7; }
.workspace-transfer-import-form.is-busy { opacity: .65; pointer-events: none; }
.workspace-transfer-policy {
  display: grid;
  gap: 5px;
  color: #526274;
  font-size: 11px;
  font-weight: 700;
}
.workspace-transfer-policy select {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #d5e0e8;
  border-radius: 8px;
  background: #fff;
}
@media (max-width: 900px) {
  .workspace-import-layout { grid-template-columns: 1fr; }
  .workspace-import-form { grid-template-columns: 1fr 1fr; }
  .workspace-import-form button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 560px) {
  .workspace-management-actions { justify-content: stretch; }
  .workspace-management-actions > *,
  .workspace-management-actions .inline-form,
  .workspace-management-actions .button { width: 100%; }
  .workspace-import-form { grid-template-columns: 1fr; }
  .workspace-import-form button { grid-column: auto; width: 100%; }
  .workspace-export-row { align-items: stretch; flex-direction: column; }
  .workspace-export-actions,
  .workspace-export-actions .button { width: 100%; }
  .workspace-import-history-row { align-items: stretch; flex-direction: column; gap: 10px; }
  .workspace-import-history-actions,
  .workspace-import-history-actions .button,
  .workspace-import-history-actions form { width: 100%; }
}

/* Restricted system-manager role testing control in the CRM header. */
.role-test-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid #e3e5ef;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(35,39,84,.04);
  direction: rtl;
}
.role-test-switcher-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #fff;
  background: #173f66;
  font-size: 13px;
  line-height: 1;
}
.role-test-switcher-label {
  color: #7b8097;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.role-test-switcher-select {
  min-width: 142px;
  min-height: 28px;
  padding: 3px 25px 3px 8px;
  border: 0;
  border-radius: 7px;
  color: var(--navy);
  background: #f6f7fb;
  font-size: 11px;
  font-weight: 800;
  outline: 0;
  cursor: pointer;
}
.role-test-switcher:focus-within {
  border-color: #c9c5ff;
  box-shadow: 0 0 0 3px rgba(91,80,230,.1);
}
@media (max-width: 700px) {
  .role-test-switcher {
    order: 4;
    width: 100%;
    justify-content: space-between;
    margin-top: 4px;
  }
  .role-test-switcher-select {
    flex: 1;
    max-width: 220px;
  }
}
@media (min-width: 701px) {
  .topbar .role-test-switcher {
    order: 2;
    flex: 0 0 auto;
  }
}

/* System-manager-only, read-only page design inspection mode. */
.page-design-toggle {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  padding:6px 11px;
  border:1px solid #dce3ed;
  border-radius:11px;
  background:#fff;
  color:#244b70;
  box-shadow:0 3px 10px rgba(35,39,84,.04);
  font:inherit;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
  cursor:pointer;
  transition:border-color .16s ease,background-color .16s ease,color .16s ease,box-shadow .16s ease;
}
.page-design-toggle:hover,.page-design-toggle:focus-visible{border-color:#aaa4f6;background:#f8f7ff;color:#4338ca;box-shadow:0 0 0 3px rgba(91,80,230,.11);outline:none}
.page-design-toggle[aria-pressed="true"]{border-color:#7d73e8;background:#5146c9;color:#fff;box-shadow:0 6px 16px rgba(81,70,201,.22)}
.page-design-toggle-icon{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:7px;background:#edf4fb;color:#24628d;font-size:17px;line-height:1}
.page-design-toggle[aria-pressed="true"] .page-design-toggle-icon{background:rgba(255,255,255,.18);color:#fff}
.topbar .page-design-toggle{order:3;flex:0 0 auto}
.crm-design-preview-active *{outline:1px dashed rgba(93,102,117,.46)!important;outline-offset:2px!important}
.crm-design-preview-active [data-design-preview-ignore],.crm-design-preview-active [data-design-preview-ignore] *{outline:none!important}
.crm-design-preview-active a,.crm-design-preview-active button,.crm-design-preview-active input,.crm-design-preview-active select,.crm-design-preview-active textarea{cursor:crosshair!important}
.crm-design-preview-tooltip{position:fixed;z-index:2147483646;max-width:min(340px,calc(100vw - 24px));padding:8px 10px;border:1px solid #c9d2de;border-radius:9px;background:rgba(28,39,55,.96);color:#fff;box-shadow:0 8px 24px rgba(10,20,35,.22);font-size:11px;line-height:1.75;direction:rtl;text-align:right;pointer-events:none;white-space:normal}
.crm-design-preview-tooltip strong{display:block;color:#fff;font-size:11px}
.crm-design-preview-tooltip span{display:block;color:#d8e3ef;font-variant-numeric:tabular-nums;direction:rtl}
.crm-design-preview-status{position:fixed;z-index:2147483645;inset-inline-start:14px;inset-block-end:14px;max-width:calc(100vw - 28px);padding:7px 10px;border:1px solid #d1d8e2;border-radius:999px;background:rgba(255,255,255,.95);color:#40546b;box-shadow:0 5px 18px rgba(25,45,70,.13);font-size:10px;font-weight:700;pointer-events:none}
@media (max-width:760px){.page-design-toggle{order:5;min-height:36px;padding-inline:9px}.topbar .page-design-toggle{width:100%;margin-top:3px}.crm-design-preview-status{inset-inline-start:10px;inset-block-end:10px}}
@media (min-width:761px) and (max-width:1180px){.page-design-toggle{font-size:10px;padding-inline:8px}.page-design-toggle-icon{width:20px;height:20px}}

.agent-performance-link { color: inherit; text-decoration: none; }
.agent-performance-link:hover { color: var(--primary, #1e668f); }
.agent-performance-hero { display:flex; align-items:center; gap:14px; padding:18px; margin-bottom:16px; }
.agent-performance-avatar { width:52px; height:52px; display:grid; place-items:center; border-radius:16px; color:#fff; background:linear-gradient(135deg,#183f66,#398bb1); font-size:22px; font-weight:800; }
.agent-performance-hero h2 { margin:0 0 4px; }
.agent-performance-hero p { margin:0; color:var(--muted); font-size:12px; }
.agent-performance-filter { margin-inline-start:auto; display:flex; align-items:end; gap:8px; flex-wrap:wrap; }
.agent-performance-filter label { display:grid; gap:4px; color:var(--muted); font-size:11px; }
.agent-performance-filter input { min-height:34px; }
.agent-performance-summary { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.agent-performance-stat { padding:15px; display:grid; gap:8px; }
.agent-performance-stat small { color:var(--muted); }
.agent-performance-stat strong { font-size:24px; color:var(--navy); }
.agent-performance-daily, .agent-performance-events { margin-bottom:16px; overflow:hidden; }
.agent-performance-analytics-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:16px; }
.agent-performance-analytics-card { padding:16px; overflow:hidden; }
.agent-performance-mini-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.agent-performance-mini-grid > div { padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:#f8fafc; display:grid; gap:5px; }
.agent-performance-mini-grid small { color:var(--muted); font-size:11px; }
.agent-performance-mini-grid strong { color:var(--navy); font-size:17px; }
.agent-performance-subsection { margin-top:16px; }
.agent-performance-subsection h4 { margin:0 0 9px; font-size:13px; }
.agent-performance-bar-row, .agent-performance-score-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; padding:8px 0; border-top:1px solid var(--line); font-size:12px; }
.agent-performance-bar-row b, .agent-performance-score-row b { font-size:11px; color:var(--muted); white-space:nowrap; }
.agent-performance-score-row i { grid-column:1 / -1; height:6px; border-radius:99px; background:#edf1f5; overflow:hidden; }
.agent-performance-score-row i span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#59b7d3,#183f66); }
.agent-performance-sale-history { margin-bottom:16px; overflow:hidden; }
.agent-performance-security { margin-bottom:16px; overflow:hidden; }
.security-event-scope { color:var(--muted); font-size:11px; }
.security-severity-badge { display:inline-flex; align-items:center; padding:4px 8px; border-radius:999px; font-size:11px; white-space:nowrap; }
.security-severity-badge.info { color:#245f78; background:#e8f5fb; }
.security-severity-badge.warning { color:#8a5a05; background:#fff4d6; }
.security-severity-badge.critical { color:#9d2d2d; background:#ffe5e5; }
.agent-performance-security code { direction:ltr; display:inline-block; max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#526172; font-size:10px; }
.calls-filter-panel, .calls-table-panel { margin-bottom:16px; overflow:hidden; }
.calls-filters { display:grid; grid-template-columns:minmax(220px,2fr) repeat(5,minmax(110px,1fr)); gap:12px; align-items:end; padding:16px; }
.calls-filters label { display:grid; gap:6px; color:var(--muted); font-size:11px; }
.calls-filters .filter-search { grid-column:span 2; }
.calls-filters input, .calls-filters select { min-height:38px; }
.calls-filters .filter-actions { display:flex; gap:8px; align-items:center; }
.calls-table-panel .table-card { overflow-x:auto; }
.calls-table-panel table { min-width:1180px; }
.calls-table-panel td small { display:block; margin-top:4px; }
.calls-table-panel .entity-name { min-width:180px; }
.calls-table-panel .status-dot { white-space:nowrap; }
.agent-event-list { display:grid; gap:0; }
.agent-event-row { display:flex; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--line); }
.agent-event-row:last-child { border-bottom:0; }
.agent-event-icon { width:34px; height:34px; display:grid; place-items:center; flex:0 0 auto; border-radius:11px; color:#1e668f; background:#edf6fc; }
.agent-event-icon svg { width:18px; height:18px; }
.agent-event-row > div { min-width:0; flex:1; }
.agent-event-row strong { display:block; font-size:13px; }
.agent-event-row p { margin:3px 0 0; color:var(--muted); font-size:11px; }
.agent-event-row time { color:var(--muted); font-size:11px; white-space:nowrap; }
.report-filter-panel { margin-bottom:16px; background:linear-gradient(180deg,#fff 0%,#fbfcff 100%); }
.report-filter-panel .filters-grid { align-items:end; padding:18px; }
.report-filter-panel .filters-grid > label { min-width:0; }
.report-filter-panel .subtext { margin:0 18px 16px; }
.report-results-panel { margin-bottom:16px; }
.report-results-panel .agent-event-list { padding:0 20px; }
.report-results-panel .table-card { overflow-x:auto; }
.report-dashboard-grid { align-items:start; }
.report-dashboard-grid .panel { min-width:0; }
.timeline-filter-panel { margin-bottom:16px; padding:0; overflow:hidden; }
.timeline-filter-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px 0; }
.timeline-filter-heading h3, .timeline-results-heading h3 { margin:3px 0 4px; }
.timeline-filter-heading .subtext { margin:0; }
.timeline-eyebrow { display:block; color:var(--primary,#155d3b); font-size:11px; font-weight:700; }
.timeline-count-badge, .timeline-date-range { display:inline-flex; align-items:center; min-height:30px; padding:5px 10px; border:1px solid #d6e7dc; border-radius:999px; background:#f2faf5; color:#17613d; font-size:11px; white-space:nowrap; }
.timeline-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;gap:12px 14px;padding:16px 20px 20px !important}
.timeline-filters>label{display:grid;gap:6px;min-width:0;color:var(--muted);font-size:11px;font-weight:700}
.timeline-filters input,.timeline-filters select{box-sizing:border-box;width:100%;min-height:40px}
.timeline-filters .filter-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:flex-start;gap:8px;margin-top:2px;padding-top:4px;border-top:1px solid #edf2ef}
.timeline-agent-filter{grid-column:span 1}
.timeline-results-panel { overflow:hidden; }
.timeline-results-heading { align-items:flex-start; padding:18px 20px; border-bottom:1px solid var(--line); }
.timeline-event-list { position:relative; padding:4px 20px 8px; }
.timeline-event-list::before { content:""; position:absolute; inset-block:20px 22px; inset-inline-end:39px; width:3px; border-radius:3px; background:linear-gradient(180deg,#74bb91 0%,#b6d8c2 100%); box-shadow:0 0 0 1px rgba(22,122,72,.06); }
.timeline-day-divider { position:relative; z-index:2; display:flex; align-items:center; gap:10px; margin:14px 0 2px; color:#17613d; }
.timeline-day-divider::before { content:""; flex:1; height:1px; background:#dcebe2; }
.timeline-day-divider span { padding:5px 11px; border:1px solid #cfe5d6; border-radius:999px; background:#f4fbf6; font-size:11px; font-weight:800; }
.timeline-day-divider small { color:#91a39a; font-size:10px; }
.timeline-event-row { position:relative; display:grid; grid-template-columns:42px minmax(0,1fr) 150px; align-items:start; gap:12px; padding:16px 0; border-bottom:1px solid var(--line); }
.timeline-event-row:last-child { border-bottom:0; }
.timeline-event-marker { position:relative; z-index:1; display:flex; justify-content:center; }
.timeline-event-marker .agent-event-icon { width:34px; height:34px; border:4px solid #fff; box-shadow:0 0 0 1px #cfe3d6; }
.timeline-event-content { min-width:0; padding-top:1px; }
.timeline-event-topline { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.timeline-event-topline strong { font-size:14px; color:var(--navy,#183f66); }
.timeline-confidence { border-radius:999px; padding:4px 8px; font-size:10px; white-space:nowrap; }
.timeline-confidence.high { color:#17613d; background:#e8f7ed; }
.timeline-confidence.medium { color:#86620b; background:#fff7dc; }
.timeline-confidence.low { color:#a13c3c; background:#ffebeb; }
.timeline-claim { margin:6px 0 8px; color:var(--text,#263746); line-height:1.9; }
.timeline-meta { display:flex; flex-wrap:wrap; gap:6px 14px; color:var(--muted); font-size:10px; }
.timeline-meta span { white-space:nowrap; }
.timeline-chip { display:inline-flex; align-items:center; gap:4px; min-height:24px; padding:3px 8px; border:1px solid #e0ebe4; border-radius:999px; background:#f8fbf9; color:#74847b; }
.timeline-chip b { color:#30443a; font-weight:700; }
.timeline-more-actions { position:relative; margin:0 !important; padding:0 !important; border:0 !important; background:transparent !important; overflow:visible; }
.timeline-more-actions summary { list-style:none; }
.timeline-more-actions summary::-webkit-details-marker { display:none; }
.timeline-more-actions > a { position:absolute; z-index:10; inset-inline-start:0; top:calc(100% + 5px); white-space:nowrap; box-shadow:0 8px 22px rgba(19,57,38,.14); }
.timeline-meta b { color:var(--text,#263746); font-weight:600; }
.timeline-item-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.timeline-event-content details { margin-top:9px; padding:8px 10px; border:1px solid #e5ece8; border-radius:9px; background:#fbfdfc; }
.timeline-event-content details summary { cursor:pointer; color:var(--primary,#155d3b); font-size:11px; }
.timeline-event-content details div { margin-top:6px; line-height:1.8; }
.timeline-event-time { display:grid; gap:3px; align-content:start; justify-items:end; padding-top:3px; color:var(--muted); font-size:11px; white-space:nowrap; }
.timeline-event-time small { color:#9aa8a1; font-size:9px; }
.timeline-technical-details { color:#8a9991; }
.timeline-technical-details small { display:block; direction:ltr; text-align:left; overflow-wrap:anywhere; line-height:1.8; }
.timeline-event-content .crm-report-term { line-height:1.65; }
.timeline-event-topline .timeline-confidence .crm-report-term { border-bottom:0; }
.timeline-meta .timeline-chip { overflow:visible; }
.timeline-meta .crm-report-term { color:inherit; }
.timeline-technical-details .crm-report-term { color:#687a70; }
/* Project UI preference: align the desktop Timeline rail to the far inline edge. */
.timeline-event-list::before { inset-inline-end: 0px; }
@media (max-width:700px) {
  .timeline-filter-heading, .timeline-results-heading { padding-inline:14px; }
  .timeline-filter-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .timeline-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px !important}
  .timeline-filters .filter-actions{grid-column:1/-1}
  .timeline-event-list { padding-inline:12px; }
  .timeline-event-list::before { inset-inline-end:auto; inset-inline-start:28px; }
  .timeline-event-row { grid-template-columns:34px minmax(0,1fr); gap:9px; padding:14px 0; }
  .timeline-event-marker { justify-content:flex-start; }
  .timeline-event-marker .agent-event-icon { width:30px; height:30px; }
  .timeline-event-topline { align-items:flex-start; flex-direction:column; gap:6px; }
  .timeline-event-time { grid-column:2; display:flex; flex-direction:row; justify-content:flex-start; align-items:center; gap:7px; padding-top:0; font-size:10px; }
  .timeline-event-time strong { color:var(--navy,#183f66); font-size:12px; }
  .timeline-event-time small { font-size:9px; }
  .timeline-meta { gap:5px 9px; }
  .timeline-more-actions > a { inset-inline-start:auto; inset-inline-end:0; }
}
@media (max-width:520px){
  .timeline-filters{grid-template-columns:1fr;gap:10px}
  .timeline-filters .filter-actions{grid-column:1;flex-wrap:wrap}
  .timeline-filters .filter-actions .button{flex:1 1 auto}
}
/* Project UI preference: align the mobile Timeline rail to the far inline edge. */
@media (max-width:700px) {
  .timeline-event-list::before { inset-inline-start: 0px; }
}
.evidence-drawer { margin-top:10px; border:1px solid var(--line,#dbe5e0); border-radius:12px; background:var(--panel,#fff); overflow:hidden; }
.evidence-drawer > summary { cursor:pointer; padding:9px 12px; color:var(--primary,#155d3b); font-weight:700; list-style-position:inside; }
.evidence-drawer[open] > summary { background:#f3faf5; border-bottom:1px solid var(--line,#dbe5e0); }
.evidence-drawer-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:12px; }
.evidence-drawer-grid > div { min-width:0; padding:9px 10px; border:1px solid #edf1ef; border-radius:9px; }
.evidence-drawer-grid p { margin:5px 0 0; }
.evidence-drawer > p, .evidence-drawer > details { margin:0 12px 12px; }
.evidence-drawer pre { max-height:220px; overflow:auto; white-space:pre-wrap; direction:ltr; text-align:left; }
.evidence-answer-panel { border-inline-start:4px solid var(--primary,#155d3b); }
.evidence-answer-panel > p { line-height:2; margin:8px 0; }
.evidence-search-filter-panel { overflow:hidden; }
.evidence-search-filters { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; align-items:end; padding:17px 18px 12px !important; }
.evidence-search-filters > label { display:grid; gap:6px; min-width:0; color:var(--muted); font-size:11px; font-weight:700; }
.evidence-search-filters input, .evidence-search-filters select { box-sizing:border-box; width:100%; min-height:40px; }
.evidence-search-query { grid-column:span 2; }
.evidence-search-actions { grid-column:1/-1; display:flex; align-items:center; gap:8px; margin-top:2px; padding-top:12px; border-top:1px solid var(--line); }
.evidence-search-filter-panel > .subtext { margin:0 18px 15px; }
.evidence-search-results-head { align-items:center; }
.evidence-type-chip { display:inline-flex; align-items:center; min-height:22px; padding:2px 8px; border:1px solid #dce8f0; border-radius:999px; background:#f3f8fc; color:#315c78; font-weight:700; }
.evidence-match-hint { margin-top:5px !important; color:#55738a !important; font-size:10px !important; }
.evidence-pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; padding:15px 18px; border-top:1px solid var(--line); }
.evidence-pagination > span { padding-inline:8px; color:var(--muted); font-size:12px; font-weight:700; }
.evidence-pagination a[aria-disabled="true"] { opacity:.45; pointer-events:none; }
.evidence-search-state { margin-bottom:14px; padding:13px 16px; border:1px solid #e8bd72; border-radius:12px; background:#fff9ea; color:#745317; }
.evidence-search-state.error { border-color:#e6aaaa; background:#fff4f4; color:#8b3434; }
.evidence-search-state p { margin:5px 0 0; }
.evidence-search-state.warning { border-color:#ead39f; }
@media (max-width:900px) { .evidence-search-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } .evidence-search-query { grid-column:1/-1; } }
@media (max-width:700px) { .evidence-drawer-grid { grid-template-columns:1fr; } }
.nav-group-items .nav-item.active { box-shadow: inset -3px 0 0 var(--primary); }
@media (max-width:700px) {
  .report-filter-panel .filters-grid { padding:14px; }
  .report-results-panel .agent-event-list { padding:0 14px; }
  .report-results-panel .agent-event-row { gap:9px; padding:11px 0; }
  .report-results-panel .agent-event-row time { font-size:10px; }
  .evidence-search-filters { grid-template-columns:1fr 1fr; gap:10px; padding:14px !important; }
  .evidence-search-filters .evidence-search-query { grid-column:1/-1; }
  .evidence-search-actions { grid-column:1/-1; flex-wrap:wrap; }
  .evidence-search-actions .button { flex:1 1 auto; }
  .evidence-search-filter-panel > .subtext { margin:0 14px 14px; }
  .evidence-search-results-head { align-items:flex-start; flex-direction:column; }
  .evidence-pagination { gap:6px; padding:12px; }
  .evidence-pagination .button { flex:1 1 38%; text-align:center; }
  .report-results-panel .agent-event-row { align-items:flex-start; flex-wrap:wrap; }
  .report-results-panel .agent-event-row time { margin-inline-start:auto; }
}
@media (max-width:480px) { .evidence-search-filters { grid-template-columns:1fr; } .evidence-search-filters .evidence-search-query, .evidence-search-actions { grid-column:1; } }
.page-toolbar { display:flex; justify-content:flex-start; gap:8px; margin:-6px 0 16px; }
.representatives-intro { overflow:hidden; }
.representatives-intro table { min-width:760px; }
.representatives-intro code { direction:ltr; display:inline-block; color:#315c78; font-size:11px; }
.representatives-intro td small { display:block; margin-top:4px; }
[data-sale-pricing] input[readonly] { background:#f4f7fa; color:#183f66; font-weight:700; }
[data-sale-pricing] label:has(> input[name="discount"]),
[data-sale-pricing] label:has(> input[name="commission_amount"]) { display:none !important; }
[data-sale-pricing] input[name="final_price"] { background:#fff; color:#183f66; font-weight:700; }
.excel-error-detail-summary { display:flex; flex-direction:column; gap:4px; margin:10px 0; }
.excel-error-detail-list { margin:8px 0; padding-inline-start:24px; max-height:260px; overflow:auto; }
.excel-error-detail-list li { margin:5px 0; }
.excel-error-detail-list code { white-space:pre-wrap; overflow-wrap:anywhere; direction:ltr; display:block; }
.excel-error-copy-source { width:100%; min-height:90px; margin-top:8px; direction:ltr; text-align:left; font:12px/1.6 ui-monospace,monospace; }
.sale-lead-native-select {
  display: none;
}
.sale-lead-result-list {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #dfe8e4;
  border-radius: 10px;
  background: #fbfdfc;
}
.sale-lead-result-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.sale-lead-result-choice {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #183f66;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.sale-lead-result-choice:hover,
.sale-lead-result-row.is-selected .sale-lead-result-choice {
  border-color: #b9d9c7;
  background: #eaf7ef;
}
.sale-lead-review-link {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid #cfe0d5;
  border-radius: 7px;
  color: #167a48;
  font-size: 11px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.sale-lead-review-link:hover {
  background: #eaf7ef;
  border-color: #9fc8ae;
}
[data-sale-lead-search] { margin-bottom:8px; }
[data-sale-lead-select] { width:100%; }
@media (max-width:700px) {
  .page-toolbar { justify-content:stretch; }
  .page-toolbar .button { width:100%; }
  .representatives-intro .table-card { overflow-x:auto; }
}
@media (max-width:900px) { .agent-performance-summary { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:700px) {
  .lead-multi-filter-form { grid-template-columns:1fr; }
  .lead-multi-filter-form .multi-filter-heading,
  .lead-multi-filter-form .filter-actions { grid-column:1; }
  .multi-picker-menu { position: fixed; inset-inline: 12px; top: auto; bottom: 12px; max-height: min(58vh, 420px); border-radius: 16px; }
  .multi-picker.open::before { content: ""; position: fixed; z-index: -1; inset: 0; background: rgba(16, 30, 46, .14); }
  .agent-performance-hero { align-items:flex-start; flex-wrap:wrap; }
  .agent-performance-filter { width:100%; margin-inline-start:0; }
  .agent-performance-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .agent-performance-analytics-grid { grid-template-columns:1fr; }
  .calls-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .calls-filters .filter-search { grid-column:1 / -1; }
  .calls-filters .filter-actions { grid-column:1 / -1; }
  .agent-event-row { align-items:flex-start; }
  .agent-event-row time { margin-inline-start:auto; }
}
/* Multi-number lead contact controls. */
.lead-phone-control {
    display: grid;
    gap: 6px;
}
.lead-phone-primary {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lead-phone-primary > input {
    flex: 1 1 auto;
    min-width: 0;
}
.lead-phone-badge {
    color: #6b7280;
    font-size: .75rem;
    white-space: nowrap;
}
.lead-phone-extra {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px 8px;
    background: #fafbfc;
}
.lead-phone-extra summary,
.lead-phone-detail-extra summary {
    cursor: pointer;
    color: #155d3b;
    font-size: .8rem;
    user-select: none;
}
.lead-phone-extra-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}
.lead-extra-phone-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
}
.lead-extra-phone-row span {
    min-width: 52px;
    color: #6b7280;
}
.lead-extra-phone-row input {
    min-width: 0;
    flex: 1 1 auto;
}
.lead-phone-display {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.lead-phone-entry {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.lead-phone-remove-form {
    display: inline-flex;
    margin: 0;
}
.lead-phone-remove {
    width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}
.lead-phone-remove:focus-visible {
    outline: 3px solid rgba(201, 78, 91, .2);
    outline-offset: 2px;
}
.lead-phone-detail-extra {
    position: relative;
}
.lead-phone-detail-extra > summary {
    list-style: none;
    width: 22px;
    height: 22px;
    border: 1px solid #cfe0d5;
    border-radius: 50%;
    text-align: center;
    line-height: 19px;
}
.lead-phone-detail-extra > summary::-webkit-details-marker {
    display: none;
}
.lead-phone-detail-extra > div {
    display: grid;
    gap: 4px;
    margin-top: 5px;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}
.lead-phone-detail-extra > div .lead-phone-entry {
    justify-content: space-between;
    gap: 10px;
}
@media (max-width: 720px) {
    .lead-phone-remove {
        width: 44px;
        height: 44px;
        min-height: 44px;
    }
}

/* Workspace project task board */
.project-page{display:grid;gap:14px}
.project-create-panel{padding:16px 18px}
.project-create-panel>summary{cursor:pointer;font-weight:800;color:#24364b}
.project-create-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.project-create-form label{display:grid;gap:6px;color:#6d7888;font-size:12px}
.project-create-form input,.project-create-form select,.project-create-form textarea{width:100%;box-sizing:border-box}
.project-create-form .field-optional,.project-task-edit-form .field-optional{font-size:10px;color:#9aa5b2;font-weight:500}
.project-create-form .field-help{display:block;color:#8a95a3;font-size:10px;line-height:1.7}
.project-date-time-fields{display:grid;grid-template-columns:1.35fr 1fr;gap:8px;width:100%}
.project-date-time-fields input{min-width:0}
.project-due-field .field-optional{font-size:10px;color:#9aa5b2;font-weight:500}
.project-due-field .field-help{display:block;color:#8a95a3;font-size:10px;line-height:1.7}
.project-create-form .form-actions{align-self:end}
.project-board{display:grid;grid-template-columns:repeat(4,minmax(220px,1fr));gap:14px;min-width:0;overflow-x:auto;padding-bottom:6px}
.project-column{min-width:220px;border:1px solid #e3eaf0;border-radius:16px;background:#f8fafc;padding:10px}
.project-column-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 5px 10px}
.project-column-head h3{margin:0;color:#25364a;font-size:14px}
.project-column-head span{display:inline-flex;min-width:25px;height:25px;align-items:center;justify-content:center;border-radius:50%;background:#e9f2f8;color:#276486;font-size:12px}
.project-dropzone{display:grid;align-content:start;gap:10px;min-height:260px;padding:4px;border-radius:12px;transition:background .15s ease;position:relative}
.project-dropzone::after{content:"";display:block;min-height:180px;border-radius:10px;transition:background .15s ease}
.project-dropzone.is-over::after{background:rgba(132,181,154,.08)}
.project-dropzone.is-over{background:#eaf6ef;outline:2px dashed #84b59a;outline-offset:-2px}
.project-column-pagination{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;padding:10px 4px 2px;border-top:1px solid #e8eef2;color:#718091;font-size:11px}
.project-column-pagination .button{min-height:30px;padding:6px 10px;font-size:11px;text-decoration:none}
.project-task{display:grid;gap:10px;padding:13px;border:1px solid #e1e8ef;border-radius:13px;background:#fff;box-shadow:0 3px 10px rgba(31,55,78,.05)}
.project-task.is-draggable{cursor:grab}
.project-task.is-dragging{opacity:.5}
.project-task-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.project-task-top strong{color:#25364a;font-size:13px;line-height:1.8}
.project-task p{margin:0;color:#687588;font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.project-task-meta{display:flex;justify-content:space-between;gap:8px;color:#8a95a3;font-size:10px}
.project-task-attachments{display:flex;flex-wrap:wrap;gap:5px}
.project-attachment-link{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 7px;border-radius:7px;background:#f1f7fb;color:#28627d;font-size:10px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-attachment-link.is-image{white-space:normal}
.project-attachment-link img{width:34px;height:34px;flex:0 0 34px;object-fit:cover;border-radius:6px;background:#e8f0f4}
.project-attachment-link:hover{background:#e2f0f7;color:#174d68}
.project-task-actions{display:flex;align-items:center;justify-content:flex-start;gap:6px;border-top:1px solid #eef2f5;padding-top:8px}
.project-task-shift-controls{display:none;align-items:center;gap:4px;margin-inline-end:auto;padding:3px;border:1px solid #dbe9e0;border-radius:9px;background:#f4faf6}
.project-board.is-shift-mode .project-task-shift-controls{display:flex}
.project-sort-panel{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0;padding:9px 12px;border:1px solid #dce9e2;border-radius:11px;background:#f8fcf9}
.project-sort-panel-compact{min-height:48px}
.project-sort-copy{display:flex;align-items:center;gap:9px;min-width:0}
.project-sort-copy strong{color:#173d2a;font-size:.84rem;white-space:nowrap}
.project-sort-copy small{color:#718078;font-size:.7rem;line-height:1.6}
.project-sort-form{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;justify-content:flex-end}
.project-sort-form label{color:#718078;font-size:.7rem;white-space:nowrap}
.project-sort-form select{min-width:215px;min-height:34px;padding:5px 9px;font-size:.75rem}
.project-sort-form .button{min-height:34px;padding:5px 11px;font-size:.72rem}
.project-sort-active{padding:6px 9px;border-radius:8px;background:#e8f4ec;color:#17613d;font-size:.72rem;white-space:nowrap}
@media (max-width:700px){.project-sort-panel{align-items:stretch;flex-direction:column;gap:8px;padding:10px}.project-sort-copy{align-items:flex-start;flex-direction:column;gap:2px}.project-sort-copy small{font-size:.68rem}.project-sort-form{justify-content:stretch}.project-sort-form select{flex:1;min-width:0}.project-sort-active{align-self:flex-start}}
.project-shift-button{color:#167a48;background:#fff;border-color:#b9d9c3;font-size:16px;font-weight:800;line-height:1}
.project-shift-button:hover{background:#eaf7ee;transform:translateY(-1px)}
.project-shift-button:disabled{opacity:.5;cursor:wait}
.project-icon-button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:1px solid #dfe7ed;border-radius:8px;background:#fff;color:#526577;cursor:pointer}
.project-icon-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.project-icon-button:hover{background:#f2f7fa;border-color:#b9cbd7;color:#173f63}
.project-icon-button.danger{color:#b45a66;border-color:#efd1d5}
.project-icon-button.danger:hover{background:#fff3f4;border-color:#e4aab1;color:#a52d3b}
.project-task-edit{position:relative}
.project-task-edit>summary{list-style:none}
.project-task-edit>summary::-webkit-details-marker{display:none}
.project-task-edit[open]{position:static}
.project-task-edit[open]::before{content:"";position:fixed;z-index:79;inset:0;background:rgba(27,40,54,.34);backdrop-filter:blur(2px)}
.project-task-edit-form{position:fixed;z-index:80;top:50%;inset-inline-start:50%;transform:translate(-50%,-50%);display:grid;grid-template-columns:repeat(2,minmax(150px,1fr));gap:11px;width:min(520px,calc(100vw - 36px));max-height:calc(100vh - 48px);overflow:auto;padding:22px;border:1px solid #dfe7ed;border-radius:16px;background:#fff;box-shadow:0 25px 70px rgba(28,52,72,.24)}
.project-task-edit-form::before{content:"ویرایش کامل تسک";grid-column:1/-1;color:#25364a;font-size:16px;font-weight:800;padding-bottom:3px;border-bottom:1px solid #eef2f5}
.project-task-edit-form label{display:grid;gap:5px;color:#6d7888;font-size:11px}
.project-task-edit-form input,.project-task-edit-form select,.project-task-edit-form textarea{width:100%;min-width:0;box-sizing:border-box}
.project-task-edit-form .project-task-edit-description{grid-column:1/-1}
.project-task-edit-form .project-date-time-fields{display:grid;grid-template-columns:1.35fr 1fr;gap:6px}
.project-edit-attachments{display:grid;grid-column:1/-1;gap:5px;padding:8px 10px;border:1px dashed #d7e3e9;border-radius:9px;background:#fbfdfe;color:#6c7b88;font-size:11px}
.project-edit-attachments strong{color:#40566a;font-size:11px}
.project-edit-attachments a{color:#28627d;text-decoration:none;overflow-wrap:anywhere}
.project-edit-attachment-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.project-edit-attachment-row>a{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-edit-attachment-row .inline-form{flex:0 0 auto}
.project-priority{flex:0 0 auto;padding:3px 7px;border-radius:999px;font-size:10px}
.priority-low{background:#eff5f1;color:#568168}.priority-medium{background:#eef4fb;color:#4b7595}.priority-high{background:#fff4df;color:#a87321}.priority-urgent{background:#fff0f0;color:#b95050}
.project-empty{padding:22px 8px;text-align:center;color:#9aa5b2;font-size:11px}
@media(max-width:900px){.project-create-form{grid-template-columns:1fr 1fr}.project-create-form .project-create-description{grid-column:span 2}.project-board{grid-template-columns:repeat(4,minmax(245px,1fr))}}
@media(max-width:560px){.project-create-form{grid-template-columns:1fr}.project-create-form .project-create-description{grid-column:auto}}
@media(max-width:560px){.project-date-time-fields{grid-template-columns:1fr 1fr;gap:6px}}
@media(max-width:560px){.project-task-edit-form{grid-template-columns:1fr;width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:17px}.project-task-edit-form .project-task-edit-description{grid-column:auto}.project-task-edit-form::before{grid-column:auto}}

/* Project board interaction polish — 2026.09.08 */
.project-column{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.project-column:hover{border-color:#c8ded1;box-shadow:0 8px 22px rgba(36,73,53,.06)}
.project-column-head>div{display:grid;gap:2px;min-width:0}
.project-column-head small{color:#8b998f;font-size:10px}
.project-task{position:relative;transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease,border-color .18s ease}
.project-task.is-draggable{cursor:grab}
.project-task.is-draggable:hover{transform:translateY(-2px);border-color:#b9d8c5;box-shadow:0 10px 22px rgba(31,75,50,.1)}
.project-task.is-dragging{transform:rotate(1deg) scale(.98);opacity:.48;box-shadow:0 18px 35px rgba(24,61,40,.18)}
.project-board.is-dragging .project-dropzone{border:1px dashed #9bc9ac;background:rgba(241,250,244,.7)}
.project-board.is-dragging .project-dropzone::after{content:"اینجا رها کنید";display:flex;align-items:center;justify-content:center;min-height:72px;color:#5f9273;font-size:11px}
.project-dropzone.is-over{background:#e6f6eb;outline:2px solid #69b184;box-shadow:inset 0 0 0 4px rgba(105,177,132,.1);transform:scale(1.01)}
.project-board.is-saving{pointer-events:none;opacity:.72}
.project-board.is-saving::after{content:"در حال ذخیره…";position:absolute;inset:12px;display:flex;align-items:flex-start;justify-content:center;color:#17613d;font-size:12px;font-weight:800;pointer-events:none}
.project-board{position:relative}
.project-task-focus-panel{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 12px;padding:12px 14px;border:1px solid #b9dfc5;border-radius:12px;background:linear-gradient(90deg,#f1fbf4,#fbfdfc);color:#245b3d}
.project-task-focus-panel>div{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.project-task-focus-panel strong{font-weight:800}
.project-task-focus-panel .muted{flex-basis:100%;color:#63786a}
.project-task-focus-actions{display:flex!important;align-items:center!important;gap:7px!important;margin-inline-start:auto}
.project-task-focus-actions .button{white-space:nowrap}
.project-task.is-focused{animation:project-task-focus 1.2s ease both}
@keyframes project-task-focus{0%,100%{box-shadow:0 0 0 0 rgba(55,158,101,0)}35%{box-shadow:0 0 0 5px rgba(55,158,101,.24)}}
@media(prefers-reduced-motion:reduce){.project-task,.project-column,.project-dropzone,.project-task.is-focused{animation:none!important;transition:none!important}.project-board.is-dragging .project-dropzone::after{content:"مقصد انتخاب شد"}}
@media(max-width:700px){.project-board.is-shift-mode .project-task-shift-controls,.project-task-shift-controls{display:flex}.project-task-shift-controls{margin-inline-start:auto}.project-board{padding-bottom:12px}}

/* Project task creation: compact, balanced RTL form layout. */
.project-create-panel {
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe7ee;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 55, 78, .045);
}
.project-create-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid #edf1f4;
  background: linear-gradient(180deg, #fff, #fbfcfd);
  font-size: 14px;
  list-style: none;
}
.project-create-panel > summary::-webkit-details-marker { display: none; }
.project-create-panel > summary::after {
  content: "⌄";
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #d9e3ea;
  border-radius: 7px;
  color: #6d7c8b;
  font-size: 15px;
  line-height: 1;
  transition: transform .18s ease, background .18s ease;
}
.project-create-panel[open] > summary::after {
  transform: rotate(180deg);
  background: #f2f7fa;
}
.project-create-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 12px;
  margin-top: 0;
  padding: 17px 18px 18px;
  align-items: start;
}
.project-create-form > label {
  min-width: 0;
  color: #526274;
  font-size: 11px;
  font-weight: 600;
}
.project-create-form > label > input,
.project-create-form > label > select,
.project-create-form > label > textarea {
  min-height: 40px;
  border: 1px solid #d7e0e8;
  border-radius: 9px;
  background: #fff;
  color: #24364b;
  font-size: 12px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.project-create-form > label > input,
.project-create-form > label > select { padding: 9px 11px; }
.project-create-form > label > textarea {
  min-height: 76px;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.8;
}
.project-create-form > label > input:focus,
.project-create-form > label > select:focus,
.project-create-form > label > textarea:focus {
  border-color: #52709e;
  background: #fcfdff;
  box-shadow: 0 0 0 3px rgba(82, 112, 158, .12);
  outline: none;
}
.project-create-form > label:nth-of-type(1) { grid-column: 1 / -1; }
.project-create-form > label:nth-of-type(1) > input { min-height: 44px; font-size: 13px; }
.project-create-form > label:nth-of-type(5) { grid-column: span 1; }
.project-create-form .project-date-time-fields { grid-template-columns: minmax(0, 1.25fr) minmax(82px, .85fr); gap: 7px; }
.project-create-form .project-date-time-fields input { min-width: 0; }
.project-create-form .project-create-description { grid-column: 1 / -1; }
.project-create-form > label:nth-of-type(7),
.project-create-form > label:nth-of-type(8) { grid-column: span 2; }
.project-create-form > label:nth-of-type(7) > input[type="file"] {
  min-height: 40px;
  padding: 7px 9px;
  background: #f8fafc;
  font-size: 11px;
}
.project-create-form .field-help {
  min-height: 0;
  margin-top: -1px;
  font-size: 10px;
  line-height: 1.6;
}
.project-create-form .form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 1px;
  padding-top: 14px;
  border-top: 1px solid #edf1f4;
}
.project-create-form .form-actions .button {
  min-height: 40px;
  min-width: 116px;
  border-radius: 9px;
  font-size: 12px;
  box-shadow: 0 6px 14px rgba(30, 58, 95, .16);
}
@media (max-width: 900px) {
  .project-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-create-form > label:nth-of-type(1),
  .project-create-form .project-create-description { grid-column: 1 / -1; }
  .project-create-form > label:nth-of-type(7),
  .project-create-form > label:nth-of-type(8) { grid-column: span 1; }
}
@media (max-width: 560px) {
  .project-create-panel > summary { min-height: 48px; padding-inline: 14px; }
  .project-create-form { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .project-create-form > label:nth-of-type(1),
  .project-create-form .project-create-description,
  .project-create-form > label:nth-of-type(7),
  .project-create-form > label:nth-of-type(8) { grid-column: auto; }
  .project-create-form .form-actions { justify-content: stretch; }
  .project-create-form .form-actions .button { width: 100%; }
}

/* Project management compact layout refinement — 2026.10.04 */
.project-create-panel{margin-block-end:12px}
.project-create-panel>summary{min-height:46px;padding-inline:15px;color:#24364b;font-size:13px;font-weight:800}
.project-create-form{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px 12px;padding:14px 15px 15px}
.project-create-form>label:nth-of-type(1)>input{min-height:41px}
.project-create-form>label:nth-of-type(1){grid-column:span 2}
.project-create-form .project-create-description{grid-column:span 2}
.project-create-form .project-create-description textarea{min-height:76px}
.project-create-form .form-actions{padding-top:10px}
.project-sort-panel-compact{min-height:40px;margin-block-end:9px;padding:5px 10px;border-color:#e2e8ef;background:#fff;box-shadow:0 2px 8px rgba(31,55,78,.025)}
.project-sort-copy{flex:0 0 auto}
.project-sort-copy strong{color:#526274;font-size:.75rem}
.project-sort-form{gap:7px}
.project-sort-form label{font-size:.68rem}
.project-sort-form select,.project-sort-form .button{min-height:30px}
.project-sort-form select{min-width:190px}
.project-sort-active{padding:5px 8px;background:#f2f5f8;color:#566779;font-size:.68rem}
.project-task.is-draggable{cursor:grab}
.project-task.is-draggable:active{cursor:grabbing}
@media(max-width:900px){.project-create-form{grid-template-columns:repeat(2,minmax(0,1fr))}.project-create-form>label:nth-of-type(1){grid-column:1/-1}.project-create-form .project-create-description{grid-column:1/-1;grid-row:auto}.project-create-form .project-create-description textarea{min-height:68px}}
@media(max-width:700px){.project-sort-panel-compact{align-items:center;flex-direction:row;gap:8px;padding:6px 8px}.project-sort-copy{flex:0 0 auto}.project-sort-form{flex:1;justify-content:flex-start}.project-sort-form label{display:none}.project-sort-form select{min-width:0;flex:1}}
@media(max-width:560px){.project-create-panel>summary{min-height:44px;padding-inline:12px}.project-create-form{grid-template-columns:1fr;gap:10px;padding:12px}.project-create-form>label:nth-of-type(1),.project-create-form .project-create-description,.project-create-form>label:nth-of-type(7),.project-create-form>label:nth-of-type(8){grid-column:auto}.project-create-form .form-actions{padding-top:9px}.project-sort-panel-compact{align-items:stretch;flex-direction:column}.project-sort-form{width:100%}}

/* Solar Hijri project calendar — 2026.10.04 */
.project-calendar-page{display:grid;gap:14px}
.project-calendar-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.project-calendar-summary>div{display:grid;gap:3px;min-height:68px;padding:11px 13px;border:1px solid #e1e8ef;border-radius:12px;background:#fff;box-shadow:0 3px 10px rgba(31,55,78,.035)}
.project-calendar-summary span{color:#7b8795;font-size:10px}.project-calendar-summary strong{color:#24364b;font-size:19px;line-height:1.35}.project-calendar-summary strong.is-warning{color:#b4554d}
.project-calendar-panel{padding:0;overflow:hidden}
.project-calendar-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid #e8edf2}
.project-calendar-kicker{display:block;margin-bottom:3px;color:#4c7c9d;font-size:10px;font-weight:800}.project-calendar-header h2{margin:0;color:#24364b;font-size:18px}.project-calendar-header small{display:block;margin-top:4px;color:#7c8794;font-size:10px}.project-calendar-nav{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.project-calendar-nav .button{white-space:nowrap}
.project-calendar-weekdays,.project-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;padding-inline:12px}.project-calendar-weekdays{padding-block:10px 6px;color:#798795;font-size:10px;font-weight:800;text-align:center}.project-calendar-grid{padding-bottom:14px}
.project-calendar-day{min-height:118px;padding:8px;border:1px solid #e2e8ee;border-radius:10px;background:#fff;overflow:hidden}.project-calendar-day.is-outside{background:#f7f9fb;border-color:#edf1f4}.project-calendar-day.is-today{border-color:#8177e7;box-shadow:0 0 0 3px rgba(91,80,230,.08);background:#fcfbff}.project-calendar-day>header{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:6px;color:#334b62}.project-calendar-day>header strong{font-size:13px}.project-calendar-day>header span{color:#8a96a3;font-size:9px;white-space:nowrap}.project-calendar-day-tasks{display:grid;gap:5px}.project-calendar-task{display:grid;gap:2px;padding:6px 7px;border-inline-start:3px solid #7b91a4;border-radius:7px;background:#f5f8fa;color:#30485d;text-decoration:none;min-width:0}.project-calendar-task:hover,.project-calendar-task:focus-visible{outline:none;background:#eef4f8;box-shadow:0 0 0 2px rgba(65,115,148,.18)}.project-calendar-task strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.project-calendar-task small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#778797;font-size:9px}.project-calendar-task.status-todo{border-color:#6f91ab}.project-calendar-task.status-in_progress{border-color:#d09543;background:#fff9ef}.project-calendar-task.status-done{border-color:#4ba877;background:#f0faf4}.project-calendar-task.status-blocked{border-color:#c86b73;background:#fff5f5}.project-calendar-footer{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:11px 14px;border-top:1px solid #e8edf2;color:#748291;font-size:10px}.project-calendar-footer span{display:inline-flex;align-items:center;gap:5px}.calendar-dot{width:7px;height:7px;border-radius:50%;background:#7b91a4}.calendar-dot.in-progress{background:#d09543}.calendar-dot.done{background:#4ba877}.calendar-dot.blocked{background:#c86b73}.project-calendar-footer .button{margin-inline-start:auto}
@media(max-width:900px){.project-calendar-day{min-height:105px;padding:6px}.project-calendar-weekdays,.project-calendar-grid{gap:5px;padding-inline:8px}}
@media(max-width:650px){.project-calendar-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.project-calendar-summary>div{min-height:58px;padding:8px}.project-calendar-summary strong{font-size:15px}.project-calendar-header{align-items:stretch;flex-direction:column;padding:13px}.project-calendar-nav{justify-content:stretch}.project-calendar-nav .button{flex:1}.project-calendar-weekdays,.project-calendar-grid{min-width:690px}.project-calendar-panel{overflow-x:auto}.project-calendar-weekdays,.project-calendar-grid{padding-inline:8px}.project-calendar-day{min-height:108px}.project-calendar-footer{min-width:690px}.project-calendar-footer .button{margin-inline-start:0}}

/* Mobile lead workspace: compact, aligned filter and bulk-edit controls. */
@media (max-width: 560px) {
  .content-wrap:has(.lead-filter-panel) {
    padding-inline: 10px;
    padding-bottom: 28px;
  }
  .content-wrap:has(.lead-filter-panel) .page-header {
    gap: 10px;
    margin-bottom: 12px;
  }
  .content-wrap:has(.lead-filter-panel) .page-header h2 {
    font-size: 19px;
  }
  .content-wrap:has(.lead-filter-panel) .page-header p {
    font-size: 11px;
    line-height: 1.8;
  }
  .content-wrap:has(.lead-filter-panel) .filter-toolbar {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
  }
  .lead-filter-panel > summary {
    min-height: 44px;
    padding: 9px 11px;
    border-radius: 12px;
    font-size: 11px;
  }
  .lead-filter-panel > summary small {
    max-width: 44%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lead-filter-panel[open] > summary {
    border-radius: 12px 12px 0 0;
  }
  .lead-filters {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 5px 16px rgba(31, 33, 70, .04);
  }
  .lead-filters label {
    gap: 4px;
    font-size: 10px;
  }
  .lead-filters label > span {
    font-size: 10px;
  }
  .lead-filters input,
  .lead-filters select {
    min-height: 40px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 12px;
  }
  .lead-global-search {
    gap: 6px;
    padding: 9px;
    border-radius: 11px;
  }
  .lead-global-search-heading {
    display: grid;
    gap: 1px;
  }
  .lead-global-search-heading label {
    font-size: 11px;
  }
  .lead-global-search-heading small {
    max-height: 34px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.7;
  }
  .lead-global-search-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .lead-global-search-row input {
    grid-column: 1 / -1;
    min-height: 42px;
    padding: 8px 36px 8px 9px;
    border-radius: 9px;
    font-size: 12px;
  }
  .lead-global-search-row .button {
    width: 100%;
    min-height: 40px;
    padding-inline: 8px;
    font-size: 11px;
  }
  .lead-global-search-icon {
    width: 32px;
    height: 40px;
  }
  .lead-multi-filter-form {
    gap: 8px;
    margin-top: 8px;
    padding: 9px;
    border-radius: 11px;
  }
  .lead-multi-filter-form .multi-filter-heading {
    display: grid;
    gap: 2px;
    min-height: 0;
    font-size: 11px;
    line-height: 1.7;
  }
  .lead-multi-filter-form .multi-filter-heading small {
    font-size: 9px;
  }
  .multi-filter-collapse-bar {
    margin-top: 8px;
  }
  .multi-filter-collapse {
    width: 100%;
    justify-content: space-between;
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 10px;
  }
  .multi-picker-toggle {
    min-height: 39px;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 11px;
  }
  .multi-picker-menu {
    inset-inline: 8px;
    bottom: 8px;
    padding: 6px;
    max-height: min(55vh, 360px);
    border-radius: 13px;
  }
  .multi-picker-option {
    min-height: 37px;
    padding: 7px 6px;
    font-size: 11px !important;
  }
  .lead-multi-filter-form .filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .lead-multi-filter-form .filter-actions .button,
  .lead-filters .filter-actions .button {
    width: 100%;
    min-height: 40px;
    padding-inline: 7px;
    font-size: 10px;
  }
  .filter-group {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding: 1px 0 3px;
    scrollbar-width: thin;
  }
  .filter-chip {
    min-height: 29px;
    padding: 4px 8px;
    font-size: 10px;
  }
  .lead-bulk-toolbar {
    gap: 8px;
    margin-top: 8px;
    padding: 9px;
    border-radius: 11px;
  }
  .bulk-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    align-items: center;
  }
  .bulk-select-all {
    min-width: 0;
    gap: 5px;
    font-size: 10px !important;
    line-height: 1.6;
  }
  .bulk-select-all input {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
  }
  .bulk-select-all input,
  .select-column input,
  .multi-picker-option input {
    appearance: none;
    -webkit-appearance: none;
    display: inline-grid;
    place-items: center;
    align-self: center;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin: 0;
    padding: 0;
    border: 1.5px solid #b8c7d5;
    border-radius: 6px;
    background: #fff;
    vertical-align: middle;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  }
  .bulk-select-all input:hover,
  .select-column input:hover,
  .multi-picker-option input:hover {
    border-color: #3b78a4;
    box-shadow: 0 0 0 3px rgba(29, 92, 145, .12);
  }
  .bulk-select-all input:checked,
  .select-column input:checked,
  .multi-picker-option input:checked {
    border-color: #1d5c91;
    background: #1d5c91;
    box-shadow: 0 2px 7px rgba(29, 92, 145, .2);
  }
  .bulk-select-all input:checked::after,
  .select-column input:checked::after,
  .multi-picker-option input:checked::after {
    content: "";
    display: block;
    width: 5px;
    height: 9px;
    margin: 0;
    border: solid #fff;
    border-width: 0 1.8px 1.8px 0;
    transform: rotate(45deg) translate(-1px, -1px);
    transform-origin: center;
  }
  .bulk-select-all input:indeterminate,
  .select-column input:indeterminate {
    border-color: #1d5c91;
    background: linear-gradient(#1d5c91, #1d5c91) center / 9px 2px no-repeat, #fff;
  }
  .multi-picker-option {
    min-height: 40px;
    align-items: center;
    border-radius: 9px;
  }
  .multi-picker-option span {
    line-height: 1.7;
  }
  .bulk-selection-count {
    grid-column: 1 / -1;
    padding-top: 2px;
    border-top: 1px solid #edf1f5;
    font-size: 10px;
  }
  .bulk-edit-panel {
    padding-top: 6px;
  }
  .bulk-edit-panel > summary {
    min-height: 38px;
    padding: 7px 1px;
    font-size: 11px;
  }
  .bulk-edit-panel > summary small {
    max-width: 75%;
    font-size: 9px;
    line-height: 1.7;
  }
  .bulk-multi-help {
    margin: 0 0 3px;
    font-size: 9px;
    line-height: 1.7;
  }
  .bulk-fields {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .bulk-fields label {
    gap: 4px;
    font-size: 10px;
  }
  .bulk-fields select {
    min-height: 39px;
    padding: 7px;
    border-radius: 9px;
    font-size: 11px;
  }
  .bulk-fields label:has(input[name="bulk_national_id"]) {
    grid-column: 1 / -1;
  }
  .bulk-fields .button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 40px;
    font-size: 11px;
  }
}

/* Final leads card polish: keep selection controls truly square even when
   older/global checkbox rules are loaded later in the stylesheet. */
.lead-results-cards .lead-card-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 6px 3px 4px;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  background: #fbfcfe;
  white-space: nowrap;
}
.lead-results-cards .lead-card-select input,
.lead-results-table .select-column input,
.lead-bulk-toolbar .bulk-select-all input {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid #aebdca !important;
  border-radius: 3px !important;
  background: #fff !important;
  vertical-align: middle;
  cursor: pointer;
}
.lead-results-cards .lead-card-select input:hover,
.lead-results-table .select-column input:hover,
.lead-bulk-toolbar .bulk-select-all input:hover {
  border-color: #2c6d9e !important;
  box-shadow: 0 0 0 3px rgba(29,92,145,.12) !important;
}
.lead-results-cards .lead-card-select input:checked,
.lead-results-table .select-column input:checked,
.lead-bulk-toolbar .bulk-select-all input:checked {
  border-color: #1d5c91 !important;
  background: #1d5c91 !important;
}
.lead-results-cards .lead-card-select input:checked::after,
.lead-results-table .select-column input:checked::after,
.lead-bulk-toolbar .bulk-select-all input:checked::after {
  content: "" !important;
  display: block !important;
  width: 4px !important;
  height: 8px !important;
  margin: 0 !important;
  border: solid #fff !important;
  border-width: 0 1.7px 1.7px 0 !important;
  transform: rotate(45deg) !important;
}
.lead-results-cards .lead-card {
  padding: 11px 12px 10px;
  border-radius: 13px;
}
.lead-results-cards .lead-card-header {
  gap: 8px;
  padding-bottom: 8px;
}
.lead-results-cards .lead-card-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px 10px;
  padding: 9px 0 6px;
}
.lead-results-cards .lead-card-fact {
  padding: 2px 0;
}
.lead-results-cards .lead-card-fact.is-wide {
  grid-column: span 2;
}
.lead-results-cards .lead-card-label {
  margin-bottom: 1px;
  font-size: 9px;
  line-height: 1.55;
}
.lead-results-cards .lead-card-value {
  font-size: 10px;
  line-height: 1.55;
}
.lead-results-cards .lead-card-actions {
  gap: 6px;
  padding-top: 8px;
}
.lead-results-cards .lead-card-actions .button {
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 8px;
}

@media (max-width: 760px) {
  .lead-results-cards .lead-card-select {
    min-height: 26px;
    padding: 2px 5px 2px 3px;
    font-size: 9px;
  }
  .lead-results-cards .lead-card-select input {
    flex-basis: 18px !important;
    width: 18px !important;
    height: 18px !important;
  }
  .lead-results-cards .lead-card-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 9px;
    padding-top: 8px;
  }
  .lead-results-cards .lead-card-fact.is-wide {
    grid-column: 1 / -1;
  }
  .lead-results-cards .lead-card-actions .button {
    min-height: 34px;
    flex: 1 1 0;
  }
}

/* Mobile navigation is persistent at the bottom of the viewport. The main
   content reserves an equivalent bottom band, so the bar never covers the
   last row, pagination, or form actions. */
@media (max-width: 760px) {
  .content-wrap {
    padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
  }
  .pagination {
    margin-bottom: 10px !important;
  }
  .mobile-nav {
    position: fixed !important;
    z-index: 40 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    min-height: 66px;
    margin: 0 !important;
    padding: 5px 10px calc(5px + env(safe-area-inset-bottom));
    border: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -4px 16px rgba(23,38,58,.08);
    backdrop-filter: blur(8px);
  }
  .mobile-nav .nav-item {
    min-height: 46px;
  }
  .mobile-fab-group {
    bottom: calc(78px + env(safe-area-inset-bottom)) !important;
  }
}

/* Workspace-scoped in-app notifications. */
.notification-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  text-decoration: none;
  white-space: nowrap;
}
.notification-summary-icon {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: var(--primary);
  flex: 0 0 21px;
}
.notification-summary-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.notification-summary-label {
  white-space: nowrap;
}
.notification-summary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff;
}
.notification-summary .notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--danger, #c94c5d);
  font-size: 10px;
  line-height: 1;
}
.notification-alert-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid #b9d9c4;
  border-radius: 14px;
  background: #f1faf4;
  color: var(--ink);
}
.notification-alert-stack {
  position: relative;
  display: grid;
  gap: 5px;
  max-height: min(240px, 26vh);
  margin: -32px 0 14px;
  padding: 6px 8px 7px;
  border: 1px solid #edf2ef;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: rgba(255,255,255,.68);
  padding-bottom: 28px;
  overflow: visible;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.main-content > .content-wrap:has(.notification-alert-stack) {
  padding-top: 32px;
}
.notification-alert-stack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  padding: 0 3px;
  color: var(--ink);
  font-size: 11px;
}
.notification-alert-stack.is-collapsed {
  max-height: 34px;
  min-height: 30px;
  overflow: visible;
  padding-top: 2px;
  padding-bottom: 2px;
}
.notification-alert-stack.is-collapsed .notification-alert-stack-head strong,
.notification-alert-stack.is-collapsed .notification-alert-dismiss,
.notification-alert-stack.is-collapsed .notification-alert-strip,
.notification-alert-stack.is-collapsed .notification-alert-more {
  display: none;
}
.notification-alert-toggle {
  position: absolute;
  left: 0;
  right: auto;
  transform: translateX(-100%);
  bottom: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #d5e4da;
  border-radius: 6px 0 0 6px;
  color: #4f8267;
  background: #ffffff;
  font-size: 0;
  line-height: 1;
  z-index: 2;
  cursor: pointer;
}
.notification-alert-toggle::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-inline-end: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform .18s ease;
}
.notification-alert-stack.is-collapsed .notification-alert-toggle::before {
  transform: translateY(1px) rotate(225deg);
}
.notification-alert-toggle:hover {
  color: #4c7c65;
  background: #f0f8f3;
}
.notification-alert-dismiss {
  padding: 2px 7px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}
.notification-alert-dismiss:hover {
  color: var(--primary);
  background: #edf7f0;
}
.notification-alert-stack .notification-alert-strip {
  margin: 0;
  min-height: 42px;
  padding: 7px 9px;
  border-radius: 10px;
}
.notification-alert-strip > .button {
  border: 1px solid #d7e7dc;
  border-radius: 7px;
  background: transparent;
  color: #4c7c65;
  box-shadow: none;
  font-size: 10px;
  font-weight: 600;
}
.notification-alert-strip > .button:hover {
  background: #edf7f0;
  color: #37694f;
}
.notification-alert-strip.is-task { border-color: #d8c8ee; background: #faf7ff; }
.notification-alert-strip.is-task .notification-alert-icon { color: #7043a3; background: #eee5fb; }
.notification-alert-strip.is-warning { border-color: #efd3a6; background: #fffaf1; }
.notification-alert-strip.is-warning .notification-alert-icon { color: #a46a16; background: #fff0d3; }
.notification-alert-strip.is-danger { border-color: #efc0c7; background: #fff5f6; }
.notification-alert-strip.is-danger .notification-alert-icon { color: #b4364a; background: #fde3e6; }
.notification-alert-strip.is-info {
  border-color: #d8e9df;
  background: #f7fbf8;
}
.notification-alert-strip.is-info .notification-alert-icon {
  color: #62977c;
  background: #eaf5ee;
}
.notification-alert-copy time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.notification-alert-more {
  display: block;
  padding: 5px 12px;
  color: var(--primary);
  font-size: 11px;
  text-align: center;
  text-decoration: none;
}
.notification-alert-more:hover {
  text-decoration: underline;
}
.notification-alert-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--primary);
  background: #dff2e5;
}
.notification-alert-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}
.notification-alert-copy span {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-inbox-tools,
.notification-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notification-pagination {
  justify-content: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}
.notification-page-header + .notification-composer {
  order: 2;
}
.content-wrap:has(.notification-inbox) {
  display: flex;
  flex-direction: column;
}
.content-wrap:has(.notification-inbox) .notification-page-header {
  order: 0;
}
.content-wrap:has(.notification-inbox) .notification-inbox {
  order: 1;
}
.content-wrap:has(.notification-inbox) .notification-composer {
  order: 2;
}
.content-wrap:has(.notification-inbox) .notification-setup-warning {
  order: 3;
}
.notification-page-header {
  align-items: flex-start;
}
.notification-composer .panel-header,
.notification-inbox .panel-header {
  align-items: flex-start;
}
.notification-target-search {
  display: grid;
  grid-template-columns: minmax(145px, .35fr) minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.notification-target-search label,
.notification-send-form label,
.control-notification-edit label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.notification-target-search input,
.notification-target-search select,
.notification-send-form input,
.notification-send-form select,
.notification-send-form textarea,
.control-notification-edit input,
.control-notification-edit select,
.control-notification-edit textarea {
  width: 100%;
  min-width: 0;
}
.notification-lead-filter-builder {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbf9;
}
.notification-filter-builder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.notification-filter-builder-grid fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 9px;
  border: 1px solid #dfe9e3;
  border-radius: 10px;
  background: #fff;
}
.notification-filter-builder-grid fieldset legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 11px;
}
.notification-check-option {
  display: inline-flex !important;
  width: auto !important;
  align-items: center;
  gap: 5px !important;
  padding: 4px 7px;
  border: 1px solid #e2ebe5;
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink) !important;
  font-size: 11px !important;
}
.notification-check-option input {
  width: auto !important;
  margin: 0;
}
@media (max-width: 900px) {
  .notification-filter-builder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .notification-filter-builder-grid { grid-template-columns: 1fr; }
}
.notification-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.notification-target-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon title" "icon meta";
  gap: 2px 8px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  text-align: right;
  cursor: pointer;
}
.notification-target-option:hover,
.notification-target-option:focus-visible {
  border-color: var(--primary);
  background: #f7fbf8;
  outline: none;
}
.notification-target-option > span {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--primary);
  background: #edf7f0;
}
.notification-target-option > strong {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.notification-target-option > small {
  grid-area: meta;
  color: var(--muted);
  font-size: 10px;
}
.notification-send-form {
  align-items: end;
}
.notification-selected-target {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px dashed #b9d4c2;
  border-radius: 12px;
  color: var(--muted);
  background: #f8fcf9;
}
.notification-selected-target > span:nth-child(2) {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}
.notification-selected-target svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--primary);
}
.notification-page-target small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.notification-list {
  display: grid;
  gap: 10px;
}
.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.notification-item.is-unread {
  border-color: #b9d9c4;
  box-shadow: 0 4px 15px rgba(29, 103, 62, .07);
}
.notification-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: var(--primary);
  background: #edf7f0;
}
.notification-item-icon svg {
  width: 18px;
  height: 18px;
}
.notification-item-copy {
  min-width: 0;
}
.notification-item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
}
.notification-item-head strong {
  overflow-wrap: anywhere;
}
.notification-item-head time,
.notification-item-copy .subtext {
  color: var(--muted);
  font-size: 10px;
}
.notification-item-copy p {
  margin: 6px 0;
  color: var(--text, #4d5969);
  line-height: 1.9;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .notification-alert-stack {
    max-height: min(270px, 34vh);
    margin: -24px 0 12px;
    padding-inline: 5px;
  }
  .main-content > .content-wrap:has(.notification-alert-stack) {
    padding-top: 24px;
  }
  .notification-alert-strip {
    align-items: center;
    flex-wrap: nowrap;
  }
  .notification-alert-strip .button {
    margin-inline-start: 0;
    flex: 0 0 auto;
    padding-inline: 8px;
    font-size: 10px;
  }
  .notification-alert-copy span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .notification-alert-copy time { display: none; }
  .notification-inbox-tools {
    align-items: flex-end;
    flex-direction: column;
  }
}
.notification-target-link,
.control-notification-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 11px;
  text-decoration: none;
}
.notification-target-link:hover,
.control-notification-link:hover {
  text-decoration: underline;
}
.notification-target-link svg,
.control-notification-link svg {
  width: 14px;
  height: 14px;
}
.notification-read-form {
  align-self: center;
}
.notification-setup-warning {
  border-color: #e9d4a4;
  background: #fffaf0;
}
.control-notification-list {
  display: grid;
  gap: 12px;
}
.control-notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.control-notification-item.is-unread {
  border-color: #b9d9c4;
}
.control-notification-main {
  min-width: 0;
}
.control-notification-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.control-notification-main p {
  margin: 7px 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.control-notification-edit {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.control-notification-edit summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.control-notification-edit summary svg {
  width: 16px;
  height: 16px;
}
.control-notification-delete {
  align-self: start;
}
.notification-control-intro {
  margin-bottom: 12px;
}
.control-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft, #f7f9fc);
}
.control-bulk-toolbar select {
  min-width: 170px;
  max-width: 240px;
}
.control-check-all,
.control-notification-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.control-check-all input,
.control-notification-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}
.control-bulk-count {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.control-notification-check {
  grid-column: 1 / -1;
  justify-self: start;
}
@media (max-width: 760px) {
  .topbar-meta > span:nth-child(2) {
    display: none;
  }
  .notification-target-search {
    grid-template-columns: 1fr;
  }
  .notification-target-search .button {
    width: 100%;
  }
  .notification-item,
  .control-notification-item {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .notification-read-form,
  .control-notification-delete {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .notification-read-form .button,
  .control-notification-delete .control-button {
    width: 100%;
  }
  .control-bulk-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .control-bulk-toolbar select,
  .control-bulk-toolbar .control-button {
    width: 100%;
    max-width: none;
  }
}
/* Safe duplicate-lead merge */
.duplicate-merge-card{margin-top:18px;border:1px solid #dbe5f2;background:#fff}
.duplicate-merge-card .panel-header{align-items:flex-start;gap:18px}
.duplicate-merge-card .subtext{display:block;max-width:920px;line-height:1.9}
.duplicate-merge-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:16px;border-top:1px solid #edf1f7;border-bottom:1px solid #edf1f7}
.duplicate-merge-summary b{display:block;padding:14px;border-radius:12px;background:#f5f8fc;color:#123d68;text-align:center}
.duplicate-merge-examples{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:16px}
.duplicate-merge-examples div{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid #e5ebf3;border-radius:10px}
.duplicate-merge-examples span{color:#71819a;font-size:12px}
.duplicate-merge-card .form-actions{padding:0 16px 16px;display:flex;gap:10px;flex-wrap:wrap}
.duplicate-merge-errors{margin:12px 16px;padding:10px;background:#fff7f7;border:1px solid #ffd7d7;border-radius:10px}
.duplicate-merge-errors pre{white-space:pre-wrap;overflow:auto;max-height:180px;font-size:12px}
@media(max-width:800px){.duplicate-merge-summary,.duplicate-merge-examples{grid-template-columns:1fr}.duplicate-merge-examples div{display:block}}

/* Owner dashboard: decision-oriented management metrics. */
.control-main .control-dashboard-summary{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}
.control-main .dashboard-stat-link{text-decoration:none;color:inherit;transition:transform .18s ease,box-shadow .18s ease}
.control-main .dashboard-stat-link:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(35,39,84,.12)}
.control-main .control-stat span{display:block;margin-top:5px;color:var(--muted,#777b96);font-size:11px}
.control-main .dashboard-action-card{margin-bottom:18px}
.control-main .dashboard-action-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;padding:14px}
.control-main .dashboard-action-item{display:flex;min-height:112px;flex-direction:column;justify-content:center;gap:3px;padding:12px;border:1px solid var(--line,#e8e9f2);border-radius:12px;background:#fff;text-decoration:none;color:var(--text,#202239);transition:.18s ease}
.control-main .dashboard-action-item:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(35,39,84,.09)}
.control-main .dashboard-action-item strong{font-size:22px;color:#183f68}
.control-main .dashboard-action-item span{font-size:12px;font-weight:700}
.control-main .dashboard-action-item small{color:var(--muted,#777b96);font-size:10px}
.control-main .dashboard-action-item.has-warning{border-color:#f0c88b;background:#fffaf0}
.control-main .dashboard-action-item.has-warning strong{color:#b56a13}
.control-main .dashboard-action-item.is-clear{background:#f4fbf8;border-color:#c8eadc}
.control-main .dashboard-action-item.is-clear strong{color:#16805c}
.control-main .dashboard-action-item.is-neutral{background:#f7f9fc}
.control-main .dashboard-agent-card{margin-bottom:18px}
.control-main .dashboard-agent-table td,.control-main .dashboard-agent-table th{white-space:nowrap}
@media(max-width:1100px){.control-main .dashboard-action-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.control-main .control-dashboard-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.control-main .dashboard-action-grid,.control-main .control-dashboard-summary{grid-template-columns:1fr}.control-main .dashboard-action-item{min-height:86px}.control-main .dashboard-agent-card .control-card-head{align-items:flex-start;flex-direction:column}}

/* Compact owner-dashboard launcher for extra agents. */
.mobile-fab-launcher-card{margin-bottom:18px;padding:10px 14px}
.mobile-fab-launcher-row{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:46px}
.mobile-fab-launcher-copy{display:flex;align-items:baseline;gap:10px;min-width:0}
.mobile-fab-launcher-copy h2{margin:0;font-size:14px;white-space:nowrap}
.mobile-fab-section-label{color:#64748b;font-size:11px;font-weight:700;white-space:nowrap}
.mobile-fab-launcher{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:7px 12px;border:1.5px solid var(--danger,#d94d64);border-radius:10px;background:#fff7f8;color:#9f2945;font:inherit;font-size:12px;font-weight:700;cursor:pointer;transition:.18s ease}
.mobile-fab-launcher:hover,.mobile-fab-launcher:focus-visible{box-shadow:0 0 0 3px rgba(217,77,100,.12);outline:none}
.mobile-fab-launcher.is-enabled{border-color:var(--success,#1f9d72);background:#f1fbf7;color:#147352}
.mobile-fab-launcher.is-enabled:hover,.mobile-fab-launcher.is-enabled:focus-visible{box-shadow:0 0 0 3px rgba(31,157,114,.13)}
.mobile-fab-launcher-icon{font-size:15px;line-height:1}
.mobile-fab-status{padding:2px 6px;border-radius:999px;background:rgba(0,0,0,.05);font-size:10px}
.mobile-fab-dialog{width:min(640px,calc(100vw - 28px));border:0;border-radius:16px;padding:0;color:var(--text,#202239);box-shadow:0 24px 80px rgba(20,30,60,.22)}
.mobile-fab-dialog::backdrop{background:rgba(22,28,52,.42);backdrop-filter:blur(2px)}
.mobile-fab-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px 8px;border-bottom:1px solid var(--line,#e8e9f2)}
.mobile-fab-dialog-head h2{margin:5px 0 0;font-size:18px}
.mobile-fab-dialog>.control-muted{display:block;margin:0;padding:12px 20px 0;font-size:12px}
.mobile-fab-dialog .mobile-fab-settings-form{padding:14px 20px 20px}
.mobile-fab-dialog-close{width:30px;height:30px;border:1px solid var(--line,#e8e9f2);border-radius:9px;background:#fff;color:#64748b;font-size:20px;line-height:1;cursor:pointer}
.mobile-fab-dialog-actions{justify-content:flex-start;margin-top:2px}
@media(max-width:640px){.mobile-fab-launcher-row{align-items:stretch;flex-direction:column}.mobile-fab-launcher-copy{justify-content:space-between}.mobile-fab-launcher{justify-content:center;width:100%}}

/* Sales Workspace/Pipeline read model — 2026.09.16.03 */
.sales-list-toolbar,.sales-pipeline-toolbar{align-items:center;flex-wrap:wrap}
.sales-pipeline-context{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:-4px 0 14px;color:#64748b;font-size:11px}
.sales-pipeline-context span{padding:5px 9px;border:1px solid #e4e9f0;border-radius:999px;background:#f8fafc}
.sales-pipeline-board{display:grid;grid-template-columns:repeat(3,minmax(260px,1fr));gap:14px;align-items:start;min-width:0;overflow-x:auto;padding-bottom:8px}
.sales-pipeline-column{min-width:0;border:1px solid #e4e9f0;border-radius:14px;background:#f8fafc;overflow:hidden}
.sales-pipeline-column-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:13px;border-bottom:1px solid #e4e9f0;background:#fff}
.sales-pipeline-column-head>div:first-child{display:flex;flex-direction:column;gap:7px;min-width:0}
.sales-pipeline-column-head small{color:#778396;font-size:10px;line-height:1.7}
.sales-pipeline-column-total{display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap}
.sales-pipeline-column-total strong{font-size:20px;color:#1f3454}
.sales-pipeline-column-total small{font-size:10px;color:#5f7189}
.sales-pipeline-cards{display:grid;gap:9px;padding:10px}
.sales-pipeline-card{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid #e1e7ef;border-radius:11px;background:#fff;box-shadow:0 3px 12px rgba(32,50,80,.04)}
.sales-pipeline-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.sales-pipeline-card-head .entity-name{font-weight:800;line-height:1.7}
.sales-pipeline-card-head small{color:#8995a5;direction:ltr}
.sales-pipeline-card-product{overflow:hidden;color:#4b5d75;font-size:12px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
.sales-pipeline-card-value{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding-top:3px}
.sales-pipeline-card-value strong{color:#173f68;font-size:15px}
.sales-pipeline-card-value span{color:#718096;font-size:10px}
.sales-pipeline-card-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0;padding-top:7px;border-top:1px dashed #e6ebf0}
.sales-pipeline-card-meta div{min-width:0}
.sales-pipeline-card-meta dt{color:#8a96a5;font-size:9px}
.sales-pipeline-card-meta dd{overflow:hidden;margin:2px 0 0;color:#3d4d62;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.sales-pipeline-card-action{align-self:flex-start;margin-top:2px}
.sales-pipeline-stage-form{display:grid;gap:6px;margin-top:3px;padding-top:8px;border-top:1px solid #edf0f4}
.sales-pipeline-stage-form label{display:grid;gap:3px;color:#718096;font-size:10px}
.sales-pipeline-stage-form select,.sales-pipeline-stage-form textarea{width:100%;min-width:0;padding:6px 7px;border:1px solid #dce3eb;border-radius:7px;background:#fff;color:#29384d;font:inherit;font-size:11px}
.sales-pipeline-stage-form textarea{resize:vertical;line-height:1.5}
.sales-pipeline-stage-form .button{justify-self:start}
.sales-pipeline-empty{padding:24px 14px;color:#8793a2;font-size:11px;text-align:center}
.sales-pipeline-more{padding:0 12px 12px;color:#7b8796;font-size:10px;line-height:1.7}
.sales-pipeline-inline-error{display:flex;flex-direction:column;gap:7px;margin:10px;padding:10px;border:1px solid #f0c5c5;border-radius:9px;background:#fff6f6;color:#9e3b3b;font-size:11px}
.sales-pipeline-inline-error code,.sales-pipeline-notice code{display:block;overflow:auto;max-width:100%;white-space:pre-wrap;word-break:break-word;font:11px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace}
.sales-pipeline-notice{display:flex;flex-direction:column;gap:7px;margin-bottom:14px}
.sales-pipeline-notice details{margin-top:2px}
@media(max-width:980px){.sales-pipeline-board{grid-template-columns:repeat(3,minmax(245px,1fr))}}
@media(max-width:700px){.sales-pipeline-board{grid-template-columns:1fr;overflow:visible}.sales-pipeline-column{min-width:0}.sales-pipeline-column-head{padding:11px}.sales-pipeline-context{align-items:flex-start;flex-direction:column;gap:5px}}

/* Sales Workspace/Pipeline focused UX refinement — 2026.09.22 */
.sales-pipeline-toolbar{justify-content:flex-start;gap:8px;margin-block:2px 16px}
.sales-pipeline-toolbar .button{min-height:38px;padding-inline:14px}
.sales-pipeline-overview{display:flex;align-items:stretch;justify-content:space-between;gap:22px;margin-block:0 14px;padding:18px 20px;border:1px solid #e1e8f0;border-radius:18px;background:linear-gradient(135deg,#fff 0%,#f8fbff 100%);box-shadow:0 8px 24px rgba(32,50,80,.045)}
.sales-pipeline-overview-copy{display:flex;flex:1 1 360px;flex-direction:column;gap:5px;min-width:0}
.sales-pipeline-eyebrow{color:#536b87;font-size:11px;font-weight:800;letter-spacing:.02em}
.sales-pipeline-overview-copy strong{color:#183b61;font-size:18px;line-height:1.6}
.sales-pipeline-overview-copy small{max-width:620px;color:#748399;font-size:11px;line-height:1.9}
.sales-pipeline-overview-stats{display:grid;grid-template-columns:repeat(3,minmax(100px,1fr));gap:8px;align-items:stretch;min-width:min(480px,48%)}
.sales-pipeline-overview-stats>div{display:flex;min-width:0;flex-direction:column;justify-content:center;gap:4px;padding:10px 12px;border:1px solid #e2e9f1;border-radius:12px;background:#fff}
.sales-pipeline-overview-stats span{color:#7c899a;font-size:10px;white-space:nowrap}
.sales-pipeline-overview-stats strong{overflow:hidden;color:#1b436b;font-size:14px;text-overflow:ellipsis;white-space:nowrap}
.sales-pipeline-context{margin-block:0 16px;padding-inline:2px}
.sales-pipeline-context span{background:#fff}
.sales-pipeline-board{gap:16px;padding:2px 2px 12px}
.sales-pipeline-column{border-color:#dde6ef;border-radius:16px;background:#f6f9fc;box-shadow:0 4px 16px rgba(32,50,80,.035)}
.sales-pipeline-column-head{min-height:88px;padding:15px 16px;background:#fff}
.sales-pipeline-column-head>div:first-child{gap:6px}
.sales-pipeline-column-head small{max-width:190px;line-height:1.8}
.sales-pipeline-column-total{align-items:flex-end;gap:1px}
.sales-pipeline-column-total span{color:#8491a1;font-size:9px}
.sales-pipeline-column-total strong{font-size:21px;line-height:1.15}
.sales-pipeline-column-total small{font-size:10px}
.sales-pipeline-cards{gap:10px;padding:12px}
.sales-pipeline-card{gap:9px;padding:14px;border-color:#e2e9f0;border-radius:13px;box-shadow:0 5px 15px rgba(32,50,80,.045)}
.sales-pipeline-card:hover{border-color:#cbd9e8;box-shadow:0 8px 20px rgba(32,50,80,.08);transform:translateY(-1px);transition:box-shadow .18s ease,transform .18s ease,border-color .18s ease}
.sales-pipeline-card-head .entity-name{font-size:13px}
.sales-pipeline-card-product{font-size:11px;color:#536b87}
.sales-pipeline-card-value{padding-top:5px}
.sales-pipeline-card-value strong{font-size:16px}
.sales-pipeline-card-meta{gap:10px;padding-top:9px;border-top:1px solid #edf1f5}
.sales-pipeline-card-meta dt{font-size:9px}
.sales-pipeline-card-meta dd{font-size:10px}
.sales-pipeline-stage-form{gap:8px;margin-inline:-2px;padding:10px 2px 0;border-top:1px solid #e9eef4}
.sales-pipeline-stage-form label{gap:4px;font-size:10px}
.sales-pipeline-stage-form select,.sales-pipeline-stage-form textarea{padding:8px 9px;border-radius:8px;font-size:11px}
.sales-pipeline-stage-form textarea::placeholder{color:#9aa6b4}
.sales-pipeline-stage-form .button{min-height:34px}
.sales-pipeline-card-action{margin-top:3px}
.sales-pipeline-empty{min-height:110px;display:grid;place-items:center;padding:18px 14px;line-height:1.8}
.sales-pipeline-more{padding:0 14px 14px;line-height:1.8}
.sales-pipeline-pager{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap;padding:0 12px 14px}
.sales-pipeline-pager .button{min-height:30px;padding:5px 9px;font-size:10px}
.sales-pipeline-pager-label{width:100%;margin-bottom:2px;color:#7b8796;font-size:10px;text-align:center}
.sales-pipeline-pager .is-disabled{cursor:not-allowed;opacity:.45;pointer-events:none}
.sales-pipeline-inline-error{margin:12px;border-radius:11px;line-height:1.8}
@media(max-width:980px){.sales-pipeline-overview{gap:16px}.sales-pipeline-overview-stats{min-width:45%}.sales-pipeline-board{gap:12px}}
@media(max-width:700px){.sales-pipeline-overview{align-items:stretch;flex-direction:column;gap:14px;padding:16px}.sales-pipeline-overview-copy strong{font-size:16px}.sales-pipeline-overview-stats{grid-template-columns:repeat(3,1fr);min-width:0}.sales-pipeline-overview-stats>div{padding:9px 8px}.sales-pipeline-overview-stats span{font-size:9px}.sales-pipeline-overview-stats strong{font-size:12px}.sales-pipeline-toolbar{display:grid;grid-template-columns:1fr 1fr}.sales-pipeline-toolbar .button{width:100%;justify-content:center}.sales-pipeline-board{gap:10px;padding-inline:0}.sales-pipeline-column-head{min-height:0;padding:13px}.sales-pipeline-card:hover{transform:none}}
@media(max-width:420px){.sales-pipeline-overview-stats{gap:6px}.sales-pipeline-overview-stats>div{padding-inline:6px}.sales-pipeline-overview-stats span{overflow:hidden;text-overflow:ellipsis}.sales-pipeline-overview-stats strong{font-size:11px}}
/* Human-readable performance report terms with English source labels */
.crm-report-term {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  cursor: help;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.crm-report-term::after {
  position: absolute;
  z-index: 80;
  inset-block-start: calc(100% + 7px);
  inset-inline-start: 0;
  display: block;
  width: max-content;
  max-width: min(260px, 72vw);
  padding: 6px 9px;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  background: #183f66;
  box-shadow: 0 8px 20px rgba(24, 63, 102, .18);
  color: #fff;
  content: attr(data-term-en);
  direction: ltr;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(-3px);
  transition: opacity .15s ease, transform .15s ease;
  visibility: hidden;
  white-space: normal;
}
.crm-report-term:hover::after,
.crm-report-term:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.crm-report-term:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 3px;
}
.agent-performance-guide { margin-block: 14px; }
.agent-performance-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 12px;
}
.agent-performance-guide-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e3e9f0;
  border-radius: 10px;
  background: #fbfcfe;
}
.agent-performance-guide-grid strong { color: var(--navy, #183f66); font-size: 12px; }
.agent-performance-guide-grid span:not(.crm-report-term) { color: var(--muted, #697586); font-size: 11px; line-height: 1.8; }
.agent-performance-guide-note { margin: 0; padding: 0 16px 14px; color: var(--muted, #697586); font-size: 11px; line-height: 1.8; }
@media (max-width: 900px) {
  .agent-performance-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .agent-performance-guide-grid { grid-template-columns: 1fr; padding-inline: 12px; }
  .agent-performance-guide-note { padding-inline: 12px; }
  .crm-report-term::after { inset-inline-start: auto; inset-inline-end: 0; }
}

/* Operational analytics page: focused spacing, hierarchy and responsive tables. */
.performance-analytics-page {
  display: grid;
  gap: 18px;
  max-width: 1420px;
  margin-inline: auto;
}
.performance-analytics-page > .page-header {
  align-items: center;
  min-height: 92px;
  margin: 0;
  padding: 22px 26px;
  border: 1px solid #e4e7f3;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f8ff 66%, #f1fbf7 100%);
  box-shadow: 0 8px 24px rgba(35,39,84,.045);
}
.performance-analytics-page > .page-header h2 {
  margin-bottom: 6px;
  color: #1c3150;
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -.6px;
}
.performance-analytics-page > .page-header p {
  max-width: 720px;
  line-height: 1.9;
}
.analytics-filter-panel,
.analytics-card,
.analytics-section-panel {
  border-color: #e4e8ef;
  border-radius: 16px;
  box-shadow: 0 7px 22px rgba(35,39,84,.035);
}
.analytics-filter-panel {
  margin: 0;
  background: #fff;
}
.analytics-filter-panel .filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
  padding: 18px 20px;
}
.analytics-filter-panel .filters-grid > label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #657084;
  font-size: 11px;
  font-weight: 800;
}
.analytics-filter-panel input {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border-color: #d9e0ea;
  background: #fbfcfe;
}
.analytics-filter-panel input:focus {
  border-color: #a8b6cc;
  box-shadow: 0 0 0 3px rgba(47,91,135,.09);
}
.analytics-filter-panel .filter-actions {
  align-self: end;
  flex-wrap: wrap;
  padding-bottom: 1px;
}
.analytics-filter-panel .filter-actions .button { min-height: 42px; }
.analytics-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.analytics-kpi-card {
  position: relative;
  min-height: 108px;
  padding: 16px 17px;
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(35,39,84,.035);
}
.analytics-kpi-card::before {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 16px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: #5b50e6;
  content: "";
}
.analytics-kpi-card:nth-child(2)::before { background: #2d94c6; }
.analytics-kpi-card:nth-child(3)::before { background: #d7962b; }
.analytics-kpi-card:nth-child(4)::before { background: #3caa7c; }
.analytics-kpi-card:nth-child(5)::before { background: #c76f8d; }
.analytics-kpi-card:nth-child(6)::before { background: #8d73c7; }
.analytics-kpi-card small {
  display: block;
  min-height: 32px;
  color: #758094;
  font-size: 11px;
  line-height: 1.75;
}
.analytics-kpi-card strong {
  display: block;
  margin-top: 8px;
  color: #1d3351;
  font-size: clamp(21px, 2vw, 27px);
  letter-spacing: -.6px;
}
.analytics-top-grid,
.analytics-secondary-grid,
.analytics-bottom-grid {
  align-items: stretch;
  gap: 16px;
  margin: 0;
}
.analytics-top-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr); }
.analytics-secondary-grid,
.analytics-bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-card,
.analytics-section-panel { min-width: 0; overflow: hidden; }
.analytics-panel-header {
  min-height: 72px;
  align-items: flex-start;
  padding: 17px 20px 14px;
  background: linear-gradient(180deg, #fff 0%, #fcfdff 100%);
}
.analytics-panel-header > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.analytics-panel-header h3 {
  color: #203750;
  font-size: 15px;
  line-height: 1.55;
}
.analytics-panel-header .subtext {
  color: #8993a4;
  font-size: 10px;
  line-height: 1.8;
}
.analytics-panel-header .button.small {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 11px;
  font-size: 10px;
}
.analytics-section-index {
  display: inline-grid;
  place-items: center;
  min-width: 29px;
  height: 29px;
  border: 1px solid #dce4ee;
  border-radius: 9px;
  color: #64748b;
  background: #f7f9fc;
  font-size: 10px;
  font-weight: 900;
}
.performance-analytics-page .table-card {
  margin: 0 16px 16px;
  border-color: #e9edf3;
  border-radius: 12px;
  box-shadow: none;
}
.performance-analytics-page .table-card table { min-width: 0; }
.performance-analytics-page .table-card th,
.performance-analytics-page .table-card td {
  padding: 12px 14px;
  border-bottom-color: #edf0f4;
  font-size: 11px;
  vertical-align: middle;
}
.performance-analytics-page .table-card th {
  color: #7b8798;
  background: #fafbfd;
  font-size: 10px;
  font-weight: 800;
}
.performance-analytics-page .table-card tbody tr:hover { background: #fbfcff; }
.performance-analytics-page .table-card td:first-child {
  color: #334b66;
  font-weight: 700;
}
.analytics-actions-list,
.analytics-metric-list {
  gap: 0;
  padding: 0 20px 13px;
}
.analytics-actions-list .compact-item,
.analytics-metric-list .compact-item {
  min-height: 47px;
  padding: 10px 0;
}
.analytics-actions-list .compact-item strong,
.analytics-metric-list .compact-item strong {
  min-width: 0;
  color: #405168;
  font-size: 11px;
  line-height: 1.75;
  white-space: normal;
}
.analytics-actions-list .compact-item > span,
.analytics-metric-list .compact-item > span {
  flex: 0 0 auto;
  min-width: 42px;
  padding: 4px 8px;
  border: 1px solid #e1e7ef;
  border-radius: 999px;
  color: #2b4f76;
  background: #f5f8fc;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.analytics-empty-note {
  margin: 0;
  padding: 22px 20px;
  text-align: center;
}
.analytics-section-panel { margin: 0; }
.analytics-section-panel .table-card { margin-top: 0; }

@media (max-width: 1120px) {
  .analytics-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-top-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .performance-analytics-page { gap: 14px; }
  .performance-analytics-page > .page-header {
    align-items: flex-start;
    min-height: 0;
    padding: 18px 16px;
  }
  .performance-analytics-page > .page-header h2 { font-size: 20px; }
  .analytics-filter-panel .filters-grid {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 14px;
  }
  .analytics-filter-panel .filter-actions { width: 100%; }
  .analytics-filter-panel .filter-actions .button { flex: 1 1 0; }
  .analytics-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .analytics-kpi-card { min-height: 96px; padding: 14px 13px; }
  .analytics-kpi-card::before { inset-inline: 12px; }
  .analytics-kpi-card small { min-height: 30px; font-size: 10px; }
  .analytics-kpi-card strong { margin-top: 5px; font-size: 21px; }
  .analytics-secondary-grid,
  .analytics-bottom-grid { grid-template-columns: 1fr; }
  .analytics-panel-header { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px; }
  .analytics-panel-header .button.small { align-self: flex-start; }
  .performance-analytics-page .table-card { margin-inline: 10px; }
  .performance-analytics-page .table-card:not(:has(.leads-table)) tbody { gap: 8px; padding: 9px; }
  .performance-analytics-page .table-card:not(:has(.leads-table)) tr { padding: 11px 12px; border-color: #e5eaf1; box-shadow: 0 3px 11px rgba(35,39,84,.035); }
  .performance-analytics-page .table-card:not(:has(.leads-table)) td { grid-template-columns: minmax(96px, 36%) minmax(0, 1fr); padding: 8px 0; font-size: 11px; }
  .analytics-actions-list,
  .analytics-metric-list { padding-inline: 14px; }
  .analytics-actions-list .compact-item,
  .analytics-metric-list .compact-item { min-height: 45px; }
}

/* SMS workspace operations */
.sms-page { display: grid; gap: 18px; }
.sms-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sms-overview-card { display: grid; gap: 5px; min-height: 92px; padding: 15px 16px; }
.sms-overview-card small, .sms-overview-card span { color: var(--muted); font-size: 11px; }
.sms-overview-card strong { color: var(--primary); font-size: 16px; overflow-wrap: anywhere; }
.sms-state-on { color: #147a4d !important; }
.sms-state-off { color: #a55235 !important; }
.sms-panel-actions, .sms-filter-actions, .sms-send-actions, .inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sms-connection-panel .panel-header, .sms-filter-panel .panel-header, .sms-recipient-panel .panel-header, .sms-batches-panel .panel-header, .sms-recent-panel .panel-header { gap: 14px; }
.sms-connection-copy { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 13px 16px; border-top: 1px solid var(--line); color: var(--text); }
.sms-connection-copy small { flex-basis: 100%; color: var(--muted); font-size: 11px; }
.sms-connection-dot { width: 9px; height: 9px; border-radius: 50%; background: #a9b3c0; box-shadow: 0 0 0 4px rgba(169,179,192,.15); }
.sms-connection-dot.is-on { background: #2b9a63; box-shadow: 0 0 0 4px rgba(43,154,99,.14); }
.sms-connection-dot.is-off { background: #b96a4f; box-shadow: 0 0 0 4px rgba(185,106,79,.13); }
.sms-filter-grid { display: grid; grid-template-columns: minmax(180px, 1.5fr) repeat(5, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; padding: 0 16px 16px; }
.sms-filter-grid label, .sms-message-field { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 600; min-width: 0; }
.sms-filter-grid input, .sms-filter-grid select, .sms-message-field textarea { width: 100%; box-sizing: border-box; border: 1px solid #d7e0e8; border-radius: 9px; background: #fff; padding: 9px 10px; font: inherit; font-size: 12px; color: var(--text); }
.sms-filter-grid input, .sms-filter-grid select { min-height: 38px; }
.sms-result-count, .sms-page-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.sms-table-scroll { border-top: 1px solid var(--line); }
.sms-recipient-table { min-width: 720px; }
.sms-recipient-table th:first-child, .sms-recipient-table td:first-child { width: 74px; }
.sms-recipient-table td strong, .sms-recipient-table td small { display: block; }
.sms-recipient-table td small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sms-select-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.sms-phone-cell { font-size: 12px; }
.sms-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 16px 4px; color: var(--muted); font-size: 11px; }
.sms-compose-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(220px, .75fr); gap: 14px; padding: 16px; border-top: 1px solid var(--line); }
.sms-message-field textarea { min-height: 130px; resize: vertical; line-height: 1.8; }
.sms-message-field small { color: var(--muted); font-size: 10px; font-weight: 400; }
.sms-message-field code { direction: ltr; unicode-bidi: plaintext; color: var(--primary); }
.sms-preview-card { display: grid; align-content: start; gap: 9px; min-height: 130px; padding: 13px; border: 1px solid #dfe8ef; border-radius: 10px; background: #fbfdff; }
.sms-preview-card strong { color: var(--primary); font-size: 12px; }
.sms-preview-card p { min-height: 66px; margin: 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.8; }
.sms-metrics { display: flex; gap: 7px; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.sms-metrics span { padding: 4px 7px; border-radius: 999px; background: #eef4f8; }
.sms-confirm-line { display: flex; align-items: flex-start; gap: 8px; padding: 0 16px 12px; color: #76533c; font-size: 11px; line-height: 1.8; }
.sms-confirm-line input { margin-top: 4px; }
.sms-empty-inline { padding: 26px 14px; color: var(--muted); text-align: center; }
.sms-batch-status { color: var(--muted); font-size: 11px; }
.sms-error-details summary { cursor: pointer; color: var(--muted); font-size: 10px; }
.sms-error-details span { display: block; max-width: 260px; margin-top: 4px; direction: ltr; text-align: left; color: #8a4f48; font-size: 10px; overflow-wrap: anywhere; }
.sms-notice { padding: 20px; }
.sms-notice-error { border-color: #e7c5bd; background: #fff8f6; }
@media (max-width: 1180px) {
  .sms-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sms-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sms-filter-grid label:first-child { grid-column: 1 / -1; }
  .sms-filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .sms-overview-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sms-overview-card { min-height: 76px; padding: 11px; }
  .sms-overview-card strong { font-size: 13px; }
  .sms-panel-actions { align-items: stretch; flex-direction: column; }
  .sms-panel-actions .button, .sms-panel-actions form, .sms-panel-actions form button { width: 100%; }
  .sms-filter-grid { grid-template-columns: 1fr 1fr; padding-inline: 12px; }
  .sms-filter-grid label:first-child, .sms-filter-actions { grid-column: 1 / -1; }
  .sms-compose-grid { grid-template-columns: 1fr; padding: 12px; }
  .sms-confirm-line { padding-inline: 12px; }
  .sms-recipient-panel .panel-header, .sms-batches-panel .panel-header, .sms-recent-panel .panel-header { align-items: flex-start; flex-direction: column; }
}

/* Notification alert stack: clear hierarchy, balanced rows, and a high-contrast action. */
.main-content > .content-wrap:has(.notification-alert-stack) {
  padding-block-start: 18px;
}
.notification-alert-stack {
  gap: 8px;
  max-height: min(360px, 42vh);
  margin: 0 0 20px;
  padding: 12px 14px 42px;
  border: 1px solid var(--crm-color-border, #e4e9f1);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  box-shadow: 0 7px 20px rgba(33, 47, 79, .055);
}
.notification-alert-stack.is-collapsed {
  min-height: 46px;
  max-height: 46px;
  padding: 7px 14px;
}
.notification-alert-stack-head {
  min-height: 30px;
  padding-inline: 3px;
  color: var(--crm-color-ink, #1b2740);
  font-size: 13px;
  line-height: 1.6;
}
.notification-alert-stack-head strong {
  font-weight: 800;
}
.notification-alert-dismiss {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #56647a;
  font-size: 11px;
  font-weight: 700;
}
.notification-alert-dismiss:hover {
  border-color: #dfe5ee;
  color: var(--crm-color-ink, #1b2740);
  background: #f2f5fa;
}
.notification-alert-stack .notification-alert-strip {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 11px 14px;
  border-radius: 13px;
  box-shadow: 0 2px 7px rgba(33, 47, 79, .035);
}
.notification-alert-strip.is-task {
  border-color: #ded5f3;
  background: #faf8ff;
}
.notification-alert-strip.is-warning {
  border-color: #ead6b3;
  background: #fffaf2;
}
.notification-alert-strip.is-danger {
  border-color: #edc8cd;
  background: #fff7f7;
}
.notification-alert-strip.is-info {
  border-color: #d8e3f0;
  background: #f7faff;
}
.notification-alert-icon {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(98, 87, 223, .10);
  border-radius: 11px;
}
.notification-alert-copy {
  display: grid;
  grid-template-columns: minmax(130px, .9fr) minmax(0, 2.2fr) auto;
  align-items: center;
  gap: 5px 14px;
  line-height: 1.65;
}
.notification-alert-copy strong {
  min-width: 0;
  color: var(--crm-color-ink, #1b2740);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.notification-alert-copy span {
  display: -webkit-box;
  min-width: 0;
  color: #536278;
  font-size: 12px;
  line-height: 1.75;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.notification-alert-copy time {
  color: #64748b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: plaintext;
}
.crm-ui-surface:not(.control-body) .notification-alert-stack .notification-alert-strip > .notification-alert-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #4b41c2;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #6b5fe8, #5548d2);
  box-shadow: 0 5px 13px rgba(98, 87, 223, .22);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.crm-ui-surface:not(.control-body) .notification-alert-stack .notification-alert-strip > .notification-alert-action:hover {
  border-color: #4137ae;
  color: #fff;
  background: linear-gradient(135deg, #5f54d9, #493dbc);
  box-shadow: 0 8px 17px rgba(75, 65, 194, .28);
  transform: translateY(-1px);
}
.crm-ui-surface:not(.control-body) .notification-alert-stack .notification-alert-strip > .notification-alert-action:focus-visible {
  outline: 3px solid rgba(98, 87, 223, .3);
  outline-offset: 3px;
}
.notification-alert-toggle {
  inset-inline-start: 12px;
  inset-inline-end: auto;
  bottom: 9px;
  transform: none;
  width: 30px;
  height: 28px;
  border-color: #dce3ec;
  border-radius: 8px;
  color: #4d5c72;
  box-shadow: 0 2px 5px rgba(33, 47, 79, .05);
}
.notification-alert-toggle:hover {
  border-color: #c9c5f0;
  color: #4b41c2;
  background: #f2f0ff;
}
.notification-alert-more {
  padding: 7px 12px 0;
  color: #4b41c2;
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 980px) {
  .notification-alert-stack .notification-alert-strip {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
  }
  .notification-alert-copy {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
  }
  .notification-alert-copy strong {
    grid-column: 1 / -1;
  }
}
@media (max-width: 700px) {
  .main-content > .content-wrap:has(.notification-alert-stack) {
    padding-block-start: 14px;
  }
  .notification-alert-stack {
    gap: 8px;
    max-height: min(420px, 48vh);
    margin-block-end: 16px;
    padding: 9px 9px 40px;
    border-radius: 14px;
  }
  .notification-alert-stack.is-collapsed {
    min-height: 44px;
    max-height: 44px;
    padding: 6px 10px;
  }
  .notification-alert-stack-head {
    min-height: 32px;
    padding-inline: 2px;
    font-size: 12px;
  }
  .notification-alert-stack .notification-alert-strip {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px 10px;
    min-height: 0;
    padding: 10px;
  }
  .notification-alert-icon {
    width: 34px;
    height: 34px;
  }
  .notification-alert-copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }
  .notification-alert-copy strong {
    grid-column: auto;
    font-size: 12px;
  }
  .notification-alert-copy span {
    font-size: 11px;
    -webkit-line-clamp: 2;
  }
  .notification-alert-copy time {
    display: none;
  }
  .crm-ui-surface:not(.control-body) .notification-alert-stack .notification-alert-strip > .notification-alert-action {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
  .notification-alert-toggle {
    bottom: 7px;
    inset-inline-start: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .crm-ui-surface:not(.control-body) .notification-alert-stack .notification-alert-strip > .notification-alert-action {
    transition: none;
  }
  .crm-ui-surface:not(.control-body) .notification-alert-stack .notification-alert-strip > .notification-alert-action:hover {
    transform: none;
  }
}

/* Project task editor: keep the complete editor above transformed board cards. */
body:has(.project-task-edit[open]) {
  overflow: hidden;
}
.project-task:has(.project-task-edit[open]) {
  z-index: 81;
}
.project-task.is-draggable:has(.project-task-edit[open]):hover {
  transform: none;
  cursor: default;
}
.project-task-edit[open]::before {
  z-index: 79;
  background: rgba(18, 29, 46, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.crm-ui-surface:not(.control-body) .project-task-edit-panel {
  position: fixed;
  z-index: 80;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(680px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 36px));
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  transform: translate(-50%, -50%);
  border: 1px solid #dce3ed;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}
.project-task-edit-heading {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 70px;
  padding: 14px 20px;
  border-bottom: 1px solid #e9edf3;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
}
.project-task-edit-heading > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.project-task-edit-heading strong {
  color: #1b2740;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}
.project-task-edit-heading small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-task-edit-close {
  display: inline-grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #e2e7ef;
  border-radius: 11px;
  color: #536278;
  background: #f8f9fc;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.project-task-edit-close:hover {
  border-color: #d1cdef;
  color: #493dbc;
  background: #f1efff;
}
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form {
  position: static;
  top: auto;
  left: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 18px 20px 20px;
  transform: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.project-task-edit-form::before {
  display: none;
  content: none;
}
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form label {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 7px;
  color: #45546a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form input:not([type="hidden"]),
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form select,
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #d5deea;
  border-radius: 10px;
  color: #1b2740;
  background: #fff;
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
}
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form textarea {
  min-height: 94px;
  resize: vertical;
  line-height: 1.8;
}
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form input:focus-visible,
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form select:focus-visible,
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form textarea:focus-visible {
  border-color: #958de8;
  outline: 3px solid rgba(98, 87, 223, .17);
  outline-offset: 1px;
  box-shadow: none;
}
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form .project-task-edit-description,
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form .form-field-registry-custom,
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form .form-actions {
  grid-column: 1 / -1;
}
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form .form-field-registry-custom > .form-field-registry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.project-task-edit-form .project-date-time-fields {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 8px;
}
.project-task-edit-form .field-optional {
  color: #78869b;
  font-size: 10px;
  font-weight: 500;
}
.crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form > .button[type="submit"] {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 150px;
  min-height: 44px;
  margin-block-start: 2px;
  border-radius: 11px;
  font-size: 12px;
}
.project-edit-attachments {
  gap: 8px;
  margin: 0 20px 20px;
  padding: 12px 14px;
  border-color: #dbe3ed;
  border-radius: 12px;
  background: #f8faff;
  font-size: 12px;
}
.project-edit-attachments > strong {
  color: #26364d;
  font-size: 12px;
}
.project-edit-attachment-row {
  min-height: 40px;
  padding: 5px 8px;
  border: 1px solid #e5eaf1;
  border-radius: 9px;
  background: #fff;
}
.project-edit-attachment-row > a {
  color: #315c82;
  font-size: 11px;
  line-height: 1.7;
}
@media (max-width: 700px) {
  .crm-ui-surface:not(.control-body) .project-task-edit-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 15px;
  }
  .project-task-edit-heading {
    min-height: 62px;
    padding: 11px 13px;
  }
  .project-task-edit-heading strong {
    font-size: 14px;
  }
  .project-task-edit-close {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }
  .crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 13px;
  }
  .crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form .project-task-edit-description,
  .crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form .form-field-registry-custom,
  .crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form .form-actions,
  .crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form > .button[type="submit"] {
    grid-column: auto;
  }
  .crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form .form-field-registry-custom > .form-field-registry-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .crm-ui-surface:not(.control-body) .project-task-edit-panel .project-task-edit-form > .button[type="submit"] {
    justify-self: stretch;
    width: 100%;
  }
  .project-edit-attachments {
    margin: 0 13px 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-task-edit-close {
    transition: none;
  }
}

/* Task conversation: compact card affordance and an accessible modal thread. */
.project-task-comment-row{display:flex;justify-content:flex-start;align-items:center;margin-top:-4px}
.project-task-comment-open{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:4px 8px;border:1px solid transparent;border-radius:8px;background:transparent;color:#66758a;font:inherit;font-size:11px;cursor:pointer;transition:background .16s ease,border-color .16s ease,color .16s ease}
.project-task-comment-open svg,.project-task-comment-reply svg{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.project-task-comment-open:hover{border-color:#dce7f2;background:#f4f8fc;color:#24567c}
.project-task-comment-open:focus-visible,.project-task-comment-reply:focus-visible,.project-task-comments-close:focus-visible,.project-task-comments-older:focus-visible{outline:3px solid #8dbcf1;outline-offset:2px}
.project-task-comment-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding-inline:5px;border-radius:999px;background:#edf2f7;color:#52647b;font-size:10px;font-variant-numeric:tabular-nums}
.project-task-comments-dialog{width:min(620px,calc(100vw - 28px));max-width:none;max-height:min(780px,calc(100dvh - 36px));margin:auto;padding:0;overflow:hidden;border:1px solid #dbe4ef;border-radius:16px;background:#fff;color:#243246;box-shadow:0 24px 72px rgba(21,39,62,.26)}
.project-task-comments-dialog::backdrop{background:rgba(17,31,48,.46);backdrop-filter:blur(2px)}
.project-task-comments-dialog[open]{display:flex;flex-direction:column}
.project-task-comments-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 17px;border-bottom:1px solid #e9eef4;background:linear-gradient(120deg,#fff,#f8fbff)}
.project-task-comments-heading>div{display:grid;gap:3px;min-width:0}
.project-task-comments-heading span{color:#76859a;font-size:10px}
.project-task-comments-heading strong{overflow:hidden;color:#20334b;font-size:14px;line-height:1.65;text-overflow:ellipsis;white-space:nowrap}
.project-task-comments-close{display:inline-flex;flex:0 0 32px;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid #e2e8f0;border-radius:9px;background:#fff;color:#65758a;font-size:20px;cursor:pointer}
.project-task-comments-close:hover{border-color:#f0cdd1;background:#fff7f7;color:#b43d4d}
.project-task-comments-list{display:grid;align-content:start;gap:8px;min-height:100px;max-height:min(53dvh,460px);padding:12px 16px;overflow:auto;overscroll-behavior:contain}
.project-task-comment{min-width:0;margin-inline-start:min(calc(var(--comment-depth,0) * 20px),72px);padding:10px 11px;border:1px solid #e7edf4;border-radius:11px;background:#fff}
.project-task-comment:nth-of-type(even){background:#fbfcfe}
.project-task-comment>header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.project-task-comment>header strong{min-width:0;color:#34455d;font-size:11px}
.project-task-comment>header time{flex:0 0 auto;color:#8793a3;font-size:10px;direction:rtl}
.project-task-comment>p{margin:6px 0 7px;color:#40516a;font-size:12px;line-height:1.9;white-space:normal;overflow-wrap:anywhere}
.project-task-comment-reply{display:inline-flex;align-items:center;gap:4px;padding:3px 5px;border:0;border-radius:6px;background:transparent;color:#587ca1;font:inherit;font-size:10px;cursor:pointer}
.project-task-comment-reply:hover{background:#edf5fc;color:#245a87}
.project-task-comment-reply svg{width:14px;height:14px;flex-basis:14px}
.project-task-comments-older{justify-self:center;min-height:30px;padding:5px 10px;border:1px solid #e0e8f1;border-radius:8px;background:#fff;color:#54708e;font:inherit;font-size:10px;cursor:pointer}
.project-task-comments-older:hover{background:#f5f9fd}
.project-task-comments-older:disabled{opacity:.6;cursor:wait}
.project-task-comments-empty,.project-task-comments-loading{margin:0;padding:20px 10px;color:#77859a;text-align:center;font-size:12px}
.project-task-comment-form{display:grid;gap:7px;padding:12px 16px 14px;border-top:1px solid #e9eef4;background:#fbfcfe}
.project-task-comment-form>label{color:#53647a;font-size:11px;font-weight:700}
.project-task-comment-form>textarea{box-sizing:border-box;width:100%;min-height:76px;max-height:180px;padding:9px 11px;border:1px solid #d9e2ed;border-radius:10px;background:#fff;color:#26364b;font:inherit;font-size:12px;line-height:1.8;resize:vertical}
.project-task-comment-form>textarea:focus{border-color:#8eb6df;outline:3px solid rgba(91,151,205,.14)}
.project-task-comment-form-footer{display:flex;align-items:center;justify-content:space-between;gap:10px}
.project-task-comment-form-footer small{color:#8b97a7;font-size:10px}
.project-task-comment-form-footer .button{min-height:34px;padding:6px 13px}
.project-task-comment-form-footer .button:disabled{opacity:.55;cursor:wait}
.project-task-comment-reply-context{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 8px;border:1px solid #dce9f5;border-radius:8px;background:#f2f8fd;color:#426d91;font-size:10px}
.project-task-comment-reply-context[hidden]{display:none}
.project-task-comment-reply-context button{width:24px;height:24px;border:0;border-radius:6px;background:transparent;color:#637b91;font-size:16px;cursor:pointer}
.project-task-comments-status{min-height:0;margin:0;padding:0 16px;color:#397553;font-size:10px}
.project-task-comments-status:empty{display:none}
.project-task-comments-status.is-error{padding-block:6px 10px;color:#ae3949}
@media(max-width:600px){
  .project-task-comments-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 20px);border-radius:13px}
  .project-task-comments-heading{padding:11px 12px}
  .project-task-comments-list{max-height:48dvh;padding:10px}
  .project-task-comment{margin-inline-start:min(calc(var(--comment-depth,0) * 12px),36px);padding:9px}
  .project-task-comment>header{align-items:flex-start;flex-direction:column;gap:1px}
  .project-task-comment-form{padding:10px 12px 12px}
}
@media(prefers-reduced-motion:reduce){.project-task-comment-open{transition:none}}

/* Organization chart: measured SVG connectors keep every parent/child link aligned. */
.org-chart-tree-root { position: relative; isolation: isolate; }
.org-chart-connectors { position: absolute; top: 0; left: 0; z-index: 0; display: block; max-width: none; overflow: visible; pointer-events: none; }
.org-chart-connectors path { opacity: .96; }
.org-chart-connector-trunk { stroke: #7894b2; }
.org-chart-connector-branch { filter: drop-shadow(0 1px 1px rgba(36, 70, 105, .12)); }
.org-chart-connector-anchor { stroke: #fff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.org-chart-root-drop, .org-chart-root-branches { position: relative; z-index: 1; }
.org-chart-person { z-index: 2; }
.org-chart-children { margin-top: 0; padding-top: 24px; }
.org-chart-children::before { inset-inline: 87px; background: #a9bdd3; }
.org-chart-children::after { content: ''; position: absolute; top: -26px; inset-inline-start: 50%; width: 2px; height: 26px; border-radius: 2px; background: #a9bdd3; transform: translateX(-50%); }
.org-chart-children > .org-chart-node::before { top: -24px; height: 24px; width: 2px; border-radius: 2px; background: #a9bdd3; transform: translateX(-50%); }
.org-chart-tree-root[data-org-svg-ready="1"] .org-chart-children::before,
.org-chart-tree-root[data-org-svg-ready="1"] .org-chart-children::after,
.org-chart-tree-root[data-org-svg-ready="1"] .org-chart-children > .org-chart-node::before { display: none; }
.org-chart-person:focus-visible, .org-chart-roster-card:focus-visible { outline: 3px solid rgba(57, 127, 190, .38); outline-offset: 3px; }
@media (max-width: 600px) {
  .org-chart-canvas .panel-header { align-items: flex-start; flex-direction: column; }
  .org-chart-canvas-hint { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .org-chart-person, .org-chart-roster-card, .org-chart-drop-target { transition: none; }
}
/* Workspace school registry */
/* Core layout for the school registry; keep these page-level rules explicit. */
.school-page {
  display: grid;
  gap: 16px;
  width: min(100%, 1440px);
  margin-inline: auto;
  padding: 12px 0 32px;
  color: var(--text-primary, #17233b);
}
.school-page-head,
.school-profile-head,
.school-section-head,
.school-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.school-page-head { padding: 4px 2px 8px; }
.school-page-head h1,
.school-profile-head h1 {
  margin: 5px 0;
  color: var(--text-primary, #17233b);
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  font-weight: 800;
  line-height: 1.5;
}
.school-page-head p,
.school-profile-head p,
.school-section-head p,
.school-danger-zone p {
  margin: 4px 0 0;
  color: var(--text-muted, #718096);
  font-size: .9rem;
  line-height: 1.8;
}
.school-eyebrow { color: var(--primary, #2563eb); font-size: .76rem; font-weight: 700; }
.school-toolbar {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
}
.school-filter {
  display: grid;
  grid-template-columns: minmax(210px, 2fr) repeat(4, minmax(112px, 1fr)) auto auto;
  align-items: end;
  gap: 12px;
  min-width: 0;
}
.school-filter label,
.school-table-foot label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.school-filter label > span,
.school-table-foot label > span,
.school-form label > span,
.school-attach-form label > span,
.school-attach-search label > span {
  color: var(--text-secondary, #475569);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.6;
}
.school-filter input,
.school-filter select,
.school-table-foot select,
.school-bulk-actions select,
.school-form-grid input,
.school-form-grid select,
.school-form-grid textarea,
.school-attach-search input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--text-primary, #17233b);
  font: inherit;
  line-height: 1.5;
}
.school-form-grid textarea { resize: vertical; }
.school-filter > .button,
.school-filter > a.button { min-height: 44px; white-space: nowrap; }
.school-page :is(input, select, textarea, button, a):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary, #2563eb) 35%, transparent);
  outline-offset: 2px;
}
.school-toolbar > .school-bulk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e8edf4);
  color: var(--text-muted, #64748b);
  font-size: .84rem;
}
.school-table-wrap,
.school-table-panel { min-width: 0; }
.school-table-panel { overflow: hidden; }
.school-table { width: 100%; border-collapse: collapse; }
.school-table th,
.school-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border, #e8edf4);
  text-align: right;
  vertical-align: middle;
}
.school-table th {
  background: var(--surface-soft, #f7f9fc);
  color: var(--text-muted, #64748b);
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}
.school-table td { color: var(--text-primary, #17233b); font-size: .86rem; }
.school-table tbody tr { transition: background-color .16s ease; }
.school-table tbody tr:hover { background: color-mix(in srgb, var(--primary, #2563eb) 4%, white); }
.school-table td small,
.school-name + small { display: block; margin-top: 4px; color: var(--text-muted, #718096); font-size: .76rem; }
.school-name { color: var(--text-primary, #17233b); font-weight: 750; text-decoration: none; }
.school-name:hover { color: var(--primary, #2563eb); }
.school-table-wrap [data-school-row-select],
.school-table [data-school-select-all] { width: 18px; height: 18px; accent-color: var(--primary, #2563eb); cursor: pointer; }
.school-table tbody tr:has([data-school-row-select]:checked) { background: color-mix(in srgb, var(--primary, #2563eb) 6%, white); }
.school-table-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  color: var(--text-muted, #64748b);
  font-size: .8rem;
}
.school-table-foot > span { margin-inline-start: auto; white-space: nowrap; }
.school-page .school-bulk-actions {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto minmax(170px, 1fr) auto;
  align-items: end;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface-soft, #f8fafc);
}
.school-page .school-bulk-actions > strong { align-self: center; color: var(--text-primary, #17233b); font-size: .82rem; white-space: nowrap; }
.school-status { display: inline-flex; padding: 4px 9px; border-radius: 999px; font-size: .73rem; font-weight: 700; }
.school-status--active { background: #e9f8f0; color: #087443; }
.school-status--archived { background: #f1f5f9; color: #64748b; }
.school-status--deleted { background: #fff1f2; color: #be123c; }
.school-empty { display: grid; justify-items: center; gap: 8px; min-height: 250px; padding: 40px 24px; text-align: center; }
.school-empty > span { color: var(--primary, #2563eb); font-size: 2rem; }
.school-empty h2 { margin: 8px 0 0; color: var(--text-primary, #17233b); font-size: 1.15rem; }
.school-empty p { max-width: 560px; margin: 0; color: var(--text-muted, #718096); line-height: 1.9; }
.school-back { color: var(--text-muted, #64748b); font-size: .86rem; text-decoration: none; }
.school-profile-head,
.school-info,
.school-student-panel,
.school-danger-zone { padding: 20px; }
.school-profile-head { align-items: flex-start; }
.school-profile-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.school-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.school-stats article { display: grid; gap: 7px; padding: 17px; }
.school-stats small,
.school-info-grid small { color: var(--text-muted, #718096); font-size: .78rem; }
.school-stats strong { color: var(--text-primary, #17233b); font-size: 1.35rem; }
.school-info h2,
.school-section-head h2,
.school-danger-zone h2 { margin: 0; font-size: 1rem; }
.school-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.school-info-grid > div { display: grid; gap: 6px; min-width: 0; }
.school-info-grid strong { color: var(--text-primary, #17233b); font-size: .88rem; line-height: 1.8; overflow-wrap: anywhere; }
.school-info-grid p { margin: 0; line-height: 1.9; overflow-wrap: anywhere; }
.school-form { padding: 22px; }
.school-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.school-form-grid > label { display: grid; gap: 7px; min-width: 0; }
.school-field-wide,
.school-form-grid .form-field-registry-custom { grid-column: 1 / -1; }
.school-form-grid .form-field-registry-custom .form-field-registry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.school-staff-field { min-width: 0; padding: 14px; border: 1px solid var(--border, #dbe3ef); border-radius: 12px; }
.school-staff-field legend { padding-inline: 6px; font-size: .85rem; font-weight: 750; }
.school-staff-field > p { margin: 0 0 10px; color: var(--text-muted, #718096); font-size: .78rem; }
.school-staff-field > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.school-staff-field > div > label { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px; border: 1px solid var(--border, #e2e8f0); border-radius: 9px; }
.school-staff-field > div > label span { display: grid; gap: 2px; }
.school-staff-field input { width: auto; min-height: auto; accent-color: var(--primary, #2563eb); }
.school-staff-field small { color: var(--text-muted, #718096); font-size: .72rem; line-height: 1.6; }
.school-form .form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.school-attach-search,
.school-attach-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-block: 16px; }
.school-attach-search label,
.school-attach-form label { display: grid; flex: 1; gap: 6px; min-width: min(100%, 280px); }
.school-attach-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; max-height: 340px; overflow: auto; padding: 4px; }
.school-attach-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; cursor: pointer; }
.school-attach-option:has(input:checked) { border-color: var(--primary, #2563eb); background: #eff6ff; }
.school-attach-option input { flex: 0 0 auto; margin-top: 4px; accent-color: var(--primary, #2563eb); }
.school-attach-option span { display: grid; gap: 3px; min-width: 0; }
.school-attach-option small { color: var(--text-muted, #718096); font-size: .72rem; line-height: 1.6; }
.school-muted { margin: 14px 0; color: var(--text-muted, #718096); font-size: .88rem; line-height: 1.8; }
.school-chip-list { display: flex; flex-wrap: wrap; gap: 9px; }
.school-chip-list > a { display: grid; gap: 3px; padding: 10px 13px; border: 1px solid var(--border, #e2e8f0); border-radius: 11px; color: var(--text-primary, #17233b); text-decoration: none; }
.school-chip-list small { color: var(--text-muted, #718096); }
.school-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding-top: 12px; color: var(--text-muted, #64748b); font-size: .8rem; }
.school-pagination a { padding: 7px 11px; border: 1px solid var(--border, #dbe3ef); border-radius: 8px; color: var(--text-primary, #17233b); text-decoration: none; }
.school-pagination a:hover { border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); }
.school-danger-zone { margin-top: 16px; border-color: #f4d6d6; }
.school-danger-zone > div { max-width: 75%; }
@media (max-width: 1200px) {
  .school-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .school-filter .school-search { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .school-page { gap: 12px; padding-top: 6px; }
  .school-page-head,
  .school-profile-head,
  .school-section-head,
  .school-danger-zone { align-items: stretch; flex-direction: column; gap: 12px; }
  .school-profile-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-profile-actions .button { justify-content: center; }
  .school-stats { grid-template-columns: 1fr; }
  .school-info-grid,
  .school-form-grid,
  .school-form-grid .form-field-registry-custom .form-field-registry-grid,
  .school-staff-field > div,
  .school-attach-options { grid-template-columns: 1fr; }
  .school-field-wide { grid-column: auto; }
  .school-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .school-filter .school-search { grid-column: 1 / -1; }
  .school-filter > .button,
  .school-filter > a.button { width: 100%; justify-content: center; }
  .school-table-panel .responsive-table { overflow-x: auto; }
  .school-table { min-width: 760px; }
  .school-table th,
  .school-table td { padding: 10px 9px; }
  .school-table-foot { align-items: stretch; }
  .school-table-foot > span { margin-inline-start: 0; }
  .school-page .school-bulk-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-page .school-bulk-actions > strong { grid-column: 1 / -1; }
  .school-bulk-actions .button { width: 100%; justify-content: center; }
  .school-attach-search { display: grid; grid-template-columns: 1fr auto; }
  .school-attach-search label { grid-column: 1 / -1; min-width: 0; }
  .school-attach-form > .button { width: 100%; justify-content: center; }
  .school-danger-zone > div { max-width: 100%; }
}
@media (max-width: 420px) {
  .school-toolbar,
  .school-form,
  .school-profile-head,
  .school-info,
  .school-student-panel,
  .school-danger-zone { padding: 14px; }
  .school-filter,
  .school-page .school-bulk-actions,
  .school-profile-actions { grid-template-columns: 1fr; }
  .school-filter .school-search,
  .school-page .school-bulk-actions > strong { grid-column: auto; }
}
.school-bulk-actions{display:flex;align-items:end;gap:10px;flex-wrap:wrap;width:100%;padding:12px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:var(--surface-soft,#f8fafc)}.school-bulk-actions>strong{align-self:center;margin-inline-end:auto;color:var(--text-primary,#17233b);font-size:.82rem}.school-table-foot .school-bulk-actions label{min-width:150px}.school-table-wrap [data-school-row-select],.school-table [data-school-select-all]{width:18px;height:18px;accent-color:var(--primary,#2563eb);cursor:pointer}.school-table tbody tr:has([data-school-row-select]:checked){background:color-mix(in srgb,var(--primary,#2563eb) 5%,white)}.school-filter{align-items:end}.school-filter label{flex:1 1 150px}.school-filter .school-search{flex:2 1 260px}.school-toolbar>.school-bulk{padding-top:10px;border-top:1px solid var(--border,#e8edf4)}@media(max-width:760px){.school-filter{grid-template-columns:1fr 1fr}.school-filter label{min-width:0}.school-filter .school-search{grid-column:1/-1}.school-bulk-actions{display:grid;grid-template-columns:1fr 1fr}.school-bulk-actions>strong{grid-column:1/-1;margin:0}.school-bulk-actions .button{width:100%;justify-content:center}}
 .school-attach-search{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-block:16px}.school-attach-search label{display:grid;gap:6px;flex:1;min-width:240px}.school-attach-search label>span{font-size:.78rem;font-weight:700;color:var(--text-secondary,#475569)}.school-attach-search input{min-height:42px;padding:9px 12px;border:1px solid var(--border,#dbe3ef);border-radius:10px;background:#fff;font:inherit}.school-attach-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;max-height:340px;overflow:auto;padding:4px}.school-attach-option{display:flex!important;align-items:flex-start;gap:10px;padding:10px;border:1px solid var(--border,#e2e8f0);border-radius:10px;cursor:pointer}.school-attach-option:has(input:checked){border-color:var(--primary,#2563eb);background:#eff6ff}.school-attach-option input{margin-top:4px;accent-color:var(--primary,#2563eb)}.school-attach-option span{display:grid;gap:3px}.school-attach-option small,.school-staff-field small{color:var(--text-muted,#718096);font-size:.72rem;line-height:1.6}.school-staff-field{min-width:0;padding:14px;border:1px solid var(--border,#dbe3ef);border-radius:12px}.school-staff-field legend{padding-inline:6px;font-size:.85rem;font-weight:750}.school-staff-field>p{margin:0 0 10px;color:var(--text-muted,#718096);font-size:.78rem}.school-staff-field>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.school-staff-field>div>label{display:flex;align-items:center;gap:8px;padding:9px;border:1px solid var(--border,#e2e8f0);border-radius:9px}.school-staff-field>div>label span{display:grid;gap:2px}.school-staff-field input{width:auto;min-height:auto;accent-color:var(--primary,#2563eb)}.school-pagination{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding-top:12px;color:var(--text-muted,#64748b);font-size:.8rem}.school-pagination a{padding:7px 11px;border:1px solid var(--border,#dbe3ef);border-radius:8px;color:var(--text-primary,#17233b);text-decoration:none}.school-pagination a:hover{border-color:var(--primary,#2563eb);color:var(--primary,#2563eb)}@media(max-width:760px){.school-attach-options,.school-staff-field>div{grid-template-columns:1fr}.school-attach-search{display:grid;grid-template-columns:1fr auto}.school-attach-search label{grid-column:1/-1;min-width:0}.school-attach-form>.button{width:100%;justify-content:center}}
.accounting-review-status{display:inline-flex;align-items:center;max-width:100%;padding:4px 9px;border:1px solid #e2e8f0;border-radius:999px;background:#f8fafc;color:#475569;font-size:.72rem;font-weight:700;white-space:nowrap}.accounting-review-verified{border-color:#a6f4c5;background:#ecfdf3;color:#027a48}.accounting-review-disputed{border-color:#fedf89;background:#fffaeb;color:#b54708}.accounting-review-details{margin-top:7px;min-width:180px}.accounting-review-details>summary{width:max-content;max-width:100%;cursor:pointer;color:var(--primary,#2563eb);font-size:.75rem;font-weight:700}.accounting-review-details .form-grid{margin-top:10px;padding:12px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:var(--surface-soft,#f8fafc)}.accounting-review-history{display:grid;gap:4px;margin-top:9px;padding:9px;border-inline-start:3px solid #98a2b3;background:#f8fafc;font-size:.78rem}.accounting-review-history time,.accounting-review-history p{margin:0;color:var(--text-muted,#64748b);font-size:.72rem}.accounting-timeline-panel{margin-block:14px}.accounting-timeline{display:grid;gap:0;margin:0;padding:0;list-style:none}.accounting-timeline>li{display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:start;gap:12px;padding:12px 4px;border-bottom:1px solid var(--border,#e8edf4)}.accounting-timeline>li:last-child{border-bottom:0}.accounting-timeline-marker{position:relative;display:block;width:9px;height:9px;margin-top:5px;border-radius:50%;background:#667085;box-shadow:0 0 0 4px #f2f4f7}.accounting-timeline-sale{background:#7f56d9;box-shadow:0 0 0 4px #f4f3ff}.accounting-timeline-invoice{background:#1570ef;box-shadow:0 0 0 4px #eff8ff}.accounting-timeline-receipt{background:#12b76a;box-shadow:0 0 0 4px #ecfdf3}.accounting-timeline-allocation{background:#f79009;box-shadow:0 0 0 4px #fffaeb}.accounting-timeline-body{display:grid;gap:4px;min-width:0}.accounting-timeline-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.accounting-timeline-heading a{color:var(--text-primary,#17233b);text-decoration:none}.accounting-timeline-heading a:hover{color:var(--primary,#2563eb)}.accounting-timeline-heading time,.accounting-timeline-body small{color:var(--text-muted,#64748b);font-size:.74rem;line-height:1.7}.accounting-timeline-amount{direction:ltr;white-space:nowrap;font-variant-numeric:tabular-nums}.accounting-timeline-amount.is-negative{color:#b42318}@media(max-width:640px){.accounting-timeline>li{grid-template-columns:12px minmax(0,1fr);gap:9px}.accounting-timeline-amount{grid-column:2;justify-self:start}.accounting-timeline-heading{align-items:flex-start;flex-direction:column;gap:1px}.accounting-review-details .form-grid{grid-template-columns:1fr}.accounting-review-details .form-grid>*{grid-column:1/-1}}

/* Accounting P1.1: align the receipt ledger and profile with shared CRM surfaces. */
.accounting-receipts-header{margin-block-end:14px}.accounting-receipts-header h1{margin-block:3px 5px}.accounting-receipts-header p{margin-block:0 4px}.accounting-section-kicker{display:inline-flex;align-items:center;margin-block-end:4px;color:var(--primary,#4f46e5);font-size:.72rem;font-weight:750;letter-spacing:.01em}.accounting-receipt-create{margin-block-end:14px;overflow:hidden}.accounting-receipt-create>.panel-header{align-items:center;padding:13px 16px;border-block-end:1px solid var(--border,#e7edf2)}.accounting-receipt-create>.panel-header h2,.accounting-timeline-panel>.panel-header h2{margin:0;font-size:1rem}.accounting-receipt-create>.panel-header .muted{font-size:.76rem;line-height:1.7}.accounting-receipt-create>.form-grid{padding:14px 16px 16px;gap:11px}.accounting-receipt-create .field-help{margin-block-start:1px;font-size:.7rem;line-height:1.7}.accounting-receipt-create [data-calendar-input],.accounting-receipt-filter [data-calendar-input]{font-variant-numeric:tabular-nums}.accounting-receipt-create .form-actions{margin-block-start:0}.accounting-receipt-create .form-actions .button{min-width:120px}.accounting-timeline-panel{margin-block:14px;overflow:hidden}.accounting-timeline-panel>.panel-header{align-items:center;padding:13px 16px;border-block-end:1px solid var(--border,#e7edf2)}.accounting-timeline-panel>.panel-header>div{display:grid;gap:4px}.accounting-receipt-ledger{overflow:hidden}.accounting-receipt-summary-hint{margin:7px 16px 13px;font-size:.72rem;line-height:1.8}.accounting-receipt-filter{margin:12px 16px;padding:0;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:#fbfcfe}.accounting-receipt-filter>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:48px;padding:9px 12px;cursor:pointer;list-style:none}.accounting-receipt-filter>summary::-webkit-details-marker{display:none}.accounting-receipt-filter>summary>span:first-child{display:grid;gap:2px}.accounting-receipt-filter>summary strong{color:var(--text-primary,#17233b);font-size:.8rem}.accounting-receipt-filter>summary small{color:var(--text-muted,#667085);font-size:.69rem}.accounting-receipt-filter[open]>summary{border-block-end:1px solid var(--border,#e2e8f0)}.accounting-receipt-filter .invoice-history-tools{padding:12px;grid-template-columns:minmax(180px,1.4fr) repeat(4,minmax(130px,1fr)) auto;gap:9px}.accounting-receipt-filter .invoice-filter-actions{gap:7px}.accounting-receipt-filter select,.accounting-receipt-filter input{min-height:38px}.accounting-receipt-ledger>.table-card{margin-inline:16px}.accounting-receipt-ledger>.panel-header{padding:14px 16px}.accounting-receipt-ledger .invoice-summary-grid{margin-inline:16px}.accounting-review-details[open]{min-width:min(320px,72vw)}.accounting-review-details>summary{padding:5px 0}.accounting-review-details .form-grid{grid-template-columns:minmax(0,1fr);gap:9px}.accounting-review-details .form-grid>*{grid-column:1/-1}.accounting-profile-panel{max-width:1040px}.accounting-profile-heading{padding:14px 17px}.accounting-profile-heading h2{margin:0 0 3px;font-size:1rem}.accounting-profile-panel>.panel-inner{padding:16px}.accounting-profile-context{grid-template-columns:repeat(3,minmax(0,1fr));margin-block:12px 18px}.accounting-profile-context>div{min-height:82px;align-content:center}.accounting-profile-context>div>span{color:var(--text-muted,#667085);font-size:.68rem;line-height:1.65}.accounting-profile-context>div:first-child strong{direction:ltr;text-align:right;font-variant-numeric:tabular-nums}.accounting-profile-section-title{display:flex;align-items:baseline;gap:10px;padding-block:7px;border-block-end:1px solid var(--border,#e2e8f0)}.accounting-profile-section-title strong{color:var(--text-primary,#17233b);font-size:.82rem}.accounting-profile-section-title span{color:var(--text-muted,#667085);font-size:.68rem}.accounting-profile-form{gap:12px}.accounting-profile-form input[name="timezone"]{direction:ltr;text-align:left}.accounting-profile-form .field-help{font-size:.7rem}.accounting-profile-toggle{transition:border-color .16s ease,background-color .16s ease}.accounting-profile-toggle:hover{border-color:#c7d2fe;background:#f5f6ff}.accounting-profile-form :is(input,select,textarea):focus-visible{outline:3px solid rgb(79 70 229 / 18%);outline-offset:1px;border-color:var(--primary,#4f46e5)}
@media(max-width:900px){.accounting-receipt-filter .invoice-history-tools{grid-template-columns:repeat(3,minmax(0,1fr))}.accounting-receipt-filter .invoice-history-tools label:first-child{grid-column:1/-1}.accounting-receipt-filter .invoice-filter-actions{grid-column:1/-1}}
@media(max-width:760px){.accounting-receipts-header{align-items:flex-start;gap:9px}.accounting-receipt-create>.panel-header,.accounting-timeline-panel>.panel-header{align-items:flex-start;flex-direction:column;gap:6px}.accounting-receipt-create>.form-grid{padding:12px;gap:10px}.accounting-receipt-filter{margin:10px 11px}.accounting-receipt-filter .invoice-history-tools{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}.accounting-receipt-filter .invoice-history-tools label:first-child{grid-column:1/-1}.accounting-receipt-ledger>.panel-header{padding:12px}.accounting-receipt-ledger>.invoice-summary-grid,.accounting-receipt-ledger>.table-card{margin-inline:11px}.accounting-receipt-summary-hint{margin-inline:11px}.accounting-profile-panel>.panel-inner{padding:12px}.accounting-profile-context{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.accounting-profile-form{gap:10px}.accounting-profile-section-title{align-items:flex-start;flex-direction:column;gap:2px}.accounting-profile-form .form-actions{gap:8px}.accounting-profile-form .form-actions .button{min-height:40px}}

/* Accounting P2 — linked operational credit notes and net receivable dossier. */
.invoice-summary-grid-p2{grid-template-columns:repeat(4,minmax(0,1fr))}
.invoice-summary-grid-p2 article.is-adjustment{border-color:#f1dfb5;background:linear-gradient(145deg,#fffdf7,#fff8e8)}
.invoice-summary-grid-p2 article.is-adjustment strong{color:#93600b}
.invoice-summary-grid-p2 article.is-open{border-color:#cfe7df;background:linear-gradient(145deg,#f7fcfa,#edf8f3)}
.invoice-summary-grid-p2 article.is-open strong{color:#16724c}
.invoice-document-kind{display:inline-flex;align-items:center;max-width:170px;padding:4px 8px;border:1px solid #dbe6f3;border-radius:999px;background:#f7faff;color:#475467;font-size:.67rem;font-weight:700;line-height:1.5;white-space:normal}
.invoice-document-kind.is-full-sale{border-color:#b7e4d0;background:#effaf4;color:#16724c}
.invoice-document-kind.is-legacy{border-color:#e4e7ec;background:#f8fafc;color:#667085}
.invoice-credit-note-modal{display:grid;gap:12px;max-width:760px}
.invoice-credit-note-modal>p{margin:0;padding:9px 11px;border:1px solid #dbe6f3;border-radius:10px;background:#f7faff;font-size:.76rem;line-height:1.8}
.invoice-credit-note-list{display:grid;gap:8px;max-height:min(44vh,420px);overflow:auto;padding-inline-end:2px}
.invoice-credit-note-card{display:grid;gap:7px;padding:11px 12px;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:#fff}
.invoice-credit-note-heading,.invoice-credit-note-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.invoice-credit-note-heading strong{direction:ltr;unicode-bidi:isolate;color:var(--text-primary,#17233b);font-size:.82rem}
.invoice-credit-note-meta{color:var(--text-muted,#667085);font-size:.7rem}
.invoice-credit-note-meta strong{color:var(--text-primary,#17233b);font-size:.79rem}
.invoice-credit-note-card>p{margin:0;color:var(--text-primary,#344054);font-size:.75rem;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.invoice-credit-note-actions{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap;padding-block-start:3px}
.invoice-credit-note-actions form{margin:0}
.invoice-credit-note-void-form{display:grid;grid-template-columns:minmax(180px,1fr) auto;align-items:end;gap:7px}
.invoice-credit-note-void-form label{display:grid;gap:4px;color:var(--text-muted,#667085);font-size:.68rem}
.invoice-credit-note-void-form input{min-height:34px}
.invoice-credit-note-create,.invoice-credit-note-history{padding:10px 12px;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:#fbfcfe}
.invoice-credit-note-create>summary,.invoice-credit-note-history>summary{cursor:pointer;color:var(--primary,#4f46e5);font-size:.78rem;font-weight:700}
.invoice-credit-note-create .form-grid{gap:9px;margin-block-start:10px}
.invoice-credit-note-create .field-help{font-size:.7rem;line-height:1.8}
.invoice-credit-note-history ol{display:grid;gap:7px;margin:10px 0 0;padding-inline-start:20px}
.invoice-credit-note-history li{display:grid;gap:2px;font-size:.72rem}
.invoice-credit-note-history li span,.invoice-credit-note-history li small{color:var(--text-muted,#667085);line-height:1.7}
.accounting-dossier-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:12px 16px;padding-block-end:12px;border-block-end:1px solid var(--border,#e2e8f0)}
.accounting-dossier-summary article{display:grid;align-content:center;gap:4px;min-width:0;min-height:64px;padding:9px 10px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fbfcfe}
.accounting-dossier-summary article span{color:var(--text-muted,#667085);font-size:.67rem}
.accounting-dossier-summary article strong{color:var(--text-primary,#17233b);font-size:.83rem;overflow-wrap:anywhere}
.accounting-dossier-summary .is-open{border-color:#cfe7df;background:#f4fbf7}
.accounting-dossier-summary .is-open strong{color:#16724c}
.accounting-dossier-summary>.field-help{grid-column:1/-1;margin:0;font-size:.67rem;line-height:1.8}
.accounting-timeline-credit-note{background:#c28a24;box-shadow:0 0 0 4px #fff5dd}
@media(max-width:1100px){.invoice-summary-grid-p2{grid-template-columns:repeat(4,minmax(0,1fr))}.accounting-dossier-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.invoice-summary-grid-p2{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-dossier-summary{grid-template-columns:repeat(2,minmax(0,1fr));margin:10px 11px}.accounting-dossier-summary article{min-height:59px;padding:8px}.invoice-credit-note-actions{align-items:stretch;flex-direction:column}.invoice-credit-note-actions form,.invoice-credit-note-actions .button{width:100%}.invoice-credit-note-void-form{grid-template-columns:1fr}.invoice-credit-note-create .form-actions{justify-content:flex-start}.invoice-credit-note-create .form-actions .button{width:100%}.invoice-document-kind{max-width:140px}}
@media(max-width:460px){.accounting-receipt-filter .invoice-history-tools{grid-template-columns:1fr}.accounting-receipt-filter .invoice-history-tools>*{grid-column:1/-1}.accounting-profile-context{grid-template-columns:1fr}.accounting-profile-facts>div{min-height:auto}.accounting-receipt-create .form-actions .button,.accounting-profile-form .form-actions .button{width:100%}}
.accounting-receipt-filter-error{margin:10px 12px 0;padding:8px 11px;font-size:.72rem;line-height:1.7}
.accounting-ledger-panel{display:grid;gap:12px;margin-block:12px;padding:14px}
.accounting-ledger-section-head,.accounting-ledger-lines-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.accounting-ledger-section-head h2{margin:0;font-size:1rem}
.accounting-ledger-section-head p{margin:4px 0 0;font-size:.72rem;line-height:1.8}
.accounting-ledger-filter{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.accounting-ledger-filter label{display:grid;gap:4px;min-width:150px;color:var(--text-muted,#667085);font-size:.7rem}
.accounting-ledger-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.accounting-ledger-totals>div{display:grid;gap:4px;min-width:0;padding:10px 12px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fbfcfe}
.accounting-ledger-totals small{color:var(--text-muted,#667085);font-size:.68rem}
.accounting-ledger-totals strong{font-size:.88rem;overflow-wrap:anywhere}
.accounting-ledger-account-form{align-items:end;gap:8px;padding:10px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fbfcfe}
.accounting-ledger-lines-wrap{display:grid;gap:8px;min-width:0}
.accounting-ledger-line{display:grid;grid-template-columns:minmax(170px,1.4fr) repeat(2,minmax(110px,.7fr)) minmax(150px,1fr) auto;align-items:end;gap:8px;padding:9px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fbfcfe}
.accounting-ledger-line label{display:grid;gap:4px;min-width:0;color:var(--text-muted,#667085);font-size:.68rem}
.accounting-ledger-row-note{display:block;margin-block-start:3px;font-size:.66rem;line-height:1.7}
.accounting-ledger-void-form,.accounting-ledger-reverse-form{display:grid;gap:5px;margin-block-start:6px}
.accounting-ledger-pagination{display:flex;gap:5px;flex-wrap:wrap;margin-block-start:10px}
.accounting-sale-source-search{display:grid;grid-template-columns:minmax(220px,1fr) auto;align-items:end;gap:8px;padding:11px 12px}
.accounting-sale-source-search label{display:grid;gap:5px;color:var(--text-muted,#667085);font-size:.72rem}
.accounting-sale-source-search .field-help{grid-column:1/-1;margin:0}
.accounting-ledger-events .table-wrap{max-height:560px;overflow:auto;border:1px solid var(--border,#e2e8f0);border-radius:10px}
.accounting-ledger-events table{min-width:720px}
.accounting-ledger-events td:first-child{white-space:nowrap;font-variant-numeric:tabular-nums}
.accounting-ledger-events td:last-child{max-width:420px;white-space:normal;overflow-wrap:anywhere}
.accounting-ledger-events a{color:var(--primary,#4f46e5);font-weight:700;text-decoration:none}
.accounting-ledger-events a:hover{text-decoration:underline}
@media(max-width:900px){.accounting-ledger-line{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-ledger-line>[data-ledger-remove-line]{justify-self:start}}
@media(max-width:600px){.accounting-ledger-panel{padding:10px}.accounting-ledger-totals{grid-template-columns:1fr}.accounting-ledger-filter>*{flex:1 1 100%}.accounting-ledger-filter .button{width:100%}.accounting-ledger-section-head{align-items:flex-start;flex-direction:column}.accounting-sale-source-search{grid-template-columns:1fr}.accounting-sale-source-search>*{grid-column:1/-1}.accounting-sale-source-search .button{width:100%}}
.accounting-payables-header{align-items:center}
.accounting-payables-schema-notice{max-width:100%;margin-block:14px;padding:12px 16px;border-radius:12px}
.accounting-payables-schema-notice p{margin:5px 0 0;line-height:1.8}
.accounting-payables-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-block:12px}
.accounting-payables-metrics article{display:grid;gap:5px;min-width:0;padding:12px 14px;border:1px solid var(--border,#e2e8f0);border-radius:13px;background:var(--surface,#fff);box-shadow:0 3px 14px rgba(15,23,42,.035)}
.accounting-payables-metrics article>span{color:var(--text-muted,#667085);font-size:.72rem}
.accounting-payables-metrics article>strong{font-size:1.03rem;font-variant-numeric:tabular-nums}
.accounting-payables-metrics article>small{color:var(--text-muted,#667085);font-size:.66rem;line-height:1.65}
.accounting-payables-policy{display:flex;align-items:flex-start;gap:10px;margin-block:10px 14px;padding:10px 13px;border:1px solid #dbeafe;border-radius:11px;background:#f5f9ff;color:#34445f;font-size:.72rem;line-height:1.8}
.accounting-payables-policy strong{flex:0 0 auto;color:#1d4f91}
.accounting-payables-panel{display:grid;gap:12px;margin-block:12px;padding:14px}
.accounting-payables-panel>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none}
.accounting-payables-panel>summary::-webkit-details-marker,.accounting-payables-record>summary::-webkit-details-marker{display:none}
.accounting-payables-panel>summary>span:first-child{display:grid;gap:3px}
.accounting-payables-panel>summary strong{font-size:.89rem}
.accounting-payables-panel>summary small{color:var(--text-muted,#667085);font-size:.68rem;line-height:1.7}
.accounting-payables-caret{color:var(--text-muted,#667085);font-size:1rem;transition:transform .18s ease}
.accounting-payables-panel[open]>summary .accounting-payables-caret{transform:rotate(180deg)}
.accounting-payables-form,.accounting-payables-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;gap:9px}
.accounting-payables-form label,.accounting-payables-grid label,.accounting-payables-filter label,.accounting-payables-supplier-filter label,.accounting-payables-upload label{display:grid;gap:5px;min-width:0;color:var(--text-muted,#667085);font-size:.7rem}
.accounting-payables-form input,.accounting-payables-form select,.accounting-payables-grid input,.accounting-payables-grid select,.accounting-payables-filter input,.accounting-payables-filter select,.accounting-payables-supplier-filter input,.accounting-payables-supplier-filter select,.accounting-payables-upload input{width:100%;min-width:0;min-height:38px}
.accounting-payables-form label small{font-size:.64rem;line-height:1.65}
.accounting-payables-span-2{grid-column:span 2}
.accounting-payables-check{display:flex!important;grid-auto-flow:column;grid-auto-columns:max-content 1fr;align-items:center;gap:8px!important;min-height:38px}
.accounting-payables-check input{width:16px!important;min-height:16px!important;margin:0;accent-color:var(--primary,#4f46e5)}
.accounting-payables-form-note,.accounting-payables-total-hint{grid-column:1/-1;margin:0;padding:8px 10px;border-radius:9px;background:#f8fafc;color:var(--text-muted,#667085);font-size:.67rem;line-height:1.75}
.accounting-payables-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.accounting-payables-actions .muted,.accounting-payables-actions small{font-size:.66rem}
.accounting-payables-lines-wrap{display:grid;gap:8px;margin-block:4px;padding:10px;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:#fbfcfe}
.accounting-payables-lines-head,.accounting-payables-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.accounting-payables-lines-head>div{display:grid;gap:3px}
.accounting-payables-lines-head strong{font-size:.76rem}
.accounting-payables-lines-head small,.accounting-payables-section-head p{margin:0;color:var(--text-muted,#667085);font-size:.65rem;line-height:1.7}
.accounting-payables-line{display:grid;grid-template-columns:minmax(180px,1.5fr) repeat(2,minmax(125px,.75fr)) auto;align-items:end;gap:8px;padding:8px;border:1px solid var(--border,#e2e8f0);border-radius:9px;background:#fff}
.accounting-payables-line label{display:grid;gap:4px;min-width:0;color:var(--text-muted,#667085);font-size:.65rem}
.accounting-payables-bottom-grid{margin-block-start:4px}
.accounting-payables-form.accounting-payables-create-form{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:12px;padding:14px 16px 16px}
.accounting-payables-create-form [hidden]{display:none!important}
.accounting-payables-create-step{display:grid;gap:11px;min-width:0;padding:13px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:#fff}
.accounting-payables-create-step-head{display:flex;align-items:flex-start;gap:9px}
.accounting-payables-create-step-head>span{display:grid;place-items:center;flex:0 0 27px;width:27px;height:27px;border:1px solid #d9dcff;border-radius:8px;background:#f2f1ff;color:var(--primary,#4f46e5);font-size:.72rem;font-weight:800}
.accounting-payables-create-step-head>div{display:grid;gap:2px;min-width:0}
.accounting-payables-create-step-head h3{margin:0;color:var(--text-primary,#17233b);font-size:.8rem}
.accounting-payables-create-step-head p{margin:0;color:var(--text-muted,#667085);font-size:.66rem;line-height:1.75}
.accounting-payables-create-fields{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:10px}
.accounting-payables-create-fields .accounting-payables-span-2{grid-column:1/-1}
.accounting-payables-kind-hint{min-height:1.3em;color:var(--text-muted,#667085);font-size:.62rem;line-height:1.6}
.accounting-payables-create-form input:not([type=hidden]):not([type=checkbox]):not([type=file]),.accounting-payables-create-form select{min-height:40px;border-radius:8px}
.accounting-payables-create-form [name="line_net[]"],.accounting-payables-create-form [name="line_tax[]"]{text-align:left;font-variant-numeric:tabular-nums}
.accounting-payables-create-items{padding:0;border:0;background:transparent}
.accounting-payables-create-items>.accounting-payables-create-step-head{padding-inline:2px}
.accounting-payables-lines-wrap{gap:9px;margin:0;padding:11px;border-color:#dfe5ef;background:#f8faff}
.accounting-payables-lines-head small{max-width:58ch}
.accounting-payables-line-count{color:var(--text-muted,#667085);font-size:.61rem}
.accounting-payables-line{grid-template-columns:minmax(160px,1.4fr) repeat(2,minmax(120px,.75fr)) auto;gap:9px;padding:9px}
.accounting-payables-line>[data-payables-remove-line]{min-height:36px;white-space:nowrap}
.accounting-payables-total-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:10px;border:1px solid #e0e5f0;border-radius:10px;background:#fff}
.accounting-payables-total-preview>div{display:grid;gap:3px;min-width:0;padding:7px 9px;border-radius:8px;background:#f8fafc}
.accounting-payables-total-preview>div>span{color:var(--text-muted,#667085);font-size:.62rem}
.accounting-payables-total-preview strong{overflow-wrap:anywhere;color:var(--text-primary,#17233b);font-size:.74rem;font-variant-numeric:tabular-nums}
.accounting-payables-total-preview .accounting-payables-total-grand{border:1px solid #d9dcff;background:#f4f3ff}
.accounting-payables-total-grand strong{color:var(--primary,#4338ca);font-size:.82rem}
.accounting-payables-total-preview p{grid-column:1/-1;margin:0;color:var(--text-muted,#667085);font-size:.62rem;line-height:1.65}
.accounting-payables-create-proof-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,1.2fr);align-items:center;gap:12px}
.accounting-payables-evidence-upload{display:grid;gap:5px;min-width:0;padding:10px;border:1px dashed #cbd5e1;border-radius:9px;background:#fbfcff;color:var(--text-primary,#17233b)!important}
.accounting-payables-evidence-upload>span,.accounting-payables-evidence-upload small{color:var(--text-muted,#667085);font-size:.62rem;line-height:1.6}
.accounting-payables-evidence-upload input[type=file]{min-height:36px;padding:5px;border:1px solid var(--border,#e2e8f0);border-radius:7px;background:#fff;font-size:.65rem}
.accounting-payables-evidence-upload [data-payables-file-name][data-empty]{color:var(--text-muted,#667085)}
.accounting-payables-evidence-upload [data-payables-file-name]:not([data-empty]){color:#16724e;font-weight:700;overflow-wrap:anywhere}
.accounting-payables-create-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 2px 0;border-top:1px solid var(--border,#e2e8f0)}
.accounting-payables-create-footer>div{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.accounting-payables-create-footer .muted,.accounting-payables-back-top{font-size:.65rem}
.accounting-payables-back-top{color:var(--primary,#4338ca);text-decoration:none}
.accounting-payables-back-top:hover{text-decoration:underline}
.accounting-payables-create-form [data-payables-add-line]:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:1000px){.accounting-payables-create-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-payables-create-proof-grid{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.accounting-payables-create-form{gap:9px;padding:10px}.accounting-payables-create-step{gap:9px;padding:10px}.accounting-payables-create-fields{grid-template-columns:1fr}.accounting-payables-create-fields .accounting-payables-span-2{grid-column:auto}.accounting-payables-create-proof-grid,.accounting-payables-total-preview{grid-template-columns:1fr}.accounting-payables-total-preview p{grid-column:auto}.accounting-payables-lines-head{align-items:flex-start}.accounting-payables-line-count{margin-block-start:-3px}.accounting-payables-create-footer{align-items:stretch;flex-direction:column}.accounting-payables-create-footer>div{align-items:stretch;flex-direction:column}.accounting-payables-create-footer>div>.button{width:100%}.accounting-payables-back-top{align-self:flex-start}}
.accounting-payables-section-head h2{margin:0;font-size:.92rem}
.accounting-payables-filter,.accounting-payables-supplier-filter{display:grid;grid-template-columns:minmax(220px,2fr) repeat(2,minmax(140px,1fr)) auto auto;align-items:end;gap:8px;padding:10px;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:#fbfcfe}
.accounting-payables-supplier-filter{grid-template-columns:minmax(220px,2fr) minmax(140px,1fr) auto;margin-block:10px}
.accounting-payables-record-list,.accounting-payables-supplier-list{display:grid;gap:8px}
.accounting-payables-record,.accounting-payables-supplier-list>details{overflow:hidden;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:#fff}
.accounting-payables-record>summary,.accounting-payables-supplier-list>details>summary{display:grid;grid-template-columns:minmax(150px,1.1fr) minmax(160px,1fr) auto minmax(125px,.7fr);align-items:center;gap:12px;padding:10px 12px;cursor:pointer;list-style:none}
.accounting-payables-record[open]>summary,.accounting-payables-supplier-list>details[open]>summary{border-block-end:1px solid var(--border,#e2e8f0);background:#fbfcfe}
.accounting-payables-record-title,.accounting-payables-record-meta,.accounting-payables-supplier-list>details>summary>span:first-child{display:grid;gap:3px;min-width:0}
.accounting-payables-record-title strong,.accounting-payables-supplier-list>details>summary strong{font-size:.75rem;overflow-wrap:anywhere}
.accounting-payables-record-title small,.accounting-payables-record-meta small,.accounting-payables-supplier-list>details>summary small{color:var(--text-muted,#667085);font-size:.64rem;line-height:1.7;overflow-wrap:anywhere}
.accounting-payables-record-meta b,.accounting-payables-open-balance b{font-size:.74rem;font-variant-numeric:tabular-nums}
.accounting-payables-open-balance{display:grid;gap:3px;text-align:end}
.accounting-payables-open-balance small{color:var(--text-muted,#667085);font-size:.62rem}
.accounting-payables-status{display:inline-flex;align-items:center;justify-content:center;min-height:25px;padding:3px 8px;border:1px solid #dbeafe;border-radius:999px;background:#eff6ff;color:#1d4f91;font-size:.62rem;white-space:nowrap}
.accounting-payables-status-approved{border-color:#a7f3d0;background:#ecfdf5;color:#047857}
.accounting-payables-status-pending{border-color:#fde68a;background:#fffbeb;color:#92400e}
.accounting-payables-status-rejected,.accounting-payables-status-reversed{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
.accounting-payables-status-void{border-color:#e2e8f0;background:#f8fafc;color:#64748b}
.accounting-payables-record-body{display:grid;gap:11px;padding:12px}
.accounting-payables-record-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.accounting-payables-record-facts span{display:grid;gap:4px;min-width:0;color:var(--text-muted,#667085);font-size:.63rem}
.accounting-payables-record-facts strong{color:var(--text,#172033);font-size:.68rem;line-height:1.7;overflow-wrap:anywhere}
.accounting-payables-inner-table{border:1px solid var(--border,#e2e8f0);border-radius:9px}
.accounting-payables-inner-table table{min-width:540px}
.accounting-payables-document-actions{padding-block:2px}
.accounting-payables-inline-reason{display:flex;align-items:center;gap:5px}
.accounting-payables-inline-reason input{width:145px;min-width:0;min-height:32px;font-size:.65rem}
.accounting-payables-upload{display:flex;align-items:end;gap:8px;flex-wrap:wrap;padding:9px;border:1px dashed var(--border,#cbd5e1);border-radius:9px}
.accounting-payables-upload label{width:min(100%,360px)}
.accounting-payables-upload input{min-height:34px;font-size:.65rem}
.accounting-payables-attachments{display:grid;gap:6px;padding:9px;border-radius:9px;background:#f8fafc}
.accounting-payables-attachments>strong,.accounting-payables-payment-list>strong{font-size:.72rem}
.accounting-payables-attachments>span{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.67rem}
.accounting-payables-attachments a{color:var(--primary,#4f46e5);font-weight:700}
.accounting-payables-attachments small{color:var(--text-muted,#667085)}
.accounting-payables-payment-box{padding:9px;border:1px solid var(--border,#e2e8f0);border-radius:9px;background:#fbfcfe}
.accounting-payables-payment-box>summary,.accounting-payables-timeline>summary{cursor:pointer;color:var(--primary,#4338ca);font-size:.71rem;font-weight:700}
.accounting-payables-payment-form{grid-template-columns:repeat(5,minmax(0,1fr));margin-block-start:9px}
.accounting-payables-payment-form .accounting-payables-actions{grid-column:1/-1}
.accounting-payables-payment-list{display:grid;gap:7px}
.accounting-payables-payment-list>article{display:grid;grid-template-columns:minmax(180px,1.4fr) auto minmax(160px,1fr);align-items:center;gap:10px;padding:9px;border:1px solid var(--border,#e2e8f0);border-radius:9px}
.accounting-payables-payment-list>article>div:first-child{display:grid;gap:3px;min-width:0}
.accounting-payables-payment-list>article>div:first-child b,.accounting-payables-payment-list>article>div:first-child span{font-size:.66rem;overflow-wrap:anywhere}
.accounting-payables-payment-list>article>div:first-child small{color:var(--text-muted,#667085);font-size:.62rem;line-height:1.7}
.accounting-payables-payment-list>article>.accounting-payables-actions{justify-content:flex-end}
.accounting-payables-timeline{padding:9px;border:1px solid var(--border,#e2e8f0);border-radius:9px}
.accounting-payables-timeline ol{display:grid;gap:7px;margin:10px 0 0;padding-inline-start:22px}
.accounting-payables-timeline li{padding-inline-start:4px;font-size:.67rem}
.accounting-payables-timeline li small{margin-inline-start:8px;color:var(--text-muted,#667085)}
.accounting-payables-timeline li p{margin:3px 0 0;line-height:1.7}
.accounting-payables-related{margin:0;padding:7px 9px;border-radius:8px;background:#f5f9ff;color:#1d4f91;font-size:.68rem}
.accounting-payables-create-supplier{padding:9px;border:1px dashed var(--border,#cbd5e1);border-radius:10px}
.accounting-payables-create-supplier>summary{cursor:pointer;font-size:.72rem;font-weight:700}
.accounting-payables-create-supplier>form{margin-block-start:10px}
.accounting-payables-supplier-content{display:grid;gap:6px;padding:10px;border-block-start:1px solid var(--border,#e2e8f0)}
.accounting-payables-supplier-content p{margin:0;color:var(--text-muted,#667085);font-size:.67rem;line-height:1.7}
.accounting-payables-supplier-content form{margin-block-start:6px}
.accounting-payables-pagination{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;margin-block-start:10px}
.accounting-payables-pagination>span{padding-inline:6px;color:var(--text-muted,#667085);font-size:.67rem}
.accounting-payables-thresholds{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:10px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fbfcfe}
.accounting-payables-thresholds>small{grid-column:1/-1;color:var(--text-muted,#667085);font-size:.65rem;line-height:1.75}
.accounting-payables-period-report{gap:10px}
.accounting-payables-period-totals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.accounting-payables-period-totals article{display:grid;gap:4px;min-width:0;padding:9px 11px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fbfcfe}
.accounting-payables-period-totals article>span,.accounting-payables-period-totals article>small{color:var(--text-muted,#667085);font-size:.65rem;line-height:1.65}
.accounting-payables-period-totals article>strong{font-size:.88rem;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.accounting-payables-period-report .accounting-payables-inner-table{margin-block-start:2px}
.accounting-payables-aging{gap:10px}
.accounting-payables-aging-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.accounting-payables-aging-grid article{display:grid;gap:4px;min-width:0;padding:10px 12px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fbfcfe}
.accounting-payables-aging-grid article>span,.accounting-payables-aging-grid article>small{color:var(--text-muted,#667085);font-size:.65rem;line-height:1.65}
.accounting-payables-aging-grid article>strong{font-size:.86rem;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.accounting-payables-aging-grid article:last-child{border-color:#fecaca;background:#fff7f7}
.accounting-payables-aging-grid article:last-child>strong{color:#b42318}
.accounting-payables-overdue-label{color:#b42318!important;font-weight:700}
.accounting-payables-evidence-field{grid-column:span 2}
.accounting-payables-payment-evidence{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-block-start:3px}
.accounting-payables-payment-evidence>strong{color:var(--text-muted,#667085);font-size:.62rem}
.accounting-payables-payment-evidence>a{display:inline-flex;align-items:center;gap:6px;padding:4px 7px;border:1px solid #dbeafe;border-radius:7px;background:#f5f9ff;color:var(--primary,#4338ca);font-size:.63rem;font-weight:700;text-decoration:none}
.accounting-payables-payment-evidence>a:hover{border-color:#a5b4fc;background:#eef2ff}
.accounting-payables-payment-evidence>a small{color:var(--text-muted,#667085);font-size:.58rem}
.accounting-payables-evidence-missing{color:#b54708!important;font-weight:700}
.accounting-payables-payment-evidence-form{display:flex;align-items:end;gap:6px;flex-wrap:wrap}
.accounting-payables-payment-evidence-form label{display:grid;gap:4px;color:var(--text-muted,#667085);font-size:.61rem}
.accounting-payables-payment-evidence-form input{max-width:260px;min-height:32px;font-size:.62rem}
@media(max-width:1000px){.accounting-payables-aging-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.accounting-payables-aging-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-payables-aging-grid article{padding:9px}.accounting-payables-evidence-field{grid-column:1/-1}.accounting-payables-payment-evidence-form{align-items:stretch}.accounting-payables-payment-evidence-form label{flex:1 1 100%}.accounting-payables-payment-evidence-form input{max-width:100%}}
@media(max-width:1000px){.accounting-payables-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-payables-form,.accounting-payables-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-payables-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-payables-record-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-payables-payment-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1000px){.accounting-payables-period-totals{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.accounting-payables-panel{padding:10px}.accounting-payables-metrics{gap:7px}.accounting-payables-metrics article{padding:10px}.accounting-payables-policy{display:grid;gap:3px}.accounting-payables-form,.accounting-payables-grid,.accounting-payables-filter,.accounting-payables-supplier-filter{grid-template-columns:1fr}.accounting-payables-span-2{grid-column:auto}.accounting-payables-filter .button,.accounting-payables-supplier-filter .button{width:100%}.accounting-payables-line{grid-template-columns:1fr 1fr;align-items:end}.accounting-payables-line label:first-child{grid-column:1/-1}.accounting-payables-line>[data-payables-remove-line]{justify-self:start}.accounting-payables-record>summary{grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;padding:9px}.accounting-payables-record-title{grid-column:1}.accounting-payables-record-meta{grid-column:1;grid-row:2}.accounting-payables-record>summary>.accounting-payables-status{grid-column:2;grid-row:1;justify-self:end}.accounting-payables-open-balance{grid-column:2;grid-row:2}.accounting-payables-record-facts{grid-template-columns:1fr 1fr}.accounting-payables-section-head{align-items:flex-start;flex-direction:column}.accounting-payables-panel>summary{align-items:flex-start}.accounting-payables-payment-form{grid-template-columns:1fr}.accounting-payables-payment-list>article{grid-template-columns:1fr auto}.accounting-payables-payment-list>article>.accounting-payables-actions{grid-column:1/-1;justify-content:flex-start}.accounting-payables-inline-reason{flex-wrap:wrap}.accounting-payables-inline-reason input{flex:1 1 120px}.accounting-payables-document-actions>*{max-width:100%}.accounting-payables-document-actions form{flex-wrap:wrap}.accounting-payables-attachments>span{align-items:flex-start}.accounting-payables-create-supplier>form>*{grid-column:auto}.accounting-payables-thresholds,.accounting-payables-period-totals{grid-template-columns:1fr}.accounting-payables-thresholds>small{grid-column:auto}}
.accounting-ledger-trial{gap:10px}
.accounting-ledger-trial-scope{margin:0;color:var(--text-muted,#667085);font-size:.74rem;line-height:1.8}
.accounting-ledger-trial-filter{display:grid;grid-template-columns:repeat(4,minmax(135px,1fr)) auto auto;align-items:end;gap:8px;padding:10px;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:#fbfcfe}
.accounting-ledger-trial-filter label{min-width:0}
.accounting-ledger-trial-filter input,.accounting-ledger-trial-filter select{min-width:0;min-height:38px}
.accounting-ledger-trial-filter .accounting-ledger-trial-zero{display:flex;align-items:center;gap:7px;min-height:38px;white-space:nowrap}
.accounting-ledger-trial-filter .accounting-ledger-trial-zero input{min-height:auto;margin:0;accent-color:var(--primary,#4f46e5)}
.accounting-ledger-trial-totals{grid-template-columns:repeat(3,minmax(0,1fr))}
.accounting-ledger-trial-note{margin:0;font-size:.7rem;line-height:1.8}
.accounting-ledger-trial-table-wrap{max-width:100%;overflow:auto;border:1px solid var(--border,#e2e8f0);border-radius:10px}
.accounting-ledger-trial-table{min-width:1080px}
.accounting-ledger-trial-table thead tr:first-child th{text-align:center;background:#f5f7ff;color:var(--text-primary,#17233b)}
.accounting-ledger-trial-table thead tr:nth-child(2) th{background:#fafbff;font-size:.7rem}
.accounting-ledger-trial-table tbody td:nth-child(n+3){white-space:nowrap;font-variant-numeric:tabular-nums}
.accounting-ledger-trial-table tbody td:nth-child(7),.accounting-ledger-trial-table tbody td:nth-child(8){background:#fbfcff;font-weight:700}
.accounting-ledger-trial-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;color:var(--text-muted,#667085);font-size:.7rem}
.accounting-ledger-trial-foot .accounting-ledger-pagination{align-items:center;margin:0}
.accounting-ledger-trial-page-state{padding-inline:5px;color:var(--text-primary,#17233b);font-weight:700;white-space:nowrap}
@media(max-width:1050px){.accounting-ledger-trial-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-ledger-trial-filter .accounting-ledger-trial-zero{justify-content:flex-start}}
@media(max-width:600px){.accounting-ledger-trial-filter{grid-template-columns:1fr}.accounting-ledger-trial-filter>*{width:100%}.accounting-ledger-trial-filter .button{width:100%}.accounting-ledger-trial-totals{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-ledger-trial-foot{align-items:stretch;flex-direction:column}.accounting-ledger-trial-foot .accounting-ledger-pagination{justify-content:space-between}.accounting-ledger-trial .accounting-ledger-section-head>div{min-width:0}}
@media(max-width:380px){.accounting-ledger-trial-totals{grid-template-columns:1fr}}

/* Payables work queues: compact navigation, actionable counts, and complete history filters. */
.accounting-payables-worknav{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-block:8px 12px;padding:7px 9px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fff}
.accounting-payables-worknav a{display:inline-flex;align-items:center;min-height:32px;padding:5px 9px;border-radius:7px;color:var(--text-muted,#667085);font-size:.66rem;font-weight:700;text-decoration:none;transition:background-color .16s ease,color .16s ease}
.accounting-payables-worknav a:hover,.accounting-payables-worknav a:focus-visible{background:#f2f1ff;color:var(--primary,#4338ca);outline:none}
.accounting-payables-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
.accounting-payables-metrics-limited{grid-template-columns:repeat(4,minmax(0,1fr))}
.accounting-payables-metrics>a{display:grid;align-content:start;gap:5px;min-width:0;padding:12px 14px;border:1px solid var(--border,#e2e8f0);border-radius:13px;background:var(--surface,#fff);box-shadow:0 3px 14px rgba(15,23,42,.035);color:inherit;text-decoration:none;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.accounting-payables-metrics>a:hover{transform:translateY(-1px);border-color:#b9b7ff;box-shadow:0 7px 20px rgba(79,70,229,.09)}
.accounting-payables-metrics>a:focus-visible{outline:3px solid rgba(79,70,229,.25);outline-offset:2px}
.accounting-payables-metrics>a>span{color:var(--text-muted,#667085);font-size:.72rem}
.accounting-payables-metrics>a>strong{font-size:1.03rem;font-variant-numeric:tabular-nums}
.accounting-payables-metrics>a>small{color:var(--text-muted,#667085);font-size:.66rem;line-height:1.65}
.accounting-payables-queue-tabs{display:flex;gap:6px;overflow-x:auto;margin-block:8px;padding:2px 1px 5px;scrollbar-width:thin}
.accounting-payables-queue-tabs a{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:6px 10px;border:1px solid var(--border,#e2e8f0);border-radius:999px;background:#fff;color:var(--text-muted,#667085);font-size:.65rem;font-weight:700;text-decoration:none;white-space:nowrap}
.accounting-payables-queue-tabs a:hover,.accounting-payables-queue-tabs a:focus-visible{border-color:#b9b7ff;color:var(--primary,#4338ca);outline:none}
.accounting-payables-queue-tabs a[aria-current=page]{border-color:#c7c4ff;background:#f3f2ff;color:var(--primary,#4338ca)}
.accounting-payables-queue-tabs b{display:inline-grid;place-items:center;min-width:20px;height:20px;padding-inline:4px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:.6rem;font-variant-numeric:tabular-nums}
.accounting-payables-filter{grid-template-columns:minmax(210px,2fr) repeat(5,minmax(120px,1fr));align-items:end}
.accounting-payables-filter .accounting-payables-all-dates{display:grid;grid-template-columns:18px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:2px 8px;min-height:40px;padding:5px 8px;border:1px solid var(--border,#e2e8f0);border-radius:8px;background:#fff;color:var(--text-primary,#17233b);font-size:.65rem}
.accounting-payables-filter .accounting-payables-all-dates input{grid-row:1/3;width:16px;min-height:16px;margin:0;accent-color:var(--primary,#4f46e5)}
.accounting-payables-filter .accounting-payables-all-dates span{font-weight:700}
.accounting-payables-filter .accounting-payables-all-dates small{color:var(--text-muted,#667085);font-size:.57rem;line-height:1.5}
@media(max-width:1200px){.accounting-payables-metrics,.accounting-payables-metrics-limited{grid-template-columns:repeat(3,minmax(0,1fr))}.accounting-payables-filter{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1000px){.accounting-payables-metrics,.accounting-payables-metrics-limited{grid-template-columns:repeat(3,minmax(0,1fr))}.accounting-payables-filter{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.accounting-payables-worknav{gap:4px;padding:6px}.accounting-payables-worknav a{padding-inline:7px;font-size:.62rem}.accounting-payables-metrics,.accounting-payables-metrics-limited{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-payables-metrics>a{padding:10px}.accounting-payables-queue-tabs{margin-inline:-2px}.accounting-payables-filter{grid-template-columns:1fr}.accounting-payables-filter .accounting-payables-all-dates{grid-template-columns:18px minmax(0,1fr)}}
.accounting-payables-empty-filter{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}

/* P5 bank/cash reconciliation: consistent accounting surfaces, compact and RTL-safe. */
.accounting-bank-worknav{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-block:8px 12px;padding:7px 9px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fff}
.accounting-bank-worknav a{display:inline-flex;align-items:center;min-height:32px;padding:5px 9px;border-radius:7px;color:var(--text-muted,#667085);font-size:.66rem;font-weight:700;text-decoration:none;transition:background-color .16s ease,color .16s ease}
.accounting-bank-worknav a:hover,.accounting-bank-worknav a:focus-visible{background:#f2f1ff;color:var(--primary,#4338ca);outline:none}
.accounting-bank-worknav a:focus-visible,.accounting-bank-queue-tabs a:focus-visible{outline:3px solid rgba(79,70,229,.25);outline-offset:2px}
.accounting-bank-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-block:10px}
.accounting-bank-metrics article,.accounting-bank-import-stats article{display:grid;gap:4px;min-width:0;padding:11px 13px;border:1px solid var(--border,#e2e8f0);border-radius:12px;background:var(--surface,#fff)}
.accounting-bank-metrics article span,.accounting-bank-import-stats article span{color:var(--text-muted,#667085);font-size:.68rem}
.accounting-bank-metrics article strong,.accounting-bank-import-stats article strong{font-size:1rem;font-variant-numeric:tabular-nums}
.accounting-bank-panel{margin-block:10px;padding:clamp(12px,1.5vw,18px)}
.accounting-bank-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-block-end:12px}
.accounting-bank-section-head h2{margin:0;font-size:.96rem}
.accounting-bank-section-head p{margin:4px 0 0;color:var(--text-muted,#667085);font-size:.7rem;line-height:1.8}
.accounting-bank-account-form,.accounting-bank-import-form{display:grid;grid-template-columns:minmax(150px,1fr) minmax(130px,.75fr) minmax(200px,1.25fr) auto;align-items:end;gap:9px;padding:11px;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:#fafbff}
.accounting-bank-import-form{grid-template-columns:minmax(190px,.8fr) minmax(220px,1fr) auto;margin-block:10px}
.accounting-bank-account-form label,.accounting-bank-import-form label,.accounting-bank-match-form label{display:grid;gap:5px;min-width:0;color:var(--text-primary,#17233b);font-size:.68rem;font-weight:700}
.accounting-bank-account-form input,.accounting-bank-account-form select,.accounting-bank-import-form input,.accounting-bank-import-form select,.accounting-bank-match-form select,.accounting-bank-reason-form input,.accounting-bank-reason-form select{min-width:0;min-height:36px;padding:7px 9px;border:1px solid var(--border,#d7dfed);border-radius:8px;background:#fff;color:var(--text-primary,#17233b);font:inherit}
.accounting-bank-account-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-block-start:10px}
.accounting-bank-account-list>article{display:flex;align-items:center;justify-content:space-between;gap:9px;min-width:0;padding:9px 11px;border:1px solid var(--border,#e2e8f0);border-radius:10px;background:#fff}
.accounting-bank-account-list>article>div{display:grid;gap:3px;min-width:0}
.accounting-bank-account-list>article small,.accounting-bank-import-detail small,.accounting-bank-lines-table td small{display:block;color:var(--text-muted,#667085);font-size:.62rem;line-height:1.7;overflow-wrap:anywhere}
.accounting-bank-badge{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:3px 8px;border:1px solid #dbe3f0;border-radius:999px;background:#f8fafc;color:#475569;font-size:.62rem;font-weight:750;white-space:nowrap}
.accounting-bank-badge.is-active,.accounting-bank-badge.is-matched,.accounting-bank-badge.is-imported{border-color:#a7e2c2;background:#effbf4;color:#137547}
.accounting-bank-badge.is-preview,.accounting-bank-badge.is-unmatched{border-color:#fde0a4;background:#fff9e9;color:#9a5b00}
.accounting-bank-badge.is-pending_review{border-color:#f4c77f;background:#fff4dd;color:#8a4b00}
.accounting-bank-badge.is-partially_matched{border-color:#a9c9f4;background:#eef6ff;color:#245b9a}
.accounting-bank-badge.is-ignored,.accounting-bank-badge.is-cancelled,.accounting-bank-badge.is-muted{border-color:#e2e8f0;background:#f5f7fa;color:#64748b}
.accounting-bank-csv-guide{display:grid;gap:4px;margin-block:8px;padding:9px 11px;border-inline-start:3px solid #818cf8;border-radius:8px;background:#f7f7ff;color:var(--text-muted,#667085);font-size:.66rem;line-height:1.8}
.accounting-bank-csv-guide code{width:fit-content;max-width:100%;padding:3px 6px;border-radius:5px;background:#fff;color:#344054;font-size:.62rem;direction:ltr;overflow-wrap:anywhere}
.accounting-bank-import-detail{margin-block-start:12px;padding:12px;border:1px solid #cbd5e1;border-radius:12px;background:#fff}
.accounting-bank-import-detail>header{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-block-end:9px;border-block-end:1px solid #edf0f5}
.accounting-bank-import-detail>header>div{display:grid;gap:3px;flex:1;min-width:180px}
.accounting-bank-import-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-block:10px}
.accounting-bank-import-stats article{padding:8px 10px;border-radius:9px}
.accounting-bank-import-stats article strong{font-size:.86rem}
.accounting-bank-balance-check{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:6px 12px;margin-block:9px;padding:10px 12px;border:1px solid #c7d2fe;border-radius:10px;background:#f7f7ff;font-size:.68rem}
.accounting-bank-balance-check>strong,.accounting-bank-balance-check>small{grid-column:1/-1}
.accounting-bank-balance-check>strong{font-size:.76rem}
.accounting-bank-balance-check>small,.accounting-bank-balance-note{color:var(--text-muted,#667085);font-size:.62rem;line-height:1.8}
.accounting-bank-queue-tabs{display:flex;gap:6px;overflow-x:auto;margin-block:9px 5px;padding:2px 1px 5px;scrollbar-width:thin}
.accounting-bank-queue-tabs a{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;padding:5px 9px;border:1px solid var(--border,#e2e8f0);border-radius:999px;background:#fff;color:var(--text-muted,#667085);font-size:.63rem;font-weight:700;text-decoration:none;white-space:nowrap}
.accounting-bank-queue-tabs a[aria-current=page]{border-color:#c7c4ff;background:#f3f2ff;color:var(--primary,#4338ca)}
.accounting-bank-queue-tabs b{display:inline-grid;place-items:center;min-width:19px;height:19px;padding-inline:4px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:.58rem;font-variant-numeric:tabular-nums}
.accounting-bank-lines-table{max-width:100%;overflow:auto}
.accounting-bank-lines-table table{min-width:980px}
.accounting-bank-lines-table td{vertical-align:top}
.accounting-bank-inflow{color:#15803d}.accounting-bank-outflow{color:#b45309}
.accounting-bank-duplicate{color:#b45309!important;font-weight:700}
.accounting-bank-near-candidates{margin-block:5px;color:#8a5a00;font-size:.62rem}
.accounting-bank-near-candidates summary{cursor:pointer;font-weight:700}
.accounting-bank-near-candidates ul{margin:5px 0;padding-inline-start:20px;line-height:1.8}
.accounting-bank-audit-details{margin-block-start:10px;padding-block-start:8px;border-block-start:1px solid #edf0f5}
.accounting-bank-audit-details>summary{cursor:pointer;color:var(--primary,#4338ca);font-size:.68rem;font-weight:750}
.accounting-bank-audit-details ol{display:grid;gap:7px;margin-block:8px;padding-inline-start:22px}
.accounting-bank-audit-details li{padding:7px 9px;border:1px solid var(--border,#e2e8f0);border-radius:8px;background:#fafbff;font-size:.64rem;line-height:1.75}
.accounting-bank-audit-details li>div{display:grid;gap:2px}
.accounting-bank-audit-details li p{margin:4px 0;color:#475569}
.accounting-bank-match-form,.accounting-bank-reason-form{display:flex;align-items:end;gap:5px;flex-wrap:wrap;margin-block:4px}
.accounting-bank-match-form label{flex:1;min-width:190px}
.accounting-bank-reason-form input{flex:1;min-width:150px}
.accounting-bank-reason-form select{min-width:115px;font-size:.62rem}
.accounting-bank-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-block-start:10px}
.accounting-bank-pagination{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-block:10px;color:var(--text-muted,#667085);font-size:.68rem}
.accounting-bank-policy{display:flex;gap:8px;align-items:flex-start;margin-block:10px;padding:9px 11px;border:1px solid #dbe3f0;border-radius:9px;background:#f8fafc;font-size:.66rem;line-height:1.8}
.accounting-bank-policy strong{white-space:nowrap}
@media(max-width:1100px){.accounting-bank-import-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.accounting-bank-account-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.accounting-bank-metrics{grid-template-columns:1fr}.accounting-bank-account-list{grid-template-columns:1fr}.accounting-bank-import-form{grid-template-columns:1fr}.accounting-bank-import-form>.button{width:100%}.accounting-bank-balance-check{grid-template-columns:1fr}.accounting-bank-balance-check>strong,.accounting-bank-balance-check>small{grid-column:auto}}
@media(max-width:480px){.accounting-bank-account-form{grid-template-columns:1fr}.accounting-bank-import-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-bank-section-head{align-items:flex-start;flex-direction:column}.accounting-bank-import-detail{padding:9px}.accounting-bank-import-detail>header{align-items:flex-start;flex-direction:column}}

/* P5.1 statement periods: compact workflow, explicit close readiness and responsive review. */
.accounting-bank-period-form{display:grid;grid-template-columns:repeat(6,minmax(125px,1fr));align-items:end;gap:8px;margin-block:8px 12px;padding:10px;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:#fafbff}
.accounting-bank-period-form label{display:grid;gap:5px;min-width:0;color:var(--text-primary,#17233b);font-size:.66rem;font-weight:700}
.accounting-bank-period-form label>span{color:var(--text-muted,#667085);font-weight:500}
.accounting-bank-period-form input,.accounting-bank-period-form select{width:100%;min-width:0;min-height:36px;padding:7px 9px;border:1px solid var(--border,#d7dfed);border-radius:8px;background:#fff;color:var(--text-primary,#17233b);font:inherit}
.accounting-bank-period-form input:focus,.accounting-bank-period-form select:focus{border-color:#8075e8;outline:3px solid #6b5ce71f}
.accounting-bank-period-form>.button{min-height:36px;white-space:nowrap}
.accounting-bank-period-form.is-edit{grid-template-columns:repeat(5,minmax(135px,1fr)) auto;margin-block:12px 6px}
.accounting-bank-period-list{margin-block:10px}
.accounting-bank-period-detail{margin-block-start:12px;padding:13px;border:1px solid #cbd5e1;border-radius:12px;background:linear-gradient(180deg,#fff,#fcfcff)}
.accounting-bank-period-detail>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-block-end:9px;border-block-end:1px solid #edf0f5}
.accounting-bank-period-detail>header>div{display:grid;gap:3px;min-width:0}
.accounting-bank-period-detail>header small{color:var(--text-muted,#667085);font-size:.63rem}
.accounting-bank-period-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-block:10px}
.accounting-bank-period-metrics article{display:grid;gap:4px;min-width:0;padding:9px 10px;border:1px solid var(--border,#e2e8f0);border-radius:9px;background:#fff}
.accounting-bank-period-metrics article span{color:var(--text-muted,#667085);font-size:.62rem}
.accounting-bank-period-metrics article strong{font-size:.78rem;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.accounting-bank-period-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0;padding:0;list-style:none}
.accounting-bank-period-checks li{display:flex;align-items:flex-start;gap:7px;padding:7px 9px;border:1px solid #e2e8f0;border-radius:8px;background:#fafbff;color:#475569;font-size:.64rem;line-height:1.7}
.accounting-bank-period-checks li>span{display:grid;place-items:center;flex:0 0 18px;height:18px;border-radius:50%;font-size:.62rem;font-weight:800}
.accounting-bank-period-checks li.is-ready{border-color:#b7e4ca;background:#f1fbf5;color:#176b45}
.accounting-bank-period-checks li.is-ready>span{background:#d7f3e2;color:#137547}
.accounting-bank-period-checks li.is-pending{border-color:#f5dfb2;background:#fffaf0;color:#8a5a00}
.accounting-bank-period-checks li.is-pending>span{background:#ffedc2;color:#8a5a00}
.accounting-bank-period-files{display:grid;gap:6px;margin-block:10px}
.accounting-bank-period-files>a{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;align-items:center;padding:8px 10px;border:1px solid var(--border,#e2e8f0);border-radius:8px;background:#fff;color:var(--text-primary,#17233b);font-size:.66rem;text-decoration:none}
.accounting-bank-period-files>a:hover,.accounting-bank-period-files>a:focus-visible{border-color:#b5b0f2;background:#f8f7ff;outline:none}
.accounting-bank-period-files>a small{grid-column:1;color:var(--text-muted,#667085);font-size:.59rem}
.accounting-bank-period-files>a .accounting-bank-badge{grid-column:2;grid-row:1/3}
.accounting-bank-cancel-period{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.accounting-bank-cancel-period input{min-height:34px;min-width:180px;padding:6px 9px;border:1px solid var(--border,#d7dfed);border-radius:8px;font:inherit;font-size:.65rem}
.accounting-bank-period-detail button:disabled{cursor:not-allowed;opacity:.52;box-shadow:none}
.accounting-bank-legacy-link{margin-block:10px;padding:9px 10px;border:1px dashed #c7c4ff;border-radius:9px;background:#fafaff}
.accounting-bank-legacy-link>summary{cursor:pointer;color:var(--primary,#4338ca);font-size:.68rem;font-weight:750}
.accounting-bank-legacy-link>p{margin:5px 0;color:var(--text-muted,#667085);font-size:.62rem;line-height:1.8}
.accounting-bank-legacy-link .accounting-bank-period-files>div{display:flex;align-items:center;gap:8px;min-width:0}
.accounting-bank-legacy-link .accounting-bank-period-files>div>a{flex:1;min-width:0}
@media(max-width:1100px){.accounting-bank-period-form{grid-template-columns:repeat(3,minmax(0,1fr))}.accounting-bank-period-form.is-edit{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.accounting-bank-period-form,.accounting-bank-period-form.is-edit{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-bank-period-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-bank-period-checks{grid-template-columns:1fr}}
@media(max-width:480px){.accounting-bank-period-form,.accounting-bank-period-form.is-edit{grid-template-columns:1fr}.accounting-bank-period-detail{padding:9px}.accounting-bank-period-detail>header{align-items:flex-start;flex-direction:column}.accounting-bank-period-metrics{grid-template-columns:1fr 1fr}.accounting-bank-period-files>a{grid-template-columns:minmax(0,1fr) auto}.accounting-bank-legacy-link .accounting-bank-period-files>div{align-items:stretch;flex-direction:column}.accounting-bank-legacy-link .accounting-bank-period-files>div>.button{width:100%}}

/* P5.2 grouped and partial reconciliation desk */
.accounting-bank-p2-panel{display:grid;gap:16px}
.accounting-bank-p2-settings,.accounting-bank-p2-search,.accounting-bank-p2-fee-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end;padding:12px;border:1px solid var(--border-color,#dbe4f0);border-radius:14px;background:var(--surface-subtle,#f8fafc)}
.accounting-bank-p2-settings label,.accounting-bank-p2-search label,.accounting-bank-p2-fee-form label{display:grid;gap:6px;min-width:0;color:var(--text-secondary,#52627a);font-size:.82rem;font-weight:700}
.accounting-bank-p2-settings input,.accounting-bank-p2-search input,.accounting-bank-p2-fee-form select{width:100%;min-width:0;min-height:40px}
.accounting-bank-p2-settings small,.accounting-bank-p2-fee-form small{grid-column:1/-1;color:var(--text-muted,#68778d);line-height:1.8}
.accounting-bank-p2-search{grid-template-columns:repeat(3,minmax(0,1fr)) auto}
.accounting-bank-p2-builder{display:grid;gap:12px}
.accounting-bank-p2-help{margin:0;padding:10px 12px;border-inline-start:3px solid var(--primary,#5b4bdb);border-radius:8px;background:var(--surface-subtle,#f8fafc);line-height:1.8}
.accounting-bank-p2-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.accounting-bank-p2-columns>section{min-width:0;border:1px solid var(--border-color,#dbe4f0);border-radius:12px;overflow:hidden}
.accounting-bank-p2-columns h3,.accounting-bank-p2-group-list>h3{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;padding:10px 12px;border-bottom:1px solid var(--border-color,#dbe4f0);font-size:.95rem}
.accounting-bank-p2-columns h3 span{color:var(--text-muted,#68778d);font-size:.8rem}
.accounting-bank-p2-candidates{display:grid;gap:7px;max-height:360px;overflow:auto;padding:9px}
.accounting-bank-p2-option{display:grid;grid-template-columns:minmax(0,1fr) minmax(115px,auto) 125px;gap:8px;align-items:center;padding:9px;border:1px solid var(--border-color,#e2e8f0);border-radius:10px;background:var(--surface,#fff);cursor:pointer;transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease}
.accounting-bank-p2-option:hover{border-color:var(--primary,#5b4bdb);background:var(--primary-soft,#f5f3ff);box-shadow:0 4px 14px rgba(30,41,59,.07)}
.accounting-bank-p2-option:focus-within{outline:3px solid color-mix(in srgb,var(--primary,#5b4bdb) 25%,transparent);outline-offset:1px}
.accounting-bank-p2-option>span{display:grid;grid-template-columns:auto 1fr;gap:4px 8px;align-items:center;min-width:0}
.accounting-bank-p2-option>span input{grid-row:1/3;width:18px;height:18px;accent-color:var(--primary,#5b4bdb)}
.accounting-bank-p2-option bdi{font-size:.8rem;font-weight:700}
.accounting-bank-p2-option small{overflow:hidden;color:var(--text-muted,#68778d);text-overflow:ellipsis;white-space:nowrap}
.accounting-bank-p2-option strong{color:var(--text-secondary,#52627a);font-size:.75rem;line-height:1.6}
.accounting-bank-p2-option input[type=number]{width:100%;min-width:0;min-height:36px;direction:ltr;text-align:left}
.accounting-bank-p2-receipts{border:1px solid var(--border-color,#dbe4f0);border-radius:12px;padding:10px}
.accounting-bank-p2-receipts summary{cursor:pointer;font-weight:700}
.accounting-bank-p2-receipts>small{display:block;margin:8px 2px 0;color:var(--text-muted,#68778d)}
.accounting-bank-p2-total{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:11px 13px;border:1px solid var(--border-color,#dbe4f0);border-radius:11px;background:var(--surface-subtle,#f8fafc)}
.accounting-bank-p2-total span,.accounting-bank-p2-total strong{display:flex;gap:7px;align-items:center}
.accounting-bank-p2-total b,.accounting-bank-p2-total strong{direction:ltr;font-variant-numeric:tabular-nums}
.accounting-bank-p2-total [data-match-difference][data-balanced=true]{color:var(--success,#14804a)}
.accounting-bank-p2-total [data-match-difference][data-balanced=false]{color:var(--danger,#b42318)}
.accounting-bank-p2-fee-form{grid-template-columns:repeat(3,minmax(0,1fr)) auto;border-style:dashed}
.accounting-bank-p2-fee-form small{grid-column:1/-1}
.accounting-bank-p2-group-list{display:grid;gap:8px}
.accounting-bank-p2-group-list article{display:grid;gap:6px;padding:11px 12px;border:1px solid var(--border-color,#dbe4f0);border-radius:11px}
.accounting-bank-p2-group-list article header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.accounting-bank-p2-group-list article p{margin:0;color:var(--text-secondary,#52627a);font-variant-numeric:tabular-nums}
.accounting-bank-p2-group-list article small{color:var(--text-muted,#68778d)}
.accounting-bank-p2-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.accounting-bank-p2-actions form,.accounting-bank-p2-reverse{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.accounting-bank-p2-actions input,.accounting-bank-p2-reverse input{flex:1 1 180px;min-width:0;min-height:36px}
@media(max-width:980px){.accounting-bank-p2-search,.accounting-bank-p2-fee-form{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-bank-p2-columns{grid-template-columns:1fr}}
@media(max-width:620px){.accounting-bank-p2-settings,.accounting-bank-p2-search,.accounting-bank-p2-fee-form{grid-template-columns:1fr}.accounting-bank-p2-option{grid-template-columns:minmax(0,1fr) 105px}.accounting-bank-p2-option input[type=number]{grid-column:1/-1}.accounting-bank-p2-actions{grid-template-columns:1fr}.accounting-bank-p2-total{align-items:flex-start;flex-direction:column}}
.accounting-bank-p2-advanced-search{grid-column:1/-1;min-width:0;border:1px solid var(--border-color,#dbe4f0);border-radius:10px;background:var(--surface,#fff)}
.accounting-bank-p2-advanced-search>summary{padding:8px 11px;color:var(--text-secondary,#52627a);font-size:.8rem;font-weight:700;cursor:pointer}
.accounting-bank-p2-advanced-search>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:0 10px 10px}
.accounting-bank-p2-advanced-search label{display:grid;gap:5px;min-width:0;color:var(--text-secondary,#52627a);font-size:.78rem;font-weight:700}
.accounting-bank-p2-advanced-search input{width:100%;min-width:0;min-height:36px}
.accounting-bank-p2-members{padding-top:4px;border-top:1px solid var(--border-color,#e6ebf2)}
.accounting-bank-p2-members>summary{width:max-content;max-width:100%;padding:5px 0;color:var(--primary,#5145cd);font-size:.8rem;font-weight:700;cursor:pointer}
.accounting-bank-p2-members ul{display:grid;gap:6px;max-height:260px;margin:6px 0 0;padding-inline-start:22px;overflow:auto}
.accounting-bank-p2-members li{padding:7px 9px;border:1px solid var(--border-color,#e6ebf2);border-radius:8px;background:var(--surface-subtle,#f8fafc);font-size:.8rem;line-height:1.8;overflow-wrap:anywhere}
.accounting-bank-p3-mapping{grid-column:1/-1;min-width:0;padding:9px 11px;border:1px solid #dfe5f1;border-radius:10px;background:#fff}
.accounting-bank-p3-mapping>summary{color:var(--primary,#5145cd);font-size:.68rem;font-weight:750;cursor:pointer}
.accounting-bank-p3-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-block:9px}
.accounting-bank-p3-grid label{display:grid;gap:4px;min-width:0;color:var(--text-muted,#667085);font-size:.62rem;font-weight:700}
.accounting-bank-p3-grid input,.accounting-bank-p3-grid select{width:100%;min-width:0;min-height:34px;padding:6px 8px;border:1px solid var(--border,#d7dfed);border-radius:7px;background:#fff;color:var(--text-primary,#17233b);font:inherit}
.accounting-bank-p3-grid select:disabled{background:#f4f6fa;color:#667085}
.accounting-bank-p3-help{display:block;color:var(--text-muted,#667085);font-size:.62rem;line-height:1.8}
.accounting-bank-p3-suggestion{color:#4754a4!important;font-weight:650}
.accounting-bank-duplicate-review{color:#9a5b00!important;font-weight:700}
.accounting-bank-p3-duplicate-decision{display:grid;gap:6px;margin-block:6px;padding:7px;border:1px solid #fde0a4;border-radius:8px;background:#fffbef}
.accounting-bank-p3-duplicate-decision>summary{color:#80520a;font-size:.62rem;font-weight:750;cursor:pointer;list-style-position:inside}
.accounting-bank-p3-duplicate-decision>small{color:#80520a;font-size:.61rem;line-height:1.7}
.accounting-bank-p3-duplicate-decision form{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.accounting-bank-p3-duplicate-decision input{flex:1;min-width:125px;min-height:32px;padding:5px 7px;border:1px solid #ead7a7;border-radius:7px;background:#fff;font:inherit;font-size:.6rem}
@media(max-width:980px){.accounting-bank-p3-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.accounting-bank-p3-mapping{grid-column:1}.accounting-bank-p3-grid{grid-template-columns:1fr}}
.accounting-bank-p2-audit{padding-top:2px;border-top:1px dashed var(--border-color,#dbe4f0)}
.accounting-bank-p2-audit>summary{width:max-content;max-width:100%;padding:5px 0;color:var(--text-secondary,#52627a);font-size:.78rem;font-weight:700;cursor:pointer}
.accounting-bank-p2-audit ol{display:grid;gap:5px;margin:5px 0 0;padding-inline-start:22px}
.accounting-bank-p2-audit li{font-size:.78rem;line-height:1.8;overflow-wrap:anywhere}
@media(max-width:980px){.accounting-bank-p2-advanced-search>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.accounting-bank-p2-advanced-search>div{grid-template-columns:1fr}.accounting-bank-p2-advanced-search{grid-column:1}}

/* P5.4 period workbench: compact filters, a readable queue and safe selected-row export. */
.accounting-bank-p54{display:grid;gap:12px;scroll-margin-top:18px}
.accounting-bank-p54-filters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;align-items:end;padding:11px;border:1px solid var(--border-color,#dbe4f0);border-radius:12px;background:var(--surface-subtle,#f8fafc)}
.accounting-bank-p54-filters label,.accounting-bank-p54-saved label{display:grid;gap:4px;min-width:0;color:var(--text-secondary,#52627a);font-size:.72rem;font-weight:700}
.accounting-bank-p54-filters input,.accounting-bank-p54-filters select,.accounting-bank-p54-saved input,.accounting-bank-p54-saved select{width:100%;min-width:0;min-height:36px;padding:6px 8px;border:1px solid var(--border-color,#dbe4f0);border-radius:8px;background:#fff;color:var(--text-primary,#17233b);font:inherit;font-size:.75rem}
.accounting-bank-p54-filters input[dir=ltr]{text-align:left}
.accounting-bank-p54-saved{display:flex;align-items:end;gap:8px;flex-wrap:wrap;padding:9px 10px;border:1px solid var(--border-color,#e2e8f0);border-radius:10px;background:#fff}
.accounting-bank-p54-saved>form{display:flex;align-items:end;gap:7px;min-width:0}
.accounting-bank-p54-saved>form:first-child{flex:0 1 330px}
.accounting-bank-p54-saved>form:nth-child(2){flex:1 1 360px}
.accounting-bank-p54-saved>form label{flex:1;min-width:145px}
.accounting-bank-p54-report-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.accounting-bank-p54-report-actions>span,.accounting-bank-p54-selection>small{color:var(--text-muted,#667085);font-size:.67rem}
.accounting-bank-p54-selection{display:grid;gap:7px;padding:9px;border:1px solid var(--border-color,#dbe4f0);border-radius:10px;background:#fff}
.accounting-bank-p54-selection>strong{font-size:.76rem}
.accounting-bank-p54-selection>button{justify-self:start}
.accounting-bank-p54-table{max-width:100%;overflow:auto;border:1px solid var(--border-color,#e2e8f0);border-radius:9px}
.accounting-bank-p54-table table{min-width:880px;margin:0}
.accounting-bank-p54-table.has-selection th:first-child,.accounting-bank-p54-table.has-selection td:first-child{width:42px;text-align:center}
.accounting-bank-p54-table input[type=checkbox]{width:18px;height:18px;accent-color:var(--primary,#5145cd)}
.accounting-bank-p54-table td{vertical-align:top}
.accounting-bank-p54-table.has-selection td:nth-child(3),.accounting-bank-p54-table:not(.has-selection) td:nth-child(2){min-width:230px;max-width:340px;overflow-wrap:anywhere}
.accounting-bank-p54-table td:nth-child(2) small,.accounting-bank-p54-table td:nth-child(3) small,.accounting-bank-p54-table td:nth-child(4) small,.accounting-bank-p54-table td:nth-child(5) small,.accounting-bank-p54-table td:nth-child(6) small{display:block;margin-top:3px;color:var(--text-muted,#667085);font-size:.64rem;line-height:1.6}
.accounting-bank-p54-table.has-selection td:nth-child(4),.accounting-bank-p54-table:not(.has-selection) td:nth-child(3){white-space:nowrap}
.accounting-bank-p54-table.has-selection td:nth-child(6) .button,.accounting-bank-p54-table:not(.has-selection) td:nth-child(5) .button{margin-top:5px}
.accounting-bank-p54 .accounting-bank-pagination{margin-block:0}
.accounting-bank-p54-migration-note{margin:0;padding:8px 10px;font-size:.72rem}
.accounting-bank-p54-crosslinks{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
@media(max-width:1000px){.accounting-bank-p54-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.accounting-bank-p54-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px}.accounting-bank-p54-filters label:first-child,.accounting-bank-p54-filters label:nth-child(2){grid-column:1/-1}.accounting-bank-p54-filters>button,.accounting-bank-p54-filters>a{width:100%;justify-content:center}.accounting-bank-p54-saved,.accounting-bank-p54-saved>form{align-items:stretch;flex-direction:column}.accounting-bank-p54-saved>form,.accounting-bank-p54-saved>form:first-child,.accounting-bank-p54-saved>form:nth-child(2){width:100%;flex:1 1 auto}.accounting-bank-p54-report-actions{align-items:stretch;flex-direction:column}.accounting-bank-p54-report-actions .button{width:100%;justify-content:center}.accounting-bank-p54-selection>button{width:100%}.accounting-bank-p54-table table{min-width:780px}.accounting-bank-p54-crosslinks{align-items:stretch;flex-direction:column}.accounting-bank-p54-crosslinks .button{width:100%;justify-content:center}}
@media(max-width:650px){.accounting-bank-p54-table{overflow:visible;border:0}.accounting-bank-p54-table table{width:100%;min-width:0;border:0;border-collapse:separate;border-spacing:0 8px}.accounting-bank-p54-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.accounting-bank-p54-table tbody{display:grid;gap:8px}.accounting-bank-p54-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:1px solid var(--border-color,#dbe4f0);border-radius:12px;background:#fff;box-shadow:0 3px 12px rgba(20,36,60,.045);overflow:hidden}.accounting-bank-p54-table td{display:grid;grid-template-columns:minmax(74px,.55fr) minmax(0,1fr);gap:8px;align-items:start;min-width:0;max-width:none!important;padding:9px 10px;border:0;border-bottom:1px solid var(--border-color,#edf1f6);white-space:normal!important;overflow-wrap:anywhere}.accounting-bank-p54-table td::before{content:attr(data-label);color:var(--text-muted,#667085);font-size:.65rem;font-weight:700}.accounting-bank-p54-table td[data-label="شرح و فایل"],.accounting-bank-p54-table td[data-label="تخصیص / دلیل"]{grid-column:1/-1}.accounting-bank-p54-table td[data-label="انتخاب"]{grid-template-columns:minmax(74px,.55fr) minmax(0,1fr)}.accounting-bank-p54-table td[data-label="انتخاب"] input{justify-self:start}.accounting-bank-p54-table td .button{width:100%;justify-content:center}.accounting-bank-p54-table.has-selection td:nth-child(3),.accounting-bank-p54-table:not(.has-selection) td:nth-child(2){min-width:0}.accounting-bank-p54-table tr:last-child td:last-child{border-bottom:0}}
.accounting-p6-header,.accounting-p6-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.accounting-p6-header{margin-block-end:18px}.accounting-p6-header h1{margin:0 0 6px}.accounting-p6-header p,.accounting-p6-section-head p{margin:0}.accounting-p6-header-links{display:flex;flex-wrap:wrap;gap:8px}.accounting-p6-panel{margin-block:14px;padding:18px}.accounting-p6-section-head{align-items:center;margin-block-end:14px}.accounting-p6-section-head h2{margin:0 0 5px;font-size:1.08rem}.accounting-p6-filter,.accounting-p6-period-form,.accounting-p6-revenue-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end;margin-block:12px}.accounting-p6-filter label,.accounting-p6-period-form label,.accounting-p6-revenue-form label,.accounting-p6-close-form label{display:grid;gap:5px;min-width:0;font-size:.84rem;font-weight:600}.accounting-p6-filter input,.accounting-p6-filter select,.accounting-p6-period-form input,.accounting-p6-revenue-form input,.accounting-p6-revenue-form select,.accounting-p6-close-form textarea{width:100%;min-width:0}.accounting-p6-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:10px;margin-block:14px}.accounting-p6-metrics article{display:grid;gap:7px;align-content:start;padding:13px;border:1px solid var(--border-color,#dbe3ef);border-radius:12px;background:var(--surface-soft,#f8fafc)}.accounting-p6-metrics small,.accounting-p6-metrics a{color:var(--text-muted,#64748b);font-size:.78rem}.accounting-p6-metrics strong{font-size:1.08rem;direction:rtl;font-variant-numeric:tabular-nums}.accounting-p6-note{margin:10px 0;padding:10px 12px;border-inline-start:3px solid var(--primary,#5b4be3);border-radius:8px;background:var(--surface-soft,#f8fafc);color:var(--text-muted,#58657a);font-size:.82rem;line-height:1.8}.accounting-p6-table-wrap{max-height:620px;overflow:auto}.accounting-p6-report-table{min-width:920px}.accounting-p6-report-table td:first-child{min-width:210px}.accounting-p6-report-table td:first-child small,.accounting-p6-period-meta small,.accounting-p6-plan-list small,.accounting-p6-plan-list p,.accounting-p6-report-table td:first-child small{display:block;margin-block-start:4px;color:var(--text-muted,#64748b);font-size:.76rem}.accounting-p6-subtitle{margin:18px 0 10px;font-size:.98rem}.accounting-p6-period-list,.accounting-p6-plan-list{display:grid;gap:9px;margin-block:12px}.accounting-p6-period-card,.accounting-p6-plan-list article{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--border-color,#dbe3ef);border-radius:12px;background:var(--surface,#fff)}.accounting-p6-period-meta{display:flex;align-items:center;flex-wrap:wrap;gap:7px 12px;min-width:0}.accounting-p6-period-meta strong{font-size:.92rem}.accounting-p6-period-meta>span:not(.badge){color:var(--text-muted,#64748b);font-size:.82rem}.accounting-p6-period-actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px}.accounting-p6-disclosure{position:relative}.accounting-p6-disclosure>summary{list-style:none;cursor:pointer}.accounting-p6-disclosure>summary::-webkit-details-marker{display:none}.accounting-p6-close-form{display:grid;gap:9px;min-width:min(360px,80vw);margin-block-start:8px;padding:12px;border:1px solid var(--border-color,#dbe3ef);border-radius:10px;background:var(--surface,#fff);box-shadow:0 8px 24px #18233b12}.accounting-p6-close-form p{margin:0;color:var(--text-muted,#64748b);font-size:.78rem;line-height:1.7}.accounting-p6-close-form label:has(input[type=checkbox]){display:flex;align-items:flex-start;gap:8px}.accounting-p6-close-form input[type=checkbox]{margin-block-start:4px}.accounting-p6-close-form textarea{min-height:78px;resize:vertical}.accounting-p6-revenue-form{grid-template-columns:repeat(3,minmax(0,1fr));padding:12px;border:1px solid var(--border-color,#dbe3ef);border-radius:12px;background:var(--surface-soft,#f8fafc)}.accounting-p6-wide{grid-column:1/-1}.accounting-p6-plan-list article{align-items:flex-start}.accounting-p6-plan-list article>div{min-width:0}.accounting-p6-plan-list p{margin:5px 0}.accounting-p6-run-form{display:grid;grid-template-columns:minmax(110px,1fr) auto;gap:6px;min-width:220px}.accounting-p6-run-form input{min-width:0}.accounting-p6-shortcuts{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-block:14px;padding:14px 18px;border:1px solid var(--border-color,#dbe3ef);border-radius:12px;background:var(--surface,#fff)}.accounting-p6-shortcuts h2{width:100%;margin:0;font-size:.98rem}.accounting-p6-shortcuts a{padding:8px 10px;border-radius:8px;background:var(--surface-soft,#f8fafc);font-size:.84rem}
@media(max-width:900px){.accounting-p6-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-p6-period-form{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-p6-revenue-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.accounting-p6-header,.accounting-p6-section-head{align-items:stretch;flex-direction:column}.accounting-p6-panel{padding:13px}.accounting-p6-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.accounting-p6-filter,.accounting-p6-period-form,.accounting-p6-revenue-form{grid-template-columns:minmax(0,1fr)}.accounting-p6-wide{grid-column:auto}.accounting-p6-period-card,.accounting-p6-plan-list article{align-items:stretch;flex-direction:column}.accounting-p6-period-actions{justify-content:flex-start}.accounting-p6-close-form{min-width:min(320px,82vw)}.accounting-p6-run-form{grid-template-columns:1fr}.accounting-p6-report-table{min-width:860px}.accounting-p6-shortcuts{align-items:stretch;flex-direction:column}}

.accounting-p6-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-block-start:12px;padding:10px 12px;border:1px solid var(--border-color,#dbe3ef);border-radius:10px;background:var(--surface-soft,#f8fafc);font-size:.82rem;color:var(--text-muted,#64748b)}.accounting-p6-pagination>div{display:flex;gap:7px}@media(max-width:600px){.accounting-p6-pagination{align-items:stretch;flex-direction:column}.accounting-p6-pagination>div{justify-content:space-between}.accounting-p6-pagination .button{flex:1;text-align:center}}

.accounting-p6-reconciliation-preview{flex:1 0 100%;min-width:0;margin-block-start:6px;padding:12px;border:1px solid var(--border-color,#dbe3ef);border-radius:10px;background:var(--surface-soft,#f8fafc)}.accounting-p6-reconciliation-preview .accounting-p6-section-head{margin:0 0 8px}.accounting-p6-reconciliation-preview h3{margin:0;font-size:.92rem}.accounting-p6-reconciliation-preview .table-wrap{max-width:100%;overflow:auto}.accounting-p6-reconciliation-preview table{min-width:900px}.accounting-p6-reconciliation-blockers{margin:10px 0 0;padding-inline-start:22px;color:var(--danger,#b42318);font-size:.82rem;line-height:1.8}.accounting-p6-reconciliation-blockers li+li{margin-block-start:3px}

/* P7 integration prerequisite register */
.accounting-p7-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-block-end:14px;padding:18px 20px;border:1px solid var(--border,#e2e8f0);border-radius:14px;background:linear-gradient(120deg,#fff 0%,#f7f9ff 100%)}
.accounting-p7-hero>div{min-width:0}.accounting-p7-eyebrow{color:var(--primary,#4f46e5);font-size:.72rem;font-weight:750}.accounting-p7-hero h2{margin:5px 0;font-size:1.08rem}.accounting-p7-hero p{max-width:820px;margin:0;color:var(--text-muted,#667085);font-size:.78rem;line-height:1.9}
.accounting-p7-panel{margin-block:12px;overflow:hidden}.accounting-p7-panel>.panel-header{align-items:center;padding:14px 17px;border-block-end:1px solid var(--border,#e2e8f0)}.accounting-p7-panel>.panel-header h2{margin:0;font-size:.96rem}.accounting-p7-panel>.panel-header .subtext{display:block;margin-block-start:4px;font-size:.72rem;line-height:1.8}
.accounting-p7-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:14px 16px}.accounting-p7-check{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:11px 12px;border:1px solid var(--border,#e2e8f0);border-radius:11px;background:#fff}.accounting-p7-check.is-passed{border-color:#b7e4d1;background:#f5fbf8}.accounting-p7-check.is-blocked{border-color:#f1d6b6;background:#fffaf4}.accounting-p7-check-icon{display:grid;place-items:center;flex:0 0 23px;width:23px;height:23px;border-radius:50%;background:#fff;color:#b45309;font-weight:800}.accounting-p7-check.is-passed .accounting-p7-check-icon{background:#dcfce7;color:#15803d}.accounting-p7-check strong{display:block;font-size:.78rem}.accounting-p7-check p{margin:3px 0 0;color:var(--text-muted,#667085);font-size:.7rem;line-height:1.8}
.accounting-p7-locked-note{margin:0 16px 15px;font-size:.73rem;line-height:1.9}.accounting-p7-notice{margin-block:10px;font-size:.76rem;line-height:1.9}
.accounting-p7-form{padding:14px 16px}.accounting-p7-section{display:grid;grid-template-columns:minmax(180px,.72fr) minmax(0,1.7fr);gap:16px;padding:14px 0;border-block-end:1px solid var(--border,#e7edf2)}.accounting-p7-section h3{margin:0 0 5px;font-size:.82rem}.accounting-p7-section p{margin:0;color:var(--text-muted,#667085);font-size:.7rem;line-height:1.8}.accounting-p7-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.accounting-p7-fields label,.accounting-p7-review-form label{display:grid;align-content:start;gap:5px;font-size:.71rem;font-weight:650}.accounting-p7-fields input,.accounting-p7-fields select,.accounting-p7-fields textarea,.accounting-p7-review-form textarea{box-sizing:border-box;width:100%;min-width:0;min-height:38px}.accounting-p7-fields textarea,.accounting-p7-review-form textarea{min-height:92px;resize:vertical}.accounting-p7-span-2{grid-column:1/-1}.accounting-p7-form .form-actions{justify-content:flex-start;margin-block-start:14px}
.accounting-p7-review-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px 16px}.accounting-p7-history code{font-size:.68rem;white-space:nowrap}.accounting-p7-empty{padding:18px;color:var(--text-muted,#667085);font-size:.76rem;text-align:center}
.accounting-p7-form :is(input,select,textarea):focus-visible,.accounting-p7-review-form textarea:focus-visible{outline:3px solid rgb(79 70 229 / 18%);outline-offset:1px;border-color:var(--primary,#4f46e5)}
@media(max-width:760px){.accounting-p7-hero{align-items:flex-start;flex-direction:column;padding:14px}.accounting-p7-checks{grid-template-columns:1fr;padding:11px}.accounting-p7-section{grid-template-columns:1fr;gap:9px;padding:12px 0}.accounting-p7-form,.accounting-p7-review-form{padding:12px}.accounting-p7-fields,.accounting-p7-review-form{grid-template-columns:1fr}.accounting-p7-span-2{grid-column:1}.accounting-p7-panel>.panel-header{align-items:flex-start;flex-direction:column;gap:7px}.accounting-p7-locked-note{margin-inline:11px}}
.accounting-p7-review-confirm{display:flex!important;align-items:center;gap:9px;padding:10px 12px;border:1px solid #dce7ef;border-radius:10px;background:#f8fbfd;color:var(--text-primary,#17233b)}.accounting-p7-review-confirm input{flex:0 0 18px;width:18px;min-height:18px;height:18px;accent-color:var(--primary,#4f46e5)}.accounting-p7-review-confirm span{font-size:.73rem;line-height:1.7}

/* P7 main integration workflow and neutral prerequisite progress */
.accounting-p7-check.is-pending{border-color:#d9e4f2;background:#f7faff}.accounting-p7-check.is-pending .accounting-p7-check-icon{background:#e8f0fc;color:#315d91}.accounting-p7-check-action{align-self:center;flex:0 0 auto;color:var(--primary,#4f46e5);font-size:.69rem;font-weight:700;text-decoration:none}.accounting-p7-check-action:hover{text-decoration:underline}
.accounting-p7-start{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-color:#dce5f1;background:linear-gradient(115deg,#fff 0%,#f7f9ff 100%)}.accounting-p7-start>div{min-width:0}.accounting-p7-start h2{margin:4px 0;font-size:.94rem}.accounting-p7-start p{max-width:780px;margin:0;color:var(--text-muted,#667085);font-size:.73rem;line-height:1.9}.accounting-p7-start form{flex:0 0 auto}.accounting-p7-start .subtext{font-size:.72rem;line-height:1.8}
@media(max-width:600px){.accounting-p7-start{align-items:stretch;flex-direction:column}.accounting-p7-start form,.accounting-p7-start form .button{width:100%}.accounting-p7-check-action{align-self:flex-start}}

/* Data-health duplicate lead review and field-by-field merge — 2026.10.01 */
.data-health-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.data-health-overview-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 14px;padding:16px 18px;border:1px solid #e2e8f1;border-radius:14px;background:linear-gradient(135deg,#fff 0%,#f8faff 100%);color:#263852;text-decoration:none;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.data-health-overview-card:hover,.data-health-overview-card:focus-visible{border-color:#aebfe0;box-shadow:0 8px 22px rgba(31,56,94,.09);outline:none;transform:translateY(-1px)}
.data-health-overview-card>span{font-size:13px;font-weight:800}.data-health-overview-card>strong{grid-column:2;grid-row:1/3;color:#243f72;font-size:26px;line-height:1}
.data-health-overview-card>small{color:#728097;font-size:11px;line-height:1.8}.data-health-overview-card>b{margin-top:4px;color:#5b4be0;font-size:11px}
.data-health-overview-note{margin:14px 2px 0;line-height:1.8}
.data-health-duplicate-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.data-health-merge-unavailable{color:#7b8493;font-size:10px;white-space:nowrap}
#data-health-duplicate-merge{padding:16px;z-index:35}
#data-health-duplicate-merge .modal-card{display:flex;width:min(1180px,100%);height:min(880px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);flex-direction:column;overflow:hidden;padding:22px 24px 18px;border:1px solid #e0e6f0;border-radius:18px}
#data-health-duplicate-merge .modal-card>h2{flex:0 0 auto;margin:0 45px 12px 0;color:#263852;font-size:19px}
.data-health-duplicate-modal{display:flex;min-height:0;flex:1;flex-direction:column;gap:12px}
.data-health-duplicate-intro{flex:0 0 auto;margin:0;padding:10px 12px;border:1px solid #e3eaf5;border-radius:10px;background:#f7f9fd;color:#596a81;font-size:11px;line-height:1.9}
.data-health-duplicate-modal-content{min-height:0;flex:1;overflow:auto;padding:0 2px 4px;overscroll-behavior:contain}
.data-health-duplicate-form{display:grid;gap:14px}.data-health-duplicate-form h3{margin:4px 0 0;color:#33445d;font-size:13px}
.data-health-survivor-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px;margin:0;padding:0;border:0}
.data-health-survivor-options legend{margin-bottom:7px}
.data-health-survivor-option{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:11px 12px;border:1px solid #e0e6ef;border-radius:11px;background:#fff;cursor:pointer;transition:.16s ease}
.data-health-survivor-option:hover{border-color:#aebbe9;background:#f8f8ff}.data-health-survivor-option:has(input:checked){border-color:#6657df;background:#f5f3ff;box-shadow:0 0 0 2px rgba(102,87,223,.1)}
.data-health-survivor-option input,.data-health-field-choice input{width:17px;height:17px;flex:0 0 auto;margin:2px 0 0;accent-color:#5c4bdd}
.data-health-survivor-copy{display:grid;gap:3px;min-width:0}.data-health-survivor-copy strong{color:#24334b;font-size:12px}.data-health-survivor-copy small{color:#748197;font-size:10px;line-height:1.7;overflow-wrap:anywhere}
.data-health-duplicate-records{border:1px solid #e5eaf2;border-radius:11px;background:#fbfcfe}.data-health-duplicate-records>summary{padding:10px 12px;color:#45566e;font-size:11px;font-weight:800;cursor:pointer}
.data-health-duplicate-record-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:9px;padding:0 10px 10px}
.data-health-record-card{min-width:0;padding:11px;border:1px solid #e7ebf2;border-radius:10px;background:#fff}.data-health-record-card h4{margin:0 0 8px;color:#2c4163;font-size:12px}
.data-health-record-value{display:grid;grid-template-columns:minmax(90px,.8fr) minmax(0,1fr);gap:8px;padding:4px 0;border-top:1px solid #f0f2f6;font-size:10px}
.data-health-record-value span{color:#8791a1}.data-health-record-value strong{min-width:0;color:#394a61;font-weight:700;overflow-wrap:anywhere}
.data-health-related-title{margin:9px 0 2px;padding-top:7px;border-top:1px dashed #e3e8f0;color:#526581;font-size:10px}
.data-health-record-related strong{direction:auto;text-align:start}
.data-health-field-conflicts{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:9px}
.data-health-field-conflict{min-width:0;margin:0;padding:9px;border:1px solid #eadfbd;border-radius:11px;background:#fffdf7}
.data-health-field-conflict legend{padding:0 5px;color:#69542c;font-size:11px;font-weight:800}
.data-health-field-choice{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:4px 8px;padding:7px;border-radius:8px;color:#39475c;font-size:11px;cursor:pointer}
.data-health-field-choice:hover{background:#f5f1e7}.data-health-field-choice small{grid-column:2;color:#8791a1;font-size:9px}
.data-health-no-conflicts{margin:0;padding:12px;border-radius:9px;background:#f2faf6;color:#39725a;font-size:11px;line-height:1.8}
.data-health-duplicate-blockers{margin:0;padding:10px 13px;font-size:11px;line-height:1.8}.data-health-duplicate-blockers ul{margin:5px 0 0;padding-inline-start:20px}
.data-health-duplicate-actions{position:sticky;bottom:0;justify-content:flex-start;margin:0;padding:10px 0 0;border-top:1px solid #edf0f5;background:#fff}
.data-health-duplicate-actions .button{min-height:40px}.data-health-duplicate-actions .button:disabled{cursor:not-allowed;opacity:.5}
.data-health-action-queue{display:grid;gap:13px}
.data-health-overview-grid.data-health-action-queue{grid-template-columns:minmax(0,1fr)}
.data-health-action-queue-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 18px;border:1px solid #e3e9f2;border-radius:13px;background:linear-gradient(115deg,#f8faff,#fff)}
.data-health-action-queue-heading>div{min-width:0}
.data-health-queue-kicker{display:inline-flex;align-items:center;gap:6px;color:#6556d8;font-size:10px;font-weight:800}
.data-health-queue-kicker:before{width:7px;height:7px;border-radius:50%;background:#7467e8;content:""}
.data-health-action-queue-heading h4{margin:4px 0;color:#263852;font-size:15px}
.data-health-action-queue-heading p{max-width:760px;margin:0;color:#64748b;font-size:12px;line-height:1.75}
.data-health-queue-context{display:grid;justify-items:end;gap:6px;flex:0 0 auto}
.data-health-scope-badge{padding:5px 9px;border:1px solid #dce5f2;border-radius:999px;background:#fff;color:#64748b;font-size:10px;font-weight:700}
.data-health-open-categories{color:#53627a;font-size:10px;font-weight:700}
.data-health-action-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.data-health-action-group{min-width:0;overflow:hidden;border:1px solid #e3e8f0;border-block-start:3px solid #c9d2e0;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(36,53,82,.035)}
.data-health-action-group--duplicate_leads{border-block-start-color:#e6a7a7}
.data-health-action-group--calls_without_owner{border-block-start-color:#e8c786}
.data-health-action-group--excel_errors{border-block-start-color:#9abce8}
.data-health-action-group--leads_without_phone{border-block-start-color:#b8a9ed}
.data-health-action-group>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 13px;border-bottom:1px solid #edf0f5;background:linear-gradient(180deg,#fff,#fafbfe)}
.data-health-action-group-title{display:grid;gap:4px;min-width:0}
.data-health-action-group>header h5{margin:0;color:#293b55;font-size:13px}
.data-health-action-group-title>span{color:#64748b;font-size:11px;line-height:1.65}
.data-health-action-group-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:0 0 auto}
.data-health-open-count{white-space:nowrap;padding:5px 8px;border-radius:8px;background:#f2f5fa;color:#596a82;font-size:10px}
.data-health-open-count strong{color:#2d4264;font-size:12px}
.data-health-action-group-tools .button{min-height:34px;padding:6px 10px;font-size:11px;white-space:nowrap}
.data-health-sample-list{display:grid;gap:0;margin:0;padding:0;list-style:none}
.data-health-sample-list>li{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:11px 13px;border-bottom:1px solid #f0f2f6;transition:background-color .16s ease}
.data-health-sample-list>li:hover,.data-health-sample-list>li:focus-within{background:#fafbff}
.data-health-sample-list>li:last-child{border-bottom:0}
.data-health-sample-copy{display:grid;gap:4px;min-width:0}
.data-health-sample-copy strong{display:-webkit-box;overflow:hidden;color:#2f4059;font-size:12px;line-height:1.6;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-wrap:anywhere}
.data-health-sample-copy>span{display:flex;align-items:center;flex-wrap:wrap;gap:3px 6px;color:#64748b;font-size:11px;line-height:1.7;overflow-wrap:anywhere}
.data-health-sample-meta-label{color:#8290a4;font-weight:700}
.data-health-sample-copy i{width:3px;height:3px;margin-inline:2px;border-radius:50%;background:#aab4c2}
.data-health-sample-action{flex:0 0 auto}
.data-health-sample-action .button{min-height:34px;padding:6px 10px;font-size:11px;white-space:nowrap}
.data-health-sample-action .button:focus-visible,.data-health-action-group-tools .button:focus-visible{outline:3px solid rgba(92,75,221,.25);outline-offset:2px}
.data-health-sample-unavailable{margin:0;padding:13px;color:#778397;font-size:11px;line-height:1.8}
.data-health-overview-clear{display:flex;align-items:flex-start;gap:12px;padding:17px;border:1px solid #cde8d9;border-radius:13px;background:#f4fbf7}
.data-health-overview-clear-icon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:#dff4e8;color:#248454;font-weight:900}
.data-health-overview-clear strong{color:#276b49;font-size:13px}
.data-health-overview-clear p{margin:4px 0 0;color:#64806f;font-size:11px;line-height:1.8}
@media(max-width:900px){.data-health-action-groups{grid-template-columns:1fr}}
@media(max-width:760px){.data-health-overview-grid{grid-template-columns:1fr}.data-health-action-queue-heading{align-items:flex-start;flex-direction:column;gap:10px;padding:13px}.data-health-action-queue-heading p{font-size:11px}.data-health-queue-context{display:flex;align-items:center;justify-content:space-between;width:100%}.data-health-action-group>header{align-items:flex-start;flex-direction:column;gap:9px}.data-health-action-group-tools{justify-content:space-between;width:100%}.data-health-sample-list>li{align-items:stretch;flex-direction:column;gap:8px}.data-health-sample-action .button{width:100%;justify-content:center}.data-health-duplicate-actions .button{flex:1 1 100%;justify-content:center}#data-health-duplicate-merge{padding:8px}#data-health-duplicate-merge .modal-card{width:100%;height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);padding:20px 14px 14px;border-radius:14px}.data-health-duplicate-record-grid,.data-health-field-conflicts,.data-health-survivor-options{grid-template-columns:1fr}.data-health-duplicate-intro{font-size:10px}.data-health-duplicate-form h3{font-size:12px}}


/* Lead draft workflow */
.lead-drafts-intro{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-block:0 12px;padding:13px 16px;border:1px solid #dfe6f2;border-inline-start:3px solid #7162e8;border-radius:12px;background:linear-gradient(110deg,#f8f9ff,#fff 72%);box-shadow:0 2px 8px rgba(33,48,76,.035)}
.lead-drafts-intro>div{display:grid;gap:3px;min-width:0}
.lead-drafts-intro strong{color:var(--text-primary,#20304b);font-size:.92rem}
.lead-drafts-intro small{color:var(--text-muted,#667085);font-size:.72rem;line-height:1.7}
.lead-drafts-kicker{color:var(--primary,#5c4bdd);font-size:.66rem;font-weight:750;letter-spacing:.01em}
.lead-drafts-filter-panel{margin-block:0 10px;padding:12px}
.lead-drafts-filters{display:grid;grid-template-columns:minmax(220px,1.7fr) repeat(3,minmax(130px,.72fr)) auto;align-items:end;gap:9px}
.lead-drafts-filters label,.lead-drafts-bulk-fields label{display:grid;gap:5px;min-width:0;color:var(--text-muted,#667085);font-size:.69rem;font-weight:650}
.lead-drafts-filters input,.lead-drafts-filters select,.lead-drafts-bulk-fields select{box-sizing:border-box;width:100%;min-width:0;min-height:38px}
.lead-drafts-filter-actions{display:flex;align-items:center;gap:7px}
.lead-drafts-filter-actions .button{min-height:38px;padding-inline:12px}
.lead-drafts-bulk{display:grid;gap:9px}
.lead-drafts-selection{display:flex;align-items:center;flex-wrap:wrap;gap:9px 18px;padding:9px 12px;border:1px solid #e5eaf2;border-radius:10px;background:#f8faff;color:#52627a;font-size:.71rem}
.lead-drafts-selection label{display:inline-flex;align-items:center;gap:7px;cursor:pointer}
.lead-drafts-selection input,.lead-drafts-table input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:var(--primary,#5c4bdd)}
.lead-drafts-selection [data-lead-draft-selected]{margin-inline-start:auto;color:#354766;font-weight:700}
.lead-drafts-bulk-fields{display:flex;align-items:end;flex-wrap:wrap;gap:8px;padding:10px 12px;border:1px solid #e6eaf1;border-radius:10px;background:#fff}
.lead-drafts-bulk-fields>strong{align-self:center;margin-inline-end:auto;color:var(--text-primary,#263852);font-size:.76rem}
.lead-drafts-bulk-fields label{flex:1 1 140px;max-width:220px}
.lead-drafts-bulk-fields .button{min-height:38px;white-space:nowrap}
.lead-drafts-table-wrap{max-width:100%;overflow:auto;border:1px solid #e7ebf2;border-radius:10px}
.lead-drafts-table{width:100%;min-width:850px;border-collapse:separate;border-spacing:0}
.lead-drafts-table thead th{position:sticky;top:0;z-index:1;padding:10px 11px;background:#f6f8fc;color:#53627a;font-size:.68rem;font-weight:750;white-space:nowrap}
.lead-drafts-table tbody td{padding:10px 11px;border-block-start:1px solid #edf0f5;color:#394b65;font-size:.73rem;vertical-align:middle}
.lead-drafts-table tbody tr{transition:background-color .14s ease}
.lead-drafts-table tbody tr:hover,.lead-drafts-table tbody tr:focus-within{background:#fafbff}
.lead-drafts-table td strong,.lead-drafts-table td small{display:block}
.lead-drafts-table td strong{color:#263852;font-size:.76rem}
.lead-drafts-table td small{margin-block-start:3px;color:#7a879b;font-size:.66rem;line-height:1.55}
.lead-drafts-table .priority{width:max-content}
.lead-drafts-row-actions{display:flex;align-items:center;gap:6px;white-space:nowrap}
.lead-drafts-row-actions .button{min-height:32px;padding:5px 9px;font-size:.68rem}
.lead-drafts-bulk-approve{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:10px 12px;border:1px solid #dce8df;border-radius:10px;background:#f7fcf8}
.lead-drafts-bulk-approve small{color:#5e7868;font-size:.69rem;line-height:1.65}
.lead-drafts-hidden-form{display:none!important}
.lead-drafts-bulk :is(button,input,select,a):focus-visible,.lead-drafts-filters :is(button,input,select,a):focus-visible{outline:3px solid rgb(92 75 221 / 22%);outline-offset:2px}
.lead-drafts-intro .button,.lead-drafts-bulk-approve .button{min-height:38px}
@media(max-width:1100px){.lead-drafts-filters{grid-template-columns:minmax(200px,1.4fr) repeat(2,minmax(130px,.8fr))}.lead-drafts-filter-actions{grid-column:1/-1;justify-content:flex-start}}
@media(max-width:760px){.lead-drafts-intro{align-items:flex-start;padding:11px 12px}.lead-drafts-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.lead-drafts-search{grid-column:1/-1}.lead-drafts-filter-actions{grid-column:1/-1}.lead-drafts-filter-actions .button{flex:1;justify-content:center}.lead-drafts-selection{align-items:flex-start;flex-direction:column;gap:9px}.lead-drafts-selection [data-lead-draft-selected]{margin-inline-start:0}.lead-drafts-bulk-fields>strong{flex-basis:100%}.lead-drafts-bulk-fields label{flex:1 1 calc(50% - 8px);max-width:none}.lead-drafts-bulk-fields>.button{flex:1 1 100%;justify-content:center}.lead-drafts-bulk-approve{align-items:stretch;flex-direction:column}.lead-drafts-bulk-approve .button{width:100%;justify-content:center}}
@media(max-width:420px){.lead-drafts-filters{grid-template-columns:1fr}.lead-drafts-search,.lead-drafts-filter-actions{grid-column:1}.lead-drafts-bulk-fields label{flex-basis:100%}}

/* Public lead-form builder — Control-only surfaces. */
.public-lead-forms-page-head,.public-lead-forms-list,.public-lead-form-editor,.public-lead-form-preview,.public-lead-form-versions{margin-block-end:12px}
.public-lead-forms-page-head .control-card-head{align-items:center}
.public-lead-forms-page-head .control-card-body{padding-block-start:0}
.public-lead-forms-list .control-card-head{gap:12px}
.public-lead-form-list{display:grid;gap:8px}
.public-lead-form-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;padding:12px;border:1px solid #e5eaf2;border-radius:12px;background:#fff;transition:border-color .16s ease,box-shadow .16s ease}
.public-lead-form-row:hover{border-color:#cbd5f1;box-shadow:0 5px 16px rgb(33 50 82 / 6%)}
.public-lead-form-row-main{min-width:0}
.public-lead-form-row-main h3{margin:7px 0 3px;color:#24344d;font-size:.88rem}
.public-lead-form-row-main p,.public-lead-form-row-main small{margin:0;color:#718097;font-size:.72rem;line-height:1.7}
.public-lead-form-status{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border-radius:999px;font-size:.65rem;font-weight:750;white-space:nowrap}
.public-lead-form-status.status-draft{color:#78591b;background:#fff5dc}
.public-lead-form-status.status-published{color:#16724c;background:#e8f7ee}
.public-lead-form-status.status-paused{color:#805522;background:#fff0df}
.public-lead-form-status.status-archived{color:#667085;background:#eef1f5}
.public-lead-form-row-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px}
.public-lead-form-row-actions form{margin:0}
.public-lead-form-search{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-block-end:10px}
.public-lead-form-search label{flex:1 1 260px;min-width:0}
.public-lead-form-search input,.public-lead-form-grid input,.public-lead-form-grid textarea,.public-lead-form-email-mode select,.public-lead-form-notification input,.public-lead-form-preview-field input,.public-lead-form-preview-field textarea,.public-lead-form-preview-field select{box-sizing:border-box;width:100%;min-height:40px;padding:8px 10px;border:1px solid #d8e0ed;border-radius:9px;background:#fff;color:#26364e;font:inherit}
.public-lead-form-grid textarea,.public-lead-form-preview-field textarea{min-height:82px;resize:vertical}
.public-lead-form-builder label>span,.public-lead-form-email-mode>span,.public-lead-form-notification label>span,.public-lead-form-preview-field>span{display:block;margin-block-end:5px;color:#34445d;font-size:.73rem;font-weight:700}
.public-lead-form-builder label b{color:#b54747}
.public-lead-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-block-end:18px}
.public-lead-form-grid label{min-width:0}
.public-lead-form-grid .is-wide{grid-column:1/-1}
.public-lead-form-section-head{display:flex;align-items:center;gap:9px;margin:18px 0 10px}
.public-lead-form-section-head>span{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:9px;background:#f0efff;color:#594bd3;font-size:.72rem;font-weight:800}
.public-lead-form-section-head strong,.public-lead-form-section-head small{display:block}
.public-lead-form-section-head strong{color:#273750;font-size:.8rem}
.public-lead-form-section-head small{margin-block-start:2px;color:#7a879a;font-size:.67rem}
.public-lead-form-fieldset{min-width:0;margin:0;padding:12px;border:1px solid #e3e9f1;border-radius:12px}
.public-lead-form-fieldset legend{padding-inline:6px;color:#34445d;font-size:.75rem;font-weight:750}
.public-lead-form-core-fields,.public-lead-form-registry-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:9px}
.public-lead-form-registry-fields{margin-block-start:10px;padding-block-start:10px;border-block-start:1px solid #edf0f5}
.public-lead-form-registry-fields>strong{grid-column:1/-1;margin-block-end:2px;color:#56667d;font-size:.7rem}
.public-lead-form-group-note{grid-column:1/-1;color:#718097;font-size:.68rem;line-height:1.7}
.public-lead-form-field-option{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:10px;box-sizing:border-box;min-width:0;min-height:62px;padding:10px 12px;border:1px solid #e2e8f1;border-radius:10px;background:#fff;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.public-lead-form-field-option:not(.is-locked):hover{border-color:#aaa2f2;background:#faf9ff;box-shadow:0 3px 10px rgb(55 48 128 / 6%)}
.public-lead-form-field-option:not(.is-locked):has(input:checked){border-color:#9389e9;background:#f5f3ff}
.public-lead-form-field-option:focus-within{outline:3px solid rgb(92 75 221 / 18%);outline-offset:1px}
.public-lead-form-field-option input[type="checkbox"]{display:block;box-sizing:border-box;width:18px;height:18px;min-height:18px;margin:1px 0 0;padding:0;border:0;border-radius:4px;background:transparent;box-shadow:none;outline:0;accent-color:#6254df;cursor:pointer}
.public-lead-form-field-option input[type="checkbox"]:focus{box-shadow:none}
.public-lead-form-editor .public-lead-form-field-option>span{display:grid;gap:3px;min-width:0;margin:0;color:#34445d;font-size:.72rem;font-weight:600;line-height:1.55;overflow-wrap:anywhere}
.public-lead-form-field-option strong,.public-lead-form-field-option small{display:block;min-width:0;margin:0}
.public-lead-form-field-option strong{color:#293952;font-size:.74rem;font-weight:750;line-height:1.5}
.public-lead-form-field-option small{color:#718097;font-size:.66rem;font-weight:450;line-height:1.6}
.public-lead-form-field-option.is-locked{border-color:#e5eaf1;background:#f4f6f9;cursor:default}
.public-lead-form-field-option.is-locked strong{color:#58667b}
.public-lead-form-field-option.is-locked small{color:#7b8798}
.public-lead-form-sensitive-note{grid-column:1/-1;margin-block:8px 2px;font-size:.72rem;line-height:1.8}
.public-lead-form-field-option.is-sensitive{border-color:#ecd5ad;background:#fffdf8}
.public-lead-form-field-option.is-sensitive:not(.is-locked):hover{border-color:#d9ad65;background:#fff9ed}
.public-lead-form-field-option.is-sensitive:not(.is-locked):has(input:checked){border-color:#d5a450;background:#fff6e5}
.public-lead-form-field-option.is-sensitive small{color:#8a6330}
.plf-field-note{display:block;margin-block-start:-2px;color:#748198;font-size:.72rem;line-height:1.65}
.plf-field-note.is-sensitive{padding:8px 10px;border:1px solid #eedcb9;border-radius:9px;background:#fff9ed;color:#815f2b}
.public-lead-form-help,.public-lead-form-email-mode small,.public-lead-form-notification small,.public-lead-form-consent small{display:block;margin:6px 0 0;color:#748198;font-size:.67rem;line-height:1.7}
.public-lead-form-email-mode{display:block;max-width:460px;margin-block-start:10px}
.public-lead-form-email-mode select{cursor:pointer}
.public-lead-form-notification{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(260px,1.2fr);align-items:start;gap:12px;padding:12px;border:1px solid #e4e9f2;border-radius:11px;background:#fafbfe}
.public-lead-form-toggle{display:flex;align-items:flex-start;gap:8px;color:#34445d;font-size:.72rem;font-weight:700}
.public-lead-form-toggle input{margin-block-start:3px;accent-color:#6254df}
.public-lead-form-delivery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px;margin:0;padding:10px;border:1px solid #e2e8f2;border-radius:12px;background:#f9fbfe}
.public-lead-form-delivery legend{grid-column:1/-1;padding-inline:5px;color:#34445d;font-size:.72rem;font-weight:750}
.public-lead-form-delivery-choice{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:10px;box-sizing:border-box;min-width:0;min-height:66px;padding:10px 12px;border:1px solid #e1e7f0;border-radius:10px;background:#fff;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.public-lead-form-delivery-choice:hover{border-color:#b9b2ef;background:#fcfbff}
.public-lead-form-delivery-choice:has(input:checked){border-color:#8f84e8;background:#f5f3ff;box-shadow:0 0 0 2px rgb(98 84 223 / 9%)}
.public-lead-form-delivery-choice:focus-within{outline:3px solid rgb(92 75 221 / 18%);outline-offset:1px}
.public-lead-form-delivery-choice input[type="radio"]{display:block;box-sizing:border-box;width:18px;height:18px;min-width:18px;min-height:18px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;outline:0;accent-color:#6254df;cursor:pointer}
.public-lead-form-delivery-choice input[type="radio"]:focus{box-shadow:none}
.public-lead-form-editor .public-lead-form-delivery-choice>span{display:grid;gap:3px;min-width:0;margin:0;color:#34445d;font-size:.71rem;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.public-lead-form-delivery-choice strong{color:#293952;font-size:.74rem;font-weight:750}
.public-lead-form-delivery-choice small,.public-lead-form-delivery-recipient small{color:#718097;font-size:.66rem;font-weight:450;line-height:1.6}
.public-lead-form-delivery-recipient{display:grid;grid-column:1/-1;grid-template-columns:minmax(150px,.45fr) minmax(0,1.55fr);align-items:center;gap:4px 12px;box-sizing:border-box;max-width:none;margin:0;padding:10px 12px;border:1px solid #e2e8f2;border-radius:10px;background:#fff}
.public-lead-form-delivery-recipient[hidden]{display:none}
.public-lead-form-editor .public-lead-form-delivery-recipient>span{grid-column:1;grid-row:1;margin:0;color:#34445d;font-size:.72rem;font-weight:700}
.public-lead-form-delivery-recipient input{box-sizing:border-box;width:100%;min-height:40px;padding:8px 10px;border:1px solid #d8e0ed;border-radius:9px;background:#fff;color:#26364e;font:inherit}
.public-lead-form-editor .public-lead-form-delivery-recipient>input{grid-column:2;grid-row:1}
.public-lead-form-editor .public-lead-form-delivery-recipient>small{grid-column:2;grid-row:2;margin:0}
.public-lead-form-consent{margin-block-start:12px;padding:11px 12px;border-inline-start:3px solid #8a80ec;border-radius:8px;background:#f8f7ff}
.public-lead-form-consent strong{font-size:.72rem;color:#394764}
.public-lead-form-consent p{margin:6px 0 0;color:#59677d;font-size:.69rem;line-height:1.85}
.public-lead-form-consent-disclosure{padding:0;border:1px solid #e4e5f5;border-inline-start:3px solid #8a80ec;border-radius:9px;background:#f8f7ff}
.public-lead-form-consent-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;list-style:none;cursor:pointer}
.public-lead-form-consent-disclosure>summary::-webkit-details-marker{display:none}
.public-lead-form-consent-disclosure>summary>span:first-child{display:grid;gap:2px;min-width:0}
.public-lead-form-consent-disclosure>summary strong{font-size:.7rem}
.public-lead-form-consent-disclosure>summary small{margin:0;font-size:.63rem}
.public-lead-form-consent-toggle{flex:0 0 auto;color:#5146c4;font-size:.64rem;font-weight:700;white-space:nowrap}
.public-lead-form-consent-disclosure[open]>summary{border-block-end:1px solid #e4e5f5}
.public-lead-form-consent-copy{padding:0 11px 10px}
.public-lead-form-consent-copy p{margin:8px 0 4px}
.public-lead-form-consent-copy small{margin:0}
.public-lead-form-stage-note{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;margin-block-start:10px;padding:10px 12px;border:1px solid #dce5f5;border-radius:10px;background:#f4f8ff;color:#50627e;font-size:.68rem;line-height:1.75}
.public-lead-form-stage-note strong{color:#385b9a;white-space:nowrap}
.public-lead-form-actions,.public-lead-form-preview-footer,.public-lead-form-pagination{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-block-start:12px}
.public-lead-form-empty{display:grid;justify-items:start;gap:8px;padding:20px 12px;border:1px dashed #d8e0ed;border-radius:12px;background:#fafbfe}
.public-lead-form-empty strong{color:#34445d;font-size:.82rem}
.public-lead-form-empty span{color:#748198;font-size:.7rem}
.public-lead-form-preview-sheet{max-width:720px;margin-inline:auto;padding:clamp(14px,3vw,24px);border:1px solid #e4e9f1;border-radius:14px;background:#fbfcfe}
.public-lead-form-preview-sheet h3{margin:0;color:#273750;font-size:1rem}
.public-lead-form-preview-sheet>p{margin:6px 0 14px;color:#718097;font-size:.75rem;line-height:1.8}
.public-lead-form-preview-field{display:block;margin-block-start:10px}
.public-lead-form-preview-field input:disabled,.public-lead-form-preview-field textarea:disabled,.public-lead-form-preview-field select:disabled{background:#fff;color:#63718a;opacity:1}
.public-lead-form-preview-consent{display:flex;align-items:flex-start;gap:8px;margin-block:14px;color:#66748a;font-size:.68rem;line-height:1.8}
.public-lead-form-preview-consent input{flex:0 0 auto;margin-block-start:4px}
.public-lead-form-preview-sheet>button:disabled{opacity:.62;cursor:not-allowed}
.public-lead-form-version-list{display:grid;gap:7px}
.public-lead-form-version-list article{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto auto;align-items:center;gap:9px;padding:9px 10px;border:1px solid #e8edf4;border-radius:9px;background:#fff}
.public-lead-form-version-list article>span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#5d6c83;font-size:.7rem}
.public-lead-form-version-list article>small{color:#8290a3;font-size:.64rem;direction:ltr}
.public-lead-form-pagination{justify-content:flex-start}
.public-lead-form-pagination>span{margin-inline:auto;color:#697991;font-size:.7rem}
.public-lead-forms-list :is(a,button),.public-lead-form-builder :is(a,button,input,select,textarea){transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.public-lead-forms-list :is(a,button):focus-visible,.public-lead-form-builder :is(a,button,input,select,textarea):focus-visible{outline:3px solid rgb(92 75 221 / 24%);outline-offset:2px}
@media(max-width:900px){.public-lead-form-row{grid-template-columns:1fr}.public-lead-form-row-actions{justify-content:flex-start}.public-lead-form-version-list article{grid-template-columns:auto minmax(0,1fr) auto}.public-lead-form-version-list article>small{grid-column:2;grid-row:2}.public-lead-form-version-list article>a{grid-column:3;grid-row:1/3}}
@media(max-width:620px){.public-lead-form-grid,.public-lead-form-core-fields,.public-lead-form-registry-fields,.public-lead-form-notification{grid-template-columns:1fr}.public-lead-form-grid .is-wide,.public-lead-form-registry-fields>strong{grid-column:auto}.public-lead-form-actions>*{flex:1 1 100%;justify-content:center}.public-lead-form-row-actions>*{flex:1 1 calc(50% - 6px);justify-content:center}.public-lead-form-row-actions form{display:flex;flex:1 1 calc(50% - 6px)}.public-lead-form-row-actions form button{width:100%}.public-lead-form-search>*{flex:1 1 100%}.public-lead-form-search button,.public-lead-form-search a{justify-content:center}.public-lead-form-version-list article{grid-template-columns:auto minmax(0,1fr)}.public-lead-form-version-list article>a{grid-column:1/-1;grid-row:auto;justify-self:start}.public-lead-form-version-list article>small{grid-column:2;grid-row:auto}.public-lead-form-stage-note{grid-template-columns:1fr}.public-lead-form-stage-note strong{white-space:normal}}
@media(prefers-reduced-motion:reduce){.public-lead-form-row,.public-lead-forms-list :is(a,button),.public-lead-form-builder :is(a,button,input,select,textarea),.public-lead-form-delivery-choice{transition:none}}
.lead-drafts-filters{grid-template-columns:minmax(220px,1.5fr) repeat(3,minmax(135px,1fr))}
.lead-drafts-filter-actions{grid-column:1/-1;justify-content:flex-start}
.lead-drafts-list-panel{margin-block-start:10px;padding:10px}
.lead-drafts-table{min-width:1040px}
.lead-drafts-table thead th:first-child,.lead-drafts-table tbody td:first-child{width:38px;text-align:center}
.lead-drafts-contact-state{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;font-size:.65rem;font-weight:750;white-space:nowrap}
.lead-drafts-contact-state.is-present{color:#16764d;background:#eaf7ef}
.lead-drafts-contact-state.is-missing{color:#8b5a14;background:#fff5e5}
.lead-drafts-limit-hint{color:#8b5a14;line-height:1.6}
.lead-drafts-pagination{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:7px;margin-block:10px 0}
.lead-drafts-pagination>span{margin-inline-end:auto;color:var(--text-muted,#667085);font-size:.73rem}
.lead-drafts-review-dialog{box-sizing:border-box;width:min(760px,calc(100vw - 28px));max-width:760px;max-height:min(82vh,760px);padding:0;border:1px solid #dce3ee;border-radius:16px;background:#fff;color:var(--text-primary,#20304b);box-shadow:0 24px 70px rgba(19,35,62,.24)}
.lead-drafts-review-dialog::backdrop{background:rgba(17,27,45,.48);backdrop-filter:blur(2px)}
.lead-drafts-review-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-block-end:1px solid #e8edf4;background:#fff}
.lead-drafts-review-header>div{min-width:0}
.lead-drafts-review-header small,.lead-drafts-review-header span{display:block;color:var(--text-muted,#667085);font-size:.72rem}
.lead-drafts-review-header h3{margin:4px 0;color:var(--text-primary,#20304b);font-size:1rem}
.lead-drafts-review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:14px 18px 18px;overflow:auto}
.lead-drafts-review-item{display:grid;gap:5px;min-width:0;padding:10px 12px;border:1px solid #e8edf4;border-radius:10px;background:#fbfcfe}
.lead-drafts-review-item strong{color:#6b7890;font-size:.67rem}
.lead-drafts-review-item span{overflow-wrap:anywhere;color:#263852;font-size:.78rem;line-height:1.7}
.lead-drafts-review-dialog [data-lead-draft-review-close]{min-height:34px;padding:5px 12px}
@media(max-width:1100px){.lead-drafts-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.lead-drafts-search{grid-column:span 2}}
@media(max-width:760px){.lead-drafts-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.lead-drafts-search{grid-column:1/-1}.lead-drafts-filter-actions{grid-column:1/-1}.lead-drafts-review-grid{grid-template-columns:1fr;padding:12px}.lead-drafts-review-header{padding:13px 14px}.lead-drafts-pagination>span{flex-basis:100%;margin:0}}
@media(max-width:420px){.lead-drafts-filters{grid-template-columns:1fr}.lead-drafts-search,.lead-drafts-filter-actions{grid-column:1}}

/* Public lead-form intake P2 */
.public-lead-form-link{display:grid;grid-template-columns:minmax(210px,1fr) auto;align-items:center;gap:6px;min-width:min(100%,360px);margin:0}
.public-lead-form-link input{box-sizing:border-box;width:100%;min-width:0;min-height:34px;padding:6px 9px;border:1px solid #dbe2ec;border-radius:8px;background:#f8faff;color:#52627a;font: .68rem/1.4 ui-monospace,Consolas,monospace}
.public-lead-form-key-warning{max-width:250px;color:#8b5a14;font-size:.68rem;line-height:1.6}
.public-lead-form-response-detail,.public-lead-form-responses{margin-block:10px}
.public-lead-form-response-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-block-end:14px}
.public-lead-form-response-summary>span{display:grid;gap:4px;min-width:0;padding:10px 12px;border:1px solid #e6ebf2;border-radius:10px;background:#fbfcfe;color:#738097;font-size:.67rem}
.public-lead-form-response-summary b{overflow-wrap:anywhere;color:#293b56;font-size:.76rem}
.public-lead-form-answer-list{display:grid;gap:7px;margin-block:14px}
.public-lead-form-answer-list h3,.public-lead-form-mail-record h3{margin:0;color:#2b3b55;font-size:.88rem}
.public-lead-form-answer-list article{display:grid;grid-template-columns:minmax(150px,.4fr) minmax(0,1fr);gap:12px;padding:10px 12px;border:1px solid #e8edf4;border-radius:9px;background:#fff}
.public-lead-form-answer-list article>span{color:#758198;font-size:.7rem;font-weight:700}
.public-lead-form-answer-list article>strong{overflow-wrap:anywhere;color:#293b56;font-size:.77rem;font-weight:550;line-height:1.8}
.public-lead-form-consent-record{margin-block:14px;padding:12px 14px;border:1px solid #e6ebf2;border-radius:10px;background:#fafbfe;color:#46566f}
.public-lead-form-consent-record summary{cursor:pointer;font-size:.75rem;font-weight:750}
.public-lead-form-consent-record p{margin:10px 0 5px;font-size:.73rem;line-height:1.9}
.public-lead-form-consent-record small,.public-lead-form-mail-record>small{color:#7b8799;font-size:.66rem;line-height:1.7}
.public-lead-form-mail-record{display:grid;gap:8px;margin-block:14px;padding:12px;border:1px solid #e7ebf3;border-radius:10px;background:#fcfcff}
.public-lead-form-mail-list{display:grid;gap:6px}
.public-lead-form-mail-list article{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;padding:9px 10px;border:1px solid #e8edf4;border-radius:8px;background:#fff}
.public-lead-form-mail-list article>span{overflow-wrap:anywhere;color:#52627a;font-size:.7rem;direction:ltr;text-align:right}
.public-lead-form-mail-list article>small{grid-column:1/-1;color:#8490a1;font-size:.64rem;line-height:1.6}
.plf-mail-status{padding:3px 7px;border-radius:999px;background:#eef2f7;color:#58677c;font-size:.62rem;white-space:nowrap}
.plf-mail-status.status-sent{background:#e8f7ee;color:#176c44}
.plf-mail-status.status-dead_letter{background:#fff0ee;color:#9a3b31}
.plf-mail-status.status-retry_wait,.plf-mail-status.status-processing{background:#fff5df;color:#835c18}
.public-lead-form-response-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-block-start:14px;padding-block-start:12px;border-block-start:1px solid #edf0f5}
.public-lead-form-response-actions>span{color:#7a8799;font-size:.68rem}
.plf-duplicate-flag{display:block;margin-block-start:4px;color:#946518;font-size:.64rem}
.public-lead-form-response-table{min-width:820px}
.public-lead-form-responses .public-lead-form-search{margin-block-end:10px}
@media(max-width:900px){.public-lead-form-response-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.public-lead-form-row-actions{align-items:stretch}.public-lead-form-link{grid-template-columns:1fr;min-width:0;flex:1 1 100%}.public-lead-form-link button{justify-content:center}}
@media(max-width:620px){.public-lead-form-response-summary{grid-template-columns:1fr 1fr}.public-lead-form-answer-list article{grid-template-columns:1fr;gap:4px}.public-lead-form-mail-list article{grid-template-columns:1fr}.public-lead-form-mail-list article>small{grid-column:1}.public-lead-form-response-actions>*{flex:1 1 100%;justify-content:center}}
@media(prefers-reduced-motion:reduce){.public-lead-form-link input{transition:none}}

/* Public lead-form P4 response operations: compact workspace-scoped filters and delivery visibility. */
.public-lead-form-response-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-block-end:10px}
.public-lead-form-response-stats article{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;padding:9px 11px;border:1px solid #e5eaf2;border-radius:9px;background:#fbfcfe}
.public-lead-form-response-stats article>span{color:#78849a;font-size:.67rem;line-height:1.5}
.public-lead-form-response-stats article>strong{color:#263b58;font-size:.9rem;font-variant-numeric:tabular-nums}
.public-lead-form-response-stats article.is-attention{border-color:#f0d8b4;background:#fffaf1}
.public-lead-form-response-stats article.is-attention>strong{color:#9a5b17}
.public-lead-form-response-filters{display:grid;grid-template-columns:minmax(190px,1.7fr) repeat(4,minmax(125px,1fr)) auto;align-items:end;gap:8px;margin-block:0 12px;padding:10px;border:1px solid #e7ebf2;border-radius:10px;background:#f9fafe}
.public-lead-form-response-filters>label{display:grid;gap:4px;min-width:0;margin:0;color:#68758a;font-size:.65rem;font-weight:700}
.public-lead-form-response-filters input,.public-lead-form-response-filters select{box-sizing:border-box;width:100%;min-width:0;min-height:34px;height:34px;padding:5px 8px;border:1px solid #dce3ed;border-radius:7px;background:#fff;color:#34445d;font:inherit;font-size:.69rem}
.public-lead-form-response-filter-actions{display:flex;align-items:center;gap:6px;white-space:nowrap}
.public-lead-form-response-table{min-width:980px}
@media(max-width:1250px){.public-lead-form-response-filters{grid-template-columns:repeat(3,minmax(0,1fr))}.public-lead-form-response-filters>.is-search{grid-column:span 2}.public-lead-form-response-filter-actions{grid-column:1/-1;justify-content:flex-start}}
@media(max-width:760px){.public-lead-form-response-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.public-lead-form-response-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.public-lead-form-response-filters>.is-search{grid-column:1/-1}}
@media(max-width:440px){.public-lead-form-response-stats{grid-template-columns:1fr 1fr}.public-lead-form-response-stats article{align-items:flex-start;flex-direction:column;gap:2px}.public-lead-form-response-filters{grid-template-columns:1fr}.public-lead-form-response-filters>.is-search,.public-lead-form-response-filter-actions{grid-column:1}.public-lead-form-response-filter-actions>*{flex:1;justify-content:center}}

/* Public lead-form editor — compact RTL workflow aligned with Control surfaces. */
.public-lead-form-editor{overflow:visible}
.public-lead-form-editor-head{align-items:flex-start!important;gap:12px}
.public-lead-form-editor-head>div{display:grid;gap:4px;min-width:0}
.public-lead-form-editor-head h2{margin:0;font-size:.95rem}
.public-lead-form-editor-kicker{color:var(--crm-color-info,#2f78a7);font-size:.65rem;font-weight:750}
.public-lead-form-editor-head .control-muted{font-size:.69rem;line-height:1.75}
.public-lead-form-editor-body{display:grid;gap:12px}
.public-lead-form-editor-context{display:flex;align-items:flex-start;gap:9px;padding:10px 12px;border:1px solid var(--crm-color-border,#e4e9f1);border-radius:11px;background:var(--crm-color-surface-soft,#f8faff)}
.public-lead-form-editor-context>span{display:grid;place-items:center;flex:0 0 25px;width:25px;height:25px;border-radius:8px;background:var(--crm-color-primary-soft,#eeecff);color:var(--crm-color-primary-strong,#4b41c2);font-size:.75rem;font-weight:800}
.public-lead-form-editor-context>div{display:grid;gap:2px;min-width:0}
.public-lead-form-editor-context strong{color:var(--crm-color-ink,#1b2740);font-size:.71rem}
.public-lead-form-editor-context small{color:var(--crm-color-muted,#78849a);font-size:.67rem;line-height:1.7}
.public-lead-form-step-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.public-lead-form-step-nav>a{display:flex;align-items:center;gap:9px;min-width:0;padding:9px 11px;border:1px solid var(--crm-color-border,#e4e9f1);border-radius:11px;background:var(--crm-color-surface,#fff);color:inherit;text-decoration:none;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}
.public-lead-form-step-nav>a:hover{border-color:var(--crm-color-border-strong,#d5deea);background:var(--crm-color-surface-soft,#f8faff)}
.public-lead-form-step-nav>a:focus-visible{outline:3px solid rgb(92 75 221 / 22%);outline-offset:2px}
.public-lead-form-step-nav>a>span:first-child{display:grid;place-items:center;flex:0 0 27px;width:27px;height:27px;border-radius:9px;background:var(--crm-control-soft,#e8f0f8);color:var(--crm-control-primary,#123a63);font-size:.72rem;font-weight:800}
.public-lead-form-step-nav>a>span:last-child{display:grid;gap:2px;min-width:0}
.public-lead-form-step-nav strong{color:var(--crm-color-ink,#1b2740);font-size:.69rem}
.public-lead-form-step-nav small{color:var(--crm-color-muted,#78849a);font-size:.62rem}
.public-lead-form-builder{display:grid;gap:11px}
.public-lead-form-editor-stage{display:grid;gap:11px;min-width:0;padding:14px;border:1px solid var(--crm-color-border,#e4e9f1);border-radius:13px;background:linear-gradient(145deg,#fff 0%,#fcfdff 100%);scroll-margin-block-start:18px}
.public-lead-form-editor-stage-head{display:flex;align-items:flex-start;gap:10px;padding-block-end:9px;border-block-end:1px solid var(--crm-color-border,#e4e9f1)}
.public-lead-form-editor-stage-head>span{display:inline-flex;align-items:center;flex:0 0 auto;min-height:22px;padding:2px 8px;border-radius:999px;background:var(--crm-control-soft,#e8f0f8);color:var(--crm-control-primary,#123a63);font-size:.62rem;font-weight:750}
.public-lead-form-editor-stage-head>div{display:grid;gap:2px;min-width:0}
.public-lead-form-editor-stage-head h3{margin:0;color:var(--crm-color-ink,#1b2740);font-size:.8rem}
.public-lead-form-editor-stage-head p{margin:0;color:var(--crm-color-muted,#78849a);font-size:.66rem;line-height:1.7}
.public-lead-form-editor .public-lead-form-grid{margin:0}
.public-lead-form-editor .public-lead-form-fieldset{margin:0}
.public-lead-form-editor .public-lead-form-email-mode{display:grid;grid-template-columns:minmax(180px,.55fr) minmax(200px,1fr);align-items:center;gap:6px 12px;max-width:none;margin:10px 0 0;padding:10px 11px;border:1px solid var(--crm-color-border,#e4e9f1);border-radius:10px;background:var(--crm-color-surface-soft,#f8faff)}
.public-lead-form-editor .public-lead-form-email-mode>span{margin:0}
.public-lead-form-editor .public-lead-form-email-mode select{grid-column:2;grid-row:1;min-height:38px}
.public-lead-form-editor .public-lead-form-email-mode small{grid-column:1/-1;margin:0}
.public-lead-form-editor .public-lead-form-consent{margin:0}
.public-lead-form-editor .public-lead-form-stage-note{margin:0}
.public-lead-form-editor-footer-note{display:flex;align-items:flex-start;gap:8px;padding:8px 10px;border-radius:9px;background:#f7f9fc;color:var(--crm-color-muted,#78849a)}
.public-lead-form-editor-footer-note>span{color:var(--crm-color-success,#1c9a78);font-size:.8rem;font-weight:800}
.public-lead-form-editor-footer-note small{font-size:.66rem;line-height:1.7}
.public-lead-form-editor .public-lead-form-actions{position:sticky;inset-block-end:10px;z-index:4;margin:0;padding:10px;border:1px solid var(--crm-color-border,#e4e9f1);border-radius:12px;background:rgb(255 255 255 / 96%);box-shadow:0 8px 24px rgb(27 39 64 / 10%);backdrop-filter:blur(10px)}
.public-lead-form-editor .public-lead-form-actions .control-button{min-height:38px}
@media(max-width:760px){.public-lead-form-editor-head{align-items:flex-start!important}.public-lead-form-editor-head>a{flex:0 0 auto}.public-lead-form-step-nav{gap:6px}.public-lead-form-step-nav>a{gap:6px;padding:8px}.public-lead-form-editor-stage{padding:11px}}
@media(max-width:760px){.public-lead-form-core-fields,.public-lead-form-registry-fields{grid-template-columns:1fr}}
@media(max-width:760px){.public-lead-form-delivery{grid-template-columns:1fr}.public-lead-form-delivery legend{grid-column:1}.public-lead-form-editor .public-lead-form-delivery-recipient{grid-template-columns:1fr;gap:5px}.public-lead-form-editor .public-lead-form-delivery-recipient>span,.public-lead-form-editor .public-lead-form-delivery-recipient>input,.public-lead-form-editor .public-lead-form-delivery-recipient>small{grid-column:1;grid-row:auto}}
@media(max-width:620px){.public-lead-form-step-nav{grid-template-columns:1fr}.public-lead-form-step-nav>a{min-height:40px}.public-lead-form-editor .public-lead-form-email-mode{grid-template-columns:1fr}.public-lead-form-editor .public-lead-form-email-mode select,.public-lead-form-editor .public-lead-form-email-mode small{grid-column:1;grid-row:auto}.public-lead-form-editor .public-lead-form-actions{position:static;display:grid;grid-template-columns:1fr}.public-lead-form-editor .public-lead-form-actions>*{width:100%;justify-content:center}}
@media(prefers-reduced-motion:reduce){.public-lead-form-step-nav>a{transition:none}}

/* Public lead-form builder: interactive unsaved preview and A4 print/PDF output. */
.plf-builder-preview-document{min-height:100vh;margin:0;background:#f3f6fb;color:#1d2b43;font-family:Vazirmatn,Tahoma,Arial,sans-serif;direction:rtl}
.plf-builder-preview-page{display:grid;justify-items:center;gap:14px;padding:20px}
.plf-builder-preview-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 18px;width:min(100%,1000px);padding:12px 14px;border:1px solid #dce4ef;border-radius:13px;background:#fff;box-shadow:0 5px 18px rgb(28 45 75 / 6%)}
.plf-builder-preview-toolbar>div:first-child{display:grid;gap:3px;min-width:0}
.plf-builder-preview-toolbar>div:first-child strong{font-size:.82rem}
.plf-builder-preview-toolbar>div:first-child small,.plf-builder-preview-print-hint{margin:0;color:#6f7d92;font-size:.69rem;line-height:1.8}
.plf-builder-preview-toolbar-actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px}
.plf-builder-preview-toolbar-actions .control-button{min-height:36px}
.plf-builder-preview-print-hint,.plf-builder-preview-status{grid-column:1/-1}
.plf-builder-preview-status{margin:0;padding:7px 9px;border:1px solid #b7e4d3;border-radius:9px;background:#effaf5;color:#176e50;font-size:.72rem;line-height:1.8}
.plf-builder-preview-sheet{width:min(100%,1000px);box-sizing:border-box;padding:clamp(20px,4vw,40px);border:1px solid #e0e6ef;border-radius:17px;background:#fff;box-shadow:0 14px 40px rgb(25 43 73 / 8%)}
.plf-builder-preview-head{padding-block-end:17px;border-block-end:1px solid #e8edf4}
.plf-builder-preview-brand{display:inline-flex;color:#5d50cc;font-size:.72rem;font-weight:800}
.plf-builder-preview-head h1{margin:8px 0;color:#1e2d47;font-size:1.35rem;line-height:1.65}
.plf-builder-preview-head p{margin:0;color:#5f6d82;font-size:.82rem;line-height:2;white-space:normal}
.plf-builder-preview-head>small{display:block;margin-block-start:9px;color:#8490a2;font-size:.67rem}
.plf-builder-preview-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;padding-block:20px}
.plf-builder-preview-field{display:grid;align-content:start;gap:6px;min-width:0;break-inside:avoid;page-break-inside:avoid}
.plf-builder-preview-field.is-long{grid-column:1/-1}
.plf-builder-preview-label{display:grid;gap:6px;min-width:0;color:#34435b;font-size:.76rem;font-weight:750;line-height:1.7}
.plf-builder-preview-label>span:first-child b{color:#c74353}
.plf-builder-preview-label>span:first-child small{color:#a44853;font-size:.64rem}
.plf-builder-preview-control{display:block;min-width:0}
.plf-builder-preview-control :is(input,textarea,select){box-sizing:border-box;width:100%;min-height:43px;padding:9px 11px;border:1px solid #d8e0eb;border-radius:9px;background:#fff;color:#25354e;font:inherit;font-size:.75rem;font-weight:400}
.plf-builder-preview-control textarea{min-height:92px;resize:vertical;line-height:1.9}
.plf-builder-preview-control :is(input,textarea,select):focus{outline:3px solid rgb(94 80 204 / 15%);border-color:#8175dc}
.plf-builder-preview-help{color:#77849a;font-size:.64rem;font-weight:400;line-height:1.8}
.plf-builder-preview-help.is-sensitive{color:#9a4a54}
.plf-builder-preview-paper-answer{display:none}
.plf-builder-preview-consent{display:flex;align-items:flex-start;gap:9px;margin-block:0 16px;padding:12px;border:1px solid #e2e7ef;border-radius:10px;background:#fafbfe;color:#5c687a;font-size:.69rem;line-height:1.9;break-inside:avoid;page-break-inside:avoid}
.plf-builder-preview-consent input{flex:0 0 16px;width:16px;height:16px;margin:3px 0 0;accent-color:#6254d8}
.plf-builder-preview-submit{display:grid;place-items:center;min-height:43px;border-radius:9px;background:#6254d8;color:#fff;font-size:.78rem;font-weight:800}
.plf-preview-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){.plf-builder-preview-page{padding:10px}.plf-builder-preview-toolbar{grid-template-columns:1fr}.plf-builder-preview-toolbar-actions{display:grid;grid-template-columns:1fr 1fr}.plf-builder-preview-toolbar-actions a{grid-column:1/-1;justify-content:center}.plf-builder-preview-sheet{padding:18px;border-radius:13px}.plf-builder-preview-fields{grid-template-columns:1fr;gap:12px}.plf-builder-preview-field.is-long{grid-column:1}}
@media print{
  body.plf-builder-preview-document{min-height:0!important;background:#fff!important;color:#111!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  body.plf-builder-preview-document .plf-builder-preview-page{display:block!important;min-height:0!important;padding:0!important;background:#fff!important}
  body.plf-builder-preview-document .plf-builder-preview-toolbar{display:none!important}
  body.plf-builder-preview-document .plf-builder-preview-sheet{width:auto!important;max-width:none!important;margin:0!important;padding:0!important;overflow:visible!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important}
  body.plf-builder-preview-document .plf-builder-preview-head{padding-block-end:7mm!important;border-color:#cfd5de!important;break-inside:avoid;page-break-inside:avoid}
  body.plf-builder-preview-document .plf-builder-preview-head h1{margin:3mm 0 2mm!important;color:#111!important;font-size:16pt!important;line-height:1.7!important}
  body.plf-builder-preview-document .plf-builder-preview-head p{color:#333!important;font-size:10pt!important;line-height:1.9!important}
  body.plf-builder-preview-document .plf-builder-preview-head>small{color:#555!important;font-size:8.5pt!important}
  body.plf-builder-preview-document .plf-builder-preview-brand{color:#333!important;font-size:9pt!important}
  body.plf-builder-preview-document .plf-builder-preview-fields{grid-template-columns:1fr!important;gap:5mm!important;padding-block:6mm!important}
  body.plf-builder-preview-document .plf-builder-preview-field,body.plf-builder-preview-document .plf-builder-preview-consent{break-inside:avoid!important;page-break-inside:avoid!important}
  body.plf-builder-preview-document .plf-builder-preview-field.is-long{grid-column:auto!important}
  body.plf-builder-preview-document .plf-builder-preview-label{gap:2mm!important;color:#111!important;font-size:10pt!important;line-height:1.7!important}
  body.plf-builder-preview-document .plf-builder-preview-label>span:first-child b{color:#111!important}
  body.plf-builder-preview-document .plf-builder-preview-control{display:none!important}
  body.plf-builder-preview-document .plf-builder-preview-help{color:#444!important;font-size:8pt!important}
  body.plf-builder-preview-document .plf-builder-preview-paper-answer{display:block!important;min-height:12mm!important;margin-block-start:2mm!important;padding:2mm!important;border:1px solid #727b87!important;border-radius:1mm!important;background:#fff!important}
  body.plf-builder-preview-document .plf-builder-preview-paper-answer.is-long{min-height:38mm!important}
  body.plf-builder-preview-document .plf-builder-preview-paper-line{display:block!important;min-height:7mm!important;border-block-end:1px solid #c1c6cd!important}
  body.plf-builder-preview-document .plf-builder-preview-paper-choice{display:inline-flex!important;align-items:center!important;gap:1.5mm!important;margin:0 0 2mm 5mm!important;color:#111!important;font-size:8.5pt!important}
  body.plf-builder-preview-document .plf-builder-preview-paper-choice i{display:inline-block!important;width:4mm!important;height:4mm!important;border:1px solid #555!important;background:#fff!important}
  body.plf-builder-preview-document .plf-builder-preview-consent{margin-block:0 5mm!important;padding:3mm!important;border:1px solid #727b87!important;border-radius:1mm!important;background:#fff!important;color:#222!important;font-size:8.5pt!important;line-height:1.9!important}
  body.plf-builder-preview-document .plf-builder-preview-consent input{appearance:none!important;flex:0 0 4mm!important;width:4mm!important;height:4mm!important;margin:1mm 0 0!important;border:1px solid #555!important;border-radius:0!important;background:#fff!important}
  body.plf-builder-preview-document .plf-builder-preview-submit{display:none!important}
}

/* Customer support call assignment: compact lead-style actions with safe bulk selection. */
.customer-support-assignment-form{display:flex;align-items:end;flex-wrap:wrap;gap:8px 12px;margin:0 0 10px;padding:9px 11px;border:1px solid #e5eaf1;border-radius:11px;background:#f9fbfe;transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease}
.customer-support-assignment-form>label{display:grid;gap:4px;min-width:min(260px,100%);color:var(--muted,#728096);font-size:.68rem;font-weight:700}
.customer-support-assignment-form select{box-sizing:border-box;min-width:220px;min-height:36px;padding:6px 9px;border:1px solid #d9e1ec;border-radius:8px;background:#fff;color:var(--text,#25344c);font:inherit;font-size:.73rem}
.customer-support-assignment-form .field-help{flex:1 1 220px;margin:0;color:var(--muted,#728096);font-size:.67rem;line-height:1.75}
.customer-support-assignment-form .form-actions{margin:0}
.customer-support-assignment-form .button{min-height:36px;white-space:nowrap}
.customer-support-assignment-form.has-selection{border-color:#b9c9e8;background:#f4f7ff;box-shadow:0 5px 16px rgb(47 78 145 / 7%)}
.customer-select-cell{width:42px;text-align:center}
.customer-select-cell input{width:18px;height:18px;accent-color:var(--primary,#6254d8);cursor:pointer;vertical-align:middle}
.customers-table-card tbody tr:has([data-customer-select-item]:checked),.customer-call-queue tbody tr:has([data-customer-select-item]:checked){background:#f4f7ff}
.customer-assignment-cell{min-width:130px;color:#31435d;font-size:.75rem;font-weight:650}
.customer-assigned-name{display:inline-flex;align-items:center;gap:6px}
.customer-assigned-name::before{content:"";width:7px;height:7px;border-radius:50%;background:#30ad86;box-shadow:0 0 0 3px rgb(48 173 134 / 13%)}
.customer-unassigned-pill{display:inline-flex;align-items:center;min-height:24px;padding:2px 8px;border:1px solid #e7eaf0;border-radius:999px;background:#f7f8fa;color:#8791a0;font-size:.66rem;font-weight:650;white-space:nowrap}
.customer-row-actions .lead-row-action{flex:0 0 34px;min-width:34px;min-height:34px;border-radius:9px;transition:color .15s ease,background-color .15s ease,border-color .15s ease,transform .15s ease}
.customer-row-actions .lead-row-action:hover{transform:translateY(-1px)}
.customer-row-actions .lead-row-action:focus-visible,.customer-select-cell input:focus-visible{outline:3px solid rgb(90 80 220 / 24%);outline-offset:2px}
.customer-row-actions .lead-row-action svg{width:16px;height:16px}
.customer-queue-page-size{display:inline-flex;align-items:center;gap:6px;color:var(--muted,#728096);font-size:.68rem}
.customer-queue-page-size select{min-height:32px;padding:4px 8px;border:1px solid #dce3ed;border-radius:8px;background:#fff;color:var(--text,#25344c);font:inherit}
.customer-call-queue .panel-header{padding-block:10px}
.customer-call-queue .panel-header h2{font-size:15px}
.customer-call-queue .responsive-table{margin-block-start:2px}
.customer-call-queue tbody td{vertical-align:middle}
@media(max-width:760px){
  .customer-support-assignment-form{align-items:stretch;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:9px}
  .customer-support-assignment-form>label,.customer-support-assignment-form select{width:100%;min-width:0}
  .customer-support-assignment-form .form-actions,.customer-support-assignment-form .button{width:100%}
  .customer-support-assignment-form .field-help{grid-column:1}
  .customer-row-actions{justify-content:flex-start}
  .customer-call-queue>.pagination{gap:8px;flex-wrap:wrap}
  .customer-queue-page-size{flex:1 1 100%;justify-content:flex-start}
}

/* Customer list, call queue and follow-up pages: consistent compact spacing. */
.customers-page{gap:10px}
.customers-page .customers-header{padding-block:5px}
.customers-page .customers-tabs{box-sizing:border-box;width:max-content;max-width:100%;gap:4px;padding:4px;border-radius:11px}
.customers-page .customers-tabs a{min-height:36px;padding:7px 12px;font-size:12px}
.customers-page .customers-tabs a:focus-visible{outline:3px solid rgb(90 80 220 / 24%);outline-offset:2px}
.customers-filter-panel{margin:0}
.customers-filter-summary{min-height:42px;padding:9px 13px}
.customers-filter-body{padding:12px 14px}
.customers-filter-body .customers-filters{gap:8px 10px}
.customers-filter-body .customers-filters label{gap:4px}
.customer-list-page .customers-filter-body .filter-actions{align-items:center}
.customers-page .table-card{min-width:0}
.customers-page .table-card>.panel-header{min-height:0;padding:12px 15px}
.customers-page .table-card>.panel-header h2{margin:0;font-size:15px}
.customers-page .table-card>.responsive-table{margin:0;padding-inline:10px}
.customers-page .table-card th,.customers-page .table-card td{padding:9px 11px}
.customers-page .customers-pagination,.customer-activity-page .pagination{margin:0;padding:10px 14px;border-top:1px solid #eef1f5}
.customers-page .customer-support-assignment-form{margin:0 12px 9px}
.customer-calls-page{display:flex;flex-direction:column;gap:10px}
.customer-calls-page>.page-header{order:0}
.customer-calls-page>.customers-tabs{order:1}
.customer-calls-page>.customer-call-summary{order:2}
.customer-calls-page>.customer-call-filters{order:3}
.customer-calls-page>.customer-call-queue{order:4}
.customer-calls-page>.panel.table-card:not(.customer-call-queue){order:5}
.customer-call-summary{gap:9px;margin:0}
.customer-call-summary>div{min-height:62px;gap:4px;padding:10px 13px;border-radius:12px}
.customer-call-summary strong{font-size:1.12rem;line-height:1.35}
.customer-call-filters{margin:0;overflow:hidden}
.customer-call-filters .lead-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;gap:8px 10px;margin:0;padding:12px 14px}
.customer-call-filters label{min-width:0;gap:4px;font-size:.72rem}
.customer-call-filters .filter-search{grid-column:span 2;min-width:0}
.customer-call-filters .filter-actions{grid-column:1/-1;display:flex;align-items:center;gap:7px;margin:0}
.customer-call-queue .panel-header{min-height:0;padding:11px 15px}
.customer-call-queue .panel-header h2{margin:0;font-size:15px}
.customer-call-queue>.responsive-table{padding-inline:10px}
.customer-call-queue>.pagination{margin:0;padding:10px 14px;border-top:1px solid #eef1f5}
.customer-activity-page>.panel.table-card:not(.customer-call-queue)>.responsive-table{padding-inline:10px}
.customer-activity-page table tbody tr{transition:background-color .14s ease}
.customer-activity-page table tbody tr:hover{background:#fafbff}
.customer-activity-page table tbody td,.customer-list-page .customers-table-card table tbody td{line-height:1.65}
@media(max-width:900px){
  .customers-filter-body .customers-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
  .customer-call-filters .lead-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
  .customer-call-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:640px){
  .customers-page{gap:9px}
  .customers-page .customers-header{align-items:center}
  .customers-page .customers-tabs{width:100%;overflow-x:auto;scrollbar-width:thin}
  .customers-page .customers-tabs a{flex:0 0 auto}
  .customers-filter-body .customers-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .customer-call-filters .lead-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px 12px}
  .customer-call-filters .filter-search{grid-column:1/-1}
  .customer-call-summary>div{min-height:58px;padding:9px 10px}
  .customer-call-summary small{font-size:.65rem;line-height:1.55}
  .customers-page .table-card>.responsive-table,.customer-call-queue>.responsive-table{padding-inline:6px}
  .customers-page .customer-support-assignment-form{margin-inline:8px}
  .customer-activity-page>.panel.table-card:not(.customer-call-queue)>.responsive-table{padding-inline:6px}
  .customers-page .table-card:not(:has(.leads-table)) tbody{gap:8px;padding:8px}
  .customers-page .table-card:not(:has(.leads-table)) tr{padding:10px 12px;border-radius:12px}
  .customers-page .table-card:not(:has(.leads-table)) td{grid-template-columns:minmax(80px,30%) minmax(0,1fr);gap:8px;padding:8px 0}
  .customers-page .table-card:not(:has(.leads-table)) td[data-label="انتخاب"]{display:flex;align-items:center;gap:10px}
  .customers-page .table-card:not(:has(.leads-table)) td[data-label="انتخاب"]::before{flex:0 0 auto}
  .customers-page .table-card:not(:has(.leads-table)) td[data-label="عملیات"]{gap:7px}
}
@media(max-width:380px){
  .customer-call-summary{grid-template-columns:1fr}
  .customer-call-filters .lead-filters{grid-template-columns:1fr}
  .customer-call-filters .filter-search,.customer-call-filters .filter-actions{grid-column:1}
}

/* Customer workflow polish: expandable call filters, explicit queue sizing,
   aligned customer history and a readable create-customer dialog. */
.customer-call-filters{padding:0;border-color:#d8e1eb;background:#fff}
.customer-call-filter-summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:52px;padding:9px 15px;cursor:pointer;list-style:none}
.customer-call-filter-summary::-webkit-details-marker{display:none}
.customer-call-filter-summary>span:first-child{display:grid;gap:2px;min-width:0}
.customer-call-filter-summary strong{color:#233d5a;font-size:12px;line-height:1.6}
.customer-call-filter-summary small{color:#667a92;font-size:10px;line-height:1.7}
.customer-call-filter-toggle{display:inline-grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border:1px solid #dbe4ed;border-radius:8px;background:#f7faff;color:#385b7e;transition:transform .18s ease,background-color .18s ease}
.customer-call-filters[open] .customer-call-filter-toggle{transform:rotate(180deg);background:#edf5fb}
.customer-call-filter-summary:hover{background:#f8fbfe}
.customer-call-filter-summary:focus-visible{outline:3px solid rgb(37 111 157 / 20%);outline-offset:-3px}
.customer-call-filter-body{border-top:1px solid #e4ebf2;background:#fbfdff}
.customer-call-filter-body .lead-filters{padding:12px 15px}
.customer-call-filters label{color:#526781}
.customer-call-filters input:focus,.customer-call-filters select:focus{border-color:#5688ad;box-shadow:0 0 0 3px rgb(51 121 166 / 12%);outline:0}
.customer-call-queue .panel-header{border-bottom:1px solid #e8edf3;background:linear-gradient(180deg,#fff,#fbfdff)}
.customer-call-queue .panel-header .subtext{color:#62758c;line-height:1.8}
.customer-call-queue>.pagination{justify-content:flex-start;align-items:center;gap:8px 12px;background:#fbfcfe}
.customer-queue-range{flex:1 1 260px;color:#3e536d;font-size:11px;font-weight:650;line-height:1.8}
.customer-queue-page-size{display:grid;grid-template-columns:auto 92px;align-items:center;gap:2px 8px;min-width:210px;color:#405773;font-size:10px;font-weight:700}
.customer-queue-page-size select{width:100%;min-height:35px;border-color:#cbd8e5;color:#233b55;font-size:11px}
.customer-queue-page-size small{grid-column:1/-1;color:#687d94;font-size:9px;font-weight:500}
.customer-detail-page>.customer-activity-history-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
.customer-detail-page>.customer-activity-history-grid>.panel{min-width:0;border-color:#dfe6ef;border-radius:14px;background:#fff}
.customer-detail-page>.customer-activity-history-grid>.panel>.panel-header{min-height:48px;padding:11px 15px;border-bottom:1px solid #e9eef4;background:#fbfcfe}
.customer-detail-page>.customer-activity-history-grid>.panel>.panel-header h2{margin:0;color:#253d59;font-size:14px;line-height:1.65}
.customer-detail-page>.customer-activity-history-grid .activity-list{display:grid;align-content:start;gap:8px;padding:10px 12px 12px}
.customer-detail-page>.customer-activity-history-grid .activity-item{margin:0;padding:11px 12px;border:1px solid #e6ebf1;border-radius:10px;background:#fff}
.customer-detail-page>.customer-activity-history-grid .activity-item>strong{color:#263e5b;font-size:12px}
.customer-detail-page>.customer-activity-history-grid .activity-item>small{display:block;margin-top:4px;color:#687d94;font-size:10px;line-height:1.8}
.customer-detail-page>.customer-activity-history-grid .activity-item>p{margin:7px 0 0;color:#4c6078;font-size:11px;line-height:1.9;overflow-wrap:anywhere}
.customer-detail-page>.customer-activity-history-grid .activity-list>.muted{margin:0;padding:14px;color:#687d94;text-align:center}
#customer-create .modal-card{width:min(920px,100%);max-height:calc(100dvh - 40px);padding:22px 24px 18px;border:1px solid #dce5ef;border-radius:18px}
#customer-create .modal-card>h2{margin:0 48px 15px 0;padding-bottom:12px;border-bottom:1px solid #e9eef4;color:#243d5a;font-size:17px;line-height:1.7}
.customer-create-modal-body{gap:11px}
.customer-create-form{gap:11px}
.customer-form-section{padding:13px;border-color:#dce5ef;border-radius:13px;background:#fbfcfe}
.customer-form-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px;padding-bottom:9px;border-bottom:1px solid #e7edf3}
.customer-form-section-heading h3{margin:0;color:#293f5a;font-size:13px;line-height:1.7}
.customer-form-section-heading p{margin:2px 0 0;color:#687b90;font-size:10px;line-height:1.8}
.customer-form-section-heading>span{flex:0 0 auto;padding:5px 9px;border:1px solid #d8e5f0;border-radius:999px;background:#f3f8fc;color:#456681;font-size:9px;font-weight:700;white-space:nowrap}
.customer-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
.customer-form-grid>label{gap:5px;color:#52677f;font-size:11px;font-weight:650;line-height:1.65}
.customer-form-grid input,.customer-form-grid select{box-sizing:border-box;width:100%;min-width:0;min-height:39px;border-color:#cfdbe7;border-radius:9px;background:#fff;color:#263d57;font:inherit;font-size:12px}
.customer-form-grid input:focus,.customer-form-grid select:focus{border-color:#5485a8;box-shadow:0 0 0 3px rgb(51 121 166 / 12%);outline:0}
.customer-form-grid>.customer-form-field-wide,.customer-form-grid-purchase>.form-span-2,.customer-form-grid-purchase>.sale-batch-lines{grid-column:1/-1}
.customer-form-inline-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.customer-form-grid-purchase .sale-batch-lines{gap:9px;padding:10px;border-color:#dbe4ee;background:#f6f9fc}
.customer-form-grid-purchase .sale-batch-line{grid-template-columns:minmax(0,1.7fr) minmax(80px,.55fr) minmax(0,1fr);gap:9px;padding:9px;border-color:#dfe7ef}
.customer-form-grid-purchase .sale-batch-line label{display:grid;gap:5px;color:#52677f;font-size:10px;font-weight:650}
.customer-form-grid-purchase .sale-batch-total{padding:7px 9px;border-radius:8px;background:#edf5fb;color:#294d6e;font-size:11px;font-weight:700;line-height:1.8}
.customer-create-form>.form-actions{position:sticky;bottom:0;z-index:2;display:flex;justify-content:flex-start;margin:0;padding:11px 0 2px;border-top:1px solid #e4eaf1;background:linear-gradient(180deg,rgb(255 255 255 / 92%),#fff 35%)}
.customer-create-form>.form-actions .button{min-width:180px;min-height:42px;justify-content:center}
@media(max-width:760px){
  #customer-create .modal-card{width:100%;max-height:100dvh;padding:20px 16px calc(24px + env(safe-area-inset-bottom));border-radius:0}
  .customer-detail-page>.customer-activity-history-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .customer-queue-page-size{flex:0 1 230px}
}
@media(max-width:620px){
  .customer-detail-page>.customer-activity-history-grid{grid-template-columns:1fr}
  .customer-call-filter-summary{min-height:48px;padding-inline:11px}
  .customer-call-filter-body .lead-filters{padding:10px}
  .customer-queue-range{flex:1 1 100%}
  .customer-queue-page-size{width:100%;min-width:0;flex:1 1 100%}
  .customer-form-grid,.customer-form-inline-fields,.customer-form-grid-purchase .sale-batch-line{grid-template-columns:1fr}
  .customer-form-grid>.customer-form-field-wide,.customer-form-grid-purchase>.form-span-2,.customer-form-grid-purchase>.sale-batch-lines{grid-column:1}
  .customer-form-section{padding:10px}
  .customer-form-section-heading{align-items:flex-start}
  .customer-form-section-heading>span{max-width:42%;white-space:normal;text-align:center}
  .customer-create-form>.form-actions .button{width:100%}
}

/* Solar Hijri period controls on individual agent performance reports. */
.agent-performance-hero{align-items:center;gap:14px 18px}
.agent-performance-identity{min-width:170px}
.agent-performance-identity h2{color:#243b55;font-size:17px;line-height:1.6}
.agent-performance-identity p{color:#536981}
.agent-performance-identity>small{display:block;margin-top:5px;color:#63778d;font-size:10px;line-height:1.8}
.agent-performance-filter{display:grid;grid-template-columns:minmax(150px,1.25fr) repeat(2,minmax(120px,1fr)) auto;align-items:end;gap:8px 10px;flex:1 1 570px;max-width:850px;padding:12px;border:1px solid #dce5ee;border-radius:13px;background:#f9fbfd}
.agent-performance-filter label{min-width:0;gap:5px;color:#52677e;font-size:10px;font-weight:700}
.agent-performance-filter input,.agent-performance-filter select{box-sizing:border-box;width:100%;min-width:0;min-height:38px;padding:7px 10px;border:1px solid #ccd9e5;border-radius:9px;background:#fff;color:#263d57;font:inherit;font-size:11px}
.agent-performance-filter input:focus,.agent-performance-filter select:focus{border-color:#5685a7;box-shadow:0 0 0 3px rgb(40 111 157 / 12%);outline:0}
.agent-performance-filter input[readonly]{background:#f0f4f8;color:#415a73;cursor:default}
.agent-performance-filter .agent-performance-period-field select{font-weight:750;color:#244866}
.agent-performance-filter>.button{min-height:38px;white-space:nowrap}
.agent-performance-range-note{grid-column:1/-1;color:#61778e;font-size:10px;line-height:1.8}
.agent-performance-range-note strong{color:#294d6d;font-weight:750}
.agent-performance-daily>.panel-header,.agent-performance-events>.panel-header{border-bottom:1px solid #e6edf3}
.agent-performance-daily>.panel-header h3,.agent-performance-events>.panel-header h3{margin:0;color:#263f5b;font-size:14px}
@media(max-width:900px){
  .agent-performance-filter{grid-template-columns:repeat(2,minmax(0,1fr));flex-basis:100%;max-width:none;margin-inline-start:0}
  .agent-performance-period-field,.agent-performance-range-note{grid-column:1/-1}
}
@media(max-width:520px){
  .agent-performance-hero{align-items:stretch;padding:13px}
  .agent-performance-filter{grid-template-columns:1fr;gap:9px;padding:10px}
  .agent-performance-period-field,.agent-performance-range-note{grid-column:1}
  .agent-performance-filter>.button{width:100%;justify-content:center}
}

/* Compact, server-paginated search controls for agent history lists. */
.agent-performance-search{margin:10px 14px 12px;border:1px solid #dfe7ef;border-radius:11px;background:#f8fafc;overflow:hidden}
.agent-performance-search>summary{display:flex;align-items:center;gap:8px;min-height:38px;padding:7px 12px;color:#35536f;font-size:11px;font-weight:750;cursor:pointer;list-style:none}
.agent-performance-search>summary::-webkit-details-marker{display:none}
.agent-performance-search>summary::before{content:"⌕";display:grid;place-items:center;width:21px;height:21px;border-radius:7px;background:#e9f1f8;color:#32698f;font-size:16px;line-height:1}
.agent-performance-search>summary::after{content:"نمایش";margin-inline-start:auto;color:#74869a;font-size:10px;font-weight:600}
.agent-performance-search[open]>summary{border-bottom:1px solid #e2eaf1}
.agent-performance-search[open]>summary::after{content:"بستن"}
.agent-performance-search-form{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;align-items:end;gap:8px;padding:10px 12px}
.agent-performance-search-form label{display:grid;gap:5px;color:#52677e;font-size:10px;font-weight:700}
.agent-performance-search-form input{box-sizing:border-box;width:100%;min-width:0;min-height:36px;padding:7px 10px;border:1px solid #ccd9e5;border-radius:9px;background:#fff;color:#263d57;font:inherit;font-size:11px}
.agent-performance-search-form input:focus{border-color:#5685a7;box-shadow:0 0 0 3px rgb(40 111 157 / 12%);outline:0}
.agent-performance-search-form>.button{min-height:36px;white-space:nowrap}
.agent-performance-search-clear{color:#52677e}
.agent-performance-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 14px 14px;padding:9px 11px;border:1px solid #e1e8f0;border-radius:11px;background:#fbfcfe}
.agent-performance-pagination-summary{color:#5c7085;font-size:10px;line-height:1.8;white-space:nowrap}
.agent-performance-pagination-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.agent-performance-pagination-actions>.button{min-height:32px;padding-inline:9px;font-size:10px}
.agent-performance-pagination-actions>.is-disabled{display:inline-flex;align-items:center;justify-content:center;color:#9aa8b6;background:#f0f3f6;border-color:#e0e6ec;cursor:not-allowed;pointer-events:none}
@media(max-width:700px){
  .agent-performance-search{margin-inline:10px}
  .agent-performance-search-form{grid-template-columns:minmax(0,1fr) auto;}
  .agent-performance-search-form label{grid-column:1/-1}
  .agent-performance-pagination{align-items:stretch;flex-direction:column;margin-inline:10px}
  .agent-performance-pagination-summary{text-align:center}
  .agent-performance-pagination-actions{justify-content:center}
}
@media(max-width:420px){
  .agent-performance-search-form{grid-template-columns:1fr 1fr}
  .agent-performance-search-form label{grid-column:1/-1}
  .agent-performance-search-form>.button{width:100%;justify-content:center}
  .agent-performance-pagination-actions>.button{flex:1 1 calc(50% - 6px)}
}

/* Project calendar P1: bounded-view layouts, accessible filters and mobile agenda */
.project-calendar-page{min-width:0}
.project-calendar-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.project-calendar-views,.project-calendar-nav{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.project-calendar-views{padding:3px;border:1px solid #e2e8f0;border-radius:11px;background:#f7f9fc}
.project-calendar-views .button{min-width:52px;text-align:center}
.project-calendar-views .button[aria-current=page]{box-shadow:0 4px 12px rgba(70,62,190,.16)}
.project-calendar-filterbox{margin:12px 14px 0;border:1px solid #e2e8f0;border-radius:11px;background:#fbfcfe}
.project-calendar-filterbox>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px;padding:9px 12px;cursor:pointer;list-style:none;color:#334b62;font-size:12px;font-weight:800}
.project-calendar-filterbox>summary::-webkit-details-marker{display:none}
.project-calendar-filterbox>summary:after{content:"+";display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:#edf2f8;color:#56728b;font-size:16px}
.project-calendar-filterbox[open]>summary:after{content:"−"}
.project-calendar-filterbox>summary small{margin-inline-start:auto;color:#7c8998;font-size:10px;font-weight:500}
.project-calendar-filter-form{display:grid;grid-template-columns:minmax(190px,2fr) repeat(3,minmax(130px,1fr)) auto;align-items:end;gap:9px;padding:0 12px 12px}
.project-calendar-filter-form label{display:grid;gap:5px;min-width:0;color:#687b8c;font-size:10px;font-weight:700}
.project-calendar-filter-form input,.project-calendar-filter-form select{width:100%;min-width:0;min-height:38px;border:1px solid #d8e1ec;border-radius:9px;background:#fff;color:#283e53;padding:7px 10px;font:inherit}
.project-calendar-filter-form input:focus,.project-calendar-filter-form select:focus{outline:2px solid rgba(91,80,230,.22);border-color:#8177e7}
.project-calendar-filter-actions{display:flex;gap:6px;align-items:center}
.project-calendar-cap-notice{margin:10px 14px 0;padding:9px 11px;border:1px solid #f2dfb3;border-radius:9px;background:#fffaf0;color:#775b22;font-size:11px;line-height:1.8}
.project-calendar-day>header>a{display:inline-grid;place-items:center;min-width:27px;min-height:27px;border-radius:8px;color:inherit;text-decoration:none}
.project-calendar-day>header>a:hover,.project-calendar-day>header>a:focus-visible{outline:2px solid #8177e7;background:#f5f3ff}
.project-calendar-more{display:block;padding:3px 5px;border-radius:6px;color:#5e58bd;text-decoration:none;font-size:10px;font-weight:700}
.project-calendar-more:hover,.project-calendar-more:focus-visible{background:#f2f0ff;outline:2px solid #8177e7}
.project-calendar-week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;padding:12px}
.project-calendar-week-day{min-width:0;min-height:170px;padding:9px;border:1px solid #e2e8ee;border-radius:11px;background:#fff}
.project-calendar-week-day.is-today{border-color:#8177e7;background:#fcfbff;box-shadow:0 0 0 2px rgba(91,80,230,.08)}
.project-calendar-week-day>header{display:grid;grid-template-columns:1fr auto;gap:4px 8px;padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid #edf0f4;color:#3c5268}
.project-calendar-week-day>header span{font-size:10px;color:#788797}
.project-calendar-week-day>header strong{font-size:12px}
.project-calendar-week-day>header small{grid-column:1/-1;color:#8995a2;font-size:9px}
.project-calendar-day-empty{margin:0;padding:8px 4px;color:#8995a2;font-size:10px}
.project-calendar-list{display:grid;gap:0;padding:0 14px}
.project-calendar-list-day{display:grid;grid-template-columns:minmax(160px,220px) minmax(0,1fr);gap:12px;padding:12px 3px;border-bottom:1px solid #edf0f4}
.project-calendar-list-day>header{display:grid;grid-template-columns:1fr auto;align-content:start;gap:4px 8px;color:#40566b}
.project-calendar-list-day>header strong{font-size:11px}
.project-calendar-list-day>header span{font-size:11px;font-weight:700}
.project-calendar-list-day>header small{grid-column:1/-1;color:#8995a2;font-size:9px}
.project-calendar-list-day>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.project-calendar-agenda-mobile{display:none}
.project-calendar-empty{padding:18px 12px;border:1px dashed #dce4ed;border-radius:10px;background:#fafbfd;color:#7c8998;text-align:center;font-size:11px}
.project-calendar-empty-wide{margin:0 14px 12px}
.project-calendar-unplanned{margin:0 14px 14px;padding:12px;border:1px solid #e4eaf0;border-radius:11px;background:#fbfcfe}
.project-calendar-unplanned>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}
.project-calendar-unplanned h3{margin:0;color:#314a61;font-size:12px}
.project-calendar-unplanned>header small{display:block;margin-top:3px;color:#83909c;font-size:10px}
.project-calendar-unplanned>header>strong{display:grid;place-items:center;min-width:32px;min-height:30px;padding:0 8px;border-radius:9px;background:#eef2f8;color:#39546d;font-size:13px}
.project-calendar-unplanned-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.project-calendar-unplanned-item{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:7px;min-width:0;padding:8px 9px;border:1px solid #e5eaf0;border-radius:8px;background:#fff;color:#344b61;text-decoration:none}
.project-calendar-unplanned-item:hover,.project-calendar-unplanned-item:focus-visible{outline:2px solid rgba(91,80,230,.2);border-color:#b7b1f3}
.project-calendar-unplanned-item>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.project-calendar-unplanned-item>small{color:#7d8997;font-size:9px}
.project-calendar-status{width:7px;height:7px;border-radius:50%;background:#6f91ab}
.project-calendar-status.status-in_progress{background:#d09543}
.project-calendar-status.status-done{background:#4ba877}
.project-calendar-status.status-blocked{background:#c86b73}
.project-calendar-unplanned-more{display:inline-block;margin-top:8px;color:#5e58bd;font-size:10px;font-weight:700;text-decoration:none}
.project-calendar-footer{min-width:0}
@media(max-width:900px){
 .project-calendar-header{align-items:flex-start}
 .project-calendar-toolbar{justify-content:flex-start}
 .project-calendar-filter-form{grid-template-columns:repeat(2,minmax(0,1fr))}
 .project-calendar-week-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .project-calendar-day{min-height:100px}
}
@media(max-width:650px){
 .project-calendar-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .project-calendar-summary>div:first-child{grid-column:1/-1}
 .project-calendar-header{gap:11px}
 .project-calendar-header small{line-height:1.8}
 .project-calendar-toolbar{display:grid;grid-template-columns:1fr;width:100%}
 .project-calendar-views,.project-calendar-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
 .project-calendar-views .button,.project-calendar-nav .button{min-width:0;padding-inline:7px}
 .project-calendar-filterbox{margin:10px 9px 0}
 .project-calendar-filter-form{grid-template-columns:1fr;gap:8px}
 .project-calendar-filter-actions{display:grid;grid-template-columns:1fr 1fr}
 .project-calendar-page.view-month .project-calendar-weekdays,.project-calendar-page.view-month .project-calendar-grid{display:none}
 .project-calendar-page.view-month .project-calendar-agenda-mobile{display:grid;gap:7px;padding:10px}
 .project-calendar-agenda-day{padding:9px;border:1px solid #e4eaf0;border-radius:10px;background:#fff}
 .project-calendar-agenda-day>header{display:flex;justify-content:space-between;gap:8px;margin-bottom:7px;color:#40566b;font-size:10px;font-weight:800}
 .project-calendar-agenda-day>header a{color:inherit;text-decoration:none}
 .project-calendar-agenda-day>header span{color:#84909d;font-size:9px}
 .project-calendar-agenda-day>div{display:grid;gap:5px}
 .project-calendar-page.view-week .project-calendar-week-grid{grid-template-columns:1fr;padding:9px}
 .project-calendar-week-day{min-height:0}
 .project-calendar-list{padding:0 9px}
 .project-calendar-list-day{grid-template-columns:1fr;gap:7px;padding:10px 2px}
 .project-calendar-list-day>div{grid-template-columns:1fr}
 .project-calendar-unplanned{margin:0 9px 10px;padding:9px}
 .project-calendar-unplanned-list{grid-template-columns:1fr}
 .project-calendar-footer{display:flex;min-width:0;gap:9px;padding:10px;white-space:normal}
 .project-calendar-footer .button{margin-inline-start:0}
 .project-calendar-empty-wide{margin-inline:9px}
}

.project-calendar-pagination{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;padding:11px 14px;border-top:1px solid #edf0f4}
.project-calendar-pagination>span{padding:0 7px;color:#687b8c;font-size:10px;font-weight:700}
.project-calendar-pagination [aria-disabled=true]{opacity:.45;pointer-events:none}
@media(max-width:650px){.project-calendar-pagination{gap:4px;padding:9px}.project-calendar-pagination .button{padding-inline:8px}}

@media(max-width:650px){
 .project-calendar-panel{overflow:hidden}
 .project-calendar-page.view-month .project-calendar-weekdays,
 .project-calendar-page.view-month .project-calendar-grid{min-width:0}
}

.project-calendar-jump{display:flex;align-items:center;gap:5px}
.project-calendar-jump input{width:124px;min-width:0;min-height:34px;border:1px solid #d8e1ec;border-radius:8px;background:#fff;padding:5px 8px;color:#344b61;font:inherit;font-size:10px}
.project-calendar-jump input:focus-visible{outline:2px solid rgba(91,80,230,.24);border-color:#8177e7}
@media(max-width:650px){.project-calendar-jump{display:grid;grid-template-columns:minmax(0,1fr) auto;width:100%}.project-calendar-jump input{width:100%;min-height:38px}}

/* Project calendar stage 2: in-calendar scheduling controls. */
.project-calendar-interaction-hint{margin:8px 14px 0;padding:8px 10px;border-inline-start:3px solid #7066df;border-radius:7px;background:#f6f5ff;color:#625da0;font-size:10px;line-height:1.8}
.project-calendar-quick-create{margin:10px 14px;border:1px solid #dfe6ef;border-radius:11px;background:#fff;box-shadow:0 4px 14px rgba(36,55,75,.035)}
.project-calendar-quick-create>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px;padding:8px 12px;cursor:pointer;list-style:none;color:#304960;font-size:12px;font-weight:800}
.project-calendar-quick-create>summary::-webkit-details-marker{display:none}
.project-calendar-quick-create>summary:after{content:"+";display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:#f0efff;color:#5f56dc;font-size:17px}
.project-calendar-quick-create[open]>summary:after{content:"−"}
.project-calendar-quick-create>summary small{margin-inline-start:auto;color:#8190a0;font-size:10px;font-weight:500}
.project-calendar-quick-create-form{display:grid;grid-template-columns:minmax(190px,2fr) repeat(3,minmax(125px,1fr));align-items:end;gap:9px;padding:0 12px 12px}
.project-calendar-quick-create-form>label,.project-calendar-reschedule-form>label{display:grid;gap:5px;min-width:0;color:#66798b;font-size:10px;font-weight:700}
.project-calendar-quick-create-form input,.project-calendar-quick-create-form select,.project-calendar-quick-create-form textarea,.project-calendar-reschedule-form input{width:100%;min-width:0;min-height:36px;border:1px solid #d8e1ec;border-radius:8px;background:#fff;padding:6px 8px;color:#2c4358;font:inherit;font-size:11px}
.project-calendar-quick-create-form input:focus-visible,.project-calendar-quick-create-form select:focus-visible,.project-calendar-quick-create-form textarea:focus-visible,.project-calendar-reschedule-form input:focus-visible{outline:2px solid rgba(91,80,230,.22);border-color:#8177e7}
.project-calendar-quick-create-form .project-date-time-fields,.project-calendar-reschedule-form .project-date-time-fields{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:5px;min-width:0}
.project-calendar-quick-create-form .calendar-create-title{grid-column:span 2}
.project-calendar-quick-create-form .calendar-create-description{grid-column:1/-1}
.project-calendar-quick-create-form textarea{resize:vertical;min-height:42px}
.calendar-create-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:9px}
.calendar-create-actions small{color:#83909d;font-size:9px}
.project-calendar-day[data-calendar-drop-date],.project-calendar-week-day[data-calendar-drop-date],.project-calendar-list-day[data-calendar-drop-date],.project-calendar-agenda-day[data-calendar-drop-date]{transition:background-color .15s,border-color .15s,box-shadow .15s}
.project-calendar-day.is-calendar-drop-target,.project-calendar-week-day.is-calendar-drop-target,.project-calendar-list-day.is-calendar-drop-target,.project-calendar-agenda-day.is-calendar-drop-target{border-color:#766ce7!important;background:#f4f2ff!important;box-shadow:inset 0 0 0 2px rgba(118,108,231,.22)}
.project-calendar-day:has(.project-calendar-reschedule[open]),.project-calendar-week-day:has(.project-calendar-reschedule[open]),.project-calendar-list-day:has(.project-calendar-reschedule[open]),.project-calendar-agenda-day:has(.project-calendar-reschedule[open]){z-index:12}
.project-calendar-task-wrap{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 22px;align-items:start;gap:3px;min-width:0}
.project-calendar-day{overflow:visible}
.project-calendar-task.is-reschedulable{cursor:grab;touch-action:pan-y}
.project-calendar-task.is-reschedulable:active,.project-calendar-task.is-calendar-dragging{cursor:grabbing;opacity:.62}
.project-calendar-task-wrap>.project-calendar-task{min-width:0}
.project-calendar-reschedule{position:relative;min-width:0}
.project-calendar-reschedule>summary{display:grid;place-items:center;width:22px;height:24px;border:1px solid #e3e8ef;border-radius:7px;background:#fff;color:#718092;cursor:pointer;list-style:none;font-size:14px;font-weight:900;line-height:1}
.project-calendar-reschedule>summary::-webkit-details-marker{display:none}
.project-calendar-reschedule>summary:hover,.project-calendar-reschedule>summary:focus-visible{outline:2px solid rgba(91,80,230,.2);border-color:#b9b4f0;color:#5c55c6}
.project-calendar-reschedule-form{position:absolute;z-index:30;inset-inline-end:0;top:28px;display:grid;width:min(310px,calc(100vw - 32px));gap:8px;padding:11px;border:1px solid #dce3ed;border-radius:10px;background:#fff;box-shadow:0 14px 34px rgba(30,48,68,.2);text-align:start}
.project-calendar-reschedule-form>small{color:#7c8997;font-size:9px;line-height:1.7}
.project-calendar-reschedule-form .button{justify-self:start}
.project-calendar-add-day{display:inline-flex;align-items:center;justify-content:center;gap:3px;min-width:22px;min-height:22px;padding:0 5px;border:1px solid #e0e4f3;border-radius:7px;background:#fafaff;color:#625bd0;text-decoration:none;font-size:10px;font-weight:800}
.project-calendar-add-day:hover,.project-calendar-add-day:focus-visible{outline:2px solid rgba(91,80,230,.18);border-color:#b8b2f0;background:#f1efff}
.project-calendar-page .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:900px){.project-calendar-quick-create-form{grid-template-columns:repeat(2,minmax(0,1fr))}.project-calendar-quick-create-form .calendar-create-title{grid-column:1/-1}}
@media(max-width:650px){
 .project-calendar-panel{overflow:visible!important}
 .project-calendar-interaction-hint{margin:7px 9px 0}
 .project-calendar-quick-create{margin:8px 9px}
 .project-calendar-quick-create-form{grid-template-columns:1fr;gap:8px;padding-inline:9px}
 .project-calendar-quick-create-form .calendar-create-title,.project-calendar-quick-create-form .calendar-create-description,.calendar-create-actions{grid-column:1}
 .calendar-create-actions{align-items:stretch;flex-direction:column}
 .project-calendar-quick-create>summary{flex-wrap:wrap}
 .project-calendar-quick-create>summary small{flex-basis:100%;margin-inline-start:0}
 .project-calendar-reschedule-form{position:fixed;inset-inline:12px;top:50%;width:auto;max-height:min(78vh,620px);overflow:auto;transform:translateY(-50%)}
 .project-calendar-add-day{min-height:28px}
 .project-calendar-task-wrap{grid-template-columns:minmax(0,1fr) 28px;gap:4px}
 .project-calendar-reschedule>summary{width:28px;height:30px}
}

/* Customer service queue: compact, scannable work items with stable RTL flow. */
.customer-service-queue-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:10px;margin-block:12px}
.customer-service-queue-card{display:grid;gap:5px;min-height:92px;padding:13px 15px;border:1px solid var(--border,#e2e8f0);border-radius:14px;background:var(--surface,#fff);color:inherit;text-decoration:none;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease}
.customer-service-queue-card:hover,.customer-service-queue-card:focus-visible{border-color:#a9a3f2;background:#faf9ff;box-shadow:0 7px 20px rgba(51,65,125,.08);transform:translateY(-1px);outline:none}
.customer-service-queue-card strong{font-size:22px;line-height:1.15;color:#182b49;font-variant-numeric:tabular-nums}
.customer-service-queue-card small,.customer-service-queue-card span{color:#64748b;font-size:12px;line-height:1.55}
.customer-service-queue-card.is-active{border-color:#6c5ce7;background:#f5f3ff;box-shadow:inset 0 0 0 1px rgba(108,92,231,.14)}
.customer-service-queue-card.is-risk strong,.customer-service-queue-card.is-risk.is-active{color:#b42318}
.customer-service-workload{margin-block:12px;padding:0 14px}
.customer-service-workload-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;padding:0 0 12px}
.customer-service-workload-list>div,.customer-service-workload-list>a{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;padding:10px 12px;border:1px solid #e7ebf3;border-radius:10px;background:#fbfcfe;color:inherit;text-decoration:none;font-size:12px;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}
.customer-service-workload-list>a:hover,.customer-service-workload-list>a:focus-visible{border-color:#a9a3f2;background:#f8f7ff;box-shadow:0 4px 12px rgba(51,65,125,.07);outline:none}
.customer-service-workload-list strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#26364f}
.customer-service-workload-list .is-overdue{color:#b42318;font-weight:700}
.customer-service-filters{margin-block:12px}
.customer-service-filters .customer-call-filter-body{padding:12px 14px}
.customer-service-filters .lead-filters{gap:10px}
.customer-service-followups-table tr.is-overdue{background:#fff9f8}
.customer-service-followups-table tr.is-overdue td:first-child{box-shadow:inset -3px 0 #d92d20}
.customer-service-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 14px;border-top:1px solid #e8edf4}
.customer-service-pagination>div{display:flex;gap:7px;flex-wrap:wrap}
.customer-service-bulk-assignment{padding:10px 12px;border-block:1px solid #edf0f5;background:#fbfcff}
.customer-service-bulk-assignment .customer-support-assignment-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.customer-service-bulk-assignment .customer-support-assignment-form .field-help{flex-basis:100%;margin:0}
.customer-service-bulk-assignment .customer-support-assignment-form label{min-width:min(260px,100%);margin:0}
.customer-service-history-list{display:grid;gap:0;margin:0;padding:0 16px 12px;list-style:none}
.customer-service-history-list li{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid #edf0f5}
.customer-service-history-list li:last-child{border-bottom:0}
.customer-service-history-list li>div{display:grid;gap:3px;min-width:0}
.customer-service-history-list li span,.customer-service-history-list li p,.customer-service-history-list li small{color:#64748b;font-size:12px;line-height:1.7}
.customer-service-history-list li>small{flex:none;text-align:end}
.customer-service-followup-result-form{display:grid;gap:12px}
.customer-service-followup-result-form fieldset{display:grid;gap:10px;min-width:0;margin:0;padding:12px;border:1px solid #e7ebf3;border-radius:11px;background:#fbfcfe}
.customer-service-followup-result-form legend{padding-inline:6px;color:#344463;font-size:13px;font-weight:700}
.customer-service-followup-form label,.customer-service-followup-result-form label{display:grid;gap:6px;color:#475569;font-size:12px;font-weight:600}
.customer-service-followup-result-form textarea{min-height:84px;resize:vertical}
.customer-service-reschedule-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.customer-service-followup-result-form [hidden]{display:none!important}
@media(max-width:650px){
 .customer-service-queue-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .customer-service-queue-card{min-height:82px;padding:10px 11px}
 .customer-service-workload-list{grid-template-columns:1fr}
 .customer-service-pagination{align-items:flex-start}
 .customer-service-pagination>div{width:100%}
 .customer-service-pagination .button{flex:1;justify-content:center}
 .customer-service-bulk-assignment .customer-support-assignment-form{align-items:stretch;flex-direction:column}
 .customer-service-bulk-assignment .customer-support-assignment-form label{min-width:0}
 .customer-service-history-list li{flex-direction:column;gap:3px}
 .customer-service-history-list li>small{text-align:start}
 .customer-service-reschedule-fields{grid-template-columns:1fr}
}

/* Customer service phase 2: scoped SLA and service-performance reporting. */
.customer-service-report-controls,.customer-service-report-table{margin-block:12px;overflow:hidden}
.customer-service-report-controls>.panel-header,.customer-service-report-table>.panel-header{padding:12px 15px;border-bottom:1px solid #edf0f5}
.customer-service-report-filter-form{display:grid;grid-template-columns:repeat(3,minmax(145px,1fr)) auto;align-items:end;gap:9px;padding:12px 14px 8px}
.customer-service-report-filter-form>label{display:grid;gap:5px;min-width:0;color:#64748b;font-size:11px;font-weight:700}
.customer-service-report-filter-form input,.customer-service-report-filter-form select{width:100%;min-width:0;min-height:38px;border:1px solid #d8e1ec;border-radius:8px;background:#fff;padding:7px 9px;color:#26364f;font:inherit;font-size:12px}
.customer-service-report-filter-form input:focus-visible,.customer-service-report-filter-form select:focus-visible{outline:2px solid rgba(91,80,230,.22);border-color:#8177e7}
.customer-service-report-filter-form .form-actions{display:flex;align-items:center;gap:7px;margin:0;white-space:nowrap}
.customer-service-report-range{margin:0;padding:0 14px 11px;color:#66798b;font-size:11px;line-height:1.7}
.customer-service-report-error{margin:8px 14px 12px;padding:9px 11px;border-inline-start:3px solid #d92d20;border-radius:8px;background:#fff5f4;color:#a32920;font-size:12px;line-height:1.8}
.customer-service-report-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-block:12px}
.customer-service-report-card{display:grid;align-content:start;gap:5px;min-width:0;min-height:94px;padding:13px 14px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}
.customer-service-report-card small,.customer-service-report-card span{color:#64748b;font-size:11px;line-height:1.6}
.customer-service-report-card strong{color:#1f3551;font-size:23px;line-height:1.2;font-variant-numeric:tabular-nums}
.customer-service-report-card.is-attention{border-color:#f2d1a7;background:#fffaf3}
.customer-service-report-card.is-attention strong{color:#a45a08}
.customer-service-report-table .responsive-table{overflow-x:auto}
.customer-service-report-table table{width:100%;min-width:760px;table-layout:auto}
.customer-service-report-table th,.customer-service-report-table td{padding:9px 8px;white-space:normal;text-align:center;vertical-align:middle}
.customer-service-report-table th:first-child,.customer-service-report-table td:first-child{text-align:start}
.customer-service-report-table td small{display:block;margin-top:2px}
.customer-service-row-details{min-width:105px;text-align:start}
.customer-service-row-details>summary{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:5px 10px;border:1px solid #dbe3ee;border-radius:8px;background:#fff;color:#3d4e68;font-size:11px;font-weight:700;cursor:pointer;list-style:none}
.customer-service-row-details>summary::-webkit-details-marker{display:none}
.customer-service-row-details>summary::after{content:'+';margin-inline-start:7px;color:#6258d8;font-size:15px;line-height:1}
.customer-service-row-details[open]>summary::after{content:'−'}
.customer-service-row-details>summary:hover{border-color:#aaa3ef;background:#f8f7ff;color:#5146c7}
.customer-service-row-details>summary:focus-visible{outline:2px solid rgba(91,80,230,.35);outline-offset:2px}
.customer-service-row-details-grid{display:grid;grid-template-columns:repeat(2,minmax(150px,1fr));gap:7px;min-width:280px;max-width:520px;padding:9px 0 2px}
.customer-service-row-details-grid>div{display:grid;gap:3px;min-width:0;padding:8px;border:1px solid #e8edf4;border-radius:8px;background:#fafbfe;white-space:normal}
.customer-service-row-details-grid strong{color:#394b64;font-size:10px}
.customer-service-row-details-grid span{color:#65758b;font-size:10px;line-height:1.7}
.customer-service-report-footnote{margin:0;padding:10px 14px 13px;border-top:1px solid #edf0f5;color:#718096;font-size:10px;line-height:1.8}
@media(max-width:900px){
 .customer-service-report-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
 .customer-service-report-filter-form{grid-template-columns:repeat(2,minmax(0,1fr))}
 .customer-service-report-filter-form .form-actions{grid-column:1/-1;flex-wrap:wrap}
 .customer-service-report-table table{min-width:680px}
 .customer-service-row-details-grid{grid-template-columns:1fr;min-width:220px}
}
@media(max-width:650px){
 .customer-service-report-filter-form{grid-template-columns:1fr;gap:8px;padding:10px}
 .customer-service-report-filter-form .form-actions{grid-column:1;align-items:stretch;flex-direction:column}
 .customer-service-report-filter-form .form-actions .button{justify-content:center;min-height:40px}
 .customer-service-report-cards{gap:7px}
 .customer-service-report-card{min-height:82px;padding:10px}
 .customer-service-report-card strong{font-size:20px}
 .customer-service-report-controls>.panel-header,.customer-service-report-table>.panel-header{padding:10px}
 .customer-service-report-range,.customer-service-report-footnote{padding-inline:10px}
 .customer-service-report-table table{min-width:620px}
 .customer-service-report-table th,.customer-service-report-table td{padding:7px 6px;font-size:10px}
 .customer-service-row-details{min-width:85px}
 .customer-service-row-details>summary{min-height:30px;padding:4px 7px}
}

/* Visual analytics P1: compact, aggregate-only report surfaces. */
.visual-analytics-filter-panel{display:grid;gap:8px;margin-block:0 12px;padding:13px 15px}
.visual-analytics-filter-form{display:grid;grid-template-columns:repeat(2,minmax(160px,1fr)) auto;align-items:end;gap:10px}
.visual-analytics-filter-form>label{display:grid;gap:5px;min-width:0;color:var(--muted,#64748b);font-size:11px;font-weight:700}
.visual-analytics-filter-form input{width:100%;min-width:0;min-height:38px;box-sizing:border-box;padding:7px 10px;border:1px solid var(--line,#dbe3ec);border-radius:9px;background:#fff;color:var(--text,#18314a);font:inherit;font-size:12px}
.visual-analytics-filter-form input:focus-visible{outline:2px solid rgba(91,80,230,.24);outline-offset:1px;border-color:var(--primary,#5b50e6)}
.visual-analytics-filter-actions{display:flex;align-items:center;gap:7px;white-space:nowrap}
.visual-analytics-filter-presets{display:flex;grid-column:1/-1;align-items:center;flex-wrap:wrap;gap:6px}
.visual-analytics-filter-presets>span{margin-inline-end:3px;color:var(--muted,#64748b);font-size:11px;font-weight:700}
.visual-analytics-filter-presets .button{min-height:34px;padding:6px 10px;font-size:11px}
.visual-analytics-filter-presets .button.is-active{border-color:var(--primary,#5b50e6);background:#f1efff;color:#4439c7;box-shadow:inset 0 0 0 1px rgba(91,80,230,.08)}
.visual-analytics-filter-presets .button:focus-visible{outline:2px solid rgba(91,80,230,.35);outline-offset:2px}
.visual-analytics-range{margin:0;color:var(--muted,#64748b);font-size:11px;line-height:1.7}
.visual-analytics-range strong{color:var(--text,#18314a)}
.visual-analytics-error{margin:0;padding:8px 10px;border-inline-start:3px solid #cf4c45;border-radius:7px;background:#fff6f5;color:#963a35;font-size:12px;line-height:1.8}
.visual-analytics-kpi-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-block:0 12px}
.visual-analytics-summary-groups{display:grid;gap:10px;margin-block-end:12px}
.visual-analytics-metric-group{display:grid;gap:8px;min-width:0;padding:11px 12px;border:1px solid var(--line,#e2e8f0);border-radius:12px;background:rgba(255,255,255,.72)}
.visual-analytics-metric-group-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 12px}
.visual-analytics-metric-group-heading h2{margin:0;color:var(--text,#18314a);font-size:13px;line-height:1.5}
.visual-analytics-metric-group-heading p{margin:0;color:var(--muted,#64748b);font-size:10px;line-height:1.7}
.visual-analytics-metric-group .visual-analytics-kpi-grid{margin:0}
.visual-analytics-kpi{display:grid;align-content:start;gap:4px;min-width:0;min-height:92px;padding:12px 14px;border:1px solid var(--line,#e2e8f0);border-radius:12px;background:var(--surface,#fff);box-shadow:0 3px 12px rgba(25,45,68,.035)}
.visual-analytics-kpi small,.visual-analytics-kpi span{color:var(--muted,#64748b);font-size:11px;line-height:1.65}
.visual-analytics-kpi .visual-analytics-kpi-meta{color:#28755e;font-size:10px;font-weight:700}
.visual-analytics-kpi strong{overflow-wrap:anywhere;color:var(--text,#18314a);font-size:clamp(20px,2.2vw,25px);line-height:1.2;font-variant-numeric:tabular-nums}
.visual-analytics-kpi.is-accent{border-color:rgba(91,80,230,.22);background:linear-gradient(145deg,#fff 52%,#f7f6ff)}
.visual-analytics-kpi.is-accent strong{color:var(--primary,#5b50e6);font-size:clamp(17px,1.8vw,22px)}
.visual-analytics-kpi.is-attention{border-color:#f0d8b7;background:#fffaf3}
.visual-analytics-kpi.is-attention strong{color:#9b5b14}
.visual-analytics-chart-panel{display:grid;gap:11px;min-width:0;margin-block:0 12px;padding:14px 16px}
.visual-analytics-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.visual-analytics-panel-heading h2,.visual-analytics-panel-heading h3{margin:0;color:var(--text,#18314a);font-size:15px;line-height:1.5}
.visual-analytics-panel-heading p{margin:3px 0 0;color:var(--muted,#64748b);font-size:11px;line-height:1.7}
.visual-analytics-legend{display:flex;flex-wrap:wrap;gap:8px 14px;color:var(--muted,#64748b);font-size:11px}
.visual-analytics-legend>span{display:inline-flex;align-items:center;gap:6px}
.visual-analytics-legend i{display:inline-block;width:17px;height:3px;border-radius:99px;background:currentColor}
.visual-analytics-legend .series-a{color:#5b50e6}.visual-analytics-legend .series-b{color:#168b8b}.visual-analytics-legend .series-c{color:#df8a35}.visual-analytics-legend .series-d{color:#4875a6}
.visual-analytics-legend .series-b{background:repeating-linear-gradient(90deg,currentColor 0 7px,transparent 7px 11px)}.visual-analytics-legend .series-c{background:repeating-linear-gradient(90deg,currentColor 0 2px,transparent 2px 5px)}.visual-analytics-legend .series-d{background:repeating-linear-gradient(90deg,currentColor 0 8px,transparent 8px 11px,currentColor 11px 13px,transparent 13px 17px)}
.visual-analytics-chart-frame{width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
.visual-analytics-line-chart{display:block;width:max(100%,var(--visual-chart-min-width,760px));max-width:none;min-width:max(760px,var(--visual-chart-min-width,760px));height:auto;margin-inline:0;overflow:visible;direction:rtl;stroke:none;stroke-width:0}
.visual-analytics-line-chart text{stroke:none;stroke-width:0;paint-order:normal;font-family:var(--crm-font-family-persian,Vazirmatn,Tahoma,Arial,sans-serif);font-weight:400;letter-spacing:normal;fill:#46566c;text-rendering:optimizeLegibility}
.visual-analytics-chart-panel .visual-analytics-panel-heading h2,.visual-analytics-chart-panel .visual-analytics-panel-heading h3{font-size:16px;font-weight:650;line-height:1.8;color:#20334b}
.visual-analytics-chart-panel .visual-analytics-panel-heading p{font-size:12px;line-height:1.9;color:#526278;margin-top:4px}
.visual-analytics-chart-panel .visual-analytics-legend{gap:8px 18px;font-size:12px;line-height:1.9;color:#46566c}
.visual-analytics-chart-panel .visual-analytics-legend>span{gap:8px;padding-block:2px}
.visual-analytics-chart-panel .visual-analytics-chart-explorer{gap:6px;padding:10px 12px;background:#f8faff;border-color:#e4eaf3}
.visual-analytics-chart-panel .visual-analytics-chart-explorer>label{font-size:12px;font-weight:600;color:#344760}
.visual-analytics-chart-panel .visual-analytics-chart-explorer-summary{font-size:12px;line-height:1.9;color:#344760}
.visual-analytics-chart-panel .visual-analytics-chart-explorer>small{font-size:11px;line-height:1.8;color:#526278}
.visual-analytics-chart-panel .visual-analytics-chart-explorer-controls{grid-template-columns:minmax(0,1fr) minmax(190px,240px);gap:12px}
.visual-analytics-chart-panel .visual-analytics-data-details>summary{font-size:12px;line-height:1.9;color:#3e4a9a;padding-block:9px}
@media(max-width:650px){.visual-analytics-chart-panel .visual-analytics-chart-explorer-controls{grid-template-columns:1fr;gap:7px}.visual-analytics-chart-panel .visual-analytics-panel-heading h2{font-size:15px}.visual-analytics-chart-panel .visual-analytics-legend{gap:5px 12px}}
.visual-analytics-line-chart linearGradient.series-a stop{stop-color:#5b50e6}
.visual-analytics-line-chart linearGradient.series-b stop{stop-color:#168b8b}
.visual-analytics-line-chart linearGradient.series-c stop{stop-color:#df8a35}
.visual-analytics-line-chart linearGradient.series-d stop{stop-color:#4875a6}
.visual-analytics-area{stroke:none;pointer-events:none}
.visual-analytics-chart-panel{border:1px solid #e5eaf2;border-radius:16px;background:linear-gradient(180deg,#fff,#fcfdff);box-shadow:0 5px 20px rgba(24,49,74,.035)}
.visual-analytics-chart-frame{padding-block:6px 3px;scrollbar-width:thin;scrollbar-color:#c9c5ed transparent}
.visual-analytics-line-chart .visual-analytics-gridline{stroke:#edf0f6;stroke-dasharray:3 5}
.visual-analytics-line-chart .visual-analytics-axis-label{font-size:11px;font-weight:500;fill:#3f5068}
.visual-analytics-line-chart .visual-analytics-y-axis-label{font-weight:500}
@media(max-width:650px){.visual-analytics-chart-panel{padding:12px;border-radius:12px}.visual-analytics-panel-heading{gap:8px}.visual-analytics-chart-explorer-controls{gap:6px}}
@media(prefers-reduced-motion:no-preference){.visual-analytics-data-point{transition:fill .15s ease,stroke .15s ease}.visual-analytics-chart-panel{transition:box-shadow .2s ease}}
.visual-analytics-line-chart polyline{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.visual-analytics-line-chart .series-a{stroke:#5b50e6}.visual-analytics-line-chart .series-b{stroke:#168b8b}.visual-analytics-line-chart .series-c{stroke:#df8a35}.visual-analytics-line-chart .series-d{stroke:#4875a6}
.visual-analytics-line-chart polyline.series-b{stroke-dasharray:9 5}.visual-analytics-line-chart polyline.series-c{stroke-dasharray:3 4}.visual-analytics-line-chart polyline.series-d{stroke-dasharray:12 4 2 4}
.visual-analytics-line-chart circle.series-a{fill:#5b50e6}.visual-analytics-line-chart circle.series-b{fill:#168b8b}.visual-analytics-line-chart circle.series-c{fill:#df8a35}.visual-analytics-line-chart circle.series-d{fill:#4875a6}
.visual-analytics-legend.is-point i{width:9px;height:9px;border-radius:50%;background:currentColor}
.visual-analytics-product-bars .visual-analytics-bar-label{max-width:180px}
.visual-analytics-gridline{stroke:#e9edf3;stroke-width:1;vector-effect:non-scaling-stroke}.visual-analytics-axis{stroke:#c3cfdd;stroke-width:1.25;vector-effect:non-scaling-stroke}.visual-analytics-zero-axis{stroke:#aebdce;stroke-width:1.5}
.visual-analytics-axis-label,.visual-analytics-y-axis-label{fill:#64748b;font-family:inherit;font-size:13px;font-variant-numeric:tabular-nums}.visual-analytics-y-axis-label{font-size:12px}.visual-analytics-single-point{stroke:#fff;stroke-width:2;vector-effect:non-scaling-stroke}
.visual-analytics-data-point{fill:transparent;stroke:transparent;stroke-width:1;pointer-events:all;vector-effect:non-scaling-stroke}
.visual-analytics-data-point.series-a{color:#5b50e6}.visual-analytics-data-point.series-b{color:#168b8b}.visual-analytics-data-point.series-c{color:#df8a35}.visual-analytics-data-point.series-d{color:#4875a6}
.visual-analytics-data-point.is-selected{fill:currentColor;stroke:#fff;stroke-width:2;opacity:1}
.visual-analytics-line-chart[data-chart-style="point"] .visual-analytics-data-point{stroke:#fff;stroke-width:1.35}
.visual-analytics-line-chart[data-chart-style="point"] .visual-analytics-data-point.is-selected{stroke-width:2.2;filter:drop-shadow(0 1px 2px rgba(24,49,74,.2))}
.visual-analytics-line-chart rect.visual-analytics-data-bar{stroke:transparent;stroke-width:1;opacity:.88;pointer-events:all;vector-effect:non-scaling-stroke;transition:opacity .15s ease,stroke .15s ease,filter .15s ease}
.visual-analytics-line-chart rect.visual-analytics-data-bar.series-a{fill:#5b50e6}.visual-analytics-line-chart rect.visual-analytics-data-bar.series-b{fill:#168b8b}.visual-analytics-line-chart rect.visual-analytics-data-bar.series-c{fill:#df8a35}.visual-analytics-line-chart rect.visual-analytics-data-bar.series-d{fill:#4875a6}
.visual-analytics-line-chart rect.visual-analytics-data-bar:hover{opacity:1;filter:brightness(1.05)}
.visual-analytics-line-chart rect.visual-analytics-data-bar.is-selected{opacity:1;stroke:#fff;stroke-width:1.6;filter:drop-shadow(0 1px 2px rgba(24,49,74,.18))}
.visual-analytics-legend.is-bar i{width:10px;height:10px;border-radius:2px;background:currentColor}
.visual-analytics-selection-guide{stroke:#5b50e6;stroke-width:1.25;stroke-dasharray:3 4;opacity:.68;pointer-events:none;vector-effect:non-scaling-stroke}
.visual-analytics-chart-explorer{display:none;gap:5px;padding:9px 11px;border:1px solid #e7ebf2;border-radius:10px;background:#fafbfe}
.visual-analytics-chart-explorer.is-enhanced{display:grid}
.visual-analytics-chart-explorer>label{color:#4d5e73;font-size:11px;font-weight:700}
.visual-analytics-chart-explorer-controls{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(0,2fr);align-items:center;gap:10px;min-width:0}
.visual-analytics-chart-explorer input[type=range]{width:100%;min-width:0;direction:ltr;accent-color:#5b50e6;cursor:pointer}
.visual-analytics-chart-explorer input[type=range]:focus-visible{outline:2px solid rgba(91,80,230,.38);outline-offset:3px;border-radius:4px}
.visual-analytics-chart-explorer-summary{min-width:0;color:#344a63;font-size:11px;font-variant-numeric:tabular-nums;line-height:1.7;overflow-wrap:anywhere}
.visual-analytics-chart-explorer>small{color:#718096;font-size:10px;line-height:1.6}
.visual-analytics-finance-trends{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,520px),1fr));align-items:start;gap:10px;margin-block-end:12px}
.visual-analytics-finance-trends .visual-analytics-chart-panel{margin:0;padding:12px 14px}
.visual-analytics-finance-trends .visual-analytics-panel-heading h2{font-size:14px}
.visual-analytics-finance-trends .visual-analytics-panel-heading p{max-width:72ch}
.visual-analytics-finance-chart .visual-analytics-table-wrap table{min-width:360px}
.visual-analytics-product-bars+.visual-analytics-data-details{margin-top:8px}
.visual-analytics-data-details{border-top:1px solid #edf0f5;padding-top:8px}
.visual-analytics-data-details>summary,.visual-analytics-warnings>summary{width:fit-content;color:#4d5e73;font-size:11px;font-weight:700;cursor:pointer}
.visual-analytics-table-wrap{max-width:100%;margin-top:8px;overflow:auto;border:1px solid #e8edf3;border-radius:9px}
.visual-analytics-table-wrap table{width:100%;min-width:460px;border-collapse:collapse;font-size:11px}
.visual-analytics-table-wrap th,.visual-analytics-table-wrap td{padding:8px 10px;border-bottom:1px solid #edf0f4;text-align:start;white-space:nowrap}
.visual-analytics-table-wrap th{background:#f7f9fc;color:#5d6c80;font-weight:700}
.visual-analytics-table-wrap td{color:#26384e;font-variant-numeric:tabular-nums}
.visual-analytics-table-wrap tbody tr:last-child td{border-bottom:0}
.visual-analytics-bars{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.visual-analytics-bars li{display:grid;grid-template-columns:minmax(100px,180px) minmax(60px,1fr) auto;align-items:center;gap:9px;min-width:0}
.visual-analytics-bar-label{overflow:hidden;color:#4e6077;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.visual-analytics-bar-track{height:9px;overflow:hidden;border-radius:99px;background:#eef1f6}
.visual-analytics-bar-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7067ed,#2784bd);transition:width .28s ease}
.visual-analytics-bars strong{min-width:36px;color:#243a53;text-align:end;font-size:11px;font-variant-numeric:tabular-nums}
.visual-chart-style-panel{display:grid;gap:9px;margin-block:0 9px;padding:12px 14px;border:1px solid #e1e7f0;border-inline-start:3px solid #6258e8;border-radius:12px;background:linear-gradient(110deg,#fbfbff 0%,#fff 48%,#fbfdff 100%);box-shadow:0 3px 12px rgba(35,54,82,.035)}
.visual-chart-style-panel .visual-analytics-panel-heading{align-items:center;gap:12px;margin:0}
.visual-chart-style-panel .visual-analytics-panel-heading h2{font-size:13px;line-height:1.6}
.visual-chart-style-panel .visual-analytics-panel-heading p{margin-top:2px;font-size:10.5px;line-height:1.7}
.visual-chart-style-panel+.visual-analytics-chart-panel{margin-block-start:0}
.visual-chart-style-state{flex:0 0 auto;padding:4px 8px;border:1px solid #c9e9dc;border-radius:999px;background:#f1fbf6;color:#18704f;font-size:10px;font-weight:700}
.visual-chart-style-form{display:grid;gap:8px}
.visual-chart-style-preview-fields{display:grid;gap:7px;min-width:0;margin:0;padding:8px 10px;border:1px solid #e8ecf4;border-radius:9px;background:rgba(247,249,253,.78)}
.visual-chart-style-preview-fields>legend{padding-inline:5px;color:#53677e;font-size:10px;font-weight:700}
.visual-chart-style-preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:8px}
.visual-chart-style-choice{min-width:0;margin:0;padding:0;border:0}
.visual-chart-style-choice>legend{margin:0 0 5px;padding-inline:2px;color:#53677e;font-size:10px;font-weight:700}
.visual-chart-style-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(94px,1fr));gap:5px;min-width:0}
.visual-chart-style-option{position:relative;display:block;min-width:0;margin:0;color:#52647a;font-size:10px;font-weight:600;cursor:pointer}
.visual-chart-style-option>input{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.visual-chart-style-option-card{display:flex;align-items:center;justify-content:center;gap:6px;min-height:36px;box-sizing:border-box;padding:5px 8px;border:1px solid #e1e7f0;border-radius:8px;background:#fff;transition:border-color .15s ease,background-color .15s ease,color .15s ease,box-shadow .15s ease}
.visual-chart-style-icon{flex:0 0 17px;width:17px;height:17px;color:#77879b}
.visual-chart-style-option>input:checked+.visual-chart-style-option-card{border-color:#bcb7f6;background:#f4f3ff;color:#4339c7;box-shadow:inset 0 0 0 1px rgba(91,80,230,.06)}
.visual-chart-style-option>input:checked+.visual-chart-style-option-card .visual-chart-style-icon{color:#5b50e6}
.visual-chart-style-option:hover .visual-chart-style-option-card{border-color:#b9c7d9;background:#fbfcff}
.visual-chart-style-option>input:checked:hover+.visual-chart-style-option-card{border-color:#8f87ed;background:#eeedff}
.visual-chart-style-option>input:focus-visible+.visual-chart-style-option-card{outline:2px solid rgba(91,80,230,.38);outline-offset:2px}
.visual-chart-style-preview-fields>small{color:#718096;font-size:10px;line-height:1.7}
.visual-chart-style-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.visual-chart-style-actions .button{min-height:34px}
.visual-analytics-donut-layout{display:grid;grid-template-columns:minmax(190px,250px) minmax(0,1fr);align-items:center;gap:clamp(22px,4vw,42px);width:100%;max-width:1080px;margin-inline-start:0;margin-inline-end:auto;padding:5px 0}
.visual-analytics-donut{width:min(100%,220px);margin:0 auto}
.visual-analytics-donut-svg{display:block;width:100%;height:auto;overflow:visible}
.visual-analytics-donut-track{stroke:#edf1f6}
.visual-analytics-donut-segment{stroke-linecap:butt;transition:opacity .16s ease,filter .16s ease}
.visual-analytics-donut-segment:hover{filter:brightness(1.08);opacity:.9}
.visual-analytics-donut-total{fill:#20334b;font-family:var(--crm-font-family-persian,Vazirmatn,Tahoma,Arial,sans-serif);font-size:18px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:0;text-rendering:geometricPrecision}
.visual-analytics-donut-caption{fill:#6b7b90;font-family:var(--crm-font-family-persian,Vazirmatn,Tahoma,Arial,sans-serif);font-size:10px;font-weight:500}
.visual-analytics-donut-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px;min-width:0;margin:0;padding:0;list-style:none}
.visual-analytics-donut-legend li{display:grid;grid-template-columns:9px minmax(0,1fr) auto auto;align-items:center;gap:7px;min-width:0;padding:6px 7px;border:1px solid #edf0f5;border-radius:7px;background:#fafbfe}
.visual-analytics-donut-legend li>i{width:8px;height:8px;border-radius:50%;background:var(--donut-color,#5b50e6)}
.visual-analytics-donut-legend li>span{overflow:hidden;color:#40546c;font-size:10.5px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
.visual-analytics-donut-legend li>strong{color:#2f435b;font-size:10.5px;font-weight:600;font-variant-numeric:tabular-nums}
.visual-analytics-donut-legend li>small{min-width:42px;color:#718096;text-align:end;font-size:10px;font-variant-numeric:tabular-nums}
.visual-analytics-support-section{display:grid;gap:9px;margin-block:0 12px}
.visual-analytics-support-kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin:0}
.visual-analytics-support-section>.visual-analytics-panel-heading{padding:4px 2px}
.visual-analytics-support-bars{display:grid;gap:7px}
.visual-analytics-support-row{display:grid;grid-template-columns:minmax(110px,.7fr) repeat(3,minmax(130px,1fr));align-items:center;gap:10px;padding:10px 12px;border:1px solid #e8edf3;border-radius:10px;background:#fff}
.visual-analytics-support-row>strong{overflow:hidden;color:#2b4058;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.visual-analytics-support-row>div{display:grid;grid-template-columns:minmax(64px,auto) minmax(40px,1fr) auto;align-items:center;gap:7px;min-width:0}
.visual-analytics-support-row>div>span{color:#69798e;font-size:10px;white-space:nowrap}
.visual-analytics-support-row>div>i{height:7px;overflow:hidden;border-radius:99px;background:#eef1f5}
.visual-analytics-support-row>div>i>b{display:block;width:0;height:100%;border-radius:inherit;background:#168b8b}
.visual-analytics-support-row>div>i>b.is-secondary{background:#5b50e6}.visual-analytics-support-row>div>i>b.is-warning{background:#d58b30}
.visual-analytics-support-row>div>em{min-width:36px;color:#334860;text-align:end;font-size:10px;font-style:normal;font-variant-numeric:tabular-nums}
.visual-analytics-note,.visual-analytics-footer-note{margin:0;color:#718096;font-size:10px;line-height:1.8}
.visual-analytics-empty{margin:0;padding:13px 15px;border:1px dashed #d9e1eb;border-radius:10px;background:#fafbfd;color:#64748b;font-size:12px;line-height:1.8}
.visual-analytics-empty strong{color:#30445b}.visual-analytics-empty p{margin:4px 0 0}
.visual-analytics-warnings{margin-block:0 12px;padding:10px 13px;border:1px solid #e8edf3;border-radius:10px;background:#fafbfd}
.visual-analytics-warnings ul,.visual-analytics-readiness ul{display:grid;gap:4px;margin:8px 0 0;padding-inline-start:20px;color:#68798d;font-size:10px;line-height:1.8}
.visual-analytics-readiness{margin-block:0 12px;padding:10px 13px;border:1px solid #e8edf3;border-radius:10px;background:#fafbfd}
.visual-analytics-readiness>summary{width:fit-content;color:#4d5e73;font-size:11px;font-weight:700;cursor:pointer}
.visual-analytics-footer-note{padding:4px 2px 12px}
.visual-saved-reports{display:block;margin-block:0 12px;padding:0;overflow:hidden}
.visual-saved-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:9px 13px;cursor:pointer;list-style:none}
.visual-saved-summary::-webkit-details-marker{display:none}
.visual-saved-summary::marker{content:""}
.visual-saved-summary>span:first-child{display:grid;gap:2px;min-width:0}
.visual-saved-summary>span:first-child strong{color:var(--text,#18314a);font-size:13px}
.visual-saved-summary>span:first-child small{color:var(--muted,#64748b);font-size:10px}
.visual-saved-summary::after{content:"";flex:0 0 7px;width:7px;height:7px;margin-inline-start:auto;border-inline-end:1.5px solid #74839a;border-block-end:1.5px solid #74839a;transform:rotate(45deg);transition:transform .18s ease}
.visual-saved-reports[open]>.visual-saved-summary::after{transform:rotate(225deg)}
.visual-saved-summary:focus-visible{outline:2px solid rgba(91,80,230,.35);outline-offset:-3px;border-radius:10px}
.visual-saved-content{display:grid;gap:10px;padding:0 13px 13px}
.visual-saved-count{flex:0 0 auto;padding:4px 9px;border:1px solid #e2e8f0;border-radius:999px;background:#f8fafc;color:#64748b;font-size:10px;font-weight:700}
.visual-saved-notice,.visual-saved-active{margin:0;padding:8px 10px;border:1px solid #dce7f2;border-radius:8px;background:#f7fafc;color:#40566e;font-size:11px;line-height:1.8}
.visual-saved-notice.is-success{border-color:#b8e4d3;background:#f0fbf6;color:#19704f}
.visual-saved-notice.is-error{border-color:#f1c6c3;background:#fff7f6;color:#963a35}
.visual-saved-active{margin-block:0 12px;border-color:#cdd8ff;background:#f7f8ff;color:#5147bd}
.visual-saved-create,.visual-saved-edit{border:1px solid #e8edf3;border-radius:9px;background:#fbfcfe}
.visual-saved-create>summary,.visual-saved-edit>summary{padding:9px 11px;color:#40566e;font-size:11px;font-weight:700;cursor:pointer}
.visual-saved-form{display:grid;gap:9px;padding:0 11px 11px}
.visual-saved-form>label,.visual-saved-date-fields>label,.visual-saved-search>label{display:grid;gap:4px;min-width:0;color:#64748b;font-size:10px;font-weight:700}
.visual-saved-form input:not([type=checkbox]),.visual-saved-search input{width:100%;min-width:0;min-height:36px;box-sizing:border-box;padding:7px 9px;border:1px solid #dbe3ec;border-radius:8px;background:#fff;color:#18314a;font:inherit;font-size:11px}
.visual-saved-form fieldset{min-width:0;margin:0;padding:7px 9px;border:1px solid #e6ebf2;border-radius:8px}
.visual-saved-form legend{padding-inline:4px;color:#64748b;font-size:10px;font-weight:700}
.visual-saved-metrics{display:flex;flex-wrap:wrap;gap:6px 14px}
.visual-saved-metric{display:inline-flex;align-items:center;gap:6px;min-height:28px;color:#40566e;font-size:10px;cursor:pointer}
.visual-saved-metric input{width:15px;height:15px;margin:0;accent-color:var(--primary,#5b50e6)}
.visual-saved-chart-styles{display:grid;gap:7px;background:#f8faff}
.visual-saved-chart-style-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:8px}
.visual-saved-form .visual-chart-style-choice{padding:0;border:0;border-radius:0;background:transparent}
.visual-saved-chart-styles>small{color:#718096;font-size:10px;line-height:1.7}
.visual-saved-card-main>.visual-saved-style-summary{color:#596b81}
.visual-saved-date-fields{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:8px}
.visual-saved-search{display:flex;align-items:end;gap:7px;padding-block:2px}
.visual-saved-search>label{flex:1}
.visual-saved-list{display:grid;gap:7px}
.visual-saved-card{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0;padding:10px 11px;border:1px solid #e8edf3;border-radius:9px;background:#fff}
.visual-saved-card.is-archived{background:#fafbfc;opacity:.82}
.visual-saved-card-main{display:grid;gap:3px;min-width:0}
.visual-saved-card-main>strong{overflow-wrap:anywhere;color:#26384e;font-size:12px}
.visual-saved-card-main>span,.visual-saved-card-main>small{color:#718096;font-size:10px;line-height:1.7}
.visual-saved-card-main>.visual-saved-metric-summary{color:#53677e}
.visual-saved-history{margin-top:3px;border-top:1px solid #edf0f5;padding-top:5px}
.visual-saved-history>summary{width:fit-content;color:#53677e;font-size:10px;font-weight:700;cursor:pointer}
.visual-saved-history ol{display:grid;gap:3px;margin:5px 0 0;padding-inline-start:18px;color:#61748a;font-size:10px}
.visual-saved-history li>small{display:block;color:#7b8898;font-size:9px;line-height:1.7}
.visual-saved-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:5px;max-width:48%}
.visual-saved-actions>form{margin:0}
.visual-saved-edit{flex-basis:100%;max-width:420px}
.visual-saved-empty{padding:12px;border:1px dashed #d9e1eb;border-radius:9px;background:#fafbfd;color:#718096;font-size:11px;text-align:center}
.visual-saved-hint{margin:0;color:#718096;font-size:10px}
.visual-saved-pagination{display:flex;align-items:center;justify-content:center;gap:6px;padding-top:4px}
.visual-saved-pagination>span{color:#718096;font-size:10px}
@media(max-width:900px){
 .visual-analytics-donut-layout{grid-template-columns:minmax(0,1fr);gap:12px;max-width:620px;margin-inline:auto}
 .visual-analytics-donut{width:min(55vw,210px)}
 .visual-analytics-support-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 .visual-analytics-support-row{grid-template-columns:minmax(0,1fr) repeat(2,minmax(120px,1fr))}
 .visual-analytics-support-row>strong{grid-column:1/-1}
 .visual-saved-card{flex-direction:column}
 .visual-saved-actions{max-width:100%;justify-content:flex-start}
}
@media(max-width:650px){
 .visual-analytics-filter-panel,.visual-analytics-chart-panel{padding:11px}
 .visual-chart-style-panel{padding:10px}
 .visual-analytics-donut-layout{grid-template-columns:minmax(0,1fr);gap:10px}
 .visual-analytics-donut{width:min(58vw,205px)}
 .visual-analytics-donut-legend{grid-template-columns:minmax(0,1fr);gap:3px}
 .visual-analytics-donut-legend li{padding:6px 8px}
 .visual-analytics-filter-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .visual-analytics-filter-actions{grid-column:1/-1;flex-wrap:wrap}
 .visual-analytics-filter-presets{gap:5px}
 .visual-analytics-filter-presets>span{flex-basis:100%}
  .visual-analytics-filter-actions .button{min-height:38px}
  .visual-saved-search{align-items:stretch;flex-wrap:wrap}
  .visual-saved-search>label{flex-basis:100%}
 .visual-analytics-kpi-grid,.visual-analytics-support-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .visual-analytics-metric-group{padding:9px}
 .visual-analytics-metric-group-heading{align-items:flex-start;flex-direction:column}
 .visual-analytics-kpi{min-height:80px;padding:10px}
 .visual-analytics-kpi small,.visual-analytics-kpi span{font-size:10px}
 .visual-analytics-support-row{grid-template-columns:1fr;gap:8px;padding:10px}
 .visual-analytics-support-row>strong{grid-column:auto}
 .visual-analytics-support-row>div{grid-template-columns:76px minmax(40px,1fr) 38px}
 .visual-analytics-bars li{grid-template-columns:minmax(84px,34%) minmax(40px,1fr) auto;gap:7px}
 .visual-analytics-panel-heading h2,.visual-analytics-panel-heading h3{font-size:14px}
 .visual-analytics-chart-explorer-controls{grid-template-columns:1fr;gap:3px}
 .visual-analytics-chart-explorer input[type=range]{min-height:26px}
}
@media(max-width:360px){
 .visual-chart-style-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 .visual-analytics-filter-form{grid-template-columns:1fr}
 .visual-analytics-filter-actions{grid-column:1;align-items:stretch;flex-direction:column}
 .visual-analytics-filter-presets{grid-column:1}
 .visual-analytics-filter-actions .button{justify-content:center}
  .visual-analytics-kpi-grid,.visual-analytics-support-kpis{grid-template-columns:1fr}
  .visual-saved-date-fields{grid-template-columns:1fr}
  .visual-saved-actions{width:100%}
}
@media(prefers-reduced-motion:reduce){.visual-analytics-bar-track i,.visual-analytics-donut-segment,.visual-chart-style-option-card{transition:none}}

/* Visual analytics V0+V1: metric definitions and role-aware section navigation. */
.visual-analytics-section-nav{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;margin-block:0 10px;padding:8px 10px;border:1px solid #e5eaf2;border-radius:11px;background:#fff}
.visual-analytics-section-nav>span{flex:0 0 auto;color:#718096;font-size:10px;font-weight:700}
.visual-analytics-section-nav>div{display:flex;flex:1 1 auto;align-items:center;flex-wrap:wrap;gap:5px}
.visual-analytics-section-nav a{display:inline-flex;min-height:31px;align-items:center;padding:5px 10px;border:1px solid #e7eaf1;border-radius:8px;background:#fafbfe;color:#46566c;font-size:10.5px;font-weight:600;text-decoration:none;transition:background-color .15s ease,border-color .15s ease,color .15s ease}
.visual-analytics-section-nav a:hover{border-color:#c9c5ed;background:#f5f3ff;color:#4c43c8}
.visual-analytics-section-nav a:focus-visible,.visual-analytics-overview-heading>a:focus-visible{outline:2px solid rgba(91,80,230,.36);outline-offset:2px}
.visual-analytics-summary-groups,.visual-analytics-metric-group,.visual-analytics-chart-panel,.visual-analytics-support-section,.visual-analytics-finance-trends,.visual-analytics-metric-guide,.visual-saved-reports{scroll-margin-block-start:16px}
.visual-analytics-summary-groups{gap:8px}
.visual-analytics-overview-heading{display:flex;align-items:center;flex-wrap:wrap;gap:5px 12px;padding:2px 3px 3px}
.visual-analytics-overview-heading>div{flex:1 1 260px;min-width:0}
.visual-analytics-overview-heading h2{margin:0;color:#20334b;font-size:15px;line-height:1.55}
.visual-analytics-overview-heading p{margin:2px 0 0;color:#718096;font-size:10.5px;line-height:1.7}
.visual-analytics-overview-heading>span{color:#5f6f83;font-size:10px;font-variant-numeric:tabular-nums}
.visual-analytics-overview-heading>a{color:#4c43c8;font-size:10px;font-weight:700;text-decoration:none}
.visual-analytics-metric-guide{margin-block:0 10px;border:1px solid #e3e9f1;border-radius:11px;background:#fff}
.visual-analytics-metric-guide>summary{display:flex;min-height:38px;align-items:center;justify-content:space-between;gap:10px;padding:7px 11px;color:#344760;font-size:11px;font-weight:700;cursor:pointer;list-style:none}
.visual-analytics-metric-guide>summary::-webkit-details-marker{display:none}
.visual-analytics-metric-guide>summary::after{content:'⌄';margin-inline-start:auto;color:#7569df;font-size:15px;line-height:1;transition:transform .15s ease}
.visual-analytics-metric-guide[open]>summary::after{transform:rotate(180deg)}
.visual-analytics-metric-guide>summary>span{margin-inline-start:auto;color:#718096;font-size:10px;font-weight:500}
.visual-analytics-definition-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0 9px 9px}
.visual-analytics-definition-card{min-width:0;padding:10px;border:1px solid #edf0f5;border-radius:9px;background:#fbfcfe}
.visual-analytics-definition-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.visual-analytics-definition-card>header strong{color:#30445b;font-size:11px;line-height:1.7}
.visual-analytics-definition-card>header>span{flex:0 0 auto;padding:3px 7px;border-radius:99px;background:#f0efff;color:#5147c8;font-size:9px;line-height:1.6}
.visual-analytics-definition-card>p{margin:5px 0;color:#5c6b7e;font-size:10px;line-height:1.8}
.visual-analytics-definition-card dl{display:grid;gap:4px;margin:6px 0 0}
.visual-analytics-definition-card dl>div{display:grid;grid-template-columns:88px minmax(0,1fr);gap:7px;min-width:0}
.visual-analytics-definition-card dt{color:#78869a;font-size:9px;font-weight:700}
.visual-analytics-definition-card dd{margin:0;color:#4d5e73;font-size:9.5px;line-height:1.75;overflow-wrap:anywhere}
.visual-analytics-definition-card .visual-analytics-definition-limit{margin:7px 0 0;padding-block-start:6px;border-block-start:1px solid #e9edf3;color:#80602e;font-size:9.5px}
.visual-analytics-definition-card .visual-analytics-definition-limit strong{color:#6f5126}
@media(max-width:760px){
 .visual-analytics-section-nav{align-items:flex-start}
 .visual-analytics-section-nav>div{flex-basis:100%}
 .visual-analytics-definition-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:420px){
 .visual-analytics-section-nav{gap:5px;padding:7px}
 .visual-analytics-section-nav a{min-height:34px;padding-inline:8px}
 .visual-analytics-overview-heading{align-items:flex-start;flex-direction:column}
 .visual-analytics-definition-card dl>div{grid-template-columns:76px minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){.visual-analytics-section-nav a,.visual-analytics-metric-guide>summary::after{transition:none}}
.visual-analytics-filter-form{grid-template-columns:repeat(4,minmax(125px,1fr)) auto}
.visual-analytics-filter-form.is-support-only{grid-template-columns:repeat(3,minmax(125px,1fr)) auto}
.visual-analytics-filter-form select{width:100%;min-width:0;min-height:38px;box-sizing:border-box;padding:7px 34px 7px 10px;border:1px solid var(--line,#dbe3ec);border-radius:9px;background-color:#fff;color:var(--text,#18314a);font:inherit;font-size:12px}
.visual-analytics-filter-form select:focus-visible{outline:2px solid rgba(91,80,230,.24);outline-offset:1px;border-color:var(--primary,#5b50e6)}
.visual-analytics-comparison{display:grid;gap:9px;margin-block:0 12px;padding:12px 14px}
.visual-analytics-comparison .visual-analytics-panel-heading{margin:0}
.visual-analytics-comparison .visual-analytics-table-wrap{max-width:100%;overflow-x:auto;border:1px solid #e8edf4;border-radius:9px;background:#fff}
.visual-analytics-comparison table{width:100%;min-width:720px;border-collapse:collapse;font-size:11px}
.visual-analytics-comparison th,.visual-analytics-comparison td{padding:9px 10px;border-bottom:1px solid #edf1f6;text-align:right;vertical-align:middle;white-space:nowrap}
.visual-analytics-comparison thead th{background:#f7f9fc;color:#607187;font-size:10px;font-weight:700}
.visual-analytics-comparison tbody th{color:#2b4058;font-weight:700}
.visual-analytics-comparison tbody tr:last-child th,.visual-analytics-comparison tbody tr:last-child td{border-bottom:0}
.visual-analytics-comparison .visual-analytics-note{margin:0;padding:7px 9px;border-radius:7px;background:#f7f9fc;color:#62748a;font-size:10px;line-height:1.8}
@media(max-width:980px){.visual-analytics-filter-form{grid-template-columns:repeat(2,minmax(0,1fr))}.visual-analytics-filter-actions{grid-column:1/-1}.visual-analytics-filter-presets{grid-column:1/-1}}
@media(max-width:560px){.visual-analytics-filter-panel{padding:10px}.visual-analytics-filter-form{grid-template-columns:minmax(0,1fr);gap:8px}.visual-analytics-filter-actions{grid-column:auto;flex-wrap:wrap}.visual-analytics-filter-presets{grid-column:auto}.visual-analytics-filter-actions .button{flex:1}.visual-analytics-comparison{padding:10px}.visual-analytics-comparison table{min-width:650px}}
@media(max-width:980px){.visual-analytics-filter-form.is-support-only{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.visual-analytics-filter-form.is-support-only{grid-template-columns:minmax(0,1fr)}}

/* Customer list actions, permission-scoped bulk editor, and call customer picker. */
.customer-table-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:10px!important}
.customer-table-toolbar h2{margin:0;font-size:15px!important}
.customer-table-toolbar .subtext{display:block;margin-top:3px}
.customer-search-field{position:relative;min-width:0}
.customer-call-picker{position:relative;display:grid;gap:7px;padding:10px 12px;border:1px solid #e3e9f2;border-radius:11px;background:#f8faff}
.customer-call-picker label{display:grid;gap:5px;color:var(--muted,#6b7d90);font-size:11px;font-weight:700}
.customer-call-picker input{box-sizing:border-box;width:100%;min-height:40px;padding:8px 11px;border:1px solid #d7e0eb;border-radius:8px;background:#fff;color:var(--text,#25344c);font:inherit;font-size:12px}
.customer-call-picker input:read-only{background:#f2f7ff;color:#304866}
.customer-call-picker .customer-search-results{top:calc(100% - 3px)}

/* Customer call capture: shared profile wizard, compact searchable chooser. */
.customer-call-capture{display:grid;gap:10px;min-inline-size:0}
.customer-call-capture .customer-call-picker{grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;padding:10px;border-color:var(--border,#e3e9f2)}
.customer-call-capture .customer-call-picker label{min-inline-size:0;font-size:12px;line-height:1.8;color:var(--text,#25344c)}
.customer-call-capture .customer-call-picker input{min-block-size:42px;font-family:inherit}
.customer-call-capture .customer-call-picker input:focus-visible{outline:2px solid var(--primary,#6554e8);outline-offset:2px}
.customer-call-capture .customer-call-picker .customer-search-results{inset-inline:0;top:calc(100% + 4px);max-block-size:min(300px,42vh);border-radius:10px;box-shadow:0 8px 24px rgb(30 50 75 / 12%)}
.customer-call-capture .customer-call-customer-option{inline-size:100%;min-block-size:48px;border:0;background:transparent;text-align:start;font:inherit;cursor:pointer;overflow-wrap:anywhere}
.customer-call-capture .customer-call-customer-option strong{font-size:13px;font-weight:600}
.customer-call-capture .customer-call-customer-option small{font-size:11px;line-height:1.7}
.customer-call-capture .customer-call-customer-option:is(:hover,:focus-visible,[aria-selected=true]){background:var(--primary-soft,#f1edff);color:var(--primary,#6554e8);outline-offset:-2px}
.customer-call-selection-status{margin:0;padding-inline:2px;color:var(--muted,#6b7d90);font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.customer-call-capture [data-customer-call-retry]{justify-self:start}
.customer-call-capture [data-customer-call-form-host][aria-busy=true]{min-block-size:48px;opacity:.65}
.customer-call-capture [hidden]{display:none!important}
@media(max-width:480px){.customer-call-capture .customer-call-picker{grid-template-columns:minmax(0,1fr)}.customer-call-capture .customer-call-change-customer{justify-self:start;min-block-size:40px}}
.customer-call-change-customer{justify-self:start;min-height:30px;padding-inline:10px;font-size:10px}
.customer-call-customer-option{width:100%;border:0;background:transparent;text-align:right;font:inherit;cursor:pointer}
.customer-call-customer-option:focus-visible{outline:2px solid var(--primary,#6254d8);outline-offset:1px}
.customer-call-picker .field-help{margin:0;font-size:10px;line-height:1.7}
.customer-bulk-edit-form{display:grid;gap:12px}
.customer-bulk-selection-status{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 11px;border:1px solid #e5eaf1;border-radius:9px;background:#f8faff}
.customer-bulk-selection-status strong{color:var(--primary,#174b78);font-size:12px}
.customer-bulk-selection-status small{color:var(--muted,#728096);font-size:10px}
.customer-bulk-operation-field,.customer-bulk-operation-fields label{display:grid;gap:5px;min-width:0;color:var(--muted,#6b7d90);font-size:11px;font-weight:700}
.customer-bulk-operation-field select,.customer-bulk-operation-fields select{box-sizing:border-box;width:100%;min-height:39px;padding:7px 10px;border:1px solid #d9e1ec;border-radius:8px;background:#fff;color:var(--text,#25344c);font:inherit;font-size:12px}
.customer-bulk-operation-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:11px;border:1px solid #e5eaf1;border-radius:10px;background:#fbfcfe}
.customer-bulk-operation-fields[hidden]{display:none!important}
.customer-bulk-edit-form .form-actions{margin:0;justify-content:flex-start}
.customer-bulk-edit-form .button:disabled{opacity:.52;cursor:not-allowed}
.customer-directory-filter{margin-block:0 12px}
.customer-bulk-edit-disclosure{margin:0 12px 10px;border:1px solid #e4eaf2;border-radius:10px;background:#fbfcff;overflow:hidden}
.customer-bulk-edit-disclosure>summary{display:flex;align-items:center;gap:10px;min-height:42px;padding:8px 12px;cursor:pointer;list-style:none;color:#24415f}
.customer-bulk-edit-disclosure>summary::-webkit-details-marker{display:none}
.customer-bulk-edit-disclosure>summary>span:first-child{display:inline-flex;align-items:center;gap:7px}
.customer-bulk-edit-disclosure>summary>span:first-child svg{width:16px;height:16px;color:var(--primary,#6254d8)}
.customer-bulk-edit-disclosure>summary strong{font-size:12px}
.customer-bulk-edit-disclosure>summary small{color:var(--muted,#728096);font-size:10px}
.customer-bulk-disclosure-chevron{margin-inline-start:auto;color:#74869a;transition:transform .18s ease}
.customer-bulk-edit-disclosure[open] .customer-bulk-disclosure-chevron{transform:rotate(180deg)}
.customer-bulk-edit-disclosure-body{padding:11px 12px 12px;border-top:1px solid #e8edf4;background:#fff}
.customer-bulk-edit-disclosure .customer-bulk-edit-form{grid-template-columns:minmax(180px,.65fr) minmax(0,1.6fr) auto;align-items:end;gap:10px}
.customer-bulk-edit-disclosure .customer-bulk-selection-status{grid-column:1/-1}
.customer-bulk-edit-disclosure .customer-bulk-operation-fields{align-self:stretch}
.customer-bulk-edit-disclosure .customer-bulk-operation-fields label{min-width:150px}
.customer-bulk-notes-field textarea{box-sizing:border-box;width:100%;min-height:68px;padding:8px 10px;border:1px solid #d9e1ec;border-radius:8px;background:#fff;color:var(--text,#25344c);font:inherit;font-size:12px;resize:vertical}
.customer-bulk-notes-field .field-help{display:flex;align-items:center;gap:6px}
.customer-bulk-edit-disclosure .form-actions{align-self:end}
@media(max-width:760px){.customer-table-toolbar{align-items:flex-start!important}.customer-table-toolbar>.button{flex:0 0 auto}.customer-bulk-selection-status{align-items:flex-start;flex-direction:column}.customer-bulk-operation-fields{grid-template-columns:minmax(0,1fr)}}
@media(max-width:900px){.customer-bulk-edit-disclosure .customer-bulk-edit-form{grid-template-columns:minmax(0,1fr)}.customer-bulk-edit-disclosure .customer-bulk-selection-status{grid-column:auto}.customer-bulk-edit-disclosure .customer-bulk-operation-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.customer-bulk-edit-disclosure{margin-inline:7px}.customer-bulk-edit-disclosure>summary{align-items:flex-start;flex-wrap:wrap}.customer-bulk-edit-disclosure>summary small{flex:1 1 100%;padding-inline-start:23px}.customer-bulk-edit-disclosure .customer-bulk-operation-fields{grid-template-columns:minmax(0,1fr)}.customer-bulk-edit-disclosure .form-actions .button{width:100%;justify-content:center}}
@media(max-width:560px){.customers-header-actions{flex-wrap:wrap}.customers-header-actions .status-pill{flex:1 1 100%}.customers-header-actions>.button{flex:1 1 auto;justify-content:center}.customer-table-toolbar{flex-direction:column}.customer-table-toolbar>.button{width:100%;justify-content:center}}

/* One search form keeps customer and call filters together without mixing their query keys. */
.customer-calls-page>.customer-unified-filter-panel{order:2}
.customer-calls-page>.customer-call-summary{order:3}
.customer-unified-filter-panel{margin:0;padding:0;overflow:hidden;border:1px solid #d8e2ee;border-radius:13px;background:#fff;box-shadow:0 3px 12px rgb(32 56 85 / 3%)}
.customer-unified-filter-summary{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:54px;padding:10px 16px;cursor:pointer;list-style:none;transition:background-color .16s ease,color .16s ease}
.customer-unified-filter-summary::-webkit-details-marker{display:none}
.customer-unified-filter-summary>span:first-child{display:grid;gap:2px;min-width:0}
.customer-unified-filter-summary strong{color:#233d5a;font-size:13px;font-weight:700;line-height:1.65}
.customer-unified-filter-summary small{color:#667a92;font-size:11px;line-height:1.7}
.customer-unified-filter-summary:hover{background:#f7faff}
.customer-unified-filter-summary:focus-visible{outline:3px solid rgb(37 111 157 / 20%);outline-offset:-3px}
.customer-call-filter-toggle{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border:1px solid #e2e9f1;border-radius:8px;color:#657a91;font-size:15px;transition:transform .18s ease,background-color .18s ease,border-color .18s ease}
.customer-unified-filter-panel[open] .customer-call-filter-toggle{transform:rotate(180deg);border-color:#d4e4f1;background:#edf5fb;color:#34658a}
.customer-unified-filter-body{padding:13px;border-top:1px solid #e5ebf2;background:#f8fafd}
.customer-unified-filter-form{display:grid;gap:12px;min-width:0}
.customer-unified-filter-section{min-width:0;padding:13px 14px;border:1px solid #e1e8f0;border-radius:11px;background:#fff}
.customer-unified-filter-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding-bottom:9px;border-bottom:1px solid #edf1f5}
.customer-unified-filter-section-heading h3{margin:0;color:#304761;font-size:12px;font-weight:700;line-height:1.6}
.customer-unified-filter-section-heading small{color:#71839a;font-size:10px;line-height:1.7;text-align:end}
.customer-unified-filter-section .customer-unified-filter-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;gap:10px 12px;margin:0;padding:12px 0 0}
.customer-unified-filter-section .customer-unified-filter-fields>label{box-sizing:border-box;display:grid;min-width:0;width:100%;margin:0;gap:5px;color:#526781;font-size:11px;line-height:1.55}
.customer-unified-filter-section .customer-filter-primary-search{grid-column:1/-1}
.customer-unified-filter-section .customer-unified-filter-fields input,.customer-unified-filter-section .customer-unified-filter-fields select{box-sizing:border-box;width:100%;min-width:0;min-height:36px}
.customer-unified-filter-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 1px 0;border-top:1px solid #e8edf3}
.customer-unified-filter-actions>span{font-size:10px;line-height:1.7}
.customer-unified-filter-actions>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.customer-unified-filter-actions .button{min-height:38px;padding:8px 14px;font-size:11px}
.customer-unified-filter-actions .button:focus-visible{outline:3px solid rgb(98 84 216 / 22%);outline-offset:2px}
.customer-unified-filter-section .customer-unified-filter-fields input:focus-visible,.customer-unified-filter-section .customer-unified-filter-fields select:focus-visible{outline:3px solid rgb(37 111 157 / 15%);outline-offset:1px}
#customer-followup-create .customer-service-followup-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
#customer-followup-create .customer-service-followup-form>label{display:grid;gap:5px;min-width:0;font-size:11px}
#customer-followup-create .customer-service-followup-form>label:nth-of-type(3),#customer-followup-create .customer-service-followup-form>.field-help,#customer-followup-create .customer-service-followup-form>button{grid-column:1/-1}
#customer-followup-create .customer-service-followup-form>.field-help{margin:0;color:#667a92;font-size:10px;line-height:1.8}
@media(max-width:1050px){.customer-unified-filter-body{padding:11px}.customer-unified-filter-form{gap:10px}.customer-unified-filter-section .customer-unified-filter-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.customer-unified-filter-summary{min-height:50px;padding:9px 11px}.customer-unified-filter-summary strong{font-size:12px}.customer-unified-filter-summary small{font-size:10px}.customer-unified-filter-body{padding:8px}.customer-unified-filter-section{padding:10px}.customer-unified-filter-section-heading{align-items:flex-start;flex-direction:column;gap:2px;padding-bottom:7px}.customer-unified-filter-section-heading small{text-align:start}.customer-unified-filter-section .customer-unified-filter-fields{grid-template-columns:minmax(0,1fr);gap:9px;padding-top:9px}.customer-unified-filter-section .customer-filter-primary-search{grid-column:1}.customer-unified-filter-section .customer-unified-filter-fields input,.customer-unified-filter-section .customer-unified-filter-fields select{min-height:40px}.customer-unified-filter-actions{align-items:stretch;flex-direction:column-reverse;gap:8px}.customer-unified-filter-actions>div{display:grid;grid-template-columns:1fr 1fr}.customer-unified-filter-actions .button{justify-content:center;min-height:40px;padding-inline:8px;font-size:10px}#customer-followup-create .customer-service-followup-form{grid-template-columns:1fr}#customer-followup-create .customer-service-followup-form>label:nth-of-type(3),#customer-followup-create .customer-service-followup-form>.field-help,#customer-followup-create .customer-service-followup-form>button{grid-column:1}}
@media(max-width:380px){.customer-unified-filter-actions>div{grid-template-columns:1fr}.customer-unified-filter-actions>div .button{width:100%}}
@media(prefers-reduced-motion:reduce){.customer-unified-filter-summary,.customer-call-filter-toggle{transition:none}}

/* Customer profile editing lives in an accessible, responsive modal. */
#customer-profile-edit .modal-card{width:min(820px,100%);max-height:min(88dvh,900px);padding:22px 24px 20px;border:1px solid #dce5ef;border-radius:16px}
#customer-profile-edit .modal-card>h2{margin:0 48px 16px 0;padding-bottom:12px;border-bottom:1px solid #e9eef4;color:#243d5a;font-size:17px;line-height:1.7}
#customer-profile-edit .customer-profile-edit-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px 14px;min-width:0}
#customer-profile-edit .customer-profile-edit-form>label{display:grid;align-content:start;gap:6px;min-width:0;margin:0;color:#52677f;font-size:11px;line-height:1.7}
#customer-profile-edit .customer-profile-edit-form>label input,#customer-profile-edit .customer-profile-edit-form>label select,#customer-profile-edit .customer-profile-edit-form>label textarea{box-sizing:border-box;width:100%;min-width:0;min-height:40px}
#customer-profile-edit .customer-profile-edit-form>label textarea{min-height:100px;resize:vertical}
#customer-profile-edit .customer-profile-edit-form>.customer-profile-edit-notes,#customer-profile-edit .customer-profile-edit-form>fieldset,#customer-profile-edit .customer-profile-edit-form>.form-actions{grid-column:1/-1}
#customer-profile-edit .customer-profile-edit-phone-pair>span{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;min-width:0}
#customer-profile-edit .customer-profile-edit-form>fieldset{box-sizing:border-box;min-width:0;margin:0}
#customer-profile-edit .customer-profile-edit-form input:focus-visible,#customer-profile-edit .customer-profile-edit-form select:focus-visible,#customer-profile-edit .customer-profile-edit-form textarea:focus-visible{outline:3px solid rgb(37 111 157 / 16%);outline-offset:1px}
#customer-profile-edit .customer-profile-edit-form>.form-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:2px 0 0;padding-top:12px;border-top:1px solid #e8edf3}
#customer-profile-edit .customer-profile-edit-form>.form-actions .button{min-height:40px;justify-content:center}
@media(max-width:760px){#customer-profile-edit .modal-card{width:100%;height:100dvh;max-height:100dvh;padding:20px 16px calc(24px + env(safe-area-inset-bottom));border-radius:0}#customer-profile-edit .customer-profile-edit-form{grid-template-columns:minmax(0,1fr);gap:10px}#customer-profile-edit .customer-profile-edit-form>.customer-profile-edit-notes,#customer-profile-edit .customer-profile-edit-form>fieldset,#customer-profile-edit .customer-profile-edit-form>.form-actions{grid-column:1}#customer-profile-edit .customer-profile-edit-form>.form-actions{display:grid;grid-template-columns:1fr 1fr}#customer-profile-edit .customer-profile-edit-form>.form-actions .button{width:100%}}
@media(max-width:380px){#customer-profile-edit .customer-profile-edit-phone-pair>span{grid-template-columns:minmax(0,1fr)}#customer-profile-edit .customer-profile-edit-form>.form-actions{grid-template-columns:1fr}}

/* Workspace lifecycle controls: destructive actions stay compact and explicit. */
.workspace-lifecycle-panel{overflow:hidden}
.workspace-lifecycle-panel>.panel-inner{display:grid;gap:12px;padding:16px 18px}
.workspace-lifecycle-panel>.panel-inner>p{max-width:900px;margin:0;color:var(--muted,#728096);font-size:12px;line-height:1.9}
.workspace-lifecycle-code{display:inline-flex;align-items:center;min-height:30px;padding:4px 9px;border:1px solid #e5e8f0;border-radius:8px;background:#f8f9fd;color:#596780;font:600 11px/1.5 ui-monospace,Consolas,monospace}
.workspace-lifecycle-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.workspace-lifecycle-actions .button{min-height:38px}
.workspace-lifecycle-actions .button.danger{border-color:#e5a4a9;background:#fff7f7;color:#a62e39}
.workspace-lifecycle-notice,.workspace-lifecycle-error{padding:9px 11px;border:1px solid #f0c8c8;border-radius:9px;background:#fff8f8;color:#9d3038;font-size:11px;line-height:1.8}
.workspace-recovery-notice{margin:0 0 12px;padding:9px 12px;border:1px solid #cfe2f3;border-inline-start:3px solid #397bb4;border-radius:9px;background:#f4f9fe;color:#315e83;font-size:12px;line-height:1.8}
.workspace-lifecycle-job{display:grid;gap:8px;padding:12px;border:1px solid #e3e9f1;border-radius:10px;background:#f9fbfe}
.workspace-lifecycle-job>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.workspace-lifecycle-job>div strong{color:#263e5c;font-size:12px}
.workspace-lifecycle-job>p{margin:0;color:#65758b;font-size:11px;line-height:1.8}
.workspace-lifecycle-status{display:inline-flex;padding:3px 8px;border-radius:999px;background:#edf4fb;color:#3c648a;font-size:10px}
.workspace-lifecycle-transfer-proof{padding:7px 9px;border-inline-start:3px solid #6254d8;background:#f4f2ff;color:#5444c3!important}
.workspace-lifecycle-run-form{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0}
.workspace-lifecycle-live{color:#53657c;font-size:11px;line-height:1.8}
.workspace-lifecycle-modal{width:min(700px,calc(100vw - 28px));max-height:min(90dvh,820px);overflow:auto;padding:22px;border:1px solid #e0e6ef;border-radius:16px;background:#fff;box-shadow:0 24px 70px rgb(22 39 64 / 20%);scrollbar-gutter:stable}
.workspace-lifecycle-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-inline-end:38px}
.workspace-lifecycle-dialog-heading .eyebrow{display:block;margin-bottom:2px;color:#8c4850;font-size:10px;font-weight:700}
.workspace-lifecycle-dialog-heading h2{margin:0;color:#213b59;font-size:18px;line-height:1.6}
.workspace-lifecycle-dialog-mark{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border:1px solid #f0d3d5;border-radius:12px;background:#fff5f5;color:#aa3a43;font-size:20px;font-weight:800}
.workspace-lifecycle-dialog-workspace{display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px 12px;margin:14px 0 10px;padding:10px 12px;border:1px solid #e7ebf2;border-radius:11px;background:#f8fafe}
.workspace-lifecycle-dialog-workspace>span{grid-column:1/-1;color:#718096;font-size:10px}
.workspace-lifecycle-dialog-workspace>strong{min-width:0;overflow-wrap:anywhere;color:#283e5b;font-size:13px}
.workspace-lifecycle-dialog-workspace>bdi{padding:4px 7px;border-radius:6px;background:#edf1f7;color:#586b83;font:600 10px/1.4 ui-monospace,Consolas,monospace}
.workspace-lifecycle-dialog-description{margin:0 0 12px;color:#63758b;font-size:12px;line-height:1.8}
.workspace-lifecycle-confirm-form{display:grid;gap:10px}
.workspace-lifecycle-impact{padding:12px 14px;border:1px solid #e1e8f2;border-radius:11px;background:#f8fafd}
.workspace-lifecycle-impact[hidden]{display:none!important}
.workspace-lifecycle-impact h3{margin:0 0 7px;color:#304863;font-size:12px;line-height:1.7}
.workspace-lifecycle-impact ul{display:grid;gap:5px;margin:0;padding-inline-start:19px;color:#53667d;font-size:11px;line-height:1.85}
.workspace-lifecycle-impact li::marker{color:#6254d8}
.workspace-lifecycle-impact p{margin:0;color:#53667d;font-size:11px;line-height:1.85}
.workspace-lifecycle-delete-impact{border-color:#f0dedf;background:#fffafa}
.workspace-lifecycle-delete-impact h3{color:#8c3a43}
.workspace-lifecycle-delete-impact li::marker{color:#a83d46}
.workspace-lifecycle-transfer-option{display:grid;gap:9px;padding:12px 14px;border:1px solid #e2e7f0;border-radius:11px;background:#fafbfe}
.workspace-lifecycle-transfer-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#304863;font-size:12px}
.workspace-lifecycle-transfer-heading span{padding:3px 7px;border-radius:999px;background:#edf1f7;color:#65768a;font-size:10px}
.workspace-lifecycle-transfer-option[hidden]{display:none!important}
.workspace-lifecycle-transfer-option>p{margin:0;color:#5f7086;font-size:11px;line-height:1.9}
.workspace-lifecycle-links{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.workspace-lifecycle-links a{color:#4f46bd;text-decoration:underline;text-underline-offset:3px}
.workspace-lifecycle-check{display:flex;align-items:flex-start;gap:8px;min-width:0;color:#344b66;font-size:11px;line-height:1.8}
.workspace-lifecycle-check input{flex:0 0 auto;margin:4px 0 0;accent-color:#6254d8}
.workspace-lifecycle-code-field{display:grid;gap:6px;min-width:0;color:#52677f;font-size:11px;font-weight:700;line-height:1.7}
.workspace-lifecycle-code-field input,.workspace-lifecycle-code-field select{box-sizing:border-box;width:100%;min-width:0;min-height:40px;padding:8px 11px;border:1px solid #d7e0eb;border-radius:8px;background:#fff;color:#243a56;font:inherit;font-size:12px}
.workspace-lifecycle-code-field input:focus-visible,.workspace-lifecycle-code-field select:focus-visible{outline:3px solid rgb(98 84 216 / 18%);outline-offset:1px}
.workspace-lifecycle-transfer-empty{padding:8px 10px;border-radius:8px;background:#f1f4f9;color:#6c7b8e!important}
.workspace-lifecycle-ack{padding:9px 10px;border:1px solid #efd0d0;border-radius:9px;background:#fff8f8;color:#74373d}
.workspace-lifecycle-modal-actions{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:8px;margin-top:2px;padding-top:12px;border-top:1px solid #e8edf3}
.workspace-lifecycle-modal-actions .button{min-height:40px}
@media(max-width:640px){.workspace-lifecycle-panel>.panel-inner{padding:13px}.workspace-lifecycle-modal{width:100%;height:100dvh;max-height:100dvh;padding:18px 15px calc(16px + env(safe-area-inset-bottom));border-radius:0}.workspace-lifecycle-dialog-heading h2{font-size:17px}.workspace-lifecycle-dialog-workspace{margin:11px 0 8px}.workspace-lifecycle-impact{padding:10px 11px}.workspace-lifecycle-modal-actions{position:sticky;bottom:0;display:grid;grid-template-columns:1fr 1fr;margin:3px -15px calc(-16px - env(safe-area-inset-bottom));padding:10px 15px calc(16px + env(safe-area-inset-bottom));background:rgb(255 255 255 / 96%);backdrop-filter:blur(10px)}.workspace-lifecycle-modal-actions .button{width:100%;justify-content:center}}
@media(max-width:380px){.workspace-lifecycle-modal-actions{grid-template-columns:1fr}.workspace-lifecycle-actions{display:grid;grid-template-columns:1fr}.workspace-lifecycle-actions .button{width:100%;justify-content:center}}

/* Keep destructive Workspace confirmation isolated from global label/input rules. */
#workspace-lifecycle-confirm{box-sizing:border-box;overflow-x:hidden}
.workspace-lifecycle-modal,
.workspace-lifecycle-modal *,
.workspace-lifecycle-modal *::before,
.workspace-lifecycle-modal *::after{box-sizing:border-box}
.workspace-lifecycle-modal{min-width:0;max-width:calc(100vw - 32px);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
.workspace-lifecycle-modal :where(.workspace-lifecycle-dialog-heading,.workspace-lifecycle-dialog-workspace,.workspace-lifecycle-confirm-form,.workspace-lifecycle-impact,.workspace-lifecycle-transfer-option,.workspace-lifecycle-modal-actions){min-width:0;max-width:100%}
.workspace-lifecycle-modal .workspace-lifecycle-confirm-form>label.workspace-lifecycle-check,
.workspace-lifecycle-modal .workspace-lifecycle-transfer-option>label.workspace-lifecycle-check{display:flex!important;grid-template-columns:none!important;align-items:flex-start;width:100%;min-width:0;max-width:100%;margin:0;overflow-wrap:anywhere}
.workspace-lifecycle-modal .workspace-lifecycle-check>input[type="checkbox"],
.workspace-lifecycle-modal .workspace-lifecycle-check>input[type="radio"]{appearance:auto!important;-webkit-appearance:auto!important;display:block;flex:0 0 18px;width:18px!important;min-width:18px!important;max-width:18px;height:18px!important;min-height:18px!important;max-height:18px;margin:3px 0 0;padding:0!important;border:0!important;border-radius:3px;background:transparent!important;box-shadow:none!important;accent-color:#6254d8}
.workspace-lifecycle-modal .workspace-lifecycle-check>span{display:block;flex:1 1 auto;min-width:0;overflow-wrap:anywhere;line-height:1.85}
.workspace-lifecycle-modal .workspace-lifecycle-code-field{grid-template-columns:minmax(0,1fr);width:100%;min-width:0;max-width:100%;overflow-wrap:anywhere}
.workspace-lifecycle-modal .workspace-lifecycle-code-field>input,
.workspace-lifecycle-modal .workspace-lifecycle-code-field>select{width:100%;min-width:0;max-width:100%}
.workspace-lifecycle-modal .workspace-lifecycle-dialog-workspace{grid-template-columns:minmax(0,1fr) auto}
.workspace-lifecycle-modal .workspace-lifecycle-dialog-workspace>bdi{max-width:100%;overflow-wrap:anywhere}
.workspace-lifecycle-modal .workspace-lifecycle-transfer-option>p,
.workspace-lifecycle-modal .workspace-lifecycle-impact li{min-width:0;overflow-wrap:anywhere}
@media(max-width:640px){
  .workspace-lifecycle-modal{width:100%;max-width:100%;min-width:0}
  .workspace-lifecycle-modal .workspace-lifecycle-dialog-workspace{grid-template-columns:minmax(0,1fr)}
  .workspace-lifecycle-modal .workspace-lifecycle-dialog-workspace>bdi{justify-self:start}
  .workspace-lifecycle-modal .workspace-lifecycle-modal-actions{min-width:0}
}

/* Excel import quality queue: explain each issue and the next action without widening the page. */
.excel-quality-panel{overflow:hidden}
.excel-quality-panel-header{align-items:center;gap:12px}
.excel-quality-panel-header>div{min-width:0}
.excel-quality-panel-header h2{margin:0}
.excel-quality-panel-header p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.8}
.excel-quality-guide{display:grid;gap:13px;margin:0 0 18px;padding:15px;border:1px solid #dce9e2;border-radius:13px;background:linear-gradient(135deg,#f7fbf8 0%,#f3f8fc 100%)}
.excel-quality-guide-heading{display:flex;align-items:flex-start;gap:10px;min-width:0}
.excel-quality-guide-mark{display:inline-flex;flex:0 0 28px;width:28px;height:28px;align-items:center;justify-content:center;border:1px solid #c9e0d3;border-radius:9px;background:#fff;color:#267a58;font-weight:800;font-size:15px}
.excel-quality-guide-heading>div{min-width:0}
.excel-quality-guide-heading h3{margin:0;color:#253b33;font-size:13px}
.excel-quality-guide-heading p{margin:3px 0 0;color:#65766f;font-size:11px;line-height:1.8}
.excel-quality-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:0;padding:0;list-style:none}
.excel-quality-steps li{display:flex;align-items:flex-start;gap:8px;min-width:0;padding:9px 10px;border:1px solid #e2ebe6;border-radius:10px;background:rgb(255 255 255 / 82%)}
.excel-quality-steps li>span{display:inline-flex;flex:0 0 22px;width:22px;height:22px;align-items:center;justify-content:center;border-radius:7px;background:#e9f5ee;color:#267a58;font-size:11px;font-weight:800}
.excel-quality-steps li>div{display:grid;gap:2px;min-width:0}
.excel-quality-steps strong{color:#344c42;font-size:11px}
.excel-quality-steps small{color:#738078;font-size:10px;line-height:1.7}
.excel-quality-guide-note{margin:0;padding:9px 11px;border-inline-start:3px solid #d5a64d;border-radius:7px;background:#fffaf0;color:#6f5a31;font-size:11px;line-height:1.9}
.excel-quality-guide-note strong{color:#72500f}
.excel-quality-bulk{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 17px;padding:13px 14px;border:1px solid #efdfd8;border-radius:11px;background:#fffaf8}
.excel-quality-bulk-copy{min-width:0;max-width:520px}
.excel-quality-bulk-copy h3{margin:0 0 3px;color:#70453e;font-size:12px}
.excel-quality-bulk-copy p{margin:0;color:#806a66;font-size:10px;line-height:1.8}
.excel-quality-bulk-form{display:grid;justify-items:start;gap:8px;min-width:240px;margin:0}
.excel-quality-bulk-confirm{display:flex!important;align-items:flex-start;gap:7px;min-width:0;color:#715d59;font-size:10px;line-height:1.7}
.excel-quality-bulk-confirm input{flex:0 0 16px;width:16px;height:16px;margin:2px 0 0;accent-color:#a55045}
.excel-quality-bulk-form .button{min-height:35px}
.excel-quality-bulk-locked{max-width:340px;padding:8px 10px;border:1px solid #eadfd6;border-radius:8px;background:#fff;color:#806a66;font-size:10px;line-height:1.8}
.excel-quality-list-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 9px;color:#334155}
.excel-quality-list-heading strong{font-size:12px}
.excel-quality-list-heading span{color:var(--muted);font-size:10px}
.excel-quality-list{display:grid;gap:10px}
.excel-quality-item{display:grid;gap:12px;min-width:0;padding:14px;border:1px solid #e4eaf0;border-radius:12px;background:#fff;transition:border-color .16s ease,box-shadow .16s ease}
.excel-quality-item:hover{border-color:#d3e1dc;box-shadow:0 5px 18px rgb(28 52 73 / 5%)}
.excel-quality-item-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0}
.excel-quality-item-title{display:grid;gap:6px;min-width:0}
.excel-quality-item-title h3{margin:0;color:#26384b;font-size:13px;line-height:1.8}
.excel-quality-tags{display:flex;flex-wrap:wrap;gap:5px}
.excel-quality-tag{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border:1px solid #e4eaf0;border-radius:999px;background:#f7f9fb;color:#617184;font-size:10px;line-height:1.4}
.excel-quality-tag.is-error{border-color:#f0d4d0;background:#fff6f4;color:#a64a40}
.excel-quality-record-name{max-width:42%;overflow:hidden;color:#536579;font-size:11px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.excel-quality-item-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:9px;min-width:0}
.excel-quality-explainer,.excel-quality-next-step{min-width:0;padding:10px 11px;border-radius:9px}
.excel-quality-explainer{border:1px solid #edf0f4;background:#f8fafc}
.excel-quality-next-step{border:1px solid #e2eee7;background:#f6fbf7}
.excel-quality-explainer h4,.excel-quality-next-step h4{margin:0 0 4px;color:#48596c;font-size:10px;font-weight:700}
.excel-quality-next-step h4{color:#347254}
.excel-quality-explainer p,.excel-quality-next-step p{margin:0;color:#566679;font-size:11px;line-height:1.9;overflow-wrap:anywhere}
.excel-quality-next-step p{color:#456351}
.excel-quality-location{display:flex;align-items:flex-start;gap:9px;min-width:0;padding:8px 10px;border:1px solid #e6ebf3;border-radius:8px;background:#fbfcfe}
.excel-quality-location span{flex:0 0 auto;color:#788596;font-size:10px}
.excel-quality-location strong{min-width:0;color:#435b78;font-size:10px;line-height:1.8;overflow-wrap:anywhere}
.excel-quality-item-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;padding-top:10px;border-top:1px solid #edf0f4}
.excel-quality-source{display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0;color:#788596;font-size:10px}
.excel-quality-source span{display:inline-flex;max-width:100%;padding:3px 7px;border:1px solid #edf0f4;border-radius:6px;background:#fbfcfd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.excel-quality-source .excel-quality-filename{max-width:min(310px,40vw);direction:ltr}
.excel-quality-item-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:7px;flex:0 0 auto}
.excel-quality-item-actions form{margin:0}
.excel-quality-item-actions .button{min-height:34px}
.excel-quality-empty{margin-top:2px}
@media(max-width:760px){
  .excel-quality-bulk{align-items:stretch;flex-direction:column}
  .excel-quality-bulk-form{min-width:0;width:100%}
  .excel-quality-bulk-form .button{width:auto}
  .excel-quality-steps{grid-template-columns:1fr}
  .excel-quality-item-body{grid-template-columns:1fr}
  .excel-quality-item-footer{align-items:flex-start;flex-direction:column}
  .excel-quality-item-actions{width:100%;justify-content:flex-start}
}
@media(max-width:480px){
  .excel-quality-guide{padding:12px}
  .excel-quality-bulk{padding:11px}
  .excel-quality-item{padding:11px}
  .excel-quality-item-top{flex-direction:column;gap:7px}
  .excel-quality-record-name{max-width:100%;white-space:normal;overflow-wrap:anywhere}
  .excel-quality-list-heading{align-items:flex-start;flex-direction:column;gap:3px}
  .excel-quality-item-actions{display:grid;grid-template-columns:1fr}
  .excel-quality-item-actions .button{width:100%;justify-content:center}
  .excel-quality-item-actions form,.excel-quality-item-actions form .button{width:100%}
  .excel-quality-location{flex-direction:column;gap:2px}
  .excel-quality-source .excel-quality-filename{max-width:100%}
}

/* Workspace business profile selector: one accessible, extensible profile card. */
.workspace-profile-picker{grid-column:1/-1;min-width:0;margin:2px 0 4px;padding:13px 14px;border:1px solid #dce8e2;border-radius:14px;background:linear-gradient(180deg,#fbfefc 0%,#fff 100%)}
.workspace-profile-picker>legend{padding:0 7px;color:#244c3c;font-size:13px;font-weight:750}
.workspace-profile-picker__hint{margin:0 0 10px;color:#718079;font-size:11px;line-height:1.8}
.workspace-profile-picker__options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:9px}
.workspace-profile-option{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:start;gap:10px;min-width:0;padding:11px 12px;border:1px solid #e2e9e5;border-radius:11px;background:#fff;cursor:pointer;transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease}
.workspace-profile-option:hover{border-color:#a8c8b6;background:#fcfefc}
.workspace-profile-option:has(input:checked){border-color:#70ae8b;background:#f4faf6;box-shadow:0 0 0 2px rgba(60,139,94,.08)}
.workspace-profile-option input[type=radio]{width:17px;height:17px;margin:2px 0 0;accent-color:#34835b;cursor:pointer}
.workspace-profile-option input[type=radio]:focus-visible{outline:3px solid rgba(44,127,84,.24);outline-offset:3px}
.workspace-profile-option__body{display:grid;gap:5px;min-width:0}
.workspace-profile-option__body>strong{color:#263d32;font-size:13px;line-height:1.5}
.workspace-profile-option__meta{display:flex;flex-wrap:wrap;gap:5px}
.workspace-profile-option__meta>span{padding:2px 7px;border:1px solid #e3ece6;border-radius:999px;background:#fff;color:#607369;font-size:10px;line-height:1.6}
.workspace-profile-option__body>small{color:#7a8780;font-size:10px;line-height:1.7}
.workspace-profile-option__selected{align-self:start;padding:3px 7px;border-radius:999px;background:#e8f4ec;color:#34754e;font-size:10px;white-space:nowrap}
.workspace-profile-invitation-note{margin:2px 0 12px;padding:10px 12px;border:1px solid #e0e9e5;border-radius:10px;background:#f7faf8;color:#60726a;font-size:11px;line-height:1.8}
@media(max-width:620px){.workspace-profile-picker{padding:11px}.workspace-profile-picker__options{grid-template-columns:1fr}.workspace-profile-option{padding:10px;gap:8px}}
@media(prefers-reduced-motion:reduce){.workspace-profile-option{transition:none}}
.workspace-profile-option__selected{display:none;align-self:start;padding:3px 7px;border-radius:999px;background:#e8f4ec;color:#34754e;font-size:10px;white-space:nowrap}
.workspace-profile-option:has(input:checked) .workspace-profile-option__selected{display:inline-flex}

/* Engineering workspace: restrained steel-blue surfaces with a warm site-work accent. */
body[data-crm-workspace-style="engineering"]{
  --crm-color-bg:#f5f7f8;
  --crm-color-surface:#fff;
  --crm-color-surface-soft:#f6f8f9;
  --crm-color-surface-tint:#eaf1f3;
  --crm-color-ink:#243541;
  --crm-color-ink-soft:#425762;
  --crm-color-muted:#778790;
  --crm-color-border:#e0e7e9;
  --crm-color-border-strong:#cbd7dc;
  --crm-color-primary:#315e71;
  --crm-color-primary-strong:#234656;
  --crm-color-primary-soft:#e8f0f3;
  --crm-color-warning:#ad7427;
  --crm-legacy-bg:#f5f7f8;
  --crm-legacy-surface:#fff;
  --crm-legacy-surface-soft:#f1f5f6;
  --crm-legacy-line:#e0e7e9;
  --crm-legacy-text:#243541;
  --crm-legacy-muted:#778790;
  --crm-legacy-primary:#315e71;
  --crm-legacy-primary-dark:#234656;
  --crm-legacy-primary-soft:#e8f0f3;
  --crm-legacy-warning:#ad7427;
  --crm-control-primary:#315e71;
  --crm-control-soft:#e8f0f3;
  --crm-control-line:#dce5e8;
  --crm-control-bg:#f5f7f8;
  --bg:#f5f7f8;
  --surface:#fff;
  --surface-soft:#f1f5f6;
  --line:#e0e7e9;
  --text:#243541;
  --muted:#778790;
  --primary:#315e71;
  --primary-dark:#234656;
  --primary-soft:#e8f0f3;
  --warning:#ad7427;
  --control-primary:#315e71;
  --control-soft:#e8f0f3;
  --control-line:#dce5e8;
  --control-bg:#f5f7f8;
  --crm-ink:#243541;
  --crm-ink-soft:#425762;
  --crm-muted:#778790;
  --crm-border:#e0e7e9;
  --crm-border-strong:#cbd7dc;
  --crm-surface:#fff;
  --crm-surface-soft:#f6f8f9;
  --crm-surface-tint:#eaf1f3;
  --crm-primary:#315e71;
  --crm-primary-deep:#234656;
  --crm-primary-wash:#e8f0f3;
}
.workspace-profile-option[data-workspace-profile="engineering_construction"]{border-color:#d8e3e6;background:linear-gradient(145deg,#f7fafb 0%,#fff 72%)}
.workspace-profile-option[data-workspace-profile="engineering_construction"]:hover{border-color:#9ab6c0;background:#f3f8f9}
.workspace-profile-option[data-workspace-profile="engineering_construction"]:has(input:checked){border-color:#5d8796;background:linear-gradient(145deg,#edf4f6 0%,#fff 76%);box-shadow:0 0 0 2px rgba(49,94,113,.09)}
.workspace-profile-option[data-workspace-profile="engineering_construction"] input[type=radio]{accent-color:#315e71}
.workspace-profile-option[data-workspace-profile="engineering_construction"] input[type=radio]:focus-visible{outline-color:rgba(49,94,113,.28)}
.workspace-profile-option[data-workspace-profile="engineering_construction"] .workspace-profile-option__body>strong{color:#234656}
.workspace-profile-option[data-workspace-profile="engineering_construction"] .workspace-profile-option__selected{background:#e8f0f3;color:#315e71}
.workspace-profile-option__availability{padding:5px 8px;border-inline-start:2px solid #c28b3e;border-radius:3px 7px 7px 3px;background:#fbf7ef;color:#79603b;font-size:10px;line-height:1.7}
body[data-crm-workspace-style="engineering"] .workspace-profile-picker{border-color:#d6e1e4;background:linear-gradient(180deg,#f8fafb 0%,#fff 100%)}
body[data-crm-workspace-style="engineering"] .workspace-profile-picker>legend{color:#234656}
@media(prefers-reduced-motion:reduce){.workspace-profile-option[data-workspace-profile="engineering_construction"]{transition:none}}
