/*
  Prometheus admin UI consistency layer.
  Keep this file last in index.html so older fragments inherit the same compact shell
  without editing every legacy page at once.
*/

:root {
  --ui-bg: #f5f7fb;
  --ui-card: #ffffff;
  --ui-card-soft: #f8fafc;
  --ui-border: #dbe3ee;
  --ui-border-strong: #cbd5e1;
  --ui-text: #0f172a;
  --ui-muted: #64748b;
  --ui-muted-2: #475569;
  --ui-primary: #0f172a;
  --ui-primary-hover: #1e293b;
  --ui-focus: rgba(37, 99, 235, 0.18);
  --ui-danger: #b91c1c;
  --ui-success: #166534;
  --ui-radius: 8px;
  --ui-radius-sm: 6px;
  --ui-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html,
body,
input,
select,
textarea,
button {
  font-family: var(--ui-font);
  letter-spacing: 0;
}

body {
  background: var(--ui-bg);
  color: var(--ui-text);
  font-size: 13px;
  line-height: 1.4;
}

.topbar {
  background: #fff;
  padding: 5px 8px;
}

.topbar-panel-name {
  display: none;
}

.admin-live-btn,
.topbar-menu-btn,
.avatar-btn {
  border-radius: var(--ui-radius);
}

.topbar-inline-help-slot .inline-help-btn,
.inline-help-btn {
  border-radius: var(--ui-radius);
}

.content {
  color: var(--ui-text);
  font-size: 13px;
}

.content h1,
.content h2,
.content h3,
.content h4 {
  color: var(--ui-text);
  letter-spacing: 0;
}

.content h1 {
  font-size: 22px;
  line-height: 1.15;
}

.content h2 {
  font-size: 20px;
  line-height: 1.18;
}

.content h3 {
  font-size: 17px;
  line-height: 1.22;
}

.content h4 {
  font-size: 14px;
  line-height: 1.25;
}

.content .card,
.content .ops-surface,
.content .ops-toolbar-surface,
.content .settings-section-card,
.content .subscription-section-block,
.content .subscription-plan-step,
.content .crm-block,
.content .crm-main,
.content .lookup-card,
.content .staff-surface,
.content .campaign-overview-card,
.content .tier-card {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-card);
  box-shadow: var(--ui-shadow);
}

.content .card {
  padding: 12px;
  margin-bottom: 10px;
}

.content .ops-surface,
.content .ops-toolbar-surface,
.content .staff-surface,
.content .settings-section-card,
.content .subscription-section-block,
.content .crm-block,
.content .lookup-card {
  padding: 12px;
}

.content .ops-page-head,
.content .ops-surface-head,
.content .staff-surface-head,
.content .settings-section-head,
.content .subscription-section-block-head,
.content .crm-section-head {
  gap: 10px;
  margin-bottom: 10px;
}

.content .ops-page-copy,
.content .ops-surface-copy,
.content .staff-surface-copy {
  gap: 4px;
}

.content .ops-page-subtitle,
.content .ops-helper,
.content .muted,
.content .crm-meta,
.content .campaign-pane-meta,
.content .settings-field-help,
.content .subscription-section-copy,
.content .staff-helper,
.content .staff-subtitle {
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.4;
}

.content input,
.content select,
.content textarea,
.content button {
  min-height: 34px;
  border-radius: var(--ui-radius);
  border-color: var(--ui-border-strong);
  font-size: 13px;
  line-height: 1.25;
}

.content input,
.content select,
.content textarea {
  min-width: 0;
  max-width: 100%;
  background: #fff;
  color: var(--ui-text);
}

.content textarea {
  line-height: 1.35;
}

.content button,
.content a.action,
.content button.action,
.content .btn-ghost,
.content .btn-danger {
  min-height: 34px;
  border-radius: var(--ui-radius);
  font-size: 13px;
  font-weight: 700;
}

.content button.action,
.content a.action {
  background: var(--ui-primary);
  color: #fff;
}

.content button.action:hover,
.content a.action:hover {
  background: var(--ui-primary-hover);
}

.content .btn-ghost,
.content button:not(.action):not(.btn-danger):not(.nav-link):not(.nav-section-head):not(.avatar-btn) {
  background: #fff;
  color: var(--ui-text);
}

.content .btn-ghost:hover,
.content button:not(.action):not(.btn-danger):not(.nav-link):not(.nav-section-head):not(.avatar-btn):hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.content .btn-danger {
  border-color: #fecaca;
  background: #fff7f7;
  color: var(--ui-danger);
}

.content :focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ui-focus);
}

.content .row,
.content .inline-actions,
.content .ops-page-actions,
.content .ops-surface-actions,
.content .staff-surface-actions,
.content .settings-section-actions,
.content .subscription-action-row {
  gap: 8px;
}

.content .grid {
  gap: 8px;
}

.content .kpi,
.content .ops-summary-pill,
.content .subscription-plan-mini-strip span {
  min-height: 30px;
  border-color: var(--ui-border);
  border-radius: var(--ui-radius-sm);
  background: #fff;
  color: var(--ui-muted-2);
  font-size: 12px;
}

.content .kpi strong,
.content .ops-summary-pill strong {
  color: var(--ui-text);
  font-size: 13px;
}

.content .table-wrap,
.content .compact-table-wrap,
.content .price-list-wrap,
.content .customer-directory-wrap,
.content .settings-data-table-wrap,
.content .settings-station-table-wrap,
.content .staff-clock-events-wrap {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  background: #fff;
}

.content table {
  border-collapse: separate;
  border-spacing: 0;
}

@media (max-width: 720px) {
  .content .admin-mobile-card-table-wrap {
    border: 0;
    background: transparent;
    overflow-x: hidden;
  }

  .content table[data-mobile-table="cards"] {
    display: block;
    width: 100%;
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
  }

  .content table[data-mobile-table="cards"] thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .content table[data-mobile-table="cards"] thead tr,
  .content table[data-mobile-table="cards"] thead th,
  .content table[data-mobile-table="cards"] thead td {
    display: block !important;
    width: 1px !important;
    min-width: 0 !important;
    max-width: 1px !important;
    height: 1px !important;
    max-height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  .content table[data-mobile-table="cards"] tbody {
    display: grid;
    gap: 8px;
    width: 100%;
  }

  .content table[data-mobile-table="cards"] tbody tr {
    display: grid;
    width: 100%;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  }

  .content table[data-mobile-table="cards"] tbody tr[hidden],
  .content table[data-mobile-table="cards"] tbody tr.hidden {
    display: none !important;
  }

  .content table[data-mobile-table="cards"] tbody td,
  .content table[data-mobile-table="cards"] tbody th {
    display: grid;
    grid-template-columns: minmax(88px, 32%) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border-bottom: 1px solid #edf2f7;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .content table[data-mobile-table="cards"] tbody td:last-child,
  .content table[data-mobile-table="cards"] tbody th:last-child {
    border-bottom: 0;
  }

  .content table[data-mobile-table="cards"] tbody td::before,
  .content table[data-mobile-table="cards"] tbody th::before {
    content: attr(data-label);
    color: var(--ui-muted-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .content table[data-mobile-table="cards"] tbody td[data-label=""],
  .content table[data-mobile-table="cards"] tbody th[data-label=""],
  .content table[data-mobile-table="cards"] tbody td[colspan],
  .content table[data-mobile-table="cards"] tbody th[colspan] {
    display: block;
  }

  .content table[data-mobile-table="cards"] tbody td[data-label=""]::before,
  .content table[data-mobile-table="cards"] tbody th[data-label=""]::before,
  .content table[data-mobile-table="cards"] tbody td[colspan]::before,
  .content table[data-mobile-table="cards"] tbody th[colspan]::before {
    display: none;
  }

  .content table[data-mobile-table="cards"] tbody td > *,
  .content table[data-mobile-table="cards"] tbody th > * {
    min-width: 0;
  }

  .content table[data-mobile-table="cards"] tbody td .row,
  .content table[data-mobile-table="cards"] tbody th .row,
  .content table[data-mobile-table="cards"] tbody td .inline-actions,
  .content table[data-mobile-table="cards"] tbody th .inline-actions {
    gap: 6px;
  }
}

.content th {
  background: var(--ui-card-soft);
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.content th,
.content td {
  border-bottom-color: #e6edf5;
  padding: 8px 9px;
}

.content tr:last-child td {
  border-bottom: 0;
}

.content tr:has(td.muted[colspan]) td,
.content td.muted[colspan] {
  padding: 16px;
  background: #fbfdff;
  color: var(--ui-muted);
  font-size: 13px;
  text-align: left;
}

.content .crm-empty,
.content .hp-empty-state,
.content .pl-sku-empty,
.content .product-picker-empty,
.content .customer-directory-row--empty,
.content .settings-empty,
.content .lookup-empty,
.content .order-empty,
.content .empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: var(--ui-radius);
  background: #fbfdff;
  color: var(--ui-muted);
  padding: 14px;
  font-size: 13px;
  line-height: 1.4;
}

.content .crm-empty strong,
.content .hp-empty-title,
.content .empty-state-title {
  color: var(--ui-text);
  font-size: 14px;
  font-weight: 800;
}

.content .crm-tabs,
.content .settings-tabs,
.content .subscription-area-tabs,
.content .integration-tabs,
.content [role="tablist"]:not(.tabs) {
  display: flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 0;
  border-bottom: 1px solid var(--ui-border);
  border-radius: 0;
  background: transparent;
  padding: 0 2px;
  scrollbar-width: none;
}

.content .crm-tabs::-webkit-scrollbar,
.content .settings-tabs::-webkit-scrollbar,
.content .subscription-area-tabs::-webkit-scrollbar,
.content .integration-tabs::-webkit-scrollbar,
.content [role="tablist"]:not(.tabs)::-webkit-scrollbar {
  display: none;
}

.content .crm-tabs [data-crm-tab],
.content .settings-tabs button,
.content .subscription-area-tabs button,
.content .integration-tabs button,
.content [role="tablist"]:not(.tabs) button {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 34px;
  border: 1px solid transparent;
  border-bottom-color: var(--ui-border);
  border-radius: var(--ui-radius) var(--ui-radius) 0 0;
  background: transparent;
  color: var(--ui-muted-2);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: -1px;
  white-space: nowrap;
  box-shadow: none;
}

.content .crm-tabs [data-crm-tab].active,
.content .settings-tabs button.active,
.content .subscription-area-tabs button.active,
.content .integration-tabs button.active,
.content [role="tablist"]:not(.tabs) button.active,
.content [role="tablist"]:not(.tabs) button[aria-selected="true"] {
  background: #fff;
  border-color: var(--ui-border);
  border-bottom-color: #fff;
  color: var(--ui-text);
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.content .admin-mobile-section-tabs {
  display: none;
}

.content .admin-mobile-section-hidden {
  display: none !important;
}

.content .admin-mobile-section-tabs[data-admin-section-tabs-mode="always"] {
  display: flex;
  gap: 5px;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  margin: 8px 0 10px;
  padding: 0 1px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-bottom: 1px solid var(--ui-border);
  scrollbar-width: none;
}

.content .admin-mobile-section-tabs[data-admin-section-tabs-mode="always"]::-webkit-scrollbar {
  display: none;
}

.content .admin-mobile-section-tabs[data-admin-section-tabs-mode="always"] button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-bottom-color: var(--ui-border);
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--ui-muted-2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: -1px;
  white-space: nowrap;
  box-shadow: none;
}

.content .admin-mobile-section-tabs[data-admin-section-tabs-mode="always"] button.active,
.content .admin-mobile-section-tabs[data-admin-section-tabs-mode="always"] button[aria-selected="true"] {
  background: #fff;
  border-color: var(--ui-border);
  border-bottom-color: #fff;
  color: var(--ui-text);
}

@media (max-width: 720px) {
  .content .admin-mobile-section-tabs {
    display: flex;
    gap: 6px;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    margin: 10px 0 12px;
    padding: 0 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border-bottom: 1px solid var(--ui-border);
    scrollbar-width: none;
  }

  .content .admin-mobile-section-tabs::-webkit-scrollbar {
    display: none;
  }

  .content .admin-mobile-section-tabs button {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-height: 34px;
    border: 1px solid transparent;
    border-bottom-color: var(--ui-border);
    border-radius: var(--ui-radius) var(--ui-radius) 0 0;
    background: transparent;
    color: var(--ui-muted-2);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: -1px;
    white-space: nowrap;
    box-shadow: none;
  }

  .content .admin-mobile-section-tabs button.active,
  .content .admin-mobile-section-tabs button[aria-selected="true"] {
    background: #fff;
    border-color: var(--ui-border);
    border-bottom-color: #fff;
    color: var(--ui-text);
  }

  .content .integrations-list[role="tablist"] {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, max-content);
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    padding: 0 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border: 0;
    border-bottom: 1px solid var(--ui-border);
    border-radius: 0;
    background: transparent;
  }

  .content .integrations-list[role="tablist"] .integration-item {
    width: auto;
    min-height: 34px;
    padding: 7px 9px;
    border-radius: var(--ui-radius) var(--ui-radius) 0 0;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }

  .content .integrations-list[role="tablist"] .integration-item-title {
    font-size: 13px;
  }

  .content .integrations-list[role="tablist"] .integration-item-state {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    padding: 1px 6px;
  }
}

.content .b2b-orders-page > .ops-page-head {
  align-items: center;
  margin-bottom: 8px;
}

@media (min-width: 961px) {
  .content .b2b-orders-head.admin-page-head-compact {
    min-height: 32px;
    justify-content: space-between;
  }

  .content .b2b-orders-head.admin-page-head-compact .ops-page-copy {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
  }
}

.content .b2b-orders-head .ops-page-copy {
  gap: 2px;
}

.content .b2b-orders-head h2 {
  font-size: 20px;
}

.content .b2b-orders-head .ops-page-actions .action {
  min-height: 32px;
  padding: 6px 12px;
}

.content .b2b-orders-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 6px;
}

.content .b2b-orders-kpi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--ui-border);
  border-radius: 7px;
  background: #fff;
  color: var(--ui-muted-2);
  font-size: 12px;
  line-height: 1.2;
}

.content .b2b-orders-kpi strong {
  color: var(--ui-text);
  font-size: 13px;
}

.content .b2b-orders-orderbar {
  display: flex;
  align-items: center;
  max-width: 520px;
  margin: 8px 0;
}

.content .b2b-orders-orderbar input {
  width: 100%;
  min-width: 0;
}

.content .b2b-orders-table-wrap {
  margin-top: 8px;
}

.content .b2b-orders-detail-panel {
  margin-top: 8px;
  padding: 12px;
}

.content .b2b-orders-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  align-items: end;
}

.content .b2b-orders-payment-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  align-items: stretch;
  margin-top: 10px;
}

.content .b2b-orders-payment-actions .action,
.content .b2b-orders-payment-actions .btn-ghost {
  min-height: 32px;
  padding: 6px 10px;
}

@media (max-width: 720px) {
  .content .b2b-orders-page > .ops-page-head {
    gap: 8px;
  }

  .content .b2b-orders-head .ops-page-actions,
  .content .panel.mobile-topbar-title-panel .b2b-orders-head.mobile-topbar-page-head .ops-page-actions {
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
  }

  .content .b2b-orders-head .ops-page-actions .action,
  .content .panel.mobile-topbar-title-panel .b2b-orders-head.mobile-topbar-page-head .ops-page-actions > .action {
    width: auto !important;
    flex: 0 0 auto !important;
    min-height: 30px;
    padding: 5px 12px;
  }

  .content .b2b-orders-head h2 {
    font-size: 18px;
  }

  .content .b2b-orders-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .content .b2b-orders-kpi {
    justify-content: space-between;
    padding: 5px 7px;
  }

  .content .b2b-orders-orderbar {
    max-width: none;
  }

  .content .b2b-orders-payment-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.content .crm-main {
  background: #fff;
}

.content .crm-header {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.content .crm-header-shell {
  align-items: center;
  gap: 8px;
}

.content .crm-customer-identity {
  align-items: baseline;
  display: flex;
  flex: 1 1 auto;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 7px 10px;
  min-width: 0;
}

.content .crm-customer-identity h3 {
  font-size: 16px;
}

.content .crm-contact-line {
  margin-top: 0;
}

.content .crm-contact-copy {
  width: 22px;
  height: 22px;
  border-radius: var(--ui-radius-sm);
  background: #fff;
}

.content .crm-contact-copy svg {
  height: 12px;
  width: 12px;
}

.content .crm-contact-company,
.content .crm-contact-muted {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.content .crm-tabs-top {
  margin-top: 8px;
}

.content .crm-views {
  border: 1px solid var(--ui-border);
  border-top: 0;
  border-radius: 0 0 var(--ui-radius) var(--ui-radius);
  padding: 10px;
}

.content .crm-summary-strip {
  align-items: stretch;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 0 0 10px;
  overflow: hidden;
}

.content .crm-summary-strip .ops-summary-pill {
  border: 0;
  border-right: 1px solid #e6edf5;
  border-radius: 0;
  box-shadow: none;
  min-height: 34px;
  padding: 6px 10px;
}

.content .crm-summary-strip .ops-summary-pill:last-child {
  border-right: 0;
}

.content .crm-search-row {
  align-items: flex-end;
}

.content .crm-search-row > button {
  align-self: flex-end;
}

.modal-card,
.hp-modal-card,
.hp-modal-card--wide,
.shipping-service-modal-card,
.staff-modal,
.content .modal-card,
.content .hp-modal-card,
.content .hp-modal-card--wide,
.content .shipping-service-modal-card,
.content .staff-modal {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.modal-head,
.staff-modal-head {
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f7;
}

.modal-head h3,
.staff-modal-head h3 {
  font-size: 18px;
  line-height: 1.2;
}

.modal-actions-end,
.modal-actions-between,
.staff-modal-actions {
  gap: 8px;
  padding-top: 8px;
}

.inline-help-popover {
  border-radius: var(--ui-radius);
}

@media (max-width: 960px) {
  .content h1 {
    font-size: 20px;
  }

  .content h2 {
    font-size: 18px;
  }

  .content h3 {
    font-size: 16px;
  }

  .content .card,
  .content .ops-surface,
  .content .ops-toolbar-surface,
  .content .settings-section-card,
  .content .subscription-section-block,
  .content .subscription-plan-step,
  .content .crm-block,
  .content .crm-main,
  .content .lookup-card,
  .content .staff-surface {
    padding: 10px;
  }

  .content .row,
  .content .grid,
  .content .ops-filter-bar,
  .content .staff-form-grid,
  .content .settings-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .content input:not([type="checkbox"]):not([type="radio"]),
  .content select,
  .content textarea {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  .content .ops-page-actions,
  .content .ops-surface-actions,
  .content .staff-surface-actions,
  .content .settings-section-actions,
  .content .subscription-action-row,
  .content .inline-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .content {
    padding: 8px;
  }

  .content .card,
  .content .ops-surface,
  .content .ops-toolbar-surface,
  .content .settings-section-card,
  .content .subscription-section-block,
  .content .crm-block,
  .content .staff-surface {
    padding: 8px;
  }

  .content .ops-summary-strip,
  .content .crm-summary-strip,
  .content .staff-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .content button,
  .content a.action,
  .content .btn-ghost,
  .content .btn-danger {
    min-height: 36px;
  }

  .modal,
  .hp-modal-overlay,
  .staff-modal-backdrop {
    padding: 8px;
  }
}

.prometheus-feedback-launcher {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 40;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.72;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  transition: background 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.prometheus-feedback-launcher:hover,
.prometheus-feedback-launcher:focus-visible {
  background: rgba(15, 23, 42, 0.9);
  opacity: 1;
}

body.locked .prometheus-feedback-launcher {
  display: none;
}

.auth-card input,
.auth-card button {
  font-size: 16px;
  min-height: 42px;
}

.prometheus-feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.prometheus-feedback-modal.show {
  display: flex;
}

.prometheus-feedback-card {
  width: min(560px, 100%);
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.22);
}

.prometheus-feedback-head,
.prometheus-feedback-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.prometheus-feedback-head h3 {
  margin: 0;
}

.prometheus-feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.prometheus-feedback-card label {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.prometheus-feedback-card textarea {
  min-height: 130px;
  resize: vertical;
}

.prometheus-feedback-check {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}

.prometheus-feedback-check input {
  width: auto;
}

@media (max-width: 560px) {
  .prometheus-feedback-launcher {
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    z-index: 30;
    min-height: 22px;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 10px;
    line-height: 1.1;
    opacity: 0.52;
    box-shadow: none;
  }

  .prometheus-feedback-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .prometheus-feedback-modal {
    align-items: flex-end;
    padding: 8px;
  }

  .prometheus-feedback-card {
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
  }

  .prometheus-feedback-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .prometheus-feedback-actions > * {
    width: 100%;
  }

  .auth-screen {
    align-items: flex-start;
    min-height: 100dvh;
    padding: max(18px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .auth-shell {
    width: 100%;
  }

  .auth-card {
    border-radius: 10px;
    margin: 0;
    padding: 14px;
  }

  .auth-card .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-card button {
    width: 100%;
  }
}
