:root {
    --ink: #17242b;
    --muted: #687b83;
    --line: #dce7e8;
    --canvas: #f3f7f7;
    --surface: #fff;
    --teal: #087f78;
    --teal-dark: #075c59;
    --blue: #246bb2;
    --violet: #6f55c7;
    --green: #16865c;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 18px 13px; color: #dbeeed; background: #073f3e; }
.brand { display: flex; align-items: center; gap: 10px; padding: 3px 7px 21px; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; background: #16a79d; border-radius: 7px; font-size: 1.1rem; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .92rem; }.brand small { color: #8fc5c2; font-size: .66rem; text-transform: uppercase; }
.sidebar .nav { gap: 4px; padding-top: 18px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 11px; padding: 10px 11px; color: #acd0cd; border-radius: 6px; font-size: .84rem; font-weight: 600; }
.sidebar .nav-link i { width: 20px; font-size: .95rem; text-align: center; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { color: #fff; background: rgba(30,185,172,.18); }
.sidebar .nav-link.active { box-shadow: inset 3px 0 #2dd4bf; }
.sidebar-footer { margin-top: auto; padding: 15px 7px 3px; border-top: 1px solid rgba(255,255,255,.1); font-size: .72rem; }
.sidebar-footer a { display: block; margin-top: 12px; color: #a9cac8; text-decoration: none; }
.online { color: #a9cac8; }.online span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; background: #37d07f; border-radius: 50%; }
.main-column { min-width: 0; }
.topbar { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 1px 0 0; font-size: 1.22rem; font-weight: 760; letter-spacing: 0; }
.page-kicker, .eyebrow { color: var(--teal); font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.admin-chip { display: flex; align-items: center; gap: 9px; }
.admin-chip > span { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; background: var(--teal); border-radius: 50%; font-weight: 800; }
.admin-chip strong, .admin-chip small { display: block; }.admin-chip strong { font-size: .78rem; }.admin-chip small { color: var(--muted); font-size: .67rem; }
.page-content { padding: 24px 28px 38px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.summary-card { display: flex; min-height: 98px; align-items: center; gap: 13px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 4px 13px rgba(39,70,77,.06); }
.summary-card small, .summary-card strong { display: block; }.summary-card small { color: var(--muted); font-size: .7rem; }.summary-card strong { margin-top: 3px; font-size: 1.25rem; }
.metric-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 7px; font-size: 1rem; }
.metric-icon.teal { color: #087f78; background: #e4f5f3; }.metric-icon.blue { color: var(--blue); background: #e8f1fa; }.metric-icon.violet { color: var(--violet); background: #f0edfb; }.metric-icon.green { color: var(--green); background: #e7f6ef; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 14px; }
.panel { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 4px 13px rgba(39,70,77,.055); }
.panel-head { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 2px 0 0; font-size: .98rem; font-weight: 760; }
.count-pill { min-width: 30px; padding: 5px 9px; color: #fff; background: var(--teal); border-radius: 999px; font-size: .72rem; font-weight: 800; text-align: center; }
.bars { display: flex; height: 245px; align-items: flex-end; justify-content: space-around; gap: 13px; padding: 28px 22px 16px; }
.bar-column { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: flex-end; }
.bar-track { position: relative; width: min(34px, 65%); height: 155px; overflow: hidden; background: #edf3f3; border-radius: 4px 4px 2px 2px; }
.bar-track span { position: absolute; right: 0; bottom: 0; left: 0; min-height: 4px; background: var(--teal); border-radius: 4px 4px 0 0; }
.bar-value { min-height: 18px; margin-bottom: 5px; color: var(--muted); font-size: .6rem; text-align: center; }
.bar-column small { margin-top: 7px; color: var(--muted); font-size: .63rem; }
.health-list { padding: 10px 18px; }
.health-list > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 12px 0; border-bottom: 1px solid #edf2f2; font-size: .78rem; }
.health-list > div:last-child { border-bottom: 0; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; }.health-dot.success { background: #24b57a; }.health-dot.warning { background: #efa929; }.health-dot.danger { background: #d65b63; }.health-dot.info { background: #318bd0; }
.table { font-size: .76rem; }.table > :not(caption) > * > * { padding: .72rem 1rem; border-color: #edf2f2; }
.table thead th { color: #63777e; background: #f9fbfb; font-size: .64rem; text-transform: uppercase; }
.table td strong, .table td small { display: block; }.table td small { margin-top: 2px; color: var(--muted); font-size: .66rem; }
.empty { padding: 42px !important; color: var(--muted); text-align: center; }
.btn { border-radius: 6px; font-weight: 650; font-size: .78rem; }.btn-primary { --bs-btn-bg: var(--teal); --bs-btn-border-color: var(--teal); --bs-btn-hover-bg: var(--teal-dark); --bs-btn-hover-border-color: var(--teal-dark); }
.form-control, .form-select { min-height: 40px; border-color: #d4e1e2; border-radius: 6px; font-size: .8rem; }
.form-label { margin-bottom: 5px; color: #50646b; font-size: .69rem; font-weight: 700; }
.modal-content { border: 0; border-radius: 8px; box-shadow: 0 20px 60px rgba(17,44,49,.25); }.modal-header, .modal-footer { border-color: var(--line); }.modal-title { font-size: 1.05rem; }
.credential-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.credential-grid code, .activation-codes code { padding: 8px; color: #213940; background: #fff; border: 1px solid #cadbdc; border-radius: 5px; overflow-wrap: anywhere; }
.usage-mode-switch { width: 100%; }.usage-mode-switch .btn { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 6px; }
.limited-instance-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .55fr); gap: 10px; padding: 12px; background: #f3f8f8; border: 1px solid var(--line); border-radius: 7px; }
.limited-instance-fields small { grid-column: 1 / -1; color: var(--muted); font-size: .66rem; }
.dns-instructions { display: grid; gap: 5px; padding: 10px; color: #31565b; background: rgba(255,255,255,.65); border: 1px solid #e3c56c; border-radius: 6px; font-size: .7rem; }
.dns-instructions strong, .dns-instructions span { display: block; }.dns-instructions code { padding: 2px 5px; }
.dns-row-hint { margin-top: 6px !important; padding: 6px; background: #fff8e7; border-radius: 4px; overflow-wrap: anywhere; }
.new-admin-credentials { display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(180px, 1fr); align-items: center; gap: 8px; padding: 10px; color: #31565b; background: #fff; border: 1px solid #e3c56c; border-radius: 6px; }
.new-admin-credentials code { padding: 6px 8px; color: #213940; background: #f5f8f8; border-radius: 4px; overflow-wrap: anywhere; }
.new-admin-credentials small { grid-column: 1 / -1; }
.tenant-credentials-row td { padding: 10px 16px !important; color: #425f65; background: #f2f8f7; }
.tenant-access { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(190px, 1fr) minmax(290px, 1.35fr) auto; align-items: center; gap: 12px; }
.tenant-access-heading { display: flex; align-items: center; gap: 9px; }
.tenant-access-heading strong, .tenant-access-heading small, .tenant-access-field span { display: block; }
.tenant-access-heading strong { font-size: .75rem; }.tenant-access-heading small, .tenant-access-field span { color: var(--muted); font-size: .62rem; }
.tenant-access-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; color: var(--teal); background: #dcefed; border-radius: 6px; }
.tenant-access-field code { display: block; margin-top: 2px; color: #244047; font-size: .69rem; overflow-wrap: anywhere; }
.tenant-password-field { display: grid; grid-template-columns: minmax(0, 1fr) 34px 34px; gap: 5px; }
.tenant-password-field > span { grid-column: 1 / -1; }
.tenant-password-field input { width: 100%; min-width: 0; height: 34px; padding: 5px 8px; color: #244047; background: #fff; border: 1px solid #cadbdc; border-radius: 5px; font: 600 .69rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.tenant-password-field .btn { width: 34px; height: 34px; padding: 0; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.module-card { padding: 14px; border: 1px solid var(--line); border-radius: 7px; }
.module-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.module-name { height: auto; min-height: 0; padding: 3px 0; border: 0; background: transparent; font-size: .88rem; font-weight: 750; box-shadow: none !important; }
.module-card code { color: var(--muted); font-size: .65rem; }
.module-save-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.module-save-status { min-width: 0; color: var(--muted); font-size: .64rem; text-align: right; }
.module-save-status.is-success { color: var(--green); }.module-save-status.is-error { color: #b33b46; }
.spin { animation: control-spin .7s linear infinite; }
@keyframes control-spin { to { transform: rotate(360deg); } }
.price-field { position: relative; }.price-field input { padding-right: 50px; font-weight: 750; }.price-field span { position: absolute; top: 12px; right: 11px; color: var(--muted); font-size: .67rem; }
.package-preview { display: flex; align-items: center; gap: 11px; padding: 11px 12px; color: #245059; background: #f0f8f7; border: 1px solid #cfe7e4; border-radius: 7px; }
.package-preview small, .package-preview strong, .package-preview span { display: block; }
.package-preview small { color: var(--muted); font-size: .64rem; }
.package-preview strong { margin: 1px 0; color: var(--teal-dark); font-size: .82rem; }
.package-preview span { color: #61787e; font-size: .67rem; }
[data-package-preview].is-unavailable .package-preview { color: #99582d; background: #fff5eb; border-color: #f0cfad; }
.invoice-selection-summary { display: flex; align-items: center; gap: 10px; padding-top: 20px; }
.invoice-selection-summary small, .invoice-selection-summary strong, .invoice-selection-summary span { display: block; }
.invoice-selection-summary small { color: var(--muted); font-size: .62rem; }
.invoice-selection-summary strong { font-size: .77rem; }.invoice-selection-summary span { color: var(--teal); font-size: .72rem; font-weight: 750; }
.invoice-product-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 285px; gap: 7px; overflow-y: auto; padding: 3px; }
.invoice-product-option { display: grid; grid-template-columns: 18px minmax(0, 1fr) 18px; align-items: center; gap: 9px; min-height: 58px; padding: 9px 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.invoice-product-option:hover { border-color: #83c6c1; background: #f5fbfa; }
.invoice-product-option:has(input:checked) { border-color: var(--teal); background: #edf8f7; box-shadow: inset 3px 0 var(--teal); }
.invoice-product-option strong, .invoice-product-option small { display: block; }
.invoice-product-option strong { font-size: .73rem; }.invoice-product-option small { margin-top: 2px; color: var(--muted); font-size: .62rem; }
.invoice-product-option > i { color: transparent; }.invoice-product-option:has(input:checked) > i { color: var(--teal); }
.usage-guide { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; margin-bottom: 14px; padding: 16px 18px; color: #28474d; background: #f1f8f7; border: 1px solid #cfe4e2; border-radius: 7px; }
.usage-guide-icon { display: grid; width: 42px; height: 42px; place-items: center; color: var(--teal); background: #dcefed; border-radius: 7px; font-size: 1rem; }
.usage-guide h2 { margin: 2px 0 10px; font-size: .94rem; font-weight: 760; }
.usage-guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.usage-guide-steps span { color: #536a70; font-size: .72rem; line-height: 1.45; }
.usage-guide-steps strong { display: inline-grid; width: 20px; height: 20px; margin-right: 4px; place-items: center; color: #fff; background: var(--teal); border-radius: 50%; font-size: .63rem; }
.usage-guide small { display: block; margin-top: 10px; color: var(--muted); font-size: .66rem; }
.activation-codes { display: grid; gap: 7px; }.activation-codes > div { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, .7fr); align-items: center; gap: 10px; }
.compact-tabs { padding: 4px; background: #e7eeee; border-radius: 7px; width: fit-content; }.compact-tabs .nav-link { padding: 7px 11px; color: #52676e; font-size: .73rem; }.compact-tabs .nav-link.active { background: #fff; color: var(--teal); box-shadow: 0 2px 7px rgba(26,55,61,.1); }.compact-tabs span { margin-left: 4px; padding: 1px 5px; background: #dbe7e7; border-radius: 10px; }
.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 25px; background: #edf4f4; }
.auth-panel { width: min(430px, 100%); padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 45px rgba(31,64,70,.13); }
.auth-brand { display: grid; width: 48px; height: 48px; margin-bottom: 20px; place-items: center; color: #fff; background: var(--teal); border-radius: 8px; font-size: 1.25rem; }
.auth-panel h1 { margin: 4px 0 8px; font-size: 1.55rem; }.auth-panel p { margin-bottom: 22px; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.icon-btn { display: grid; width: 38px; height: 38px; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.operator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.operator-option { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.operator-option strong, .operator-option small { display: block; }.operator-option strong { font-size: .76rem; }.operator-option small { color: var(--muted); font-size: .63rem; }
.endpoint-code { display: block; padding: 10px; color: #244047; background: #f3f7f7; border: 1px solid var(--line); border-radius: 6px; font-size: .68rem; overflow-wrap: anywhere; }
.payment-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: #edf4f4; }
.payment-card { width: min(470px, 100%); padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 18px 52px rgba(31,64,70,.14); }
.payment-brand { display: flex; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.payment-brand > span { display: grid; width: 38px; height: 38px; place-items: center; color: #fff; background: var(--teal); border-radius: 7px; }
.payment-brand strong, .payment-brand small { display: block; }.payment-brand strong { font-size: .82rem; }.payment-brand small { color: var(--muted); font-size: .63rem; }
.payment-heading { padding: 24px 0 17px; text-align: center; }.payment-heading h1 { margin: 5px 0; font-size: 1.8rem; }.payment-heading p { margin: 0; color: var(--muted); font-size: .73rem; }
.operator-strip { display: flex; flex-wrap: wrap; gap: 5px; }.operator-strip span { padding: 4px 7px; color: #31575b; background: #edf6f5; border-radius: 4px; font-size: .63rem; font-weight: 700; }
.payment-security { margin-top: 17px; color: var(--muted); font-size: .65rem; text-align: center; }
.payment-complete { display: flex; align-items: center; flex-direction: column; gap: 5px; padding: 22px; color: #147552; background: #e8f7f0; border-radius: 7px; text-align: center; }.payment-complete i { font-size: 1.8rem; }.payment-complete span { font-size: .72rem; }
.pricing-page { min-height: 100vh; color: #20363c; background: #edf4f4; }
.pricing-topbar { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 14px; padding: 10px clamp(16px, 4vw, 52px); background: #fff; border-bottom: 1px solid var(--line); }
.pricing-topbar .payment-brand { padding: 0; border: 0; }
.pricing-content { width: min(1160px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 44px; }
.pricing-expired { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 7px; }
.pricing-expired > i { font-size: 1.3rem; }.pricing-expired strong, .pricing-expired span { display: block; }.pricing-expired span { margin-top: 2px; font-size: .72rem; }
.pricing-heading { max-width: 720px; margin-bottom: 20px; }
.pricing-heading h1 { margin: 4px 0 7px; font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 780; letter-spacing: 0; }
.pricing-heading p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.pricing-module-picker { display: grid; grid-template-columns: 180px minmax(260px, 430px); align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.pricing-module-picker .form-label { margin: 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pricing-plan { position: relative; min-width: 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 6px 18px rgba(39,70,77,.06); }
.pricing-plan.recommended { border-color: #65bcb5; box-shadow: 0 8px 22px rgba(10,132,123,.12); }
.pricing-ribbon { position: absolute; top: 14px; right: 14px; padding: 3px 6px; color: #087f78; background: #e4f5f3; border-radius: 4px; font-size: .58rem; font-weight: 800; text-transform: uppercase; }
.pricing-plan h2 { margin: 14px 0 2px; font-size: 1rem; font-weight: 760; }.pricing-plan > p { min-height: 32px; margin: 0; color: var(--muted); font-size: .7rem; }
.pricing-amount { margin: 16px 0; padding: 13px 0; border-top: 1px solid #e9efef; border-bottom: 1px solid #e9efef; }
.pricing-amount strong, .pricing-amount small { display: block; }.pricing-amount strong { font-size: 1.18rem; overflow-wrap: anywhere; }.pricing-amount small { margin-top: 2px; color: var(--muted); font-size: .65rem; }
.pricing-factor { color: #526b71; font-size: .68rem; font-weight: 650; }
.pricing-note { margin-top: 14px; padding: 11px 13px; color: #526b71; background: #f7fafa; border: 1px solid var(--line); border-radius: 7px; font-size: .7rem; }

@media (max-width: 1100px) {
    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tenant-access { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 1050; left: -250px; width: 238px; transition: left .2s ease; }
    .sidebar.open { left: 0; }
    .page-content, .topbar { padding-right: 17px; padding-left: 17px; }
}
@media (max-width: 700px) {
    .summary-grid, .content-grid, .module-grid { grid-template-columns: 1fr; }
    .usage-guide { grid-template-columns: 1fr; }
    .usage-guide-steps { grid-template-columns: 1fr; gap: 7px; }
    .topbar { min-height: 64px; }.admin-chip div { display: none; }
    .page-content { padding: 15px 10px 30px; }
    .credential-grid, .activation-codes > div { grid-template-columns: 1fr; }
    .new-admin-credentials, .tenant-access { grid-template-columns: 1fr; }
    .tenant-access > .btn { width: 100%; }
    .limited-instance-fields { grid-template-columns: 1fr; }
    .operator-grid { grid-template-columns: 1fr; }
    .pricing-grid, .pricing-module-picker { grid-template-columns: 1fr; }
    .pricing-content { width: min(100% - 20px, 1160px); padding-top: 18px; }
    .pricing-topbar { min-height: 62px; padding: 9px 12px; }
    .pricing-topbar .btn { font-size: 0; }.pricing-topbar .btn i { font-size: .85rem; }
    .invoice-product-picker { grid-template-columns: 1fr; }
    .invoice-selection-summary { padding-top: 0; }
    [data-managed-domain-fields] .input-group { display: grid; grid-template-columns: auto minmax(0, 1fr); }
    [data-managed-domain-fields] .input-group .input-group-text:last-child { grid-column: 1 / -1; justify-content: center; border-top: 0; border-radius: 0 0 6px 6px; }
}
