:root{--bg:#f4f7fb;--panel:#ffffff;--border:#e5e7eb;--text:#111827;--muted:#6b7280;--primary:#2563eb;--accent:#f97316;--sidebar-1:#0f172a;--sidebar-2:#1e293b}*{box-sizing:border-box}body{margin:0;background:linear-gradient(180deg,#f8fbff,#f2f5fb);font-family:Inter,Segoe UI,Tahoma,sans-serif;color:var(--text)}.app-shell{display:grid;grid-template-columns:290px 1fr;min-height:100vh}.sidebar{background:linear-gradient(180deg,var(--sidebar-1),var(--sidebar-2));padding:24px;color:#fff;display:flex;flex-direction:column;justify-content:space-between}.brand-box{display:flex;gap:14px;align-items:center;padding:16px;border-radius:22px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.08)}.brand-mark{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(135deg,var(--accent),var(--primary));font-weight:800;font-size:1.45rem}.brand-title{font-size:1.15rem;font-weight:800}.brand-sub{font-size:.82rem;color:rgba(255,255,255,.7)}.menu-list{display:flex;flex-direction:column;gap:8px}.menu-link{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;color:rgba(255,255,255,.82);text-decoration:none;transition:.18s}.menu-link:hover,.menu-link.active{background:rgba(255,255,255,.12);color:#fff}.main-panel{padding:28px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;background:rgba(255,255,255,.82);backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.7);padding:20px 22px;border-radius:24px;box-shadow:0 14px 40px rgba(15,23,42,.06)}.page-title{font-size:1.7rem;font-weight:800;margin:0}.page-subtitle{color:var(--muted);font-size:.92rem;margin-top:4px}.topbar-actions{display:flex;gap:10px}.panel-card{background:var(--panel);border:1px solid rgba(15,23,42,.06);border-radius:26px;box-shadow:0 16px 44px rgba(15,23,42,.05)}.panel-card .card-body{padding:24px}.stat-card{height:100%;padding:24px;border-radius:24px;background:var(--panel);border:1px solid rgba(15,23,42,.06);box-shadow:0 16px 44px rgba(15,23,42,.05)}.stat-label{color:var(--muted);font-size:.92rem}.stat-value{font-size:2rem;font-weight:800;margin-top:10px}.workflow-step{display:flex;gap:14px;padding:14px 0;border-bottom:1px dashed var(--border)}.workflow-step:last-child{border-bottom:none}.step-badge{width:38px;height:38px;border-radius:14px;display:grid;place-items:center;background:#eff6ff;color:var(--primary);font-weight:800}.section-title{font-size:1.06rem;font-weight:800;margin-bottom:14px}.quick-link{display:block;text-decoration:none;color:inherit;padding:16px;border-radius:18px;border:1px solid var(--border);background:#fff;height:100%}.quick-link:hover{border-color:#c7d2fe;transform:translateY(-1px)}.placeholder-box{border:2px dashed #dbe3ef;border-radius:22px;padding:32px;background:linear-gradient(180deg,#fff,#f8fbff)}.placeholder-icon{width:62px;height:62px;border-radius:18px;display:grid;place-items:center;background:#eff6ff;color:var(--primary);font-size:1.4rem;margin-bottom:16px}.table-clean th{font-size:.88rem;color:var(--muted);font-weight:700;background:#f8fafc}.table-clean td,.table-clean th{padding:14px 16px}.chip{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:.83rem;font-weight:700}.chip.orange{background:#fff7ed;color:#c2410c}.chip.green{background:#ecfdf5;color:#047857}@media (max-width: 992px){.app-shell{grid-template-columns:1fr}.sidebar{position:static}.topbar{flex-direction:column;align-items:flex-start}.main-panel{padding:18px}}

.form-modern{border-radius:16px;border:1px solid #dbe5f1;padding:.8rem 1rem}
.form-modern:focus{border-color:#93c5fd;box-shadow:0 0 0 .25rem rgba(59,130,246,.12)}
.code-pill{display:inline-block;padding:.35rem .75rem;border-radius:999px;background:#eff6ff;color:#2563eb;font-weight:800;font-size:.84rem}
.customer-data-table thead th{white-space:nowrap}
.dynamic-wrapper{display:flex;flex-direction:column;gap:14px}
.dynamic-item{padding:18px;border:1px solid #e5e7eb;border-radius:20px;background:linear-gradient(180deg,#fff,#f8fbff)}
.dynamic-item-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.detail-header{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
.detail-title{font-size:1.8rem;font-weight:800}
.info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.info-grid div{padding:14px 16px;border-radius:18px;background:#f8fbff;border:1px solid #e5e7eb}
.info-grid span{display:block;color:#6b7280;font-size:.87rem;margin-bottom:4px}
.soft-box{padding:16px;border-radius:18px;background:#f8fbff;border:1px solid #e5e7eb;min-height:64px}
.list-stack{display:flex;flex-direction:column;gap:10px}
.stack-item{padding:14px 16px;border-radius:18px;background:#fff;border:1px solid #e5e7eb}
@media (max-width: 992px){.info-grid{grid-template-columns:1fr}.detail-header{flex-direction:column}}

.ts-wrapper.single .ts-control{border-radius:16px;border:1px solid #dbe5f1;padding:.7rem 1rem;min-height:50px;box-shadow:none}.ts-wrapper.focus .ts-control{border-color:#93c5fd;box-shadow:0 0 0 .25rem rgba(59,130,246,.12)}.ts-dropdown{border-radius:16px;border:1px solid #dbe5f1;box-shadow:0 20px 40px rgba(15,23,42,.12);overflow:hidden}.ts-dropdown .option{padding:10px 14px}.ts-dropdown .active{background:#eff6ff;color:#1d4ed8}
/* Searchable customer dropdown */
.ts-wrapper.form-modern,
.ts-wrapper.single {
    width: 100%;
}
.ts-wrapper.single .ts-control,
.ts-control {
    border-radius: 16px;
    border: 1px solid #dbe5f1;
    padding: .72rem 1rem;
    min-height: 52px;
    box-shadow: none;
    background: #fff;
}
.ts-wrapper.single.input-active .ts-control,
.ts-wrapper.focus .ts-control {
    border-color: #93c5fd;
    box-shadow: 0 0 0 .25rem rgba(59,130,246,.12);
}
.ts-control > input {
    font-size: 1rem;
}
.ts-dropdown {
    border-radius: 16px;
    border: 1px solid #dbe5f1;
    box-shadow: 0 20px 40px rgba(15,23,42,.12);
    overflow: hidden;
    margin-top: 8px;
}
.ts-dropdown .option,
.ts-dropdown .create,
.ts-dropdown .no-results {
    padding: 10px 14px;
}
.ts-dropdown .active {
    background: #eff6ff;
    color: #1d4ed8;
}


.toggle-field{
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    min-height:100%;
}
.toggle-field .form-label{
    margin-bottom:.75rem;
}
.toggle-field-control{
    min-height:50px;
    display:flex;
    align-items:center;
}
.toggle-field-control .form-check-input{
    margin-top:0;
}


.toggle-inline{
    display:flex;
    align-items:center;
    min-height:50px;
}

.inline-check,
.inline-switch{
    display:inline-flex !important;
    align-items:center;
    gap:.6rem;
}

.inline-check .form-check-input,
.inline-switch .form-check-input{
    margin-top:0 !important;
    margin-left:0 !important;
    float:none !important;
    flex:0 0 auto;
}

.inline-check .form-check-label,
.inline-switch .form-check-label{
    margin:0;
    line-height:1.2;
    white-space:nowrap;
    cursor:pointer;
}


/* aligned toggle fields */
.form-label-spacer{visibility:hidden;}
.toggle-box{display:flex;align-items:center;min-height:52px;padding:.72rem 1rem;border:1px solid #dbe5f1;border-radius:16px;background:#fff;}
.toggle-box .form-check{display:inline-flex !important;align-items:center;gap:.65rem;margin:0;}
.toggle-box .form-check-input{margin:0 !important;float:none !important;flex:0 0 auto;}
.toggle-box .form-check-label{margin:0;line-height:1;white-space:nowrap;cursor:pointer;}
.toggle-box .form-switch{padding-left:0;}
.toggle-box .form-switch .form-check-input{margin-right:.65rem !important;}
.toggle-inline{display:block;min-height:auto;}
.inline-check,.inline-switch{display:inline-flex !important;align-items:center;gap:.65rem;}


.toggle-spacer{
    height: 28px;
    margin-bottom: .5rem;
}


/* customer toggle alignment cleanup */
.toggle-field{
    display:flex;
    flex-direction:column;
    height:100%;
}

.toggle-field .form-label{
    margin-bottom:.6rem;
}

.toggle-main-status,
.toggle-plain{
    display:flex;
    align-items:center;
    min-height:52px;
}

.toggle-main-status{
    padding:0 .1rem;
}

.toggle-plain{
    padding:0;
    border:none;
    background:transparent;
    border-radius:0;
}

.toggle-plain .form-check,
.toggle-main-status .form-check{
    display:inline-flex !important;
    align-items:center;
    gap:.65rem;
    margin:0;
    padding-left:0;
}

.toggle-plain .form-check-input,
.toggle-main-status .form-check-input{
    margin:0 !important;
    float:none !important;
    flex:0 0 auto;
}

.toggle-plain .form-switch .form-check-input,
.toggle-main-status .form-switch .form-check-input{
    margin-right:.65rem !important;
}

.toggle-plain .form-check-label,
.toggle-main-status .form-check-label{
    margin:0;
    line-height:1.1;
    white-space:nowrap;
    cursor:pointer;
}

.toggle-spacer{
    height:30px;
    margin-bottom:.45rem;
}


.quotation-print-sheet{background:#fff}
@media print{
  .sidebar,.topbar,.no-print{display:none !important}
  .main-panel{padding:0 !important}
  .panel-card{border:none !important; box-shadow:none !important}
  body{background:#fff !important}
}


.quotation-print-panel .card-body{background:#edf0f4}
.quotation-excel-sheet{width:210mm;min-height:297mm;margin:0 auto;background:#fff;padding:8mm 8mm 10mm;border:1px solid #c9cdd4;box-shadow:0 8px 24px rgba(15,23,42,.08);font-family:Tahoma,'Sarabun',sans-serif;font-size:12px;line-height:1.25;color:#000}
.quotation-excel-header{text-align:center;margin-bottom:6px}
.quotation-excel-brandline{display:flex;justify-content:center;align-items:center;gap:10px;margin-bottom:2px}
.quotation-excel-logo{width:30px;height:30px;object-fit:contain}
.quotation-excel-logo-fallback{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#d7a447;color:#fff;font-weight:700}
.quotation-excel-company-name{font-size:18px;font-weight:700}
.quotation-excel-address{font-size:11px;margin-bottom:2px}
.quotation-excel-title{font-size:17px;font-weight:700;text-decoration:underline}
.quotation-excel-info-table,.quotation-excel-main-table,.quotation-excel-note-table,.quotation-excel-sign-table,.quotation-excel-summary-table,.quotation-excel-payment-table{width:100%;border-collapse:collapse;table-layout:fixed}
.quotation-excel-info-table td{padding:4px 2px;vertical-align:top;border:none}
.quotation-excel-info-table .job-title{font-size:14px;font-weight:700}
.quotation-excel-info-table .date-cell{text-align:right;font-weight:700}
.quotation-excel-info-table .jobtype-red{color:#e11d1d;font-weight:700;text-align:center}
.quotation-excel-info-table .intro-cell{text-align:center;font-weight:700;padding-top:6px;padding-bottom:6px}
.quotation-excel-main-table th,.quotation-excel-main-table td,.quotation-excel-note-table td,.quotation-excel-sign-table td,.quotation-excel-summary-table th,.quotation-excel-summary-table td,.quotation-excel-payment-table td{border:1px solid #000;padding:5px 6px;vertical-align:middle}
.quotation-excel-main-table thead th{text-align:center;font-weight:700;background:#fff}
.quotation-excel-main-table .group-cell{background:#dfe9c0;font-weight:700}
.green-cell{background:#dfe9c8;font-weight:700}
.right{text-align:right}.center{text-align:center}
.quotation-excel-bottom-grid{display:grid;grid-template-columns:1fr 1.05fr;gap:0;margin-top:0}
.quotation-excel-note-table .note-title,.quotation-excel-note-table .note-line{color:#e11d1d}
.quotation-excel-note-table .note-title{font-weight:700}.quotation-excel-note-table td{height:24px}
.quotation-excel-sign-table{margin-top:0;border-top:none}.quotation-excel-sign-table .sign-header{text-align:center;padding:10px 6px}.quotation-excel-sign-table .sign-center{text-align:center;padding:6px 6px}
.quotation-excel-summary-table th{font-weight:700;background:#fff}.quotation-excel-summary-table td,.quotation-excel-summary-table th{height:30px}
.grand-red-row th,.grand-red-row td,.amount-text-red-row th,.amount-text-red-row td{background:#ff2b1c;color:#000;font-weight:700}
.quotation-excel-payment-table{margin-top:0;border-top:none}.quotation-excel-payment-table td{height:28px}.payment-title,.payment-line{color:#e11d1d}.payment-title{font-weight:700}
.quotation-excel-duration{text-align:center;margin-top:10px;font-size:12px}
@page{size:A4 portrait;margin:8mm}
@media print{html,body{background:#fff !important}.sidebar,.topbar,.no-print,.alert{display:none !important}.main-panel{padding:0 !important}.panel-card,.quotation-print-panel{border:none !important;box-shadow:none !important;background:#fff !important;margin:0 !important}.quotation-print-panel .card-body{padding:0 !important;background:#fff !important}.quotation-excel-sheet{border:none;box-shadow:none;margin:0;padding:0;width:100%;min-height:auto}}


/* quotation print landscape fix */
.quotation-template-sheet{
    width: 297mm;
    min-height: 210mm;
    padding: 8mm 10mm 8mm;
}

.quotation-template-title{
    margin-bottom: 4px;
}

.quotation-template-job-title{
    font-size: 15px;
    margin: 4px 0 8px;
}

.quotation-template-meta-grid{
    grid-template-columns: 1.25fr .75fr;
    gap: 4px 14px;
    margin-bottom: 6px;
}

.quotation-template-intro{
    margin: 6px 0 8px;
}

.quotation-template-table th,
.quotation-template-table td{
    padding: 4px 5px;
    font-size: 12px;
}

.quotation-template-bottom-grid{
    gap: 10px;
    margin-top: 10px;
}

.quotation-template-footer-grid{
    gap: 10px;
    margin-top: 10px;
}

.quotation-template-note-content,
.quotation-template-payment-content{
    min-height: 74px;
}

@page{
    size: A4 landscape;
    margin: 6mm;
}

@media print{
  @page{
    size: A4 landscape;
    margin: 6mm;
  }

  .quotation-template-sheet{
    width: 100%;
    min-height: auto;
    padding: 0;
  }
}


.quotation-exact-sheet{width:297mm;min-height:210mm;margin:0 auto;background:#fff;color:#000;padding:6mm 8mm 8mm;border:2px solid #000;box-shadow:none;font-family:Tahoma,'Sarabun','TH Sarabun New',sans-serif;font-size:12px;line-height:1.1}
.q-head-center{text-align:center;margin-bottom:4px}.q-brand-line{display:flex;justify-content:center;align-items:center;gap:10px}.q-logo{width:34px;height:34px;object-fit:contain}.q-logo-fallback{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#c89330;color:#fff;font-weight:700}.q-company-name{font-size:16px;font-weight:700}.q-company-sub{font-size:10px}.q-doc-title{font-size:16px;font-weight:700;text-decoration:underline;margin-top:1px}
.q-meta-table,.q-master-table{width:100%;border-collapse:collapse}.q-meta-table td{border:none;padding:2px 2px;font-size:11px}.q-main-title{font-size:14px;font-weight:700;padding-top:3px !important}.q-date-cell{text-align:right;font-weight:700}.q-jobtype-red{text-align:center;color:#f00;font-weight:700}.q-intro{text-align:center;font-weight:700;padding:4px 0 6px !important}
.q-master-table th,.q-master-table td{border:1px solid #000;padding:3px 4px;vertical-align:middle}.q-master-table thead th{text-align:center;font-weight:700;background:#fff}.center{text-align:center}.right{text-align:right}.cell-soft{background:#e5ecc4}.cell-group{background:#d9e6b0;font-weight:700}.cell-green{background:#dbe7b8}.cell-red{background:#ff2a22;color:#000;font-weight:700}.note-row{text-decoration:underline}.red-text{color:#f00}.text-left{text-align:left}.sign-cell{vertical-align:top;text-align:center}.sign-line1{margin:10px 0 12px}.sign-line2{margin-bottom:9px}.payment-cell{height:26px}.duration-cell{text-align:center;height:32px;padding-top:8px !important}
.quotation-print-panel .card-body{background:#f4f4f4}
@page{size:A4 landscape;margin:4mm}
@media print{.sidebar,.topbar,.no-print,.alert{display:none !important}.main-panel{padding:0 !important}.panel-card,.quotation-print-panel{border:none !important;box-shadow:none !important;background:#fff !important;margin:0 !important}.quotation-print-panel .card-body{background:#fff !important;padding:0 !important}.quotation-exact-sheet{width:100%;min-height:auto;margin:0;border:2px solid #000;padding:6mm 8mm 8mm}}

.highlight-stack{border-color:#93c5fd;box-shadow:0 0 0 3px rgba(37,99,235,.12)}


.compact-stack .stack-item{padding:12px 14px}
.document-form-table textarea.form-modern{min-height:72px}
.doc-print-panel .card-body{background:#f5f6f8}
.doc-form-sheet{width:210mm;min-height:297mm;margin:0 auto;background:#fff;color:#000;padding:10mm 10mm 8mm;border:1px solid #d5d9e1;box-shadow:0 10px 24px rgba(15,23,42,.08);font-family:Tahoma,'Sarabun','TH Sarabun New',sans-serif;font-size:12px;line-height:1.25}
.doc-top-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.doc-brand-wrap{display:flex;gap:12px;align-items:flex-start}
.doc-logo{width:86px;height:86px;object-fit:contain}
.doc-company-wrap{padding-top:4px}
.doc-company-th{font-size:15px;font-weight:700;color:#0ea5e9}
.doc-company-en{font-size:13px;font-weight:700;margin-top:1px}
.doc-company-meta{font-size:10px;color:#374151}
.doc-copy-badge{border:2px solid var(--accent);color:#111827;padding:7px 14px;border-radius:6px;font-weight:700;font-size:11px}
.doc-title-box{width:62%;margin:8px auto 10px;text-align:center;border:3px solid var(--accent);border-radius:8px;padding:10px 14px 8px}
.doc-title-main{font-size:18px;font-weight:700}
.doc-title-sub{font-size:11px;font-weight:700}
.doc-meta-block{display:grid;grid-template-columns:1fr 180px;gap:16px;margin-bottom:10px}
.doc-meta-left>div,.doc-meta-right>div{padding:2px 0;border-bottom:1px dotted #d1d5db}
.doc-meta-right{text-align:right}
.doc-tax-line{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.doc-checkbox{display:inline-block;width:16px;height:16px;border:2px solid #111827;vertical-align:middle;position:relative;margin-left:8px}
.doc-checkbox.checked::after{content:'X';position:absolute;left:2px;top:-3px;font-size:14px;font-weight:700}
.doc-line-table{width:100%;border-collapse:collapse;table-layout:fixed}
.doc-line-table th,.doc-line-table td{border:1px solid #111827;padding:4px 5px;vertical-align:top}
.doc-line-table thead th{background:var(--header);color:#fff;text-align:center;font-weight:700}
.doc-line-table tbody td{height:24px}
.doc-summary-row{display:grid;grid-template-columns:1.12fr .88fr;gap:0;margin-top:-1px}
.doc-note-box,.doc-total-box,.doc-remark-block,.doc-sign-box{border:1px solid #111827;background:#fff}
.doc-box-title,.doc-small-title,.doc-sign-title{padding:6px 8px;border-bottom:1px solid #111827;font-weight:700}
.doc-note-content{padding:8px;min-height:54px}
.doc-total-box table{width:100%;border-collapse:collapse}
.doc-total-box th,.doc-total-box td{border:1px solid #111827;padding:6px 8px}
.doc-total-box th{text-align:left;background:#fff}
.doc-total-box td{text-align:right;font-weight:700}
.doc-total-box tr.grand th,.doc-total-box tr.grand td{background:var(--soft)}
.doc-remark-block{margin-top:-1px}
.doc-remark-text{padding:8px;min-height:66px;white-space:pre-line}
.doc-footer-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0;margin-top:10px}
.doc-sign-line-wrap{padding:10px;min-height:100px;white-space:pre-line}
.signature-box{display:flex;flex-direction:column;justify-content:space-between}
.signature-space{height:56px}
.signature-name{text-align:center;padding:0 8px 8px;font-weight:700}
@page{size:A4 portrait;margin:8mm}
@media print{
  .sidebar,.topbar,.no-print,.alert{display:none !important}
  body,html{background:#fff !important}
  .main-panel{padding:0 !important}
  .panel-card,.doc-print-panel{border:none !important;box-shadow:none !important;background:#fff !important;margin:0 !important}
  .doc-print-panel .card-body{padding:0 !important;background:#fff !important}
  .doc-form-sheet{width:100%;min-height:auto;margin:0;border:none;box-shadow:none;padding:0}
}

.document-workspace{display:block}
.document-overview-card .card-body{padding:18px 22px}
.document-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.document-overview-item{display:flex;align-items:center;gap:14px;padding:16px 18px;border-radius:20px;border:1px solid #e5e7eb;background:linear-gradient(180deg,#fff,#f8fbff)}
.document-overview-item.active{border-color:#bfdbfe;box-shadow:0 0 0 3px rgba(37,99,235,.08)}
.document-overview-step{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:#eff6ff;color:#2563eb;font-weight:800}
.document-overview-title{font-weight:800;color:#111827}
.document-overview-text{font-size:.88rem;color:#6b7280}
.document-count-badge{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-weight:700;font-size:.86rem}
.document-count-badge.subtle{background:#f3f4f6;color:#4b5563}
.document-agreement-list{display:flex;flex-direction:column;gap:14px}
.document-agreement-card{display:grid;grid-template-columns:54px 1fr auto;gap:16px;align-items:center;padding:18px;border:1px solid #e5e7eb;border-radius:22px;background:#fff;transition:.18s ease}
.document-agreement-card:hover{border-color:#c7d2fe;box-shadow:0 12px 30px rgba(15,23,42,.06)}
.document-agreement-card.is-highlight{border-color:#93c5fd;box-shadow:0 0 0 3px rgba(37,99,235,.10)}
.document-agreement-index{width:54px;height:54px;border-radius:18px;display:grid;place-items:center;background:#f8fafc;border:1px solid #e5e7eb;font-weight:800;color:#334155}
.document-agreement-main{min-width:0}
.document-agreement-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.document-agreement-code{font-weight:800;color:#1d4ed8}
.document-agreement-customer{font-size:1.02rem;font-weight:800;margin-bottom:4px}
.document-agreement-meta{font-size:.9rem;color:#6b7280;line-height:1.45}
.document-agreement-total{margin-top:8px;font-weight:700;color:#111827}
.document-agreement-actions{display:flex;flex-direction:column;gap:10px;align-items:flex-end}
.document-feature-card{padding:16px;border-radius:20px;border:1px solid #bfdbfe;background:linear-gradient(180deg,#eff6ff,#ffffff)}
.document-feature-label{display:inline-flex;padding:6px 10px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:.78rem;font-weight:800;margin-bottom:10px}
.document-feature-title{font-size:1rem;font-weight:800;margin-bottom:4px}
.document-feature-note{margin-top:10px;font-size:.9rem;color:#475569;line-height:1.5}
.document-mini-item{background:#fbfdff}
.document-batch-item{display:flex;justify-content:space-between;align-items:center;gap:12px}
@media (max-width: 1199px){.document-agreement-card{grid-template-columns:54px 1fr}.document-agreement-actions{grid-column:2;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap}}
@media (max-width: 992px){.document-overview-grid{grid-template-columns:1fr}.document-overview-card .card-body{padding:18px}.document-agreement-card{grid-template-columns:1fr}.document-agreement-index{display:none}.document-agreement-actions{grid-column:auto;flex-direction:column;align-items:stretch}.document-batch-item{align-items:flex-start;flex-direction:column}}


.document-ready-card{padding:18px 20px}
.document-ready-card .fw-semibold{font-size:1rem}
.print-doc-block{margin-bottom:16px}
.print-doc-block:last-child{margin-bottom:0}
@media print{.print-doc-block{page-break-after:always;break-after:page}.print-doc-block:last-child{page-break-after:auto;break-after:auto}}

.document-batch-item-lg{padding:16px 16px 14px;border-radius:20px;background:#fff;border:1px solid #e5e7eb}
.document-batch-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.document-batch-actions{display:flex;gap:10px;flex-wrap:wrap}


.promo-example-box{padding:16px;border-radius:18px;background:#fff;border:1px solid #e5e7eb}

.doc-sections-wrap{display:none;margin-top:14px;padding-top:14px;border-top:1px dashed #dbe3ef}
.doc-sections-wrap.is-open{display:block}
.doc-type-card{height:100%;padding:16px;border-radius:18px;border:1px solid #e5e7eb;background:linear-gradient(180deg,#fff,#f8fbff)}
.btn-outline-secondary{color:#475569;border-color:#cbd5e1;background:#fff}
.btn-outline-secondary:hover{background:#f8fafc;color:#1e293b;border-color:#94a3b8}

.document-toggle-row{margin-top:12px;display:flex;justify-content:flex-start}
.chip.chip-sm{padding:6px 10px;font-size:.76rem}
.document-batch-status-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.document-cancel-mark{display:inline-flex;align-items:center;gap:6px;color:#c2410c;font-size:.83rem;font-weight:700}
.document-batch-item-lg.is-cancelled{border-color:#fdba74;background:linear-gradient(180deg,#fff7ed,#ffffff)}
.doc-type-card.is-cancelled{border-color:#fdba74;background:linear-gradient(180deg,#fff7ed,#ffffff)}


.document-toggle-row{margin-top:18px;margin-bottom:2px;display:flex;justify-content:flex-start}
.doc-toggle-btn{min-width:136px}
.doc-toggle-btn.is-open{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8}
.doc-sections-wrap{display:none;margin-top:16px;padding-top:18px;border-top:1px dashed #dbe3ef}
.doc-sections-wrap.is-open{display:block}
.document-batch-status-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}
.document-cancel-mark{display:none}
@media (max-width: 992px){.document-toggle-row{margin-top:16px}}

.doc-copy-info{display:inline-flex;align-items:center;gap:.35rem;padding:.38rem .7rem;border-radius:999px;background:#f6efe3;color:#8a5a12;font-size:.82rem;font-weight:700}

.document-section-block{margin-top:8px}
.document-section-heading{font-size:.95rem;font-weight:800;margin-bottom:10px;color:#111827}


/* document type themes */
.doc-theme-tax{border-color:#f0c98a;background:linear-gradient(180deg,#fffaf1,#fff3df)}
.doc-theme-tax .code-pill,.code-pill-doc.code-pill-tax{background:#f7e6c4;color:#9a5b00}
.doc-theme-labor{border-color:#8dd8ca;background:linear-gradient(180deg,#f3fbf8,#e5f7f2)}
.doc-theme-labor .code-pill,.code-pill-doc.code-pill-labor{background:#d7efe8;color:#1a6f63}
.doc-theme-receipt{border-color:#d7b8ef;background:linear-gradient(180deg,#fcf8ff,#f5ecfb)}
.doc-theme-receipt .code-pill,.code-pill-doc.code-pill-receipt{background:#efe2fb;color:#7a35b1}
.doc-theme-default{border-color:#e5e7eb;background:linear-gradient(180deg,#fff,#f8fbff)}
.code-pill-doc{font-weight:800}
.document-create-btn{border:1px solid transparent;font-weight:700;color:#fff}
.document-create-btn-tax{background:#c9871a;border-color:#c9871a}
.document-create-btn-tax:hover{background:#ad7213;border-color:#ad7213;color:#fff}
.document-create-btn-labor{background:#2f8f81;border-color:#2f8f81}
.document-create-btn-labor:hover{background:#267568;border-color:#267568;color:#fff}
.document-create-btn-receipt{background:#8e53bd;border-color:#8e53bd}
.document-create-btn-receipt:hover{background:#7743a3;border-color:#7743a3;color:#fff}
.document-create-btn-default{background:#475569;border-color:#475569}
.document-create-btn-default:hover{background:#334155;border-color:#334155;color:#fff}
.document-batch-item-lg.doc-theme-tax .document-batch-actions .btn-outline-primary,
.doc-type-card.doc-theme-tax .btn-outline-primary{border-color:#d29b3e;color:#9a5b00;background:#fffaf1}
.document-batch-item-lg.doc-theme-labor .document-batch-actions .btn-outline-primary,
.doc-type-card.doc-theme-labor .btn-outline-primary{border-color:#53b7a6;color:#1a6f63;background:#f4fbf9}
.document-batch-item-lg.doc-theme-receipt .document-batch-actions .btn-outline-primary,
.doc-type-card.doc-theme-receipt .btn-outline-primary{border-color:#ad82d3;color:#7a35b1;background:#fcf8ff}
.document-batch-item-lg.doc-theme-tax .document-batch-actions .btn-primary,
.doc-type-card.doc-theme-tax .btn-primary{background:#c9871a;border-color:#c9871a}
.document-batch-item-lg.doc-theme-labor .document-batch-actions .btn-primary,
.doc-type-card.doc-theme-labor .btn-primary{background:#2f8f81;border-color:#2f8f81}
.document-batch-item-lg.doc-theme-receipt .document-batch-actions .btn-primary,
.doc-type-card.doc-theme-receipt .btn-primary{background:#8e53bd;border-color:#8e53bd}
.doc-type-card.is-cancelled,.document-batch-item-lg.is-cancelled{border-color:#fdba74 !important;background:linear-gradient(180deg,#fff7ed,#ffffff) !important}
.doc-type-card.is-cancelled .code-pill,.document-batch-item-lg.is-cancelled .code-pill{background:#ffedd5 !important;color:#c2410c !important}


.document-batch-item-lg.doc-theme-tax .document-batch-actions .btn-primary:hover,
.doc-type-card.doc-theme-tax .btn-primary:hover{background:#ad7213;border-color:#ad7213;color:#fff}
.document-batch-item-lg.doc-theme-labor .document-batch-actions .btn-primary:hover,
.doc-type-card.doc-theme-labor .btn-primary:hover{background:#267568;border-color:#267568;color:#fff}
.document-batch-item-lg.doc-theme-receipt .document-batch-actions .btn-primary:hover,
.doc-type-card.doc-theme-receipt .btn-primary:hover{background:#7743a3;border-color:#7743a3;color:#fff}


.doc-theme-billing{border-color:#e59a8c;background:linear-gradient(180deg,#fff6f4,#fde9e4)}
.doc-theme-billing .code-pill,.code-pill-doc.code-pill-billing{background:#ffd9d1;color:#9f3f33}
.document-create-btn-billing{background:#cf5c4d;border-color:#cf5c4d}
.document-create-btn-billing:hover{background:#b94a3d;border-color:#b94a3d;color:#fff}
.document-batch-item-lg.doc-theme-billing .document-batch-actions .btn-outline-primary,
.doc-type-card.doc-theme-billing .btn-outline-primary{border-color:#e59a8c;color:#9f3f33;background:#fff7f5}
.document-batch-item-lg.doc-theme-billing .document-batch-actions .btn-primary,
.doc-type-card.doc-theme-billing .btn-primary{background:#cf5c4d;border-color:#cf5c4d}
.document-batch-item-lg.doc-theme-billing .document-batch-actions .btn-primary:hover,
.doc-type-card.doc-theme-billing .btn-primary:hover{background:#b94a3d;border-color:#b94a3d;color:#fff}


.doc-theme-withholding{border-color:#99a3b1;background:linear-gradient(180deg,#f8fafc,#edf2f7)}
.doc-theme-withholding .code-pill,.code-pill-doc.code-pill-withholding{background:#e2e8f0;color:#334155}
.document-create-btn-withholding{background:#475569;border-color:#475569}
.document-create-btn-withholding:hover{background:#334155;border-color:#334155;color:#fff}
.document-batch-item-lg.doc-theme-withholding .document-batch-actions .btn-outline-primary,
.doc-type-card.doc-theme-withholding .btn-outline-primary{border-color:#94a3b8;color:#334155;background:#f8fafc}
.document-batch-item-lg.doc-theme-withholding .document-batch-actions .btn-primary,
.doc-type-card.doc-theme-withholding .btn-primary{background:#475569;border-color:#475569}
.document-batch-item-lg.doc-theme-withholding .document-batch-actions .btn-primary:hover,
.doc-type-card.doc-theme-withholding .btn-primary:hover{background:#334155;border-color:#334155;color:#fff}


.document-filter-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr;gap:14px;align-items:end}
.latest-batches-scroll{max-height:980px;overflow:auto;padding-right:4px}
.doc-sections-details{margin-top:16px;padding-top:16px;border-top:1px dashed #dbe3ef}
.doc-sections-details > summary{list-style:none;display:inline-flex;align-items:center;cursor:pointer;user-select:none}
.doc-sections-details > summary::-webkit-details-marker{display:none}
.doc-sections-details .toggle-open-label{display:none}
.doc-sections-details[open] .toggle-open-label{display:inline}
.doc-sections-details[open] .toggle-closed-label{display:none}
.doc-sections-details .doc-sections-wrap{display:block;margin-top:16px;padding-top:0;border-top:none}
.document-toggle-summary{background:#fff}
.document-toggle-summary:hover{background:#f8fafc}
@media (max-width: 1200px){.document-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 768px){.document-filter-grid{grid-template-columns:1fr}}
