:root {
  --gx-primary: #3b82f6;
  --gx-primary-hover: #2563eb;
  --gx-primary-soft: #eaf3ff;
  --gx-bg: #edf3fb;
  --gx-surface: rgba(255, 255, 255, 0.96);
  --gx-surface-secondary: #f8fafc;
  --gx-surface-muted: #eef4ff;
  --gx-text: #0f172a;
  --gx-text-secondary: #475569;
  --gx-text-muted: #94a3b8;
  --gx-border: rgba(148, 163, 184, 0.22);
  --gx-border-strong: #cbd5e1;
  --gx-success: #16a34a;
  --gx-success-soft: #edfdf4;
  --gx-warning: #d97706;
  --gx-warning-soft: #fff7ed;
  --gx-danger: #dc2626;
  --gx-danger-soft: #fef2f2;
  --gx-info: #0284c7;
  --gx-info-soft: #eef9ff;
  --gx-sidebar-bg: linear-gradient(180deg, #07172a 0%, #0d1f35 45%, #101a2d 100%);
  --gx-sidebar-secondary: #111c32;
  --gx-sidebar-hover: rgba(148, 163, 184, 0.12);
  --gx-sidebar-active: linear-gradient(90deg, rgba(59,130,246,0.28), rgba(14,165,233,0.18));
  --gx-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  --gx-shadow-popover: 0 20px 50px rgba(15, 23, 42, 0.12);
  --gx-radius-sm: 10px;
  --gx-radius-md: 16px;
  --gx-radius-lg: 18px;
  --gx-radius-pill: 999px;
  --gx-space-1: 4px;
  --gx-space-2: 8px;
  --gx-space-3: 12px;
  --gx-space-4: 16px;
  --gx-space-5: 20px;
  --gx-space-6: 24px;
  --gx-space-7: 28px;
  --gx-space-8: 32px;
  --gx-space-9: 36px;
  --gx-space-10: 40px;
  --gx-font-body: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  --gx-font-size-xs: 12px;
  --gx-font-size-sm: 13px;
  --gx-font-size-md: 14px;
  --gx-font-size-lg: 15px;
  --gx-font-size-xl: 18px;
  --gx-font-size-2xl: 24px;
  --gx-z-dropdown: 30;
  --gx-z-modal: 50;
  --gx-z-mobile: 40;
  --gx-sidebar-width: 256px;
  --gx-sidebar-collapsed: 72px;
  --gx-topbar-height: 70px;
}

* { box-sizing: border-box; }
html { font-size: 14px; }
body {
  margin: 0;
  font-family: var(--gx-font-body);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 22%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.09), transparent 20%),
    var(--gx-bg);
  color: var(--gx-text);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font: inherit;
}

.gx-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(59,130,246,0.08) 0%, rgba(226,232,240,0.35) 100%);
}

.gx-login-shell {
  width: min(420px, 100%);
}

.gx-login-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  padding: 28px 28px 24px;
}

.gx-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.gx-login-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gx-primary), var(--gx-primary-hover));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.28);
}

.gx-login-title {
  margin: 0;
  font-size: clamp(2.15rem, 3vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.gx-login-subtitle {
  margin: 0 0 18px;
  color: var(--gx-text-secondary);
  font-size: 0.95rem;
}

.gx-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gx-login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gx-login-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gx-text-secondary);
}

.gx-login-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--gx-border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--gx-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gx-login-input:focus {
  outline: none;
  border-color: var(--gx-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.gx-login-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 10px;
  background: rgba(254, 242, 242, 0.95);
  color: #b91c1c;
  font-size: 13px;
}

.gx-login-form .gx-button {
  width: 100%;
  margin-top: 4px;
}

.gx-body {
  min-height: 100vh;
  background: transparent;
}

.gx-app-shell {
  display: flex;
  min-height: 100vh;
  background: transparent;
}

.gx-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: var(--gx-sidebar-width);
  height: 100vh;
  background: var(--gx-sidebar-bg);
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset -1px 0 0 rgba(148, 163, 184, 0.08);
  transition: width 0.22s ease;
  z-index: var(--gx-z-mobile);
}

.gx-sidebar.is-collapsed {
  width: var(--gx-sidebar-collapsed);
}

.gx-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--gx-topbar-height);
  padding: 0 var(--gx-space-4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

.gx-brand-wrap {
  display: flex;
  align-items: center;
  gap: var(--gx-space-3);
  min-width: 0;
}

.gx-brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59,130,246,0.35), rgba(30,64,175,0.9));
  border: 1px solid rgba(96, 165, 250, 0.35);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.35);
  overflow: hidden;
}

.gx-brand-slab {
  position: absolute;
  display: block;
  width: 66%;
  height: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 30%, #2563eb 100%);
  box-shadow: inset 0 0 14px rgba(255,255,255,0.24), 0 8px 18px rgba(37, 99, 235, 0.25);
}

.gx-brand-slab-left {
  transform: rotate(45deg) translate(-10px, 8px);
  left: 3px;
  top: 10px;
}

.gx-brand-slab-right {
  transform: rotate(45deg) translate(10px, -8px);
  right: 3px;
  bottom: 10px;
}

.gx-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gx-brand-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.gx-brand-subtitle {
  color: rgba(203, 213, 225, 0.7);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gx-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: var(--gx-space-4) 10px var(--gx-space-5);
  gap: var(--gx-space-1);
  overflow-y: auto;
}

.gx-nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gx-nav-group-header {
  display: flex;
  align-items: center;
  width: 100%;
}

.gx-nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.04);
  color: rgba(226, 232, 240, 0.86);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.gx-nav-group-label {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.72);
}

.gx-nav-group-caret {
  font-size: 12px;
  transition: transform 0.16s ease;
}

.gx-nav-group.is-open .gx-nav-group-caret {
  transform: rotate(180deg);
}

.gx-nav-group-items {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding-left: 6px;
}

.gx-nav-group.is-open .gx-nav-group-items {
  display: flex;
}

.gx-nav-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gx-nav-status-badge.is-migration {
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
}

.gx-nav-status-badge.is-partial {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.gx-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(226, 232, 240, 0.78);
  font-size: var(--gx-font-size-md);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.gx-nav-item.is-disabled {
  opacity: 0.7;
  cursor: not-allowed;
  color: rgba(226, 232, 240, 0.62);
}

.gx-nav-item:hover {
  background: var(--gx-sidebar-hover);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.gx-nav-item.is-active {
  background: var(--gx-sidebar-active);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.22), 0 8px 18px rgba(59, 130, 246, 0.18);
}

.gx-nav-icon {
  width: 20px;
  display: inline-flex;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.gx-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  cursor: pointer;
}

.gx-icon-button-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.gx-icon-svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gx-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gx-sidebar.is-collapsed .gx-brand-copy,
.gx-sidebar.is-collapsed .gx-nav-label,
.gx-sidebar.is-collapsed .gx-mini-status div,
.gx-sidebar.is-collapsed .gx-brand-subtitle {
  display: none;
}

.gx-sidebar.is-collapsed .gx-sidebar-header,
.gx-sidebar.is-collapsed .gx-sidebar-footer {
  justify-content: center;
  padding-inline: 0;
}

.gx-sidebar.is-collapsed .gx-nav-item {
  justify-content: center;
  padding-inline: 0;
}

.gx-sidebar-footer {
  margin-top: auto;
  padding: var(--gx-space-4);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.gx-mini-status {
  display: flex;
  align-items: center;
  gap: var(--gx-space-3);
  color: rgba(203, 213, 225, 0.8);
}

.gx-mini-status strong {
  display: block;
  color: #fff;
  font-size: 12px;
}

.gx-mini-status small {
  color: rgba(203, 213, 225, 0.7);
}

.gx-mini-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gx-success);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

.gx-shell-main {
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--gx-sidebar-width));
  min-width: 0;
}

.gx-sidebar.is-collapsed + .gx-shell-main {
  width: calc(100% - var(--gx-sidebar-collapsed));
}

.gx-topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--gx-topbar-height);
  padding: 0 var(--gx-space-6);
  background: rgba(11, 18, 32, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  z-index: var(--gx-z-dropdown);
}

.gx-topbar-left,
.gx-topbar-right {
  display: flex;
  align-items: center;
  gap: var(--gx-space-3);
  min-width: 0;
}

.gx-topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 32vw);
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
}

.gx-topbar-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 13px;
}

.gx-topbar-search input::placeholder {
  color: rgba(226, 232, 240, 0.62);
}

.gx-search-icon {
  color: rgba(226, 232, 240, 0.75);
  font-size: 16px;
}

.gx-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gx-space-2);
  color: var(--gx-text-secondary);
  font-size: 12px;
}

.gx-breadcrumb-link {
  color: rgba(226, 232, 240, 0.7);
}

.gx-breadcrumb-current {
  color: #f8fafc;
  font-weight: 700;
}

.gx-breadcrumb-separator {
  color: rgba(148, 163, 184, 0.7);
}

.gx-icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.gx-icon-button:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.32);
  transform: translateY(-1px);
}

.gx-mobile-menu-button {
  display: none;
}

.gx-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: #e2e8f0;
  cursor: pointer;
}

.gx-pill-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gx-success);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
}

.gx-notification-button {
  position: relative;
}

.gx-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gx-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gx-profile-menu-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  cursor: pointer;
}

.gx-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gx-primary-soft), #dbeafe);
  color: var(--gx-primary-hover);
  font-size: 12px;
  font-weight: 700;
}

.gx-avatar-default {
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.gx-profile-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gx-profile-meta strong {
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.3;
}

.gx-profile-meta small {
  color: rgba(226, 232, 240, 0.72);
  font-size: 11px;
}

.gx-caret {
  color: rgba(226, 232, 240, 0.75);
  font-size: 12px;
}

.gx-page-shell {
  padding: 24px clamp(16px, 2vw, 32px) 36px;
  max-width: 1500px;
  margin: 0 auto;
  width: 100%;
}

.gx-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gx-space-4);
  padding: 10px 0 22px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--gx-border);
}

.gx-page-header-copy {
  flex: 1;
}

.gx-page-header-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.gx-page-header-copy p {
  margin: 10px 0 0;
  color: var(--gx-text-secondary);
  font-size: var(--gx-font-size-md);
  max-width: 760px;
}

.gx-page-actions {
  display: flex;
  align-items: center;
  gap: var(--gx-space-3);
  flex-wrap: wrap;
}

.gx-page-body {
  display: flex;
  flex-direction: column;
  gap: var(--gx-space-6);
}

.gx-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.96));
  border: 1px solid var(--gx-border);
  border-radius: var(--gx-radius-md);
  box-shadow: var(--gx-shadow-soft);
  overflow: hidden;
}

.gx-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gx-border);
}

.gx-panel-header h2,
.gx-panel-header h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

.gx-panel-body {
  padding: 20px;
}

.gx-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.gx-stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--gx-radius-md);
  box-shadow: var(--gx-shadow-soft);
  padding: 18px 20px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.gx-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

.gx-stat-label {
  color: var(--gx-text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gx-stat-value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.gx-stat-trend {
  margin-top: 8px;
  color: var(--gx-success);
  font-size: 12px;
  font-weight: 600;
}

.gx-table-wrap {
  overflow: auto;
  border: 1px solid var(--gx-border);
  border-radius: var(--gx-radius-md);
  background: var(--gx-surface);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

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

.gx-table th,
.gx-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--gx-border);
  font-size: 13px;
  vertical-align: middle;
}

.gx-table thead th {
  background: var(--gx-surface-secondary);
  color: var(--gx-text-secondary);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gx-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

.gx-table tbody tr:last-child td {
  border-bottom: none;
}

.gx-badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: var(--gx-radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.gx-badge-status.success {
  background: var(--gx-success-soft);
  color: var(--gx-success);
  border-color: rgba(22, 163, 74, 0.15);
}

.gx-badge-status.warning {
  background: var(--gx-warning-soft);
  color: var(--gx-warning);
  border-color: rgba(217, 119, 6, 0.15);
}

.gx-badge-status.danger {
  background: var(--gx-danger-soft);
  color: var(--gx-danger);
  border-color: rgba(220, 38, 38, 0.15);
}

.gx-badge-status.info {
  background: var(--gx-info-soft);
  color: var(--gx-info);
  border-color: rgba(2, 132, 199, 0.15);
}

.gx-badge-status.neutral {
  background: #f1f5f9;
  color: var(--gx-text-secondary);
  border-color: var(--gx-border);
}

.gx-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.gx-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gx-field label {
  color: var(--gx-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.gx-input,
.gx-select,
.gx-textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--gx-border-strong);
  border-radius: var(--gx-radius-sm);
  background: #fff;
  color: var(--gx-text);
}

.gx-input:focus,
.gx-select:focus,
.gx-textarea:focus {
  outline: none;
  border-color: var(--gx-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

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

.gx-empty-state {
  background: var(--gx-surface);
  border: 1px dashed var(--gx-border-strong);
  border-radius: var(--gx-radius-md);
  padding: 32px 24px;
  text-align: center;
  color: var(--gx-text-secondary);
}

.gx-empty-state h3 {
  margin: 0 0 8px;
  color: var(--gx-text);
}

.gx-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(15, 23, 42, 0.42);
  z-index: var(--gx-z-modal);
}

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

.gx-drawer,
.gx-modal {
  position: fixed;
  background: var(--gx-surface);
  border: 1px solid var(--gx-border);
  box-shadow: var(--gx-shadow-popover);
  z-index: calc(var(--gx-z-modal) + 1);
}

.gx-drawer {
  inset: 0 auto 0 0;
  width: min(420px, 88vw);
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}

.gx-drawer.is-open {
  transform: translateX(0);
}

.gx-modal {
  top: 50%;
  left: 50%;
  width: min(560px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  border-radius: var(--gx-radius-lg);
}

.gx-drawer-header,
.gx-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--gx-border);
}

.gx-drawer-body,
.gx-modal-body {
  padding: 20px;
}

.gx-drawer-footer,
.gx-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--gx-border);
}

.gx-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  z-index: 20;
}

.gx-backdrop.is-visible {
  display: block;
}

@media (max-width: 1023px) {
  .gx-mobile-menu-button {
    display: inline-flex;
  }

  .gx-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    width: min(280px, 82vw);
    z-index: var(--gx-z-mobile);
  }

  .gx-sidebar.is-open {
    transform: translateX(0);
  }

  .gx-shell-main {
    width: 100%;
  }

  .gx-topbar {
    padding-inline: 16px;
  }

  .gx-page-shell {
    padding: 16px;
  }

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

  .gx-profile-meta {
    display: none;
  }

  .gx-topbar-search {
    width: min(220px, 52vw);
  }
}

@media (max-width: 639px) {
  .gx-topbar-right {
    gap: 8px;
    flex-shrink: 0;
  }

  .gx-breadcrumbs {
    display: none;
  }

  .gx-context-pill {
    display: none;
  }

  .gx-page-header-copy h1 {
    font-size: 22px;
  }

  .gx-topbar-search {
    width: 100%;
    min-width: 0;
  }

  .gx-topbar-left {
    width: auto;
    flex: 1;
    min-width: 0;
  }
}

.gx-button,
.gx-button-secondary,
.gx-button-ghost,
.gx-button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.gx-button-stack {
  width: 100%;
  justify-content: flex-start;
}

.gx-empty-compact {
  padding: 18px 16px;
}

.gx-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.gx-dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gx-readonly-value {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--gx-border-strong);
  border-radius: var(--gx-radius-sm);
  background: var(--gx-surface-secondary);
  color: var(--gx-text);
}

.gx-button:hover,
.gx-button-secondary:hover,
.gx-button-ghost:hover,
.gx-button-danger:hover {
  transform: translateY(-1px);
}

.gx-button {
  background: linear-gradient(135deg, var(--gx-primary) 0%, var(--gx-primary-hover) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.22);
}

.gx-button:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.gx-button-secondary {
  background: rgba(148, 163, 184, 0.04);
  border-color: var(--gx-border);
  color: var(--gx-text);
}

.gx-button-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--gx-text-secondary);
}

.gx-button-danger {
  background: var(--gx-danger);
  border-color: var(--gx-danger);
  color: #fff;
}

.gx-page-body {
  display: flex;
  flex-direction: column;
  gap: var(--gx-space-6);
}

.gx-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.96));
  border: 1px solid var(--gx-border);
  border-radius: var(--gx-radius-md);
  box-shadow: var(--gx-shadow-soft);
  overflow: hidden;
}

.gx-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gx-border);
}

.gx-panel-header h2,
.gx-panel-header h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

.gx-panel-body {
  padding: 20px;
}

.gx-badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: var(--gx-radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.gx-badge-status.success {
  background: var(--gx-success-soft);
  color: var(--gx-success);
  border-color: rgba(22, 163, 74, 0.15);
}

.gx-badge-status.warning {
  background: var(--gx-warning-soft);
  color: var(--gx-warning);
  border-color: rgba(217, 119, 6, 0.15);
}

.gx-badge-status.danger {
  background: var(--gx-danger-soft);
  color: var(--gx-danger);
  border-color: rgba(220, 38, 38, 0.15);
}

.gx-badge-status.info {
  background: var(--gx-info-soft);
  color: var(--gx-info);
  border-color: rgba(2, 132, 199, 0.15);
}

.gx-badge-status.neutral {
  background: #f1f5f9;
  color: var(--gx-text-secondary);
  border-color: var(--gx-border);
}

.gx-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.gx-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gx-field label {
  color: var(--gx-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.gx-input,
.gx-select,
.gx-textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--gx-border-strong);
  border-radius: var(--gx-radius-sm);
  background: #fff;
  color: var(--gx-text);
}

.gx-input:focus,
.gx-select:focus,
.gx-textarea:focus {
  outline: none;
  border-color: var(--gx-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

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

.gx-empty-state {
  background: var(--gx-surface);
  border: 1px dashed var(--gx-border-strong);
  border-radius: var(--gx-radius-md);
  padding: 32px 24px;
  text-align: center;
  color: var(--gx-text-secondary);
}

.gx-empty-state h3 {
  margin: 0 0 8px;
  color: var(--gx-text);
}

.gx-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(15, 23, 42, 0.42);
  z-index: var(--gx-z-modal);
}

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

.gx-drawer,
.gx-modal {
  position: fixed;
  background: var(--gx-surface);
  border: 1px solid var(--gx-border);
  box-shadow: var(--gx-shadow-popover);
  z-index: calc(var(--gx-z-modal) + 1);
}

.gx-drawer {
  inset: 0 auto 0 0;
  width: min(420px, 88vw);
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}

.gx-drawer.is-open {
  transform: translateX(0);
}

.gx-modal {
  top: 50%;
  left: 50%;
  width: min(560px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  border-radius: var(--gx-radius-lg);
}

.gx-drawer-header,
.gx-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--gx-border);
}

.gx-drawer-body,
.gx-modal-body {
  padding: 20px;
}

.gx-drawer-footer,
.gx-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--gx-border);
}

.gx-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  z-index: 20;
}

.gx-backdrop.is-visible {
  display: block;
}

@media (max-width: 1023px) {
  .gx-mobile-menu-button {
    display: inline-flex;
  }

  .gx-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    width: min(280px, 82vw);
    z-index: var(--gx-z-mobile);
  }

  .gx-sidebar.is-open {
    transform: translateX(0);
  }

  .gx-shell-main {
    width: 100%;
  }

  .gx-topbar {
    padding-inline: 16px;
  }

  .gx-page-shell {
    padding: 16px;
  }

  .gx-page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .gx-dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .gx-dashboard-stack {
    min-width: 0;
  }

  .gx-profile-meta {
    display: none;
  }
}

@media (max-width: 639px) {
  .gx-topbar-right {
    gap: 8px;
  }

  .gx-context-pill {
    display: none;
  }

  .gx-page-header-copy h1 {
    font-size: 22px;
  }
}
