/*
  ABM shell anti-regression directives are documented in ABM_STYLE_DIRECTIVES.md.
  Keep the top header light and ABM-like; do not revert to dark utility-bar styling.
*/
:root {
  --abm-topbar-bg: #f7f7f9;
  --abm-topbar-border: #dfe1e6;
  --abm-topbar-text: #1f2024;
  --abm-topbar-muted: #6d727d;
  --abm-bg: #f5f5f7;
  --abm-surface: #ffffff;
  --abm-sidebar-bg: #fbfbfc;
  --abm-border: #e0e2e7;
  --abm-border-strong: #cfd4dc;
  --abm-text: #1d1d1f;
  --abm-muted: #6e6e73;
  --abm-blue: #0071e3;
  --abm-blue-dark: #005ec3;
  --abm-blue-soft: #e8f2ff;
  --abm-danger: #c4362a;
  --abm-success: #1f8f3a;
  --abm-focus: 0 0 0 3px rgba(0, 113, 227, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--abm-bg);
  color: var(--abm-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.42;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--abm-blue);
}

a:hover {
  color: var(--abm-blue-dark);
}

.abm-topbar {
  background: var(--abm-topbar-bg);
  color: var(--abm-topbar-text);
  border-bottom: 1px solid var(--abm-topbar-border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.abm-topbar-inner {
  min-height: 44px;
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 10px;
}

.abm-brand {
  display: flex;
  align-items: center;
  font-size: 1.38rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #121317;
  white-space: nowrap;
}

.abm-global-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.abm-global-nav::-webkit-scrollbar {
  display: none;
}

.abm-global-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border-bottom: 2px solid transparent;
  color: #2d3138;
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 120ms ease, border-color 120ms ease;
}

.abm-global-link:hover {
  color: #14161a;
}

.abm-global-link.active {
  color: #14161a;
  border-bottom-color: #7c828d;
}

.abm-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.abm-org-pill {
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d4d7de;
  background: #ffffff;
  border-radius: 5px;
  padding: 3px 8px;
  color: #4c525c;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.abm-org-caret {
  color: #737985;
  font-size: 0.56rem;
}

.abm-user-menu {
  position: relative;
}

.abm-user-menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.abm-user-menu summary::-webkit-details-marker {
  display: none;
}

.abm-avatar {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #9198a3;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 700;
}

.abm-user-menu[open] .abm-avatar {
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.18);
}

.abm-user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 188px;
  border: 1px solid var(--abm-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(12, 16, 24, 0.12);
  padding: 10px;
  z-index: 240;
}

.abm-user-menu-name {
  color: #1f2329;
  font-size: 0.8rem;
  font-weight: 600;
}

.abm-user-menu-role {
  margin-top: 2px;
  color: #6f7580;
  font-size: 0.74rem;
  text-transform: capitalize;
}

.abm-user-menu-form {
  margin: 9px 0 0;
}

.abm-user-menu-signout {
  width: 100%;
  min-height: 29px;
  border: 1px solid var(--abm-border-strong);
  border-radius: 5px;
  background: #f7f8fa;
  color: #2a2d34;
  font-size: 0.75rem;
  font-weight: 600;
}

.abm-user-menu-signout:hover {
  background: #eceff4;
  border-color: #c6ccd6;
}

.abm-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: calc(100vh - 46px);
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
}

.abm-sidebar {
  background: var(--abm-sidebar-bg);
  border-right: 1px solid var(--abm-border);
  padding: 12px 0 14px;
}

.abm-sidebar h2 {
  margin: 4px 16px 10px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7e8591;
}

.abm-side-nav {
  display: grid;
  gap: 1px;
}

.abm-side-link {
  color: #2e2f33;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 8px 14px 8px 16px;
  border-left: 2px solid transparent;
}

.abm-side-link:hover {
  background: #f0f2f6;
}

.abm-side-link.active {
  background: #eef5ff;
  color: #173b66;
  border-left-color: var(--abm-blue);
  font-weight: 600;
}

.abm-main {
  min-width: 0;
  padding: 14px 18px 20px;
}

.abm-main-inner {
  width: 100%;
  max-width: 1200px;
}

.abm-page-title {
  margin: 1px 0 10px;
}

.abm-page-title h1 {
  margin: 0;
  font-size: 1.68rem;
  line-height: 1.14;
  letter-spacing: -0.018em;
  font-weight: 650;
  color: #1f1f21;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 305px;
  gap: 12px;
  align-items: start;
}

.overview-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.overview-details-grid {
  margin: 0;
}

.overview-status-card {
  position: sticky;
  top: 60px;
}

.overview-status-list {
  display: grid;
  gap: 0;
}

.overview-status-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--abm-border);
  padding: 7px 0;
}

.overview-status-item:first-child {
  padding-top: 0;
}

.overview-status-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.overview-service-name {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-service-enabled {
  color: var(--abm-muted);
  font-size: 0.76rem;
  text-transform: capitalize;
}

.overview-service-status {
  font-size: 0.76rem;
  text-transform: capitalize;
  white-space: nowrap;
}

.abm-users-view .abm-shell {
  grid-template-columns: 1fr;
  max-width: none;
}

.abm-users-view .abm-sidebar {
  display: none;
}

.abm-users-view .abm-main {
  padding: 10px 14px 22px;
}

.abm-users-view .abm-main-inner {
  max-width: none;
}

.abm-users-view .abm-page-title {
  margin: 2px 0 10px;
}

.abm-users-view .abm-page-title h1 {
  font-size: 1.72rem;
  font-weight: 580;
}

.people-abm-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.people-abm-list-pane {
  background: #ffffff;
  border: 1px solid #dde1e8;
  border-radius: 10px;
  overflow: hidden;
}

.people-abm-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8ebf1;
  padding: 12px 12px 10px;
}

.people-abm-list-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.18rem;
  font-weight: 560;
  letter-spacing: -0.018em;
}

.people-abm-list-head h2 span {
  font-size: 0.8rem;
  color: #78808d;
}

.people-abm-add-user {
  min-width: 26px;
  min-height: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4f5662;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
}

.people-abm-add-user:hover {
  background: #f1f3f7;
  color: #1d2028;
}

.people-abm-search-wrap {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eceff4;
  padding: 10px 12px 9px;
}

.people-abm-search-icon {
  color: #9097a3;
  font-size: 0.8rem;
  text-align: center;
}

.people-abm-search-wrap input {
  min-height: 30px;
  border-radius: 6px;
  border-color: #cdd3dd;
  background: #ffffff;
  font-size: 0.78rem;
  padding: 5px 8px;
}

.people-abm-select-row {
  margin: 0;
  padding: 7px 12px;
  border-bottom: 1px solid #eef1f5;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  color: #78808b;
}

.people-abm-select-row a {
  color: #2f6dc9;
  text-decoration: none;
}

.people-abm-select-row a:hover {
  text-decoration: underline;
}

.people-abm-list-empty {
  padding: 12px;
}

.people-abm-user-list {
  display: grid;
  max-height: calc(100vh - 292px);
  overflow: auto;
}

.people-abm-user-row {
  display: grid;
  grid-template-columns: 14px 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eef1f5;
  color: #1f232b;
  text-decoration: none;
  padding: 8px 11px;
}

.people-abm-user-row:hover {
  background: #f5f7fb;
}

.people-abm-user-row.is-selected {
  background: #e9edf4;
}

.people-abm-row-check {
  width: 12px;
  height: 12px;
  border: 1px solid #c6ccd6;
  border-radius: 3px;
  position: relative;
  background: #ffffff;
}

.people-abm-row-check.is-checked {
  border-color: var(--abm-blue);
  background: var(--abm-blue);
}

.people-abm-row-check.is-checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 3px;
  height: 6px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.people-abm-user-avatar {
  width: 21px;
  height: 21px;
  border-radius: 999px;
  background: #949ca8;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
}

.people-abm-user-copy {
  min-width: 0;
}

.people-abm-user-copy strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 560;
  line-height: 1.25;
}

.people-abm-user-copy span {
  color: #737b87;
  display: block;
  font-size: 0.67rem;
  line-height: 1.23;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-abm-detail-pane {
  min-width: 0;
  width: min(100%, 640px);
  justify-self: center;
  padding: 4px 0 0;
}

.people-abm-empty-state {
  max-width: 560px;
}

.people-abm-empty-state h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.people-abm-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 2px 0 16px;
}

.people-abm-hero-avatar {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: #9ea7b4;
  border: 3px solid #d7dbe3;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

.people-abm-hero h2 {
  margin: 0;
  font-size: 1.74rem;
  line-height: 1;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.people-abm-hero-role {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #eff2f7;
  color: #5c6470;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 520;
}

.people-abm-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f4b400;
}

.people-abm-actions-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
}

.people-abm-action-tile-form {
  margin: 0;
}

.people-abm-action-tile,
a.people-abm-action-tile {
  min-width: 70px;
  min-height: 42px;
  border: 1px solid #e0e4eb;
  border-radius: 6px;
  background: #f4f6fa;
  color: #4a515d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 4px 8px;
}

.people-abm-action-tile:hover,
a.people-abm-action-tile:hover {
  background: #eaedf4;
  border-color: #d3d9e3;
  color: #2d323b;
}

.people-abm-section {
  max-width: 560px;
  margin: 0 auto 18px;
}

.people-abm-section h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  line-height: 1.08;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.people-abm-kv-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(200px, 1fr);
  align-items: center;
  gap: 10px;
  border-top: 1px solid #e8ebf1;
  padding: 8px 0;
}

.people-abm-kv-row span:first-child {
  color: #49505b;
  font-size: 0.84rem;
}

.people-abm-kv-row span:last-child {
  color: #1f232c;
  font-size: 0.84rem;
  text-align: right;
}

.people-abm-status.is-active {
  color: #1b7d37;
  font-weight: 560;
}

.people-abm-status.is-inactive {
  color: #c4362a;
  font-weight: 560;
}

.abm-users-view .people-abm-kv-row span:last-child {
  font-weight: 500;
}

.abm-users-view .people-abm-tool-card strong {
  font-weight: 560;
}

.people-abm-admin-controls {
  border-top: 1px solid #dde2ea;
  padding-top: 10px;
}

.people-abm-inline-form {
  justify-content: flex-start;
}

.people-abm-inline-form select {
  min-width: 150px;
}

.people-abm-reset-form {
  margin-top: 8px;
}

body.people-modal-open {
  overflow: hidden;
}

.people-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 520;
  background: rgba(15, 20, 30, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.people-modal-overlay.is-open {
  display: flex;
}

.people-modal-dialog {
  width: min(100%, 460px);
  border: 1px solid #d9dfe8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(22, 30, 42, 0.28);
  padding: 14px;
}

.people-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.people-modal-header h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 560;
  letter-spacing: -0.014em;
}

.people-modal-close {
  width: 28px;
  min-height: 28px;
  border: 1px solid #d6dde8;
  border-radius: 999px;
  background: #f5f7fb;
  color: #505867;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
}

.people-modal-close:hover {
  background: #ebeff6;
  color: #2d3440;
}

.people-modal-subtext {
  margin: 7px 0 10px;
  color: #5a6270;
  font-size: 0.82rem;
}

.people-modal-form {
  gap: 8px;
}

.people-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 3px;
}

.people-modal-actions .secondary,
.people-modal-actions button {
  min-width: 120px;
}

.people-abm-tools {
  max-width: 560px;
  margin: 20px auto 0;
}

.people-abm-tools summary {
  cursor: pointer;
  font-weight: 560;
  color: #404754;
}

.people-abm-tools-grid {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.people-abm-tool-card h2 {
  margin-bottom: 8px;
}

.people-abm-tool-card p {
  margin: 0 0 8px;
}

.grid {
  display: grid;
  gap: 10px;
}

.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
  background: var(--abm-surface);
  border: 1px solid var(--abm-border);
  border-radius: 8px;
  padding: 12px;
}

.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 7px;
  letter-spacing: -0.012em;
}

.card h2 {
  font-size: 1.02rem;
}

.card h3 {
  font-size: 0.9rem;
}

.stack-form {
  display: grid;
  gap: 9px;
}

.compact-form {
  margin-top: 8px;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.inline-form label {
  font-weight: 600;
}

.inline-form input,
.inline-form select,
.inline-form textarea,
.inline-form button {
  width: auto;
}

.hidden {
  display: none;
}

.muted {
  color: var(--abm-muted);
  font-size: 0.86rem;
}

.ok {
  color: var(--abm-success);
  font-weight: 600;
}

.bad {
  color: var(--abm-danger);
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
  color: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--abm-border-strong);
  border-radius: 6px;
  background: #ffffff;
  padding: 7px 9px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: 0;
  margin: 0;
  accent-color: var(--abm-blue);
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: none;
  border-color: var(--abm-blue);
  box-shadow: var(--abm-focus);
}

button {
  min-height: 32px;
  border: 1px solid var(--abm-blue);
  border-radius: 6px;
  background: var(--abm-blue);
  color: #ffffff;
  padding: 5px 11px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background-color 130ms ease, border-color 130ms ease;
}

button:hover {
  background: var(--abm-blue-dark);
  border-color: var(--abm-blue-dark);
}

.secondary {
  background: #f6f7f9;
  border-color: var(--abm-border-strong);
  color: #2a2b30;
}

.secondary:hover {
  background: #eceef2;
  border-color: #c9ced6;
  color: #212226;
}

.warn {
  background: #d14539;
  border-color: #d14539;
}

.warn:hover {
  background: #b9382f;
  border-color: #b9382f;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 6px 0;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 7px 9px;
}

.user-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 8px;
  margin: 8px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th,
td {
  border-bottom: 1px solid #e7e9ee;
  padding: 8px 7px;
  text-align: left;
  vertical-align: top;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8f9fb;
  color: #58606b;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--abm-border);
  border-radius: 6px;
  background: #f9fafc;
  padding: 8px;
}

code,
.result-snippet {
  font-family: "SF Mono", Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;
}

.result-snippet {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--abm-border);
  border-radius: 6px;
  background: #f9fafc;
  padding: 7px;
  font-size: 0.75rem;
}

.fleet-table code {
  font-size: 0.76rem;
}

.flash {
  margin: 0 0 10px;
  border: 1px solid var(--abm-border);
  border-radius: 6px;
  padding: 9px 11px;
}

.flash.ok {
  border-color: #c5e6ce;
  background: #edf8f1;
  color: #1e6f34;
}

.flash.bad {
  border-color: #f0cbc7;
  background: #fff3f2;
  color: #9f3027;
}

.auth-page {
  background: var(--abm-bg);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 8px rgba(25, 27, 31, 0.05);
}

.auth-heading {
  margin: 0 0 10px;
}

.auth-brand {
  margin: 0 0 3px;
  color: #4c5561;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 0 0 4px;
  font-size: 1.34rem;
  font-weight: 650;
  letter-spacing: -0.014em;
}

.auth-card .muted {
  margin: 0;
}

.install-page {
  display: grid;
  gap: 10px;
}

.install-hero {
  border: 1px solid var(--abm-border);
  border-radius: 8px;
  background: #f9fbff;
  padding: 12px;
}

.install-hero h2 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.016em;
}

.install-hero p {
  margin: 0;
  color: var(--abm-muted);
}

.hero-chip-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--abm-border);
  border-radius: 6px;
  background: #f3f6fa;
  color: #4a5562;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
}

.stats-grid .metric-card h3 {
  margin-bottom: 4px;
  color: #4d5560;
}

.stats-grid .metric-card p {
  margin: 0;
  color: var(--abm-muted);
}

.stats-grid .metric-card strong {
  font-size: 1.5rem;
  font-weight: 650;
  margin-right: 4px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 7px 12px;
}

.location-card {
  border-color: #d5e5f7;
  background: #fbfdff;
}

.alert-card {
  border-color: #f0cbc7;
  background: #fff8f7;
}

.quickstart-card,
.experience-card,
.panel-box {
  background: #ffffff;
}

.novice-steps {
  margin: 6px 0 10px;
  padding-left: 18px;
  display: grid;
  gap: 2px;
  color: #414953;
}

.quickstart-form {
  gap: 8px;
}

.quick-help-box {
  border: 1px solid var(--abm-border);
  border-radius: 6px;
  background: #f9fafc;
  padding: 9px;
}

.quick-help-box p {
  margin: 0;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid #cad9ea;
  border-radius: 6px;
  background: var(--abm-blue-soft);
  color: #275b8d;
  text-decoration: none;
  font-weight: 600;
  padding: 5px 9px;
}

.action-link:hover {
  background: #ddeeff;
  color: #18486e;
}

.quick-target-header h3 {
  margin: 0;
  font-size: 0.92rem;
}

.quick-target-header p {
  margin: 2px 0 0;
}

.quick-target-mode {
  display: grid;
  gap: 5px;
  border: 1px solid var(--abm-border);
  border-radius: 6px;
  background: #f9fafc;
  padding: 9px;
}

.radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #434b55;
  font-weight: 500;
}

.quick-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 7px;
}

.device-pick-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--abm-border);
  border-radius: 6px;
  background: #ffffff;
  padding: 8px 9px;
  cursor: pointer;
}

.device-pick-card:has(input:checked) {
  border-color: #9ec4ea;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.12);
  background: #f7fbff;
}

.device-pick-title {
  font-weight: 600;
}

.device-pick-meta {
  color: var(--abm-muted);
  font-size: 0.81rem;
}

.quick-install-btn {
  min-width: 220px;
  padding: 8px 12px;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mode-switch button {
  min-width: 130px;
}

.mode-switch button.active-mode {
  border-color: var(--abm-blue);
  background: var(--abm-blue);
  color: #ffffff;
}

.command-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}

.command-config {
  min-width: 0;
}

.panel-box {
  border: 1px solid var(--abm-border);
  border-radius: 6px;
  padding: 9px;
}

.quick-app-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.device-panel h3 {
  margin-top: 0;
}

.compact-actions {
  margin-top: 3px;
}

/* ---- Simple Install (nanomdm-install.php friendly UI) ---- */
.simple-install .simple-hero {
  background: #f1f7ff;
  border-color: #bcd6ee;
}
.simple-install .simple-hero h2 {
  font-size: 1.55rem;
}
.simple-status-card {
  border-color: #f0cbc7;
  background: #fff8f7;
}
.simple-status-bad h2 {
  color: #8a2a22;
}
.simple-status-list {
  margin: 6px 0 6px;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
.simple-status-list span.bad {
  margin-right: 4px;
}
.simple-install-card {
  border: 2px solid #cfe2f7;
  background: #ffffff;
}
.simple-install-form {
  gap: 14px;
}
.simple-step {
  border: 1px solid var(--abm-border);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px 14px;
}
.simple-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 650;
  color: #243042;
}
.simple-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--abm-blue);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
}
.simple-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.simple-market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.simple-market-tile {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 2px solid var(--abm-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.simple-market-tile:hover {
  border-color: #9ec4ea;
  background: #f7fbff;
}
.simple-market-tile.selected {
  border-color: var(--abm-blue);
  background: #eaf4ff;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}
.simple-market-name {
  font-size: 1rem;
  font-weight: 650;
  color: #1c2733;
}
.simple-market-meta {
  font-size: 0.82rem;
}
.simple-app-tile {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 2px solid var(--abm-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.simple-app-tile:hover {
  border-color: #9ec4ea;
  background: #f7fbff;
}
.simple-app-tile.selected {
  border-color: var(--abm-blue);
  background: #eaf4ff;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}
.simple-app-name {
  font-size: 1rem;
  font-weight: 650;
  color: #1c2733;
}
.simple-app-meta {
  font-size: 0.82rem;
}
.simple-app-meta.ok { color: #1c7a3e; }
.simple-app-meta.bad { color: #b53a2a; }
.simple-app-hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
}
.simple-manual-targets {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.simple-manual-targets.hidden {
  display: none;
}
.simple-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.simple-install-btn {
  display: grid;
  gap: 2px;
  min-width: 280px;
  padding: 14px 22px;
  font-size: 1.1rem;
  font-weight: 650;
  border-radius: 10px;
  border: 1px solid var(--abm-blue);
  background: var(--abm-blue);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.05s ease;
}
.simple-install-btn:hover:not(:disabled) {
  background: #0066cc;
}
.simple-install-btn:disabled {
  background: #b8c4d4;
  border-color: #b8c4d4;
  color: #ffffff;
  cursor: not-allowed;
}
.simple-install-btn-label { font-size: 1.1rem; }
.simple-install-btn-sub {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.9;
}
.simple-extra {
  margin-top: 12px;
  padding: 6px 0 0;
  border-top: 1px dashed #d9e2ee;
}
.simple-extra > summary {
  cursor: pointer;
  color: #4a6f95;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 4px 0;
}
.simple-extra-body {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}
.simple-divider {
  border: none;
  border-top: 1px dashed #d9e2ee;
  margin: 4px 0;
}
.simple-help-card {
  background: #fbfdff;
}
.simple-alert h2 {
  margin-top: 0;
}
@media (max-width: 720px) {
  .simple-install-btn {
    min-width: 100%;
  }
  .simple-app-grid {
    grid-template-columns: 1fr;
  }
}

.device-table-wrap {
  margin-top: 5px;
  border: 1px solid var(--abm-border);
  border-radius: 6px;
  max-height: 460px;
  overflow: auto;
  background: #ffffff;
}

.action-row-bottom {
  justify-content: flex-end;
}

.dense-table th,
.dense-table td {
  font-size: 0.78rem;
}

.hidden-row {
  display: none;
}

@media (max-width: 1160px) {
  .abm-topbar-inner {
    grid-template-columns: 1fr auto;
    row-gap: 6px;
    padding: 6px 10px;
  }

  .abm-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .abm-global-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 1px;
  }

  .abm-global-link {
    min-height: 34px;
    padding: 0;
  }

  .abm-topbar-right {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .abm-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .overview-layout {
    grid-template-columns: 1fr;
  }

  .overview-status-card {
    position: static;
  }

  .abm-users-view .abm-main {
    padding: 10px 12px 18px;
  }
}

@media (max-width: 930px) {
  .abm-shell {
    grid-template-columns: 1fr;
  }

  .abm-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--abm-border);
    padding-bottom: 10px;
  }

  .abm-side-nav {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 5px;
    padding: 0 10px;
  }

  .abm-side-link {
    border: 1px solid var(--abm-border);
    border-radius: 6px;
    padding: 8px 10px;
    background: #ffffff;
  }

  .abm-side-link.active {
    border-color: #93bbe7;
    border-left-color: #93bbe7;
  }

  .abm-main {
    padding: 12px;
  }

  .abm-main-inner {
    max-width: none;
  }

  .abm-page-title h1 {
    font-size: 1.5rem;
  }

  .command-layout {
    grid-template-columns: 1fr;
  }

  .people-abm-layout {
    grid-template-columns: 1fr;
  }

  .people-abm-user-list {
    max-height: 300px;
  }

  .people-abm-actions-row {
    justify-content: flex-start;
  }

  .people-abm-kv-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .people-abm-kv-row span:last-child {
    text-align: left;
  }

  .people-abm-hero-avatar {
    width: 64px;
    height: 64px;
    font-size: 1.7rem;
  }

  .people-abm-hero h2 {
    font-size: 1.7rem;
  }
}

@media (max-width: 680px) {
  .abm-org-pill {
    display: none;
  }

  .quick-install-btn {
    width: 100%;
    min-width: 0;
  }

  .mode-switch button {
    min-width: 0;
    flex: 1 1 0;
  }

  .people-abm-action-tile,
  a.people-abm-action-tile {
    min-width: 0;
    flex: 1 1 calc(50% - 4px);
  }
}

/* iPad Inventory page */
.inventory-device-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.inventory-device-header h2 { margin: 0 0 4px 0; }
.inventory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 8px;
}
.inventory-table th,
.inventory-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--abm-border);
  vertical-align: middle;
}
.inventory-table th {
  font-weight: 600;
  background: #f7f8fa;
}
.inventory-table code {
  font-size: 0.82rem;
  color: #4a5160;
}
.inventory-table button.danger {
  background: #b53a2a;
  border-color: #b53a2a;
  color: #fff;
}
.inventory-table button.danger:hover { background: #962e21; }

/* Restrictions page */
.restrictions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.restriction-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 2px solid var(--abm-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
  cursor: pointer;
}
.restriction-card.on {
  border-color: var(--abm-blue);
  background: #eaf4ff;
}
.restriction-card input[type="checkbox"] {
  margin-top: 4px;
}
.restriction-text {
  display: grid;
  gap: 2px;
}
.restriction-label {
  font-weight: 650;
  color: #1c2733;
}
.restriction-help {
  font-size: 0.85rem;
}
.restriction-key {
  font-size: 0.78rem;
}
.restriction-key code {
  background: rgba(0,0,0,0.04);
  padding: 1px 4px;
  border-radius: 3px;
}

.simple-app-tile.is-disabled,
.simple-app-tile[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f5f6f8;
}
.simple-app-tile.is-disabled:hover,
.simple-app-tile[disabled]:hover {
  border-color: var(--abm-border);
  background: #f5f6f8;
}

.simple-select {
  width: 100%;
  max-width: 640px;
  font-size: 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--abm-border, #c8cdd3);
  border-radius: 6px;
  background: #fff;
}
.simple-select:focus {
  outline: 2px solid var(--abm-accent, #2563eb);
  outline-offset: 1px;
}

.profiles-hero {
  border-radius: 12px;
  border-color: #d4d9e3;
  background: linear-gradient(135deg, #f7fbff 0%, #eef6ff 40%, #f8fafb 100%);
}

.profiles-eyebrow {
  margin: 0 0 6px;
  color: #2f5f9a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profiles-hero h2 {
  margin-bottom: 6px;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.profiles-subtitle {
  margin: 0 0 12px;
  max-width: 72ch;
  color: #3e4f63;
}

.profiles-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.profiles-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #cfd9e8;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: #2b3d53;
}

.profiles-notes {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.profiles-warn-list {
  color: #8d2e25;
}

.profiles-metric-card {
  text-align: center;
  border-radius: 10px;
}

.profiles-metric-label {
  margin: 0;
  color: #5f6978;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profiles-metric-value {
  margin: 6px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2e42;
}

.profiles-step-card {
  border-radius: 10px;
}

.profiles-device-summary {
  margin-top: 10px;
  border: 1px dashed #ccd7e8;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.profiles-device-summary p {
  margin: 0 0 5px;
}

.profiles-device-summary p:last-child {
  margin-bottom: 0;
}

.profiles-advanced {
  margin-top: 10px;
}

.profiles-advanced > summary {
  cursor: pointer;
  font-weight: 700;
  color: #26384f;
}

.profiles-advanced-grid {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .profiles-metric-grid {
    grid-template-columns: 1fr;
  }

  .profiles-badge {
    width: 100%;
    justify-content: flex-start;
  }
}
