/* Operations dashboard palette. Shared consoles retain their own theme tokens. */
body.ops-home {
  --bg: #f4f6fa;
  --panel: #fff;
  --panel-2: #eaf0ff;
  --text: #101b31;
  --muted: #53637a;
  --border: #dde4ef;
  --accent: #244ec4;
  --accent-fill: #244ec4;
  --ops-sidebar: var(--ops-nav-bg);
  --ops-hover: #f7f9fd;
  --ops-line: #ebeff5;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

html[data-theme="dark"] body.ops-home {
  --bg: #0d1422;
  --panel: #151f32;
  --panel-2: #243559;
  --text: #f0f4ff;
  --muted: #abb9d3;
  --border: #32405a;
  --accent: #a1b9ff;

  --ops-hover: #1d2a41;
  --ops-line: #27344a;
  background: var(--bg);
}

.ops-dashboard {
  display: grid;
  grid-template-columns: 234px minmax(0, 1fr);
  min-height: 100vh;
}
.ops-dashboard [hidden] { display: none !important; }
.ops-dashboard-workspace, .ops-dashboard-content { min-width: 0; }
.ops-dashboard-content {
  max-width: 1370px;
  margin: auto;
  padding: 32px clamp(20px, 3vw, 36px) 48px;
}
.ops-dashboard :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ops-skip { position: fixed; z-index: 10; top: -100px; left: 12px; padding: 12px; background: var(--panel); }
.ops-skip:focus { top: 10px; }
.ops-dashboard-content :is(h1, #products-title, .ops-category) { scroll-margin-top: 18px; }
.ops-dashboard-nav {
  display: flex;
  flex-direction: column;
  position: sticky;
  align-self: start;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  padding: 31px 17px 18px;
  background: var(--ops-sidebar);
  color: var(--ops-nav-text);
}
.ops-brand { display: flex; align-items: center; gap: 10px; padding: 0 9px; margin-bottom: 43px; color: #fff; text-decoration: none; }
.ops-brand img { width: 40px; height: 40px; object-fit: contain; }
.ops-brand strong { display: block; font-size: 19px; line-height: 1.2; letter-spacing: .14em; }
.ops-brand small { color: #b7c6e3; font-size: 12px; }
.ops-dashboard-nav nav { display: grid; gap: 4px; }
.ops-dashboard-nav nav a { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 13px; border-radius: 8px; color: inherit; text-decoration: none; font-size: .9rem; }
.ops-dashboard-nav nav a:hover { background: var(--ops-nav-hover); }
.ops-dashboard-nav nav a.ops-nav-home { background: var(--ops-nav-active); color: #fff; font-weight: 650; margin-bottom: 12px; }
.ops-dashboard-nav :focus-visible { outline-color: #a1b9ff; }
.ops-dashboard-nav svg, .ops-app-search svg {
  width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
}
#ops-menu { display: none; }
.ops-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 70px; padding: 12px clamp(20px, 3vw, 34px); background: var(--panel); border-bottom: 1px solid var(--border);
}
.ops-app-search {
  display: flex; align-items: center; gap: 10px; min-width: 0; width: min(100%, 460px);
  padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--muted);
}
.ops-app-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--panel-2); }
.ops-app-search input { min-height: 42px; width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text); outline: 0; }
.ops-app-search input::placeholder { color: var(--muted); opacity: 1; }
.ops-app-search input:focus-visible { outline: 0; }
.ops-app-search kbd { border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.ops-account { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.ops-account button { min-height: 42px; }
.ops-account .theme-toggle { width: 42px; flex: none; }
.ops-account #who { overflow-wrap: anywhere; }
.ops-dashboard-intro { margin-bottom: 26px; }
.ops-context { color: var(--accent); font-size: .83rem; font-weight: 650; margin: 0 0 8px; }
.ops-context::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; background: currentColor; vertical-align: 2px; }
.ops-dashboard-intro h1 { margin: 0; font-size: clamp(2rem, 3.15vw, 2.8rem); line-height: 1.11; letter-spacing: -.048em; }
#ops-description { margin: 9px 0 0; color: var(--muted); font-size: .96rem; }
#ops-shortcuts { margin-bottom: 32px; }
#ops-shortcuts-title { margin: 0 0 10px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
#ops-shortcut-links { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; }
.ops-shortcut {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 91px; min-width: 0; padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; color: var(--text); background: var(--panel);
}
.ops-shortcut strong, .ops-shortcut small { display: block; }
.ops-shortcut small { color: var(--muted); margin-top: 3px; line-height: 1.4; }
.ops-shortcut-primary {
  grid-row: span 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 9px;
  min-height: 211px; position: relative; isolation: isolate; overflow: hidden; padding: 24px 25px;
  border-color: transparent; color: #fff; background: linear-gradient(108deg, #132a63, #1c3e93);
  box-shadow: 0 10px 23px #152b5a1c;
}
.ops-shortcut-primary:only-child { grid-column: 1 / -1; }
.ops-shortcut-primary::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 0 45%; pointer-events: none;
  background: radial-gradient(circle at 78% 50%, #5a86ff68 0 29%, #bad0ff51 29.5%, #8aaaff15 30% 39%, #a0beff28 39.5%, transparent 40%),
    repeating-linear-gradient(0deg, #c0d6ff18 0 1px, transparent 1px 27px),
    repeating-linear-gradient(90deg, #c0d6ff18 0 1px, transparent 1px 27px);
  mask-image: linear-gradient(90deg, transparent, black 48%);
}
.ops-shortcut-primary strong { font-size: clamp(1.2rem, 2.1vw, 1.5rem); line-height: 1.15; letter-spacing: -.025em; }
.ops-shortcut-primary small { color: #e0e9ff; max-width: 44ch; }
.ops-shortcut-primary .tile-arrow { display: none; }
.ops-shortcut-destination { padding: 7px 12px; margin-top: 6px; border-radius: 7px; background: #fff; color: #173775; font-weight: 700; }
.ops-shortcut-primary:hover .ops-shortcut-destination { background: #e5edff; }
.ops-shortcut-primary:focus-visible { outline-color: #7999ff; }
.ops-dashboard .ops-section { padding: 0 0 26px; margin-bottom: 26px; }
.ops-directory-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.ops-directory-heading h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.03em; }
#ops-app-status { color: var(--muted); font-size: .83rem; }
.ops-category-grid { display: grid; gap: 16px; }
.ops-category { min-width: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.ops-category h3 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 15px; border-bottom: 1px solid var(--ops-line); font-size: .95rem; }
.ops-category h3 .tile-icon { width: 20px; height: 20px; border: 0; background: none; }
.ops-category h3 svg { width: 18px; height: 18px; }
.ops-category-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
.ops-category .admin-tile { min-height: 58px; gap: 11px; padding: 10px 11px; border: 1px solid var(--ops-line); border-radius: 7px; }
.ops-category .admin-tile.is-filtered { display: none; }
.ops-category .admin-tile > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.ops-dashboard :is(.admin-tile, .ops-shortcut) .tile-icon { width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--panel-2); color: var(--accent); }
.ops-dashboard .ops-shortcut-primary .tile-icon { width: 39px; height: 39px; border: 1px solid #ffffff45; background: #ffffff19; color: #fff; }
.ops-dashboard :is(.admin-tile, .ops-shortcut) svg { width: 18px; height: 18px; }
.ops-category .admin-tile strong { font-size: .9rem; }
.ops-category .admin-tile small { margin-top: 2px; }
.ops-category .admin-tile:hover, .ops-shortcut:not(.ops-shortcut-primary):hover { border-color: var(--accent); background: var(--ops-hover); }
.ops-dashboard .ops-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; border-radius: 8px; overflow: hidden; }
.ops-dashboard .ops-summary div { min-height: 0; padding: 10px; }
.ops-dashboard .ops-summary dt { font-size: 1.2rem; }
.ops-product-group { margin-top: 16px; }
.ops-product-group > h3 { margin: 0 0 10px; font-size: 1rem; }
.ops-product-group .product-card { min-height: 0; }
.ops-product-group .product-card h4 { margin: 0; font-size: .98rem; overflow-wrap: anywhere; }
.ops-dashboard .product-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); }
@media (max-width: 900px) {
  .ops-dashboard { display: block; }
  .ops-dashboard-nav { position: static; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 9px 14px; }
  .ops-brand { margin: 0; padding: 0; }
  #ops-menu { display: block; min-height: 44px; color: #fff; border-color: #62718e; background: transparent; }
  #ops-menu[aria-expanded="false"] + nav { display: none; }
  .ops-dashboard-nav nav { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
  .ops-dashboard-nav nav a.ops-nav-home { margin-bottom: 0; }
}
@media (max-width: 620px) {
  .ops-dashboard-content { padding: 24px 15px 34px; }
  .ops-topbar { flex-wrap: wrap; gap: 8px; padding: 8px 14px; }
  .ops-account { margin-left: auto; }
  .ops-account .profile-summary-label { display: inline; }
  .ops-account #who { display: none; }
  .ops-app-search { width: 100%; order: 1; }
  .ops-app-search kbd { display: none; }
  #ops-shortcut-links, .ops-category-apps { grid-template-columns: minmax(0, 1fr); }
  .ops-shortcut-primary { grid-row: auto; }
  .ops-dashboard .ops-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-dashboard .status-filter { flex-wrap: wrap; }
}
