* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: #172033; background: #f4f6f8; }
a { color: #005ca8; }
.topbar { min-height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; background: #ffffff; border-bottom: 1px solid #dde3ea; }
.brand { font-weight: 700; }
.session { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.hero { position: relative; min-height: 360px; height: 40vh; max-height: 560px; display: flex; align-items: end; overflow: hidden; background: #111827; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.66), rgba(0,0,0,.28), rgba(0,0,0,.12)); }
.hero h1 { position: relative; max-width: 820px; margin: 0; padding: 0 24px 42px; color: #fff; font-size: clamp(34px, 5vw, 62px); line-height: 1.02; letter-spacing: 0; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.container { max-width: 1120px; margin: 28px auto 64px; padding: 0 20px; }
.panel { background: #fff; border: 1px solid #dde3ea; border-radius: 8px; padding: 24px; box-shadow: 0 8px 22px rgba(20,34,52,.06); }
.panel--login { max-width: 440px; margin: 70px auto; }
.login-shell { padding: 20px; }
h1, h2 { margin-top: 0; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.action-card { display: block; min-height: 112px; padding: 18px; border: 1px solid #cbd5e1; border-radius: 8px; text-decoration: none; color: #172033; background: #f9fbfd; }
.action-card:hover { border-color: #005ca8; background: #eef7ff; }
.action-card strong { display: block; font-size: 20px; margin-bottom: 8px; }
.action-card span, .hint, .privacy { color: #5b6675; font-size: 14px; }
.form { display: grid; gap: 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 7px; font-weight: 700; }
.checkbox-field { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px 10px; margin-top: 12px; font-weight: 700; line-height: 1.35; }
.checkbox-field input { width: auto; min-height: 0; margin-top: 2px; }
.checkbox-field span { flex: 1; }
.checkbox-field .field-error { flex: 0 0 100%; margin-left: 28px; }
input, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #b9c4d0; border-radius: 6px; font: inherit; background: #fff; }
input:focus, select:focus { outline: 3px solid #b9ddff; border-color: #005ca8; }
[aria-invalid="true"] { border-color: #b42318; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.check input { width: 18px; min-height: 18px; margin-top: 2px; }
button, .button { width: fit-content; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 6px; background: #005ca8; color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
button:disabled { opacity: .7; cursor: wait; }
.button.secondary { background: #435166; }
.back { display: inline-block; margin-bottom: 18px; }
.alert, .form-error { margin: 0 0 18px; padding: 12px 14px; border-radius: 6px; }
.alert--success { background: #e2f7e8; color: #185c2f; }
.alert--error, .form-error { background: #fff0ee; color: #9a2217; }
.panel-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.table-search { max-width: 300px; min-height: 36px; margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
.admin-table-scroll-top { overflow-x: auto; overflow-y: hidden; height: 16px; margin: 8px 0 0; border: 1px solid #dbe4ee; border-bottom: 0; border-radius: 6px 6px 0 0; background: #f8fafc; }
.admin-table-scroll-top [data-admin-scroll-spacer] { height: 1px; }
.admin-table-wrap { border-top-left-radius: 0; border-top-right-radius: 0; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 6px 7px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
th { background: #f8fafc; }

.sortable-heading a { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.sortable-heading a:hover { color: #005ca8; text-decoration: underline; }
.sortable-heading.sorted { background: #e8f2fb; color: #0f4f86; }
.handover-heading.sortable-heading.sorted { background: #dff2e6; color: #1f5f3a; }
.muted-row { color: #64748b; background: #fbfcfd; }
@media (max-width: 720px) {
  .topbar { padding: 0 16px; }
  .hero { min-height: 300px; height: 40vh; }
  .hero h1 { padding: 0 18px 28px; }
  .grid { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
}

.summary { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; margin: 20px 0; padding: 18px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; }
.summary dt { font-weight: 700; color: #435166; }
.summary dd { margin: 0; }
@media (max-width: 720px) { .summary { grid-template-columns: 1fr; } }

.fieldset { margin: 0; padding: 18px; border: 1px solid #d8e0e8; border-radius: 8px; background: #fbfcfd; }
.fieldset legend { padding: 0 8px; font-weight: 700; color: #243246; }

.lookup-card { align-self: end; min-height: 44px; padding: 12px; border: 1px solid #d8e0e8; border-radius: 8px; background: #f8fafc; color: #5b6675; font-size: 14px; }
.lookup-card strong { display: block; margin-bottom: 8px; color: #172033; }
.lookup-card dl { display: grid; grid-template-columns: 88px 1fr; gap: 5px 10px; margin: 0; }
.lookup-card dt { font-weight: 700; color: #435166; }
.lookup-card dd { margin: 0; }

.lookup-details summary { cursor: pointer; font-weight: 700; color: #172033; }
.lookup-details summary:focus { outline: 3px solid #b9ddff; outline-offset: 3px; border-radius: 4px; }
.lookup-details dl { margin-top: 10px; }
.lookup-card--matched { border-color: #8bc8a2; background: #effaf2; }
.lookup-card--missing { border-color: #efb5ad; background: #fff4f2; color: #9a2217; }
.lookup-card--loading { border-color: #b9d7f2; background: #eef7ff; }

.table-save { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.table-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.inline-delete-form { display: inline; margin: 0; }
.table-delete { min-height: 30px; padding: 4px 9px; font-size: 12px; background: #9a2217; }

.admin-table-select { min-width: 58px; min-height: 28px; padding: 2px 5px; font-size: 11px; font-weight: 700; }
.admin-table-input { width: 100%; min-width: 90px; min-height: 28px; padding: 2px 5px; border: 1px solid #b8c9db; border-radius: 4px; background: #fff; color: #172033; font: inherit; }
.admin-table-input:focus { outline: 2px solid #85bff0; outline-offset: -1px; }

.status-cell { font-weight: 700; box-shadow: inset 4px 0 0 rgba(0,0,0,.12); }
.status--new { background: #eef7ff; color: #075985; }
.status--pending, .status--booked, .status--booked-specialist, .status--survey-ongoing { background: #fff7df; color: #7a4b00; }
.status--contacted, .status--waiting-on-customer-response, .status--waiting-on-more-info-from-customer { background: #fff1e7; color: #8a3b00; }
.status--approved, .status--complete, .status--installed { background: #e8f7ee; color: #17643a; }
.status--declined, .status--cancelled, .status--no-response { background: #fff1f0; color: #9a2217; }



.admin-view-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.admin-view-tabs .button.is-active { background: #172033; color: #fff; border-color: #172033; }
.eligibility-cell { font-weight: 700; text-align: center; min-width: 72px; }
.comments-cell { min-width: 180px; white-space: normal; }

.admin-summary { margin: 14px 0 16px; max-width: 620px; }

.admin-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; margin: 14px 0 16px; }
.admin-dash .admin-summary { margin: 0; }
.admin-summary--inside { margin-top: 14px; }
.epower-card, .campaign-tracker-card, .weekly-report-card { border: 1px solid #dbe4ee; border-radius: 8px; padding: 14px; background: #fbfcfd; }
.epower-card h3, .campaign-tracker-card h3, .weekly-report-card h3 { margin: 0 0 8px; font-size: 17px; }
.campaign-tracker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.campaign-tracker-kpi { min-height: 82px; padding: 10px; border: 1px solid #001e50; border-radius: 7px; background: #001e50; text-align: center; }
.campaign-tracker-kpi span { display: flex; align-items: center; justify-content: center; min-height: 30px; color: #dfeaf6; font-size: 11px; font-weight: 700; line-height: 1.2; }
.campaign-tracker-kpi strong { display: block; margin-top: 8px; color: #ffffff; font-size: 26px; line-height: 1; }
.campaign-tracker-kpi:nth-child(4n+2) { background: #002b66; border-color: #002b66; }
.campaign-tracker-kpi:nth-child(4n+3) { background: #003b73; border-color: #003b73; }
.campaign-tracker-kpi:nth-child(4n+4) { background: #0b4f8a; border-color: #0b4f8a; }
.weekly-report-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.weekly-report-kpi { min-height: 82px; padding: 10px; border: 1px solid #c8d6e4; border-radius: 7px; background: #f5f8fb; text-align: center; }
.weekly-report-kpi span { display: flex; align-items: center; justify-content: center; min-height: 30px; color: #243246; font-size: 11px; font-weight: 700; line-height: 1.2; }
.weekly-report-kpi strong { display: block; margin-top: 8px; color: #001e50; font-size: 24px; line-height: 1; }
.epower-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 8px; margin-top: 12px; }
.epower-counts span { display: block; padding: 9px; border: 1px solid #dbe4ee; border-radius: 7px; background: #fff; color: #5b6675; font-size: 13px; }
.epower-counts--single { grid-template-columns: minmax(120px, 180px); }
.epower-counts strong { display: block; color: #172033; font-size: 20px; line-height: 1; }
.epower-counts .diff-new { background: #e8f7ee; border-color: #9cd7b0; }
.epower-counts .diff-changed { background: #fff7df; border-color: #f1d37a; }
.epower-counts .diff-removed { background: #fff1f0; border-color: #efb5ad; }
.epower-changes { margin: 0 0 16px; border: 1px solid #dbe4ee; border-radius: 8px; background: #fff; }
.epower-changes summary { cursor: pointer; padding: 12px 14px; font-weight: 700; color: #172033; }
.epower-changes summary:focus { outline: 3px solid #b9ddff; outline-offset: 3px; }
.epower-changes .table-wrap { border-top: 1px solid #e2e8f0; }
@media (max-width: 900px) { .admin-dash { grid-template-columns: 1fr; } }


.summary-toggle { display: inline-flex; gap: 4px; margin: 0 0 10px; padding: 3px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; }
.summary-toggle__button { min-height: 32px; padding: 6px 10px; border-radius: 6px; background: transparent; color: #435166; }
.summary-toggle__button.is-active { background: #005ca8; color: #fff; }
.summary-toggle__button:disabled { opacity: .45; cursor: not-allowed; }
.summary-table.is-hidden { display: none; }

.summary-table { width: 100%; min-width: 0; border: 1px solid #dbe4ee; border-radius: 8px; overflow: hidden; }
.summary-table th, .summary-table td { padding: 7px 10px; }
.summary-table thead th, .summary-table tfoot th { background: #f0f4f8; color: #243246; }
.summary-table td:last-child, .summary-table th:last-child { text-align: right; }
.summary-status { border-radius: 4px; font-weight: 700; }


.epower-import-col { background: #f7fbff; color: #27445f; }

.epower-status-summary { font-weight: 700; box-shadow: inset 4px 0 0 rgba(0,0,0,.14); }
.epower-status-summary.status--new-record { background: #eef7ff; color: #075985; }
.epower-status-summary.status--booked,
.epower-status-summary.status--booked-specialist,
.epower-status-summary.status--survey-ongoing { background: #fff7df; color: #7a4b00; }
.epower-status-summary.status--waiting-on-customer-response,
.epower-status-summary.status--waiting-on-more-info-from-customer { background: #fff1e7; color: #8a3b00; }
.epower-status-summary.status--installed { background: #e8f7ee; color: #17643a; }
.epower-status-summary.status--cancelled,
.epower-status-summary.status--no-response { background: #fff1f0; color: #9a2217; }
.epower-import-col.is-hidden { display: none; }

#adminTable .epower-field-status {
  width: 60px;
  max-width: 60px;
  min-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 12px; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 0; }
.admin-tools .table-search { margin-bottom: 0; }
.admin-search-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.pagination-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.pagination-bar--bottom { margin-top: 12px; }
.pagination-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pagination-current { color: #435166; font-weight: 700; font-size: 12px; }
#adminTable.handover-hidden .handover-col { display: none; }
#adminTable.handover-focus .cardata-col,
#adminTable.handover-focus .validation-col,
#adminTable.handover-focus .flogas-status-col,
#adminTable.handover-focus .epower-import-col { display: none; }
#adminTable.epower-hidden .epower-import-col { display: none; }

.handover-heading { background: #eef7f1; color: #1f5f3a; }
.handover-cell { background: #f3fbf6; color: #244a34; }
.handover-flag { font-weight: 700; }
.handover-flag--yes { color: #17643a; background: #eef7f1; }
.handover-flag--no { color: #9a2217; background: #fff4f2; }

.mismatch-cell { background: #fff1f0; box-shadow: inset 0 0 0 2px #d92d20; }
.mismatch-cell:hover, .mismatch-cell:focus { background: #ffe7e3; box-shadow: inset 0 0 0 2px #b42318; }

#adminTable { font-size: 11px; }

#adminTable .form-data-col { background: #f2f8ff; }
#adminTable .cardata-col { background: #e4f1ff; color: #173f66; }
#adminTable .validation-col { background: #d7eaff; color: #132f4f; }
#adminTable th.form-data-col, #adminTable th.cardata-col, #adminTable th.validation-col { color: #172033; }
#adminTable .cardata-col + .validation-col, #adminTable .validation-col + .handover-cell { border-left: 2px solid #b8d3ef; }
#adminTable th, #adminTable td { white-space: nowrap; }
#adminTable th:nth-child(1), #adminTable td:nth-child(1) { max-width: 54px; overflow: hidden; text-overflow: ellipsis; }

.container--wide { max-width: none; width: 100%; padding-left: 14px; padding-right: 14px; }
.container--wide .panel { border-radius: 0; }

.review-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; }
.review-actions form { margin: 0; }
.review-lookup { margin-top: 18px; }

.field-error { min-height: 16px; color: #b42318; font-size: 12px; font-weight: 400; line-height: 1.3; }
.field-error:empty { display: none; }

.lookup-card--warning { border-color: #d92d20; background: #fff1f0; color: #9a2217; box-shadow: inset 0 0 0 1px #d92d20; }
.lookup-warning-message { margin: 10px 0 0; font-weight: 700; color: #9a2217; }
.change-comm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.change-comm-field { display: grid; gap: 10px; min-width: 0; }
.change-comm-field .lookup-card { align-self: stretch; min-height: 128px; }
.change-comm-field .lookup-card:empty { display: none; }
@media (max-width: 760px) { .change-comm-grid { grid-template-columns: 1fr; } }

.readonly-field { display: grid; gap: 7px; font-weight: 700; }
.readonly-field strong { min-height: 44px; display: flex; align-items: center; padding: 10px 12px; border: 1px solid #d8e0e8; border-radius: 6px; background: #f8fafc; font-weight: 700; }


.diff-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 18px 0; }
.diff-summary div { padding: 12px; border: 1px solid #dbe4ee; border-radius: 8px; background: #f8fafc; }
.diff-summary strong { display: block; font-size: 22px; line-height: 1; color: #172033; }
.diff-summary span { display: block; margin-top: 5px; color: #5b6675; font-size: 13px; }
.diff-summary .diff-new { background: #e8f7ee; border-color: #9cd7b0; }
.diff-summary .diff-changed { background: #fff7df; border-color: #f1d37a; }
.diff-summary .diff-removed { background: #fff1f0; border-color: #efb5ad; }
.diff-table td { white-space: normal; }
.diff-row--new { background: #f0fbf4; }
.diff-row--changed { background: #fffaf0; }
.diff-row--removed { background: #fff5f3; color: #7f1d1d; }
.field-diff-list { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 6px 12px; margin: 0; }
.field-diff-list dt { font-weight: 700; color: #435166; }
.field-diff-list dd { margin: 0; }
.field-diff-list dd span { color: #7f1d1d; text-decoration: line-through; }
.field-diff-list dd strong { color: #17643a; }

.diff-row[data-filter-email] { cursor: pointer; }
.diff-row[data-filter-email]:hover { box-shadow: inset 0 0 0 2px #85bff0; }
.diff-row[data-filter-email]:focus { outline: 3px solid #b9ddff; outline-offset: -3px; }
.weekly-report-inputs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: end; margin: 8px 0 12px; }
.weekly-report-inputs label { display: grid; gap: 4px; color: #243246; font-size: 11px; font-weight: 700; line-height: 1.2; }
.weekly-report-inputs input, .weekly-report-inputs textarea { min-height: 34px; padding: 7px 9px; font-size: 12px; }
.weekly-report-inputs textarea { resize: vertical; }
.weekly-report-inputs button { min-height: 34px; padding: 7px 12px; }
.weekly-report-kpi small { display: block; margin-top: 6px; color: #5d6b7c; font-size: 10px; line-height: 1.25; }
@media (max-width: 900px) { .weekly-report-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .weekly-report-inputs { grid-template-columns: 1fr; } }
.admin-downloads { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.admin-tab-divider { width: 1px; align-self: stretch; background: #cbd5e1; margin: 0 2px; }
.deletion-reason-cell { min-width: 220px; white-space: normal; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(17, 24, 39, .55); }
.modal-backdrop[hidden] { display: none; }
.modal-panel { width: min(480px, 100%); padding: 20px; border-radius: 8px; background: #fff; box-shadow: 0 22px 48px rgba(0, 0, 0, .28); }
.modal-panel h3 { margin: 0 0 8px; }
.modal-panel textarea { width: 100%; min-height: 120px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.action-card--count { position: relative; padding-right: 54px; }
.count-pill { position: absolute; top: 10px; right: 10px; min-width: 28px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #001e50; color: #fff !important; font-size: 13px !important; font-weight: 700; line-height: 1; }

.admin-shell { padding-top: 18px; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid #dbe4ee; }
.admin-header h2 { margin: 0 0 10px; }
.admin-section-tabs { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; }
.admin-section-tabs .button, .admin-view-tabs .button, .admin-tools .button, .pagination-links .button, .admin-downloads .button { min-height: 32px; padding: 6px 10px; font-size: 12px; border-radius: 6px; }
.admin-section-tabs .button.is-active, .admin-view-tabs .button.is-active { background: #001e50; color: #fff; }
.admin-downloads { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.admin-table-head { padding: 10px; border: 1px solid #dbe4ee; border-radius: 8px; background: #fbfcfd; }
.admin-view-tabs { gap: 6px; }
.admin-tools { gap: 8px; }
.admin-search-form { gap: 6px; }
.admin-tools .table-search { min-height: 32px; padding: 6px 9px; }
.pagination-bar { padding: 6px 0; }
@media (max-width: 760px) {
  .admin-header { display: grid; }
  .admin-downloads { justify-content: flex-start; }
}

.admin-section-tabs .button,
.admin-view-tabs .button,
.admin-tools .button,
.pagination-links .button,
.admin-downloads .button,
.table-save,
.table-delete {
  min-height: 0;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  line-height: 1;
}
.table-save,
.table-delete { height: 28px; padding: 0 9px; }
.table-reactivate { height: 28px; min-height: 0; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 12px; background: #17643a; }
.icon-button { width: 32px; padding: 0; font-size: 14px; }
.admin-search-form { display: grid; grid-template-columns: minmax(220px, 300px) 32px auto; align-items: center; }
.admin-search-form .table-search { width: 100%; }
.admin-search-form .icon-button { color: #fff; line-height: 1; }
.admin-search-form .icon-button:hover { color: #fff; }
@media (max-width: 620px) { .admin-search-form { grid-template-columns: 1fr 32px; } .admin-search-form .button:not(.icon-button) { grid-column: 1 / -1; } }
.admin-section-tabs .button.is-active,
.admin-view-tabs .button.is-active {
  background: #00163d;
  color: #fff;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 255, 255, .12);
  transform: translateY(1px);
}
.admin-section-tabs .button.secondary,
.admin-view-tabs .button.secondary {
  background: #eef2f6;
  color: #243246;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset;
}
.admin-section-tabs .button.secondary:hover,
.admin-view-tabs .button.secondary:hover {
  background: #e2e8f0;
  color: #172033;
}
.admin-section-tabs .button.secondary.is-active,
.admin-view-tabs .button.secondary.is-active {
  background: #00163d;
  color: #fff;
  border-color: #00163d;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.admin-section-tabs .button.secondary,
.admin-view-tabs .button.secondary {
  background: #435166;
  color: #fff;
  border: 1px solid #435166;
  box-shadow: none;
  transform: none;
}
.admin-section-tabs .button.secondary:hover,
.admin-view-tabs .button.secondary:hover {
  background: #344156;
  color: #fff;
}
.admin-section-tabs .button.secondary.is-active,
.admin-view-tabs .button.secondary.is-active {
  background: #e7edf4;
  color: #001e50;
  border-color: #b8c5d3;
  box-shadow: inset 0 2px 5px rgba(36, 50, 70, .28), inset 0 -1px 0 rgba(255, 255, 255, .9);
  transform: translateY(1px);
}
.icon-button svg { width: 15px; height: 15px; display: block; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.admin-section-tabs,
.admin-view-tabs {
  gap: 0;
  padding: 3px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.admin-section-tabs .button.secondary,
.admin-view-tabs .button.secondary {
  border-radius: 0;
  border-right-width: 0;
}
.admin-section-tabs .button.secondary:first-child,
.admin-view-tabs .button.secondary:first-child { border-radius: 5px 0 0 5px; }
.admin-section-tabs .button.secondary:last-child,
.admin-view-tabs .button.secondary:last-child { border-right-width: 1px; border-radius: 0 5px 5px 0; }
.admin-view-tabs .admin-tab-divider { display: none; }
.admin-view-tabs .admin-tab-divider + .button.secondary { border-left-width: 1px; border-radius: 5px 0 0 5px; margin-left: 6px; }
.admin-view-tabs {
  padding: 0;
  border: 0;
  background: transparent;
  gap: 0;
}
.admin-view-tabs .button.secondary { border-right-width: 0; }
.admin-view-tabs .button.secondary:nth-of-type(1) { border-radius: 6px 0 0 6px; }
.admin-view-tabs .button.secondary:nth-of-type(2) { border-right-width: 1px; border-radius: 0 6px 6px 0; }
.admin-view-tabs .button.secondary:nth-of-type(3) { margin-left: 8px; border-left-width: 1px; border-radius: 6px 0 0 6px; }
.admin-view-tabs .button.secondary:nth-of-type(4) { border-right-width: 1px; border-radius: 0 6px 6px 0; }
.admin-view-tabs .hint { margin-left: 12px; align-self: center; white-space: nowrap; }
.admin-section-tabs .button.secondary:first-of-type { border-radius: 6px 0 0 6px; }
.admin-section-tabs .button.secondary:last-of-type { border-right-width: 1px; border-radius: 0 6px 6px 0; }
.admin-section-tabs .button.secondary,
.admin-view-tabs .button.secondary,
.admin-section-tabs .button.secondary.is-active,
.admin-view-tabs .button.secondary.is-active {
  transform: none;
  box-sizing: border-box;
  vertical-align: top;
}
.admin-section-tabs .button.secondary,
.admin-view-tabs .button.secondary {
  background: #d7e0ea;
  color: #243246;
  border-color: #b8c5d3;
}
.admin-section-tabs .button.secondary:hover,
.admin-view-tabs .button.secondary:hover {
  background: #c9d5e1;
  color: #172033;
}
.audit-log-table td { vertical-align: top; }
.audit-subtext { display: block; margin-top: 2px; color: #64748b; font-size: 11px; line-height: 1.2; }

#adminTable .flogas-status-col { background: #401f74; color: #ffffff; font-weight: 700; }
#adminTable th.flogas-status-col { background: #32165d; color: #ffffff; }
#adminTable .flogas-status-col a { color: #ffffff; }

.model-mapping-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin: 12px 0 16px; }
.model-mapping-form label { min-width: 160px; font-size: 12px; }
.model-mapping-form input { min-height: 34px; }
.model-mapping-table td { vertical-align: middle; }
.inline-model-form { margin: 0; }

.inline-admin-action { display: inline; margin: 0; }
.inline-admin-action button { min-height: 32px; padding: 6px 10px; font-size: 12px; }

.container--flogas .panel {
  border-color: #e6d8ef;
  box-shadow: 0 10px 28px rgba(91, 42, 134, .10);
}
.container--flogas .action-card {
  border-color: #d9c5e6;
  background: #fbf7ff;
  color: #35104f;
}
.container--flogas .flogas-action-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.container--flogas .flogas-download-note {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding: 12px 14px;
  border-left: 4px solid #00b8df;
  border-radius: 6px;
  background: #f2fbfd;
  color: #32165d;
  font-size: 14px;
  line-height: 1.45;
}
.container--flogas .action-card--download {
  grid-column: 1 / -1;
}
.container--flogas .action-card strong {
  color: #32165d;
}
.container--flogas .action-card span:not(.count-pill) {
  color: #6c4b7d;
}
.container--flogas .action-card:hover {
  border-color: #00b8df;
  background: #f3e7fb;
  box-shadow: inset 0 0 0 1px #00b8df;
}
.container--flogas button,
.container--flogas .button {
  background: #401f74;
  color: #ffffff;
}
.container--flogas button:hover,
.container--flogas .button:hover {
  background: #32165d;
}
.container--flogas .button.secondary {
  background: #59308f;
}
.container--flogas .count-pill {
  background: #00b8df;
  color: #ffffff !important;
}
.container--flogas input:focus,
.container--flogas select:focus {
  outline-color: #b9f2fb;
  border-color: #00b8df;
}

@media (max-width: 680px) {
  .container--flogas .flogas-action-group {
    grid-template-columns: 1fr;
  }
}

.table-checkbox { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.table-checkbox input { width: auto; min-height: 0; margin: 0; }
.admin-table-input[readonly] { background: #eef4fb; color: #526173; cursor: not-allowed; }

.handover-verify-cell { text-align: center; }
