/* Premium Blue & Cyan Color Scheme - FINAL */
:root {
  --bg-deep: #0f1016;
  --bg-mid: #16171f;
  --bg-surface: rgba(22, 23, 31, 0.95);
  --bg-card: rgba(25, 26, 35, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text-main: #ffffff;
  --text-muted: #a1a5b8;
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --accent-2: #0ea5e9;
  --danger: #ef4444;
  --ok: #10b981;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 40px rgba(59, 130, 246, 0.1);
  --glow: 0 0 20px rgba(59, 130, 246, 0.15);
}

* {
  box-sizing: border-box;
}

a {
  transition: color 150ms ease;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--text-main);
  background: linear-gradient(135deg, #0f1016 0%, #16171f 50%, #1a1b28 100%);
  background-attachment: fixed;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  height: 100vh;
  padding: 2rem 1.6rem;
  background: linear-gradient(180deg, rgba(15, 18, 50, 0.95), rgba(18, 22, 55, 0.98));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand-block {
  display: grid;
  gap: 0.55rem;
}

.brand-block h1 {
  font-size: 1.95rem;
  background: linear-gradient(135deg, #ffffff 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.015em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 700;
}

.subtle {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.service-nav {
  display: grid;
  gap: 0.6rem;
}

.nav-btn {
  border: 1px solid var(--line);
  background: rgba(59, 130, 246, 0.05);
  color: var(--text-main);
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  text-align: left;
  font-weight: 600;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  font-size: 0.95rem;
}

.nav-btn:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.12);
}

.nav-btn.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(14, 165, 233, 0.1));
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.3), 0 0 16px rgba(59, 130, 246, 0.2);
  color: #ffffff;
}

.sidebar-foot {
  margin-top: auto;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.06));
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 0.95rem;
  display: grid;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.main-area {
  padding: 1.8rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(22, 23, 31, 0.95), rgba(25, 26, 35, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.topbar-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.65rem;
  font-size: 0.79rem;
  border-radius: 999px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(30, 40, 75, 0.7);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 150ms ease;
}

.status-pill.danger {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

.service-section {
  display: none;
  gap: 1rem;
  align-content: start;
}

.service-section.active {
  display: grid;
}

.panel {
  background: linear-gradient(135deg, rgba(25, 26, 35, 0.95), rgba(22, 23, 31, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15), transparent 60%),
    linear-gradient(140deg, rgba(25, 26, 35, 0.9), rgba(20, 23, 35, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.hero-panel h3 {
  margin-bottom: 0.3rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two-col,
.grid.two-cols {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.panel-heading h4 {
  font-size: 1.05rem;
}

.btn {
  border: 1px solid var(--line);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-weight: 600;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  font-size: 0.95rem;
}

.btn:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15);
}

.btn.primary {
  border: 0;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn.primary:hover {
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn.ghost:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
}

.btn.wide {
  width: 100%;
}

.actions-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.actions-row.wrap {
  flex-wrap: wrap;
}

input,
textarea,
select {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(15, 20, 45, 0.95);
  color: var(--text-main);
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  transition: all 200ms ease;
}

/* Keep editable fields comfortably spaced from borders. */
:where(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="search"],
  input[type="number"],
  input:not([type]),
  textarea,
  select
) {
  padding: 0.78rem 1rem;
  line-height: 1.35;
  min-height: 42px;
  background-clip: padding-box;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(59, 130, 246, 0.4);
  outline-offset: 2px;
  border-color: var(--accent);
  background: rgba(20, 25, 50, 0.98);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: rgba(168, 181, 224, 0.5);
}

label {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.4rem;
  font-weight: 500;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.file-input-label {
  border-radius: var(--radius-sm);
  border: 2px dashed var(--accent);
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  transition: all 200ms ease;
  font-size: 0.95rem;
}

.file-input-label:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

input[type="file"] {
  color: var(--text-muted);
}

.filter-stack {
  max-height: 460px;
  overflow: auto;
  display: grid;
  gap: 0.7rem;
  padding-right: 0.2rem;
}

.filter-card {
  border: 1px solid var(--line);
  background: rgba(30, 40, 75, 0.6);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: grid;
  gap: 0.55rem;
  transition: all 150ms ease;
}

.filter-card:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
}

.filter-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent);
  font-weight: 700;
}

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

.table-wrap {
  overflow: auto;
  max-height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(135deg, rgba(25, 26, 35, 0.8), rgba(20, 23, 35, 0.85));
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0.85rem;
  text-align: left;
  font-size: 0.9rem;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, rgba(30, 40, 75, 0.95), rgba(25, 35, 65, 0.93));
  z-index: 1;
  font-weight: 600;
  color: var(--text-main);
}

tr:hover td {
  background: rgba(59, 130, 246, 0.08);
  transition: background 150ms ease;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  background: rgba(30, 40, 75, 0.6);
  color: var(--text-muted);
  transition: all 150ms ease;
  font-size: 0.95rem;
}

.switch-row:hover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.15);
}

.switch-row input {
  width: auto;
}

.hidden {
  display: none !important;
}

body.auth-only .app-shell {
  display: none;
}

.auth-root {
  min-height: 100vh;
  padding: 2rem 1rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f1016 0%, #16171f 50%, #1a1b28 100%);
}

.auth-card {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(59, 130, 246, 0.08);
  background: linear-gradient(165deg, rgba(25, 26, 35, 0.98), rgba(22, 23, 31, 0.95));
  backdrop-filter: blur(20px);
}

.auth-brand {
  padding: 2rem;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 1.2rem;
  align-content: start;
  background:
    radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08), transparent 60%),
    linear-gradient(165deg, rgba(25, 26, 35, 0.95), rgba(22, 23, 31, 0.98));
}

.auth-brand h2 {
  font-size: 1.8rem;
  background: linear-gradient(135deg, #ffffff 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.015em;
}

.auth-workspace {
  padding: 1.8rem;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.auth-status-text {
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
}

.auth-tabs {
  display: inline-flex;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  width: fit-content;
  background: rgba(30, 40, 75, 0.5);
}

.auth-tab-btn {
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 150ms ease;
  cursor: pointer;
}

.auth-tab-btn:hover {
  color: var(--text-main);
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(14, 165, 233, 0.25));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.auth-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(25, 26, 35, 0.6);
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

/* Force comfortable inner spacing on auth text fields. */
.auth-panel label > input,
.auth-panel label > textarea,
.auth-panel label > select,
.auth-brand .panel label > input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding-inline: 1rem !important;
  padding-block: 0.78rem !important;
  line-height: 1.35;
  text-indent: 0 !important;
  background-clip: padding-box;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.auth-stack {
  display: grid;
  gap: 0.85rem;
}

.auth-divider {
  height: 1px;
  background: var(--line);
  margin: 0.3rem 0;
}

.auth-feedback {
  min-height: 1.4rem;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-feedback[data-type="success"] {
  color: #10b981;
}

.auth-feedback[data-type="error"] {
  color: #ef4444;
}

.danger-text {
  color: #fca5a5;
  font-size: 0.9rem;
  font-weight: 500;
}

.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: 340px;
  background: linear-gradient(135deg, rgba(25, 26, 35, 0.95), rgba(20, 23, 35, 0.98));
  border: 1px solid var(--line);
  color: var(--text-main);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 220ms ease;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

video {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-top: 0.6rem;
}

.code-block {
  background: rgba(15, 20, 45, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
}

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

/* ------------------------------------------------------------
   Restored structural UI styles (post-Builder merge safeguard)
   ------------------------------------------------------------ */

.btn.mini {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}

.ux-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex: 1 1 540px;
  max-width: 880px;
}

.ux-toolbar input[type="search"] {
  flex: 1 1 260px;
  min-width: 220px;
  height: 36px;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
}

.ux-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.24);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #d7f2ff;
  font-size: 0.68rem;
  font-weight: 700;
}

.ux-badge-danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ffd0d0;
}

.ux-busy-wrap {
  width: 100%;
  display: grid;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.ux-busy-bar {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
  opacity: 0;
  transition: opacity 150ms ease;
}

.ux-busy-bar.active {
  opacity: 1;
}

.ux-sidebar-search-wrap {
  display: grid;
  gap: 0.4rem;
}

.ux-sidebar-search-wrap input {
  height: 36px;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
}

.workspace-group {
  border: 1px solid rgba(116, 145, 208, 0.26);
  border-radius: 14px;
  background: rgba(16, 28, 58, 0.48);
  overflow: hidden;
}

.workspace-group + .workspace-group {
  margin-top: 0.55rem;
}

.workspace-btn {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--text-main);
  padding: 0.88rem 0.95rem;
  display: grid;
  gap: 0.35rem;
}

.workspace-btn:hover,
.workspace-btn.active {
  background: rgba(59, 130, 246, 0.13);
}

.workspace-btn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.workspace-btn-head strong {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.workspace-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(116, 145, 208, 0.45);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  color: #cfe0ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.workspace-subtle {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.workspace-services {
  display: none;
  padding: 0.35rem 0.45rem 0.55rem;
  gap: 0.4rem;
}

.workspace-group.open .workspace-services,
.workspace-group.active .workspace-services {
  display: grid;
}

.workspace-nav-btn {
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 2rem 0.7rem 0.75rem;
  border-radius: 10px;
}

.workspace-nav-title {
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 700;
  color: #f3f8ff;
}

.workspace-nav-subtle {
  color: #9fb8da;
  font-size: 0.8rem;
  line-height: 1.25;
  font-weight: 500;
}

.nav-pin {
  position: absolute;
  right: 0.6rem;
  top: 0.55rem;
  opacity: 0.55;
  font-size: 0.9rem;
  color: #86a7d9;
}

.workspace-nav-btn:hover .nav-pin,
.nav-pin.is-pinned {
  opacity: 1;
  color: #7ce0ff;
}

.ux-recent-services {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-height: 36px;
}

.ux-chip {
  border: 1px solid rgba(116, 145, 208, 0.35);
  background: rgba(20, 34, 70, 0.68);
  color: #e9f2ff;
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.ux-chip:hover {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(59, 130, 246, 0.2);
}

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

.inventory-kpi-card {
  border: 1px solid rgba(116, 145, 208, 0.25);
  background: rgba(20, 31, 62, 0.62);
  border-radius: 12px;
  padding: 0.75rem 0.8rem;
  display: grid;
  gap: 0.25rem;
}

.inventory-kpi-label {
  color: #97b2d7;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
}

.inventory-kpi-value {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: #f3f8ff;
}

.overview-app-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.overview-app-card {
  border: 1px solid rgba(116, 145, 208, 0.26);
  background: linear-gradient(145deg, rgba(19, 30, 60, 0.75), rgba(15, 24, 48, 0.72));
  border-radius: 12px;
  padding: 0.85rem;
  display: grid;
  gap: 0.55rem;
  text-align: left;
  color: var(--text-main);
}

.overview-app-card:hover {
  border-color: rgba(59, 130, 246, 0.7);
  transform: translateY(-1px);
}

.overview-app-card.active {
  border-color: rgba(50, 220, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(50, 220, 255, 0.35), 0 10px 20px rgba(2, 8, 25, 0.35);
}

.overview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.overview-card-head h5 {
  font-size: 1rem;
}

.overview-card-kpis {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.1rem;
}

.overview-card-kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  color: #c7daf8;
  font-size: 0.82rem;
}

.overview-card-kpi-row strong {
  color: #eff6ff;
  font-size: 0.84rem;
}

.overview-app-detail {
  display: grid;
  gap: 0.65rem;
}

.overview-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.overview-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.45rem;
}

.overview-detail-row {
  border: 1px solid rgba(116, 145, 208, 0.25);
  background: rgba(20, 34, 68, 0.56);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  display: grid;
  gap: 0.15rem;
}

.overview-detail-row span {
  color: #9eb7db;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.overview-detail-notes {
  margin: 0;
  padding-left: 1rem;
}

.overview-ai-breakdown {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.overview-ai-row {
  border: 1px solid rgba(116, 145, 208, 0.25);
  background: rgba(20, 34, 68, 0.56);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.overview-list-stack {
  display: grid;
  gap: 0.5rem;
}

.overview-list-item {
  border: 1px solid rgba(116, 145, 208, 0.22);
  background: rgba(17, 28, 56, 0.58);
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  display: grid;
  gap: 0.25rem;
}

.overview-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.overview-badge {
  border: 1px solid rgba(116, 145, 208, 0.4);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #cce0ff;
  font-weight: 700;
}

.overview-list-item.severity-critical,
.overview-list-item.severity-high {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(72, 20, 26, 0.35);
}

.overview-list-item.severity-medium,
.overview-list-item.severity-warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(88, 53, 11, 0.3);
}

.overview-status.ok,
.overview-status.healthy {
  color: #bbf7d0;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.16);
}

.overview-status.warn,
.overview-status.degraded {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.16);
}

.overview-status.error,
.overview-status.offline,
.overview-status.critical {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.16);
}

.overview-upgrade-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.overview-task-actions .btn {
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}

.ux-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 950;
  width: min(520px, calc(100vw - 2rem));
  max-height: min(70vh, 720px);
  overflow: auto;
  border: 1px solid rgba(116, 145, 208, 0.35);
  background: linear-gradient(145deg, rgba(18, 26, 50, 0.96), rgba(14, 20, 40, 0.96));
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ux-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.ux-notification-list,
.ux-status-grid,
.ux-help-content {
  display: grid;
  gap: 0.5rem;
}

.ux-notification-item,
.ux-status-card,
.ux-help-card {
  border: 1px solid rgba(116, 145, 208, 0.24);
  background: rgba(20, 33, 65, 0.56);
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
}

.ux-shortcut-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.ux-shortcut-list li {
  border: 1px solid rgba(116, 145, 208, 0.24);
  background: rgba(20, 33, 65, 0.56);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
}

.ux-shortcut-list kbd {
  border: 1px solid rgba(116, 145, 208, 0.4);
  border-radius: 8px;
  padding: 0.2rem 0.4rem;
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: rgba(10, 16, 32, 0.75);
}

.ux-offline-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 960;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(60, 18, 24, 0.95);
  color: #ffd4d4;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

@media (max-width: 1420px) {
  .app-shell {
    grid-template-columns: minmax(240px, 285px) minmax(0, 1fr);
  }
  .overview-app-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
  }
  .main-area {
    padding-top: 0.2rem;
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .topbar-tools,
  .status-cluster {
    justify-content: flex-start;
  }
  .grid.two-col,
  .grid.two-cols {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   Elite UX refinement layer
   - 8pt spacing rhythm
   - clearer hierarchy
   - calmer interaction model
   - accessibility and performance-safe motion
   ------------------------------------------------------------ */

:root {
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.5rem;

  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.25rem;
  --font-xl: 1.625rem;

  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --motion-fast: 160ms;
  --motion-base: 220ms;
  --motion-slow: 300ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  --surface-0: #0a1124;
  --surface-1: rgba(13, 22, 42, 0.9);
  --surface-2: rgba(17, 28, 52, 0.82);
  --surface-3: rgba(24, 38, 68, 0.74);

  --semantic-ok-bg: rgba(16, 185, 129, 0.16);
  --semantic-ok-border: rgba(16, 185, 129, 0.52);
  --semantic-ok-text: #b6f5d6;
  --semantic-warn-bg: rgba(245, 158, 11, 0.16);
  --semantic-warn-border: rgba(245, 158, 11, 0.52);
  --semantic-warn-text: #ffe2a3;
  --semantic-danger-bg: rgba(239, 68, 68, 0.16);
  --semantic-danger-border: rgba(239, 68, 68, 0.52);
  --semantic-danger-text: #ffcbcb;

  --elev-1: 0 12px 28px rgba(1, 6, 19, 0.36);
  --elev-2: 0 20px 44px rgba(1, 6, 19, 0.5);
}

html {
  color-scheme: dark;
}

body {
  font-family: Inter, "Segoe UI", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(53, 111, 255, 0.16), transparent 36%),
    radial-gradient(circle at 78% 4%, rgba(20, 176, 255, 0.11), transparent 30%),
    linear-gradient(160deg, #070d1d 0%, #0c162f 50%, #071126 100%);
  background-attachment: fixed;
}

h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", Inter, sans-serif;
  letter-spacing: -0.02em;
}

h5,
h6 {
  margin: 0;
  font-size: var(--font-md);
  line-height: 1.35;
}

.subtle,
.service-head p,
.workspace-subtle,
.workspace-nav-subtle {
  line-height: 1.5;
}

.app-shell {
  gap: var(--space-2);
}

.sidebar {
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  border-radius: var(--radius-lg);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(116, 145, 208, 0.5) transparent;
}

.service-nav {
  gap: var(--space-1);
}

.workspace-group {
  border-radius: var(--radius-lg);
  border-color: rgba(99, 125, 178, 0.38);
  background: linear-gradient(165deg, rgba(12, 26, 57, 0.76), rgba(11, 21, 44, 0.75));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: border-color var(--motion-base) var(--ease-standard),
    background var(--motion-base) var(--ease-standard);
}

.workspace-group.active,
.workspace-group:hover {
  border-color: rgba(89, 153, 255, 0.52);
}

.workspace-btn {
  padding: 0.8rem 0.9rem;
  min-height: 80px;
  transition: background var(--motion-base) var(--ease-standard);
}

.workspace-btn-head {
  align-items: flex-start;
  gap: var(--space-1);
}

.workspace-btn-head strong {
  display: block;
  font-size: 1.04rem;
  line-height: 1.15;
}

.workspace-count {
  margin-left: auto;
  white-space: nowrap;
  font-size: 0.67rem;
  letter-spacing: 0.09em;
  border-color: rgba(118, 151, 224, 0.52);
  background: rgba(24, 44, 85, 0.72);
}

.workspace-subtle {
  display: block;
  color: #9eb7db;
  max-width: 32ch;
  font-size: 0.84rem;
}

.workspace-services {
  gap: 0.45rem;
  padding: 0.2rem 0.5rem 0.6rem;
}

.workspace-nav-btn {
  min-height: 66px;
  padding: 0.72rem 3.2rem 0.72rem 0.78rem;
  border-radius: 11px;
  border-color: rgba(87, 121, 189, 0.38);
  background: linear-gradient(170deg, rgba(19, 36, 72, 0.72), rgba(14, 27, 56, 0.72));
  transition: transform var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.workspace-nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(86, 150, 255, 0.78);
  background: linear-gradient(170deg, rgba(27, 51, 102, 0.78), rgba(16, 32, 68, 0.76));
  box-shadow: 0 8px 18px rgba(10, 24, 58, 0.42);
}

.workspace-nav-btn.active {
  border-color: rgba(58, 208, 255, 0.84);
  box-shadow: inset 0 0 0 1px rgba(58, 208, 255, 0.22);
}

.workspace-nav-title {
  font-size: 0.95rem;
  color: #edf5ff;
  line-height: 1.2;
}

.workspace-nav-subtle {
  color: #9db8df;
  font-size: 0.78rem;
}

.nav-pin {
  right: 0.68rem;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(127, 163, 233, 0.4);
  border-radius: var(--radius-pill);
  padding: 0.12rem 0.42rem;
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(17, 29, 58, 0.74);
}

.nav-pin.is-pinned {
  border-color: rgba(74, 224, 255, 0.72);
  color: #8ff1ff;
  background: rgba(12, 58, 73, 0.48);
}

.main-area {
  gap: var(--space-2);
}

.topbar {
  padding: var(--space-2) 1.2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(12, 23, 47, 0.88), rgba(10, 18, 35, 0.9));
  box-shadow: var(--elev-1);
}

.topbar-tools {
  flex: 1 1 auto;
  justify-content: flex-end;
  align-items: flex-start;
  row-gap: 0.45rem;
}

.ux-toolbar {
  width: 100%;
  max-width: 980px;
  margin-bottom: 0.1rem;
  padding: 0.1rem;
  border-radius: var(--radius);
}

.ux-toolbar input[type="search"] {
  min-width: 280px;
  height: 38px;
  font-size: var(--font-sm);
}

.btn,
.toolbar-btn {
  border-radius: 10px;
  font-size: var(--font-sm);
  font-weight: 600;
  transition: transform var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.btn:active,
.toolbar-btn:active {
  transform: translateY(1px);
}

.status-cluster {
  gap: 0.45rem;
}

.status-pill {
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.status-pill.ok {
  border-color: var(--semantic-ok-border);
  background: var(--semantic-ok-bg);
  color: var(--semantic-ok-text);
}

.status-pill.warn {
  border-color: var(--semantic-warn-border);
  background: var(--semantic-warn-bg);
  color: var(--semantic-warn-text);
}

.status-pill.danger {
  border-color: var(--semantic-danger-border);
  background: var(--semantic-danger-bg);
  color: var(--semantic-danger-text);
}

.panel,
.hero-panel,
.crm-tab-panel,
.panel.auth-panel {
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(14, 24, 47, 0.84), rgba(11, 19, 38, 0.88));
  border-color: rgba(108, 136, 194, 0.32);
  box-shadow: var(--elev-1);
}

.panel-heading {
  margin-bottom: 0.95rem;
}

.panel-heading h4 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.overview-summary-grid,
.overview-connectivity-grid,
.overview-premium-kpi-grid,
.inventory-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.inventory-kpi-card {
  border-radius: 12px;
  border-color: rgba(109, 140, 202, 0.32);
  background: linear-gradient(170deg, rgba(22, 38, 75, 0.66), rgba(15, 29, 58, 0.66));
  min-height: 86px;
}

.inventory-kpi-value {
  font-size: 1.22rem;
  line-height: 1.15;
}

.overview-app-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-items: stretch;
}

.overview-app-card {
  min-height: 174px;
  border-radius: 12px;
  padding: 0.9rem;
  gap: 0.6rem;
  border-color: rgba(99, 132, 198, 0.36);
  background: linear-gradient(160deg, rgba(17, 31, 64, 0.72), rgba(12, 23, 48, 0.74));
  box-shadow: 0 8px 18px rgba(2, 10, 26, 0.22);
  transition: transform var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.overview-app-card:hover {
  transform: translateY(-2px);
  border-color: rgba(86, 151, 255, 0.8);
  box-shadow: 0 14px 28px rgba(1, 12, 30, 0.34);
}

.overview-app-card.active {
  border-color: rgba(77, 223, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(77, 223, 255, 0.25), 0 14px 30px rgba(1, 12, 30, 0.42);
}

.overview-card-head {
  align-items: flex-start;
}

.overview-card-head h5 {
  font-size: 1.02rem;
  line-height: 1.2;
}

.overview-card-kpi-row {
  font-size: 0.81rem;
}

.overview-card-kpi-row strong {
  font-size: 0.82rem;
}

.overview-list-stack {
  gap: 0.58rem;
}

.overview-list-item {
  border-radius: 11px;
  border-color: rgba(108, 140, 199, 0.28);
  background: linear-gradient(160deg, rgba(20, 33, 66, 0.68), rgba(15, 25, 49, 0.66));
}

.overview-flow-grid,
.overview-premium-grid,
.tier-catalog-grid,
.platform-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.overview-flow-card,
.overview-premium-card,
.overview-upgrade-card,
.tier-catalog-card {
  border: 1px solid rgba(106, 139, 201, 0.32);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(19, 34, 67, 0.7), rgba(13, 24, 49, 0.72));
  padding: 0.75rem;
  display: grid;
  gap: 0.45rem;
}

.service-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.2rem 0;
}

.service-head > div {
  display: grid;
  gap: 0.35rem;
}

.crm-tab-row,
.accounting-tab-row,
.agent-tabs-row,
.inventory-tab-row,
.email-tab-row,
.video-tab-row,
.social-tab-row,
.logs-tab-row,
.phone-tab-row,
.comm-tab-row,
.storage-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.crm-tab-btn,
.accounting-tab-btn,
.agent-tab-btn,
.inventory-tab-btn,
.email-tab-btn,
.video-tab-btn,
.social-tab-btn,
.logs-tab-btn,
.phone-tab-btn,
.comm-tab-btn,
.storage-tab-btn {
  border: 1px solid rgba(105, 137, 197, 0.38);
  background: rgba(15, 27, 55, 0.62);
  color: #d7e8ff;
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  font-size: 0.79rem;
  font-weight: 600;
}

.crm-tab-btn.active,
.accounting-tab-btn.active,
.agent-tab-btn.active,
.inventory-tab-btn.active,
.email-tab-btn.active,
.video-tab-btn.active,
.social-tab-btn.active,
.logs-tab-btn.active,
.phone-tab-btn.active,
.comm-tab-btn.active,
.storage-tab-btn.active {
  border-color: rgba(74, 222, 255, 0.84);
  background: rgba(15, 67, 83, 0.44);
  color: #dff9ff;
}

input,
textarea,
select {
  min-height: 38px;
  font-size: var(--font-sm);
  border-radius: 10px;
}

/* Re-assert text-field spacing after compact refinement overrides. */
:where(
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="search"],
  input[type="number"],
  input:not([type]),
  textarea,
  select
) {
  padding: 0.78rem 1rem;
  line-height: 1.35;
  min-height: 42px;
}

:where(button, [role="button"], a, input, select, textarea):focus-visible {
  outline: 2px solid rgba(72, 161, 255, 0.92);
  outline-offset: 2px;
}

.ux-offline-banner {
  box-shadow: var(--elev-2);
}

/* loading + skeleton states */

#overview-section.is-loading {
  cursor: progress;
}

.loading-skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(124, 151, 207, 0.12), rgba(149, 176, 231, 0.2), rgba(124, 151, 207, 0.12));
  background-size: 240% 100%;
  animation: uh-skeleton 1.2s linear infinite;
}

.overview-app-card.skeleton {
  pointer-events: none;
}

.overview-app-card.skeleton .overview-card-head,
.overview-app-card.skeleton p,
.overview-app-card.skeleton .overview-card-kpis {
  opacity: 0;
}

.overview-skeleton-line {
  height: 11px;
  border-radius: 999px;
}

.overview-skeleton-line.wide {
  width: 78%;
}

.overview-skeleton-line.mid {
  width: 56%;
}

@keyframes uh-skeleton {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 240% 0;
  }
}

/* responsive hierarchy */

@media (max-width: 1500px) {
  .overview-app-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 1180px) {
  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .service-head {
    flex-direction: column;
  }

  .ux-toolbar {
    max-width: none;
  }
}

@media (max-width: 980px) {
  .overview-app-grid,
  .overview-flow-grid,
  .overview-premium-grid,
  .tier-catalog-grid,
  .platform-grid {
    grid-template-columns: 1fr;
  }

  .workspace-nav-btn {
    padding-right: 2.6rem;
  }
}

/* ------------------------------------------------------------
   Full-bleed workspace + anti-overflow bug fixes
   ------------------------------------------------------------ */

.app-shell {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0.6rem !important;
  gap: 0.6rem;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  height: calc(100vh - 1.2rem);
  border-radius: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.main-area {
  min-width: 0;
  padding: 0.2rem;
  gap: 0.7rem;
}

#services-root,
.service-section {
  min-width: 0;
}

.topbar,
.panel,
.hero-panel {
  width: 100%;
  max-width: none;
}

.workspace-btn,
.workspace-nav-btn,
.overview-app-card,
.overview-list-item,
.panel-heading,
.service-head {
  min-width: 0;
}

.workspace-nav-title,
.workspace-nav-subtle,
.workspace-subtle,
.subtle,
.overview-card-head h5,
.overview-detail-head h5,
.sidebar-foot li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.overview-card-kpi-row,
.overview-detail-row {
  min-width: 0;
}

@media (min-width: 1800px) {
  .app-shell {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    padding: 0.7rem 0.8rem !important;
  }

  .main-area {
    padding: 0.25rem;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 0.45rem !important;
  }

  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    border-radius: 14px;
  }
}

/* ------------------------------------------------------------
   Topbar organization upgrade
   - grouped actions and account controls
   - cleaner search + utility toolbar hierarchy
   ------------------------------------------------------------ */

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 0.95rem 1.15rem;
  padding: 1rem 1.15rem 1.05rem;
}

.topbar-title {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

#active-service-title {
  margin-top: 0.15rem;
  font-size: clamp(1.24rem, 0.62vw + 1rem, 1.66rem);
  line-height: 1.15;
  letter-spacing: -0.016em;
  overflow-wrap: anywhere;
  word-break: normal;
}

.topbar-tools {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.62rem;
  align-items: start;
}

.topbar-tools > .ux-toolbar {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.45rem;
  border: 1px solid rgba(96, 129, 197, 0.36);
  background: linear-gradient(160deg, rgba(13, 24, 48, 0.8), rgba(10, 18, 36, 0.84));
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.ux-toolbar-search {
  flex: 1 1 360px;
  min-width: 240px;
}

.ux-toolbar-search input[type="search"] {
  width: 100%;
  min-height: 40px;
  height: auto;
  margin: 0;
  padding-inline: 0.95rem !important;
  border-radius: 10px;
}

.ux-toolbar-actions,
.ux-toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.ux-toolbar-meta {
  margin-left: auto;
}

.topbar-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
}

.topbar-primary-actions,
.topbar-account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.topbar-account-actions {
  margin-left: auto;
}

.topbar-primary-actions .toolbar-btn,
.topbar-account-actions .toolbar-btn {
  min-height: 38px;
}

#auth-user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding-inline: 0.78rem;
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0.28rem;
  border-top: 1px solid rgba(96, 129, 197, 0.28);
}

.status-cluster .status-pill {
  background: rgba(18, 33, 67, 0.7);
  border-color: rgba(112, 146, 214, 0.34);
}

#backend-status-pill {
  font-weight: 700;
}

@media (max-width: 1460px) {
  .ux-toolbar-meta {
    margin-left: 0;
  }
}

@media (max-width: 1280px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-account-actions {
    margin-left: 0;
  }
}

@media (max-width: 860px) {
  .ux-toolbar-search {
    flex-basis: 100%;
    min-width: 0;
  }

  .topbar-primary-actions,
  .topbar-account-actions {
    width: 100%;
  }

  .status-cluster {
    border-top: 0;
    padding-top: 0.05rem;
  }
}
