:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17202b;
  background: #f7f8f6;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f7f8f6; color: #17202b; font-size: 14px; }
a { color: #0f6b66; text-decoration: none; }
a:hover { color: #0a4f4b; }

#header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 32px;
  background: #102a2c;
  color: white;
  box-shadow: 0 8px 28px rgb(16 42 44 / 12%);
}

#site_title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
#site_title a, #header a { color: white; }
#tabs { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
#tabs li { list-style: none; }
#tabs > li { position: relative; }
#tabs > li > a, #tabs > li > span { display: block; padding: 10px 12px; border-radius: 9px; color: #d3e3e1; font-size: 13px; font-weight: 650; white-space: nowrap; }
#tabs > li > span { cursor: pointer; outline: none; }
#tabs > li.has_nested > span { padding-right: 28px; }
#tabs > li.has_nested > span::after { position: absolute; top: 50%; right: 11px; content: "⌄"; font-size: 13px; transform: translateY(-56%); transition: transform .16s ease; }
#tabs > li.current > a, #tabs > li.current > span, #tabs > li > a:hover, #tabs > li > span:hover, #tabs > li > span:focus { background: rgb(255 255 255 / 12%); color: white; }
#tabs > li.has_nested:hover > span::after, #tabs > li.has_nested:focus-within > span::after { transform: translateY(-42%) rotate(180deg); }
#tabs > li.has_nested > ul {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 80;
  display: none;
  min-width: 220px;
  margin: 0;
  padding: 7px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 12px;
  background: #153638;
  box-shadow: 0 16px 36px rgb(3 20 22 / 28%);
}
#tabs > li.has_nested > ul::before { position: absolute; top: -9px; right: 0; left: 0; height: 10px; content: ""; }
#tabs > li.has_nested:hover > ul, #tabs > li.has_nested:focus-within > ul { display: block; }
#tabs > li.has_nested > ul a { display: block; padding: 10px 11px; border-radius: 8px; color: #d3e3e1; font-size: 12px; font-weight: 650; white-space: nowrap; }
#tabs > li.has_nested > ul a:hover, #tabs > li.has_nested > ul li.current > a { background: rgb(255 255 255 / 10%); color: white; }
#utility_nav { margin-left: auto; display: flex; align-items: center; gap: 16px; padding: 0; list-style: none; }
#utility_nav li { list-style: none; }

#title_bar { padding: 30px 32px 16px; }
#title_bar h2 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.action_items { float: right; margin-top: -32px; }

#active_admin_content { padding: 12px 32px 44px; }
#main_content_wrapper { width: 100%; }
#main_content { width: 100%; }
.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.column { min-width: 0; width: auto !important; margin-right: 0 !important; }

.panel, .attributes_table, .index_table {
  margin: 0 0 20px;
  overflow: hidden;
  border: 1px solid #dfe5e3;
  border-radius: 14px;
  background: white;
  box-shadow: 0 4px 18px rgb(16 42 44 / 5%);
}

.panel > h3 { margin: 0; padding: 16px 18px; border-bottom: 1px solid #e7ecea; background: #fbfcfb; font-size: 14px; }
.panel_contents { padding: 18px; }
.panel_contents h2 { margin: 0 0 4px; font-size: 30px; color: #102a2c; }
.panel_contents p { margin: 0; color: #64706f; line-height: 1.55; }
.panel_contents p + p { margin-top: 12px; }
.panel_link { font-size: 12px; font-weight: 800; }

.admin_welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #102a2c, #174b4a);
  color: white;
  box-shadow: 0 12px 30px rgb(16 42 44 / 16%);
}
.admin_welcome h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.admin_welcome p { margin: 6px 0 0; color: #c8ddda; }
.admin_role_badge { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: rgb(255 255 255 / 12%); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

.quick_actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.quick_action { display: grid; grid-template-columns: 38px 1fr; column-gap: 11px; align-items: center; min-height: 78px; padding: 14px; border: 1px solid #dfe5e3; border-radius: 14px; background: white; color: #17202b; box-shadow: 0 3px 12px rgb(16 42 44 / 4%); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.quick_action:hover { border-color: #75aaa5; color: #102a2c; box-shadow: 0 8px 22px rgb(16 42 44 / 9%); transform: translateY(-1px); }
.quick_action_icon { grid-row: 1 / span 2; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #e7f4f1; color: #0b625d; font-size: 20px; font-weight: 850; }
.quick_action strong { align-self: end; font-size: 13px; }
.quick_action small { align-self: start; margin-top: 3px; color: #71807d; font-size: 11px; }
.setup_steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.setup_progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.setup_progress_item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 12px; border: 1px solid #dfe5e3; border-radius: 12px; background: white; }
.setup_progress_item > span { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #e7f4f1; color: #0b625d; font-size: 12px; font-weight: 850; }
.setup_progress_item strong, .setup_progress_item small { display: block; }
.setup_progress_item strong { color: #243b3a; font-size: 12px; }
.setup_progress_item small { margin-top: 2px; color: #7b8785; font-size: 10px; }
.guided_setup_form fieldset > ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.guided_setup_form fieldset { margin: 14px 0; border: 1px solid #dfe8e6; border-radius: 14px; background: #fbfdfc; box-shadow: none; }
.guided_setup_form fieldset legend span { color: #123f3c; font-size: 14px; font-weight: 850; }
.guided_setup_form .input { min-width: 0; }
.guided_setup_form .text { grid-column: 1 / -1; }
.guided_setup_form textarea { width: 100%; }
.setup_explainer { margin: 0 0 14px; padding: 13px 15px; border: 1px solid #cce2dd; border-radius: 12px; background: #eff8f6; color: #244b48; }
.setup_explainer strong { display: block; color: #0c5b56; }
.setup_explainer p { margin: 4px 0 0 !important; }
.setup_shortcuts { margin-bottom: 18px; }
.permission_guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 18px; }
.permission_guide_item { min-width: 0; padding: 13px 14px; border: 1px solid #dfe8e6; border-radius: 12px; background: #fbfdfc; }
.permission_guide_item strong, .permission_guide_item small { display: block; }
.permission_guide_item strong { color: #173f3c; font-size: 12px; }
.permission_guide_item small { margin-top: 4px; color: #6d7b79; font-size: 11px; line-height: 1.45; }
.setup_finish_note { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 4px 0 18px; padding: 13px 15px; border-left: 3px solid #2f827c; border-radius: 10px; background: #edf7f5; color: #315c58; }
.setup_finish_note strong, .setup_finish_note span { display: block; }
.setup_finish_note span { font-size: 12px; }
.advanced_setup { margin-top: 18px; border: 1px solid #dfe5e3; border-radius: 14px; background: #fff; }
.advanced_setup > summary { cursor: pointer; padding: 15px 18px; color: #244b48; font-weight: 850; }
.advanced_setup[open] > summary { border-bottom: 1px solid #e8edec; }
.advanced_setup > p { margin: 16px 18px 0; color: #667775; }
.advanced_setup .setup_steps { padding: 18px; }
.setup_steps > .panel:last-child { grid-column: 1 / -1; }
.setup_steps .panel_contents > p { margin-bottom: 16px; }
.setup_steps .formtastic fieldset { border: 0; box-shadow: none; }
.setup_steps .formtastic fieldset > ol { padding: 0; }
.settings_health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.settings_health_item { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 12px 14px; border: 1px solid #dfe5e3; border-radius: 12px; background: white; }
.settings_health_item strong { font-size: 12px; }
.settings_security_note { margin: 0 0 20px; padding: 12px 14px; border-left: 3px solid #2f827c; border-radius: 8px; background: #edf7f5; color: #315c58; line-height: 1.55; }
.system_settings_form { max-width: 1080px; }
.system_setting_row { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(280px, 1.2fr); gap: 22px; align-items: start; padding: 16px 0; border-bottom: 1px solid #edf0ef; }
.system_setting_row:first-child { padding-top: 0; }
.system_setting_row:last-child { padding-bottom: 0; border-bottom: 0; }
.system_setting_copy label { display: block; margin-bottom: 5px; color: #243b3a; font-size: 13px; font-weight: 800; }
.system_setting_copy small { display: block; color: #697674; line-height: 1.5; }
.setting_source { display: inline-flex; margin-top: 7px; border-radius: 999px; padding: 3px 7px; background: #f0f4f3; color: #687572; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.system_setting_control input[type="text"], .system_setting_control input[type="password"], .system_setting_control input[type="number"], .system_setting_control textarea, .system_setting_control select { width: 100%; min-height: 42px; border: 1px solid #ccd7d5; border-radius: 10px; padding: 9px 11px; background: white; color: #17202b; font: inherit; }
.system_setting_control textarea { min-height: 92px; resize: vertical; }
.system_setting_control input[type="checkbox"] { width: 18px; height: 18px; accent-color: #0f6b66; }
.clear_setting { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: #8a4946; font-size: 11px; }
.settings_actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.settings_actions input[type="submit"] { min-height: 42px; border: 0; border-radius: 10px; padding: 9px 16px; background: #102a2c; color: white; font-weight: 800; cursor: pointer; }
.settings_actions small { color: #71807d; }

table { width: 100%; border-collapse: collapse; }
th { padding: 12px 14px; background: #f4f7f6; color: #53605f; font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .07em; }
td { padding: 13px 14px; border-top: 1px solid #e8eceb; vertical-align: top; }
details > summary { cursor: pointer; color: #174c4a; font-weight: 750; }
details[open] > summary { margin-bottom: 12px; }
details pre { max-width: 100%; overflow: auto; border-radius: 10px; padding: 12px; background: #f5f7f6; color: #334341; font-size: 11px; white-space: pre-wrap; }
details dl { display: grid; grid-template-columns: minmax(110px, .3fr) 1fr; gap: 6px 12px; margin: 0 0 12px; }
details dt { color: #74817f; font-size: 11px; font-weight: 750; }
details dd { margin: 0; overflow-wrap: anywhere; }
tbody tr:hover { background: #fafcfb; }
.attributes_table th { width: 200px; }
.attributes_table td { overflow-wrap: anywhere; }

.status_tag { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #e6f4f1; color: #0b625d; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.status_tag.pending, .status_tag.uploaded, .status_tag.processing, .status_tag.ready_for_review, .status_tag.submitted, .status_tag.under_review { background: #fff4d8; color: #8a5a00; }
.status_tag.rejected, .status_tag.quarantined, .status_tag.expired, .status_tag.archived { background: #fee9e8; color: #a3312e; }
.status_tag.approved, .status_tag.published { background: #e4f5e9; color: #23763b; }

.table_actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.table_actions a, .table_actions button, .action_item a, .action_items button, .pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8e1df;
  border-radius: 8px;
  padding: 6px 10px;
  background: white;
  color: #174c4a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.table_actions a:hover, .table_actions button:hover, .action_item a:hover, .action_items button:hover { border-color: #8db8b4; background: #f0f8f6; color: #0b625d; }
.table_actions form, .action_items form { display: inline-flex; margin: 0; }
.danger_action { border-color: #efc5c2 !important; color: #a3312e !important; }
.danger_action:hover { border-color: #d88f89 !important; background: #fff3f2 !important; color: #812421 !important; }
.destructive_review { max-width: 720px; }
.destructive_review p { margin: 0 0 12px; line-height: 1.6; }
.destructive_review dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; margin: 20px 0; }
.destructive_review dt { color: #687572; font-size: 12px; font-weight: 750; }
.destructive_review dd { margin: 0; font-weight: 750; }
.destructive_review_actions { display: flex; align-items: center; gap: 12px; }
.danger_button { min-height: 40px; border: 0; border-radius: 9px; padding: 8px 14px; background: #a3312e; color: white; font: inherit; font-weight: 800; cursor: pointer; }
.issue_reason + .issue_reason { margin-top: 12px; border-top: 1px solid #e7ecea; padding-top: 12px; }
.issue_reason strong, .issue_reason small { display: block; }
.issue_reason p { margin: 4px 0; }
.operations_welcome .ops_overall_healthy { background: rgb(116 220 164 / 18%); color: #d7ffe6; }
.operations_welcome .ops_overall_attention { background: rgb(255 202 90 / 18%); color: #fff0bd; }
.operations_welcome .ops_overall_critical { background: rgb(255 121 112 / 18%); color: #ffd9d5; }
.ops_metric_grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.ops_metric_grid_compact { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
.ops_metric_card { min-width: 0; padding: 16px; border: 1px solid #dfe5e3; border-radius: 14px; background: white; box-shadow: 0 3px 12px rgb(16 42 44 / 4%); }
.ops_metric_card > span, .ops_metric_card > strong, .ops_metric_card > small { display: block; }
.ops_metric_card > span { color: #657371; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.ops_metric_card > strong { margin-top: 8px; color: #102a2c; font-size: 27px; line-height: 1; }
.ops_metric_card > small { margin-top: 8px; color: #75817f; font-size: 11px; line-height: 1.45; }
.ops_metric_warning { border-color: #efd595; background: #fffbf0; }
.ops_metric_critical { border-color: #e7aaa6; background: #fff5f4; }
.ops_attention_list { display: grid; gap: 9px; }
.ops_attention_item { display: grid; grid-template-columns: minmax(180px, .35fr) 1fr; gap: 12px; align-items: start; padding: 12px 14px; border-left: 3px solid #d29c2d; border-radius: 9px; background: #fff9ec; }
.ops_attention_item strong { color: #664813; font-size: 12px; }
.ops_attention_item span { color: #735e38; font-size: 12px; line-height: 1.45; }
.ops_attention_high { border-left-color: #b94b45; background: #fff2f1; }
.ops_attention_high strong { color: #812c28; }
.ops_attention_high span { color: #7e4b47; }
.ops_service_grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.ops_service_item { display: flex; min-width: 0; align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid #e1e7e5; border-radius: 12px; background: #fbfcfb; }
.ops_service_item > div { min-width: 0; }
.ops_service_item strong, .ops_service_item small { display: block; }
.ops_service_item strong { color: #203b39; font-size: 12px; }
.ops_service_item small { margin-top: 4px; color: #72807d; font-size: 10px; line-height: 1.45; }
.ops_table_hint { display: block; max-width: 420px; margin-top: 4px; color: #74817f; font-weight: 400; line-height: 1.45; text-transform: none; letter-spacing: 0; }
.ops_inline_totals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ops_inline_totals span { padding: 5px 9px; border-radius: 999px; background: #eef3f2; color: #516260; font-size: 10px; font-weight: 750; }
.ops_failure_grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ops_failure_grid > div { padding: 13px; border-radius: 11px; background: #f6f8f7; text-align: center; }
.ops_failure_grid strong, .ops_failure_grid span { display: block; }
.ops_failure_grid strong { color: #102a2c; font-size: 22px; }
.ops_failure_grid span { margin-top: 4px; color: #687775; font-size: 10px; }
.ops_disclosure { overflow: hidden; border: 1px solid #e0e6e4; border-radius: 11px; background: #fbfcfb; }
.ops_disclosure + .ops_disclosure { margin-top: 10px; }
.ops_disclosure > summary { padding: 13px 15px; list-style-position: inside; }
.ops_disclosure[open] > summary { margin: 0; border-bottom: 1px solid #e4e9e8; background: #f5f8f7; }
.ops_disclosure_body { overflow-x: auto; padding: 14px; }
.ops_disclosure_body .index_table { margin: 0; box-shadow: none; }
.ops_empty_state { padding: 16px; border-radius: 10px; background: #f1f7f5; text-align: center; }
.ops_empty_state strong, .ops_empty_state span { display: block; }
.ops_empty_state strong { color: #22524e; }
.ops_empty_state span { margin-top: 5px; color: #6b7977; font-size: 11px; }
.ops_checked_at { margin: 16px 0 0; color: #778481; font-size: 10px; text-align: right; }
.status_tag.ok, .status_tag.healthy, .status_tag.enabled { background: #e4f5e9; color: #23763b; }
.status_tag.warning, .status_tag.attention, .status_tag.missing, .status_tag.unknown { background: #fff4d8; color: #8a5a00; }
.status_tag.critical, .status_tag.failed, .status_tag.delayed { background: #fee9e8; color: #a3312e; }
.support_session_form { display: inline-flex; margin: 0; }
.impersonate_link { border-color: #b5d7d3 !important; background: #edf8f6 !important; color: #0b625d !important; }

.person_cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.person_cell > div { min-width: 0; }
.person_cell strong, .person_cell small { display: block; }
.person_cell strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person_cell small { margin-top: 3px; overflow: hidden; color: #73807e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.person_avatar { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: #e7f4f1; color: #0b625d; font-size: 11px; font-weight: 850; }

.scopes { margin: 0 0 14px; }
.scopes ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.scopes li { list-style: none; }
.scopes a { display: inline-flex; padding: 7px 11px; border: 1px solid #dfe5e3; border-radius: 999px; background: white; color: #53605f; font-size: 12px; font-weight: 750; }
.scopes .selected a { border-color: #102a2c; background: #102a2c; color: white; }

.formtastic fieldset { margin: 0 0 18px; padding: 0; border: 1px solid #dfe5e3; border-radius: 14px; background: white; overflow: hidden; }
.formtastic fieldset > legend { width: 100%; padding: 14px 18px; border-bottom: 1px solid #e7ecea; background: #fbfcfb; font-size: 14px; font-weight: 800; }
.formtastic fieldset > ol { margin: 0; padding: 18px; list-style: none; }
.formtastic .input { margin: 0 0 16px; list-style: none; }
.formtastic .input:last-child { margin-bottom: 0; }
.formtastic .input > label { display: block; margin-bottom: 7px; color: #53605f; font-size: 12px; font-weight: 750; }
.formtastic input[type="text"], .formtastic input[type="email"], .formtastic input[type="password"], .formtastic textarea, .formtastic select { width: min(100%, 720px); min-height: 42px; border: 1px solid #ccd7d5; border-radius: 10px; padding: 9px 11px; background: white; color: #17202b; font: inherit; outline: none; }
.formtastic textarea { min-height: 110px; resize: vertical; }
.formtastic input:focus, .formtastic textarea:focus, .formtastic select:focus { border-color: #2f827c; box-shadow: 0 0 0 3px rgb(47 130 124 / 12%); }
.secure_link_field { width: 100%; min-height: 42px; margin-top: 14px; border: 1px solid #b8ceca; border-radius: 10px; padding: 9px 11px; background: #f5faf9; color: #174c4a; font: inherit; }
.formtastic .inline-errors { margin: 6px 0 0; color: #a3312e; font-size: 12px; }
.formtastic .buttons { display: flex; gap: 8px; margin: 0; padding: 0; border: 0; background: transparent; }
.formtastic .buttons > ol { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.formtastic input[type="submit"] { min-height: 42px; border: 0; border-radius: 10px; padding: 9px 16px; background: #102a2c; color: white; font-weight: 800; cursor: pointer; }
#new_user.formtastic, form[id^="edit_user"].formtastic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 1080px; }
#new_user.formtastic fieldset, form[id^="edit_user"].formtastic fieldset { margin: 0; }
#new_user.formtastic .buttons, form[id^="edit_user"].formtastic .buttons { grid-column: 1 / -1; }
.pagination { display: flex; gap: 5px; align-items: center; margin: 18px 0; }
.pagination .current { background: #102a2c; color: white; }
.blank_slate_container { padding: 52px; text-align: center; color: #697573; }
.flashes { padding: 14px 32px 0; }
.flash { border-radius: 10px; padding: 12px 16px; background: #e8f5f2; color: #125d58; }
.flash_alert, .flash_error { background: #feeceb; color: #9c302d; }
#footer { padding: 20px 32px 36px; color: #7c8785; font-size: 12px; }

@media (max-width: 900px) {
  #header { align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 18px; }
  #tabs { order: 3; width: 100%; flex-wrap: wrap; overflow: visible; }
  #tabs > li { flex: 0 0 auto; }
  #utility_nav { margin-left: auto; }
  #title_bar, #active_admin_content { padding-left: 18px; padding-right: 18px; }
  .columns { grid-template-columns: 1fr; }
  .quick_actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup_steps { grid-template-columns: 1fr; }
  .setup_progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guided_setup_form fieldset > ol { grid-template-columns: 1fr; }
  .guided_setup_form .text { grid-column: auto; }
  .permission_guide { grid-template-columns: 1fr; }
  .settings_health { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops_metric_grid, .ops_service_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops_failure_grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .system_setting_row { grid-template-columns: 1fr; gap: 10px; }
  .setup_steps > .panel:last-child { grid-column: auto; }
  .index_table { display: block; overflow-x: auto; }
  #new_user.formtastic, form[id^="edit_user"].formtastic { grid-template-columns: 1fr; }
  #new_user.formtastic .buttons, form[id^="edit_user"].formtastic .buttons { grid-column: auto; }
}

@media (max-width: 560px) {
  #tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  #tabs > li > a, #tabs > li > span { width: 100%; }
  #tabs > li.has_nested > ul { position: static; min-width: 0; margin-top: 4px; box-shadow: none; }
  #title_bar h2 { font-size: 23px; }
  .action_items { float: none; margin: 14px 0 0; }
  .admin_welcome { align-items: flex-start; padding: 18px; }
  .admin_role_badge { display: none; }
  .quick_actions { grid-template-columns: 1fr; }
  .setup_progress { grid-template-columns: 1fr; }
  .settings_health { grid-template-columns: 1fr; }
  .ops_metric_grid, .ops_service_grid, .ops_failure_grid { grid-template-columns: 1fr; }
  .ops_attention_item { grid-template-columns: 1fr; gap: 4px; }
  .settings_actions { align-items: flex-start; flex-direction: column; }
  .setup_finish_note { align-items: flex-start; flex-direction: column; gap: 5px; }
  .table_actions { white-space: normal; }
}
