.company-general-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:24px;align-items:start}.company-details-fields{align-content:start}.company-logo-section{display:flex;flex-direction:column}.company-logo-preview{display:flex;align-items:center;justify-content:center;height:150px;border:2px dashed #cbd7e6;border-radius:12px;background:#f8fafc;overflow:hidden;transition:border-color .2s ease,background .2s ease}.company-logo-preview:hover{border-color:#2454ad;background:#f3f7ff}.company-logo-preview img{width:100%;height:100%;object-fit:contain;padding:10px}.company-logo-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#7d8798}.company-logo-placeholder i{color:#aab5c8;font-size:42px}.company-logo-placeholder span{font-size:.8rem;font-weight:600}.company-logo-upload-button{width:100%;min-height:40px;margin-top:10px;cursor:pointer}.company-logo-field>small{display:block;margin-top:7px;line-height:1.35}.company-module-selection{margin:0}.company-module-selection .module-options{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:900px){.company-general-layout{grid-template-columns:210px minmax(0,1fr)}.company-details-fields{grid-template-columns:1fr}.company-module-selection .module-options{grid-template-columns:1fr 1fr}}@media(max-width:650px){.company-general-layout{grid-template-columns:1fr}.company-logo-field{max-width:320px;width:100%;margin-inline:auto}.company-details-fields{grid-template-columns:1fr 1fr}.company-module-selection .module-options{grid-template-columns:1fr}}@media(max-width:480px){.company-details-fields{grid-template-columns:1fr}}
.company-document-header{display:none}@media print{.company-document-header{display:flex;align-items:flex-start;gap:18px;border-bottom:2px solid #173d91;padding:0 0 14px;margin:0 0 18px}.company-document-header img{width:90px;height:70px;object-fit:contain}.company-document-header h1{margin:0 0 5px;font-size:22px;color:#10265e}.company-document-header p{margin:2px 0;font-size:11px;color:#334155}}
.workspace-settings-card .module-selection{border:1px solid #d6e0f0;border-radius:14px;padding:16px}.workspace-settings-card .module-select-all{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;color:#173d8f;font-size:.85rem;font-weight:700;cursor:pointer}.workspace-settings-card .module-select-all input{width:18px;height:18px;margin:0;accent-color:#0d1e4d}.workspace-settings-card .module-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.workspace-settings-card .module-options label{position:relative;cursor:pointer}.workspace-settings-card .module-options input{position:absolute;opacity:0;pointer-events:none}.workspace-settings-card .module-options span{position:relative;overflow:hidden;display:grid;grid-template-columns:32px 1fr;min-height:72px;padding:12px;border:1px solid #cbd7ec;border-radius:12px;background:#fff;color:#30415f;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease,transform .15s ease}.workspace-settings-card .module-options i{position:relative;z-index:1;grid-row:1/span 2;align-self:center;color:#2454ad;font-size:1.1rem}.workspace-settings-card .module-options strong,.workspace-settings-card .module-options small{position:relative;z-index:1}.workspace-settings-card .module-options strong{font-size:.9rem}.workspace-settings-card .module-options small{color:#76839a;font-size:.75rem}.workspace-settings-card .module-options input:checked+span{border-color:#1e3a8a;background:linear-gradient(180deg,#132c68 0%,#0d1e4d 45%,#07132b 100%);color:#fff;box-shadow:0 8px 18px rgba(7,19,43,.25),inset 0 1px 1px rgba(255,255,255,.12)}.workspace-settings-card .module-options input:checked+span i{color:#82c8ff}.workspace-settings-card .module-options input:checked+span small{color:#c8d8f5}.workspace-settings-card .module-options input:checked+span::after{content:"";position:absolute;inset:0 auto 0 0;width:45%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);transform:translateX(-140%);animation:account-strength-running-glow 2.5s ease-in-out infinite;pointer-events:none}.workspace-settings-card .module-options input:focus-visible+span{outline:2px solid #2464d7;outline-offset:2px}@media(max-width:700px){.workspace-settings-card .module-options{grid-template-columns:1fr}.workspace-settings-card .module-options span{min-height:62px}}
@keyframes account-strength-running-glow{0%{transform:translateX(-140%)}55%,100%{transform:translateX(340%)}}
.bill-designer-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(390px,.82fr);gap:22px;align-items:start}.bill-designer-controls{display:grid;gap:18px}.email-provider-grid.layout-tile-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:18px}.color-input{display:flex;align-items:center;gap:12px;height:34px;min-height:34px;box-sizing:border-box;border:1px solid #ccd6e5;border-radius:8px;padding:0 10px}.color-input input{width:44px;height:24px;padding:0;border:0;background:none;border-radius:6px;cursor:pointer}.color-input input::-webkit-color-swatch-wrapper{padding:0;border-radius:6px}.color-input input::-webkit-color-swatch{border:1px solid #ccd6e5;border-radius:6px}.color-input input::-moz-color-swatch{border:1px solid #ccd6e5;border-radius:6px}.color-input:focus-within{border-color:#173d91}.color-input input.color-hex-input{width:auto;flex:1;height:auto;padding:0;border:0;background:transparent;font:inherit;font-weight:700;color:#172033;text-transform:uppercase;cursor:text}.color-input input.color-hex-input:focus{outline:0}.bill-format-toggles{display:grid;grid-template-columns:1fr 1fr;gap:9px}.bill-format-toggles label{position:relative;display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #d7dfeb;border-radius:9px;font-weight:600;cursor:pointer}.bill-format-toggles input[type=checkbox]{position:absolute;opacity:0}.bill-format-toggles input[type=hidden]{display:none}.bill-format-toggles .toggle-pill{position:relative;display:inline-block;width:38px;min-width:38px;height:21px;box-sizing:border-box;flex:0 0 38px;border-radius:99px;background:#cbd5e1;transition:background .2s}.bill-format-toggles .toggle-pill::after{content:"";position:absolute;top:3px;left:3px;width:15px;height:15px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.24);transition:left .2s}.bill-format-toggles input:checked+.toggle-pill{background:#173d91}.bill-format-toggles input:checked+.toggle-pill::after{left:20px}.bill-preview-wrap{position:sticky;top:20px}.bill-preview-label{display:flex;justify-content:space-between;margin-bottom:8px;color:#5e6d83;font-weight:700}.bill-preview{--bill-accent:#173d91;aspect-ratio:210/297;padding:24px;background:#fff;border:1px solid #d9e0eb;border-radius:5px;box-shadow:0 10px 30px #25365520;color:#243047;font-size:8px}.bill-preview header{display:flex;align-items:flex-start;gap:9px;padding-bottom:10px;border-bottom:3px solid var(--bill-accent)}.bill-preview header.preview-header-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:9px 14px;align-items:start}.preview-company{display:flex;align-items:flex-start;gap:9px;flex:1;min-width:0}.preview-company.logo-center{flex-direction:column;align-items:center;text-align:center}.preview-company.logo-right{flex-direction:row-reverse;text-align:right}.preview-company.align-left{justify-self:start}.preview-company.align-center{justify-self:center;text-align:center}.preview-company.align-right{justify-self:end;text-align:right}#previewTitle.align-left{justify-self:start;text-align:left}#previewTitle.align-center{justify-self:center;text-align:center}#previewTitle.align-right{justify-self:end;text-align:right}.preview-logo{display:grid;place-items:center;flex:0 0 auto;width:44px;height:35px;background:#edf1f7;color:#728097;font-weight:800;font-size:7px;overflow:hidden}.preview-logo img{width:100%;height:100%;object-fit:contain}.preview-logo.logo-small{width:30px;height:24px;font-size:6px}.preview-logo.logo-large{width:60px;height:48px;font-size:8px}.segmented-control{display:flex;flex-wrap:wrap;gap:3px}.segmented-control label{position:relative;flex:0 0 auto;cursor:pointer}.segmented-control input{position:absolute;opacity:0}.segmented-control span{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:44px;height:30px;padding:0 2px;border:1px solid #ccd6e5;border-radius:7px;text-align:center;font-weight:600;font-size:8.5px;color:#425066;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background .15s,border-color .15s,color .15s}.segmented-control input:checked+span{background:#173d91;border-color:#173d91;color:#fff}.segmented-control input:focus-visible+span{outline:2px solid #173d91;outline-offset:2px}.segmented-control .inline-toggle-tile{display:flex;flex:0 0 auto;align-items:center;gap:4px;box-sizing:border-box;height:30px;padding:0 6px;border:1px solid #ccd6e5;border-radius:7px;font-weight:600;font-size:8.5px;color:#425066;white-space:nowrap;cursor:pointer}.inline-toggle-tile .toggle-pill{position:relative;display:inline-block;width:20px;min-width:20px;height:11px;box-sizing:border-box;flex:0 0 20px;border-radius:99px;background:#cbd5e1;transition:background .2s}.inline-toggle-tile .toggle-pill::after{content:"";position:absolute;top:1.5px;left:1.5px;width:8px;height:8px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.24);transition:left .2s}.inline-toggle-tile input:checked+.toggle-pill{background:#173d91}.inline-toggle-tile input:checked+.toggle-pill::after{left:9px}.inline-toggle-tile input:focus-visible+.toggle-pill{outline:2px solid #173d91;outline-offset:2px}.bill-preview header div:nth-child(2){flex:1}.bill-preview h2{margin:0;color:var(--bill-accent);font-size:14px}.bill-preview header p{margin:2px 0}.bill-preview header>strong{color:var(--bill-accent);font-size:12px}.preview-party{display:flex;justify-content:space-between;margin:12px 0;padding:9px;background:#f5f7fa;border-left:3px solid var(--bill-accent)}.preview-party div{display:flex;flex-direction:column;gap:2px}.preview-party p{margin:0}.bill-preview table{width:100%;border-collapse:collapse}.bill-preview th{padding:6px 4px;background:var(--bill-accent);color:#fff;text-align:left}.bill-preview td{padding:7px 4px;border-bottom:1px solid #dce3ed}.preview-total{display:flex;justify-content:flex-end;gap:30px;margin:12px 0 8px;font-size:11px;color:var(--bill-accent)}.preview-terms{min-height:20px;margin-top:10px;white-space:pre-line}.preview-signature{width:100px;margin:28px 0 0 auto;padding-top:5px;border-top:1px solid;text-align:center}.preview-signatures{display:flex;justify-content:space-between;gap:12px;margin-top:28px}.preview-signatures .preview-signature{width:auto;flex:1;margin:0;padding-top:5px;border-top:1px solid;text-align:center}.bill-preview footer{margin-top:13px;padding-top:6px;border-top:1px solid #dce3ed;text-align:center;color:var(--bill-accent);font-weight:700}.bill-preview.layout-classic header{border:2px solid var(--bill-accent);padding:8px}.bill-preview.layout-classic .preview-party{background:#fff;border:1px solid #aeb8ca}.bill-preview.layout-classic th{background:#fff;color:var(--bill-accent);border:1px solid}.bill-preview.layout-classic td{border:1px solid #aeb8ca}.bill-preview.layout-compact{padding:16px;font-size:7px}.bill-preview.layout-compact header{padding-bottom:6px}.bill-preview.layout-compact .preview-party{margin:7px 0;padding:6px}.bill-preview.layout-compact th,.bill-preview.layout-compact td{padding:4px}.bill-preview [hidden]{display:none!important}@media(max-width:1050px){.bill-designer-grid{grid-template-columns:1fr}.bill-preview-wrap{position:static;max-width:600px;width:100%;margin:auto}}@media(max-width:600px){.email-provider-grid.layout-tile-grid,.bill-format-toggles{grid-template-columns:1fr}.bill-preview{padding:14px}}

/* Scale the real A4 document without changing its layout. */
.challan-preview-viewport{position:relative;width:100%;overflow:hidden;background:#fff;box-shadow:0 10px 30px #25365520}
.challan-preview-viewport iframe{display:block;width:210mm;height:297mm;border:0;transform-origin:top left;max-width:none;}

.terms-editor-wrap{border:1px solid #ccd6e5;border-radius:8px;overflow:hidden}.terms-toolbar{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:8px;background:#f5f7fb;border-bottom:1px solid #ccd6e5}.terms-toolbar select{width:auto;max-width:170px}.terms-toolbar button{min-width:32px;min-height:32px;background:white;border:1px solid #ccd6e5;border-radius:4px;cursor:pointer}.terms-toolbar input[type=color]{width:38px;height:32px;padding:2px}#termsEditor{min-height:140px;padding:12px;outline-offset:-2px;font:12pt Arial,sans-serif}.formatted-terms{white-space:pre-wrap;overflow-wrap:anywhere}.formatted-terms p{margin:0}.formatted-terms div{min-height:1em}

.formatted-terms ul{list-style:disc outside}.formatted-terms ol{list-style:decimal outside}.formatted-terms ul,.formatted-terms ol{padding-left:2em;margin:0.5em 0}.formatted-terms li{display:list-item}

.terms-toolbar select[data-terms-command]{width:auto!important;max-width:170px;flex:0 1 auto}.terms-toolbar button[data-terms-command]{width:auto;white-space:nowrap;padding:4px 8px}

.formatted-terms li::marker{font-family:inherit;font-size:1em}


/* Keep the Top switch and the three alignment choices on one equal-height row. */
.title-alignment-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;width:100%;max-width:220px}
.title-alignment-controls>label{min-width:0;width:100%;margin:0}
.title-alignment-controls>label:not(.inline-toggle-tile)>span{width:100%;height:30px}
.title-alignment-controls>.inline-toggle-tile{width:100%;height:30px;justify-content:center;gap:2px;padding:0 2px}
.title-alignment-controls>.inline-toggle-tile>span:last-child{width:auto;height:auto;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;overflow:visible}
.title-alignment-controls .inline-toggle-tile .toggle-pill{width:16px;min-width:16px;flex-basis:16px;height:10px;padding:0;border:0}
.title-alignment-controls .inline-toggle-tile .toggle-pill::after{width:7px;height:7px;top:1.5px;left:1.5px}
/* Black & White Print sits beside Brand Colour instead of its own separate strip above -
   third column only needs to fit the switch, not stretch like the two text fields either
   side of it. */
.bill-brand-color-row{grid-template-columns:1fr 1fr auto}
.bill-brand-color-row .inventory-switch{margin-top:0}
/* Brand Colour becomes non-functional (disabled) once Black & White Print is on - dim the
   whole field, swatch and hex box included, so that's obvious at a glance instead of the two
   controls just quietly stopping responding to clicks. */
.bill-brand-color-row .inventory-field:has(.color-input input:disabled){opacity:.45}
/* Same idea for the Terms and Conditions editor's own font colour picker, disabled by the same
   Black & White Print toggle - the browser's default disabled state for a colour swatch barely
   reads as disabled at all. */
.terms-toolbar input[type=color]:disabled{opacity:.35;cursor:not-allowed}
.title-alignment-controls .inline-toggle-tile input:checked+.toggle-pill::after{left:7.5px}
