.sidebar nav a[aria-current="page"]{background:#23435e;color:#fff;font-weight:650}
.quick-actions{position:relative}
.quick-actions>summary{list-style:none}
.quick-actions>summary::-webkit-details-marker{display:none}
.quick-actions-trigger{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:5px;background:#fff;color:var(--blue);padding:8px 13px;cursor:pointer;font-weight:600}
.quick-actions-trigger:hover,.quick-actions[open] .quick-actions-trigger{background:#f3f8fc;border-color:#b8cfe2}
.quick-actions-trigger span{font-size:12px}
.quick-actions-menu{position:absolute;z-index:30;right:0;top:calc(100% + 8px);width:230px;padding:6px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 12px 30px rgba(18,43,66,.16)}
.quick-actions-item{display:block;width:100%;padding:9px 11px;border:0;border-radius:5px;background:#fff;color:var(--ink);text-align:left;text-decoration:none;font:inherit;cursor:pointer}
.quick-actions-item:hover{background:#f1f6fa;color:var(--blue);text-decoration:none}
.kanban-heading{align-items:flex-end}
.pipeline-switcher{width:min(390px,100%)}
.pipeline-switcher>label,.stage-move-form>label{display:block;margin-bottom:5px;color:var(--muted);font-size:12px;font-weight:600}
.pipeline-switcher-controls{display:flex;gap:8px}
.pipeline-switcher-controls select{min-width:0}
.kanban-board{display:flex;align-items:stretch;gap:14px;overflow-x:auto;padding:2px 2px 18px}
.kanban-column{display:flex;flex:0 0 290px;flex-direction:column;max-width:340px;min-width:260px;max-height:calc(100vh - 240px);overflow:hidden;border:1px solid var(--line);border-radius:9px;background:#edf2f6;padding:0}
.kanban-column-header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 15px;border-bottom:1px solid #dce4eb;background:#f7f9fb}
.kanban-column-header h2{margin:0;font-size:14px}
.kanban-count{display:grid;place-items:center;min-width:25px;height:25px;padding:0 6px;border-radius:13px;background:#e5edf4;color:#38566f;font-size:12px;font-weight:700}
.kanban-cards{overflow-y:auto;padding:4px 10px 10px}
.kanban-card{padding:14px;border:1px solid #d6e0e8;border-radius:8px;box-shadow:0 1px 2px rgba(18,43,66,.04)}
.kanban-card-title{display:block;color:var(--ink);font-weight:650;line-height:1.4}
.kanban-card-title:hover{color:var(--blue)}
.kanban-card-value{margin:9px 0 0;color:var(--muted);font-size:12px}
.kanban-card-value strong{color:var(--ink)}
.stage-move-form{display:grid;gap:7px;margin-top:12px;padding-top:11px;border-top:1px solid #e6ebef}
.stage-move-form>label{margin:0}
.stage-move-form select,.stage-move-form textarea{font-size:12px}
.stage-move-form textarea{min-height:42px;resize:vertical}
.stage-move-form .lost-reason-label{margin-top:3px}
.stage-move-form button{justify-self:start;padding:6px 10px;font-size:12px}
.kanban-empty{margin:10px 0;padding:15px 10px;border:1px dashed #cbd6df;border-radius:6px;color:var(--muted);font-size:12px;text-align:center}
.sales-workspace{--pipeline-space:var(--erp-space-4,16px)}
.sales-workspace .kanban-heading{align-items:flex-start;gap:20px}
.kanban-toolbar{display:grid;gap:12px;justify-items:end;min-width:min(420px,100%)}
.pipeline-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:0 0 16px}
.pipeline-kpis>article{display:flex;min-height:88px;flex-direction:column;justify-content:space-between;gap:8px;padding:14px 16px;border:1px solid var(--erp-border,#e4e7ec);border-radius:var(--erp-radius-md,10px);background:var(--erp-surface,#fff)}
.pipeline-kpis>article>span{color:var(--erp-muted,#667085);font-size:12px;line-height:1.4}
.pipeline-kpis>article>strong{color:var(--erp-ink,#101828);font-size:22px;line-height:1.2;font-variant-numeric:tabular-nums}
.pipeline-value-kpi{justify-content:flex-start!important}.pipeline-value-kpi>strong{font-size:14px!important}
.pipeline-filters{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:0 0 16px;padding:12px;border:1px solid var(--erp-border,#e4e7ec);border-radius:var(--erp-radius-md,10px);background:var(--erp-surface,#fff)}
.pipeline-filters label{display:grid;gap:5px;min-width:160px;color:var(--erp-muted,#667085);font-size:12px;font-weight:600}
.pipeline-filters input,.pipeline-filters select{height:40px;border-color:var(--erp-border,#d0d5dd);border-radius:var(--erp-radius-sm,8px)}
.pipeline-clear{padding:9px 4px;color:var(--erp-primary,#6d28d9);font-weight:600}
.kanban-board{gap:16px;scroll-snap-type:x proximity}
.kanban-column{flex-basis:300px;max-height:calc(100dvh - 330px);min-height:260px;border-color:var(--erp-border,#e4e7ec);border-radius:var(--erp-radius-md,10px);background:var(--erp-surface-soft,#f3f4f6);scroll-snap-align:start}
.kanban-column-header{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:center;min-height:82px;height:82px;flex:none;gap:8px;padding:10px 13px;border-color:var(--erp-border,#e4e7ec);border-top:3px solid var(--erp-info,#175cd3);background:var(--erp-surface,#fff)}
.kanban-column-header h2{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.8em;color:var(--erp-ink,#101828);font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.kanban-column-header[data-stage-tone="info"]{border-top-color:var(--erp-info,#175cd3)}
.kanban-column-header[data-stage-tone="teal"]{border-top-color:#0f8b8d}
.kanban-column-header[data-stage-tone="purple"]{border-top-color:var(--erp-primary,#6d28d9)}
.kanban-column-header[data-stage-tone="amber"]{border-top-color:var(--erp-warning,#9b6b26)}
.kanban-column-header[data-stage-tone="indigo"]{border-top-color:#5145a7}
.kanban-column-header[data-stage-tone="success"]{border-top-color:var(--erp-success,#157a70)}
.kanban-column-header[data-stage-tone="danger"]{border-top-color:var(--erp-danger,#b84a56)}
.kanban-column-header[data-stage-tone="neutral"]{border-top-color:var(--erp-border,#e4e7ec)}
.kanban-count{width:28px;min-width:28px;height:28px;background:var(--erp-neutral-soft,#f3f4f6);color:var(--erp-muted,#475467);font-variant-numeric:tabular-nums}
.kanban-column-header[data-stage-tone="success"] .kanban-count{background:var(--erp-success-soft,#e8f3f1);color:var(--erp-success,#157a70)}
.kanban-column-header[data-stage-tone="danger"] .kanban-count{background:var(--erp-danger-soft,#f9ecee);color:var(--erp-danger,#b84a56)}
.kanban-column-header[data-stage-tone="amber"] .kanban-count{background:var(--erp-warning-soft,#f8f0e4);color:var(--erp-warning,#9b6b26)}
.kanban-cards{display:grid;align-content:start;gap:10px;min-height:180px;padding:10px;overscroll-behavior:contain}
.kanban-card{min-height:150px;margin:0;padding:14px;border-color:var(--erp-border,#e4e7ec);border-radius:var(--erp-radius-md,10px);background:var(--erp-surface,#fff);box-shadow:0 1px 2px #1018280a;transition:border-color 140ms ease,box-shadow 140ms ease,transform 140ms ease}
.kanban-card:hover{transform:translateY(-1px);border-color:#c7b5ef;box-shadow:0 5px 16px #10182812}
.kanban-card[data-stage-tone="success"]{border-inline-start:3px solid var(--erp-success,#18836b)}
.kanban-card[data-stage-tone="danger"]{border-inline-start:3px solid var(--erp-danger,#b84a56)}
.kanban-card[data-stage-tone="info"]{border-inline-start:3px solid var(--erp-info,#175cd3)}
.kanban-card-title{color:var(--erp-ink,#101828);font-size:14px}
.kanban-customer{display:block;margin-top:5px;color:var(--erp-primary,#6d28d9);font-size:12px;font-weight:650;overflow-wrap:anywhere}
.kanban-need{margin:8px 0 0;color:var(--erp-muted,#475467);font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.kanban-products{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0 0}
.kanban-products span{padding:3px 7px;border-radius:999px;background:var(--erp-primary-soft,#f3e8ff);color:var(--erp-primary,#6d28d9);font-size:11px}
.kanban-card .muted{margin:9px 0 0;font-size:12px;line-height:1.45}
.kanban-next-action{overflow-wrap:anywhere}
@media(max-width:700px){
  .quick-actions-menu{right:0}
  .kanban-heading{align-items:stretch}
  .kanban-toolbar{min-width:0;justify-items:stretch}
  .pipeline-switcher{width:100%}
  .pipeline-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .pipeline-kpis>article{min-height:78px;padding:11px}
  .pipeline-filters{display:grid;grid-template-columns:1fr 1fr}
  .pipeline-filters label{min-width:0}
  .pipeline-filters button,.pipeline-clear{justify-self:start}
  .kanban-column{max-height:70dvh;min-height:52dvh;flex-basis:min(84vw,320px)}
}
