/* Client palette: presentation only; navigation and role checks stay in templates. */
:root {
    --lgg-navy: #0f1b33;
    --lgg-heading: #0f172a;
    --lgg-text: #334155;
    --lgg-muted: #475569;
    --lgg-canvas: #e8edf5;
    --lgg-border: #cbd5e1;
    --lgg-accent: #4338ca;
}
html body {background:var(--lgg-canvas);color:var(--lgg-text);font-size:16px}
body .sidebar.lgg-sidebar {background:var(--lgg-navy);border-right-color:#263753;color:#e2e8f0}
.lgg-sidebar .sidebar-brand {border-bottom:1px solid #2b3c58;margin-bottom:14px}
/* The transparent logo keeps its colored bars while black lettering becomes white. */
.lgg-sidebar .sidebar-brand-logo {filter:invert(1) hue-rotate(180deg)}
body .lgg-sidebar .sidebar-brand small {color:#cbd5e1;font-weight:600}
body .lgg-sidebar .sidebar-group-label,body .lgg-sidebar .integration-header {color:#b8c5da;font-weight:600}
body .sidebar.lgg-sidebar a.dashboard-link {color:#e2e8f0}
body .lgg-sidebar .dashboard-link .link-text {font-weight:500}
body .sidebar.lgg-sidebar a.dashboard-link:hover {background:#1e2e4a;color:#fff}
body .sidebar.lgg-sidebar a.dashboard-link.active {background:#fff;color:#0f172a}
body .lgg-sidebar .dashboard-link.active .nav-icon {color:var(--lgg-accent)}
body .lgg-sidebar .dashboard-link.active:before {background:transparent}
body .lgg-sidebar .bottom-section {background:var(--lgg-navy);border-top-color:#2b3c58;color:#e2e8f0}
body .lgg-sidebar .bottom-section > p {background:#1e2e4a;color:#fff!important;padding:10px 12px;border-radius:8px;font-size:13px;font-weight:600}
body .lgg-sidebar .sidebar-profile-copy strong {color:#fff}
body .lgg-sidebar .sidebar-profile-copy span,body .lgg-sidebar .sidebar-profile-copy small {color:#cbd5e1}
body .lgg-sidebar .sidebar-profile-avatar {background:#fff;color:#0f172a}
body .sidebar.lgg-sidebar a.sidebar-logout {color:#e2e8f0;border:1px solid #405572}
body .sidebar.lgg-sidebar a.sidebar-logout:hover {background:#1e2e4a;color:#fff}
body .lgg-sidebar .user_dashboard {background:#1e2e4a;color:#e2e8f0}
body .lgg-sidebar .top-section {scrollbar-color:#61738e transparent}
body .lgg-sidebar a:focus-visible {outline-color:#a5b4fc}
/* Dark table headings remain identical in their floating sticky copies. */
body #accounts-dashboard th,
body #agency-dashboard th,
body #calls-page .calls-table th,
body #reports-page .report-v2-table th,
body #markup-pricing th,
body #utility-page th,
body.purchased-numbers-page .table-container th,
body .sticky-table-header.sticky-table-header th {
    background:#1e293b;color:#fff;border-bottom-color:#334155;font-weight:600;
}
body .numbers-workspace .table-container .group-header {background:#f1f5fb}
body .numbers-workspace .table-container .group-header:hover {background:#e0e7ff}
body .numbers-workspace .table-container .group-header td {color:#0f172a;font-weight:600;border-bottom-color:#cbd5e1}
body .numbers-workspace .group-header [id$='ToggleArrow'] {background:#e0e7ff;color:#3730a3}
body .numbers-metric-icon,
body .metric-icon,
body #agency-dashboard .agency-metric-icon {background:#4338ca;color:#fff}
body .numbers-workspace .card h2,
body .numbers-workspace .stat-card h2,
body .dash-metrics h2,
body #agency-dashboard .card h2,
body #reports-page .stat-card h2 {color:#1e293b;font-weight:600}
body .numbers-workspace .active-dot {background:#dcfce7;color:#166534;padding:3px 8px;border-radius:20px;font-weight:600}
body .numbers-workspace .deactivated-dot {background:#fee2e2;color:#991b1b;padding:3px 8px;border-radius:20px;font-weight:600}
body .numbers-workspace .numbers-buy-primary {background:#4338ca;border-color:#4338ca;color:#fff}
body .numbers-workspace .numbers-buy-primary:hover {background:#3730a3;border-color:#3730a3}
body .numbers-workspace .numbers-buy-secondary {background:#fff;border-color:#4338ca;color:#3730a3}
body .numbers-workspace .buy-number:not(.numbers-buy-primary):not(.numbers-buy-secondary) {color:#334155;border-color:#64748b}
body .numbers-settings-button,body .numbers-row-menu summary {border-color:#64748b;color:#3730a3}
body .numbers-workspace .switch .slider {background:#cbd5e1}
body .numbers-workspace .switch input:checked + .slider {background:#4338ca}
body .account-status {background:#dcfce7;color:#166534}
body .account-status.inactive {background:#e2e8f0;color:#475569}

/* Shared presentation for account forms, billing, integrations and setup screens. */
body.legacy-theme-page {font-family:'Poppins',Arial,sans-serif;line-height:1.6}
body.legacy-theme-page > .container {background:var(--lgg-canvas)}
body.legacy-theme-page .content {box-sizing:border-box;min-width:0;font-size:16px;padding:32px}
body.legacy-theme-page .content :is(h1,h2,h3,h4) {color:var(--lgg-heading);line-height:1.35}
body.legacy-theme-page .content h1 {font-size:28px}
body.legacy-theme-page .content h2 {font-size:22px}
body.legacy-theme-page .content :is(p,label,td,th,input,select,textarea,button) {font-family:inherit}
body.legacy-theme-page .content :is(label,td,th) {font-size:16px}
body.legacy-theme-page .content label {color:var(--lgg-text)}
body.legacy-theme-page .content :is(input,select,textarea):not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='range']):not([type='color']) {
    box-sizing:border-box;max-width:100%;font-size:16px;color:var(--lgg-heading);background:#fff;border:1px solid var(--lgg-border);border-radius:7px;padding:10px 12px;
}
body.legacy-theme-page .content :is(input,textarea)::placeholder {color:var(--lgg-muted);opacity:1}
body.legacy-theme-page .content :is(input,select,textarea):disabled {background:#e2e8f0;color:#475569;cursor:not-allowed}
body.legacy-theme-page .content :is(input,select,textarea):focus-visible {outline:2px solid #4338ca;outline-offset:2px}
body.legacy-theme-page .content input:is([type='checkbox'],[type='radio']) {accent-color:var(--lgg-accent)}
body.legacy-theme-page .content :is(.form-card,.user-detail-container,.payment-container,.settings-shell,.block-list-container,.ivr-dashboard,.payment-card,.form-section,.list-section,.card-container,.detail-item) {
    background:#fff;border-color:var(--lgg-border);border-radius:10px;
}
body.legacy-theme-page .content .details-container {background:#fff;border:1px solid var(--lgg-border);border-radius:10px;padding:24px;gap:18px}
body.legacy-theme-page .content .detail-item {padding:8px;overflow-wrap:anywhere}
body.legacy-theme-page .content .detail-item p {text-align:left}
body.legacy-theme-page .content .horizontal-scroll,
body.legacy-theme-page .content .number-grid {background:#e2e8f0;border-radius:8px}
body.legacy-theme-page .content .number-box {background:var(--lgg-accent);color:#fff;font-size:16px}
body.legacy-theme-page .content .number-box.active {background:var(--lgg-navy);color:#fff}
body.legacy-theme-page .content :is(.back-button,.back-link) {color:var(--lgg-accent);font-size:16px}
body.legacy-theme-page .content table {background:#fff;border:1px solid var(--lgg-border);box-shadow:none}
body.legacy-theme-page .content th,body.standalone-theme-page th {background:#1e293b;color:#fff;border-color:#334155;font-weight:600;padding:14px 16px}
body.legacy-theme-page .content td,body.standalone-theme-page td {color:var(--lgg-text);border-color:#dbe3ed;padding:14px 16px}
body.legacy-theme-page .content tbody tr:hover {background:#f1f5f9}
/* Match the existing outlined Add User / Add Agency buttons. Keep icon controls compact. */
body.legacy-theme-page .content :is(button[type='submit'],input[type='submit'],.submit-btn,.submit,.add-user-btn,.add-agency-btn,.btn,.btn-primary,.download-button,.searchBtn,.save-button,.add-button,.set-default-btn,.proceed-link) {
    box-sizing:border-box;background:#fff;color:var(--lgg-accent);border:1px solid #a5b4fc;border-radius:7px;padding:10px 16px;font-size:16px;font-weight:500;line-height:1.5;text-decoration:none;cursor:pointer;
}
body.legacy-theme-page .content :is(button[type='submit'],input[type='submit'],.submit-btn,.submit,.add-user-btn,.add-agency-btn,.btn,.btn-primary,.download-button,.searchBtn,.save-button,.add-button,.set-default-btn,.proceed-link):hover {background:#eef2ff;border-color:var(--lgg-accent)}
body.legacy-theme-page .content :is(button,input[type='submit']):disabled {opacity:.6;cursor:not-allowed}
body.legacy-theme-page .content :is(.cancel-button,.secondary) {background:#f1f5f9;color:#334155;border-color:#94a3b8}
body.legacy-theme-page .content :is(.remove-button,.remove_access) {color:#b91c1c;border-color:#fca5a5;background:#fff}
body .content :is(.modal-content,.modal-card,.popup-content,.modal-dialog,.warning-dialog) {background:#fff;border:1px solid var(--lgg-border);color:var(--lgg-text)}
body .content :is(.modal-content,.modal-card,.popup-content,.modal-dialog,.warning-dialog) :is(h2,h3,p,label,.modal-title) {color:var(--lgg-heading)}
body .content :is(.modal-content,.modal-card,.popup-content,.modal-dialog,.warning-dialog) :is(input,select,textarea,button) {font-family:inherit}
body .content :is(.success-message,.success) {color:#166534}
body .content :is(.error-message,.error,.errorlist) {color:#b91c1c}
body .content :is(pre,code) {color:#1e293b;background:#f1f5f9;overflow-wrap:anywhere}
body .content pre {padding:16px;border:1px solid var(--lgg-border);border-radius:7px;white-space:pre-wrap}
body .content .account-dropdown select {max-width:100%;color:var(--lgg-heading);border-color:var(--lgg-border);font-size:16px}
/* Standalone operational pages retain their existing structure and access rules. */
body.standalone-theme-page {font:16px/1.6 'Poppins',Arial,sans-serif;padding:32px;box-sizing:border-box;min-height:100vh}
body.standalone-theme-page :is(h1,h2,h3) {color:var(--lgg-heading)}
body.standalone-theme-page h1 {font-size:28px}
body.standalone-theme-page h2 {font-size:22px;margin-top:28px}
body.standalone-theme-page table {border-collapse:collapse;width:100%;background:#fff;border:1px solid var(--lgg-border);display:block;overflow-x:auto}
body.standalone-theme-page a {color:var(--lgg-accent)}
body.standalone-theme-page .add-agency-btn {display:inline-block;background:#fff;border:1px solid #a5b4fc;border-radius:7px;padding:10px 16px}
body.standalone-theme-page .error-panel {border-color:var(--lgg-border);background:#fff}
/* Authentication uses the same navy canvas with a readable white card. */
body.auth-theme-page {background:var(--lgg-navy);color:var(--lgg-text);font:16px/1.6 'Poppins',Arial,sans-serif;min-height:100dvh;height:auto;box-sizing:border-box;padding:24px}
body.auth-theme-page :is(.login-container,.signup-container) {box-sizing:border-box;background:#fff;border:1px solid var(--lgg-border);max-width:440px}
body.auth-theme-page :is(h1,h2,h3,label) {color:var(--lgg-heading)}
body.auth-theme-page :is(input,select,textarea) {box-sizing:border-box;max-width:100%;font:inherit;border:1px solid var(--lgg-border);border-radius:7px;color:var(--lgg-heading);background:#fff;accent-color:var(--lgg-accent)}
body.auth-theme-page :is(button,input[type='submit']) {background:var(--lgg-accent);color:#fff;font:600 16px/1.5 'Poppins',Arial,sans-serif;border:1px solid var(--lgg-accent);border-radius:7px;padding:11px 16px;cursor:pointer}
body.auth-theme-page :is(button,input[type='submit']):hover {background:#3730a3}
body.auth-theme-page :is(a,.subtext) {color:var(--lgg-muted)}
body.auth-theme-page :is(a,button,input):focus-visible {outline:2px solid #818cf8;outline-offset:3px}
@media(max-width:768px) {
    body.legacy-theme-page .content {padding:70px 16px 24px;margin-left:0}
    body.standalone-theme-page {padding:20px 16px}
    body.legacy-theme-page .content .user-detail-container {box-sizing:border-box;width:100%;margin:16px 0;padding:18px}
    body.legacy-theme-page .content .user-info {grid-template-columns:1fr}
    body.legacy-theme-page .content .form-group {max-width:100%;flex-wrap:wrap}
    body.legacy-theme-page .content table {display:block;overflow-x:auto;max-width:100%}
}
body.standalone-theme-page .theme-table-scroll {overflow-x:auto;max-width:100%;border:1px solid var(--lgg-border);border-radius:8px;background:#fff}
body.standalone-theme-page .theme-table-scroll table {display:table;width:100%;border:0;min-width:600px}
body .content :is(.modal-content,.modal-card,.popup-content) .confirm-button {background:#fff;color:var(--lgg-accent);border:1px solid #a5b4fc;border-radius:7px;font-size:16px}
body .content :is(.modal-content,.modal-card,.popup-content) .confirm-button:hover {background:#eef2ff;border-color:var(--lgg-accent)}
body .content :is(.modal-content,.modal-card,.popup-content) .cancel-button {background:#f1f5f9;color:#334155;border:1px solid #94a3b8;border-radius:7px;font-size:16px}
