/* Phase 78 final hardening: readable admin/customer surfaces, gateway rebrand, table/dropdown/mobile fixes */
:root{--p78-ink:#0f172a;--p78-muted:#475569;--p78-line:#d7e0ee;--p78-card:#ffffff;--p78-soft:#f8fafc;--p78-brand:#2563eb;--p78-good:#047857;--p78-warn:#b45309;--p78-bad:#b91c1c;--p78-shadow:0 18px 48px rgba(15,23,42,.10)}
html body{color:var(--p78-ink)}
.admin-ui-active,.admin-dashboard-v67,.customer-shell,.workspace-hero,.surface,.panel-v67,.metric-tile,.ops-card-v67{color:var(--p78-ink)}
.surface,.panel-v67,.metric-tile,.ops-card-v67,.admin-layout-shell__content,.billing-health-card,.dashboard-panel{background:var(--p78-card)!important;border-color:var(--p78-line)!important}
.surface *, .panel-v67 *, .metric-tile *, .ops-card-v67 *, .dashboard-panel *{text-shadow:none}
.surface h1,.surface h2,.surface h3,.panel-v67 h1,.panel-v67 h2,.panel-v67 h3,.metric-value,.section-title,.panel-title-v67,.ops-card-v67__value{color:var(--p78-ink)!important}
.section-copy,.panel-copy-v67,.field-hint,.text-muted,.surface small,.metric-tile small{color:var(--p78-muted)!important}
.workspace-hero:not(.command-hero-v67){background:linear-gradient(135deg,#0f172a 0%,#1d4ed8 58%,#0284c7 100%)!important;color:#fff!important;border:0!important;box-shadow:0 25px 70px rgba(15,23,42,.22)}
.workspace-hero:not(.command-hero-v67) *{color:inherit}.workspace-hero__copy,.workspace-hero__meta span{color:#e0f2fe!important}.workspace-hero .btn-surface,.workspace-hero .btn-ghost{background:#fff!important;color:#0f172a!important;border-color:rgba(255,255,255,.65)!important}.workspace-hero .btn-primary{background:#0f172a!important;border-color:#0f172a!important;color:#fff!important}
.command-hero-v67 .lead,.command-hero-v67 .text-white-50{color:#dbeafe!important}.command-hero-v67 .btn-light{color:#0f172a!important}.command-hero-v67 .btn-outline-light{color:#fff!important;border-color:rgba(255,255,255,.75)!important}.command-hero-v67 .btn-outline-light:hover{background:#fff!important;color:#0f172a!important}
.btn-surface,.btn-ghost{background:#fff!important;color:#0f172a!important;border:1px solid var(--p78-line)!important}.btn-surface:hover,.btn-ghost:hover{background:#eff6ff!important;color:#1d4ed8!important}.btn-primary{color:#fff!important}.btn-outline-primary{background:#fff!important}
.form-control,.form-select,select,textarea,input[type="text"],input[type="email"],input[type="number"],input[type="password"],input[type="search"],input[type="tel"],input[type="url"],input[type="date"]{background:#fff!important;color:#0f172a!important;border-color:#cbd5e1!important;box-shadow:none!important}
.form-control::placeholder,input::placeholder,textarea::placeholder{color:#64748b!important;opacity:1}.form-select option,select option{background:#fff!important;color:#0f172a!important}.select2-container .select2-selection--single,.select2-container .select2-selection--multiple{background:#fff!important;color:#0f172a!important;border-color:#cbd5e1!important;min-height:42px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#0f172a!important;line-height:40px}.select2-dropdown{background:#fff!important;color:#0f172a!important;border-color:#cbd5e1!important}.select2-results__option{color:#0f172a!important}.select2-results__option--highlighted{background:#2563eb!important;color:#fff!important}
.table-shell,.table-responsive{background:#fff;border-radius:18px;overflow:auto;border:1px solid var(--p78-line)}.table-shell:has(.dropdown-menu.show),.table-responsive:has(.dropdown-menu.show){overflow:visible!important}.table{margin-bottom:0}.table th{background:#f1f5f9!important;color:#0f172a!important;font-weight:900;border-bottom:1px solid var(--p78-line)!important}.table td{color:#0f172a!important;background:#fff!important;vertical-align:middle}.table tr:hover td{background:#f8fafc!important}.table small{color:#475569!important}.table code{color:#1d4ed8!important;background:#eff6ff!important;border-radius:8px;padding:2px 6px}
.dropdown{position:relative}.dropdown-menu{z-index:7000!important;background:#fff!important;border:1px solid #cbd5e1!important;box-shadow:0 22px 60px rgba(15,23,42,.22)!important;border-radius:14px!important;color:#0f172a!important}.dropdown-item{color:#0f172a!important;white-space:normal}.dropdown-item:hover,.dropdown-item:focus{background:#eff6ff!important;color:#1d4ed8!important}.manage-action-cell{position:relative;z-index:5}.manage-action-cell .dropdown-menu.show{position:absolute!important;right:0!important;left:auto!important;transform:none!important;top:calc(100% + 4px)!important}
.status-pill,.badge{font-weight:900!important;letter-spacing:.01em}.status-pill--success,.status-paid,.badge.bg-success{background:#047857!important;color:#fff!important}.status-pill--danger,.status-overdue,.badge.bg-danger{background:#b91c1c!important;color:#fff!important}.status-pill--warning,.status-unpaid,.badge.bg-warning{background:#f59e0b!important;color:#111827!important}.status-pill--neutral,.badge.bg-secondary{background:#e2e8f0!important;color:#0f172a!important}
.invoice-pdf .status-paid{background:#047857!important;color:#fff!important}.invoice-pdf .status-unpaid{background:#f59e0b!important;color:#111827!important}.invoice-pdf .status-pending{background:#e2e8f0!important;color:#0f172a!important}.invoice-pdf .status-overdue{background:#b91c1c!important;color:#fff!important}.invoice-pdf .status-refunded{background:#2563eb!important;color:#fff!important}.invoice-pdf .status-cancelled{background:#64748b!important;color:#fff!important}
.admin-dashboard-v67 .admin-nav,.admin-dashboard-v67 .admin-section-nav{background:#fff!important;color:#0f172a!important}.admin-inline-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.admin-inline-actions .form-control{min-width:180px}.metric-grid,.ops-grid-v67{align-items:stretch}.metric-tile,.ops-card-v67{height:100%;min-width:0;overflow:hidden}.metric-value,.ops-card-v67__value{overflow-wrap:anywhere}.panel-grid-v67,.section-grid{min-width:0}.panel-grid-v67>* ,.section-grid>*{min-width:0}.breakdown-meter i{display:block;height:8px;border-radius:999px;background:linear-gradient(90deg,#2563eb,#0ea5e9)}
.customer-shell [data-internal-provider],.customer-shell [data-internal-registrar],.customer-shell .namecheap-reference,.customer-shell .registrar-internal,.customer-shell .wholesale-cost,.customer-shell .gateway-cost,.customer-shell .internal-cost,.customer-area [data-internal-provider],.customer-area [data-internal-registrar],.customer-area .namecheap-reference,.customer-area .registrar-internal,.customer-area .wholesale-cost,.customer-area .gateway-cost,.customer-area .internal-cost{display:none!important}
.topbar,.navbar,.site-topbar{flex-wrap:nowrap!important;min-width:0}.topbar .dropdown-menu,.navbar .dropdown-menu{position:absolute!important}.topbar .nav-link,.navbar .nav-link{white-space:nowrap}.topbar-search,.navbar-search{min-width:0;flex:1 1 auto}
@media(max-width:992px){.workspace-hero,.command-hero-v67{border-radius:22px!important;padding:20px!important}.workspace-hero__actions,.admin-inline-actions{width:100%;display:grid!important;grid-template-columns:1fr;gap:8px}.workspace-hero__actions .btn,.workspace-hero__actions form,.admin-inline-actions .btn,.admin-inline-actions .form-control{width:100%;max-width:none!important}.ops-grid-v67,.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.panel-grid-v67,.section-grid,.standard-page-grid,.dashboard-lower-grid{grid-template-columns:1fr!important}.table-shell,.table-responsive{overflow-x:auto}.dropdown-menu.show{max-width:calc(100vw - 32px)}}
@media(max-width:640px){.ops-grid-v67,.metric-grid{grid-template-columns:1fr!important}.table.global-table-v67,.global-table-v67 tbody,.global-table-v67 tr,.global-table-v67 td{display:block!important}.global-table-v67 thead{display:none}.global-table-v67 tr{margin:10px;border:1px solid var(--p78-line);border-radius:16px;overflow:hidden}.global-table-v67 td{display:flex!important;justify-content:space-between;gap:12px}.global-table-v67 td:before{content:attr(data-label);font-weight:900;color:#475569}.manage-action-cell .dropdown,.manage-action-cell .btn{width:100%}.manage-action-cell .dropdown-menu.show{position:static!important;width:100%;margin-top:8px}.dashboard-table-wrap{overflow-x:auto}.surface-head{display:grid!important;gap:12px}}
