* {
  box-sizing: border-box;
}

:root {
  --gs-navy: #0b1367;
  --gs-violet: #5f159e;
  --gs-magenta: #c42886;
  --gs-coral: #f04462;
  --gs-orange: #ff6b1a;
  --gs-ink: #1a2147;
  --gs-muted: #5f678c;
  --gs-bg: #eff2f9;
  --gs-surface: #ffffff;
  --gs-border: #d7deef;
  --gs-gradient: linear-gradient(120deg, #0b1367 0%, #5f159e 45%, #c42886 70%, #ff6b1a 100%);
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--gs-ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(11, 19, 103, 0.18), transparent 40%),
    radial-gradient(circle at 90% 0%, rgba(255, 107, 26, 0.18), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--gs-bg) 100%);
}

.gs-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.gs-auth-card {
  width: min(520px, 100%);
  background: var(--gs-surface);
  border: 1px solid var(--gs-border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 18px 40px rgba(20, 29, 70, 0.12);
}

.gs-auth-logo {
  height: 56px;
  width: auto;
}

h1, h2, h3 {
  margin: 12px 0 8px;
}

p {
  margin: 0 0 10px;
  color: var(--gs-muted);
}

.gs-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}

input,
select,
textarea {
  border: 1px solid var(--gs-border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--gs-gradient);
  cursor: pointer;
}

.gs-app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px;
}

.gs-console-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}

.gs-sidebar {
  border-right: 1px solid var(--gs-border);
  background: linear-gradient(180deg, #0f1b5c 0%, #1f145a 55%, #281049 100%);
  color: #e8ecff;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow: auto;
}

.gs-sidebar-brand {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 16px 12px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(4px);
}

.gs-brand-link {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  padding: 12px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.gs-sidebar-brand p {
  color: #c8d2ff;
  font-size: 12px;
  margin: 8px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.gs-module-nav {
  display: grid;
  gap: 10px;
}

.gs-module-block {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.gs-module-block h3 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #f5f7ff;
}

.gs-module-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  letter-spacing: 0.01em;
  flex: 1;
  min-width: 0;
}

.gs-module-title span {
  display: block;
  text-align: left;
  line-height: 1.2;
}

.gs-module-title i {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(90, 126, 255, 0.85), rgba(99, 208, 255, 0.85));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.gs-module-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 2px;
  cursor: pointer;
}

.gs-chevron {
  color: #c8d8ff;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.gs-module-block.is-open .gs-chevron {
  transform: rotate(180deg);
}

.gs-module-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.gs-submenu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.24s ease, opacity 0.2s ease;
}

.gs-module-block.is-open .gs-submenu {
  max-height: 720px;
  opacity: 1;
  margin-top: 6px;
}

.gs-module-block a {
  display: block;
  border-radius: 8px;
  padding: 7px 8px;
  color: #dbe3ff;
  text-decoration: none;
  font-size: 13px;
}

.gs-module-block a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.gs-sub-link {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.gs-sub-link i {
  width: 16px;
  display: inline-flex;
  justify-content: center;
  color: #9fc2ff;
  font-size: 13px;
  transition: transform 0.14s ease, color 0.14s ease;
}

.gs-sub-link:hover i {
  color: #ffffff;
  transform: scale(1.07);
}

.gs-submenu li.is-active .gs-sub-link {
  background: rgba(80, 151, 255, 0.35);
  color: #ffffff;
}

.gs-submenu li.is-active .gs-sub-link i {
  color: #ffffff;
}

.gs-main-workspace {
  padding: 16px;
}

.gs-app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--gs-surface);
  border: 1px solid var(--gs-border);
  border-radius: 18px;
  padding: 14px 18px;
}

.gs-app-header h1 {
  margin: 0;
  font-size: 28px;
}

.gs-app-logo {
  width: 140px;
  max-width: none;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.gs-userbox {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.gs-userbox a {
  color: var(--gs-violet);
  font-weight: 700;
  text-decoration: none;
}

.gs-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--gs-border);
  border-radius: 8px;
  color: var(--gs-violet) !important;
  font-weight: 600 !important;
  font-size: 13px;
  text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s;
}

.gs-logout-btn:hover {
  background: #f0f0f8;
  border-color: var(--gs-violet);
}

.gs-panel {
  margin-top: 14px;
  background: var(--gs-surface);
  border: 1px solid var(--gs-border);
  border-radius: 16px;
  padding: 18px;
}

.gs-hero {
  margin-top: 14px;
  border-radius: 22px;
  border: 1px solid #263381;
  padding: 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(94, 117, 255, 0.3), transparent 34%),
    radial-gradient(circle at 88% 88%, rgba(34, 200, 191, 0.2), transparent 30%),
    linear-gradient(135deg, #0b1648 0%, #181f66 50%, #0c2e60 100%);
  color: #f2f6ff;
}

.gs-hero-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  right: -30px;
  top: -90px;
  background: radial-gradient(circle, rgba(255, 171, 64, 0.35), transparent 66%);
  pointer-events: none;
}

.gs-hero-copy {
  position: relative;
  z-index: 1;
}

.gs-overline {
  margin: 0;
  font-size: 11px;
  color: #8fc3ff;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.gs-hero h2 {
  margin: 6px 0 10px;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1;
  color: #ffffff;
}

.gs-hero-note {
  max-width: 56ch;
  color: rgba(230, 236, 255, 0.9);
  margin-bottom: 16px;
}

.gs-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.gs-hero-meta div {
  border: 1px solid rgba(142, 162, 255, 0.35);
  border-radius: 12px;
  padding: 10px;
  background: rgba(17, 29, 87, 0.5);
}

.gs-hero-meta span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9eb2ff;
}

.gs-hero-meta strong {
  font-size: 15px;
  color: #fff;
}

.gs-danger {
  color: #ff7f79;
}

.gs-success {
  color: #80dbb0;
}

.gs-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gs-action-btn.ghost {
  background: transparent;
  border: 1px solid rgba(143, 172, 255, 0.6);
  color: #dbe8ff;
}

.gs-hero-orbit {
  z-index: 1;
  display: grid;
  gap: 12px;
  align-content: center;
  justify-items: center;
}

.gs-mini-orb {
  width: 164px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.38), transparent 40%),
    conic-gradient(var(--tone) calc(var(--pct) * 1%), rgba(235, 239, 255, 0.22) 0);
  animation: gsFloat 6s ease-in-out infinite;
}

.gs-mini-orb:nth-child(2) {
  animation-delay: 0.8s;
}

.gs-mini-orb:nth-child(3) {
  animation-delay: 1.6s;
}

.gs-mini-orb span {
  display: block;
  font-size: 31px;
  font-weight: 800;
  color: #fff;
}

.gs-mini-orb small {
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #d6e3ff;
}

.gs-deck-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 12px;
}

.gs-deck-card {
  border: 1px solid var(--gs-border);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}

.gs-deck-card header h3 {
  margin: 0;
  font-size: 22px;
}

.gs-deck-card header p {
  margin: 2px 0 10px;
  font-size: 13px;
}

.gs-tower-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 12px;
}

.gs-task-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.gs-task-list.modern li {
  background: linear-gradient(160deg, #f9fbff 0%, #f1f5ff 100%);
  border-radius: 12px;
  padding: 10px;
}

.gs-task-list li {
  border: 1px solid var(--gs-border);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  font-size: 13px;
}

.gs-task-list b {
  border-radius: 12px;
  background: #2f70e8;
  color: #fff;
  padding: 2px 7px;
  font-size: 12px;
}

.gs-nist-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  align-items: end;
}

.gs-nist-bars.modern {
  border: 1px solid var(--gs-border);
  border-radius: 12px;
  padding: 10px;
  background: #f8faff;
}

.gs-nist-col {
  text-align: center;
}

.gs-stack {
  height: 116px;
  border: 1px solid #ced6e9;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
}

.gs-stack .not {
  background: #8f99ad;
}

.gs-stack .partial {
  background: #ff7f50;
}

.gs-stack .aligned {
  background: #45c883;
}

.gs-nist-col small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  text-transform: uppercase;
}

.gs-service-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gs-service-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--gs-border);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.gs-service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(17, 34, 89, 0.12);
}

.gs-service-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.gs-ring {
  width: 150px;
  height: 150px;
  margin: 8px auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), #e5e5e5 0);
}

.gs-orange-ring {
  --ring-color: #f5a623;
}

.gs-blue-ring {
  --ring-color: #3c9ae8;
}

.gs-ring-center {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
}

.gs-ring-center strong {
  font-size: 30px;
  line-height: 1;
}

.gs-ring-center span {
  font-size: 13px;
  color: var(--gs-muted);
}

.gs-donut {
  width: 150px;
  height: 150px;
  margin: 8px auto;
  border-radius: 50%;
  background: conic-gradient(
    #2f8de7 0 calc(var(--comp) * 1%),
    #f4d83a calc(var(--comp) * 1%) calc((var(--comp) + var(--partial)) * 1%),
    #ff4b1f calc((var(--comp) + var(--partial)) * 1%) 100%
  );
  position: relative;
}

.gs-donut::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #fff;
}

.gs-milestone-box {
  border: 1px solid var(--gs-border);
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(180deg, #f8faff 0%, #eef3ff 100%);
}

.gs-milestone-box p {
  margin: 4px 0;
}

.gs-flag {
  font-size: 20px;
  font-weight: 700;
  color: #d3473f;
}

.gs-action-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  text-decoration: none;
  background: linear-gradient(100deg, #2f70e8 0%, #2557ce 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
}

.gs-kpi-grid.modern {
  grid-template-columns: repeat(2, 1fr);
}

.gs-kpi-link.modern {
  grid-column: auto;
}

.gs-kpi-card.modern {
  height: 100%;
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(circle at 82% 12%, rgba(68, 142, 255, 0.2), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}

.gs-data-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@keyframes gsFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.gs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gs-tag {
  background: #f3ecfa;
  border: 1px solid #dac7ef;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.gs-role-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}

.gs-kpi-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}

.gs-kpi-link {
  grid-column: span 4;
  text-decoration: none;
}

.gs-kpi-card {
  border: 1px solid var(--gs-border);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fe 100%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gs-kpi-link:hover .gs-kpi-card {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(17, 25, 71, 0.12);
}

.gs-kpi-label {
  font-size: 13px;
  color: var(--gs-muted);
  margin: 0;
}

.gs-kpi-value {
  margin: 6px 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  background: var(--gs-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gs-kpi-hint {
  margin: 0;
  font-size: 12px;
}

.gs-table-wrap {
  overflow: auto;
}

.gs-table-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

/* Toolbar: Add button on left, search on right */
.gs-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.gs-search-form {
  flex: 1;
  max-width: 380px;
}

.gs-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.gs-search-icon {
  position: absolute;
  left: 10px;
  color: var(--gs-muted);
  font-size: 14px;
  pointer-events: none;
}

.gs-search-input {
  width: 100%;
  padding: 7px 34px 7px 32px;
  border: 1px solid var(--gs-border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--gs-text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.gs-search-input:focus {
  outline: none;
  border-color: #3b5fd4;
  box-shadow: 0 0 0 3px rgba(59, 95, 212, 0.12);
}

.gs-search-clear {
  position: absolute;
  right: 8px;
  color: var(--gs-muted);
  font-size: 14px;
  text-decoration: none;
  line-height: 1;
  display: flex;
  align-items: center;
}

.gs-search-clear:hover {
  color: #c0392b;
}

.gs-search-tag {
  font-style: italic;
  color: #3b5fd4;
}

/* Multi-select with Select All controls */
.gs-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gs-select-all-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gs-select-all-btn {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--gs-border);
  background: #eef2ff;
  color: #3b5fd4;
  cursor: pointer;
  transition: background 0.12s;
}

.gs-select-all-btn:hover {
  background: #d8e2ff;
}

.gs-deselect-btn {
  background: #fff0f0;
  color: #c0392b;
  border-color: #fca5a5;
}

.gs-deselect-btn:hover {
  background: #fde8e8;
}

.gs-selected-count {
  font-size: 11px;
  color: var(--gs-muted);
  font-weight: 500;
}

.gs-row-icons {
  display: inline-flex;
  gap: 6px;
}

.gs-icon-btn {
  border: 1px solid var(--gs-border);
  background: #f8fbff;
  color: #28448d;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gs-icon-btn:hover {
  background: #edf3ff;
}

.gs-icon-btn.danger {
  color: #b33838;
}

.gs-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 36, 0.45);
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.gs-modal[hidden] {
  display: none;
}

.gs-modal-card {
  width: min(1100px, 98%);
  background: #fff;
  border: 1px solid var(--gs-border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 24px 56px rgba(17, 35, 86, 0.26);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 88vh;
  overflow-y: auto;
  touch-action: none;
  z-index: 1201;
}

.gs-modal-card.dragging {
  box-shadow: 0 32px 64px rgba(17, 35, 86, 0.36);
}

.gs-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  cursor: move;
  user-select: none;
  padding: 4px 0;
  margin: -4px 0 10px 0;
}

.gs-modal-head h2 {
  margin: 0;
}

.gs-modal-close {
  border: 1px solid var(--gs-border);
  background: #fff;
  color: var(--gs-navy);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

.gs-modal-close:hover {
  background: #f3f4f6;
  color: #e11d48;
}

.gs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.gs-table th,
.gs-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--gs-border);
  font-size: 14px;
}

.gs-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gs-muted);
}

.gs-role-card {
  grid-column: span 4;
  border: 1px solid var(--gs-border);
  border-radius: 12px;
  padding: 12px;
}

.gs-role-card h3 {
  margin-top: 0;
}

.gs-role-card p {
  margin: 3px 0;
  font-size: 13px;
}

.gs-muted {
  color: var(--gs-muted);
}

.gs-form-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gs-form-grid .wide,
.gs-form-grid button {
  grid-column: span 3;
}

/* Details section (system fields) */
.gs-details-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid #f0f0f0;
}

.gs-details-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--gs-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.gs-details-toggle:hover {
  color: var(--gs-ink);
}

.gs-details-toggle i {
  transition: transform 0.2s ease;
  display: inline-block;
  font-size: 12px;
}

.gs-details-content {
  display: none;
  background: #f8f9fc;
  border-radius: 8px;
  padding: 12px;
  gap: 8px;
}

.gs-details-content.visible {
  display: grid;
}

.gs-detail-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.gs-detail-row:last-child {
  border-bottom: none;
}

.gs-detail-label {
  font-weight: 600;
  color: var(--gs-muted);
  word-break: break-word;
}

.gs-detail-value {
  color: var(--gs-ink);
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.4;
  padding: 4px 8px;
  background: #fff;
  border-radius: 4px;
  max-height: 120px;
  overflow-y: auto;
}

/* Field sections with visual separation */
.gs-form-grid label[data-field-name="id"],
.gs-form-grid label[data-field-name="created_at"],
.gs-form-grid label[data-field-name="updated_at"],
.gs-form-grid label[data-field-name="metadata"] {
  opacity: 0.65;
  font-size: 13px;
}

.gs-form-grid label[data-field-name="id"],
.gs-form-grid label[data-field-name="created_at"],
.gs-form-grid label[data-field-name="updated_at"],
.gs-form-grid label[data-field-name="metadata"] {
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
  margin-top: 8px;
}

.gs-form-grid label[data-field-name="id"] {
  border-top: 2px solid #e8eaf6;
  margin-top: 16px;
  padding-top: 14px;
}

.gs-form-grid label[data-field-name="prompt"],
.gs-form-grid label[data-field-name="prompt"].wide {
  margin-top: 8px;
}

.gs-form-grid label[data-field-name="id"] small {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.gs-form-section {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #f0f0f0;
}

.gs-form-section:first-of-type {
  border-top: none;
}

.gs-form-section-title {
  grid-column: span 2;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gs-muted);
  margin: 6px 0 4px 0;
  padding: 8px 0 0 0;
}

.gs-form-section .wide {
  grid-column: span 2;
}

.gs-form-section label:has([readonly]) {
  opacity: 0.7;
}

.gs-form-section input[readonly],
.gs-form-section select[disabled],
.gs-form-section textarea[readonly] {
  background: #f8f9fc;
  color: #7b8fa3;
  cursor: not-allowed;
}

.gs-field-system {
  font-size: 12px;
  opacity: 0.6;
}

.gs-checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.gs-checkbox-line input {
  width: 18px;
  height: 18px;
}

.gs-messages {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.gs-message {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.gs-message.error {
  background: #ffedf0;
  color: #a61e3f;
}

.gs-message.success {
  background: #ebf8f2;
  color: #17724c;
}

.gs-message.info {
  background: #ebf1ff;
  color: #1d3c8f;
}

/* Pagination Styles */
.gs-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-top: 1px solid var(--gs-border);
  background: #f9fafc;
  font-size: 13px;
}

.gs-pagination-info {
  color: var(--gs-muted);
  font-weight: 500;
}

.gs-pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.gs-pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--gs-border);
  background: var(--gs-surface);
  color: var(--gs-ink);
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.gs-pagination-btn:hover:not(.gs-disabled) {
  background: var(--gs-navy);
  color: white;
  border-color: var(--gs-navy);
}

.gs-pagination-btn.gs-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--gs-muted);
}

.gs-pagination-pages {
  display: flex;
  gap: 4px;
}

.gs-page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 2px 6px;
  border: 1px solid var(--gs-border);
  background: var(--gs-surface);
  color: var(--gs-ink);
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gs-page-number:hover {
  background: var(--gs-navy);
  color: white;
  border-color: var(--gs-navy);
}

.gs-page-number.gs-active {
  background: var(--gs-navy);
  color: white;
  border-color: var(--gs-navy);
  font-weight: 600;
}

.gs-page-number a {
  text-decoration: none;
  color: inherit;
  display: block;
}

@media (max-width: 920px) {
  .gs-console-shell {
    grid-template-columns: 1fr;
  }

  .gs-sidebar {
    position: static;
    max-height: none;
  }

  .gs-role-card {
    grid-column: span 6;
  }

  .gs-top-grid {
    grid-template-columns: 1fr;
  }

  .gs-hero {
    grid-template-columns: 1fr;
  }

  .gs-hero-orbit {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .gs-mini-orb {
    width: 100%;
    max-width: 148px;
  }

  .gs-deck-grid {
    grid-template-columns: 1fr;
  }

  .gs-tower-layout {
    grid-template-columns: 1fr;
  }

  .gs-kpi-grid.modern {
    grid-template-columns: repeat(3, 1fr);
  }

  .gs-service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gs-data-grid {
    grid-template-columns: 1fr;
  }

  .gs-kpi-card {
    grid-column: span 6;
  }

  .gs-kpi-link {
    grid-column: span 6;
  }
}

@media (max-width: 680px) {
  .gs-app-shell {
    padding: 12px;
  }

  .gs-app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .gs-form-grid,
  .gs-form-grid .wide,
  .gs-form-grid button {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .gs-role-card {
    grid-column: span 12;
  }

  .gs-service-grid {
    grid-template-columns: 1fr;
  }

  .gs-hero-meta {
    grid-template-columns: 1fr;
  }

  .gs-hero-orbit {
    grid-template-columns: 1fr;
  }

  .gs-kpi-grid.modern {
    grid-template-columns: 1fr;
  }

  .gs-kpi-card {
    grid-column: span 12;
  }

  .gs-kpi-link {
    grid-column: span 12;
  }
}
