/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #09111c;
  --bg-deep: #0d1730;
  --panel: rgba(12, 20, 33, 0.86);
  --panel-soft: rgba(16, 24, 42, 0.82);
  --panel-strong: rgba(16, 25, 38, 0.96);
  --line: rgba(155, 179, 199, 0.14);
  --line-strong: rgba(102, 126, 188, 0.28);
  --ink: #eef5fb;
  --muted: #90a4b6;
  --muted-strong: #c5d0dd;
  --accent: #5a84ff;
  --accent-2: #3f6ff3;
  --brand-gold: #f2ad1b;
  --green: #3ee48a;
  --red: #ff7676;
  --yellow: #dba73b;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top center, rgba(65, 99, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #09111c 0%, #0a1220 100%);
  color: var(--ink);
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  letter-spacing: -0.01em;
  overscroll-behavior-x: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.login-screen,
.admin-shell,
.workspace-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  grid-gap: 18px;
  gap: 18px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.logo-badge {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(75, 124, 255, 0.95), rgba(43, 86, 212, 0.95));
  color: white;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 14px 32px rgba(40, 87, 230, 0.28);
}

.logo-copy,
.brand-lockup-next {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-copy strong,
.brand-wordmark {
  display: block;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.logo-copy span,
.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.brand-anchor,
.brand-lockup-next {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-lockup-next.compact {
  gap: 10px;
}

.brand-logo-next {
  height: auto;
}

.brand-x {
  color: var(--brand-gold);
}

.login-panel,
.hero-banner,
.panel,
.workspace-sidebar {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.96), rgba(11, 18, 33, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(139, 160, 214, 0.05),
    0 30px 80px rgba(1, 5, 16, 0.45);
}

.login-panel {
  width: min(520px, calc(100vw - 32px));
  border-radius: 26px;
  padding: 24px 24px 22px;
}

.login-panel-copy {
  margin-bottom: 14px;
}

.topbar-next {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 78px;
  padding: 16px max(16px, calc((100vw - 1240px) / 2));
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.topbar-next.is-condensed {
  background: rgba(8, 14, 25, 0.9);
  border-bottom-color: rgba(155, 179, 199, 0.14);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
}

.topnav-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.topnav-next a {
  text-decoration: none;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.topnav-next a.is-active {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(90, 132, 255, 0.24), rgba(90, 132, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(90, 132, 255, 0.22);
}

.topnav-next a:hover,
.topnav-button-next:hover,
.secondary-link:hover,
.modal-trigger:hover,
.primary-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.topnav-desktop {
  display: inline-flex;
}

.rail-icon-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

.rail-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  z-index: 20;
}

.rail-popover-label {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.rail-account-copy {
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 2px 4px 10px;
}

.rail-locale-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.rail-locale-button {
  min-width: 54px;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.rail-locale-button.is-active {
  border-color: var(--accent);
  background: rgba(90, 132, 255, 0.12);
}

.rail-account-actions {
  padding-top: 6px;
}

.rail-switcher-list {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  margin-bottom: 10px;
}

.rail-switcher-item {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}

.rail-switcher-item.is-active {
  background: linear-gradient(180deg, rgba(90, 132, 255, 0.24), rgba(90, 132, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(90, 132, 255, 0.22);
}

.rail-switcher-item small {
  color: var(--muted);
  font-size: 0.74rem;
}

.page-intro {
  margin-top: 6px;
  margin-bottom: 18px;
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.page-intro h1 {
  white-space: nowrap;
}

.page-intro p {
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.55;
}

.secondary-link,
.modal-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(127, 177, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 0 14px;
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease, border-color 160ms ease, background 160ms ease;
  text-decoration: none;
}

.hero-banner {
  margin-top: 18px;
  border-radius: 20px;
  padding: 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.compact-hero {
  align-items: flex-start;
}

.hero-actions,
.page-intro-actions,
.action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-stats {
  margin-top: 18px;
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
}

.dashboard-stats .stat-card {
  flex: 1 1;
  min-width: 0;
}

.stat-card {
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(16, 25, 38, 0.7);
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
  flex: 1 1;
}

.stat-card strong {
  font-size: 1rem;
  font-weight: 600;
}

.workspace-table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(109, 133, 180, 0.12);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(109, 133, 180, 0.1);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(11, 18, 32, 0.84);
}

.table-main {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.table-main span {
  color: var(--muted);
  font-size: 0.84rem;
}

.inline-row-form,
.inline-permission-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-button {
  border: 1px solid rgba(103, 130, 193, 0.18);
  border-radius: 12px;
  background: rgba(28, 40, 66, 0.96);
  color: var(--muted-strong);
  padding: 10px 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 0.82rem;
}

.row-button-danger {
  border-color: rgba(220, 80, 80, 0.25);
  color: rgba(255, 100, 100, 0.75);
}

.row-button-danger:hover {
  border-color: rgba(220, 80, 80, 0.5);
  color: rgb(255, 100, 100);
}

.table-chip-wrap,
.permission-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-chip,
.status-pill,
.workspace-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.permission-chip,
.workspace-status {
  background: rgba(48, 92, 230, 0.14);
  color: #a8c1ff;
  border: 1px solid rgba(68, 109, 235, 0.24);
}

.status-pill {
  border: 1px solid transparent;
}

.status-green {
  color: var(--green);
  background: rgba(62, 228, 138, 0.1);
  border-color: rgba(62, 228, 138, 0.26);
}

.status-red {
  color: var(--red);
  background: rgba(255, 118, 118, 0.1);
  border-color: rgba(255, 118, 118, 0.26);
}

.muted-chip {
  color: var(--muted);
  background: rgba(103, 123, 170, 0.08);
  border-color: rgba(103, 123, 170, 0.15);
}

.panel {
  margin-top: 18px;
  border-radius: 20px;
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

.detail-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 24px;
  gap: 24px;
}

.detail-span-2 {
  grid-column: span 2;
}

.stack-list,
.workspace-nav,
.workspace-main,
.login-stack {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.workspace-runtime-header {
  position: -webkit-sticky;
  position: sticky;
  top: 76px;
  z-index: 22;
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(109, 133, 180, 0.14);
  background: linear-gradient(180deg, rgba(12, 20, 33, 0.92), rgba(10, 17, 28, 0.9));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
}

.workspace-runtime-topline {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 22;
  margin-bottom: 0.9rem;
  padding: 0.3rem 0.1rem 0.2rem;
}

.workspace-content-shell {
  position: relative;
  transition: filter 140ms ease, opacity 140ms ease;
}

.workspace-content-shell.is-loading {
  filter: blur(4px);
  opacity: 0.72;
  pointer-events: none;
}

.workspace-main-loader {
  position: fixed;
  top: 72px;
  left: 272px;
  right: 0;
  bottom: 0;
  z-index: 72;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(7, 12, 22, 0.18), rgba(7, 12, 22, 0.04) 44%, transparent 66%);
}

.workspace-shell.workspace-shell-next:has(.workspace-secondary-rail.collapsed) .workspace-main-loader {
  left: 124px;
}

body.workspace-focus-mode .workspace-main-loader {
  top: 0;
  left: 0;
}

.workspace-content-loader-spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid rgba(173, 194, 233, 0.42);
  border-top-color: #f2f7ff;
  animation: workspace-content-spin 0.72s linear infinite;
  box-shadow: 0 8px 28px rgba(8, 12, 24, 0.55);
}

@keyframes workspace-content-spin {
  to {
    transform: rotate(360deg);
  }
}

.workspace-filter-bar {
  position: -webkit-sticky;
  position: sticky;
  top: 212px;
  z-index: 18;
  padding: 1rem 1.1rem;
  border-radius: 18px;
}

.workspace-filter-bar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0.85rem;
}

.workspace-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-gap: 0.85rem;
  gap: 0.85rem;
}

.workspace-filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.85rem;
}

.workspace-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(90, 132, 255, 0.22);
  background: rgba(90, 132, 255, 0.1);
  color: #d7e5ff;
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
}

.workspace-filter-chip:hover {
  background: rgba(90, 132, 255, 0.16);
  border-color: rgba(90, 132, 255, 0.34);
}

.workspace-filter-card {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(109, 133, 180, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.workspace-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-gap: 18px;
  gap: 18px;
}

.workspace-shell.workspace-shell-next {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: block;
  overflow: hidden;
}

.workspace-top-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  grid-gap: 14px;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(109, 133, 180, 0.2);
  background:
    linear-gradient(180deg, rgba(12, 20, 33, 0.98), rgba(9, 16, 28, 0.98)),
    radial-gradient(circle at 80% 0%, rgba(82, 130, 255, 0.12), transparent 44%);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}

.workspace-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.workspace-quick-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
  justify-self: center;
  align-self: center;
  border: 1px solid rgba(124, 150, 199, 0.26);
  border-radius: 10px;
  height: 24px;
  padding: 0 8px;
  background: rgba(16, 24, 39, 0.86);
  color: var(--muted);
}

.workspace-quick-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a9b9d7;
}

.workspace-quick-search input {
  width: 100%;
  border: none;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-size: 0.76rem;
}

.workspace-user-shell {
  position: relative;
}

.workspace-primary-bottom .workspace-user-menu {
  right: auto;
  left: calc(100% + 8px);
  top: auto;
  bottom: 0;
}

.workspace-user-button {
  border: none;
  border-radius: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: var(--ink);
  cursor: pointer;
}

.workspace-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #dce9ff;
  border: none;
  background: transparent;
}

.workspace-user-copy {
  display: grid;
  text-align: left;
  line-height: 1.2;
}

.workspace-user-copy strong {
  font-size: 0.79rem;
}

.workspace-user-copy small {
  font-size: 0.7rem;
  color: var(--muted);
}

.workspace-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(109, 133, 180, 0.22);
  background: rgba(11, 18, 33, 0.98);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
}

.workspace-user-menu-meta {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  padding: 6px 8px 8px;
  border-bottom: 1px solid rgba(109, 133, 180, 0.2);
  margin-bottom: 2px;
}

.workspace-user-menu-meta strong {
  font-size: 0.8rem;
  color: var(--ink);
}

.workspace-user-menu-meta small {
  font-size: 0.72rem;
  color: var(--muted);
}

.workspace-user-menu-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.workspace-user-menu-item:hover {
  border-color: rgba(109, 133, 180, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.workspace-actions-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(109, 133, 180, 0.22);
  background: rgba(11, 18, 33, 0.98);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
  z-index: 30;
}

.workspace-actions-meta {
  padding: 6px 8px 8px;
  font-size: 0.74rem;
  color: var(--muted);
  border-bottom: 1px solid rgba(109, 133, 180, 0.2);
  margin-bottom: 2px;
}

.workspace-actions-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.workspace-actions-item:hover {
  border-color: rgba(109, 133, 180, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.workspace-actions-item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.workspace-left-rails {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  background: #0c1424;
  border-right: 1px solid rgba(109, 133, 180, 0.18);
  overflow: visible;
}

.workspace-primary-rail {
  width: 72px;
  border-right: 1px solid rgba(109, 133, 180, 0.18);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: visible;
  position: relative;
  z-index: 3;
  background: #0a1220;
}

.workspace-primary-top {
  display: grid;
  justify-items: center;
  grid-gap: 10px;
  gap: 10px;
  padding: 12px 0 8px;
}

.workspace-primary-logo {
  width: 40px;
  height: 40px;
  border-radius: 0;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
}

.workspace-primary-search-shell {
  position: relative;
  z-index: 120;
}

.workspace-primary-search {
  width: 34px;
  height: 34px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #b9cae8;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.workspace-primary-search-pop {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  width: 180px;
  border: 1px solid rgba(109, 133, 180, 0.28);
  border-radius: 10px;
  background: #132036;
  padding: 6px 8px;
  z-index: 160;
}

.workspace-primary-search-pop input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.78rem;
}

.workspace-primary-separator {
  height: 1px;
  margin: 4px 10px 8px;
  background: rgba(164, 183, 219, 0.22);
}

.workspace-primary-nav {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  align-content: start;
  overflow: visible;
  padding: 8px 8px 14px;
}

.workspace-primary-item {
  position: relative;
  display: grid;
  place-items: center;
  padding: 7px;
  border: 1px solid rgba(109, 133, 180, 0.1);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(14, 23, 39, 0.82);
}

.workspace-primary-item.active {
  color: #dbe7ff;
  border-color: rgba(99, 137, 246, 0.36);
  background: linear-gradient(180deg, rgba(48, 87, 205, 0.3), rgba(24, 39, 76, 0.82));
}

.workspace-primary-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 0.88rem;
}

.workspace-primary-chip {
  border-radius: 999px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(109, 133, 180, 0.28);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.66rem;
  font-weight: 700;
}

.workspace-primary-label {
  font-size: 0.7rem;
  line-height: 1.2;
}

.workspace-primary-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(109, 133, 180, 0.26);
  background: #15233a;
  color: #e3edff;
  border-radius: 8px;
  padding: 5px 8px;
  white-space: nowrap;
  font-size: 0.74rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 260;
}

.workspace-primary-item:hover::after {
  opacity: 1;
}

.workspace-primary-item:hover {
  z-index: 12;
}

.workspace-rail-tooltip-target {
  position: relative;
}

.workspace-rail-tooltip-target::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(109, 133, 180, 0.26);
  background: #15233a;
  color: #e3edff;
  border-radius: 8px;
  padding: 5px 8px;
  white-space: nowrap;
  font-size: 0.74rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 170;
}

.workspace-rail-tooltip-target:hover::after {
  opacity: 1;
  visibility: visible;
}

.workspace-primary-bottom {
  padding: 10px 8px 12px;
  border-top: 1px solid rgba(109, 133, 180, 0.16);
  display: grid;
  justify-items: center;
}

.workspace-secondary-rail {
  width: 200px;
  transition: width 180ms ease;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: visible;
  position: relative;
  z-index: 1;
  border-right: 1px solid rgba(109, 133, 180, 0.15);
  background: #162236;
}

.workspace-secondary-rail.collapsed {
  width: 52px;
}

.workspace-secondary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: 12px 10px 8px;
  border-bottom: 1px solid rgba(109, 133, 180, 0.14);
}

.workspace-secondary-rail.collapsed .workspace-secondary-head {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.workspace-secondary-title-wrap {
  min-width: 0;
}

.workspace-secondary-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.64rem;
}

.workspace-secondary-title-wrap h2 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-secondary-toggle {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(109, 133, 180, 0.24);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.workspace-secondary-toggle svg {
  display: block;
  transform: translateX(-3px);
}

.workspace-secondary-toggle.collapsed svg {
  transform: translateX(-3px) rotate(180deg);
}

.workspace-secondary-content {
  overflow-y: auto;
  padding: 10px 8px 12px;
}

.workspace-secondary-rail.collapsed .workspace-secondary-content {
  overflow: visible;
}

.workspace-page-nav {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.workspace-page-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  grid-gap: 8px;
  gap: 8px;
  border: 1px solid rgba(109, 133, 180, 0.1);
  border-radius: 10px;
  padding: 7px 8px;
  color: var(--muted);
  background: rgba(14, 23, 39, 0.72);
  position: relative;
}

.workspace-page-item.active {
  color: #dbe7ff;
  border-color: rgba(99, 137, 246, 0.34);
  background: rgba(56, 93, 196, 0.24);
}

.workspace-page-icon {
  display: grid;
  place-items: center;
  color: #9fb3d8;
}

.workspace-page-label {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-secondary-empty {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
  margin: 6px 2px;
}

.workspace-secondary-rail.collapsed .workspace-secondary-title-wrap,
.workspace-secondary-rail.collapsed .workspace-page-label,
.workspace-secondary-rail.collapsed .workspace-secondary-empty {
  display: none;
}

.workspace-secondary-rail.collapsed .workspace-page-item {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 8px 0;
}

.workspace-secondary-rail.collapsed .workspace-page-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(109, 133, 180, 0.26);
  background: #182740;
  color: #e3edff;
  border-radius: 8px;
  padding: 5px 8px;
  white-space: nowrap;
  font-size: 0.74rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  z-index: 260;
}

.workspace-secondary-rail.collapsed .workspace-page-item:hover::after {
  opacity: 1;
}

.workspace-secondary-rail.collapsed .workspace-page-item:hover {
  z-index: 12;
}

.workspace-shell.workspace-shell-next .workspace-main {
  position: fixed;
  top: 0;
  left: 272px;
  right: 0;
  bottom: 0;
  overflow: auto;
  padding: 12px 14px 18px;
  align-content: start;
}

.workspace-shell.workspace-shell-next:has(.workspace-secondary-rail.collapsed) .workspace-main {
  left: 124px;
}

body.workspace-focus-mode .workspace-top-rail,
body.workspace-focus-mode .workspace-left-rails {
  display: none;
}

body.workspace-focus-mode .workspace-shell.workspace-shell-next .workspace-main {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px 10px;
}

.workspace-sidebar {
  border-radius: 20px;
  padding: 16px;
}

.nav-card,
.detail-card {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(109, 133, 180, 0.12);
  background: rgba(16, 25, 38, 0.72);
}

.nav-card span,
.nav-card small,
.detail-card p,
.detail-subline,
.card-copy,
.hero-copy,
.workspace-empty {
  color: var(--muted);
  line-height: 1.6;
}

.nav-card-active {
  background: linear-gradient(180deg, rgba(48, 87, 205, 0.28), rgba(24, 39, 76, 0.78));
  border-color: rgba(92, 130, 235, 0.36);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-top: 14px;
}

.auth-form,
.workspace-form {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

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

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

.mini-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.combo-shell {
  position: relative;
  min-width: 190px;
}

.combo-trigger {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(109, 133, 180, 0.14);
  background: rgba(17, 25, 41, 0.92);
  color: var(--ink);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.82rem;
}

.combo-trigger-open {
  border-color: rgba(95, 135, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(58, 102, 232, 0.14);
}

.combo-chevron {
  color: var(--muted);
  font-size: 1rem;
}

.combo-popover {
  z-index: 20;
  min-width: 240px;
  border-radius: 18px;
  border: 1px solid rgba(95, 135, 255, 0.18);
  background: rgba(11, 18, 33, 0.98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  padding: 12px;
}

.combo-search {
  width: 100%;
  border: 1px solid rgba(109, 133, 180, 0.14);
  background: rgba(17, 25, 41, 0.92);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--ink);
  margin-bottom: 10px;
  font-size: 0.82rem;
}

.combo-list {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.combo-option {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(19, 29, 49, 0.92);
  color: var(--ink);
  padding: 7px 9px;
  cursor: pointer;
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.combo-option-top,
.combo-option-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.combo-option span {
  color: var(--muted);
  font-size: 0.76rem;
}

.combo-badge,
.combo-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.combo-badge {
  color: #a8c1ff;
  background: rgba(48, 92, 230, 0.14);
  border: 1px solid rgba(68, 109, 235, 0.24);
}

.combo-check {
  color: var(--green);
  background: rgba(62, 228, 138, 0.1);
  border: 1px solid rgba(62, 228, 138, 0.2);
}

.combo-option-active {
  border-color: rgba(95, 135, 255, 0.3);
  background: rgba(43, 75, 177, 0.3);
}

.combo-empty {
  color: var(--muted);
  padding: 12px;
}

.field {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  color: var(--muted-strong);
}

.field span,
.eyebrow,
.card-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 0.98rem;
}

input,
.select-input,
.textarea-input {
  width: 100%;
  border: 1px solid rgba(109, 133, 180, 0.14);
  background: #1e2638;
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
  font-size: 0.94rem;
}

.textarea-input {
  min-height: 110px;
  resize: vertical;
}

input[type='file'] {
  padding: 10px 12px;
}

.switch-shell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: rgba(67, 84, 122, 0.6);
  border: 1px solid rgba(109, 133, 180, 0.16);
  transition: background 160ms ease;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: white;
  transition: transform 160ms ease;
}

.switch-input:checked + .switch-track {
  background: linear-gradient(180deg, rgba(76, 122, 255, 0.96), rgba(46, 88, 210, 0.96));
}

.switch-input:checked + .switch-track .switch-thumb {
  transform: translateX(22px);
}

.switch-copy {
  color: var(--muted-strong);
  font-size: 0.88rem;
}

.textarea-input {
  min-height: 170px;
  resize: vertical;
}

input:focus,
.select-input:focus,
.textarea-input:focus {
  border-color: rgba(95, 135, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(58, 102, 232, 0.14);
}

.mode-switch,
.login-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-chip {
  border: 1px solid rgba(103, 130, 193, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
}

.active-chip,
.primary-button {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(90, 132, 255, 0.24), rgba(63, 111, 243, 0.14));
  border: 1px solid rgba(127, 177, 255, 0.22);
}

.primary-button {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  cursor: pointer;
  box-shadow: none;
  font-weight: 600;
}

.login-footnote span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(103, 123, 170, 0.08);
  color: var(--muted);
  font-size: 0.83rem;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-strong);
}

.checkbox-field-single {
  min-height: 44px;
  align-items: center;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
}

.form-error {
  color: var(--red);
  font-size: 0.9rem;
}

.text-link {
  color: #b3c8ff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  background: rgba(3, 8, 18, 0.74);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: min(560px, 100%);
  max-height: min(88vh, 960px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(17,24,39,0.98), rgba(8,12,24,0.99));
  padding: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
}

.modal-card-wide {
  width: min(760px, 100%);
}

.modal-copy {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-grid {
  display: grid;
  grid-gap: 18px;
  gap: 18px;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.settings-table th,
.settings-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(155, 179, 199, 0.1);
}

.settings-table th {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preview-box {
  margin: 14px 0 0;
  padding: 16px;
  border-radius: 16px;
  overflow: auto;
  background: rgba(7, 14, 28, 0.92);
  border: 1px solid rgba(109, 133, 180, 0.1);
  color: #cfdbf6;
  font-size: 0.84rem;
}

@media (max-width: 960px) {
  .mini-grid,
  .mini-grid-2,
  .mini-grid-3,
  .form-cols {
    grid-template-columns: 1fr;
  }
}

.workspace-count {
  min-width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(48, 92, 230, 0.18);
  color: white;
  font-size: 0.9rem;
}

.login-brand-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-brand-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.login-brand-wordmark {
  font-size: 3rem;
  line-height: 1;
  white-space: nowrap;
}

.login-screen .card-kicker {
  margin-bottom: 8px;
}

.login-screen .hero-copy {
  max-width: 34ch;
  font-size: 0.95rem;
  line-height: 1.55;
}

.login-screen .auth-form {
  margin-top: 10px;
}

.login-screen .primary-button {
  margin-top: 4px;
}

@media (max-width: 1180px) {
  .topbar-next {
    align-items: flex-start;
  }

  .dashboard-stats,
  .detail-list-grid,
  .module-grid,
  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .detail-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .login-screen,
  .admin-shell,
  .workspace-shell {
    width: min(100vw - 24px, 1240px);
    padding: 18px 0 28px;
  }

  .login-panel,
  .hero-banner,
  .panel,
  .workspace-sidebar,
  .modal-card {
    border-radius: 24px;
  }

  .hero-banner {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .workspace-runtime-header,
  .workspace-filter-bar {
    position: static;
  }

  .workspace-filter-bar-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-filter-chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .login-brand {
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .topbar-next {
    min-height: 66px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .brand-wordmark {
    font-size: 1.02rem;
  }

  .topnav-next {
    padding: 6px;
    gap: 6px;
  }

  .topnav-next a {
    padding: 10px 12px;
    font-size: 0.94rem;
  }

  .tab-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* ── Panel action link ──────────────────────────────────────── */
.panel-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(127, 177, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition: color 140ms ease, border-color 140ms ease;
  white-space: nowrap;
}

.panel-action-link:hover {
  color: #c8d8ff;
  border-color: rgba(127, 177, 255, 0.32);
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #c8d8ff;
}

.breadcrumb span:last-child {
  color: var(--fg);
}

/* ── Form page card ─────────────────────────────────────────── */
.form-page-card {
  max-width: 480px;
}

.form-page-card-wide {
  max-width: 860px;
}

/* Two-column form section layout */
.form-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
  align-items: start;
}

.form-col {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.form-section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form-section-divider::before,
.form-section-divider::after {
  content: '';
  flex: 1 1;
  height: 1px;
  background: rgba(109, 133, 180, 0.15);
}

.field-readonly {
  margin: 0;
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 4px;
  display: block;
}

/* ── Inline select (table cells) ────────────────────────────── */
.select-inline {
  background: var(--card-bg);
  border: 1px solid rgba(109, 133, 180, 0.14);
  border-radius: 4px;
  color: var(--text);
  padding: 3px 6px;
  font-size: 0.8rem;
  cursor: pointer;
}
.select-inline:focus {
  outline: none;
  border-color: rgba(95, 135, 255, 0.45);
}

/* ── Checkbox field row ──────────────────────────────────────── */
.field-checkbox {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.field-checkbox input[type="checkbox"] {
  width: auto;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}
.field-checkbox > span {
  font-size: 0.88rem;
  color: var(--text);
}
.field-checkbox > small {
  display: block;
  margin-top: 2px;
}

/* ── Table search input ─────────────────────────────────────── */
.table-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.table-search-icon {
  position: absolute;
  left: 8px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
}

.table-search-input {
  height: 28px;
  padding: 0 24px 0 26px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(109, 133, 180, 0.18);
  border-radius: 999px;
  outline: none;
  color: var(--fg);
  font-size: 0.78rem;
  width: 180px;
  transition: border-color 140ms ease, background 140ms ease;
}

.table-search-input::placeholder {
  color: var(--muted);
}

.table-search-input:focus {
  border-color: rgba(127, 177, 255, 0.36);
  background: rgba(255, 255, 255, 0.10);
}

.table-search-clear {
  position: absolute;
  right: 7px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
  line-height: 1;
  display: flex;
}

/* ── Small table variant ────────────────────────────────────── */
.data-table-sm th,
.data-table-sm td {
  padding: 9px 12px;
  font-size: 0.82rem;
}

.table-main-sm {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.table-main-name {
  font-weight: 500;
}

.table-main-sub {
  color: var(--muted);
  font-size: 0.76rem;
}

.table-cell-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── XS table variant (ultra-compact) ──────────────────────── */
.data-table-xs th,
.data-table-xs td {
  padding: 4px 10px;
  font-size: 0.78rem;
  vertical-align: middle;
  color: #9ab0c8;
}

.data-table-xs th {
  padding-top: 6px;
  padding-bottom: 6px;
  color: var(--muted);
}

.data-table-xs td strong {
  color: #c2d4e4;
}

/* ── Icon action buttons with tooltip ──────────────────────── */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  text-decoration: none;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(109, 133, 180, 0.2);
  color: #c8d8ff;
}

.icon-btn-danger:hover {
  background: rgba(220, 60, 60, 0.12);
  border-color: rgba(220, 60, 60, 0.3);
  color: rgba(255, 100, 100, 0.9);
}

/* Tooltip */
.icon-btn::after {
  content: attr(data-tooltip);
  position: fixed;
  background: rgba(10, 16, 30, 0.98);
  border: 1px solid rgba(88, 130, 255, 0.3);
  color: #c8d8ff;
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  bottom: auto;
  left: auto;
  /* positioned via JS-free trick: anchor to button using CSS */
  transform: translateX(-50%) translateY(-110%);
  top: 0;
  left: 50%;
}

.icon-btn:hover::after {
  opacity: 1;
}

.icon-btn-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ── API query builder ──────────────────────────────────────── */
.api-builder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 16px;
  gap: 16px;
  align-items: start;
}

.api-builder-fields {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 360px;
  overflow-y: auto;
}

.api-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 100ms ease;
}

.api-field-row:hover {
  background: rgba(255,255,255,0.04);
}

.api-field-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  accent-color: #4a7aff;
  cursor: pointer;
}

.api-field-code {
  font-family: ui-monospace, monospace;
  font-size: 0.76rem;
  color: #a8c0ff;
}

.api-field-label {
  font-size: 0.76rem;
  color: var(--muted);
  margin-left: auto;
}

.api-output {
  background: rgba(11, 18, 32, 0.9);
  border: 1px solid rgba(109, 133, 180, 0.14);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: ui-monospace, monospace;
  font-size: 0.76rem;
  color: #9db8e8;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
  min-height: 180px;
}

.api-where-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.api-where-input {
  flex: 1 1;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  background: rgba(28, 40, 66, 0.8);
  border: 1px solid rgba(109, 133, 180, 0.14);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--ink);
  outline: none;
}

.api-where-input:focus {
  border-color: rgba(95, 135, 255, 0.45);
}

.table-row-link {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.table-row-link:hover {
  color: #c8d8ff;
}

.code-label {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  background: rgba(58, 110, 255, 0.18);
  color: #c2d8ff;
  border: 1px solid rgba(88, 130, 255, 0.25);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.field-flags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 0;
}

.muted-text {
  color: #9ca3af;
  font-size: 0.85rem;
}

/* ── Tabs ───────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(109, 133, 180, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #c8d8ff;
  border-color: rgba(127, 177, 255, 0.28);
}

.tab-btn-active {
  background: rgba(58, 110, 255, 0.28);
  border-color: rgba(88, 130, 255, 0.7);
  color: #d6e4ff;
  font-weight: 500;
}

.tab-count {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.72rem;
  color: var(--muted);
}

.tab-btn-active .tab-count {
  background: rgba(88, 130, 255, 0.4);
  color: #c0d4ff;
}

.tab-panel {
  min-height: 0;
}

/* ── Widget styles ─────────────────────────────────────────────────────────── */

.widget-card {
  min-height: 80px;
}

.kpi-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(109, 133, 180, 0.14);
  border-radius: 12px;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  color: var(--fg);
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .widget-grid > * {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .workspace-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive: widget grid collapses to single column on small screens */
@media (max-width: 820px) {
  .widget-grid {
    grid-template-columns: 1fr !important;
  }

  .widget-grid > * {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  .workspace-filter-grid {
    grid-template-columns: 1fr;
  }

  .widget-card {
    padding: 0.95rem !important;
  }
}

