:root{color:#18212f;background:#f4f7fb;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}button,input,textarea,select{font:inherit}button{cursor:pointer}.app-shell{display:grid;grid-template-columns:260px minmax(0,1fr);min-height:100vh}.sidebar{background:#101828;color:#fff;padding:24px 18px}.brand{display:flex;gap:12px;align-items:center;margin-bottom:30px}.brand-mark{display:grid;width:42px;height:42px;place-items:center;border-radius:8px;background:#2dd4bf;color:#05201d}.brand strong,.brand span{display:block}.brand span{color:#b8c2d6;font-size:13px;margin-top:2px}nav{display:grid;gap:8px}nav button{display:flex;align-items:center;gap:10px;width:100%;min-height:42px;padding:10px 12px;border:0;border-radius:8px;background:transparent;color:#d6deeb;text-align:left}nav button.active,nav button:hover{background:#243247;color:#fff}.workspace{padding:30px;min-width:0}.topbar{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:22px}.topbar-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}.support-panel{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:-6px 0 18px;padding:14px 16px;border:1px solid #bae6fd;border-radius:8px;background:#eff6ff}.support-panel div{display:grid;gap:4px}.support-panel strong{color:#0f172a;font-size:14px}.support-panel span{color:#475569;font-size:13px;line-height:1.35}.support-panel code{padding:8px 10px;border-radius:7px;background:#fff;color:#075985;font-size:14px;font-weight:800;white-space:nowrap}h1,h2,h3,p{margin:0}h1{font-size:30px;line-height:1.1}.topbar p{color:#667085;margin-top:6px}.primary,.secondary,.file-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:9px 14px;border-radius:8px;border:1px solid transparent;font-weight:700}.primary{background:#0f766e;color:#fff}.primary:hover{background:#115e59}.secondary,.file-button{background:#fff;color:#1f2937;border-color:#d0d5dd}.toolbar{display:grid;grid-template-columns:auto minmax(0,1fr) 180px;align-items:center;gap:10px;background:#fff;border:1px solid #dbe3ef;border-radius:8px;padding:11px 14px;margin-bottom:16px}.toolbar input{border:0;outline:0;width:100%;min-width:0}.toolbar select{min-height:36px}.table-wrap{overflow-x:auto;background:#fff;border:1px solid #dbe3ef;border-radius:8px}.load-more{display:flex;justify-content:center;align-items:center;gap:12px;padding:16px 0 4px;color:#667085;font-size:13px;font-weight:700}.client-modal-list .load-more{padding:10px 0 2px}table{width:100%;border-collapse:collapse}th,td{padding:14px 16px;border-bottom:1px solid #edf1f7;text-align:left;white-space:nowrap}th{color:#667085;font-size:13px;font-weight:800}tr:last-child td{border-bottom:0}.right{text-align:right}.actions{width:190px;text-align:right}.status-badge{display:inline-flex;align-items:center;justify-content:center;min-height:26px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}.status-draft{color:#344054;background:#eef2f6}.status-sent{color:#075985;background:#e0f2fe}.status-accepted,.status-delivered{color:#047857;background:#d1fae5}.status-rejected,.status-cancelled{color:#b42318;background:#fee4e2}.status-expired{color:#92400e;background:#fef3c7}.icon-button{display:inline-grid;place-items:center;width:34px;height:34px;border:1px solid #d0d5dd;border-radius:8px;background:#fff;color:#344054;margin-left:6px}.icon-button:hover{background:#eef6f5;color:#0f766e}.client-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}.client-card{display:grid;gap:14px;min-height:112px;padding:18px;border-radius:8px;background:#fff;border:1px solid #dbe3ef}.client-card-head{display:flex;justify-content:space-between;gap:12px}.client-card h3{font-size:17px;margin-bottom:8px}.client-card p{color:#667085;font-size:14px;overflow-wrap:anywhere}.card-actions{flex:0 0 auto}.client-quote-summary{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:8px;background:#f8fafc;color:#475569;font-size:13px;font-weight:800}.client-quote-summary strong{color:#0f766e}.client-quote-actions{display:flex;gap:4px}.client-open-quotes{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:9px 12px;border:1px solid #d0d5dd;border-radius:8px;background:#fff;color:#0f766e;font-weight:800;cursor:pointer}.client-open-quotes:hover{background:#eef6f5}.client-no-quotes{padding-top:2px;color:#667085;font-size:13px}.settings-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}.settings-main,.settings-side{display:grid;gap:16px}.settings-card{background:#fff;border:1px solid #dbe3ef;border-radius:8px;padding:18px}.settings-section-head{display:grid;gap:4px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid #edf1f7}.settings-section-head strong{color:#18212f;font-size:15px}.settings-section-head span{color:#667085;font-size:12px;font-weight:650;line-height:1.35}.settings-grid{display:grid;gap:14px}.settings-grid.two-cols{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-grid.three-cols{grid-template-columns:repeat(3,minmax(0,1fr))}.wide-field{grid-column:1 / -1}.settings-toggles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.settings-save-bar{display:flex;justify-content:flex-end;padding:14px 0 0}.settings-required{display:grid;gap:4px;padding:12px 14px;border:1px solid #fed7aa;border-radius:8px;background:#fff7ed;color:#9a3412}.settings-required strong{font-size:13px}.settings-required span{font-size:12px;font-weight:700;line-height:1.35}label{display:grid;gap:7px;color:#344054;font-size:13px;font-weight:800}.toggle-row{display:flex;align-items:center;gap:10px;min-height:42px;padding:10px 12px;border:1px solid #dbe3ef;border-radius:8px;background:#f8fafc}.toggle-row input{width:18px;min-height:18px;height:18px;padding:0}.toggle-row span{color:#344054;font-size:13px;font-weight:800}.color-control{display:grid;grid-template-columns:54px minmax(0,1fr);gap:10px}.color-control input[type=color]{min-height:40px;padding:3px}.field-note{color:#667085;font-size:12px;font-weight:600;line-height:1.35}input,textarea,select{width:100%;min-height:40px;border:1px solid #cfd8e6;border-radius:8px;padding:9px 11px;color:#18212f;background:#fff}textarea{resize:vertical}.logo-panel{display:grid;gap:12px;position:sticky;top:18px}.logo-preview{display:grid;place-items:center;min-height:170px;border:1px dashed #b8c2d6;border-radius:8px;background:#f8fafc;color:#667085;text-align:center;font-size:13px;font-weight:800}.logo-preview img{max-width:100%;max-height:148px;object-fit:contain}.empty-logo{background:linear-gradient(135deg,#f8fafc,#eef6f5)}.backup-panel{display:grid;gap:10px}.file-button input,.hidden-input{display:none}.modal-backdrop{position:fixed;inset:0;display:grid;place-items:center;padding:22px;background:#1018288c;z-index:20}.modal{width:min(980px,100%);max-height:calc(100vh - 44px);overflow:auto;background:#fff;border-radius:8px;padding:20px;box-shadow:0 24px 80px #10182840}.small-modal{width:min(560px,100%);display:grid;gap:14px}.client-quotes-modal{width:min(860px,100%);display:grid;grid-template-rows:auto auto minmax(0,1fr);overflow:hidden}.client-quotes-modal .modal-head{margin-bottom:12px}.client-quotes-modal .modal-head p{color:#667085;font-size:14px;margin-top:4px}.client-quotes-toolbar{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border:1px solid #dbe3ef;border-radius:8px;background:#f8fafc;color:#667085;margin-bottom:12px}.client-quotes-toolbar input{width:100%;border:0;outline:0;background:transparent;color:#18212f;font:inherit}.client-modal-list{display:grid;gap:8px;overflow:auto;padding-right:4px}.client-modal-quote{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(110px,auto) auto;gap:12px;align-items:center;padding:12px;border:1px solid #edf1f7;border-radius:8px;background:#fff}.client-modal-quote:has(.client-linked-remits){grid-template-columns:minmax(0,1fr) auto minmax(110px,auto) auto}.client-modal-quote>div:first-child{display:grid;gap:4px;min-width:0}.client-modal-quote strong{color:#18212f}.client-modal-quote span{color:#667085;font-size:13px}.client-modal-total{text-align:right;color:#0f766e!important}.client-linked-remits{grid-column:1 / -1;display:grid;gap:8px;padding:10px;border:1px solid #dbe3ef;border-radius:8px;background:#f8fafc}.client-linked-remits>span{color:#667085;font-size:12px;font-weight:850}.client-linked-remit{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center}.client-linked-remit>div:first-child{display:grid;gap:2px}.client-linked-remit small{color:#667085;font-size:12px}.pdf-backdrop{padding:14px}.pdf-modal{width:min(1180px,100%);height:calc(100vh - 28px);display:grid;grid-template-rows:auto minmax(0,1fr);padding:16px;overflow:hidden}.modal-head,.modal-foot{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:18px}.modal-foot{margin:18px 0 0}.quote-modal .modal-foot{flex-wrap:wrap}.pdf-head{margin-bottom:12px}.pdf-head p{color:#667085;font-size:14px;margin-top:4px}.preview-actions{display:flex;align-items:center;gap:8px}.pdf-preview-scroll{min-height:0;overflow:auto;display:grid;justify-items:center;padding:24px;border:1px solid #d0d5dd;border-radius:8px;background:#e9eef5}.pdf-sheet-frame{width:794px;min-height:1123px}.pdf-sheet{position:relative;overflow:hidden;width:794px;min-height:1123px;padding:62px;background:#fff;color:#071426;box-shadow:0 12px 30px #10182829}.sheet-watermark{position:absolute;top:350px;left:50%;width:330px;max-height:230px;object-fit:contain;opacity:.06;transform:translate(-50%);pointer-events:none}.sheet-header{position:relative;z-index:1;display:grid;grid-template-columns:140px minmax(0,1fr) 170px;gap:22px;align-items:start;padding-bottom:22px;border-bottom:1px solid #cfd8e6}.logo-pos-right .sheet-header{grid-template-columns:170px minmax(0,1fr) 140px}.logo-pos-right .sheet-logo{grid-column:3;grid-row:1;justify-items:end}.logo-pos-right .sheet-company{grid-column:2;grid-row:1}.logo-pos-right .sheet-number{grid-column:1;grid-row:1;text-align:left}.logo-pos-center .sheet-header{grid-template-columns:170px minmax(0,1fr) 170px;gap:18px 22px}.logo-pos-center .sheet-logo{grid-column:2;grid-row:1;justify-items:center;width:100%;min-height:86px}.logo-pos-center .sheet-company{grid-column:1;grid-row:1;text-align:left}.logo-pos-center .sheet-number{grid-column:3;grid-row:1;justify-self:end;text-align:right}.no-logo .sheet-header,.no-logo.logo-pos-center .sheet-header,.no-logo.logo-pos-right .sheet-header{grid-template-columns:minmax(0,1fr) 170px}.no-logo .sheet-company,.no-logo.logo-pos-center .sheet-company,.no-logo.logo-pos-right .sheet-company{grid-column:1;grid-row:1;text-align:left}.no-logo .sheet-number,.no-logo.logo-pos-center .sheet-number,.no-logo.logo-pos-right .sheet-number{grid-column:2;grid-row:1;justify-self:end;text-align:right}.template-logo.logo-pos-center .sheet-logo.logo-medium img{max-width:178px;max-height:104px}.template-logo.logo-pos-center .sheet-logo.logo-large img{max-width:215px;max-height:128px}.sheet-logo{display:grid;align-items:start;justify-items:start;min-height:86px;color:#667085}.sheet-logo img{object-fit:contain}.sheet-logo.logo-small img{max-width:105px;max-height:62px}.sheet-logo.logo-medium img{max-width:140px;max-height:86px}.sheet-logo.logo-large img{max-width:170px;max-height:104px}.sheet-company h3,.sheet-number h3{margin:0 0 8px;font-size:25px;line-height:1.1;color:#071426}.sheet-number-box{display:inline-block;min-width:150px;padding:12px;border:1px solid #d1d5db;border-radius:8px}.sheet-company p,.sheet-number p,.sheet-client p,.sheet-notes p{min-height:0;margin:2px 0;color:#344054;font-size:13px;line-height:1.35}.sheet-number{text-align:right}.sheet-number .status-badge{margin-bottom:8px}.sheet-number h3{font-size:23px;color:var(--brand-color)}.sheet-valid-until{margin-top:14px}.sheet-valid-until strong{display:block;color:#071426;font-size:12px;margin-bottom:2px}.sheet-client{position:relative;z-index:1;padding:18px 0 28px}.sheet-client strong,.sheet-notes strong{display:block;margin-bottom:10px;color:#071426}.sheet-items{position:relative;z-index:1;table-layout:fixed}.sheet-items th,.sheet-items td{white-space:normal;overflow-wrap:anywhere;word-break:break-word}.sheet-items thead th{background:var(--brand-color);color:#fff;border-bottom:0}.sheet-items thead th:first-child{border-top-left-radius:5px}.sheet-items thead th:last-child{border-top-right-radius:5px}.sheet-items th:nth-child(1),.sheet-items td:nth-child(1){width:52%}.sheet-items th:nth-child(n+2),.sheet-items td:nth-child(n+2){text-align:right}.remit-sheet-items th:nth-child(1),.remit-sheet-items td:nth-child(1){width:78%}.receipt-box{display:grid;grid-template-columns:1fr 120px 1fr;gap:14px;margin-top:28px;padding:16px;border:1px solid #d1d5db;border-radius:8px}.receipt-box div{display:grid;gap:12px}.receipt-box strong{color:#071426;font-size:12px}.receipt-box span{color:#344054;font-size:13px;overflow-wrap:anywhere}.sheet-total{position:relative;z-index:1;display:grid;grid-template-columns:auto auto;gap:8px 26px;width:fit-content;min-width:230px;margin-left:auto;margin-top:24px;padding:14px 16px;border:1px solid #d1d5db;border-radius:8px;background:#f8fafc;font-size:13px;font-weight:800}.sheet-total strong{color:var(--brand-color);text-align:right}.sheet-total .summary-total{font-size:18px;font-weight:800}.sheet-notes{position:relative;z-index:1;margin-top:34px;padding:16px;border:0;border-radius:8px;background:#f8fafc}.sheet-notes strong{color:var(--brand-color)}.template-compact .sheet-client{padding-top:14px;padding-bottom:18px}.template-compact .sheet-items th,.template-compact .sheet-items td{padding-top:10px;padding-bottom:10px}.template-modern .sheet-number-box{color:#fff;background:var(--brand-color);border-color:var(--brand-color)}.template-modern .sheet-number-box h3,.template-modern .sheet-number-box p,.template-modern .sheet-number-box strong{color:#fff}.sheet-notes+.sheet-notes{margin-top:20px}.quote-fields{display:grid;grid-template-columns:minmax(220px,1fr) 160px 160px 150px;gap:14px}.quote-modal label{display:grid;gap:7px}.quick-client{display:grid;grid-template-columns:1fr auto;gap:10px;margin:14px 0 18px}.items-editor{display:grid;gap:8px}.item-row{display:grid;grid-template-columns:minmax(180px,1fr) 110px 130px 130px 42px;gap:8px;align-items:center}.remit-fields{grid-template-columns:minmax(220px,1fr) 170px 160px}.remit-item-row{grid-template-columns:minmax(180px,1fr) 120px 42px}.item-row-new{position:relative;border-radius:8px;animation:item-added-pulse 1.35s ease-out}.item-row-new input:first-of-type{border-color:#0f766e;box-shadow:0 0 0 3px #0f766e1f}.item-field{display:block}.item-field>span,.item-field{min-width:0}.item-field{font-size:0}.item-field input{font-size:13px}.item-subtotal{display:grid;gap:4px}.item-subtotal span{display:none;color:#667085;font-size:12px;font-weight:800}.item-head{color:#667085;font-size:12px;font-weight:800;text-transform:uppercase}.item-row strong{text-align:right}.add-line{margin:12px 0 16px}.add-line-done{border-color:#99d5cd;color:#0f766e;background:#ecfdf9}@keyframes item-added-pulse{0%{background:#ecfdf9;box-shadow:0 0 #0f766e33}55%{background:#f4fbf9;box-shadow:0 0 0 6px #0f766e14}to{background:transparent;box-shadow:0 0 #0f766e00}}.quote-extra-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.quote-money-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:14px;margin:0 0 16px}.quote-total{display:grid;gap:4px;min-width:260px;font-size:13px;font-weight:800;text-align:right}.quote-total span{color:#667085}.quote-total strong{font-size:18px;color:#0f766e}.empty{padding:28px;color:#667085;text-align:center}.toast{position:fixed;right:22px;bottom:22px;display:flex;align-items:center;gap:12px;max-width:min(420px,calc(100vw - 44px));padding:12px 14px;background:#101828;color:#fff;border-radius:8px;box-shadow:0 16px 40px #10182840}.toast button{display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:8px;color:#fff;background:#243247}@media(max-width:860px){.app-shell{grid-template-columns:1fr}.sidebar{position:sticky;top:0;z-index:10;padding:14px}.brand{margin-bottom:12px}nav{grid-template-columns:repeat(4,minmax(0,1fr))}nav button{justify-content:center;font-size:13px}.workspace{padding:18px}.topbar,.settings-layout,.toolbar,.quote-fields,.quick-client{grid-template-columns:1fr;display:grid}.logo-panel{position:static}.settings-grid.two-cols,.settings-grid.three-cols,.settings-toggles{grid-template-columns:1fr}.settings-save-bar{position:sticky;bottom:0;z-index:3;justify-content:stretch;padding:12px 0 0;background:linear-gradient(to top,#f4f7fb 70%,#f4f7fb00)}.settings-save-bar .primary,.backup-panel .secondary,.file-button,.logo-panel .secondary{width:100%;justify-content:center}.pdf-modal{height:calc(100vh - 16px);padding:12px}.pdf-head,.topbar-actions,.support-panel,.load-more,.preview-actions,.quote-extra-fields,.quote-money-fields{align-items:stretch;display:grid;grid-template-columns:1fr}.pdf-preview-scroll{--pdf-preview-scale: min(1, calc((100vw - 78px) / 794));justify-items:start;align-items:start;padding:10px}.pdf-sheet-frame{width:calc(794px * var(--pdf-preview-scale));min-height:calc(1123px * var(--pdf-preview-scale))}.pdf-sheet{transform:scale(var(--pdf-preview-scale));transform-origin:top left}.item-row{grid-template-columns:1fr 88px 100px}.client-modal-quote,.client-linked-remit{grid-template-columns:1fr;align-items:stretch}.client-quote-actions{justify-content:flex-end}.client-modal-total{text-align:left}.remit-fields,.remit-item-row,.receipt-box{grid-template-columns:1fr}.item-field{display:grid;gap:7px;color:#344054;font-size:13px;font-weight:800}.item-subtotal span{display:block}.item-row strong{text-align:left}.item-row .icon-button,.item-head span:nth-child(4),.item-head span:nth-child(5){display:none}.quote-modal .modal-foot{display:grid;grid-template-columns:1fr;align-items:stretch}.quote-total{min-width:0;text-align:left}.quote-modal .modal-foot .primary{width:100%;justify-content:center}}@media(max-width:560px){h1{font-size:24px}.modal-backdrop{align-items:stretch;padding:8px}.quote-modal{width:100%;max-height:calc(100vh - 16px);padding:14px}.quote-modal .modal-head{position:sticky;top:-14px;z-index:2;align-items:start;padding:4px 0 12px;margin-bottom:12px;background:#fff;border-bottom:1px solid #edf1f7}.quote-modal .modal-head h2{font-size:20px;line-height:1.2}.quote-fields,.quote-money-fields,.quote-extra-fields{gap:12px}.quote-modal label{gap:6px;color:#18212f;font-size:13px;font-weight:850}.quote-modal input,.quote-modal textarea,.quote-modal select{min-height:46px;font-size:15px}.quote-extra-fields textarea{min-height:112px}.field-note{font-size:12px;line-height:1.35}.quick-client{gap:8px;margin:12px 0 18px;padding:12px;border:1px solid #edf1f7;border-radius:8px;background:#f8fafc}.quick-client .secondary,.add-line{width:100%;justify-content:center}nav button{padding:9px 6px}.table-wrap{overflow:visible;border:0;background:transparent}.table-wrap table,.table-wrap thead,.table-wrap tbody,.table-wrap tr,.table-wrap td{display:block;width:100%}.table-wrap thead{display:none}.table-wrap tbody{display:grid;gap:12px}.table-wrap tr{padding:12px;border:1px solid #dbe3ef;border-radius:8px;background:#fff}.table-wrap td{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:38px;padding:7px 2px;border-bottom:0;text-align:right;white-space:normal}.table-wrap td:before{content:attr(data-label);color:#667085;font-size:12px;font-weight:800;text-align:left}.table-wrap td.empty{display:block;padding:24px;text-align:center}.table-wrap td.empty:before{display:none}.table-wrap .actions{width:100%;justify-content:flex-end;text-align:right}.item-row{grid-template-columns:1fr;gap:10px;padding:12px;border:1px solid #edf1f7;border-radius:8px;background:#fff}.item-head{display:none}.item-field{gap:6px}.item-subtotal{padding:10px 12px;border-radius:8px;background:#f8fafc}.item-row .icon-button{display:inline-flex;align-items:center;gap:8px;width:100%;justify-content:center;margin:0}.item-row .icon-button:after{content:"Quitar item";font-size:13px;font-weight:800}.quote-modal .modal-foot{position:sticky;bottom:-14px;z-index:2;gap:12px;padding:12px 0 4px;background:#fff;border-top:1px solid #edf1f7}.quote-total{gap:6px;padding:12px;border:1px solid #dbe3ef;border-radius:8px;background:#f8fafc}.quote-total strong{font-size:20px}}

/* Mobile usability hardening */
@media (max-width: 860px) {
  body {
    overflow-x: hidden;
  }

  .app-shell,
  .workspace,
  .modal,
  .client-card,
  .settings-card,
  .toolbar,
  .support-panel {
    max-width: 100%;
  }

  .primary,
  .secondary,
  .file-button,
  .icon-button,
  nav button,
  input,
  textarea,
  select,
  .client-open-quotes {
    min-height: 44px;
  }

  .sidebar {
    box-shadow: 0 10px 30px rgba(16, 24, 40, .16);
  }

  .modal,
  .quote-modal,
  .client-quotes-modal,
  .small-modal {
    max-height: calc(100dvh - 16px);
  }

  .client-card,
  .settings-card,
  .toolbar,
  .support-panel,
  .table-wrap tr {
    border-radius: 12px;
  }

  .support-panel code {
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    max-width: none;
  }
}

@media (max-width: 860px) {
  .pdf-preview-scroll {
    --pdf-preview-scale: min(1, calc((100vw - 78px) / 794px));
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 14px 12px 18px;
  }

  .topbar {
    gap: 14px;
    margin-bottom: 16px;
  }

  .topbar-actions .primary,
  .topbar-actions .secondary,
  .modal-foot .primary,
  .modal-foot .secondary,
  .preview-actions .primary,
  .preview-actions .secondary {
    width: 100%;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }

  .modal-backdrop {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .modal,
  .small-modal,
  .client-quotes-modal {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
  }

  .modal-head,
  .modal-foot {
    gap: 10px;
  }

  .client-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .client-card {
    padding: 14px;
  }

  .client-card-head,
  .client-quote-summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .client-card-head > div:first-child,
  .client-card h3,
  .client-card p,
  .client-quote-summary span,
  .client-quote-summary strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .card-actions,
  .client-quote-actions {
    display: flex;
    justify-content: flex-end;
  }

  .icon-button {
    width: 42px;
    height: 42px;
    margin-left: 4px;
  }

  .table-wrap .actions .icon-button {
    width: 44px;
    height: 44px;
  }

  .pdf-backdrop {
    padding: 8px;
  }

  .pdf-modal {
    height: calc(100dvh - 16px);
    border-radius: 14px;
  }

  .pdf-preview-scroll {
    max-width: 100%;
    overflow: auto;
  }
}

@media (max-width: 420px) {
  .sidebar {
    padding: 10px 10px 12px;
  }

  .brand {
    margin-bottom: 8px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand span {
    display: none;
  }

  nav {
    display: flex;
    gap: 8px;
    margin: 0 -2px;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav button {
    flex: 0 0 auto;
    min-width: 112px;
    padding-inline: 10px;
    white-space: nowrap;
  }

  h1 {
    font-size: 22px;
  }

  .support-panel,
  .toolbar,
  .settings-card,
  .client-card,
  .table-wrap tr,
  .quote-total,
  .quick-client,
  .item-row {
    padding-inline: 12px;
  }

  .status-badge {
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .app-shell,
  .sidebar,
  nav {
    min-width: 0;
  }

  .sidebar {
    width: 100%;
    overflow: hidden;
  }

  nav {
    max-width: 100%;
  }

  nav button {
    width: auto;
  }
}

/* Mobile UX finishing pass */
@media (max-width: 560px) {
  nav {
    position: relative;
  }

  nav::after {
    content: "Desliza para ver mas";
    position: absolute;
    right: 2px;
    bottom: -22px;
    z-index: 1;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(16, 24, 40, .92);
    color: #bffaf2;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    pointer-events: none;
  }

  nav button.active {
    box-shadow: inset 0 -2px 0 #2dd4bf;
  }

  .actions {
    display: grid;
    gap: 8px;
    justify-items: end;
  }

  .actions .icon-button,
  .client-quote-actions .icon-button {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    padding: 0 12px;
    gap: 10px;
    margin: 0;
  }

  .actions .icon-button::after,
  .client-quote-actions .icon-button::after {
    content: attr(title);
    font-size: 12px;
    font-weight: 800;
    color: #344054;
  }

  .modal:not(.quote-modal) .modal-foot,
  .small-modal .modal-foot,
  .client-quotes-modal .modal-foot {
    position: sticky;
    bottom: -14px;
    z-index: 2;
    gap: 12px;
    padding: 12px 0 4px;
    background: #fff;
    border-top: 1px solid #edf1f7;
  }

  .modal-foot .primary,
  .modal-foot .secondary {
    width: 100%;
    justify-content: center;
  }

  .empty {
    border: 1px dashed #b8c2d6;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc, #eef6f5);
    color: #475569;
    font-weight: 700;
  }

  .toast {
    border: 1px solid #30445d;
    border-radius: 12px;
    padding: 12px 12px;
    backdrop-filter: blur(4px);
    animation: toast-in .22s ease-out;
  }

  .toast span {
    line-height: 1.35;
    font-size: 13px;
    font-weight: 700;
  }

  .toast::before {
    content: "Aviso";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 24px;
    margin-right: 8px;
    padding: 0 8px;
    border-radius: 999px;
    background: #243247;
    color: #d6deeb;
    font-size: 11px;
    font-weight: 800;
  }
}

@media (max-width: 430px) {
  nav::after {
    display: none;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Global visual refresh */
:root {
  --page-bg: #f3f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbfd;
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe5ee;
  --line-soft: #edf3f7;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --brand-soft: #dff8f3;
  --sky-soft: #eaf6ff;
  --amber-soft: #fff7e6;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-md: 0 14px 36px rgba(15, 23, 42, .09);
  --shadow-lg: 0 26px 70px rgba(15, 23, 42, .18);
}

html {
  background: var(--page-bg);
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(234, 246, 255, .78), rgba(243, 247, 251, 0) 320px),
    linear-gradient(90deg, rgba(223, 248, 243, .46), rgba(255, 247, 230, .36) 78%, rgba(243, 247, 251, 0)),
    var(--page-bg);
}

::selection {
  background: rgba(15, 118, 110, .18);
}

.sidebar {
  background: linear-gradient(180deg, #102033 0%, #121827 58%, #171827 100%);
  border-right: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 12px 0 36px rgba(15, 23, 42, .10);
}

.brand {
  padding: 2px 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark {
  background: linear-gradient(135deg, #34d399, #22d3ee);
  box-shadow: 0 10px 24px rgba(45, 212, 191, .26);
}

.brand strong {
  color: #ffffff;
  font-size: 16px;
}

nav {
  gap: 10px;
}

nav button {
  border: 1px solid transparent;
  color: #d7e2ef;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, color .16s ease;
}

nav button:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .08);
  transform: translateX(2px);
}

nav button.active {
  background: rgba(45, 212, 191, .15);
  border-color: rgba(45, 212, 191, .28);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #2dd4bf;
}

.workspace {
  padding: 34px clamp(24px, 4vw, 48px);
}

.topbar {
  align-items: flex-start;
}

h1 {
  color: #0f172a;
  font-weight: 850;
}

.topbar p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.45;
}

.primary,
.secondary,
.file-button,
.client-open-quotes {
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

.primary {
  background: linear-gradient(180deg, #12877e, #0f766e);
  border-color: #0f766e;
}

.primary:hover {
  background: linear-gradient(180deg, #147f78, #115e59);
  box-shadow: 0 12px 28px rgba(15, 118, 110, .20);
  transform: translateY(-1px);
}

.secondary,
.file-button {
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  border-color: var(--line);
}

.secondary:hover,
.file-button:hover,
.client-open-quotes:hover {
  border-color: rgba(15, 118, 110, .28);
  color: var(--brand-strong);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.support-panel,
.toolbar,
.table-wrap,
.client-card,
.settings-card,
.logo-preview,
.client-quotes-toolbar,
.client-modal-quote,
.client-linked-remits,
.sheet-total,
.sheet-notes,
.quick-client,
.quote-total,
.item-row,
.receipt-box {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.support-panel {
  background: linear-gradient(135deg, #ffffff, var(--sky-soft));
  border-color: #bfdef2;
}

.support-panel strong {
  color: #0f172a;
}

.support-panel code {
  border: 1px solid #d7edf8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.toolbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
}

input,
textarea,
select {
  border-color: var(--line);
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #b8c7d6;
}

input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: rgba(15, 118, 110, .58);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .12);
}

.table-wrap,
.settings-card,
.client-card,
.modal {
  background: rgba(255, 255, 255, .96);
}

th {
  color: #4b5563;
  background: #f8fbfd;
}

tbody tr {
  transition: background .14s ease;
}

tbody tr:hover {
  background: #fbfdfd;
}

.table-wrap td.empty {
  color: var(--muted);
  font-weight: 650;
}

.status-badge {
  border: 1px solid rgba(15, 23, 42, .06);
}

.status-draft {
  color: #475569;
  background: #eef3f7;
}

.status-sent {
  color: #075985;
  background: #e6f6ff;
}

.status-accepted,
.status-delivered {
  color: #047857;
  background: #dcfce7;
}

.status-rejected,
.status-cancelled {
  color: #b42318;
  background: #ffe4e6;
}

.status-expired {
  color: #92400e;
  background: var(--amber-soft);
}

.icon-button {
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  border-color: var(--line);
  transition: transform .14s ease, border-color .14s ease, background .14s ease, color .14s ease;
}

.icon-button:hover {
  background: var(--brand-soft);
  border-color: rgba(15, 118, 110, .28);
  transform: translateY(-1px);
}

.client-card {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.client-card:hover {
  border-color: rgba(15, 118, 110, .24);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.client-quote-summary,
.client-linked-remits,
.toggle-row,
.sheet-notes,
.quote-total,
.quick-client,
.item-subtotal {
  background: linear-gradient(180deg, #fbfdff, #f6faf9);
}

.settings-section-head strong {
  color: #0f172a;
}

.settings-section-head span,
.field-note,
label {
  color: var(--muted);
}

label {
  font-weight: 750;
}

.logo-preview {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .84), rgba(248, 251, 253, .92)),
    repeating-linear-gradient(45deg, rgba(15, 118, 110, .06) 0 8px, transparent 8px 16px);
  border-color: #b7c9d8;
}

.modal-backdrop {
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(7px);
}

.modal {
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: var(--shadow-lg);
}

.modal-head h2 {
  color: #0f172a;
}

.pdf-preview-scroll {
  background:
    linear-gradient(180deg, #e8eef4, #dfe8ef);
  border-color: #c9d5df;
}

.pdf-sheet {
  box-shadow: 0 22px 54px rgba(15, 23, 42, .18);
}

.toast {
  background: linear-gradient(180deg, #132236, #111827);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .24);
}

@media (max-width: 860px) {
  .workspace {
    padding: 20px 18px 24px;
  }

  nav button:hover {
    transform: none;
  }

  nav button.active {
    box-shadow: inset 0 -3px 0 #2dd4bf;
  }

  .topbar {
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  body {
    background:
      linear-gradient(180deg, rgba(234, 246, 255, .9), rgba(243, 247, 251, 0) 240px),
      var(--page-bg);
  }

  .workspace {
    padding: 16px 12px 20px;
  }

  .support-panel,
  .toolbar,
  .settings-card,
  .client-card,
  .table-wrap tr,
  .quick-client,
  .item-row,
  .quote-total {
    box-shadow: var(--shadow-sm);
  }

  .primary:hover,
  .secondary:hover,
  .file-button:hover,
  .client-open-quotes:hover,
  .client-card:hover,
  .icon-button:hover {
    transform: none;
  }

  .modal,
  .small-modal,
  .client-quotes-modal,
  .pdf-modal {
    border-radius: 16px;
  }
}

/* Feature additions */
.actions {
  width: 270px;
}

.actions .quick-preview-button,
.actions .whatsapp-quote-button,
.actions .duplicate-quote-button {
  display: inline-flex;
  width: auto;
  min-width: 38px;
  padding: 0 10px;
  gap: 7px;
}

.enhancement-action-label {
  display: none;
  color: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.quick-preview-button .enhancement-action-label,
.whatsapp-quote-button .enhancement-action-label,
.duplicate-quote-button .enhancement-action-label {
  display: inline;
}

.whatsapp-quote-button {
  border-color: rgba(22, 163, 74, .28);
  color: #15803d;
  background: linear-gradient(180deg, #f4fff8, #e8f8ee);
}

.whatsapp-quote-button:hover {
  border-color: rgba(22, 163, 74, .42);
  color: #166534;
  background: #dcfce7;
}

.duplicate-quote-button {
  border-color: rgba(14, 116, 144, .24);
  color: #0e7490;
  background: linear-gradient(180deg, #f6feff, #e8f7fb);
}

.duplicate-quote-button:hover {
  border-color: rgba(14, 116, 144, .42);
  color: #155e75;
  background: #cffafe;
}

.wa-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.duplicate-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #0891b2;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.setup-guide {
  background:
    linear-gradient(135deg, rgba(223, 248, 243, .8), rgba(255, 255, 255, .96) 42%),
    #fff;
}

.setup-guide-head {
  align-items: start;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.setup-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  color: #0f172a;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.setup-step:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, .28);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.setup-step strong,
.setup-step small {
  display: block;
}

.setup-step strong {
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.25;
}

.setup-step small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.setup-check {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 900;
}

.setup-step.is-done {
  border-color: rgba(22, 163, 74, .26);
  background: linear-gradient(180deg, #ffffff, #f0fdf4);
}

.setup-step.is-done .setup-check {
  background: #16a34a;
  color: #fff;
}

@media (max-width: 980px) {
  .setup-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .actions {
    width: 100%;
  }

  .table-wrap td.actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    justify-items: stretch;
    text-align: left;
  }

  .actions .quick-preview-button,
  .actions .whatsapp-quote-button,
  .actions .duplicate-quote-button {
    width: 100%;
    justify-content: flex-start;
  }

  .table-wrap .actions .icon-button,
  .table-wrap .actions .quick-preview-button,
  .table-wrap .actions .whatsapp-quote-button,
  .table-wrap .actions .duplicate-quote-button {
    width: 100%;
    min-height: 42px;
  }

  .actions .quick-preview-button::after,
  .actions .whatsapp-quote-button::after,
  .actions .duplicate-quote-button::after {
    content: "";
  }

  .setup-step:hover {
    transform: none;
  }
}

@media (max-width: 560px) {
  .table-wrap tbody {
    gap: 14px;
  }

  .table-wrap tr {
    padding: 0;
    overflow: hidden;
    border-color: rgba(203, 213, 225, .9);
    background:
      linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px;
    border-top: 1px solid #edf3f7;
    text-align: right;
  }

  .table-wrap td:first-child {
    min-height: 56px;
    border-top: 0;
    background: linear-gradient(135deg, #f8fbfd, #eef8f6);
  }

  .table-wrap td:before {
    align-self: center;
    color: #526178;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .table-wrap td > *:not(button),
  .table-wrap td {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .table-wrap td.actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px 14px;
    background: #f8fbfd;
  }

  .table-wrap td.actions:before {
    grid-column: 1 / -1;
  }

  .table-wrap .actions .icon-button,
  .table-wrap .actions .quick-preview-button,
  .table-wrap .actions .whatsapp-quote-button,
  .table-wrap .actions .duplicate-quote-button {
    display: inline-flex;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    padding: 0 10px;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.1;
  }

  .table-wrap .actions button[title="Crear remito desde este presupuesto"] {
    grid-column: 1 / -1;
  }

  .actions .icon-button svg,
  .actions .wa-mark,
  .actions .duplicate-mark {
    flex: 0 0 auto;
  }

  .actions .icon-button::after,
  .client-quote-actions .icon-button::after,
  .actions .enhancement-action-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .actions .quick-preview-button::after,
  .actions .whatsapp-quote-button::after,
  .actions .duplicate-quote-button::after {
    content: "";
    display: none;
  }

  .toast {
    transition: opacity .22s ease, transform .22s ease;
  }

  .toast.is-hiding {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
  }
}

/* Final mobile action-card override */
@media (max-width: 560px) {
  .table-wrap td.actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    padding: 12px 14px 14px !important;
    text-align: left !important;
  }

  .table-wrap td.actions::before {
    content: "Acciones";
    grid-column: 1 / -1;
    display: block;
    margin-bottom: 2px;
    color: #526178;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1.1;
    text-transform: uppercase;
  }

  .table-wrap td.actions > button {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 7px 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    border-radius: 9px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }

  .table-wrap td.actions > button[title="Crear remito desde este presupuesto"] {
    grid-column: 1 / -1 !important;
  }

  .table-wrap td.actions > button svg,
  .table-wrap td.actions > button .wa-mark,
  .table-wrap td.actions > button .duplicate-mark {
    flex: 0 0 auto;
  }

  .table-wrap td.actions > button::after,
  .table-wrap td.actions > button .enhancement-action-label {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.15;
    overflow-wrap: anywhere;
    text-align: left;
    white-space: normal;
  }

  .table-wrap td.actions .quick-preview-button::after,
  .table-wrap td.actions .whatsapp-quote-button::after,
  .table-wrap td.actions .duplicate-quote-button::after {
    content: none !important;
  }
}

.seo-content {
  background: #f8fbfd;
  border-top: 1px solid #dbe5ee;
  color: #111827;
  padding: 44px 18px 56px;
}

.seo-inner {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.seo-kicker {
  margin-bottom: 10px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.seo-content h1 {
  max-width: 760px;
  font-size: 30px;
  line-height: 1.15;
}

.seo-content h2 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.25;
}

.seo-content p {
  max-width: 820px;
  margin-top: 12px;
  color: #475569;
  font-size: 15px;
  line-height: 1.65;
}

.seo-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.seo-trust span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #b7d8d2;
  border-radius: 8px;
  background: #eefaf7;
  color: #0f5f58;
  font-size: 13px;
  font-weight: 850;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.seo-grid article {
  padding: 18px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.seo-grid article p {
  margin-top: 0;
  font-size: 14px;
}

.seo-templates,
.seo-steps {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid #dbe5ee;
}

.seo-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.seo-template-grid a {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  text-decoration: none;
}

.seo-template-grid a:hover {
  border-color: #0f766e;
  box-shadow: 0 10px 24px rgba(15, 118, 110, .1);
}

.seo-template-grid strong {
  font-size: 15px;
}

.seo-template-grid span {
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

.seo-steps ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: seo-step;
}

.seo-steps li {
  position: relative;
  min-height: 118px;
  padding: 42px 15px 15px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

.seo-steps li::before {
  counter-increment: seo-step;
  content: counter(seo-step);
  position: absolute;
  top: 14px;
  left: 15px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.seo-faq {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.seo-faq details {
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fff;
}

.seo-faq summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 850;
}

.seo-faq details p {
  margin: 0;
  padding: 0 16px 16px;
}

.enhancement-toast {
  z-index: 31;
}

.enhancement-toast.is-stacked {
  bottom: 84px;
}

@media (max-width: 760px) {
  .seo-content {
    padding: 34px 14px 44px;
  }

  .seo-content h1 {
    font-size: 24px;
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }

  .seo-template-grid,
  .seo-steps ol {
    grid-template-columns: 1fr;
  }
}

.template-page {
  background: #f8fbfd;
  color: #111827;
}

.template-page main {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 42px 18px 56px;
}

.template-page header {
  display: grid;
  gap: 14px;
  padding-bottom: 26px;
  border-bottom: 1px solid #dbe5ee;
}

.template-page nav a,
.template-cta a {
  color: #0f766e;
  font-weight: 850;
  text-decoration: none;
}

.template-page h1 {
  max-width: 820px;
  font-size: 36px;
  line-height: 1.1;
}

.template-page h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.template-page p,
.template-page li {
  color: #475569;
  font-size: 15px;
  line-height: 1.65;
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 18px;
  margin-top: 26px;
  align-items: start;
}

.template-section,
.template-cta {
  padding: 20px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fff;
}

.template-section + .template-section {
  margin-top: 14px;
}

.template-section ul,
.template-section ol {
  margin: 10px 0 0;
  padding-left: 20px;
}

.template-cta {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
}

.template-cta .primary {
  color: #fff;
  text-decoration: none;
}

@media (max-width: 760px) {
  .template-page main {
    padding: 30px 14px 42px;
  }

  .template-page h1 {
    font-size: 28px;
  }

  .template-layout {
    grid-template-columns: 1fr;
  }

  .template-cta {
    position: static;
  }
}

@media (max-width: 860px) {
  .enhancement-toast.is-stacked {
    bottom: calc(74px + env(safe-area-inset-bottom));
  }
}
