:root {
    --poi-primary: #3f3f97;
    --poi-primary-dark: #29296e;
    --poi-accent: #f3e900;
    --poi-sky: #91d8f6;
    --poi-bg: #f4f7fb;
    --poi-text: #172033;
    --poi-muted: #6b7280;
    --sidebar-width: 268px;
    --sidebar-collapsed-width: 78px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--poi-bg); color: var(--poi-text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { text-decoration: none; }
.app-shell { min-height: 100vh; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: linear-gradient(180deg, #282862 0%, #39398e 58%, #26265f 100%); color: #fff; z-index: 1040; display: flex; flex-direction: column; transition: transform .25s ease; box-shadow: 8px 0 32px rgba(21, 28, 58, .12); }
.brand { min-height: 94px; display: flex; align-items: center; gap: 12px; padding: 17px 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand img { width: 88px; height: 48px; object-fit: contain; filter: drop-shadow(0 4px 7px rgba(0,0,0,.18)); }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-size: 1.05rem; }
.brand small { opacity: .72; margin-top: 3px; }
.sidebar-nav { padding: 14px 12px; overflow-y: auto; }
.nav-section { padding: 19px 13px 8px; color: rgba(255,255,255,.48); text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; font-weight: 700; }
.sidebar-nav .nav-link { color: rgba(255,255,255,.78); display: flex; align-items: center; gap: 13px; padding: 11px 13px; margin: 3px 0; border-radius: 11px; font-weight: 600; transition: .2s ease; }
.sidebar-nav .nav-link i { width: 21px; font-size: 1.05rem; }
.sidebar-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,.09); transform: translateX(2px); }
.sidebar-nav .nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(145,216,246,.27), rgba(255,255,255,.12)); box-shadow: inset 3px 0 0 var(--poi-accent); }
.sidebar-footer { margin-top: auto; padding: 16px 20px; color: rgba(255,255,255,.45); border-top: 1px solid rgba(255,255,255,.08); }
.app-main { min-height: 100vh; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.app-topbar { position: sticky; top: 0; z-index: 1020; min-height: 76px; display: flex; align-items: center; gap: 15px; padding: 12px 26px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid #e8edf5; }
.topbar-title { font-size: 1.35rem; font-weight: 800; color: var(--poi-primary-dark); }
.sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
.user-menu { display: flex; align-items: center; gap: 10px; border: 0; }
.user-menu small { display: block; color: var(--poi-muted); font-size: .72rem; }
.user-avatar { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--poi-primary); color: #fff; font-weight: 800; }
.app-content { flex: 1; padding: 26px; }
.app-footer { padding: 15px 26px 22px; color: var(--poi-muted); font-size: .82rem; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.page-heading h2 { font-weight: 800; color: var(--poi-primary-dark); margin-bottom: 3px; }
.page-heading p { margin: 0; color: var(--poi-muted); }
.content-card { background: #fff; border: 1px solid #e7ecf4; border-radius: 17px; box-shadow: 0 8px 28px rgba(30, 41, 75, .055); }
.content-card .card-header { background: transparent; border-bottom: 1px solid #edf0f5; padding: 18px 20px; }
.content-card .card-body { padding: 20px; }
.btn-primary { --bs-btn-bg: var(--poi-primary); --bs-btn-border-color: var(--poi-primary); --bs-btn-hover-bg: var(--poi-primary-dark); --bs-btn-hover-border-color: var(--poi-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--poi-primary); --bs-btn-border-color: var(--poi-primary); --bs-btn-hover-bg: var(--poi-primary); --bs-btn-hover-border-color: var(--poi-primary); }
.table { --bs-table-color: #263044; }
.table thead th { background: #f7f9fc; color: #596174; border-bottom-width: 1px; font-size: .76rem; text-transform: uppercase; letter-spacing: .055em; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dataTables_wrapper .dt-processing { z-index: 10; border-radius: 12px; border: 1px solid #e3e8f1; box-shadow: 0 7px 22px rgba(0,0,0,.08); }
.form-label { font-weight: 650; color: #3a4356; }
.required::after { content: " *"; color: #dc3545; }
.modal-content { border: 0; border-radius: 18px; box-shadow: 0 20px 70px rgba(16,24,40,.25); }
.modal-header { border-bottom-color: #edf0f5; }
.modal-footer { border-top-color: #edf0f5; }
.global-loader { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; background: rgba(20,28,55,.32); backdrop-filter: blur(2px); }
.global-loader.show { display: flex; }
.loader-card { display: flex; align-items: center; gap: 13px; background: #fff; border-radius: 14px; padding: 17px 22px; box-shadow: 0 18px 55px rgba(0,0,0,.18); font-weight: 700; }
.stat-card { height: 100%; padding: 20px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 115px; height: 115px; border-radius: 50%; right: -34px; top: -42px; background: rgba(63,63,151,.07); }
.stat-icon { width: 47px; height: 47px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; background: rgba(63,63,151,.1); color: var(--poi-primary); font-size: 1.3rem; }
.stat-number { font-size: 2rem; font-weight: 850; color: var(--poi-primary-dark); }
.import-help { background: #f5f8ff; border: 1px dashed #c8d3e7; border-radius: 12px; padding: 13px; color: #566176; }
.permission-group { border: 1px solid #e8ecf3; border-radius: 13px; overflow: hidden; }
.permission-group-title { background: #f7f9fc; padding: 10px 13px; font-weight: 750; }
.permission-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 12px 13px; }
.login-page { min-height: 100vh; background: radial-gradient(circle at 15% 20%, rgba(145,216,246,.48), transparent 38%), linear-gradient(135deg, #f7fbff 0%, #edf2ff 55%, #fffde4 100%); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(100%, 430px); background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.8); border-radius: 22px; padding: 30px; box-shadow: 0 25px 80px rgba(42,42,101,.16); }
.login-logo { width: 220px; max-width: 82%; display: block; margin: 0 auto 22px; }
.login-card h1 { color: var(--poi-primary-dark); font-weight: 850; font-size: 1.65rem; }
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-main { margin-left: 0; }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1035; background: rgba(16,24,40,.45); }
    .sidebar-toggle { display: inline-flex; }
}
@media (max-width: 767.98px) {
    .app-content { padding: 18px 14px; }
    .app-topbar { padding: 10px 14px; }
    .page-heading { flex-direction: column; }
    .page-heading .btn-group-responsive { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .page-heading .btn-group-responsive .btn { width: 100%; }
    .content-card .card-body { padding: 14px; }
    .permission-list { grid-template-columns: 1fr; }
}
.costing-help-icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(63,63,151,.1); color: var(--poi-primary); font-size: 1.2rem; }
.costing-result-box { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 18px; border: 1px solid #dce3f0; border-radius: 14px; background: linear-gradient(135deg,#f8faff,#f5fbff); }
.costing-result-box span { color: var(--poi-muted); font-weight: 650; }
.costing-result-box strong { color: var(--poi-primary-dark); font-size: 1.15rem; }
@media (max-width: 575.98px) { .costing-result-box { align-items: flex-start; flex-direction: column; } }

/* Desktop workflow and searchable lookup controls */
.app-content { padding-top: 20px; }
.content-card.compact-card .card-body { padding: 14px 16px; }
.table-compact > :not(caption) > * > * { padding-top: .48rem; padding-bottom: .48rem; }
.table tbody tr { cursor: default; }
.table tbody tr.table-selected > * { background: #edf3ff !important; box-shadow: inset 0 1px 0 #d8e4ff, inset 0 -1px 0 #d8e4ff; }
.shortcut-hint { display: inline-flex; align-items: center; gap: 4px; color: var(--poi-muted); font-size: .74rem; white-space: nowrap; }
.shortcut-hint kbd { padding: 2px 5px; border: 1px solid #d6dce8; border-bottom-width: 2px; border-radius: 5px; background: #fff; color: #596174; font-family: inherit; font-size: .68rem; box-shadow: none; }
.lookup-field { position: relative; }
.lookup-field .form-control { padding-right: 58px; background-color: #fff; }
.lookup-field .lookup-icon { position: absolute; right: 34px; top: 50%; transform: translateY(-50%); z-index: 4; color: #7a8498; pointer-events: none; }
.lookup-field .lookup-clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); z-index: 5; width: 25px; height: 25px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #7a8498; }
.lookup-field .lookup-clear:hover { background: #eef2f8; color: #263044; }
.lookup-menu { position: absolute; z-index: 1085; left: 0; right: 0; top: calc(100% + 5px); display: none; max-height: 260px; overflow-y: auto; padding: 6px; border: 1px solid #dbe2ee; border-radius: 11px; background: #fff; box-shadow: 0 14px 38px rgba(30,41,75,.16); }
.lookup-menu.show { display: block; }
.lookup-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: #273146; text-align: left; }
.lookup-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lookup-option small { flex: 0 0 auto; color: #7a8498; }
.lookup-option:hover, .lookup-option.active { background: #edf3ff; color: var(--poi-primary-dark); }
.lookup-empty { padding: 12px; color: var(--poi-muted); text-align: center; font-size: .88rem; }
.lookup-field.open .form-control { border-color: #8ba6dc; box-shadow: 0 0 0 .2rem rgba(63,63,151,.11); }
.desktop-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.costing-metric { height: 100%; padding: 13px 15px; border: 1px solid #dfe6f1; border-radius: 12px; background: #f8faff; }
.costing-metric span { display: block; color: var(--poi-muted); font-size: .78rem; font-weight: 650; margin-bottom: 4px; }
.costing-metric strong { color: var(--poi-primary-dark); font-size: 1.08rem; }
.status-current { background: #dff7e8; color: #176a39; }
.status-superseded { background: #eceff4; color: #5e6879; }
.status-cancelled { background: #fde5e7; color: #a12835; }
.form-section-title { margin: 1px 0 10px; color: var(--poi-primary-dark); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.form-section { padding: 14px; border: 1px solid #e6ebf3; border-radius: 13px; background: #fbfcfe; }
.readonly-value { background: #f2f5fa !important; color: #273146; font-weight: 700; }
@media (min-width: 992px) {
    .modal-dialog.modal-xl-desktop { max-width: 1040px; }
    .app-topbar { min-height: 68px; padding-top: 9px; padding-bottom: 9px; }
    .sidebar-nav .nav-link { padding-top: 9px; padding-bottom: 9px; }
    .page-heading { margin-bottom: 16px; }
    .content-card .card-body { padding: 16px; }
}


/* v0.4.0 Base Rate and independent Transport costing */
.cost-panel { padding: 18px; border: 1px solid #dfe6f1; border-radius: 14px; background: linear-gradient(145deg,#fbfcff,#f5f8ff); }
.cost-panel h6 { margin-bottom: 14px; color: var(--poi-primary-dark); font-weight: 750; }
.rate-result { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px; border-radius:14px; background:linear-gradient(135deg,#f6f8ff,#eef8ff); border:1px solid #dbe4f2; }
.rate-result span { color:var(--poi-muted); font-weight:650; }
.rate-result strong { color:var(--poi-primary-dark); font-size:1.25rem; }
@media (max-width:575.98px){.rate-result{align-items:flex-start;flex-direction:column;}}


/* v0.4.1 desktop sidebar and code validation */
.master-code { display:inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.78rem; font-weight:750; color:#343481; background:#f0f1ff; border:1px solid #dddffc; border-radius:6px; padding:3px 6px; white-space:nowrap; }
.code-feedback { min-height: 1.1rem; }
.form-control.is-valid + .code-feedback, .code-feedback.text-success { font-weight:650; }
.cost-summary-group { background:#eef3ff !important; color:var(--poi-primary-dark) !important; text-align:center !important; }
@media (min-width: 992px) {
    .app-sidebar, .app-main, .brand, .sidebar-nav .nav-link { transition: width .24s ease, margin-left .24s ease, padding .24s ease, gap .24s ease; }
    body.sidebar-collapsed .app-sidebar { width: var(--sidebar-collapsed-width); }
    body.sidebar-collapsed .app-main { margin-left: var(--sidebar-collapsed-width); }
    body.sidebar-collapsed .brand { min-height:76px; justify-content:center; padding:12px 8px; }
    body.sidebar-collapsed .brand img { width:58px; height:42px; }
    body.sidebar-collapsed .brand span, body.sidebar-collapsed .sidebar-nav .nav-link span, body.sidebar-collapsed .sidebar-footer { display:none; }
    body.sidebar-collapsed .sidebar-nav { padding-left:8px; padding-right:8px; }
    body.sidebar-collapsed .sidebar-nav .nav-link { justify-content:center; gap:0; padding-left:8px; padding-right:8px; min-height:44px; }
    body.sidebar-collapsed .sidebar-nav .nav-link i { width:auto; font-size:1.18rem; }
    body.sidebar-collapsed .nav-section { height:18px; overflow:hidden; padding:12px 0 0; font-size:0; text-align:center; }
    body.sidebar-collapsed .nav-section::after { content:'•'; color:rgba(255,255,255,.35); font-size:.8rem; }
    body.sidebar-collapsed .sidebar-nav .nav-link:hover { transform:none; }
}
@media (max-width: 991.98px) {
    body.sidebar-collapsed .app-main { margin-left:0; }
}

/* v0.5.0 dynamic Packing Cost worksheet */
.packing-worksheet-card { overflow: hidden; }
.worksheet-empty { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 42px 20px; color: var(--poi-muted); text-align: center; }
.worksheet-empty i { font-size: 2.4rem; color: #919bc2; margin-bottom: 12px; }
.worksheet-empty h3 { color: var(--poi-primary-dark); font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; }
.worksheet-empty p { margin: 0; }
.worksheet-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid #e5eaf2; background: #f8faff; }
.worksheet-summary > div:first-child { display: flex; flex-direction: column; }
.worksheet-summary strong { color: var(--poi-primary-dark); }
.worksheet-summary small { color: var(--poi-muted); }
.worksheet-dirty { color: #b7791f; font-weight: 750; }
.worksheet-dirty i { font-size: .55rem; }
.packing-sheet-wrap { max-height: calc(100vh - 330px); min-height: 260px; overflow: auto; }
.packing-sheet { width: max-content; min-width: 100%; table-layout: fixed; font-size: .82rem; }
.packing-sheet th { position: sticky; top: 0; z-index: 8; background: #eef3ff; color: var(--poi-primary-dark); vertical-align: middle; white-space: nowrap; }
.packing-sheet td { vertical-align: middle; background: #fff; }
.packing-sheet .sheet-row-no { position: sticky; left: 0; z-index: 5; width: 46px; min-width: 46px; text-align: center; background: #f8faff; }
.packing-sheet thead .sheet-row-no { z-index: 12; background: #e9efff; }
.packing-sheet .sheet-sku { position: sticky; left: 46px; z-index: 5; width: 125px; min-width: 125px; background: #fff; }
.packing-sheet thead .sheet-sku { z-index: 12; background: #e9efff; }
.packing-sheet .sheet-product { position: sticky; left: 171px; z-index: 5; width: 255px; min-width: 255px; background: #fff; box-shadow: 4px 0 7px rgba(45,54,83,.06); }
.packing-sheet thead .sheet-product { z-index: 12; background: #e9efff; }
.packing-sheet .sheet-product strong { display: block; color: #273146; }
.packing-sheet .sheet-product small { display: block; color: var(--poi-muted); margin-top: 2px; }
.packing-sheet .component-head { width: 150px; min-width: 150px; text-align: center; }
.packing-sheet .component-head span, .packing-sheet .component-head small { display: block; }
.packing-sheet .component-head small { color: #747e9b; font-size: .68rem; margin-top: 2px; }
.packing-sheet .component-cell { width: 150px; min-width: 150px; padding: 5px; }
.packing-sheet .component-amount { min-width: 135px; text-align: right; font-variant-numeric: tabular-nums; }
.packing-sheet .component-amount:focus { border-color: #5669c9; box-shadow: inset 0 0 0 1px #5669c9, 0 0 0 .15rem rgba(63,63,151,.12); }
.packing-sheet .sheet-total { width: 150px; min-width: 150px; text-align: right; font-weight: 800; background: #f2f8ff; color: var(--poi-primary-dark); }
.packing-sheet thead .sheet-total { z-index: 8; background: #dfe9ff; }
.worksheet-help { padding: 10px 16px; border-top: 1px solid #e5eaf2; color: var(--poi-muted); font-size: .78rem; background: #fbfcfe; }
@media (max-width: 767.98px) {
    .worksheet-summary { align-items: flex-start; flex-direction: column; }
    .packing-sheet-wrap { max-height: 60vh; }
}

/* v0.6.0 dynamic Miscellaneous Cost worksheet */
.miscellaneous-sheet .misc-rate-row th { top: 0; height: 54px; background: #fff7dc; z-index: 10; }
.miscellaneous-sheet thead tr:nth-child(2) th { top: 54px; background: #eef3ff; z-index: 9; }
.miscellaneous-sheet .misc-rate-row .sheet-row-no,
.miscellaneous-sheet .misc-rate-row .sheet-sku,
.miscellaneous-sheet .misc-rate-row .sheet-product { z-index: 14; background: #fff2bf; }
.miscellaneous-sheet .misc-rate-row .sheet-total { z-index: 12; background: #ffe8a3; }
.miscellaneous-sheet .misc-value-head { padding: 7px; }
.miscellaneous-sheet .misc-rate-input { min-width: 120px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; background: #fffdf5; }
.miscellaneous-sheet .misc-rate-input:focus { border-color: #d7a514; box-shadow: inset 0 0 0 1px #d7a514, 0 0 0 .15rem rgba(215,165,20,.15); }
.miscellaneous-sheet .misc-calculated { min-width: 150px; text-align: right; font-variant-numeric: tabular-nums; background: #fff; }
.miscellaneous-sheet tbody tr:hover .misc-calculated { background: #f8faff; }

/* v0.7 Quick Price and margin hierarchy */
.quick-price-shell{overflow:hidden}.quick-price-tabs-wrap{overflow-x:auto}.quick-price-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;align-items:start}.quick-price-column{border:1px solid #dfe5f2;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 4px 18px rgba(36,42,92,.05)}.quick-price-column-head{display:flex;justify-content:space-between;gap:12px;padding:12px 14px;background:linear-gradient(135deg,#f6f8ff,#eef2ff);border-bottom:1px solid #dfe5f2}.quick-price-column-head h3{font-size:1rem;margin:0;color:#292d78}.quick-price-column-head small{display:block;color:#6c748c;margin-top:2px}.quick-rate-entry{padding:10px 14px;background:#fffdf0;border-bottom:1px solid #efe7bd}.quick-rate-entry label{font-size:.76rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#6d6232}.quick-rate-entry small{display:block;color:#6b7280;margin-top:5px}.normalised-rate{font-size:.78rem;color:#154c79;font-weight:600;margin-top:3px}.quick-price-column table th{font-size:.72rem;text-transform:uppercase;letter-spacing:.03em;background:#fafbff}.quick-price-column table td{vertical-align:middle}.quick-price-column table td small{display:block;color:#777;font-size:.7rem}.quick-price-value strong{font-size:.96rem;color:#111827}.margin-worksheet .margin-category td{background:#eef2ff}.margin-worksheet .margin-subcategory td{background:#fafbff}.margin-worksheet small{display:block;color:#7b8194}.indent-1{padding-left:18px}.indent-2{padding-left:36px}.margin-input:placeholder-shown{background:#fafafa}@media(max-width:767px){.quick-price-grid{grid-template-columns:1fr}.quick-price-column{min-width:0}}
/* v0.7.0 Excel-style horizontal Quick Price matrix */
.quick-price-shell #quickPriceContent{overflow-x:auto;background:#f7f9fd}.quick-price-grid{display:flex;flex-wrap:nowrap;gap:0;align-items:flex-start;width:max-content;min-width:100%}.quick-price-column{width:252px;min-width:252px;border-radius:0;border-right:0;box-shadow:none}.quick-price-column:first-child{border-radius:12px 0 0 12px}.quick-price-column:last-child{border-right:1px solid #dfe5f2;border-radius:0 12px 12px 0}.quick-price-column-head{min-height:72px}.quick-price-column .table{font-variant-numeric:tabular-nums}.quick-price-column .table tbody tr{height:42px}.quick-price-column .base-amount-input{font-weight:800;background:#fffde7}.quick-price-tabs-wrap{position:sticky;left:0;z-index:2;background:#fff}

/* v0.7.1 Product availability by dynamic Price Class */
.price-class-product-card{
    height:100%;
    padding:.85rem;
    border:1px solid var(--bs-border-color);
    border-radius:.65rem;
    background:var(--bs-body-bg);
}
.price-class-product-card:has(.price-class-active:not(:checked)) .price-class-order{
    opacity:.55;
}

/* v0.7.2 viewport-safe scrollable popups */
.modal { overflow-y: auto; }
.modal-dialog { max-height: calc(100vh - 1.5rem); }
.modal-dialog-scrollable { height: calc(100% - 1.5rem); }
.modal-dialog-scrollable .modal-content { max-height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.modal-dialog-scrollable .modal-content > form { display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
.modal-dialog-scrollable .modal-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
@media (max-width: 575.98px) {
    .modal-dialog { margin: .5rem; max-height: calc(100vh - 1rem); }
    .modal-dialog-scrollable { height: calc(100% - 1rem); }
}

/* v0.7.3 automatic Principal Interest and aligned Quick Price headings */
.quick-price-column-head{
    height:78px;
    min-height:78px;
    max-height:78px;
    align-items:flex-start;
    overflow:hidden;
}
.quick-price-column-head > div{min-width:0;}
.quick-price-column-head h3{
    min-height:38px;
    max-height:38px;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    line-height:1.15;
}
.quick-price-column-head small{
    height:18px;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}
.quick-rate-entry{
    height:145px;
    min-height:145px;
    max-height:145px;
    overflow:hidden;
}
.quick-price-column table thead tr{height:42px;}
.quick-price-column table thead th{height:42px;vertical-align:middle;}
.misc-system-rate{
    min-width:150px;
    padding:4px 6px;
    border:1px solid #e1c971;
    border-radius:.4rem;
    background:#fff9df;
    text-align:right;
    font-variant-numeric:tabular-nums;
}
.misc-system-rate strong{display:block;color:#5f4b00;font-size:.9rem;}
.misc-system-rate small{display:block;color:#806d27;font-size:.64rem;line-height:1.2;white-space:normal;margin-top:2px;}



/* Quick Price share poster */
.poster-canvas-frame{background:linear-gradient(180deg,#f8fafc,#eef2ff);border:1px solid #cbd5e1;border-radius:1rem;padding:1rem;overflow:auto;max-height:72vh}.poster-canvas-frame canvas{display:block;max-width:100%;height:auto;margin:0 auto;border-radius:.75rem;box-shadow:0 12px 30px rgba(15,23,42,.15)}#posterTermsGujarati,#posterFooterGujarati{font-family:"Nirmala UI","Noto Sans Gujarati",sans-serif;line-height:1.65}.desktop-toolbar{flex-wrap:wrap}

.variant-rules-table-wrap{max-height:58vh;overflow:auto}.variant-rules-table thead th{position:sticky;top:0;z-index:4;background:#f8fafc;white-space:nowrap}.variant-rules-table td{min-width:130px}.variant-rules-table td:nth-child(1){min-width:90px}.variant-rules-table td:nth-child(2){min-width:220px}.variant-rules-table td:nth-child(4){min-width:260px}.variant-rules-table .lookup-menu{min-width:320px}

/* v0.7.9 simple daily navigation and setup centre */
.topbar-context-link{align-items:center;gap:.35rem;color:var(--bs-primary);font-size:.82rem;font-weight:700;text-decoration:none}.topbar-context-link:hover{text-decoration:underline}.home-action-grid a{text-decoration:none}.home-primary-action{min-height:230px;display:flex;align-items:center;gap:1.35rem;padding:2rem;border-radius:1.25rem;color:#fff;background:linear-gradient(135deg,#30308c 0%,#4c55c8 55%,#2ea8d3 100%);box-shadow:0 18px 42px rgba(48,48,140,.22);transition:transform .2s ease,box-shadow .2s ease}.home-primary-action:hover{color:#fff;transform:translateY(-2px);box-shadow:0 22px 48px rgba(48,48,140,.28)}.home-primary-action span:nth-child(2){display:flex;flex-direction:column;gap:.35rem}.home-primary-action small{font-weight:800;letter-spacing:.08em;text-transform:uppercase;opacity:.8}.home-primary-action strong{font-size:clamp(1.55rem,2.5vw,2.35rem);line-height:1.08}.home-primary-action em{font-style:normal;max-width:680px;opacity:.88}.home-action-icon{width:76px;height:76px;flex:0 0 76px;border-radius:22px;display:grid;place-items:center;background:rgba(255,255,255,.16);font-size:2rem}.home-action-arrow{margin-left:auto;font-size:2.15rem;opacity:.82}.home-secondary-action{min-height:70px;height:100%;display:flex;align-items:center;gap:1rem;padding:1rem 1.15rem;border:1px solid #e1e6ef;border-radius:1rem;background:#fff;color:#1f2937;box-shadow:0 8px 22px rgba(28,39,64,.06);transition:.2s ease}.home-secondary-action:hover{color:var(--bs-primary);border-color:#c7d2fe;transform:translateY(-1px)}.home-secondary-action>i:first-child{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#eef2ff;color:#3f51b5;font-size:1.15rem}.home-secondary-action span{display:flex;flex-direction:column}.home-secondary-action small{color:#6b7280}.frequency-guide-card{height:100%;min-height:142px;border:1px solid #e5e7eb;border-radius:1rem;padding:1rem;display:flex;flex-direction:column;gap:.32rem;background:#fff}.frequency-guide-card span{width:max-content;border-radius:999px;padding:.25rem .65rem;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em}.frequency-guide-card strong{font-size:1.02rem}.frequency-guide-card small{color:#6b7280}.frequency-guide-card.daily span{background:#dcfce7;color:#166534}.frequency-guide-card.weekly span{background:#dbeafe;color:#1e40af}.frequency-guide-card.monthly span{background:#fef3c7;color:#92400e}.frequency-guide-card.quarterly span{background:#f3e8ff;color:#6b21a8}.setup-frequency-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}.setup-frequency-strip>div{display:grid;grid-template-columns:auto 1fr;column-gap:.65rem;align-items:center;padding:.85rem 1rem;background:#fff;border:1px solid #e5e7eb;border-radius:.9rem;box-shadow:0 6px 18px rgba(28,39,64,.04)}.setup-frequency-strip strong,.setup-frequency-strip small{grid-column:2}.setup-frequency-strip small{color:#6b7280}.frequency-dot{grid-row:1/3;width:12px;height:12px;border-radius:50%;box-shadow:0 0 0 5px currentColor;opacity:.75}.frequency-dot.daily{color:#22c55e}.frequency-dot.weekly{color:#3b82f6}.frequency-dot.monthly{color:#f59e0b}.frequency-dot.quarterly{color:#a855f7}.setup-group-card{overflow:hidden}.setup-group-icon{width:48px;height:48px;flex:0 0 48px;border-radius:14px;display:grid;place-items:center;font-size:1.25rem}.setup-link-list{display:flex;flex-direction:column;border-top:1px solid #edf0f5}.setup-link-list a{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem .2rem;color:#263244;text-decoration:none;border-bottom:1px solid #edf0f5;font-weight:650}.setup-link-list a span{display:flex;align-items:center;gap:.7rem}.setup-link-list a span i{width:24px;color:#5b62a8}.setup-link-list a:hover{color:var(--bs-primary);padding-left:.35rem}.future-setup-card{border-style:dashed}.future-setup-block{height:100%;min-height:150px;border:1px dashed #cbd5e1;border-radius:1rem;padding:1rem;background:#f8fafc;display:flex;flex-direction:column;gap:.45rem}.future-setup-block>i{font-size:1.35rem;color:#5b62a8}.future-setup-block span{color:#64748b;font-size:.9rem}.desktop-toolbar>.dropdown{display:inline-flex}
@media(max-width:991.98px){.setup-frequency-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.home-primary-action{min-height:190px}.home-action-icon{width:60px;height:60px;flex-basis:60px}.home-action-arrow{display:none}}
@media(max-width:575.98px){.setup-frequency-strip{grid-template-columns:1fr}.home-primary-action{padding:1.25rem;align-items:flex-start}.home-action-icon{width:48px;height:48px;flex-basis:48px;border-radius:14px;font-size:1.35rem}.home-primary-action strong{font-size:1.35rem}.desktop-toolbar{width:100%}.desktop-toolbar .btn,.desktop-toolbar .dropdown{flex:1}.desktop-toolbar .dropdown .btn{width:100%}}

.poster-setting-section{height:100%;border:1px solid #d7dee8;border-radius:.85rem;padding:1rem}.poster-setting-section .form-label{font-weight:700}.poster-setting-red{background:#fff1f2;border-color:#fecaca}.poster-setting-yellow{background:#fffbeb;border-color:#fde68a}.poster-setting-green{background:#f0fdf4;border-color:#bbf7d0}.poster-setting-white{background:#f8fafc;border-color:#cbd5e1}.poster-row-settings-wrap{max-height:390px;border-radius:.75rem}.poster-row-settings-wrap thead th{position:sticky;top:0;z-index:2;background:#f1f5f9}.poster-row-settings-wrap input{min-width:130px}

.poster-banner-spec-card{display:flex;align-items:flex-start;gap:.9rem;height:100%;padding:1rem;border:1px solid #dbe3ef;border-radius:1rem;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.05)}.poster-banner-spec-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:.8rem;background:#eef2ff;color:#3730a3;font-size:1.2rem;flex:0 0 auto}.poster-banner-spec-card strong,.poster-banner-spec-card span,.poster-banner-spec-card small{display:block}.poster-banner-spec-card span{font-weight:700;color:#0f172a}.poster-banner-spec-card small{margin-top:.2rem;color:#64748b;line-height:1.35}.poster-banner-card{height:100%;overflow:hidden;border:1px solid #dbe3ef;border-radius:1rem;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.06)}.poster-banner-thumb{position:relative;aspect-ratio:2.25/1;background:#e2e8f0;overflow:hidden}.poster-banner-thumb img{width:100%;height:100%;object-fit:cover;display:block}.poster-banner-thumb .badge{position:absolute;top:.7rem;right:.7rem}.poster-banner-card-body{padding:1rem}.poster-banner-card-body strong,.poster-banner-card-body small{display:block}.poster-banner-card-body small{color:#64748b;margin-top:.15rem}.poster-banner-meta{display:flex;justify-content:space-between;gap:.5rem;margin-top:.75rem;padding-top:.65rem;border-top:1px solid #edf1f6;color:#475569;font-size:.8rem}.poster-banner-upload-preview{overflow:hidden;border:1px solid #cbd5e1;border-radius:.9rem;background:#f8fafc}.poster-banner-upload-preview img{display:block;width:100%;max-height:360px;object-fit:contain}.poster-banner-grid .empty-state{border:1px dashed #cbd5e1;border-radius:1rem;background:#f8fafc}
