:root {
  color-scheme: dark;
  --font-display: "Inter", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --bg-deep: #0c0a1a;
  --bg-panel: rgba(19, 15, 38, 0.78);
  --accent: #5b3df5;
  --accent-rgb: 91, 61, 245;
  --accent-dark: #4a2fe0;
  --accent-soft: #8f7aff;
  --accent-warm: #ffc72c;
  --text: #e9eaf2;
  --ease-slow: cubic-bezier(0.22, 1, 0.36, 1);
  --hover-duration: 0.45s;
  /* Theme-aware ink/surface tokens (dark defaults). [data-theme="light"] below overrides these. */
  --ink-rgb: 255, 255, 255;
  --ink-soft-rgb: 223, 231, 245;
  --heading: #f4f7fc;
  --surface-1: rgba(14, 28, 48, 0.72);
  --surface-2: rgba(8, 18, 34, 0.64);
  --app-bg: #04101c;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-deep);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-deep: #f3f0fb;
  --text: #1a2233;
  --ink-rgb: 15, 23, 42;
  --ink-soft-rgb: 51, 65, 85;
  --heading: #0f1729;
  --surface-1: #ffffff;
  --surface-2: #f7f9fc;
  --app-bg: #f3f0fb;
  /* Brand recolor to match the reference (lavender sidebar, teal accent,
     dark navy header) - dark mode is retired, this is the app's one
     permanent look now, not a conditional light variant. */
  --accent: #0d9488;
  --accent-rgb: 13, 148, 136;
  --accent-dark: #0f766e;
  --accent-soft: #2dd4bf;
  --sidebar-bg-1: #ece6fb;
  --sidebar-bg-2: #e2d9f7;
  --header-bg: #0f1e3d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  position: relative;
  isolation: isolate;
  background: var(--app-bg);
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 85% 0%, rgba(91, 61, 245, 0.24), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(255, 199, 44, 0.08), transparent 38%),
    linear-gradient(160deg, #100c24 0%, #0c0a1a 55%, #0a0815 100%);
  background-size: 130% 130%;
}

body::after {
  z-index: -1;
  background-image:
    linear-gradient(rgba(var(--ink-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.3;
}

h1,
h2,
h3,
.brand-wordmark,
.login-card-head h2,
.app-header-brand h1 {
  font-family: var(--font-display);
}

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

h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.25;
}

.live-activity-ticker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(57, 216, 166, 0.08);
  border: 1px solid rgba(57, 216, 166, 0.25);
  text-decoration: none;
  color: rgba(var(--ink-soft-rgb), 0.85);
  font-size: 0.8rem;
  width: 420px;
  max-width: 42vw;
  overflow: hidden;
  transition: background var(--hover-duration, 0.2s) ease, border-color var(--hover-duration, 0.2s) ease;
}

.live-activity-ticker:hover {
  background: rgba(57, 216, 166, 0.14);
  border-color: rgba(57, 216, 166, 0.4);
}

.live-activity-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.live-activity-icon {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: #39d8a6;
}

.live-activity-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #39d8a6;
  box-shadow: 0 0 0 0 rgba(57, 216, 166, 0.6);
  animation: liveActivityPulse 2s infinite;
}

@keyframes liveActivityPulse {
  0% { box-shadow: 0 0 0 0 rgba(57, 216, 166, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(57, 216, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(57, 216, 166, 0); }
}

.live-activity-label {
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: #39d8a6;
}

.live-activity-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-width: 0;
  height: 1.1em;
  mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.live-activity-track {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  width: max-content;
  animation: liveActivityScrollLTR 55s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .live-activity-track { animation: none; }
}

@keyframes liveActivityScrollLTR {
  from { transform: translateX(-50%); }
  to { transform: translateX(0%); }
}

.live-activity-item strong {
  color: var(--heading);
}

.live-activity-sep {
  color: rgba(57, 216, 166, 0.5);
}

/* .app-header stays dark navy in both themes (see [data-theme="light"] .app-header
   above), but --ink-soft-rgb/--heading flip dark for light theme's body text -
   without this override the ticker text (everything except the fixed-hex green
   LIVE label/dot) goes dark-on-dark and disappears. .live-activity-ticker-sample
   on the login page sits on the light body background instead, so it's excluded
   and keeps the normal theme-aware color. */
.live-activity-ticker:not(.live-activity-ticker-sample) {
  color: #f4f6fb;
}

.live-activity-ticker:not(.live-activity-ticker-sample) .live-activity-item strong {
  color: #f4f6fb;
}

.live-activity-ticker-sample {
  width: 100%;
  max-width: 400px;
  margin: 0 0 1.4rem;
  cursor: default;
}

@media (max-width: 900px) {
  .live-activity-ticker:not(.live-activity-ticker-sample) {
    display: none;
  }
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  vertical-align: middle;
  margin-left: 0.6rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8bf2c7;
  background: rgba(61, 214, 198, 0.12);
  border: 1px solid rgba(61, 214, 198, 0.35);
  border-radius: 999px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: rgba(154, 176, 214, 0.75);
}

.subtitle {
  margin: 0.4rem 0 0;
  color: rgba(var(--ink-soft-rgb), 0.65);
}

/* Baseline for any unclassed form control (e.g. the admin comment textarea) */
input,
select,
textarea {
  padding: 0.6rem 0.75rem;
  border-radius: 7px;
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  background: rgba(var(--ink-rgb), 0.03);
  color: var(--heading);
  font-size: 0.88rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #5b3df5;
  box-shadow: 0 0 0 3px rgba(91, 61, 245, 0.18);
}

/* Native <select> dropdown popups are OS/browser-drawn chrome, not regular
   boxes - they don't reliably honor arbitrary CSS colors, and the page's
   :root { color-scheme: dark } tells the browser to draw that chrome in dark
   mode, which combined with our light option text produced unreadable
   light-on-light or dark-on-dark popups depending on browser/OS. Force the
   select's native UI (popup background, scrollbar, etc.) to light mode
   specifically, which is the actual browser-supported way to guarantee a
   readable light popup regardless of the page's own dark theme. */
select:not([multiple]) {
  color-scheme: light;
}

select:not([multiple]) option {
  color: #0a1220;
  background: #ffffff;
}

/* Unlike a single <select> popup (OS-drawn chrome that ignores most CSS), a
   multi-select with a visible "size" is rendered inline by the page itself,
   so it can - and should - stay in the dark theme instead of forcing the
   light popup look, with the selected rows picked out in the accent color
   instead of the native white/blue OS highlight. */
select[multiple] {
  color-scheme: dark;
}

select[multiple] option {
  padding: 0.45rem 0.6rem;
  background: transparent;
  color: var(--heading);
}

select[multiple] option:checked {
  background: linear-gradient(0deg, var(--accent) 0%, var(--accent) 100%);
  color: #fff;
}

button {
  border: none;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition:
    background var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow);
}

button:hover {
  background: var(--accent-dark);
  box-shadow: 0 6px 16px rgba(91, 61, 245, 0.25);
}

button.link-button:hover,
button.modal-close:hover,
button.role-option:hover,
.logout-form button:hover,
button.pill-button:hover,
button.logout-button:hover,
button.profile-menu-trigger:hover,
button.profile-menu-item:hover {
  background: none;
  box-shadow: none;
}

/* ---------- Brand mark (shared: header, sidebar, login) ---------- */

.brand-mark {
  height: 34px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-mark svg,
.brand-mark img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-mark-lg {
  height: 56px;
}

/* The Workmates wordmark is dark navy on transparent - invisible against the
   dark theme's near-black background. No background chip (that reads as a
   pasted-on white sticker) - instead a soft white glow traces the opaque
   pixels themselves, including the dark letterforms, so the wordmark is
   legible by its own outline against the dark chrome. */
.brand-mark img {
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 5px rgba(255, 255, 255, 0.55));
  animation: logoGlow 3.2s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.85)) drop-shadow(0 0 4px rgba(255, 255, 255, 0.4)); }
  50% { filter: drop-shadow(0 0 2px rgba(255, 255, 255, 1)) drop-shadow(0 0 8px rgba(91, 61, 245, 0.7)); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark img { animation: none; }
}

/* ---------- App chrome: header ---------- */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 2rem;
  color: var(--heading);
  background: linear-gradient(180deg, rgba(10, 20, 36, 0.92), rgba(10, 18, 32, 0.78));
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 15;
}

.app-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-header-brand .eyebrow {
  margin: 0;
  font-size: 0.66rem;
}

.app-header-brand h1 {
  margin: 0.1rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
}

.app-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* Split header - shared by the Admin console and the Engineer Workspace so
   both read as one product: a lavender brand cell (aligned above the
   sidebar) on the left, a dark navy topbar on the right showing whichever
   page is open. .app-header-split alone just does the grid/basic layout;
   .admin-layout and .user-layout each get the matching 252px sidebar column
   at the same breakpoint so the brand cell and the sidebar stay aligned. */
.app-header-split { display:grid; grid-template-columns:252px minmax(0,1fr); padding:0; background:transparent; border-bottom:none; align-items:stretch; min-height:76px; }
.app-header-split .app-header-brand { background:linear-gradient(180deg, var(--sidebar-bg-1, #ece6fb), var(--sidebar-bg-2, #e2d9f7)); border-right:1px solid rgba(15,23,42,.06); border-bottom:1px solid rgba(15,23,42,.06); padding:0 16px; gap:12px; }
.app-header-split .app-header-brand .brand-mark { flex:none; height:40px; background:none; box-shadow:none; padding:0; border-radius:0; }
.app-header-split .app-header-brand .brand-mark img { filter:none; animation:none; height:40px; }
.app-header-split .app-header-brand .brand-copy { display:flex; flex-direction:column; gap:2px; min-width:0; }
.app-header-split .app-header-brand .brand-name { font-size:16px; font-weight:750; color:#0f1729; letter-spacing:-.01em; line-height:1.15; white-space:nowrap; }
.app-header-split .app-header-brand .brand-sub { font-size:9.5px; text-transform:uppercase; letter-spacing:.12em; color:#5b6472; font-weight:600; white-space:nowrap; }
.app-header-split .app-header-main { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:0 28px; background:linear-gradient(180deg,#101f3e,#0b1730); border-bottom:1px solid rgba(255,255,255,.08); min-width:0; }
.app-header-split .app-header-heading { display:flex; flex-direction:column; gap:3px; min-width:0; }
.app-header-split .app-page-title { margin:0; font-size:19px; font-weight:650; color:#f4f6fb; letter-spacing:-.01em; white-space:nowrap; line-height:1.15; }
.app-header-split .app-page-kicker { font-size:11px; text-transform:uppercase; letter-spacing:.13em; color:#8b95b5; font-weight:600; white-space:nowrap; }
.app-header-split .app-header-actions { flex:none; margin-left:auto; }
@media (max-width:1120px) {
  .app-header-split { grid-template-columns:1fr; min-height:0; }
  .app-header-split .app-header-brand { display:none; }
  .app-header-split .app-header-main { padding:10px 16px; }
}
@media (max-width:640px) {
  .app-header-split .app-page-kicker { display:none; }
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.75rem 0.35rem 0.4rem;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.04);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
}

.user-badge-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #5b3df5;
  color: var(--heading);
  font-size: 0.78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.user-badge-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.user-badge-copy strong {
  font-size: 0.82rem;
  color: var(--heading);
}

.user-badge-copy small {
  font-size: 0.7rem;
  color: rgba(var(--ink-soft-rgb), 0.55);
}

.profile-menu {
  position: relative;
}

.profile-menu-trigger {
  cursor: pointer;
  font: inherit;
  color: inherit;
  background: rgba(var(--ink-rgb), 0.04);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  box-shadow: none;
  transition:
    background var(--hover-duration) var(--ease-slow),
    border-color var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow);
}

.profile-menu-trigger:hover,
.profile-menu.open .profile-menu-trigger {
  background: rgba(61, 214, 198, 0.1);
  border-color: rgba(61, 214, 198, 0.35);
  transform: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  filter: none;
}

.profile-menu-caret {
  width: 12px;
  height: 12px;
  margin-left: 0.15rem;
  color: rgba(var(--ink-soft-rgb), 0.55);
  transition: transform var(--hover-duration) var(--ease-slow);
  flex-shrink: 0;
}

.profile-menu.open .profile-menu-caret {
  transform: rotate(180deg);
}

.profile-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 220px;
  padding: 0.35rem;
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(14, 28, 48, 0.96), rgba(8, 18, 34, 0.94));
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  z-index: 30;
  display: grid;
  gap: 0.15rem;
}

.profile-menu-dropdown[hidden] {
  display: none;
}

.profile-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: rgba(var(--ink-soft-rgb), 0.9);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--hover-duration) var(--ease-slow),
    color var(--hover-duration) var(--ease-slow);
}

.profile-menu-item:hover {
  background: rgba(var(--ink-rgb), 0.06);
  color: var(--heading);
  transform: none;
  box-shadow: none;
  filter: none;
}

.profile-menu-item-danger {
  color: #ffb0ae;
}

.profile-menu-item-danger:hover {
  background: rgba(220, 60, 60, 0.14);
  color: #ffc9c7;
}

.profile-menu-logout,
.profile-menu-logout button {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.profile-menu-logout button.profile-menu-item {
  padding: 0.65rem 0.8rem;
  background: transparent;
}

.pill-button,
.logout-button,
.logout-form button {
  border-radius: 7px;
  padding: 0.55rem 1rem;
  font-weight: 500;
  font-size: 0.85rem;
  background: transparent;
  color: rgba(var(--ink-soft-rgb), 0.85);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  cursor: pointer;
  transition:
    background var(--hover-duration) var(--ease-slow),
    border-color var(--hover-duration) var(--ease-slow),
    transform var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow),
    color var(--hover-duration) var(--ease-slow);
}

.pill-button:hover,
.logout-button:hover,
.logout-form button:hover {
  background: rgba(61, 214, 198, 0.08);
  border-color: rgba(61, 214, 198, 0.35);
  color: var(--heading);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  filter: none;
}

a.pill-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* ---------- CMDB modules ---------- */

.customer-card {
  min-width: 0;
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.9rem;
  background: rgba(var(--ink-rgb), 0.015);
  transition:
    transform var(--hover-duration) var(--ease-slow),
    border-color var(--hover-duration) var(--ease-slow),
    background var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow);
}

/* No lift/shadow on hover here - this card wraps a wide, horizontally
   scrolling data table (Customers & Cloud Accounts), and a transform on the
   whole card while someone is scrolling or reading a row is disorienting,
   not "polished". A border/background tint is enough hover feedback for a
   dense data grid - see .small-table's own row hover for row-level feedback. */
.customer-card:hover {
  border-color: rgba(61, 214, 198, 0.28);
  background: rgba(61, 214, 198, 0.03);
}

.customer-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.customer-card-head strong {
  font-size: 0.95rem;
  color: var(--heading);
}

.customer-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.customer-stat {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.05);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  color: rgba(var(--ink-soft-rgb), 0.75);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 500;
}

.customer-stat:hover {
  background: rgba(var(--ink-rgb), 0.08);
}

.customer-stat-accent {
  background: rgba(91, 61, 245, 0.14);
  border-color: rgba(91, 61, 245, 0.35);
  color: #ded6fd;
}

.hierarchy-tree {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0 0 0 0.9rem;
  border-left: 1px solid rgba(var(--ink-rgb), 0.08);
}

.hierarchy-tree .hierarchy-tree {
  margin-top: 0.4rem;
}

.hierarchy-tree li {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: rgba(var(--ink-soft-rgb), 0.9);
}

.hierarchy-tree-label {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(var(--ink-soft-rgb), 0.45);
  margin-right: 0.35rem;
}

.hierarchy-tree-envs {
  color: rgba(var(--ink-soft-rgb), 0.55);
  font-size: 0.8rem;
}

/* Every page's filter row (Cloud Resources, Change Management, New Resource
   Requests, Audit & Compliance, Reports, ...) shares this class - wrapped as
   one bordered toolbar surface, not a handful of selects sitting loose on
   the page background, so every list page reads the same way. */
.ci-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.7rem;
  background: rgba(var(--ink-rgb), 0.025);
  border: 1px solid rgba(var(--ink-rgb), 0.07);
  border-radius: 10px;
}

.ci-filter-bar select,
.ci-filter-bar input[type="search"],
.ci-filter-bar input[type="text"],
.ci-filter-bar .combo-single {
  height: 2.3rem;
}

/* Customers & Cloud Accounts' search + filters as one toolbar, not two
   mismatched rows (a narrow fixed-width search form stacked above a ragged
   row of differently-sized selects). One bordered surface, one consistent
   control height, everything on a shared baseline. */
.cust-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
  background: rgba(var(--ink-rgb), 0.025);
  border: 1px solid rgba(var(--ink-rgb), 0.07);
  border-radius: 10px;
}

.cust-toolbar select {
  height: 2.35rem;
  min-width: 148px;
  flex: 1 1 148px;
}

/* .search-bar elsewhere is capped at 420px and grid-locked to [input, button]
   - here it needs to flex to fill the toolbar's leading space and match the
   selects' height exactly, so it's overridden rather than reused as-is. */
.cust-toolbar-search {
  display: flex;
  width: auto;
  flex: 2 1 320px;
  gap: 0.5rem;
}

.cust-toolbar-search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 2.35rem;
}

.cust-toolbar-search button {
  height: 2.35rem;
  flex: none;
}

.cust-toolbar-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(var(--ink-rgb), 0.1);
  margin: 0 0.1rem;
}

@media (max-width: 900px) {
  .cust-toolbar-divider { display: none; }
}

.ci-filter-bar select,
.ci-filter-bar .combo-single {
  min-width: 220px;
  flex: 1 1 220px;
}

.ci-filter-bar input[type="search"] {
  min-width: 260px;
  flex: 1;
}

/* New Resource Requests' filter bar has 7 fields (two search+select pairs -
   Customer and AWS Account - plus status/project/range) vs. other filter
   bars' 5-6. Rather than force all 7 onto one row at a width that clips
   option text to an unreadable "All AWS acco…", let it wrap onto two rows
   at a width every option reads in full - a wrapped filter bar looks
   deliberate; truncated label text reads as broken. */
.ci-filter-bar-compact select,
.ci-filter-bar-compact .combo-single {
  min-width: 170px;
  flex: 1 1 170px;
}

.ci-filter-bar-compact input[type="search"] {
  min-width: 170px;
  flex: 1 1 170px;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(var(--ink-rgb), 0.08);
  font-size: 0.82rem;
  color: rgba(var(--ink-soft-rgb), 0.6);
}

.pagination-controls {
  display: flex;
  gap: 0.5rem;
}

.pagination-controls a {
  padding: 0.4rem 0.85rem;
  border-radius: 7px;
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  color: rgba(var(--ink-soft-rgb), 0.85);
  text-decoration: none;
  font-size: 0.82rem;
}

.pagination-controls a:hover {
  background: rgba(var(--ink-rgb), 0.05);
}

.pagination-controls a.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
}

.stub-panel {
  padding: 1.25rem;
  border-radius: 8px;
  background: rgba(var(--ink-rgb), 0.02);
  border: 1px dashed rgba(var(--ink-rgb), 0.14);
  color: rgba(var(--ink-soft-rgb), 0.7);
  font-size: 0.88rem;
  line-height: 1.6;
}

.stub-panel p {
  margin: 0 0 0.6rem;
}

.stub-panel p:last-child {
  margin-bottom: 0;
}

.integrations-group-title {
  margin: 1.6rem 0 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(var(--ink-soft-rgb), 0.65);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.07);
}

.integrations-group-title:first-of-type {
  margin-top: 0.4rem;
}

.integration-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-items: stretch;
  gap: 1rem;
}

.integration-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: linear-gradient(160deg, rgba(var(--ink-rgb), 0.05), rgba(var(--ink-rgb), 0.02)), var(--app-bg);
  border: 1px solid rgba(var(--ink-rgb), 0.09);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  min-width: 0;
  transition: border-color var(--hover-duration) var(--ease-slow), transform var(--hover-duration) var(--ease-slow), box-shadow var(--hover-duration) var(--ease-slow);
}

.integration-card:hover {
  border-color: rgba(91, 61, 245, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.integration-card > div {
  min-width: 0;
}

.integration-card strong {
  display: block;
  font-size: 0.9rem;
  color: var(--heading);
}

.integration-card .form-hint {
  margin: 0.15rem 0 0.4rem;
}

.integration-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--heading);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.integration-card-full {
  flex-direction: column;
}

.integration-card-full .integration-logo {
  margin-bottom: 0.4rem;
}

form.integration-connect-form {
  grid-template-columns: 1fr;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(var(--ink-rgb), 0.08);
}

/* .form-grid's own `display: grid` outranks the UA stylesheet's [hidden] rule
   (author CSS always beats user-agent CSS at equal specificity), so without
   this the connect forms render open on load instead of staying collapsed
   until "Add/Edit connection" is clicked. */
form.integration-connect-form[hidden] {
  display: none;
}

.integration-connect-form .form-actions {
  justify-content: flex-start;
}

.integration-logo-wm { background: linear-gradient(155deg, #6f52ff, #5b3df5); }
.integration-logo-aws { background: linear-gradient(155deg, #ffb040, #ff9900); }
.integration-logo-azure { background: linear-gradient(155deg, #3ccbf4, #0078d4); }
.integration-logo-gcp { background: linear-gradient(155deg, #6bb6ff, #4285f4); }
.integration-logo-zoho { background: linear-gradient(155deg, #ef6259, #e2453c); }
.integration-logo-cliq { background: linear-gradient(155deg, #42a5f5, #1e88e5); }
.integration-logo-teams { background: linear-gradient(155deg, #7478d6, #5b5fc7); }
.integration-logo-email { background: linear-gradient(155deg, #5ce8bc, #39d8a6); }
.integration-logo-slack { background: linear-gradient(155deg, #7c2d89, #611f69); }

.platform-health-grid {
  display: grid;
  gap: 0.75rem;
}

.platform-health-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  color: rgba(var(--ink-soft-rgb), 0.75);
  line-height: 1.4;
  min-width: 0;
}

.platform-health-item > span:last-child {
  min-width: 0;
}

/* ---------- Detail modal ---------- */

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: #a78bfa;
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-align: left;
}

.link-button:hover {
  background: none;
  color: #c4b5fd;
  text-decoration: underline;
}

.add-button {
  border-radius: 7px;
  background: #5b3df5;
  color: var(--heading);
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.add-button:hover {
  background-position: 100% 50%;
}

.form-modal {
  width: min(720px, 92vw);
}

.form-modal-lg {
  width: min(920px, 94vw);
}

.form-modal-lg .form-layout {
  gap: 0.9rem;
}

.form-modal .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-modal .form-actions {
  grid-column: 1 / -1;
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.65);
  z-index: 40;
}

.modal-backdrop.open {
  display: block;
}

.detail-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  background: #0e1626;
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  border-radius: 10px;
  padding: 1.5rem;
  z-index: 41;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.detail-modal.open {
  display: block;
}

.detail-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.detail-modal-head h3 {
  margin: 0.5rem 0 0;
  font-size: 1.15rem;
  color: var(--heading);
}

.modal-close {
  background: none;
  border: none;
  color: rgba(var(--ink-soft-rgb), 0.6);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.modal-close:hover {
  background: none;
  color: var(--heading);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
}

.detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(var(--ink-soft-rgb), 0.5);
}

.detail-grid span:last-child {
  font-size: 0.88rem;
  color: var(--heading);
}

.mono {
  font-family: 'SFMono-Regular', Consolas, monospace;
  overflow-wrap: anywhere;
}

.detail-ref {
  margin-left: 0.5rem;
  color: rgba(var(--ink-soft-rgb), 0.5);
  font-size: 0.8rem;
}

.detail-notes {
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.9rem;
  background: rgba(var(--ink-rgb), 0.03);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: 7px;
  font-size: 0.85rem;
  color: rgba(var(--ink-soft-rgb), 0.8);
  line-height: 1.5;
}

.detail-subsection {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(var(--ink-rgb), 0.08);
}

.detail-subsection h4 {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-cost-table {
  width: 100%;
  min-width: 0;
  font-size: 0.85rem;
}

.detail-cost-table th,
.detail-cost-table td {
  padding: 0.45rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.06);
}

.detail-cost-table tfoot td {
  border-bottom: none;
  border-top: 1px solid rgba(var(--ink-rgb), 0.15);
  font-weight: 700;
  color: var(--heading);
}

.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(var(--ink-soft-rgb), 0.8);
}

/* ---------- Layout ---------- */

.layout-grid,
.user-layout,
.admin-layout {
  display: grid;
  /* Must match .app-header-split's 252px brand column above it - keeping a
     single value here (rather than a narrower default overridden by a
     min-width media query further up the file) avoids the two drifting out
     of sync again. Collapses to 1fr below 1120px, see Responsive section. */
  grid-template-columns: 252px minmax(0, 1fr);
  align-items: start;
}

.sidebar-panel {
  background: linear-gradient(180deg, rgba(8, 22, 40, 0.7), rgba(6, 16, 30, 0.62));
  border-right: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: 0;
  padding: 1.25rem 1rem;
  position: sticky;
  top: 4.75rem;
  align-self: start;
  height: calc(100vh - 4.75rem);
  overflow-y: auto;
  backdrop-filter: blur(16px);
}

.content-panel {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
  width: 100%;
  max-width: 1900px;
  padding: 1.5rem 2rem 2.5rem;
}

.admin-section.hidden,
.team-section.hidden {
  display: none;
}

.panel,
.panel-glow {
  min-width: 0;
  background: linear-gradient(160deg, rgba(14, 28, 48, 0.72), rgba(8, 18, 34, 0.64));
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(14px);
  transition:
    transform var(--hover-duration) var(--ease-slow),
    border-color var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow);
}

.panel:hover,
.panel-glow:hover {
  border-color: rgba(91, 61, 245, 0.3);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

/* ---------- Sidebar ---------- */

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
}

.sidebar-header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--heading);
}

.sidebar-header .eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.64rem;
}

.sidebar-nav {
  display: grid;
  gap: 0.15rem;
  margin: 0 0 1.25rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  color: rgba(var(--ink-soft-rgb), 0.75);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  border-left: 2px solid transparent;
  min-width: 0;
  transition:
    background var(--hover-duration) var(--ease-slow),
    color var(--hover-duration) var(--ease-slow),
    border-color var(--hover-duration) var(--ease-slow),
    transform var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow);
}

.nav-label-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.nav-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform var(--hover-duration) var(--ease-slow);
}

.nav-badge {
  margin-left: auto;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
  flex-shrink: 0;
}

.sidebar-nav a:hover {
  background: rgba(var(--ink-rgb), 0.05);
  color: var(--heading);
}

/* One accent color (the app's own --accent) for the active state, instead of
   a hover tint in one hue and an active border in another - a sidebar with a
   single, consistent accent reads as a deliberate brand choice rather than a
   handful of unrelated colors picked for variety. */
.sidebar-nav a.active {
  background: rgba(91, 61, 245, 0.12);
  border-left-color: var(--accent);
  color: var(--heading);
}

.sidebar-nav-label {
  display: block;
  margin: 1rem 0 0.45rem 0.7rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--heading);
}

.sidebar-nav-label-first {
  margin-top: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(var(--ink-soft-rgb), 0.55);
}

/* Plain uppercase section labels, same treatment as the top "Navigation"
   label - a quiet text divider, not a colored pill, so the sidebar's only
   real color signal is the active-item accent. */
.sidebar-nav-label-group {
  display: block;
  margin: 1.5rem 0 0.5rem 0.7rem;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(var(--ink-soft-rgb), 0.5);
  background: none;
  border-left: none;
  border-radius: 0;
}

/* ---------- Collapsible sidebar ---------- */

.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0 0 0.75rem auto;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  background: rgba(var(--ink-rgb), 0.04);
  color: rgba(var(--ink-soft-rgb), 0.75);
  cursor: pointer;
  transition:
    background var(--hover-duration) var(--ease-slow),
    color var(--hover-duration) var(--ease-slow);
}

.sidebar-toggle-btn:hover {
  background: rgba(91, 61, 245, 0.16);
  color: var(--heading);
}

.sidebar-toggle-icon {
  width: 13px;
  height: 13px;
  transition: transform var(--hover-duration) var(--ease-slow);
}

html[data-sidebar-collapsed="true"] .sidebar-toggle-icon {
  transform: rotate(180deg);
}

/* The collapsed rail only makes sense at desktop widths - below the 1120px
   breakpoint the sidebar already stacks above the content as a single column,
   and letting these rules apply there would fight that layout and squeeze
   both the sidebar and the content into unreadable slivers. */
@media (min-width: 1121px) {
  html[data-sidebar-collapsed="true"] .admin-layout,
  html[data-sidebar-collapsed="true"] .user-layout {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  html[data-sidebar-collapsed="true"] .sidebar-panel {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    overflow-x: hidden;
  }

  html[data-sidebar-collapsed="true"] .sidebar-toggle-btn {
    margin-left: auto;
    margin-right: auto;
  }

  html[data-sidebar-collapsed="true"] .sidebar-nav-label,
  html[data-sidebar-collapsed="true"] .nav-label-text {
    display: none;
  }

  html[data-sidebar-collapsed="true"] .sidebar-nav a {
    justify-content: center;
    padding: 0.55rem;
    gap: 0;
  }

  html[data-sidebar-collapsed="true"] .sidebar-nav a:hover {
    transform: none;
  }

  html[data-sidebar-collapsed="true"] .nav-icon {
    width: 17px;
    height: 17px;
  }
}

.sidebar-metrics {
  display: grid;
  gap: 0.6rem;
}

.metric-card {
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: rgba(var(--ink-rgb), 0.03);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  transition:
    transform var(--hover-duration) var(--ease-slow),
    border-color var(--hover-duration) var(--ease-slow),
    background var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 199, 44, 0.28);
  background: rgba(255, 199, 44, 0.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.metric-card span {
  display: block;
  color: rgba(var(--ink-soft-rgb), 0.6);
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
}

.metric-card strong {
  color: var(--heading);
  font-size: 1.15rem;
}

/* ---------- Page / panel headers ---------- */

.content-topbar,
.panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.content-topbar h1 {
  font-size: 1.35rem;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
}

.content-topbar p,
.panel-header p {
  margin: 0.35rem 0 0;
  color: rgba(var(--ink-soft-rgb), 0.6);
  font-size: 0.88rem;
  max-width: 640px;
}

.top-actions button,
.search-bar button {
  border-radius: 7px;
  background: transparent;
  color: rgba(var(--ink-soft-rgb), 0.85);
  padding: 0.55rem 1rem;
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  font-size: 0.85rem;
  font-weight: 500;
}

.top-actions button:hover,
.search-bar button:hover {
  background: rgba(var(--ink-rgb), 0.06);
}

/* ---------- Dashboard summary cards ---------- */

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 0.85rem;
  /* Every tile in a row is the same height - a ragged grid of numbers reads
     as unfinished, not enterprise. Content inside each card distributes to
     fill (label top, figure, footnote pinned to the bottom edge). */
  align-items: stretch;
  grid-auto-rows: 1fr;
}

/* One restrained card system for every metric. The number and label carry
   the hierarchy; the thin top rule is the only colour, and only as a quiet
   category cue. Reference points: Datadog / Linear / Stripe dashboards. */
.summary-card,
.stats-grid .stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.05rem 1.15rem 1.1rem;
  border-radius: 12px;
  background: var(--surface-1);
  border: 1px solid rgba(var(--ink-rgb), 0.09);
  transition:
    transform 0.18s var(--ease-slow),
    border-color 0.18s var(--ease-slow),
    box-shadow 0.18s var(--ease-slow);
}

.summary-card:hover,
.stats-grid .stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--ink-rgb), 0.16);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

/* One quiet fade-in for the whole strip - no per-tile bounce. */
.dashboard-summary-grid .summary-card,
.stats-grid .stat-card {
  animation: login-rise 0.4s var(--ease-slow) both;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-summary-grid .summary-card,
  .stats-grid .stat-card { animation: none; }
  .summary-card:hover,
  .stats-grid .stat-card:hover { transform: none; }
}

/* Thin top rule - a subdued category cue, not a highlight. */
.summary-primary,
.summary-accent,
.summary-card-purple,
.summary-card-teal,
.summary-card-blue,
.summary-card-orange,
.summary-card-amber,
.summary-card-skyblue {
  border-top: 2px solid rgba(var(--ink-rgb), 0.18);
}

.summary-card-purple { border-top-color: #8b7bff; }
.summary-card-teal,
.summary-accent { border-top-color: var(--accent); }
.summary-card-blue,
.summary-card-skyblue { border-top-color: #4f7fe6; }
.summary-card-orange,
.summary-card-amber { border-top-color: #e0922b; }

.summary-card-link {
  text-decoration: none;
  cursor: pointer;
}

.summary-accent strong {
  color: var(--accent);
}

.summary-card-danger {
  border: 1px solid rgba(255, 85, 102, 0.3);
  background: linear-gradient(160deg, rgba(255, 85, 102, 0.06), transparent 60%), var(--surface-1);
}

.summary-card-danger strong {
  color: #dc2626;
}

@keyframes dangerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 85, 102, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(255, 85, 102, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .summary-icon-danger { animation: none; }
}

/* A single quiet icon treatment across every card - the icon shape (not a
   rotating rainbow of background colors) is what tells cards apart. Color is
   reserved for .summary-icon-danger, where it signals an actual alert. */
.summary-icon,
.summary-icon-pending,
.summary-icon-approved,
.summary-icon-next,
.summary-icon-cr,
.summary-icon-nr,
.summary-icon-cost {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  margin: 0;
  background: rgba(var(--accent-rgb, 91, 61, 245), 0.09);
  border: 1px solid rgba(var(--accent-rgb, 91, 61, 245), 0.16);
  color: var(--accent);
  transition: transform var(--hover-duration) var(--ease-slow);
}

.summary-card:hover .summary-icon,
.summary-card:hover [class^="summary-icon"] {
  transform: scale(1.08) rotate(-3deg);
}

.summary-icon svg,
[class^="summary-icon"] svg {
  width: 15px;
  height: 15px;
}

.summary-icon-danger {
  background: rgba(255, 85, 102, 0.16);
  border-color: rgba(255, 85, 102, 0.3);
  color: #dc2626;
  animation: dangerPulse 2s ease-in-out infinite;
}

.cab-approver-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.renewal-doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  max-height: 110px;
  overflow-y: auto;
}

.renewal-doc-list li {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.cab-approver-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.cab-approver-avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(91, 61, 245, 0.18);
  color: #9b87f5;
}

.daily-quote-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.9rem;
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(91, 61, 245, 0.14), rgba(57, 216, 166, 0.1));
  border: 1px solid rgba(61, 214, 198, 0.22);
  animation: login-rise 0.7s var(--ease-slow) both;
}

.daily-quote-mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #3dd6c6;
  opacity: 0.8;
}

.daily-quote-banner p {
  margin: 0;
  font-size: 0.92rem;
  font-style: italic;
  color: rgba(var(--ink-soft-rgb), 0.9);
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .daily-quote-banner { animation: none; }
}

.summary-icon-info {
  background: rgba(111, 156, 255, 0.14);
  color: #6f9cff;
}

.summary-label,
.stat-label {
  display: block;
  color: rgba(var(--ink-soft-rgb), 0.55);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.66rem;
  font-weight: 600;
}

.summary-card .summary-label {
  padding-right: 30px; /* clear the absolutely-positioned corner icon */
  min-height: 1.6em;   /* keep one- and two-line labels aligned across the row */
}

.summary-card strong,
.stats-grid .stat-card strong {
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--heading);
  display: block;
  font-weight: 750;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.summary-accent strong,
.summary-card-teal strong { color: var(--accent); }

.summary-card .form-hint {
  font-size: 0.7rem !important;
  line-height: 1.4;
  margin-top: 0.4rem !important;
  color: rgba(var(--ink-soft-rgb), 0.5);
}

.summary-card .cost-breakdown-row { font-size: 0.74rem; }
.summary-card .cost-breakdown-row strong { font-size: 1.2rem; }

/* Two-currency summary cards (Change Record / New Request Value): each
   currency gets its own row instead of one run-on "$X + ₹Y" string, which
   used to wrap mid-number on narrower cards. */
.cost-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cost-breakdown-row {
  font-size: 0.85rem;
  color: rgba(var(--ink-soft-rgb), 0.65);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.cost-breakdown-row strong {
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--heading);
  font-weight: 700;
}

.cost-breakdown-empty {
  font-size: 1rem !important;
  color: rgba(var(--ink-soft-rgb), 0.4) !important;
  font-weight: 500 !important;
}

/* ==========================================================================
   Settings — master / detail (left rail + panel), enterprise style
   ========================================================================== */

.set-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--surface-1);
  border: 1px solid rgba(var(--ink-rgb), 0.09);
  border-radius: 12px;
}
.set-status-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.set-status-k {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(var(--ink-soft-rgb), 0.5);
}
.set-status-item strong { font-size: 0.82rem; font-weight: 650; color: var(--heading); }
.set-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(var(--ink-rgb), 0.28);
  flex: none;
}
.set-dot.ok { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14); }

.set-flash {
  max-width: 900px;
  padding: 10px 14px;
  border-radius: 9px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  font-weight: 500;
}
.set-flash.ok { background: #e4f6ec; color: #0b6b3d; }
.set-flash.bad { background: #fdecea; color: #b42318; }

.set-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  max-width: 1080px;
}

.set-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 12px;
}
.set-nav-btn {
  text-align: left;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 550;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(var(--ink-soft-rgb), 0.7);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.set-nav-btn:hover { background: rgba(var(--ink-rgb), 0.04); color: var(--heading); }
.set-nav-btn.active {
  background: rgba(var(--accent-rgb, 13, 148, 136), 0.1);
  border-color: rgba(var(--accent-rgb, 13, 148, 136), 0.22);
  color: var(--accent-dark, var(--accent));
  font-weight: 650;
}

.set-detail { min-width: 0; }
.set-panel { display: flex; flex-direction: column; gap: 14px; }
.set-panel[hidden] { display: none; }
.set-panel-title { margin: 0; font-size: 1.05rem; font-weight: 650; color: var(--heading); }
.set-panel-desc {
  margin: -4px 0 2px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(var(--ink-soft-rgb), 0.62);
  max-width: 62ch;
}

.set-card {
  background: var(--surface-1);
  border: 1px solid rgba(var(--ink-rgb), 0.09);
  border-radius: 12px;
  padding: 18px 20px;
}
.set-card-head { margin-bottom: 12px; }
.set-card-head h4 { margin: 0; font-size: 0.9rem; font-weight: 650; color: var(--heading); }

.set-form { display: flex; flex-direction: column; gap: 14px; }
.set-field { display: flex; flex-direction: column; gap: 5px; }
.set-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(var(--ink-soft-rgb), 0.85);
}
.set-hint { font-weight: 400; color: rgba(var(--ink-soft-rgb), 0.5); }
.set-field input[type="text"],
.set-field input[type="number"],
.set-field select,
.set-field textarea,
.set-form input[type="text"],
.set-form input[type="number"],
.set-form select {
  font: inherit;
  font-size: 0.86rem;
  padding: 9px 11px;
  border: 1px solid rgba(var(--ink-rgb), 0.16);
  border-radius: 8px;
  background: var(--surface-1);
  color: var(--text);
  width: 100%;
}
.set-field input:focus,
.set-field select:focus,
.set-form input:focus,
.set-form select:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb, 13, 148, 136), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 13, 148, 136), 0.12);
}
.set-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.set-subhead {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(var(--ink-soft-rgb), 0.5);
  margin-top: 4px;
}
.set-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.82rem; }
.set-checks label { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.set-check-row { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 500; }

.set-level {
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  border-radius: 10px;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.set-level legend {
  padding: 0 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(var(--ink-soft-rgb), 0.55);
}

.set-form-actions { margin-top: 4px; }
.set-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.set-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(var(--ink-rgb), 0.16);
  background: var(--surface-1);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.set-btn:hover { border-color: rgba(var(--ink-rgb), 0.3); background: var(--surface-2); }
.set-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.set-btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.set-btn-danger { color: #b42318; border-color: rgba(180, 35, 24, 0.3); }
.set-btn-danger:hover { background: #fdecea; border-color: rgba(180, 35, 24, 0.5); }

.set-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.set-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  border-radius: 10px;
  padding: 11px 13px;
  background: var(--surface-2);
}
.set-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.set-row-main > strong { font-size: 0.86rem; color: var(--heading); }
.set-row-sub { font-size: 0.74rem; color: rgba(var(--ink-soft-rgb), 0.6); line-height: 1.5; }
.set-row-sub > strong { color: rgba(var(--ink-soft-rgb), 0.8); font-weight: 650; }
.set-row-actions { display: flex; gap: 6px; flex: none; }
.set-chip {
  display: inline-block;
  font-size: 0.68rem;
  padding: 2px 7px;
  margin: 2px 4px 0 0;
  border-radius: 6px;
  background: rgba(var(--ink-rgb), 0.06);
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  color: rgba(var(--ink-soft-rgb), 0.75);
}
.set-empty { font-size: 0.8rem; color: rgba(var(--ink-soft-rgb), 0.55); line-height: 1.5; margin: 0; }

.lr-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lr-mini .m { border: 1px solid rgba(var(--ink-rgb), 0.09); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.lr-mini .m span { display: block; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(var(--ink-soft-rgb), 0.5); }
.lr-mini .m strong { display: block; font-size: 1.05rem; font-weight: 750; color: var(--heading); margin-top: 3px; letter-spacing: -0.01em; }

@media (max-width: 860px) {
  .set-shell { grid-template-columns: 1fr; }
  .set-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 4px;
  }
  .set-nav-btn { flex: 1 1 auto; text-align: center; }
  .set-grid2, .lr-mini { grid-template-columns: 1fr; }
}

/* Renewals Due summary card: lists which accounts are actually due instead of
   just a bare count, red-flagging anything inside the 15-day urgent window. */
.renewal-alert-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.renewal-alert-list li {
  font-size: 0.8rem;
  color: rgba(var(--ink-soft-rgb), 0.75);
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.renewal-alert-list li.renewal-alert-urgent {
  color: #dc2626;
  font-weight: 700;
}

.renewal-alert-days {
  margin-left: auto;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.summary-note {
  margin: 0.5rem 0 0;
  color: rgba(var(--ink-soft-rgb), 0.5);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ---------- Cloud Resources: resource-type count strip ---------- */

.res-type-strip {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.2rem 0.15rem 0.7rem;
  margin: 0.5rem 0 1rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--ink-rgb), 0.2) transparent;
}
.res-type-strip::-webkit-scrollbar { height: 6px; }
.res-type-strip::-webkit-scrollbar-track { background: transparent; }
.res-type-strip::-webkit-scrollbar-thumb { background: rgba(var(--ink-rgb), 0.18); border-radius: 99px; }

.res-type-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  min-width: 108px;
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
  padding: 0.58rem 0.7rem 0.62rem;
  border-radius: 11px;
  background: var(--surface-1);
  border: 1px solid rgba(var(--ink-rgb), 0.09);
  transition:
    transform var(--hover-duration) var(--ease-slow),
    border-color var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow);
  animation: login-rise 0.45s var(--ease-slow) both;
}
.res-type-card:hover {
  transform: translateY(-3px);
  border-color: hsla(var(--rtc-hue, 210), 70%, 55%, 0.55);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.14),
    0 4px 16px hsla(var(--rtc-hue, 210), 70%, 50%, 0.16);
}
.res-type-card .rtc-top { display: flex; align-items: center; gap: 0.4rem; }
.res-type-card .rtc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  height: 19px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: hsla(var(--rtc-hue, 210), 68%, 52%, 0.14);
  color: hsl(var(--rtc-hue, 210), 58%, 62%);
  border: 1px solid hsla(var(--rtc-hue, 210), 68%, 52%, 0.28);
}
[data-theme="light"] .res-type-card .rtc-chip { color: hsl(var(--rtc-hue, 210), 62%, 36%); }
.res-type-card .rtc-count {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}
.res-type-card.is-all { border-color: rgba(var(--accent-rgb, 91, 61, 245), 0.35); }
.res-type-card.is-all .rtc-count { color: var(--accent); font-size: 1.32rem; }
.res-type-card .rtc-label {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(var(--ink-soft-rgb), 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.res-type-card .rtc-sub {
  font-size: 0.58rem;
  color: rgba(var(--ink-soft-rgb), 0.45);
  font-variant-numeric: tabular-nums;
}
.res-type-card:nth-child(1) { animation-delay: 0.02s; }
.res-type-card:nth-child(2) { animation-delay: 0.05s; }
.res-type-card:nth-child(3) { animation-delay: 0.08s; }
.res-type-card:nth-child(4) { animation-delay: 0.11s; }
.res-type-card:nth-child(5) { animation-delay: 0.14s; }
.res-type-card:nth-child(6) { animation-delay: 0.17s; }
.res-type-card:nth-child(7) { animation-delay: 0.2s; }
.res-type-card:nth-child(n+8) { animation-delay: 0.23s; }

@media (prefers-reduced-motion: reduce) {
  .res-type-card { animation: none; }
  .res-type-card:hover { transform: none; }
}

/* ---------- CI tables -> stacked cards on small screens ---------- */
@media (max-width: 720px) {
  /* Base table styles force a 720px min-width for horizontal scroll - undo
     that here so the stacked cards fit the phone instead of scrolling. */
  .table-wrap:has(> table.ci-cards-on-mobile) { overflow-x: visible; }
  table.ci-cards-on-mobile {
    border: 0;
    width: 100% !important;
    min-width: 0 !important;
  }
  table.ci-cards-on-mobile thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  table.ci-cards-on-mobile tbody { display: flex; flex-direction: column; gap: 0.6rem; }
  table.ci-cards-on-mobile tr {
    display: block;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(var(--ink-rgb), 0.1);
    border-radius: 11px;
    background: var(--surface-1);
  }
  table.ci-cards-on-mobile td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.2rem 0;
    border: 0;
    text-align: right;
    word-break: break-word;
  }
  table.ci-cards-on-mobile td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    color: rgba(var(--ink-soft-rgb), 0.55);
  }
  table.ci-cards-on-mobile td:first-child {
    margin-bottom: 0.2rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed rgba(var(--ink-rgb), 0.12);
  }
  table.ci-cards-on-mobile td[data-label]:empty { display: none; }
  table.ci-cards-on-mobile .table-empty-state { display: block; text-align: center; }
  table.ci-cards-on-mobile .table-empty-state::before { content: none; }

  .cloud-resources-page .ci-filter-bar,
  #cloud-resources .ci-filter-bar { flex-direction: column; align-items: stretch; }
  .cloud-resources-page .ci-filter-bar label,
  #cloud-resources .ci-filter-bar label { width: 100%; }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

/* Divider between a Reports page's stacked stat-card groups (My CR status
   breakdown, My NR status breakdown, ...) - was an ad-hoc .panel-header reuse
   with an inline margin-top, which read as another toolbar row rather than a
   section label. A quiet top rule plus real spacing reads as one report with
   grouped sections instead of several unrelated panels stacked together. */
.stats-subhead {
  margin: 1.75rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(var(--ink-rgb), 0.08);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--heading);
}

.summary-sub {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(var(--ink-soft-rgb), 0.6);
  margin-left: 0.4rem;
}

/* ---------- Dashboard charts ---------- */

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.chart-card-right {
  grid-column: 2;
}

@media (max-width: 900px) {
  .chart-card-right {
    grid-column: auto;
  }
}

.chart-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: linear-gradient(155deg, rgba(16, 27, 46, 0.95), rgba(12, 22, 40, 0.9));
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
  min-width: 0;
  transition:
    transform var(--hover-duration) var(--ease-slow),
    border-color var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow);
}

.chart-card:hover {
  transform: translateY(-3px);
  border-color: rgba(61, 214, 198, 0.25);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.chart-card-wide {
  grid-column: 1 / -1;
}

.chart-card h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--heading);
}

.chart-card-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 6px;
}

.chart-card-icon svg {
  width: 14px;
  height: 14px;
}

.bar-chart {
  display: grid;
  gap: 0.85rem;
}

.chart-card .form-hint {
  margin: 0;
  padding-top: 0.15rem;
  line-height: 1.55;
}

.chart-empty {
  margin: 0;
  color: rgba(var(--ink-soft-rgb), 0.5);
  font-size: 0.85rem;
}

.donut-card {
  background: linear-gradient(155deg, rgba(16, 27, 46, 0.95), rgba(12, 22, 40, 0.9));
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
  transition:
    transform var(--hover-duration) var(--ease-slow),
    border-color var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow);
}

.donut-card:hover {
  transform: translateY(-3px);
  border-color: rgba(61, 214, 198, 0.25);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.donut-card h4 {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--heading);
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.donut-chart {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  animation: donutGrowIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes donutGrowIn {
  from { opacity: 0; transform: scale(0.55) rotate(-40deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .donut-chart { animation: none; }
}

.donut-chart-hole {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: #101b2e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donut-chart-hole strong {
  font-size: 1.3rem;
  color: var(--heading);
  line-height: 1.25;
  text-align: center;
}

/* Two-currency totals ("$X<br>+ ₹Y", see partials/donut-chart.ejs) need a
   smaller size than a plain count to fit both lines inside the fixed-size
   hole without crowding "TOTAL" underneath. */
.donut-chart-hole strong:has(br) {
  font-size: 0.92rem;
}

.donut-chart-hole span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(var(--ink-soft-rgb), 0.45);
}

.donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  flex: 1;
  min-width: 140px;
}

.donut-legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(var(--ink-soft-rgb), 0.85);
}

.donut-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}

.donut-legend-label {
  flex: 1;
}

.donut-legend-value {
  font-weight: 600;
  color: var(--heading);
}

.activity-feed {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.activity-feed li {
  font-size: 0.82rem;
  color: rgba(var(--ink-soft-rgb), 0.85);
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.06);
  padding-bottom: 0.5rem;
}

.activity-feed-time {
  display: block;
  font-size: 0.72rem;
  color: rgba(var(--ink-soft-rgb), 0.45);
  margin-bottom: 0.15rem;
}

.ref-number-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.ref-number-legend li {
  display: grid;
  gap: 0.2rem;
}

.ref-number-legend .mono {
  font-size: 0.78rem;
  color: var(--heading);
  font-weight: 600;
}

.ref-number-legend li span:last-child {
  font-size: 0.78rem;
  color: rgba(var(--ink-soft-rgb), 0.75);
  line-height: 1.5;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.bar-label {
  font-size: 0.8rem;
  color: rgba(var(--ink-soft-rgb), 0.75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.06);
  overflow: hidden;
  min-width: 0;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #5b3df5, #7c67ff);
  border-radius: 999px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-fill-alt {
  background: linear-gradient(90deg, #ffc72c, #ffdb7a);
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill { transition: none; }
}

.bar-value {
  font-size: 0.76rem;
  color: rgba(var(--ink-soft-rgb), 0.6);
  white-space: nowrap;
  line-height: 1.35;
  text-align: right;
}

.bar-value-sub {
  color: rgba(255, 180, 130, 0.85);
}

/* Teams summary-card: a per-team mini meter (name + proportional bar + count)
   instead of plain stacked text rows - lets you see at a glance which team
   carries the most projects without leaving the card. */
.team-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px auto;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.4rem;
}

.team-mini-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-mini-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.07);
  overflow: hidden;
}

.team-mini-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  .team-mini-fill { transition: none; }
}

.team-mini-value {
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: rgba(var(--ink-soft-rgb), 0.6);
  text-align: right;
}

/* Empty state: a real designed placeholder (icon + message + a way to fix
   it) instead of three stacked lines of muted text, which reads as
   unfinished rather than "there's genuinely nothing here yet". */
.card-empty-state {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px dashed rgba(var(--ink-rgb), 0.14);
  border-radius: 8px;
  background: rgba(var(--ink-rgb), 0.015);
}

.card-empty-state svg {
  flex: none;
  width: 14px;
  height: 14px;
  color: rgba(var(--ink-soft-rgb), 0.35);
}

.card-empty-state p {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.72rem;
  color: rgba(var(--ink-soft-rgb), 0.6);
  line-height: 1.35;
}

.card-empty-state a {
  flex: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: #7c3aed;
  text-decoration: none;
  white-space: nowrap;
}

.card-empty-state a:hover {
  text-decoration: underline;
}

/* ---------- Type filter tabs ---------- */

.type-filter-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.type-filter {
  padding: 0.4rem 0.9rem;
  border-radius: 7px;
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  color: rgba(var(--ink-soft-rgb), 0.7);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
}

.type-filter:hover {
  background: rgba(var(--ink-rgb), 0.05);
}

.type-filter.active {
  background: rgba(91, 61, 245, 0.14);
  border-color: rgba(91, 61, 245, 0.4);
  color: var(--heading);
}

.category-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: 220px;
}

.category-chip {
  display: inline-flex;
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
  background: rgba(var(--ink-rgb), 0.05);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  color: rgba(var(--ink-soft-rgb), 0.7);
  font-size: 0.7rem;
}

/* ---------- Search ---------- */

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  width: min(100%, 420px);
}

.status-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-summary span {
  color: rgba(var(--ink-soft-rgb), 0.65);
}

/* ---------- Forms ---------- */

.form-layout {
  display: grid;
  gap: 0.9rem;
}

.form-card {
  background: rgba(var(--ink-rgb), 0.02);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: 8px;
  padding: 1.15rem;
}

.card-title {
  margin: 0 0 0.9rem;
  color: #c4b5fd;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: rgba(var(--ink-soft-rgb), 0.8);
  font-size: 0.85rem;
}

/* A "search then select" combobox (search input directly above its <select>)
   renders as one seamless box instead of two stacked ones - the input keeps
   the top corners/border, the select keeps the bottom ones, and a negative
   margin equal to the label's flex gap collapses the space between them. */
.select-search {
  margin-bottom: -0.15rem;
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px 8px 0 0;
  position: relative;
  z-index: 1;
}

.select-search:focus {
  z-index: 2;
}

.select-search + select {
  margin-top: -0.55rem;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* Compact multi-account picker (Discovery scan scope): a single closed box,
   same footprint as any other search/select field, that opens a small
   checklist panel on demand instead of staying expanded as a tall listbox. */
.multi-combo {
  position: relative;
}

.multi-combo-input {
  width: 100%;
  cursor: pointer;
}

.multi-combo-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 260px;
  overflow-y: auto;
  background: var(--app-bg);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 0.35rem;
}

.multi-combo-panel[hidden] {
  display: none;
}

.multi-combo-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--heading);
}

.multi-combo-option:hover {
  background: rgba(var(--ink-rgb), 0.06);
}

.multi-combo-option input[type="checkbox"] {
  accent-color: var(--accent);
  width: auto;
}

.multi-combo-option.hidden-by-search {
  display: none !important;
}

/* Single-select search-and-pick combobox: one visible box (like .multi-combo)
   instead of a search input stacked on top of an always-visible <select> -
   the <select> stays in the DOM (hidden) purely to hold the real value/options
   for form submission and cascade logic; the dropdown panel is what the user
   actually sees and clicks. */
.combo-single {
  position: relative;
}

.combo-single-input {
  width: 100%;
  cursor: text;
}

.combo-single-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

.combo-single-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 260px;
  overflow-y: auto;
  background: var(--app-bg);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 0.35rem;
}

.combo-single-panel[hidden] {
  display: none;
}

.combo-single-option {
  padding: 0.45rem 0.6rem;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--heading);
}

.combo-single-option:hover,
.combo-single-option.active {
  background: rgba(var(--ink-rgb), 0.08);
}

.combo-single-empty {
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  color: rgba(var(--ink-soft-rgb), 0.7);
}

.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
}

.form-grid textarea {
  min-height: 90px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.user-management-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.user-list-card,
.user-form-card {
  background: rgba(var(--ink-rgb), 0.02);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: 8px;
  padding: 1.25rem;
  /* Grid items default to a min-width equal to their content's max-content
     size, so a wide table (Existing users, once it grew a Team column) would
     force the whole grid track wider instead of scrolling inside .table-wrap -
     this lets it shrink so the table's own overflow-x:auto takes over. */
  min-width: 0;
}

.user-list-card h4,
.user-form-card h4 {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading);
}

.user-form label {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  color: rgba(var(--ink-soft-rgb), 0.8);
  font-size: 0.85rem;
}

.user-form input,
.user-form select {
  width: 100%;
}

.user-form button {
  width: 100%;
  font-size: 0.88rem;
}

fieldset {
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  border-radius: 8px;
  padding: 0.9rem;
  margin: 0;
  background: rgba(var(--ink-rgb), 0.02);
}

legend {
  color: #c4b5fd;
  padding: 0 0.5rem;
  font-size: 0.85rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.request-type-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.request-type-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(var(--ink-rgb), 0.02);
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  cursor: pointer;
}

.request-type-option input {
  margin-top: 0.2rem;
  width: auto;
}

.request-type-option span {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.request-type-option strong {
  font-size: 0.9rem;
  color: var(--heading);
}

.request-type-option small {
  color: rgba(var(--ink-soft-rgb), 0.6);
  font-size: 0.78rem;
  line-height: 1.4;
}

.request-type-option:has(input:checked) {
  border-color: #5b3df5;
  background: rgba(91, 61, 245, 0.08);
}

.form-hint {
  margin: 0.35rem 0 0.9rem;
  font-size: 0.8rem;
  color: rgba(var(--ink-soft-rgb), 0.55);
  line-height: 1.5;
}

/* A short "how this works" explainer, called out from the page instead of
   blending into every other muted .form-hint line - used on both the Admin
   console and the Engineer Workspace wherever a page opens with one. */
.info-callout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 1.1rem;
  padding: 12px 14px;
  background: #f2faf9;
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-left: 3px solid #0d9488;
  border-radius: 10px;
}

.info-callout svg {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: #0f766e;
}

.info-callout p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
}

.info-callout strong {
  color: #0f1729;
}

.service-value-grid {
  display: grid;
  gap: 0.5rem;
}

.service-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 110px;
  gap: 0.6rem;
  align-items: stretch;
}

.service-value-row .checkbox {
  margin: 0;
}

.service-value-head {
  padding: 0 0.2rem;
}

.service-value-total {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(91, 61, 245, 0.1);
  border: 1px solid rgba(91, 61, 245, 0.25);
}

.service-value-total span:first-child {
  font-size: 0.78rem;
  color: rgba(var(--ink-soft-rgb), 0.7);
}

.service-value-total strong {
  font-size: 1.2rem;
  color: var(--heading);
}

.service-value-head span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(var(--ink-soft-rgb), 0.5);
  align-self: center;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.type-CR {
  background: rgba(255, 138, 76, 0.14);
  color: #ffb385;
}

.type-NR {
  background: rgba(87, 176, 255, 0.14);
  color: #b8a8fb;
}

label.checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  border-radius: 7px;
  background: rgba(var(--ink-rgb), 0.03);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  font-size: 0.85rem;
}

/* ---------- Tables ---------- */

.small-table td,
.small-table th {
  padding: 0.6rem 0.75rem;
  white-space: nowrap;
}

/* A field nobody has filled in yet shows as a plain "—" (never a blank cell -
   that would look like a rendering bug) but is deliberately faint, so a
   sparsely-populated row reads as "these are open, click to fill them in"
   rather than a wall of equally-loud dashes competing with the real data. */
.editable-cell[data-value=""] {
  color: rgba(var(--ink-soft-rgb), 0.34);
}

/* Dense multi-column tables (Customers & Cloud Accounts, discovery preview):
   the first column stays pinned while the rest scrolls horizontally, so you
   never lose track of which row you're looking at, and alternating row
   shading makes a wide row easier to trace across the screen. */
.small-table tbody tr:nth-child(even) td {
  background: rgba(var(--ink-rgb), 0.018);
}

.small-table td:first-child,
.small-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  /* Needs to stay fully opaque (unlike the translucent panel background) so
     scrolled-behind columns never show through - layering a theme-aware tint
     over the solid, theme-aware --app-bg keeps it opaque in both themes
     instead of a hardcoded dark hex that went black-on-white in light mode. */
  background: linear-gradient(rgba(var(--ink-rgb), 0.04), rgba(var(--ink-rgb), 0.04)), var(--app-bg);
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.25);
}

.small-table thead th:first-child {
  z-index: 3;
  background: linear-gradient(rgba(var(--ink-rgb), 0.07), rgba(var(--ink-rgb), 0.07)), var(--app-bg);
}

.small-table tbody tr:nth-child(even) td:first-child {
  background: linear-gradient(rgba(var(--ink-rgb), 0.06), rgba(var(--ink-rgb), 0.06)), var(--app-bg);
}

.small-table tbody tr:hover td:first-child {
  background: linear-gradient(rgba(var(--ink-rgb), 0.09), rgba(var(--ink-rgb), 0.09)), var(--app-bg);
}

/* A bordered, rounded card around every data table, with a shaded header row
   - the one enterprise-grade table treatment, applied once here instead of
   copy-pasted into each page's own scoped <style> block. overflow-x stays
   auto (not hidden) so a table wider than its card still scrolls inside it;
   border-radius still visually clips the header's background to the
   rounded corners under auto overflow in every browser this app targets. */
.table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 214, 198, 0.5) rgba(var(--ink-rgb), 0.06);
  border: 1px solid rgba(var(--ink-rgb), 0.09);
  border-radius: 12px;
}

.table-wrap table {
  margin: 0;
}

.table-wrap thead th {
  background: rgba(var(--ink-rgb), 0.035);
  font-size: 10.5px;
  letter-spacing: 0.05em;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
  background: rgba(var(--ink-rgb), 0.06);
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(61, 214, 198, 0.35);
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(61, 214, 198, 0.55);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
}

thead th {
  text-align: left;
  padding: 0.7rem 0.9rem;
  color: rgba(var(--ink-soft-rgb), 0.55);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
}

tbody td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.06);
  color: var(--heading);
  font-size: 0.88rem;
}

/* Alternating row shading - every data table (Audit & Compliance, Change
   Management, Access Reviews, ...) gets this now, not just the Customers
   & Cloud Accounts grid that had it scoped to itself before. A tall or wide
   table of near-identical rows is much easier to trace by eye with it than
   without - the single biggest thing missing from a plain HTML table. */
.table-wrap table tbody tr:nth-child(even) td {
  background: rgba(var(--ink-rgb), 0.018);
}

/* Icon + text empty-table state, global - was previously copy-pasted as an
   identical page-scoped <style> block on Cloud Resources, New Resource
   Requests, and Access Reviews; defining it once here means any new table
   (like the Engineer Workspace's read-only tables) gets the same treatment
   for free instead of another duplicate block. */
.table-empty-state {
  padding: 34px 20px !important;
  text-align: center;
}

.table-empty-state .tes-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 420px;
}

.table-empty-state svg {
  width: 26px;
  height: 26px;
  color: rgba(var(--ink-rgb), 0.22);
}

.table-empty-state p {
  margin: 0;
  font-size: 12.5px;
  color: rgba(var(--ink-soft-rgb), 0.7);
  line-height: 1.5;
}

.table-wrap table tbody tr:hover {
  background: rgba(var(--ink-rgb), 0.02);
}

.table-wrap table tbody tr:hover td {
  color: var(--heading);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}

/* These pastel-on-tint pairs were tuned for the old dark theme (light text on
   a dark card). Now every card is white/near-white, so the same pale text
   reads as washed out - light theme needs solid, saturated text instead. */
.status-pending {
  background: rgba(255, 191, 71, 0.16);
  color: #92600a;
}

.status-approved {
  background: rgba(57, 216, 166, 0.16);
  color: #047857;
}

.status-nextPhase {
  background: rgba(91, 120, 255, 0.16);
  color: #3730a3;
}

.status-form {
  display: inline-block;
}

/* Change-risk pill - shown on Change Management / CAB Review tables so the
   reviewer can see a change's assessed risk without opening it. */
.risk-tag {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(120, 130, 150, 0.16);
  color: #475569;
  white-space: nowrap;
}
.risk-tag[data-risk="Low"]      { background: rgba(57, 216, 166, 0.18); color: #047857; }
.risk-tag[data-risk="Medium"]   { background: rgba(255, 191, 71, 0.20); color: #92600a; }
.risk-tag[data-risk="High"]     { background: rgba(255, 138, 76, 0.20); color: #b45309; }
.risk-tag[data-risk="Critical"] { background: rgba(239, 68, 68, 0.18);  color: #b91c1c; }

.status-select {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.status-select-pending {
  background: rgba(255, 191, 71, 0.16);
  color: #92600a;
}

.status-select-approved {
  background: rgba(57, 216, 166, 0.16);
  color: #047857;
}

.status-select-nextPhase {
  background: rgba(91, 120, 255, 0.16);
  color: #3730a3;
}

.cab-decision-form {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 180px;
}

.cab-decision-form select,
.cab-decision-form input[type="text"] {
  font-size: 0.75rem;
  padding: 0.25rem 0.4rem;
}

.cab-decision-actions {
  display: flex;
  gap: 0.5rem;
}

.cab-decision-actions button[value="Approved"] {
  color: #047857;
  font-weight: 700;
}

.cab-decision-actions button[value="Rejected"] {
  color: #dc2626;
  font-weight: 700;
}

.actions-cell form {
  display: inline-block;
  margin-right: 0.4rem;
}

.actions-cell button {
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
}

.comment-cell textarea {
  width: 100%;
  min-height: 64px;
  margin-bottom: 0.5rem;
  resize: vertical;
}

.comment-summary {
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 7px;
  background: rgba(var(--ink-rgb), 0.03);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  color: rgba(var(--ink-soft-rgb), 0.75);
  font-size: 0.82rem;
}

/* ---------- Login page (enterprise) ---------- */

.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: transparent;
}

.login-page::before {
  content: none;
}

.login-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  animation: login-orb-float 14s var(--ease-slow) infinite alternate;
}

.login-orb-a {
  width: 340px;
  height: 340px;
  left: -80px;
  top: 12%;
  background: radial-gradient(circle, rgba(61, 214, 198, 0.55), transparent 68%);
}

.login-orb-b {
  width: 420px;
  height: 420px;
  right: -120px;
  top: -40px;
  background: radial-gradient(circle, rgba(91, 61, 245, 0.5), transparent 70%);
  animation-delay: -4s;
}

.login-orb-c {
  width: 300px;
  height: 300px;
  right: 18%;
  bottom: -80px;
  background: radial-gradient(circle, rgba(255, 199, 44, 0.35), transparent 70%);
  animation-delay: -7s;
}

@keyframes login-orb-float {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(24px, -28px, 0) scale(1.08); }
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.2rem 4rem;
  background: linear-gradient(160deg, rgba(10, 24, 42, 0.82), rgba(8, 18, 34, 0.72));
  border-right: 1px solid rgba(var(--ink-rgb), 0.06);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--ink-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 75% 65% at 28% 18%, #000 0%, transparent 78%);
  pointer-events: none;
  animation: login-grid-drift 22s linear infinite;
}

@keyframes login-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 36px 36px, 36px 36px; }
}

.login-brand > * {
  position: relative;
  z-index: 1;
}

.login-brand-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  animation: login-rise 0.8s var(--ease-slow) both;
}

.brand-mark-glow {
  filter: drop-shadow(0 0 16px rgba(255, 199, 44, 0.35));
  animation: brand-glow-pulse 3.8s ease-in-out infinite;
}

@keyframes brand-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 199, 44, 0.25)); }
  50% { filter: drop-shadow(0 0 22px rgba(61, 214, 198, 0.45)); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark-glow { animation: none; }
}

.brand-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--heading);
}

.brand-wordmark {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #ffffff 0%, #cfefff 45%, #ffc72c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-brand-body {
  max-width: 680px;
  margin: auto 0;
  padding: 3rem 0;
  animation: login-rise 0.95s var(--ease-slow) 0.08s both;
}

.login-brand-body h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 2.6vw, 2.5rem);
  line-height: 1.22;
  color: var(--heading);
  font-weight: 700;
}

.login-brand-body > p {
  margin: 0 0 2rem;
  color: rgba(var(--ink-soft-rgb), 0.68);
  line-height: 1.7;
  font-size: 1rem;
}

.change-flow-viz {
  margin: 0.4rem 0 1.6rem;
  animation: login-rise 1s var(--ease-slow) 0.1s both;
}

.change-flow-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.change-flow-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(var(--ink-soft-rgb), 0.5);
}

.change-flow-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.2rem 0;
}

.change-flow-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(var(--ink-rgb), 0.12);
  transform: translateY(-50%);
  z-index: 0;
}

.change-flow-node {
  position: relative;
  z-index: 1;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(10, 20, 36, 0.92);
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  color: rgba(var(--ink-soft-rgb), 0.8);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.change-flow-node-accent {
  border-color: rgba(61, 214, 198, 0.45);
  color: #8bf2c7;
}

.change-flow-runner {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #39d8a6;
  box-shadow: 0 0 12px 3px rgba(57, 216, 166, 0.75);
  z-index: 0;
  animation: changeFlowRunner 6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.change-flow-runner-gold {
  background: #ffc72c;
  box-shadow: 0 0 12px 3px rgba(255, 199, 44, 0.75);
  animation-delay: 1.5s;
}

@keyframes changeFlowRunner {
  0% { left: 0%; opacity: 0; }
  6% { opacity: 1; }
  94% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}

.login-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.login-feature-list li {
  position: relative;
  padding-left: 1.6rem;
  color: rgba(var(--ink-soft-rgb), 0.85);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: transform var(--hover-duration) var(--ease-slow), color var(--hover-duration) var(--ease-slow);
}

.login-feature-list li:hover {
  transform: translateX(6px);
  color: var(--heading);
}

.login-feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #5b3df5;
  box-shadow: 0 0 10px rgba(61, 214, 198, 0.55);
}

.login-brand-footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: rgba(var(--ink-soft-rgb), 0.4);
  font-size: 0.82rem;
  animation: login-rise 1s var(--ease-slow) 0.16s both;
}

.login-footer-logo {
  width: 84px;
  height: auto;
  aspect-ratio: 480 / 242;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 5px rgba(255, 255, 255, 0.55));
  animation: logoGlow 3.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .login-footer-logo { animation: none; }
}

.login-form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2.5rem;
  background: transparent;
  overflow: hidden;
}

.login-form-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(var(--ink-rgb), 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 65% 55% at 70% 80%, #000 0%, transparent 75%);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  animation: login-rise 0.9s var(--ease-slow) 0.12s both;
}

.login-card-elevated {
  position: relative;
  z-index: 0;
  padding: 1.9rem 1.8rem 1.7rem;
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(14, 26, 44, 0.92), rgba(10, 18, 34, 0.88));
  border: 1px solid rgba(var(--ink-rgb), 0.1);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(var(--ink-rgb), 0.06);
  backdrop-filter: blur(16px);
  transition:
    transform var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow),
    border-color var(--hover-duration) var(--ease-slow);
}


.login-card-elevated:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 214, 198, 0.28);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.42),
    0 0 40px rgba(91, 61, 245, 0.12);
}

.login-card-head {
  margin-bottom: 1.75rem;
}

.login-card-head h2 {
  margin: 0 0 0.4rem;
  color: var(--heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.login-card-head p {
  margin: 0;
  color: rgba(var(--ink-soft-rgb), 0.6);
  font-size: 0.92rem;
}

.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.3rem;
  border-radius: 10px;
  background: rgba(var(--ink-rgb), 0.04);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  margin-bottom: 1.5rem;
}

.role-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 7px;
  padding: 0.65rem 0.75rem;
  background: transparent;
  color: rgba(var(--ink-soft-rgb), 0.65);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--hover-duration) var(--ease-slow),
    color var(--hover-duration) var(--ease-slow),
    transform var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow);
}

.role-option svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.role-option:hover {
  color: var(--heading);
  background: rgba(var(--ink-rgb), 0.04);
  transform: translateY(-1px);
}

.role-option.active {
  background: linear-gradient(135deg, rgba(91, 61, 245, 0.35), rgba(61, 214, 198, 0.18));
  color: var(--heading);
  box-shadow: inset 0 0 0 1px rgba(61, 214, 198, 0.25);
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
  color: rgba(var(--ink-soft-rgb), 0.78);
  font-size: 0.85rem;
  font-weight: 500;
}

.login-form input {
  width: 100%;
  transition:
    border-color var(--hover-duration) var(--ease-slow),
    box-shadow var(--hover-duration) var(--ease-slow),
    background var(--hover-duration) var(--ease-slow);
}

.login-form input:hover {
  border-color: rgba(61, 214, 198, 0.35);
  background: rgba(var(--ink-rgb), 0.045);
}

button.primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.8rem 1.1rem;
  font-size: 0.95rem;
}

.login-graphic {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 1.5rem 0;
  filter: drop-shadow(0 12px 30px rgba(91, 61, 245, 0.18));
}

.login-graphic-label {
  font-size: 10px;
  font-family: var(--font-body);
  fill: rgba(var(--ink-soft-rgb), 0.7);
}

.login-graphic-label-hub {
  font-size: 11px;
  font-weight: 700;
  fill: #ded6fd;
}

.login-line {
  stroke-dasharray: 8 6;
  animation: login-line-flow 3.2s linear infinite;
}

.login-line:nth-child(2) { animation-delay: 0.3s; }
.login-line:nth-child(3) { animation-delay: 0.6s; }
.login-line:nth-child(4) { animation-delay: 0.9s; }
.login-line:nth-child(5) { animation-delay: 1.2s; }
.login-line:nth-child(6) { animation-delay: 1.5s; }

@keyframes login-line-flow {
  to { stroke-dashoffset: -56; }
}

.login-node {
  transform-box: fill-box;
  transform-origin: center;
  animation: login-node-bob 4.4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  transition: transform 0.5s var(--ease-slow);
}

.login-node:hover {
  transform: scale(1.12);
}

@keyframes login-node-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.login-graphic-pulse {
  transform-origin: 200px 120px;
  animation: login-graphic-pulse 2.8s ease-in-out infinite;
}

.login-graphic-pulse-delayed {
  animation-delay: 1.1s;
}

@keyframes login-graphic-pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.45); opacity: 0; }
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Discovery ---------- */

.discovery-banner {
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid rgba(var(--ink-rgb), 0.09);
  border-left: 3px solid var(--accent);
}

.discovery-banner--off {
  border-left-color: #d97706;
}

.discovery-banner-status {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.discovery-banner-msg {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(var(--ink-soft-rgb), 0.7);
}

.discovery-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem 1.5rem;
  margin: 0;
}

.discovery-meta div {
  min-width: 0;
}

.discovery-meta dt {
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(var(--ink-soft-rgb), 0.5);
}

.discovery-meta dd {
  margin: 0;
  font-size: 0.86rem;
  color: var(--heading);
  word-break: break-word;
}

.discovery-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.discovery-kpis .summary-card {
  padding: 0.95rem 1rem;
}

.discovery-kpis .summary-card strong {
  font-size: 1.5rem;
}

.discovery-kpi-sub {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: rgba(var(--ink-soft-rgb), 0.55);
}

.discovery-config {
  margin-top: 0.5rem;
  padding: 1.25rem;
  border-radius: 10px;
  background: rgba(var(--ink-rgb), 0.02);
  border: 1px solid rgba(var(--ink-rgb), 0.08);
}

.discovery-section-title {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading);
}

.discovery-config-form .form-actions {
  grid-column: 1 / -1;
}

.discovery-table td {
  vertical-align: top;
}

.discovery-table th.discovery-col-action,
.discovery-table td.discovery-col-action {
  width: 1%;
  white-space: nowrap;
}

.discovery-empty {
  text-align: center;
  padding: 1.5rem 1rem !important;
  color: rgba(var(--ink-soft-rgb), 0.6);
}

.scope-tag {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.scope-tag--in {
  background: rgba(57, 216, 166, 0.16);
  color: #047857;
}

.scope-tag--out {
  background: rgba(120, 130, 150, 0.16);
  color: #475569;
}

.status-failed {
  background: rgba(239, 68, 68, 0.16);
  color: #b91c1c;
}

.status-neutral {
  background: rgba(120, 130, 150, 0.16);
  color: #475569;
}

.scan-cell-time {
  display: block;
  font-size: 0.8rem;
  color: rgba(var(--ink-soft-rgb), 0.75);
}

.scan-cell-time--muted {
  color: rgba(var(--ink-soft-rgb), 0.45);
}

.scan-cell-detail {
  margin-top: 0.25rem;
  max-width: 260px;
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(var(--ink-soft-rgb), 0.55);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}

.scan-cell-detail--error {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.last-scanned-cell.is-scanning {
  opacity: 0.55;
}

.region-picker > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
}

.region-picker > summary::-webkit-details-marker {
  display: none;
}

.region-picker > summary::after {
  content: "\25BE";
  font-size: 0.7rem;
  color: rgba(var(--ink-soft-rgb), 0.5);
}

.region-picker[open] > summary::after {
  content: "\25B4";
}

.region-picker-extra {
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.08);
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(var(--ink-soft-rgb), 0.7);
}

.region-picker .region-save-form {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.5rem;
  min-width: 180px;
}

.region-picker .region-save-form select {
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .discovery-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.alert {
  background: rgba(220, 60, 60, 0.12);
  color: #ffb0ae;
  border: 1px solid rgba(220, 60, 60, 0.28);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body::before,
  body::after {
    animation: none !important;
    transform: none !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1120px) {
  .layout-grid,
  .user-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    border-right: none;
    border-bottom: 1px solid rgba(var(--ink-rgb), 0.06);
    padding: 2.4rem;
  }

  .login-brand-body {
    padding: 2rem 0;
  }

  .sidebar-panel {
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
  }

  .content-panel {
    max-width: none;
  }

  .dashboard-summary-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .login-brand,
  .login-form-panel {
    padding: 1.8rem;
  }

  .dashboard-summary-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }

  .stats-grid,
  .user-management-grid,
  .charts-grid,
  .request-type-toggle,
  .service-value-row {
    grid-template-columns: minmax(0, 1fr) 1fr 1fr;
  }

  .bar-row {
    grid-template-columns: minmax(110px, 0.85fr) minmax(0, 1fr) auto;
  }

  .content-topbar,
  .panel-header {
    flex-direction: column;
  }

  .search-bar {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .app-header,
  .panel,
  .sidebar-panel {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions button,
  .search-bar button,
  .pill-button,
  .logout-button {
    width: 100%;
  }

  /* Two-column forms and detail grids are too cramped at phone widths -
     stack every field full-width instead. */
  .form-grid,
  .form-modal .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-modal,
  .form-modal {
    width: 96vw;
    max-height: 92vh;
    padding: 1.1rem;
  }

  .ci-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .ci-filter-bar select,
  .ci-filter-bar .combo-single,
  .ci-filter-bar input[type="search"] {
    min-width: 0;
    width: 100%;
  }

  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid,
  .user-management-grid,
  .charts-grid,
  .request-type-toggle,
  .service-value-row {
    grid-template-columns: 1fr;
  }

  .combo-single-panel {
    max-height: 45vh;
  }
}

/* ---------- Theme toggle (admin/team header) ---------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--ink-rgb), 0.06);
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  color: var(--heading);
  padding: 0;
  cursor: pointer;
  transition: background var(--hover-duration) var(--ease-slow);
}

.theme-toggle:hover {
  background: rgba(var(--ink-rgb), 0.14);
  transform: none;
  box-shadow: none;
  filter: none;
}

.theme-toggle-icon {
  width: 18px;
  height: 18px;
}

.theme-toggle-icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle-icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle-icon-moon {
  display: none;
}

/* ============================================================
   Light theme (admin / team consoles only, via header toggle).
   Overrides literal navy "surface" fills that aren't derived
   from the --ink-rgb / --ink-soft-rgb / --heading tokens above.
   ============================================================ */

[data-theme="light"] body::before {
  background:
    radial-gradient(circle at 85% 0%, rgba(91, 61, 245, 0.07), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(255, 199, 44, 0.06), transparent 38%),
    linear-gradient(135deg, #eef2f8 0%, #eceffb 55%, #eef2f8 100%);
  background-size: 130% 130%;
}

/* The header stays dark navy even against the light body - matching the
   reference's two-tone layout (dark top bar, light everything below) rather
   than a single flat theme. Text/icons inside it need their own light
   overrides since --heading/--ink-soft-rgb now resolve dark for the body. */
[data-theme="light"] .app-header {
  background: linear-gradient(180deg, var(--header-bg), #0b1830);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: #f4f6fb;
}

[data-theme="light"] .app-header-brand h1,
[data-theme="light"] .app-header .eyebrow,
[data-theme="light"] .user-badge-copy strong {
  color: #f4f6fb;
}

[data-theme="light"] .user-badge-copy small {
  color: rgba(244, 246, 251, 0.65);
}

[data-theme="light"] .app-header .user-badge,
[data-theme="light"] .app-header .profile-menu-trigger,
[data-theme="light"] .app-header .pill-button,
[data-theme="light"] .app-header .logout-button,
[data-theme="light"] .app-header .theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f4f6fb;
}

[data-theme="light"] .profile-menu-dropdown {
  background: linear-gradient(165deg, #ffffff, #f7f9fc);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

/* Dark mode is retired - no reason to keep surfacing the toggle. */
[data-theme="light"] .theme-toggle {
  display: none;
}

[data-theme="light"] .sidebar-panel {
  background: linear-gradient(180deg, var(--sidebar-bg-1), var(--sidebar-bg-2));
  border-right-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .sidebar-nav a.active {
  background: var(--accent);
  border-left-color: var(--accent-dark);
  color: #ffffff;
}

[data-theme="light"] .sidebar-nav a:hover {
  background: rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .panel,
[data-theme="light"] .panel-glow {
  background: linear-gradient(160deg, #ffffff, #f9fbfd);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .panel:hover,
[data-theme="light"] .panel-glow:hover {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1), 0 0 28px rgba(56, 132, 255, 0.08);
}

[data-theme="light"] .summary-card,
[data-theme="light"] .stats-grid .stat-card {
  background: linear-gradient(155deg, #ffffff, #f7f9fc);
}

[data-theme="light"] .integration-card,
[data-theme="light"] .chart-card,
[data-theme="light"] .donut-card {
  background: #ffffff;
}

[data-theme="light"] .donut-chart-hole {
  background: #ffffff;
}

[data-theme="light"] .detail-modal {
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
}

[data-theme="light"] .modal-backdrop {
  background: rgba(15, 23, 42, 0.45);
}
