/* Audit fixes: authenticated shell, ordinary settings and log presentation. */
@layer lunora-grid {
  body.lunora-admin-v3 #app .v3-topbar > .v3-mobile-nav-open {position:static!important;left:auto!important;top:auto!important;flex:0 0 32px;z-index:auto!important;}
  body.lunora-admin-v3 #login-screen button.forgot-link {width:auto;min-height:32px;margin:10px auto 0;padding:4px 0;border:0;background:transparent;color:var(--la-primary,#5570f1);font:400 14px/20px Inter,Arial,sans-serif;text-align:center;}
  body.lunora-admin-v3 #login-screen button.forgot-link:focus-visible {outline:2px solid #5570f1;outline-offset:4px;border-radius:4px;}
  body.lunora-admin-v3 .v21-profile-dialog #page-profile>.page-header {display:grid!important;grid-template-columns:minmax(0,1fr) 32px!important;align-items:start!important;gap:12px!important;min-height:32px!important;}
  body.lunora-admin-v3 .v21-profile-dialog #page-profile>.page-header>.page-title {min-width:0!important;white-space:normal!important;font:500 20px/28px Inter,Arial,sans-serif!important;}
  body.lunora-admin-v3 .v21-profile-dialog .v21-profile-close {grid-column:2;grid-row:1;justify-self:end;}
  body.lunora-admin-v3 .v21-profile-dialog #page-profile .settings-card-foot {background:transparent!important;}

  /* Pair the two short forms; complex forms have their own content-sized rows. */
  body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing>.v8-settings-sections {grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important;gap:16px!important;}
  body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing .v3-settings-prices,
  body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing #settings-selfsleep-limits-card,
  body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing #settings-birthday-card {grid-column:1/-1!important;}
  body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing #settings-trial-card,
  body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing #settings-referral-card {grid-column:auto!important;align-self:stretch!important;}
  body.lunora-admin-v3 #app #page-settings.lfg-page .v3-settings-prices>.v3-settings-rub {gap:16px!important;align-items:stretch!important;}
  body.lunora-admin-v3 #app #page-settings.lfg-page .v3-settings-prices .settings-card-foot {width:100%!important;align-self:stretch!important;justify-content:flex-start!important;margin:0!important;}
  body.lunora-admin-v3 #app #page-settings.lfg-page .settings-card-head {align-items:center!important;}
  body.lunora-admin-v3 #app #page-settings #new-selfsleep-trial-limit {background:#f4f5fa!important;color:var(--audit-muted,#687083)!important;border-color:#e1e2e9!important;cursor:default;}
  body.lunora-admin-v3 #app #page-settings .audit-field-help {margin:6px 0 0!important;color:var(--audit-muted,#687083)!important;font:400 12px/18px Inter,Arial,sans-serif!important;overflow-wrap:anywhere;}
  body.lunora-admin-v3 #app #page-settings .audit-setting-state {display:flex!important;align-items:center;flex-wrap:wrap;gap:6px 10px;grid-column:1/-1;margin:8px 0 0;color:var(--audit-muted,#687083);font:400 12px/18px Inter,Arial,sans-serif;}
  body.lunora-admin-v3 #app #page-settings .audit-setting-state[hidden] {display:none!important;}
  body.lunora-admin-v3 #app #page-settings .audit-setting-state[data-state=error] {color:#b54d4d;}
  body.lunora-admin-v3 #app #page-settings .audit-setting-state[data-state=dirty] {color:#4f63c4;}
  body.lunora-admin-v3 #app #page-settings button.audit-settings-retry {width:auto!important;min-width:0!important;min-height:32px!important;height:32px!important;padding:4px 8px!important;border:1px solid #cfd3d4!important;border-radius:6px!important;background:#fff!important;color:#54596f!important;font:400 12px/18px Inter,Arial,sans-serif!important;}
  body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing #settings-referral-card.settings-card-v2>.settings-card-head>.settings-card-icon {background:#eaf7f1!important;color:#258a70!important;}
  body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing #settings-birthday-card.settings-card-v2>.settings-card-head>.settings-card-icon {background:#fcecf5!important;color:#bc4b89!important;}
  body.lunora-admin-v3 #app #page-settings .v3-settings-testing .settings-card-icon {background:#fff5e8!important;color:#b77922!important;}
  body.lunora-admin-v3 #app #page-settings .v3-settings-info .settings-card-icon {background:#eef0ff!important;color:#5570f1!important;}

  /* Fields form one explicit row; diagnostics and Apply form the action row. */
  body.lunora-admin-v3 #app #page-errors .errors-toolbar-main {display:grid!important;grid-template-columns:minmax(200px,2fr) repeat(3,minmax(150px,1fr))!important;gap:12px!important;align-items:end!important;}
  body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.v3-page-field {width:100%!important;min-width:0!important;max-width:none!important;}
  body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.v3-page-field:first-child :is(.la-search,.search-input,#err-search) {width:100%!important;max-width:none!important;}
  body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.errors-toggle {margin:0!important;min-width:0!important;white-space:normal!important;}
  body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.errors-toggle:not(.errors-expected-toggle) {grid-column:1!important;grid-row:2!important;}
  body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.errors-expected-toggle {grid-column:2/4!important;grid-row:2!important;}
  body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>button[onclick="loadErrors(1)"] {grid-column:4!important;grid-row:2!important;justify-self:end!important;}
  body.lunora-admin-v3 #app #page-errors #v3-errors-tabs>button[data-la-tab] {color:var(--audit-muted,#687083)!important;font:400 14px/20px Inter,Arial,sans-serif!important;}
  body.lunora-admin-v3 #app #page-errors #v3-errors-tabs>button[data-la-tab].journal-tab-active {color:#2b2f32!important;}
  body.lunora-admin-v3 #app #page-errors .error-status.new,
  body.lunora-admin-v3 .error-observability-modal .ops-status-pending {background:#eef0ff!important;color:#4f63c4!important;border-radius:6px!important;padding:4px 8px!important;font:400 12px/18px Inter,Arial,sans-serif!important;}
  body.lunora-admin-v3 #app #page-errors .error-status.ok,
  body.lunora-admin-v3 .error-observability-modal .ops-status-success {background:#eaf7f1!important;color:#258a70!important;border-radius:6px!important;padding:4px 8px!important;font:400 12px/18px Inter,Arial,sans-serif!important;}
  body.lunora-admin-v3 #app #page-errors .audit-log-time {display:block;white-space:nowrap;}
  body.lunora-admin-v3 #app #page-errors .audit-log-timezone {display:block;margin-top:2px;color:var(--audit-muted,#687083);font:400 11px/16px Inter,Arial,sans-serif;}
  @media(max-width:1199px) {
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.errors-toggle:not(.errors-expected-toggle) {grid-column:1!important;grid-row:3!important;}
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.errors-expected-toggle {grid-column:2!important;grid-row:3!important;}
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>button[onclick="loadErrors(1)"] {grid-column:2!important;grid-row:4!important;}
  }
  @media(max-width:820px) {
    body.lunora-admin-v3 #app .v3-topbar>.v3-mobile-nav-open {display:flex!important;visibility:visible!important;}
    body.lunora-admin-v3.v3-nav-open #app .v3-topbar>.v3-mobile-nav-open {visibility:hidden!important;}
    body.lunora-admin-v3 #app .v3-topbar {gap:10px!important;}
  }
  @media(max-width:650px) {
    body.lunora-admin-v3 .v21-profile-dialog #page-profile>.page-header>.page-title {font-size:18px!important;line-height:26px!important;}
    body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing>.v8-settings-sections {grid-template-columns:minmax(0,1fr)!important;}
    body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing #settings-trial-card,
    body.lunora-admin-v3 #app #page-settings.lfg-page .v8-settings-pricing #settings-referral-card {grid-column:1/-1!important;}
    body.lunora-admin-v3 #app #page-errors #v3-errors-tabs>button[data-la-tab] {min-height:44px!important;padding:8px 6px!important;white-space:nowrap!important;}
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.v3-page-field:first-child {grid-column:1/-1!important;}
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>#err-platform-filter-wrap {grid-column:1/-1!important;}
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.errors-toggle:not(.errors-expected-toggle) {grid-column:1/-1!important;grid-row:auto!important;}
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.errors-expected-toggle {grid-column:1/-1!important;grid-row:auto!important;}
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>button[onclick="loadErrors(1)"] {grid-column:1/-1!important;grid-row:auto!important;justify-self:end!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table {display:block!important;min-width:0!important;width:100%!important;max-width:100%!important;table-layout:auto!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table thead {display:none!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody {display:grid!important;gap:12px!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr {display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px 12px!important;padding:12px 0!important;width:100%!important;min-width:0!important;border-bottom:1px solid #e7e8f0!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td {display:block!important;min-width:0!important;width:auto!important;max-width:100%!important;padding:0!important;border:0!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:left!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td::before {content:none!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td:nth-child(1) {grid-column:1!important;grid-row:1!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td:nth-child(3) {grid-column:2!important;grid-row:1!important;justify-self:end!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td:nth-child(6) {grid-column:1/-1!important;grid-row:2!important;font-size:14px!important;line-height:20px!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td:nth-child(4) {grid-column:1!important;grid-row:3!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td:nth-child(7) {grid-column:2!important;grid-row:3!important;justify-self:end!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td:nth-child(5) {grid-column:1!important;grid-row:4!important;align-self:center!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td:nth-child(9) {grid-column:2!important;grid-row:4!important;justify-self:end!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td:is(:nth-child(2),:nth-child(8)) {display:none!important;}
    body.lunora-admin-v3 #app #page-errors .errors-table tbody>tr>td.empty {display:block!important;grid-column:1/-1!important;grid-row:auto!important;}
  }
  @media(max-width:359px) {
    body.lunora-admin-v3 #app #page-errors #v3-errors-tabs>button[data-la-tab] {font-size:12px!important;padding-inline:3px!important;}
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main {grid-template-columns:minmax(0,1fr)!important;}
    body.lunora-admin-v3 #app #page-errors .errors-toolbar-main>.v3-page-field {grid-column:1!important;}
  }
}
