:root {
    --bg: #f3f6fb;
    --card: #ffffff;
    --line: #e5e7eb;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --radius: 20px;
}
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, #f8fbff 100%);
    color: var(--text);
}
.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(14px);
    border-right: 1px solid rgba(226,232,240,0.9);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.main-content { padding: 28px; }
.brand-box, .user-card, .card-soft, .stat-card, .panel {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(226,232,240,0.9);
    box-shadow: 0 12px 36px rgba(15,23,42,0.06);
    border-radius: var(--radius);
}
.brand-box { display:flex; gap:14px; padding:16px; align-items:center; }
.brand-icon {
    width: 46px; height: 46px; border-radius: 14px;
    background: linear-gradient(135deg,#2563eb,#60a5fa); color: #fff;
    display:flex; align-items:center; justify-content:center; font-weight:700;
}
.user-card { padding: 16px; }
.sidebar-link {
    border-radius: 14px;
    color: var(--text);
    padding: 12px 16px;
    background: transparent;
}
.sidebar-link:hover, .sidebar-link.active { background: var(--primary-soft); color: var(--primary); }
.section-title { font-size: 1.5rem; font-weight: 700; }
.section-subtitle { color: var(--muted); }
.stat-card { padding: 20px; height: 100%; }
.stat-label { color: var(--muted); font-size: .9rem; }
.stat-value { font-size: 1.8rem; font-weight: 700; margin-top: 8px; }
.card-soft, .panel { padding: 20px; }
.table thead th { white-space: nowrap; color: var(--muted); font-size: .85rem; }
.table td, .table th { vertical-align: middle; }
.badge-status { padding: 8px 12px; border-radius: 999px; font-weight: 600; }
.status-pipeline { background:#eff6ff; color:#1d4ed8; }
.status-sent { background:#ecfdf5; color:#15803d; }
.status-principal { background:#fffbeb; color:#b45309; }
.status-noquote { background:#fef2f2; color:#b91c1c; }
.auth-page {
    min-height: 100vh; display:flex; align-items:center; justify-content:center; padding: 24px;
    background: radial-gradient(circle at top right, #dbeafe, #f8fbff 55%);
}
.auth-card {
    width: 100%; max-width: 1000px; display:grid; grid-template-columns: 1fr 1fr; overflow:hidden;
    background:#fff; border-radius: 28px; box-shadow: 0 24px 70px rgba(15,23,42,0.1);
}
.auth-hero { background: linear-gradient(135deg,#2563eb,#1d4ed8); color:#fff; padding:40px; }
.auth-form { padding:40px; }
.metric-box { background:#fff; border-radius:18px; padding:16px; color:#0f172a; margin-top:20px; }
.filter-bar { display:flex; gap:12px; flex-wrap:wrap; }
@media (max-width: 991px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { display:none; }
    .auth-card { grid-template-columns: 1fr; }
}


.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #2563eb;
    box-shadow: 0 10px 24px rgba(37,99,235,.18);
}
.btn-primary:hover { background: linear-gradient(135deg, #1d4ed8, #1e40af); border-color: #1d4ed8; }
.btn-outline-secondary, .btn-light, .form-control, .form-select { border-radius: 14px; }
.form-control, .form-select {
    border: 1px solid #dbe3f0;
    padding: .8rem .95rem;
    box-shadow: none;
}
.form-control:focus, .form-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 .25rem rgba(37,99,235,.12);
}
.table-responsive { border-radius: 18px; }
.table-hover tbody tr:hover { background: #f8fbff; }
.sidebar-link i { width: 18px; }
.auth-card {
    border: 3px solid #2563eb;
    box-shadow: 0 28px 80px rgba(37,99,235,0.16), 0 16px 36px rgba(15,23,42,0.08);
}
.auth-hero {
    position: relative;
    overflow: hidden;
}
.auth-hero::before {
    content: '';
    position: absolute;
    inset: auto -60px -60px auto;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
}
.auth-form {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.24);
    font-size: .9rem;
    font-weight: 600;
}
.auth-submit { border-radius: 16px; }
.panel h5, .section-title { letter-spacing: -.02em; }
.metric-box {
    border: 1px solid #bfdbfe;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.card-soft {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}
@media (max-width: 991px) {
    .main-content { padding: 18px; }
    .auth-form, .auth-hero { padding: 28px; }
}


.sticky-summary { position: sticky; top: 20px; }
.quote-item { background: linear-gradient(180deg,#fff,#f8fbff); }
.quotation-preview { background: #f5f7fb; }
.quote-doc { background: #fff; border: 1px solid #d8e2f0; border-radius: 24px; padding: 28px; max-width: 980px; margin: 0 auto; }
.quote-title { font-size: 1.75rem; font-weight: 800; letter-spacing: .05em; }
.quote-box { border: 1px solid #dbe3f0; border-radius: 18px; padding: 16px; height: 100%; }
.quote-label { font-size: .85rem; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.quote-table th { background: #eff6ff; }
.quote-total-box { width: min(100%, 340px); border: 1px solid #dbe3f0; border-radius: 18px; padding: 16px; background: linear-gradient(180deg,#fff,#f8fbff); }
.quote-terms { white-space: pre-line; }
.print-page { background: #eef4ff; }
.print-preview-panel { box-shadow: none; border: 0; background: transparent; }
@media print {
  .no-print { display:none !important; }
  body.print-page { background: #fff; }
  .quote-doc { border: 0; box-shadow: none; padding: 0; }
}

.farino-quote-doc {
    border-radius: 10px;
    border: 1px solid #cfd8e3;
    padding: 26px 28px 30px;
    box-shadow: 0 10px 28px rgba(15,23,42,.05);
}
.quote-topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    border-bottom: 1px solid #dbe3f0;
    padding-bottom: 16px;
    margin-bottom: 18px;
}
.quote-number { font-weight: 600; margin-top: 4px; }
.quote-company { max-width: 360px; font-size: .95rem; line-height: 1.45; }
.quote-company-name { font-weight: 800; letter-spacing: .02em; }
.quote-company-npwp { margin-top: 6px; font-weight: 600; }
.quote-meta-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    margin-bottom: 18px;
}
.quote-meta-card {
    min-height: 142px;
    border: 1px solid #dbe3f0;
    border-radius: 8px;
    padding: 14px 16px;
    background: #fff;
}
.quote-meta-label {
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 700;
}
.quote-meta-company { font-weight: 700; margin-bottom: 4px; }
.quote-meta-up { margin-bottom: 4px; }
.quote-date-row { margin-top: 16px; padding-top: 12px; border-top: 1px dashed #dbe3f0; }
.farino-quote-table {
    margin-bottom: 14px;
    border: 1px solid #dbe3f0;
}
.farino-quote-table thead th {
    background: #f8fafc;
    color: #0f172a;
    font-size: .86rem;
    text-transform: none;
    border-bottom: 1px solid #dbe3f0;
}
.farino-quote-table td, .farino-quote-table th { padding: 10px 12px; }
.farino-quote-table .col-item { width: 52%; }
.farino-quote-table .col-qty { width: 10%; }
.farino-quote-table .col-price, .farino-quote-table .col-amount { width: 19%; }
.quote-summary-wrap { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.quote-summary-table {
    width: 340px;
    border-collapse: collapse;
    font-size: .98rem;
}
.quote-summary-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 7px 0;
}
.quote-summary-table td:last-child { text-align: right; font-weight: 700; }
.quote-summary-table .grand-total-row td {
    border-top: 2px solid #cbd5e1;
    border-bottom: 0;
    padding-top: 10px;
    font-size: 1.08rem;
    font-weight: 800;
}
.quote-terms-block, .quote-notes-block {
    font-size: .92rem;
    line-height: 1.55;
    margin-top: 10px;
}
.quote-terms-title {
    font-weight: 700;
    margin-bottom: 8px;
}
.quote-signature-block {
    margin-top: 26px;
    padding-top: 12px;
}
.quote-signature-block .signature-company { margin-top: 28px; }
@media (max-width: 991px) {
    .quote-topbar, .quote-meta-grid { display:block; }
    .quote-company { max-width: none; text-align:left !important; margin-top: 14px; }
    .quote-meta-card-right { margin-top: 14px; }
    .quote-summary-table { width: 100%; }
}
@media print {
    .farino-quote-doc { padding: 0; border: 0; box-shadow: none; }
}


.quote-brand-head{display:grid;grid-template-columns:220px 1fr 1.1fr;gap:18px;align-items:start;padding-bottom:14px;border-bottom:2px solid #dbe7ff;margin-bottom:20px}.quote-logo{max-width:200px;height:auto;display:block}.quote-title-wrap{padding-top:8px}.quote-title{font-size:32px;font-weight:800;letter-spacing:1.2px;color:#17336b}.quote-number{font-size:14px;font-weight:600;color:#476089;margin-top:6px}.classic-meta .quote-meta-card{border:1px solid #cfdcf7;border-radius:0;padding:16px;min-height:145px;background:#fff}.classic-meta{gap:0;grid-template-columns:1.45fr .85fr}.classic-meta .quote-meta-card-right{border-left:none}.quote-doc{background:#fff}.farino-quote-table thead th{background:#eef4ff!important;border-top:1px solid #bacdf4;border-bottom:1px solid #bacdf4;color:#17336b}.farino-quote-table td,.farino-quote-table th{padding:12px 10px}.quote-summary-table td{padding:6px 0 6px 18px}.quote-signature-block{margin-top:26px;padding-top:12px}.print-preview-panel{box-shadow:none;border:1px solid #dce6fa} @media (max-width: 992px){.quote-brand-head{grid-template-columns:1fr;}.classic-meta{grid-template-columns:1fr}.classic-meta .quote-meta-card-right{border-left:1px solid #cfdcf7;border-top:none}} @media print{.quote-doc{padding:0}.print-preview-panel{border:none}}

.brand-logo{width:54px;height:54px;object-fit:contain;border-radius:14px;background:#fff;padding:6px;border:1px solid #dbe3f0}
.brand-logo-sm{width:34px;height:34px;object-fit:contain;border-radius:10px;background:#fff;padding:4px;border:1px solid #dbe3f0}
.auth-logo{width:84px;height:84px;object-fit:contain;border-radius:18px;background:rgba(255,255,255,.15);padding:8px;border:1px solid rgba(255,255,255,.22)}
.mobile-topbar{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);border-bottom:1px solid #e2e8f0;position:sticky;top:0;z-index:1040}
.tiny{font-size:.74rem}
@media (max-width: 991px){.sidebar{display:none}.table{font-size:.88rem}.panel,.card-soft,.stat-card{padding:16px}.section-title{font-size:1.2rem}.quote-doc,.farino-quote-doc{padding:16px;border-radius:16px}.quote-summary-table{width:100%}.quote-meta-card{min-height:auto}.auth-card{max-width:540px}.auth-hero{padding:24px}.auth-form{padding:24px}.sticky-summary{position:static}.btn{white-space:nowrap}}
@media (max-width: 575px){.main-content{padding:14px}.filter-bar,.d-flex.gap-2.flex-wrap{gap:.5rem!important}.table-responsive{font-size:.84rem}.quote-item .col-md-4,.quote-item .col-md-2{margin-bottom:.5rem}}


.quotation-actions{flex-wrap:nowrap;align-items:center}
.quotation-actions .btn{min-width:34px}
canvas{max-width:100%}
.auth-card,.panel,.stat-card,.card-soft,.brand-box,.user-card{will-change:auto}
.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}
@media (max-width: 991px){
  .quotation-actions{display:inline-flex!important}
  .quote-brand-head{gap:10px}
  .quote-title{font-size:24px}
  .quote-number{font-size:13px}
  .quote-company{font-size:.88rem}
  .farino-quote-table td,.farino-quote-table th{padding:8px 6px;font-size:.82rem}
  .quote-meta-card{padding:12px}
  .mobile-topbar{padding:10px 12px}
}
@media (max-width: 575px){
  .auth-logo{width:64px;height:64px}
  .brand-logo{width:46px;height:46px}
  .brand-logo-sm{width:30px;height:30px}
  .section-title{font-size:1.08rem}
  .section-subtitle{font-size:.88rem}
  .btn{font-size:.9rem}
  .form-control,.form-select{font-size:.95rem;padding:.72rem .85rem}
  .farino-quote-table{font-size:.8rem}
  .quote-summary-table td{padding:5px 0 5px 10px}
}


/* Quotation precision */
.quote-doc.farino-quote-doc { max-width: 794px; margin: 0 auto; padding: 18px 20px 24px; background:#fff; }
.precise-head { align-items:flex-start; border-bottom:1px solid #d1d5db; padding-bottom:10px; margin-bottom:14px; }
.quote-logo { width: 110px; max-height: 72px; object-fit: contain; }
.quote-title-wrap { flex:1; padding-top: 4px; }
.quote-title { font-size: 24px; letter-spacing: .04em; font-weight: 700; }
.precise-quote-no { font-size: 13px; margin-top: 3px; }
.precise-company { font-size: 12px; line-height: 1.35; max-width: 275px; }
.precise-meta { grid-template-columns: 1.2fr .8fr; gap:0; border:1px solid #111827; }
.precise-meta .quote-meta-card { border-right:1px solid #111827; border-radius:0; box-shadow:none; border:0; padding:12px 14px; min-height: 134px; }
.precise-meta .quote-meta-card:last-child { border-right:0; }
.precise-meta .quote-meta-label { font-size:12px; margin-bottom:6px; font-weight:700; color:#111827; }
.precise-meta .quote-meta-company { font-size:14px; font-weight:700; }
.precise-meta .quote-meta-address, .precise-meta .quote-meta-up, .quote-date-row { font-size:12px; line-height:1.45; }
.precise-table { margin-top:14px; border:1px solid #111827; }
.precise-table thead th { background:#eef2ff; border-bottom:1px solid #111827 !important; border-right:1px solid #111827; font-size:12px; padding:8px 10px; }
.precise-table thead th:last-child { border-right:0; }
.precise-table tbody td { border-top:1px solid #111827; border-right:1px solid #111827; padding:8px 10px; font-size:12px; }
.precise-table tbody td:last-child { border-right:0; }
.precise-summary { display:flex; justify-content:flex-end; margin-top:10px; }
.quote-summary-table { width: 285px; font-size:12px; }
.quote-summary-table td { padding:5px 0; border-bottom:1px solid #d1d5db; }
.quote-summary-table td:last-child { text-align:right; font-weight:600; }
.quote-summary-table .grand-total-row td { font-size:13px; font-weight:700; border-bottom:0; padding-top:8px; }
.quote-terms-block, .quote-notes-block { font-size:12px; line-height:1.55; margin-top:14px; }
.quote-terms-title { font-size:12px; font-weight:700; }
.quote-signature-block { margin-top:26px; font-size:12px; }
.print-preview-panel { padding: 0; overflow: hidden; }
@media (max-width: 768px) {
  .quote-doc.farino-quote-doc { padding: 14px; }
  .quote-logo { width: 84px; }
  .quote-title { font-size:20px; }
  .precise-company { max-width:none; text-align:left !important; margin-top:8px; }
  .precise-head { display:block; }
  .precise-meta { grid-template-columns: 1fr; }
  .precise-meta .quote-meta-card { border-right:0; border-bottom:1px solid #111827; }
  .precise-meta .quote-meta-card:last-child { border-bottom:0; }
  .quote-summary-table { width:100%; }
}


.dashboard-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap}.dashboard-filter-row .form-label{font-weight:600}.chart-panel{overflow:hidden}.chart-wrap{position:relative;height:320px}.chart-wrap-sm{height:280px}.chart-wrap-donut{height:260px}.stat-card.premium{background:linear-gradient(180deg,#fff,#f8fbff)}.stat-value-money{font-size:1rem;line-height:1.35}.compact-badges .badge{font-weight:600}.table td .btn{border-radius:10px}.quotation-preview .quote-doc{max-width:860px}.table-responsive .table{min-width:760px}.quotation-actions{flex-wrap:nowrap}.quotation-actions .btn{padding:.35rem .5rem}.quote-preview-list-item{border:1px solid #e2e8f0;border-radius:12px;padding:8px 10px;background:#fff}@media (max-width: 991px){.dashboard-header{align-items:stretch}.chart-wrap{height:260px}.chart-wrap-sm{height:240px}.chart-wrap-donut{height:220px}.table-responsive .table{min-width:680px}}@media (max-width:575px){.table-responsive .table{min-width:620px}.main-content{padding:12px}.panel,.stat-card,.card-soft{padding:14px}.dashboard-filter-row .col-md-2{display:grid}.auth-card{border-width:2px}}


.term-block{margin:0 0 14px;line-height:1.72;text-align:justify}.quote-terms{display:block}.quote-notes{line-height:1.68}.quotation-actions{flex-wrap:nowrap;white-space:nowrap}.quotation-actions .btn{display:inline-flex;align-items:center;justify-content:center;min-width:34px}.dashboard-filter-row .form-control,.dashboard-filter-row .form-select{min-height:46px}.chart-wrap{position:relative;min-height:320px}.chart-wrap-sm{min-height:280px}.chart-wrap-donut{min-height:260px}.stat-value-money{font-size:1.1rem;line-height:1.35}.dashboard-header .section-title{margin-bottom:0}.table-responsive{-webkit-overflow-scrolling:touch}.table td{font-size:.93rem}.compact-badges .badge{font-weight:600}.auth-hero .display-6{letter-spacing:-.02em}.quote-meta-address,.quote-company-address{line-height:1.6}.quote-terms-block{margin-top:16px}.quote-terms-title{margin-bottom:10px}.panel{border:1px solid #e6edf7}.stat-card.premium{border:1px solid #e5edf9;background:linear-gradient(180deg,#fff,#f8fbff);border-radius:22px;box-shadow:0 10px 30px rgba(15,23,42,.04)}
@media (max-width: 991px){.quotation-actions{display:flex;width:100%;justify-content:flex-end}.table td,.table th{font-size:.86rem}.stat-value-money{font-size:1rem}.chart-wrap{min-height:260px}.chart-wrap-sm{min-height:240px}.chart-wrap-donut{min-height:220px}}


.btn-whatsapp{background:#16a34a;color:#fff;border-color:#16a34a;box-shadow:0 8px 18px rgba(22,163,74,.18)}
.btn-whatsapp:hover{background:#15803d;border-color:#15803d;color:#fff}
.quotation-list-table{table-layout:fixed}
.quotation-list-table th:nth-child(1){width:18%}
.quotation-list-table th:nth-child(2){width:7%}
.quotation-list-table th:nth-child(3){width:11%}
.quotation-list-table th:nth-child(4){width:16%}
.quotation-list-table th:nth-child(5){width:24%}
.quotation-list-table th:nth-child(6){width:12%}
.quotation-list-table th:nth-child(7){width:10%}
.quotation-list-table th:nth-child(8){width:14%}
.quotation-list-table td{word-wrap:break-word}
.quotation-actions{gap:.35rem!important;flex-wrap:nowrap!important}
.quotation-actions .btn{padding:.35rem .45rem}
.dashboard-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap}
.dashboard-filter-row .form-control,.dashboard-filter-row .form-select{background:#fbfdff}
.stat-card.premium{background:linear-gradient(180deg,#ffffff,#f8fbff);border:1px solid #d8e6ff;box-shadow:0 14px 34px rgba(37,99,235,.08)}
.chart-panel{background:linear-gradient(180deg,#ffffff,#fbfdff)}
.chart-wrap{position:relative;min-height:320px}
.chart-wrap-sm{min-height:290px}
.chart-wrap-donut{min-height:280px}
.quote-signature-image{display:block;max-width:170px;max-height:70px;object-fit:contain;margin:10px 0 6px}
.quote-signature-fallback{font-family:Georgia,serif;font-style:italic;font-size:1.25rem;color:#1f3b73;margin:12px 0 6px}
.signature-image-wrap{min-height:64px}
.quote-terms .term-block{margin-bottom:14px;padding-left:2px;line-height:1.72}
.quote-terms .term-block strong,.quote-terms .term-block b{font-weight:700}
.precise-head{grid-template-columns:190px 1fr 1.15fr;gap:22px;align-items:flex-start}
.precise-company{font-size:.92rem;line-height:1.55}
.precise-meta{margin-top:2px;margin-bottom:20px}
.precise-meta .quote-meta-card{min-height:154px;padding:15px 18px}
.precise-table{border:1px solid #c9d8f6}
.precise-table thead th{font-size:.84rem;letter-spacing:.02em;background:#eff5ff!important;color:#16336b}
.precise-summary{margin-top:8px;margin-bottom:16px}
@media (max-width:991px){
  .quotation-list-table{table-layout:auto}
  .dashboard-header{align-items:stretch}
  .chart-wrap{min-height:260px}
}
@media (max-width:575px){
  .quotation-actions .btn{padding:.32rem .4rem}
  .stat-value{font-size:1.28rem}
  .chart-wrap{min-height:220px}
  .quote-signature-image{max-width:140px;max-height:58px}
}


/* v14 polish */
body, .table, .form-control, .form-select, .btn { font-size: .95rem; }
.main-content { max-width: 100%; overflow-x: hidden; }
.table-fixed { table-layout: fixed; width: 100%; }
.table-fixed th, .table-fixed td { overflow-wrap: anywhere; }
.compact-table th, .compact-table td { font-size: .9rem; }
.quotation-list-table th:nth-child(1), .quotation-list-table td:nth-child(1) { width: 14%; }
.quotation-list-table th:nth-child(2), .quotation-list-table td:nth-child(2) { width: 8%; }
.quotation-list-table th:nth-child(3), .quotation-list-table td:nth-child(3) { width: 10%; }
.quotation-list-table th:nth-child(4), .quotation-list-table td:nth-child(4) { width: 16%; }
.quotation-list-table th:nth-child(5), .quotation-list-table td:nth-child(5) { width: 22%; }
.quotation-list-table th:nth-child(6), .quotation-list-table td:nth-child(6) { width: 12%; }
.quotation-list-table th:nth-child(7), .quotation-list-table td:nth-child(7) { width: 10%; }
.quotation-list-table th:nth-child(8), .quotation-list-table td:nth-child(8) { width: 18%; }
.quotation-actions, .lead-actions { gap: .45rem; }
.action-btn { display: inline-flex; align-items: center; gap: .45rem; border-radius: 12px; padding-inline: .7rem; white-space: nowrap; }
.action-btn span { font-size: .82rem; font-weight: 600; }
.btn-whatsapp { background:#ecfdf5; border:1px solid #86efac; color:#15803d; }
.btn-whatsapp:hover { background:#16a34a; color:#fff; border-color:#16a34a; }
.chart-panel { min-height: 100%; }
.premium-chart-panel { background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(248,251,255,.97)); }
.chart-wrap { position: relative; height: 340px; }
.chart-wrap-sm { height: 280px; }
.chart-wrap-donut { height: 280px; }
.stat-card.premium { position: relative; overflow: hidden; }
.stat-card.premium::after { content:''; position:absolute; inset:auto -30px -30px auto; width:120px; height:120px; background:radial-gradient(circle, rgba(37,99,235,.12), rgba(37,99,235,0)); }
.quote-doc { padding: 26px 30px 30px; }
.precise-head { align-items: center; }
.quote-logo { max-width: 140px; max-height: 56px; object-fit: contain; }
.quote-title-wrap { flex:1; min-width: 220px; }
.quote-title { font-size: 1.9rem; letter-spacing: .08em; }
.precise-quote-no { font-size: 1rem; margin-top: 6px; }
.compact-address { line-height: 1.35; }
.quote-meta-address, .quote-meta-up { line-height: 1.45; }
.quote-terms, .readable-terms { font-size: .93rem; line-height: 1.75; color: #1f2937; }
.quote-terms p, .quote-terms li { margin-bottom: .55rem; }
.quote-signature-block { margin-top: 34px; }
.signature-image-wrap { min-height: 92px; display:flex; align-items:flex-end; }
.quote-signature-image { max-width: 300px; max-height: 120px; object-fit: contain; }
.signature-company, .signature-sub { line-height: 1.45; }
.brand-logo { width: 58px; height: auto; object-fit: contain; }
.brand-logo-sm { width: 34px; height: auto; object-fit: contain; }
.offcanvas .brand-logo-sm { width: 38px; }
.user-card .btn, .sidebar-link, .panel, .stat-card { transition: all .18s ease; }
.table thead th { font-size: .8rem; letter-spacing: .01em; }
.table tbody td { font-size: .92rem; }
.badge { font-weight: 600; }
.compact-badges .badge { font-size: .72rem; }
@media (max-width: 1199px) {
  .quotation-list-table { min-width: 980px; }
  .action-btn span { display: none; }
  .action-btn { padding-inline: .6rem; }
}
@media (max-width: 991px) {
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .main-content { padding: 14px; }
  .section-title { font-size: 1.25rem; }
  .section-subtitle { font-size: .88rem; }
  .stat-value { font-size: 1.45rem; }
  .panel, .card-soft, .stat-card { padding: 16px; border-radius: 18px; }
  .quotation-actions, .lead-actions { justify-content: flex-end; }
  .quote-doc, .farino-quote-doc { padding: 18px; border-radius: 16px; }
  .quote-topbar, .quote-brand-head, .quote-meta-grid { display:block; }
  .quote-company.text-end, .precise-company { text-align:left !important; margin-top: 10px; }
  .quote-logo { max-width: 110px; max-height: 48px; margin-bottom: 10px; }
  .quote-title { font-size: 1.45rem; }
  .quote-summary-table { width: 100%; }
  .chart-wrap { height: 280px; }
  .chart-wrap-sm, .chart-wrap-donut { height: 240px; }
}


/* v14.1 fixes */
.dashboard-filter-row .col-md-2,.dashboard-filter-row .col-md-3,.dashboard-filter-row .col-md-4{display:flex;flex-direction:column}
.dashboard-filter-row .btn{height:46px}
.email-quotation-table{table-layout:fixed;width:100%}
.email-quotation-table th:nth-child(1){width:16%}.email-quotation-table th:nth-child(2){width:20%}.email-quotation-table th:nth-child(3){width:16%}.email-quotation-table th:nth-child(4){width:14%}.email-quotation-table th:nth-child(5){width:12%}.email-quotation-table th:nth-child(6){width:10%}.email-quotation-table th:nth-child(7){width:12%}
.email-quotation-table td,.email-quotation-table th{font-size:.89rem}
.email-quotation-table td{overflow-wrap:anywhere}
.quote-terms.readable-terms,.quote-terms .term-block{font-size:.9rem;line-height:1.55}
.quote-terms .term-block{margin:0 0 8px;padding-left:0}
.quote-signature-image{max-width:220px;max-height:90px}
@media (max-width: 991px){
  .table-responsive .table{min-width:720px}
  .dashboard-header .d-flex.gap-2.flex-wrap{width:100%}
  .dashboard-header .btn{flex:1 1 160px}
  .stat-card.premium{min-height:118px}
  .chart-wrap{height:240px}
  .chart-wrap-sm,.chart-wrap-donut{height:220px}
}
@media (max-width: 575px){
  body,.table,.form-control,.form-select,.btn{font-size:.9rem}
  .table-responsive .table{min-width:640px}
  .email-quotation-table td,.email-quotation-table th{font-size:.83rem}
  .quotation-list-table td,.quotation-list-table th{font-size:.82rem}
  .chart-wrap{height:210px}
  .stat-card .stat-value-money{font-size:.95rem}
}


.mobile-topbar{position:sticky;top:0;z-index:1030;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);border-bottom:1px solid #e5e7eb;padding:10px 14px;}
.brand-logo-sm{width:36px;height:36px;object-fit:contain;border-radius:10px;background:#fff;}
.main-content{padding:24px;min-width:0;}
.dashboard-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;}
.dashboard-filter-row .form-control,.dashboard-filter-row .form-select{height:46px;}
.stat-card.premium{padding:18px;min-height:120px;}
.stat-value-money{font-size:1.05rem;line-height:1.35;word-break:break-word;}
.chart-panel{overflow:hidden;}
.chart-wrap{position:relative;height:320px;width:100%;}
.chart-wrap-sm{height:300px;}
.chart-wrap-donut{height:280px;max-width:420px;margin:0 auto;}
.quote-terms,.quote-terms-block{white-space:pre-line;line-height:1.38;font-size:.9rem;}
.quote-terms-block p,.quote-terms-block li{margin-bottom:.22rem;}
.table{font-size:.92rem;}
.table td,.table th{padding:.72rem .78rem;}
.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch;}
@media (max-width: 991px){
  .main-content{padding:16px;}
  .dashboard-header{align-items:stretch;}
  .dashboard-header .btn{width:100%;}
  .chart-wrap{height:260px;}
  .chart-wrap-sm{height:240px;}
  .chart-wrap-donut{height:240px;}
  .stat-card.premium{min-height:auto;}
  .table{font-size:.86rem;}
}


/* v14.3 responsive precision fixes */
.main-content{padding:24px;min-width:0;overflow-x:hidden}
.panel,.stat-card,.card-soft{border-radius:18px}
.dashboard-header,.dashboard-filter-row,.row{min-width:0}
.dashboard-filter-row>.col-md-3,.dashboard-filter-row>.col-md-4,.dashboard-filter-row>.col-md-2{min-width:0}
.chart-panel{padding:18px}
.chart-wrap,.chart-wrap-sm,.chart-wrap-donut{min-height:0;max-height:320px;height:320px}
.chart-wrap-sm{height:280px;max-height:280px}
.chart-wrap-donut{height:240px;max-height:240px}
canvas#analyticsChart,canvas#staffChart,canvas#progressChart{width:100% !important;height:100% !important;display:block}
@media (max-width: 991px){
  .main-content{padding:16px}
  .chart-wrap{height:240px;max-height:240px}
  .chart-wrap-sm{height:220px;max-height:220px}
  .chart-wrap-donut{height:220px;max-height:220px}
}
.email-quotation-table{table-layout:fixed;width:100%;min-width:980px}
.email-quotation-table th,.email-quotation-table td{white-space:normal;word-break:break-word;vertical-align:middle}
.email-quotation-table th:nth-child(1),.email-quotation-table td:nth-child(1){width:18%;font-weight:600}
.email-quotation-table th:nth-child(2),.email-quotation-table td:nth-child(2){width:20%}
.email-quotation-table th:nth-child(3),.email-quotation-table td:nth-child(3){width:15%}
.email-quotation-table th:nth-child(4),.email-quotation-table td:nth-child(4){width:14%}
.email-quotation-table th:nth-child(5),.email-quotation-table td:nth-child(5){width:12%}
.email-quotation-table th:nth-child(6),.email-quotation-table td:nth-child(6){width:11%}
.email-quotation-table th:nth-child(7),.email-quotation-table td:nth-child(7){width:10%;white-space:nowrap}
.email-quotation-table .badge{font-size:.78rem;padding:.5rem .65rem}
.quotation-actions{display:inline-flex;gap:.35rem;flex-wrap:nowrap;justify-content:flex-end}
.quotation-actions .action-btn{min-width:98px;justify-content:center;font-size:.8rem;padding:.42rem .55rem}
.quote-terms, .quote-terms-block{white-space:pre-line;line-height:1.35}
.quote-terms-block{font-size:.89rem}
.quote-terms-block ol,.quote-terms-block p{margin-bottom:.35rem}
.table{table-layout:auto}
.quotation-list-table{table-layout:fixed;width:100%;min-width:1100px}
.quotation-list-table th,.quotation-list-table td{font-size:.84rem}
.auth-logo-lg{max-width:180px;height:auto}

/* v14.4 fixes */
.main-content{padding:22px;overflow-x:hidden;max-width:100%}
.dashboard-main-grid,.dashboard-kpi-grid,.dashboard-filter-row{min-width:0}
.dashboard-side-stack .panel,.dashboard-main-grid .panel{min-height:0}
.dashboard-filter-panel{padding:16px 18px}
.compact-chart{height:280px !important;max-height:280px !important}
.chart-wrap{height:280px;max-height:280px}
.chart-wrap-sm{height:240px;max-height:240px}
.chart-wrap-donut{height:220px;max-height:220px}
.dashboard-side-stack .table td,.dashboard-side-stack .table th{padding:.55rem .65rem}
.email-quotation-table{table-layout:fixed;width:100%;min-width:1120px}
.email-quotation-table th,.email-quotation-table td{font-size:.88rem;padding:.62rem .7rem;vertical-align:top}
.email-quotation-table td.text-break{word-break:break-word}
.permission-matrix-table{table-layout:fixed;min-width:980px}
.permission-matrix-table th,.permission-matrix-table td{padding:.65rem .7rem;font-size:.9rem}
.quote-terms-block,.quote-notes-block{font-size:.91rem;line-height:1.36;margin-top:8px}
.quote-terms-title{margin-bottom:4px}
.readable-terms p,.readable-terms li,.readable-terms div{margin-bottom:.2rem;line-height:1.34}
.readable-terms ol,.readable-terms ul{padding-left:1.05rem;margin-bottom:.35rem}
.settings-tabs .nav-link{border-radius:14px 14px 0 0;font-weight:600}
.settings-tabs .nav-link.active{background:#fff;border-color:#dbe3f0 #dbe3f0 #fff;color:var(--primary)}
@media (max-width: 991px){
  .main-content{padding:14px}
  .compact-chart,.chart-wrap{height:230px !important;max-height:230px !important}
  .chart-wrap-sm{height:220px;max-height:220px}
  .chart-wrap-donut{height:210px;max-height:210px}
}

/* v14.5 layout and readability fixes */
.main-content{min-width:0;overflow-x:hidden}
.dashboard-main-grid,.dashboard-kpi-grid,.dashboard-side-stack,.dashboard-filter-row{min-width:0}
.dashboard-main-grid > [class*="col-"], .dashboard-kpi-grid > [class*="col-"]{min-width:0}
.chart-panel canvas{max-width:100% !important}
.chart-wrap,.compact-chart{height:260px !important;max-height:260px !important;min-height:260px !important}
.chart-wrap-sm{height:230px !important;max-height:230px !important;min-height:230px !important}
.chart-wrap-donut{height:220px !important;max-height:220px !important;min-height:220px !important}
.dashboard-side-stack .panel{overflow:hidden}
.quotation-list-table{table-layout:fixed;width:100%;min-width:1240px}
.quotation-list-table th,.quotation-list-table td{font-size:.83rem;padding:.62rem .68rem;vertical-align:top}
.quotation-list-table th:nth-child(1),.quotation-list-table td:nth-child(1){width:15%}
.quotation-list-table th:nth-child(2),.quotation-list-table td:nth-child(2){width:6%}
.quotation-list-table th:nth-child(3),.quotation-list-table td:nth-child(3){width:10%}
.quotation-list-table th:nth-child(4),.quotation-list-table td:nth-child(4){width:15%}
.quotation-list-table th:nth-child(5),.quotation-list-table td:nth-child(5){width:15%}
.quotation-list-table th:nth-child(6),.quotation-list-table td:nth-child(6){width:20%}
.quotation-list-table th:nth-child(7),.quotation-list-table td:nth-child(7){width:9%}
.quotation-list-table th:nth-child(8),.quotation-list-table td:nth-child(8){width:10%}
.quotation-list-table th:nth-child(9),.quotation-list-table td:nth-child(9){width:18%}
.email-quotation-table{table-layout:fixed;width:100%;min-width:1180px}
.email-quotation-table th,.email-quotation-table td{font-size:.86rem;padding:.6rem .68rem;vertical-align:top}
.email-quotation-table th:nth-child(1),.email-quotation-table td:nth-child(1){width:17%}
.email-quotation-table th:nth-child(2),.email-quotation-table td:nth-child(2){width:18%}
.email-quotation-table th:nth-child(3),.email-quotation-table td:nth-child(3){width:19%}
.email-quotation-table th:nth-child(4),.email-quotation-table td:nth-child(4){width:14%}
.email-quotation-table th:nth-child(5),.email-quotation-table td:nth-child(5){width:12%}
.email-quotation-table th:nth-child(6),.email-quotation-table td:nth-child(6){width:10%}
.email-quotation-table th:nth-child(7),.email-quotation-table td:nth-child(7){width:10%;white-space:nowrap}
.quote-terms-block,.quote-notes-block,.term-block{line-height:1.35 !important}
.quote-terms-block p,.quote-notes-block p,.term-block p{margin:0 0 .3rem 0}
.quote-terms-block ol,.quote-terms-block ul,.term-block ol,.term-block ul{margin-bottom:.3rem;padding-left:1rem}
.settings-tabs .nav-link{font-weight:600}
@media (max-width:991px){
  .chart-wrap,.compact-chart{height:220px !important;max-height:220px !important;min-height:220px !important}
  .chart-wrap-sm,.chart-wrap-donut{height:210px !important;max-height:210px !important;min-height:210px !important}
}


.sidebar{position:sticky;top:0;height:100vh;align-self:start;overflow-y:auto}
.main-content{padding:24px 24px 32px;min-width:0}
.topbar-actions{justify-content:flex-end;align-items:center;gap:12px;margin-bottom:18px;position:sticky;top:0;z-index:50;padding:10px 0;background:linear-gradient(180deg, rgba(243,246,251,.97) 0%, rgba(243,246,251,.82) 100%);backdrop-filter: blur(8px)}
.quotation-list-table,.email-quotation-table,.permission-matrix-table{table-layout:fixed;width:100%}
.quotation-list-table td,.quotation-list-table th,.email-quotation-table td,.email-quotation-table th,.permission-matrix-table td,.permission-matrix-table th{font-size:.88rem;vertical-align:top}
.email-quotation-table td:nth-child(1),.email-quotation-table th:nth-child(1){width:18%}
.email-quotation-table td:nth-child(2),.email-quotation-table th:nth-child(2){width:18%}
.email-quotation-table td:nth-child(3),.email-quotation-table th:nth-child(3){width:20%}
.email-quotation-table td:nth-child(4),.email-quotation-table th:nth-child(4){width:13%}
.email-quotation-table td:nth-child(5),.email-quotation-table th:nth-child(5){width:13%}
.email-quotation-table td:nth-child(6),.email-quotation-table th:nth-child(6){width:10%}
.email-quotation-table td:nth-child(7),.email-quotation-table th:nth-child(7){width:8%}
.quote-terms-block, .quote-notes-block{line-height:1.36;font-size:.9rem}
.quote-terms-block p,.quote-notes-block p{margin-bottom:.3rem}
.settings-tabs .nav-link{border-radius:14px;padding:.7rem 1rem;font-weight:600}
@media (max-width:991px){.topbar-actions{display:none !important}.sidebar{position:static;height:auto}.main-content{padding:16px}.email-quotation-table,.quotation-list-table,.permission-matrix-table{min-width:860px}}


.email-quotation-table,.quotation-list-table{table-layout:fixed;width:100%}
.email-quotation-table th,.email-quotation-table td,.quotation-list-table th,.quotation-list-table td{vertical-align:middle;font-size:.92rem}
.email-quotation-table td:nth-child(3),.quotation-list-table td:nth-child(5){word-break:break-word}
.dashboard-main-grid .panel{overflow:hidden}
.dashboard-main-grid .table-responsive{overflow-x:auto}
.chart-wrap.compact-chart{height:320px;max-height:320px}
.chart-wrap.compact-chart canvas{max-height:320px!important}


/* v15 lead/customer layout refinements */
.lead-list-table{table-layout:fixed;width:100%;min-width:1180px}
.lead-list-table th,.lead-list-table td{font-size:.83rem;padding:.52rem .58rem;vertical-align:middle}
.lead-list-table th:nth-child(1),.lead-list-table td:nth-child(1){width:56px;text-align:center}
.lead-list-table th:nth-child(2),.lead-list-table td:nth-child(2){width:13%}
.lead-list-table th:nth-child(3),.lead-list-table td:nth-child(3){width:13%}
.lead-list-table th:nth-child(4),.lead-list-table td:nth-child(4){width:12%}
.lead-list-table th:nth-child(5),.lead-list-table td:nth-child(5){width:12%}
.lead-list-table th:nth-child(6),.lead-list-table td:nth-child(6){width:9%}
.lead-list-table th:nth-child(7),.lead-list-table td:nth-child(7){width:6%}
.lead-list-table th:nth-child(8),.lead-list-table td:nth-child(8){width:10%}
.lead-list-table th:nth-child(9),.lead-list-table td:nth-child(9){width:11%}
.lead-list-table th:nth-child(10),.lead-list-table td:nth-child(10){width:12%}
.lead-list-table th:nth-child(11),.lead-list-table td:nth-child(11){width:8%}
.lead-list-table th:nth-child(12),.lead-list-table td:nth-child(12){width:18%}
.lead-list-table .badge-status{font-size:.74rem;padding:.42rem .56rem}
.compact-table td,.compact-table th{line-height:1.25}
@media (max-width:991px){.lead-list-table{min-width:1020px}.lead-list-table th,.lead-list-table td{font-size:.79rem;padding:.48rem .52rem}}


/* v15.1 dashboard and table refinements */
.sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;}
.topbar-actions{position:sticky;top:0;z-index:1030;justify-content:flex-end;align-items:center;margin-bottom:18px;padding:10px 0;background:linear-gradient(180deg, rgba(243,246,251,.98) 0%, rgba(243,246,251,.9) 100%);backdrop-filter:blur(10px);}
.dashboard-main-grid{align-items:start;}
.dashboard-side-stack{position:sticky;top:76px;}
.chart-panel{overflow:hidden;}
.chart-wrap{position:relative;width:100%;height:320px;min-height:320px;max-height:320px;}
.chart-wrap-sm{height:300px;min-height:300px;max-height:300px;}
.chart-wrap-donut{height:300px;min-height:300px;max-height:300px;}
.compact-chart{height:340px;min-height:340px;max-height:340px;}
.dashboard-kpi-grid .stat-card{min-height:122px;}
.lead-list-table{table-layout:fixed;}
.lead-list-table th,.lead-list-table td{font-size:.84rem;padding:.68rem .6rem;vertical-align:middle;}
.lead-list-table td:nth-child(2), .lead-list-table td:nth-child(3), .lead-list-table td:nth-child(5), .lead-list-table td:nth-child(9){word-break:break-word;}
.lead-actions{gap:.35rem !important;}
.quotation-list-table .compact-badges .badge{font-size:.72rem;}
.quote-terms-block,.quote-notes-block,.quote-terms{line-height:1.36;}
.quote-terms-block ol,.quote-terms-block ul,.quote-notes-block ol,.quote-notes-block ul{margin-bottom:.45rem;padding-left:1rem;}
.quote-terms-block li,.quote-notes-block li{margin-bottom:.14rem;}
@media (max-width: 1399px){.dashboard-side-stack{position:static;}.chart-wrap,.compact-chart{height:300px;min-height:300px;max-height:300px;}}
@media (max-width: 991px){.topbar-actions{position:static;background:transparent;padding:0;}.chart-wrap,.chart-wrap-sm,.chart-wrap-donut,.compact-chart{height:260px;min-height:260px;max-height:260px;}.dashboard-kpi-grid .stat-card{min-height:auto;}.lead-list-table th,.lead-list-table td{font-size:.78rem;padding:.58rem .5rem;}}


/* v15.6.2 premium dashboard + precise quotation */
.sidebar{position:sticky;top:0;height:100vh;overflow:auto}
.main-content{padding:20px 22px}
.dashboard-kpi-grid .col-xl-3{display:flex}
.dashboard-kpi-grid .stat-card{width:100%}
.dashboard-main-grid{align-items:start}
.dashboard-side-stack .panel,.dashboard-main-grid .panel{height:auto}
.premium-chart-panel,.chart-panel,.panel{box-shadow:0 10px 24px rgba(15,23,42,.05)}
.chart-wrap{height:280px !important;max-height:280px}
.chart-wrap-sm{height:240px !important;max-height:240px}
.chart-wrap-donut{height:220px !important;max-height:220px}
#analyticsChart,#staffChart,#progressChart{max-height:100% !important}
.quotation-list-table{table-layout:fixed !important;width:100%;border-collapse:separate;border-spacing:0}
.quotation-list-table thead th{background:#f6f9ff;color:#334155;font-size:.78rem;font-weight:700;border-bottom:1px solid #dbe3f0}
.quotation-list-table tbody td{font-size:.84rem;line-height:1.35;vertical-align:top}
.quotation-list-table th:nth-child(1),.quotation-list-table td:nth-child(1){width:42px}
.quotation-list-table th:nth-child(2),.quotation-list-table td:nth-child(2){width:18%}
.quotation-list-table th:nth-child(3),.quotation-list-table td:nth-child(3){width:70px}
.quotation-list-table th:nth-child(4),.quotation-list-table td:nth-child(4){width:110px}
.quotation-list-table th:nth-child(5),.quotation-list-table td:nth-child(5){width:16%}
.quotation-list-table th:nth-child(6),.quotation-list-table td:nth-child(6){width:18%}
.quotation-list-table th:nth-child(7),.quotation-list-table td:nth-child(7){width:22%}
.quotation-list-table th:nth-child(8),.quotation-list-table td:nth-child(8){width:14%}
.quotation-list-table th:nth-child(9),.quotation-list-table td:nth-child(9){width:11%}
.quotation-list-table th:nth-child(10),.quotation-list-table td:nth-child(10){width:250px}
.quotation-actions{gap:.28rem!important;flex-wrap:wrap!important;justify-content:flex-end}
.quotation-actions .btn{padding:.32rem .48rem}
.compact-badges .badge{font-size:.68rem;padding:.38rem .45rem}
.quote-terms,.quote-terms-block,.readable-terms{font-size:.9rem;line-height:1.42}
.quote-terms p,.quote-terms li,.quote-terms .term-block{margin-bottom:.2rem}
@media (max-width: 991px){
  .sidebar{position:static;height:auto}
  .main-content{padding:14px}
  .dashboard-kpi-grid .col-6{display:flex}
  .dashboard-kpi-grid .stat-card{min-height:104px}
  .chart-wrap{height:220px !important}
  .chart-wrap-sm,.chart-wrap-donut{height:210px !important}
  .quotation-list-table{min-width:1180px}
}


/* v15.6.4 polish */
.dashboard-main-grid{align-items:start}.dashboard-side-stack{position:sticky;top:18px}.premium-chart-panel{background:linear-gradient(180deg,#ffffff,#f7fbff)}.compact-table thead th{background:#f8fbff;color:#0f172a;font-weight:700}.quotation-list-table{table-layout:fixed;width:100%;min-width:1180px;border-collapse:separate;border-spacing:0}.quotation-list-table thead th{background:#eef5ff;color:#12315f;border-bottom:1px solid #d8e7fb;font-weight:700;white-space:nowrap}.quotation-list-table td,.quotation-list-table th{font-size:.82rem;padding:.6rem .62rem;vertical-align:top}.quotation-list-table td:nth-child(2){font-weight:600}.quotation-list-table td:nth-child(5){word-break:break-word}.quotation-list-table td:nth-child(6){min-width:180px}.chart-wrap,.compact-chart{background:linear-gradient(180deg,#ffffff,#f9fbff);border-radius:16px;padding:10px}.quote-terms,.quote-terms-block{line-height:1.35}.farino-quote-table td,.farino-quote-table th{font-size:.88rem}.quote-terms-block{font-size:.9rem}.form-text{font-size:.78rem}@media (max-width:991px){.dashboard-side-stack{position:static}.quotation-list-table{min-width:980px}}


/* v15.6.5 quotation + dashboard refinements */
.quotation-table-premium { table-layout: fixed; }
.quotation-table-premium th, .quotation-table-premium td { vertical-align: middle; font-size: .82rem; }
.quotation-table-premium thead th { white-space: nowrap; background: #f8fafc; color: #334155; }
.quotation-table-premium td:nth-child(2) { width: 16%; }
.quotation-table-premium td:nth-child(3) { width: 10%; }
.quotation-table-premium td:nth-child(4) { width: 17%; }
.quotation-table-premium td:nth-child(5) { width: 16%; }
.quotation-table-premium td:nth-child(6) { width: 18%; }
.quotation-table-premium td:nth-child(7) { width: 11%; }
.quotation-actions .icon-only { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.quotation-actions .icon-only span { display: none !important; }
.quotation-actions { gap: .35rem; }
.dashboard-kpi-grid .stat-card { min-height: 108px; }
.chart-wrap.compact-chart { min-height: 320px; }
.chart-wrap.chart-wrap-sm { min-height: 280px; }
.chart-wrap.chart-wrap-donut { min-height: 280px; }
@media (max-width: 991.98px){
  .dashboard-main-grid .chart-wrap.compact-chart { min-height: 260px; }
  .quotation-table-premium th, .quotation-table-premium td { font-size: .78rem; }
}

/* v15.6.6 dashboard + quotation precision */
.svg-chart-card{background:linear-gradient(180deg,#fff,#f8fbff);border:1px solid #e5edf8;border-radius:18px;padding:14px;overflow:auto}
.svg-line-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:12px;align-items:end;min-width:0}
.svg-line-col{display:flex;flex-direction:column;gap:8px;min-width:0}
.svg-line-bars{height:150px;display:flex;align-items:flex-end;justify-content:center;gap:6px;padding:0 6px;border-bottom:1px solid #dbe7f7}
.svg-line-bars .bar{display:inline-block;width:14px;border-radius:10px 10px 4px 4px}
.svg-line-bars .bar.lead{background:#2563eb}
.svg-line-bars .bar.won{background:#16a34a}
.svg-line-bars .bar.lost{background:#dc2626}
.svg-line-label{font-size:.74rem;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chart-legend-inline{display:flex;gap:16px;flex-wrap:wrap;font-size:.84rem;color:#475569}
.legend-dot{display:inline-block;width:10px;height:10px;border-radius:999px;margin-right:6px;vertical-align:middle}
.legend-dot.lead{background:#2563eb}.legend-dot.won{background:#16a34a}.legend-dot.lost{background:#dc2626}
.staff-kpi-list,.pipeline-mix-list{display:flex;flex-direction:column;gap:14px}
.staff-kpi-item,.pipeline-row{border:1px solid #e6edf7;border-radius:16px;padding:12px 14px;background:#fff}
.staff-kpi-bar,.pipeline-bar{height:10px;border-radius:999px;background:#eef3fb;overflow:hidden}
.staff-kpi-bar span{display:block;height:100%;background:linear-gradient(90deg,#2563eb,#60a5fa);border-radius:999px}
.pipeline-bar span{display:block;height:100%;border-radius:999px}
.quotation-actions{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;justify-content:flex-end;align-items:center;gap:.35rem!important;white-space:nowrap}
.quotation-actions .btn{min-width:34px;min-height:34px;padding:.35rem .45rem;display:inline-flex;align-items:center;justify-content:center}
.quotation-list-table{table-layout:fixed!important;width:100%;min-width:1180px!important}
.quotation-list-table th,.quotation-list-table td{vertical-align:middle!important;overflow:hidden}
.quotation-list-table td .compact-badges{display:flex;flex-wrap:wrap;gap:4px}
.quotation-list-table td:nth-child(9){overflow:visible}
@media (max-width:991px){
  .svg-line-grid{grid-template-columns:repeat(2,minmax(120px,1fr))}
  .quotation-list-table{min-width:1050px!important}
}

/* Hotfix v15.6.7 */
.quotation-list-table{table-layout:fixed!important;width:100%;min-width:1320px!important}
.quotation-list-table th,.quotation-list-table td{font-size:.78rem!important;vertical-align:middle!important;white-space:normal;word-break:break-word}
.quotation-list-table td:nth-child(2),.quotation-list-table th:nth-child(2){white-space:nowrap}
.quotation-list-table td:nth-child(3),.quotation-list-table th:nth-child(3){white-space:nowrap}
.quotation-list-table td:nth-child(7),.quotation-list-table th:nth-child(7){white-space:nowrap}
.quotation-actions{display:inline-flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:.2rem!important;align-items:center;justify-content:flex-end}
.quotation-actions .btn,.quotation-actions .action-btn,.quotation-actions .icon-only{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;padding:0!important;border-radius:8px!important}
.quotation-actions i{font-size:.78rem!important;line-height:1}
.svg-chart-card{overflow-x:auto}
.svg-line-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:10px;align-items:end}
.staff-kpi-list,.pipeline-mix-list{display:flex!important;flex-direction:column!important;gap:12px}
.staff-kpi-item,.pipeline-row{display:block!important}
@media (max-width: 1200px){
  .quotation-list-table{min-width:1200px!important}
}


/* quotation precision hotfix */
@media (min-width: 992px){
  .quote-sticky-preview{position:sticky !important; top:18px !important; align-self:flex-start;}
}
.quote-terms-input{white-space:pre-wrap; line-height:1.65; min-height:460px;}
.quote-logo{
  width:auto !important;
  height:auto !important;
  max-width:120px !important;
  max-height:48px !important;
  object-fit:contain !important;
  display:block !important;
}
.signature-image-wrap{
  min-height:86px !important;
  display:flex !important;
  align-items:flex-end !important;
}
.quote-signature-image{
  width:auto !important;
  height:auto !important;
  max-width:190px !important;
  max-height:68px !important;
  object-fit:contain !important;
  display:block !important;
}
.precise-table .col-price,.precise-table .col-amount,
.farino-quote-table .col-price,.farino-quote-table .col-amount{
  width:140px !important;
}
.farino-quote-table td.text-end,.farino-quote-table th.text-end{
  white-space:nowrap !important;
}
.quote-terms.readable-terms,
.quote-terms-block{
  white-space:normal !important;
  line-height:1.6 !important;
  word-break:break-word !important;
}
.quote-terms.readable-terms p,
.quote-terms.readable-terms li,
.quote-terms.readable-terms .term-block{
  margin-bottom:.55rem !important;
}


/* quotation list compact columns + totals v2 */
.quotation-list-table,
.quotation-table-premium{
  table-layout:fixed !important;
  width:100% !important;
  min-width:1320px !important;
  border-collapse:separate;
  border-spacing:0;
}
.quotation-list-table th,.quotation-list-table td,
.quotation-table-premium th,.quotation-table-premium td{
  font-size:.8rem !important;
  vertical-align:middle !important;
}
.quotation-list-table th:nth-child(1),.quotation-list-table td:nth-child(1){width:42px !important}
.quotation-list-table th:nth-child(2),.quotation-list-table td:nth-child(2){width:190px !important}
.quotation-list-table th:nth-child(3),.quotation-list-table td:nth-child(3){width:96px !important}
.quotation-list-table th:nth-child(4),.quotation-list-table td:nth-child(4){width:180px !important}
.quotation-list-table th:nth-child(5),.quotation-list-table td:nth-child(5){width:210px !important}
.quotation-list-table th:nth-child(6),.quotation-list-table td:nth-child(6){width:240px !important}
.quotation-list-table th:nth-child(7),.quotation-list-table td:nth-child(7){width:130px !important;white-space:nowrap !important}
.quotation-list-table th:nth-child(8),.quotation-list-table td:nth-child(8){width:90px !important}
.quotation-list-table th:nth-child(9),.quotation-list-table td:nth-child(9){width:140px !important;white-space:nowrap !important}
.quote-no-cell{width:190px !important;min-width:190px !important;max-width:190px !important}
.quote-no-text{display:block !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important}
.quotation-actions{
  display:inline-flex !important;
  flex-wrap:nowrap !important;
  justify-content:flex-end !important;
  gap:.2rem !important;
  white-space:nowrap !important;
}
.quotation-actions .btn,
.quotation-actions .action-btn,
.quotation-actions .icon-only{
  width:26px !important;
  height:26px !important;
  min-width:26px !important;
  min-height:26px !important;
  padding:0 !important;
  border-radius:7px !important;
}
.quotation-actions i{font-size:.72rem !important;line-height:1 !important}

/* v16 mobile friendly + quotation precision */
html, body { overflow-x: hidden; }
.main-content { min-width: 0; }
.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 2000 !important;
  background: rgba(255,255,255,.96) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #dbe3f0;
}
.mobile-topbar .mobile-topbar-btn {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15,23,42,.08);
  pointer-events: auto;
}
.offcanvas { z-index: 2100 !important; }
.offcanvas-backdrop { z-index: 2090 !important; }
.offcanvas .nav { gap: .45rem !important; }
.offcanvas .sidebar-link { padding: 12px 14px; }

@media (max-width: 991px) {
  .app-shell { display: block; }
  .main-content {
    padding: 14px 12px 18px !important;
    width: 100%;
  }
  .panel,
  .card-soft,
  .stat-card,
  .brand-box,
  .user-card {
    border-radius: 16px;
    padding: 14px;
  }
  .section-title { font-size: 1.25rem; }
  .section-subtitle { font-size: .92rem; }
  .dashboard-header,
  .page-header,
  .d-flex.justify-content-between.align-items-start.flex-wrap.gap-3.mb-4,
  .d-flex.justify-content-between.align-items-center.mb-3 {
    gap: .75rem !important;
  }
  .dashboard-header > div:last-child,
  .d-flex.justify-content-between.align-items-start.flex-wrap.gap-3.mb-4 > div:last-child {
    width: 100%;
  }
  .dashboard-header .btn,
  .d-flex.justify-content-between.align-items-start.flex-wrap.gap-3.mb-4 .btn,
  .d-flex.justify-content-between.align-items-center.mb-3 .btn {
    flex: 1 1 auto;
  }
  .dashboard-filter-row > [class*="col-"],
  .row.g-3.align-items-end > [class*="col-"],
  .row.g-4 > [class*="col-lg-"],
  .row.g-4 > [class*="col-xl-"],
  .row.g-4 > [class*="col-xxl-"] {
    width: 100%;
  }
  .filter-bar,
  .dashboard-filter-row,
  .topbar-actions,
  .quotation-actions,
  .lead-actions {
    gap: .5rem !important;
  }
  .lead-actions,
  .quotation-actions {
    justify-content: flex-end;
    flex-wrap: wrap !important;
  }
  .lead-actions .action-btn span,
  .quotation-actions .action-btn span,
  .quotation-actions .btn span {
    display: none;
  }
  .lead-actions .action-btn,
  .quotation-actions .action-btn,
  .quotation-actions .btn,
  .lead-actions .btn {
    min-width: 34px;
    padding: .42rem .52rem;
  }
  .table-responsive {
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive .table {
    min-width: 720px;
  }
  .lead-list-table,
  .quotation-list-table,
  .customer-list-table,
  .permission-matrix-table,
  .email-quotation-table {
    min-width: 860px !important;
  }
  .d-flex.justify-content-between.align-items-center.mt-3 {
    flex-direction: column;
    align-items: stretch !important;
    gap: .75rem;
  }
  .d-flex.justify-content-between.align-items-center.mt-3 .d-flex.gap-2 {
    width: 100%;
  }
  .d-flex.justify-content-between.align-items-center.mt-3 .btn {
    flex: 1 1 0;
  }
  .quote-doc.farino-quote-doc,
  .quotation-preview .quote-doc {
    padding: 14px 12px 16px;
    max-width: 100%;
    border-radius: 14px;
  }
  .farino-quote-table {
    font-size: .82rem;
  }
  .farino-quote-table th,
  .farino-quote-table td {
    padding: 7px 6px !important;
  }
  .precise-summary,
  .quote-summary-wrap {
    justify-content: stretch;
  }
  .quote-summary-table {
    width: 100% !important;
  }
}

@media (max-width: 575px) {
  .mobile-topbar { padding: 10px 12px !important; }
  .brand-logo-sm { width: 30px; height: 30px; }
  .btn, .form-control, .form-select { font-size: .95rem; }
  .table-responsive .table { min-width: 680px; }
}

/* quotation alignment fixes */
.farino-pdf-head {
  grid-template-columns: 86px 170px minmax(260px, 1fr) !important;
  column-gap: 18px !important;
}
.precise-company {
  max-width: 300px !important;
  width: 300px !important;
  margin-left: auto !important;
  padding-left: 0 !important;
  justify-self: end !important;
}
.quote-company-name,
.quote-company-address,
.quote-company-npwp {
  display: block;
  width: 100%;
  text-align: right !important;
}
.quote-summary-table tr:nth-last-child(2) td {
  border-bottom: 0 !important;
}
.quote-summary-table .grand-total-row td {
  border-top: 1.5px solid #111827 !important;
  border-bottom: 0 !important;
  padding-top: 10px !important;
}
.quote-signature-block > :first-child {
  margin-bottom: 8px;
  font-weight: 600;
}
.signature-image-wrap {
  min-height: 132px !important;
}
.quote-signature-image {
  max-width: 320px !important;
  max-height: 132px !important;
}


/* v18 mobile menu tap fix */
.mobile-topbar,
.mobile-topbar * {
  pointer-events: auto !important;
}
.mobile-topbar {
  position: sticky !important;
  top: 0;
  z-index: 2205 !important;
  isolation: isolate;
}
.mobile-topbar .mobile-topbar-btn {
  position: relative;
  z-index: 2206;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.main-content {
  position: relative;
  z-index: 1;
}
.offcanvas.show {
  visibility: visible;
}


/* v19 mobile menu final fix */
.mobile-topbar {
  pointer-events: auto !important;
}
.mobile-topbar .mobile-topbar-btn {
  cursor: pointer !important;
  user-select: none;
}
.offcanvas-backdrop.show {
  opacity: .35;
}


/* v20 mobile tap + quotation alignment refinements */
@media (max-width: 991px) {
  .mobile-topbar { position: fixed !important; left: 0; right: 0; width: 100%; }
  .main-content { padding-top: 72px !important; }
}
.mobile-topbar .mobile-topbar-btn {
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-user-select: none;
  user-select: none;
}
.offcanvas.show {
  display: block !important;
}
.quote-meta-grid.precise-meta .quote-meta-card,
.quote-meta-grid.precise-meta .quote-meta-card-right {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.quote-summary-table .grand-total-row td::before { z-index: 0; }


/* v21 quotation print cleanup */
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta{
  border:0 !important;
  box-shadow:none !important;
}
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card,
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card-right{
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}


/* v22 quotation header + terms cleanup */
.quote-doc.farino-quote-doc .quote-brand-head.precise-head.farino-pdf-head{
  grid-template-columns:88px 1fr 300px !important;
}
.quote-doc.farino-quote-doc .quote-company.precise-company{
  width:292px !important;
  max-width:292px !important;
  justify-items:end !important;
}
.quote-doc.farino-quote-doc .quote-company-name,
.quote-doc.farino-quote-doc .quote-company-address,
.quote-doc.farino-quote-doc .quote-company-npwp,
.quote-doc.farino-quote-doc .quote-company-store{
  width:100% !important;
  text-align:right !important;
}
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta,
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card,
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card-right,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card-right{
  border:0 !important;
  box-shadow:none !important;
  outline:none !important;
  background:transparent !important;
}


/* v23 quotation right-column + print border cleanup */
.quote-doc.farino-quote-doc .quote-brand-head.precise-head.farino-pdf-head{grid-template-columns:88px 1fr 208px !important;}
.quote-doc.farino-quote-doc .quote-company.precise-company{width:208px !important;max-width:208px !important;justify-items:stretch !important;text-align:left !important;}
.quote-doc.farino-quote-doc .quote-company-name,
.quote-doc.farino-quote-doc .quote-company-address,
.quote-doc.farino-quote-doc .quote-company-npwp,
.quote-doc.farino-quote-doc .quote-company-store{text-align:left !important;}
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card,
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card-right,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card-right{border:none !important;box-shadow:none !important;outline:none !important;background:transparent !important;}
@media print{
  .quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card,
  .quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card-right,
  .quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card,
  .quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card-right{border:none !important;box-shadow:none !important;outline:none !important;background:transparent !important;}
}


/* v24 quotation print/export alignment */
.quote-doc.farino-quote-doc .quote-brand-head.precise-head.farino-pdf-head{grid-template-columns:88px 1fr 236px !important;}
.quote-doc.farino-quote-doc .quote-company.precise-company{
  width:236px !important;
  max-width:236px !important;
  justify-items:center !important;
  align-items:start !important;
  text-align:center !important;
}
.quote-doc.farino-quote-doc .quote-company-name,
.quote-doc.farino-quote-doc .quote-company-address,
.quote-doc.farino-quote-doc .quote-company-npwp,
.quote-doc.farino-quote-doc .quote-company-store{text-align:center !important;}
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card,
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card-right,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card-right,
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card::before,
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card::after,
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card-right::before,
.quote-doc.farino-quote-doc .quote-meta-grid.precise-meta .quote-meta-card-right::after,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card::before,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card::after,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card-right::before,
.quote-doc.farino-quote-doc .quote-meta-grid.classic-meta .quote-meta-card-right::after{
  border:none !important;
  box-shadow:none !important;
  outline:none !important;
  background:transparent !important;
  content:none !important;
}

/* v25 dashboard redesign for Farinotech */
.dashboard-widget{border:1px solid #e6edf7;background:linear-gradient(180deg,#ffffff,#fbfdff);box-shadow:0 14px 34px rgba(15,23,42,.05)}
.health-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.health-card{border:1px solid #e6edf7;border-radius:18px;padding:14px 16px;background:#fff;min-height:106px;display:flex;flex-direction:column;justify-content:space-between}
.health-card-label{font-size:.88rem;color:#475569;font-weight:600;line-height:1.35}
.health-card-value{font-size:1.7rem;font-weight:800;color:#0f172a;line-height:1.1}
.dashboard-bar-list{display:flex;flex-direction:column;gap:14px}
.dashboard-bar-item{border:1px solid #e8eef8;border-radius:18px;padding:12px 14px;background:#fff}
.dashboard-progress{height:11px;border-radius:999px;background:#edf2fb;overflow:hidden}
.dashboard-progress span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2563eb,#60a5fa)}
.dashboard-bar-item.tone-green .dashboard-progress span,.health-card.tone-green{background-image:none}.dashboard-bar-item.tone-green .dashboard-progress span{background:linear-gradient(90deg,#16a34a,#4ade80)}
.dashboard-bar-item.tone-red .dashboard-progress span{background:linear-gradient(90deg,#dc2626,#f87171)}
.dashboard-bar-item.tone-amber .dashboard-progress span{background:linear-gradient(90deg,#d97706,#fbbf24)}
.dashboard-bar-item.tone-violet .dashboard-progress span{background:linear-gradient(90deg,#7c3aed,#a78bfa)}
.dashboard-bar-item.tone-cyan .dashboard-progress span{background:linear-gradient(90deg,#0891b2,#67e8f9)}
.dashboard-bar-item.tone-slate .dashboard-progress span,.dashboard-bar-item.tone-gray .dashboard-progress span{background:linear-gradient(90deg,#475569,#94a3b8)}
.health-card.tone-blue{background:linear-gradient(180deg,#eff6ff,#ffffff)}
.health-card.tone-violet{background:linear-gradient(180deg,#f5f3ff,#ffffff)}
.health-card.tone-red{background:linear-gradient(180deg,#fef2f2,#ffffff)}
.health-card.tone-amber{background:linear-gradient(180deg,#fffbeb,#ffffff)}
.health-card.tone-slate,.health-card.tone-gray{background:linear-gradient(180deg,#f8fafc,#ffffff)}
.bar-label{font-weight:600;color:#0f172a;line-height:1.35}
.dashboard-table-card{min-width:100% !important}
.dashboard-table-card thead th{background:#f8fbff;color:#12315f;font-weight:700;white-space:nowrap}
.dashboard-table-card td,.dashboard-table-card th{font-size:.86rem;padding:.65rem .7rem;vertical-align:top}
.funnel-list .dashboard-bar-item strong{font-size:1rem}
.compact-bars .dashboard-bar-item{padding:11px 13px}
@media (max-width:1199px){.health-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width:767px){
  .health-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .health-card{padding:12px 13px;min-height:96px;border-radius:16px}
  .health-card-value{font-size:1.4rem}
  .dashboard-bar-item{padding:11px 12px;border-radius:16px}
  .dashboard-table-card td,.dashboard-table-card th{font-size:.8rem;padding:.55rem .55rem}
}
@media (max-width:575px){
  .health-grid{grid-template-columns:1fr 1fr}
  .dashboard-kpi-grid .col-xl-2{display:flex}
  .dashboard-kpi-grid .stat-card{width:100%}
}


/* v26 enterprise dashboard tones */
.enterprise-stat{position:relative;overflow:hidden;padding:18px 18px 16px}
.enterprise-stat::before{content:'';position:absolute;left:0;top:0;bottom:0;width:5px;border-radius:18px 0 0 18px;background:#2563eb;opacity:.95}
.enterprise-stat.tone-blue{background:linear-gradient(180deg,#eff6ff,#ffffff);border-color:#bfdbfe;box-shadow:0 14px 34px rgba(37,99,235,.10)}
.enterprise-stat.tone-blue::before{background:linear-gradient(180deg,#2563eb,#60a5fa)}
.enterprise-stat.tone-slate{background:linear-gradient(180deg,#f8fafc,#ffffff);border-color:#cbd5e1;box-shadow:0 14px 34px rgba(71,85,105,.09)}
.enterprise-stat.tone-slate::before{background:linear-gradient(180deg,#334155,#94a3b8)}
.enterprise-stat.tone-cyan{background:linear-gradient(180deg,#ecfeff,#ffffff);border-color:#a5f3fc;box-shadow:0 14px 34px rgba(8,145,178,.10)}
.enterprise-stat.tone-cyan::before{background:linear-gradient(180deg,#0891b2,#22d3ee)}
.enterprise-stat.tone-green{background:linear-gradient(180deg,#f0fdf4,#ffffff);border-color:#bbf7d0;box-shadow:0 14px 34px rgba(22,163,74,.10)}
.enterprise-stat.tone-green::before{background:linear-gradient(180deg,#16a34a,#4ade80)}
.enterprise-stat.tone-violet{background:linear-gradient(180deg,#f5f3ff,#ffffff);border-color:#ddd6fe;box-shadow:0 14px 34px rgba(124,58,237,.10)}
.enterprise-stat.tone-violet::before{background:linear-gradient(180deg,#7c3aed,#a78bfa)}
.enterprise-stat.tone-red{background:linear-gradient(180deg,#fef2f2,#ffffff);border-color:#fecaca;box-shadow:0 14px 34px rgba(220,38,38,.12)}
.enterprise-stat.tone-red::before{background:linear-gradient(180deg,#dc2626,#f87171)}
.enterprise-stat-head,.dashboard-widget-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.enterprise-stat-meta{margin-top:8px;font-size:.78rem;color:#64748b;line-height:1.45}
.enterprise-stat .stat-label{color:#334155;font-weight:700}
.enterprise-stat .stat-value{margin-top:10px;font-size:1.85rem;letter-spacing:-.02em}
.enterprise-stat .stat-value.stat-value-money{font-size:1.1rem;line-height:1.4}
.status-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:.72rem;font-weight:800;line-height:1;letter-spacing:.02em;text-transform:uppercase;white-space:nowrap;border:1px solid transparent}
.status-pill::before{content:'';width:8px;height:8px;border-radius:999px;background:currentColor;opacity:.92}
.state-info{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.state-success{background:#f0fdf4;border-color:#bbf7d0;color:#15803d}
.state-warning{background:#fffbeb;border-color:#fde68a;color:#b45309}
.state-critical{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.state-neutral{background:#f8fafc;border-color:#cbd5e1;color:#475569}
.widget-date-range{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#f8fafc;border:1px solid #dbe5f3;color:#475569;font-size:.76rem;font-weight:700}
.dashboard-widget{position:relative}
.dashboard-widget::after{content:'';position:absolute;left:20px;right:20px;top:0;height:1px;background:linear-gradient(90deg,rgba(37,99,235,.15),rgba(15,23,42,0))}
.health-card{position:relative;overflow:hidden;border-width:1px}
.health-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:#2563eb}
.health-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.health-card.tone-blue{border-color:#bfdbfe}
.health-card.tone-blue::before{background:linear-gradient(180deg,#2563eb,#60a5fa)}
.health-card.tone-violet{border-color:#ddd6fe}
.health-card.tone-violet::before{background:linear-gradient(180deg,#7c3aed,#a78bfa)}
.health-card.tone-red{border-color:#fecaca}
.health-card.tone-red::before{background:linear-gradient(180deg,#dc2626,#f87171)}
.health-card.tone-amber{border-color:#fde68a}
.health-card.tone-amber::before{background:linear-gradient(180deg,#d97706,#fbbf24)}
.health-card.tone-slate,.health-card.tone-gray{border-color:#cbd5e1}
.health-card.tone-slate::before,.health-card.tone-gray::before{background:linear-gradient(180deg,#475569,#94a3b8)}
.dashboard-bar-item{position:relative}
.dashboard-bar-item::before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;border-radius:18px 0 0 18px;background:#2563eb;opacity:.9}
.dashboard-bar-item.tone-blue::before{background:linear-gradient(180deg,#2563eb,#60a5fa)}
.dashboard-bar-item.tone-green::before{background:linear-gradient(180deg,#16a34a,#4ade80)}
.dashboard-bar-item.tone-red::before{background:linear-gradient(180deg,#dc2626,#f87171)}
.dashboard-bar-item.tone-amber::before{background:linear-gradient(180deg,#d97706,#fbbf24)}
.dashboard-bar-item.tone-violet::before{background:linear-gradient(180deg,#7c3aed,#a78bfa)}
.dashboard-bar-item.tone-cyan::before{background:linear-gradient(180deg,#0891b2,#67e8f9)}
.dashboard-bar-item.tone-slate::before,.dashboard-bar-item.tone-gray::before{background:linear-gradient(180deg,#475569,#94a3b8)}
.dashboard-table-card thead th{border-bottom:1px solid #dbe5f3}
.dashboard-table-card tbody tr:hover{background:#fafcff}
@media (max-width:767px){
  .enterprise-stat{padding:15px 14px 14px}
  .enterprise-stat .stat-value{font-size:1.55rem}
  .enterprise-stat .stat-value.stat-value-money{font-size:1rem}
  .status-pill{font-size:.68rem;padding:5px 9px}
  .dashboard-widget-head{align-items:flex-start}
  .health-card-top{flex-direction:column;align-items:flex-start}
}


.widget-title-row{display:flex;align-items:center;gap:10px;min-width:0}
.widget-title-row h5{margin:0}
.widget-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:12px;font-size:1rem;flex:0 0 34px;border:1px solid #dbe5f3;background:#fff;color:#2563eb;box-shadow:0 8px 20px rgba(15,23,42,.06)}
.widget-icon i{line-height:1}
.widget-icon.tone-blue{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.widget-icon.tone-green{background:#f0fdf4;border-color:#bbf7d0;color:#15803d}
.widget-icon.tone-red{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.widget-icon.tone-amber{background:#fffbeb;border-color:#fde68a;color:#b45309}
.widget-icon.tone-violet{background:#f5f3ff;border-color:#ddd6fe;color:#6d28d9}
.widget-icon.tone-cyan{background:#ecfeff;border-color:#a5f3fc;color:#0f766e}
.widget-icon.tone-slate,.widget-icon.tone-gray{background:#f8fafc;border-color:#cbd5e1;color:#334155}
.state-card-success{box-shadow:0 0 0 1px rgba(22,163,74,.08),0 14px 34px rgba(22,163,74,.10)}
.state-card-info{box-shadow:0 0 0 1px rgba(37,99,235,.08),0 14px 34px rgba(37,99,235,.10)}
.state-card-warning{box-shadow:0 0 0 1px rgba(217,119,6,.10),0 14px 34px rgba(217,119,6,.10)}
.state-card-critical{box-shadow:0 0 0 1px rgba(220,38,38,.12),0 14px 34px rgba(220,38,38,.12)}
.state-card-neutral{box-shadow:0 0 0 1px rgba(71,85,105,.08),0 14px 34px rgba(71,85,105,.09)}
.enterprise-stat.state-card-warning::after,.enterprise-stat.state-card-critical::after,.health-card.state-card-warning::after,.health-card.state-card-critical::after{content:'';position:absolute;right:14px;top:14px;width:10px;height:10px;border-radius:999px;background:currentColor;opacity:.18}
.enterprise-stat.state-card-warning::after,.health-card.state-card-warning::after{color:#d97706}
.enterprise-stat.state-card-critical::after,.health-card.state-card-critical::after{color:#dc2626}
@media (max-width:767px){
  .widget-icon{width:30px;height:30px;border-radius:10px;font-size:.92rem;flex-basis:30px}
  .widget-title-row{gap:8px}
}


/* v53 Lead List precision + customer stability */
.lead-list-precise{table-layout:auto !important;width:100% !important}
.lead-list-precise th,.lead-list-precise td{vertical-align:top !important;white-space:normal;word-break:break-word}
.lead-list-precise td .badge-status{white-space:nowrap}
.lead-list-precise .lead-product-cell{min-width:220px;line-height:1.45}
.lead-list-precise .lead-assign-cell{min-width:160px}
.lead-list-precise .lead-actions{min-width:190px}
.lead-list-precise .action-btn{display:inline-flex;align-items:center;gap:6px}
.customer-list-table{table-layout:auto !important;width:100% !important}
.customer-list-table th,.customer-list-table td{vertical-align:top !important;white-space:normal;word-break:break-word}
@media (max-width: 991.98px){
  .lead-list-precise .action-btn span{display:none}
  .lead-list-precise .action-btn{min-width:36px;justify-content:center}
}
@media (max-width: 767.98px){
  .lead-list-precise th,.lead-list-precise td{font-size:12px;padding:8px 6px}
  .customer-list-table th,.customer-list-table td{font-size:12px;padding:8px 6px}
}

/* vNext Lead List compact table + action buttons */
.lead-list-precise{table-layout:fixed !important;width:100% !important;min-width:1210px !important}
.lead-list-precise th,.lead-list-precise td{font-size:11.8px !important;padding:6px 5px !important;line-height:1.25 !important;vertical-align:middle !important;white-space:normal;word-break:break-word}
.lead-list-precise th:nth-child(1),.lead-list-precise td:nth-child(1){width:34px !important;text-align:center}
.lead-list-precise th:nth-child(2),.lead-list-precise td:nth-child(2){width:42px !important;text-align:center}
.lead-list-precise th:nth-child(3),.lead-list-precise td:nth-child(3){width:138px !important}
.lead-list-precise th:nth-child(4),.lead-list-precise td:nth-child(4){width:150px !important}
.lead-list-precise th:nth-child(5),.lead-list-precise td:nth-child(5){width:105px !important}
.lead-list-precise th:nth-child(6),.lead-list-precise td:nth-child(6){width:185px !important}
.lead-list-precise th:nth-child(7),.lead-list-precise td:nth-child(7){width:105px !important;white-space:nowrap}
.lead-list-precise th:nth-child(8),.lead-list-precise td:nth-child(8){width:48px !important;text-align:center}
.lead-list-precise th:nth-child(9),.lead-list-precise td:nth-child(9){width:112px !important;white-space:nowrap}
.lead-list-precise th:nth-child(10),.lead-list-precise td:nth-child(10){width:106px !important}
.lead-list-precise th:nth-child(11),.lead-list-precise td:nth-child(11){width:105px !important}
.lead-list-precise th:nth-child(12),.lead-list-precise td:nth-child(12){width:96px !important;text-align:right}
.lead-list-precise .lead-product-cell{min-width:0 !important;max-width:185px;line-height:1.3 !important}
.lead-list-precise .lead-assign-cell{min-width:0 !important;max-width:105px;line-height:1.25}
.lead-list-precise .lead-actions{min-width:0 !important;gap:4px !important;white-space:nowrap;flex-wrap:nowrap !important}
.lead-list-precise .action-btn span{display:none !important}
.lead-list-precise .action-icon-btn,.lead-list-precise .action-btn{width:26px !important;height:26px !important;min-width:26px !important;padding:0 !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;border-radius:8px !important;font-size:12px !important;gap:0 !important}
.lead-list-precise .action-btn i{font-size:12px;line-height:1}
.btn-xs{--bs-btn-padding-y:.18rem;--bs-btn-padding-x:.42rem;--bs-btn-font-size:.72rem;--bs-btn-border-radius:.45rem;line-height:1.15}
.lead-list-precise .lead-assign-btn{min-height:24px;padding:.18rem .28rem !important;font-size:10.8px !important;border-radius:7px !important;white-space:nowrap}
.lead-list-precise .badge-status{font-size:10px !important;padding:4px 6px !important;white-space:nowrap}
.lead-list-precise .small{font-size:10.5px !important}
@media (max-width: 991.98px){.lead-list-precise{min-width:1040px !important}.lead-list-precise th,.lead-list-precise td{font-size:11px !important;padding:5px 4px !important}.lead-list-precise .action-icon-btn,.lead-list-precise .action-btn{width:24px !important;height:24px !important;min-width:24px !important}}

/* Product Master precision table - compact desktop layout */
.product-master-precise{
  table-layout:fixed !important;
  width:100% !important;
  min-width:0 !important;
  border-collapse:separate;
  border-spacing:0;
}
.product-master-precise th,
.product-master-precise td{
  font-size:11.4px !important;
  padding:5px 5px !important;
  line-height:1.22 !important;
  vertical-align:middle !important;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.product-master-precise thead th{
  font-size:11px !important;
  letter-spacing:0 !important;
  white-space:normal !important;
  padding-top:6px !important;
  padding-bottom:6px !important;
}
.product-master-precise th:nth-child(1),.product-master-precise td:nth-child(1){width:4.2% !important;text-align:center}
.product-master-precise th:nth-child(2),.product-master-precise td:nth-child(2){width:25% !important}
.product-master-precise th:nth-child(3),.product-master-precise td:nth-child(3){width:9.5% !important}
.product-master-precise th:nth-child(4),.product-master-precise td:nth-child(4){width:10% !important}
.product-master-precise th:nth-child(5),.product-master-precise td:nth-child(5){width:6.5% !important;text-align:center}
.product-master-precise th:nth-child(6),.product-master-precise td:nth-child(6){width:8.5% !important;white-space:normal}
.product-master-precise th:nth-child(7),.product-master-precise td:nth-child(7){width:9% !important;white-space:normal}
.product-master-precise th:nth-child(8),.product-master-precise td:nth-child(8){width:10.5% !important;white-space:normal}
.product-master-precise th:nth-child(9),.product-master-precise td:nth-child(9){width:6.5% !important;white-space:nowrap}
.product-master-precise th:nth-child(10),.product-master-precise td:nth-child(10){width:6% !important;text-align:center}
.product-master-precise th:nth-child(11),.product-master-precise td:nth-child(11){width:4.3% !important;text-align:right;white-space:nowrap}
.product-master-precise .pm-product-cell{max-width:0}
.product-master-precise .pm-product-name{
  font-size:11.2px !important;
  line-height:1.18 !important;
  font-weight:650 !important;
  white-space:normal !important;
  word-break:break-word !important;
  overflow-wrap:anywhere !important;
}
.product-master-precise .pm-product-id,
.product-master-precise .pm-notes,
.product-master-precise .small{font-size:10px !important;line-height:1.15 !important}
.product-master-precise .badge{font-size:9.8px !important;padding:3px 5px !important;border-radius:6px !important}
.product-master-precise .pm-action-btn,
.product-master-precise .pm-action-toggle{
  min-width:24px !important;
  height:24px !important;
  padding:.12rem .25rem !important;
  font-size:10.5px !important;
  border-radius:7px !important;
  line-height:1 !important;
}
.product-master-precise .pm-action-btn{width:24px !important;display:inline-flex;align-items:center;justify-content:center}
.product-master-precise .pm-action-btn i{font-size:11px !important;line-height:1}
.product-master-precise .pm-action-toggle{width:28px !important}
@media (max-width:1199.98px){
  .product-master-precise th,.product-master-precise td{font-size:10.8px !important;padding:4px 4px !important}
  .product-master-precise .pm-product-name{font-size:10.8px !important}
}
@media (max-width:991.98px){
  .product-master-precise{min-width:980px !important}
}
/* Follow-Up Simple Staff UI */
.followup-task-card {
    transition: box-shadow .15s ease, transform .15s ease;
}
.followup-task-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}
.followup-task-card .form-select-sm,
.followup-task-card .form-control-sm,
.followup-task-card .btn-sm {
    font-size: .82rem;
}


/* Sticky horizontal scrollbar for wide CRM tables (Lead List / Quotation). */
.crm-table-scroll-wrap{overflow-x:auto;}
.crm-table-scroll-wrap::-webkit-scrollbar,.crm-sticky-xbar::-webkit-scrollbar{height:10px;}
.crm-table-scroll-wrap::-webkit-scrollbar-thumb,.crm-sticky-xbar::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px;}
.crm-table-scroll-wrap::-webkit-scrollbar-track,.crm-sticky-xbar::-webkit-scrollbar-track{background:#f1f5f9;border-radius:999px;}
.crm-sticky-xbar{position:fixed;bottom:10px;left:16px;right:16px;height:18px;overflow-x:auto;overflow-y:hidden;background:#fff;border:1px solid #dbe4ef;border-radius:999px;box-shadow:0 10px 28px rgba(15,23,42,.18);z-index:1045;display:none;}
.crm-sticky-xbar>div{height:1px;}
body.crm-sticky-xbar-active{padding-bottom:22px;}
@media print{.crm-sticky-xbar{display:none!important;}body.crm-sticky-xbar-active{padding-bottom:0!important;}}
