:root {
  --go2-bg: #f3f8ff;
  --go2-panel: rgba(255, 255, 255, 0.68);
  --go2-panel-strong: rgba(255, 255, 255, 0.86);
  --go2-border: rgba(255, 255, 255, 0.86);
  --go2-text: #16224a;
  --go2-muted: #5b6678;
  --go2-soft: #9aa3b2;
  --go2-blue: #2d8bba;
  --go2-cyan: #37bef0;
  --go2-shadow: 0 24px 70px rgba(40, 90, 170, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--go2-text);
  overflow-x: hidden;
  background:
    radial-gradient(820px 620px at 84% 10%, rgba(80, 165, 235, 0.20), transparent 60%),
    radial-gradient(760px 680px at 8% 92%, rgba(50, 120, 215, 0.16), transparent 62%),
    radial-gradient(620px 520px at 52% 56%, rgba(120, 210, 238, 0.13), transparent 66%),
    linear-gradient(180deg, #ffffff 0%, var(--go2-bg) 100%);
}

a {
  color: var(--go2-blue);
  text-decoration: none;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 28px;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: stretch;
  gap: 64px;
  max-width: 1260px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 80px 72px;
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 34px 22px;
}

.auth-card {
  width: min(420px, 100%);
}

.liquid-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(820px 620px at 84% 10%, rgba(80, 165, 235, 0.20), transparent 60%),
    radial-gradient(760px 680px at 8% 92%, rgba(50, 120, 215, 0.16), transparent 62%),
    radial-gradient(620px 520px at 52% 56%, rgba(120, 210, 238, 0.13), transparent 66%),
    linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}

.aurora,
.drop {
  position: absolute;
  display: block;
}

.aurora {
  border-radius: 50%;
  filter: blur(48px);
}

.aurora-one {
  top: -160px;
  right: 6%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(80, 165, 235, 0.22), transparent 68%);
  animation: auroraDrift 18s ease-in-out infinite;
}

.aurora-two {
  bottom: -200px;
  left: -60px;
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(55, 190, 239, 0.16), transparent 70%);
  animation: auroraDrift 22s ease-in-out infinite reverse;
}

.drop > span {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50% 50% 50% 0;
  transform: rotate(45deg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(120, 195, 240, 0.42));
  box-shadow:
    inset 0 8px 18px rgba(255, 255, 255, 0.82),
    inset 0 -12px 26px rgba(50, 120, 200, 0.22),
    0 22px 46px rgba(50, 110, 190, 0.22);
  backdrop-filter: blur(6px) saturate(160%);
}

.drop-one {
  top: 120px;
  right: 25%;
  width: 132px;
  height: 132px;
  animation: floaty 7s ease-in-out infinite;
}

.drop-one > span::after,
.drop-two > span::after {
  content: "";
  position: absolute;
  top: 22%;
  left: 26%;
  width: 30px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%);
  transform: rotate(-45deg);
  filter: blur(2px);
}

.drop-two {
  right: 10%;
  bottom: 23%;
  width: 84px;
  height: 84px;
  animation: floaty2 9s ease-in-out infinite;
}

.drop-two > span::after {
  width: 20px;
  height: 26px;
  filter: blur(1.5px);
}

.drop-three {
  top: 36%;
  right: 33%;
  width: 52px;
  height: 52px;
  animation: floaty3 6s ease-in-out infinite;
}

.drop-four {
  left: 36%;
  bottom: 13%;
  width: 168px;
  height: 168px;
  opacity: 0.7;
  filter: blur(3px);
  animation: floaty 11s ease-in-out infinite;
}

.drop-four > span {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(120, 200, 240, 0.22));
}

@keyframes floaty {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes floaty2 {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(16px); }
}

@keyframes floaty3 {
  0%,
  100% { transform: translate(0, 0); }
  50% { transform: translate(-10px, -14px); }
}

@keyframes auroraDrift {
  0%,
  100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
}

.login-hero {
  display: flex;
  min-height: calc(100vh - 160px);
  flex-direction: column;
  justify-content: space-between;
}

.login-logo {
  align-self: flex-start;
}

.login-hero-copy {
  max-width: 560px;
}

.brand-lockup img {
  width: 112px;
  height: auto;
  display: block;
}

.hero-title {
  margin: 0 0 16px;
  max-width: 660px;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 560px;
  color: var(--go2-muted);
  font-size: 18px;
  line-height: 1.6;
}

.glass-card {
  border: 1px solid var(--go2-border);
  border-radius: 24px;
  background: linear-gradient(150deg, var(--go2-panel-strong), rgba(255, 255, 255, 0.46));
  box-shadow: var(--go2-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(28px) saturate(180%);
}

.login-card {
  align-self: center;
  position: relative;
  padding: 30px;
  overflow: hidden;
}

.section-eyebrow {
  margin: 0 0 8px;
  color: var(--go2-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.section-title {
  margin: 0 0 22px;
  font-size: 28px;
  line-height: 1.2;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-field label {
  color: #34415f;
  font-size: 13px;
  font-weight: 650;
}

.input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(50, 110, 190, 0.16);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--go2-text);
  background: rgba(255, 255, 255, 0.74);
  outline: none;
}

.input:focus {
  border-color: rgba(55, 190, 240, 0.72);
  box-shadow: 0 0 0 4px rgba(55, 190, 240, 0.14);
}

.password-control {
  position: relative;
}

.password-control .input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  color: var(--go2-blue);
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover {
  background: rgba(55, 190, 240, 0.12);
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.password-toggle {
  transform: translateY(-50%);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(100deg, var(--go2-blue), var(--go2-cyan) 55%, #76d1ee);
  box-shadow: 0 12px 30px rgba(55, 190, 239, 0.36), inset 0 1px 1px rgba(255, 255, 255, 0.55);
}

.btn-secondary {
  width: 100%;
  color: #1f2d4a;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
}

.btn-link {
  width: 100%;
  margin-top: 12px;
  color: var(--go2-blue);
  background: transparent;
  box-shadow: none;
}

.forgot-link {
  display: block;
  margin-top: 16px;
  color: var(--go2-blue);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.login-intro {
  margin: -6px 0 22px;
  color: var(--go2-muted);
  line-height: 1.5;
}

.login-choice,
.login-local-form {
  transition: opacity 180ms ease, transform 180ms ease;
}

.login-local-form {
  display: none;
}

.is-local-mode .login-choice {
  display: none;
}

.is-local-mode .login-local-form {
  display: block;
}

.language-switch {
  position: absolute;
  top: 18px;
  right: 20px;
  display: inline-flex;
  gap: 4px;
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.language-switch a {
  min-width: 32px;
  padding: 6px 8px;
  border-radius: 999px;
  text-align: center;
  color: var(--go2-muted);
  font-size: 11px;
  font-weight: 800;
}

.language-switch a.is-active {
  color: #fff;
  background: linear-gradient(100deg, var(--go2-blue), var(--go2-cyan));
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--go2-soft);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(50, 110, 190, 0.14);
}

.alert {
  margin-bottom: 18px;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
}

.alert-error {
  color: #8a1f2d;
  background: rgba(255, 228, 232, 0.88);
  border: 1px solid rgba(200, 70, 90, 0.18);
}

.alert-success {
  color: #0f6848;
  background: rgba(221, 249, 238, 0.86);
  border: 1px solid rgba(55, 170, 120, 0.20);
}

.toast-stack {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 1200;
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 12px 1fr 34px;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 22px;
  color: var(--go2-ink);
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.96), rgba(231, 248, 255, 0.9)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(45, 90, 150, 0.20);
  backdrop-filter: blur(22px);
  pointer-events: auto;
  animation: toast-in 180ms ease-out both;
}

.toast.is-hiding {
  animation: toast-out 180ms ease-in both;
}

.toast-marker {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--go2-blue), var(--go2-cyan));
  box-shadow: 0 0 0 6px rgba(56, 174, 220, 0.14);
}

.toast-error .toast-marker {
  background: linear-gradient(135deg, #d94862, #ff8d75);
  box-shadow: 0 0 0 6px rgba(217, 72, 98, 0.12);
}

.toast-content {
  display: grid;
  gap: 5px;
}

.toast-content strong {
  font-size: 14px;
  line-height: 1.2;
}

.toast-content p {
  margin: 0;
  color: var(--go2-muted);
  font-size: 13px;
  line-height: 1.45;
}

.toast-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  color: var(--go2-blue);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(75, 130, 190, 0.08);
}

.toast-close:hover {
  color: var(--go2-ink);
  background: rgba(255, 255, 255, 0.96);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate3d(18px, -6px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate3d(18px, -6px, 0) scale(0.98);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 24px;
  margin-bottom: 30px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
}

.topbar-brand img {
  width: 54px;
  height: 46px;
  object-fit: contain;
}

.topbar-nav,
.topbar-actions,
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-nav {
  margin: 0 22px 0 auto;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.topbar-nav a {
  border-radius: 999px;
  padding: 9px 14px;
  color: #43516c;
  font-size: 14px;
  font-weight: 750;
}

.topbar-nav a.is-active {
  color: #fff;
  background: linear-gradient(100deg, var(--go2-blue), var(--go2-cyan));
  box-shadow: 0 10px 22px rgba(45, 139, 186, 0.20);
}

.topbar-actions {
  gap: 8px;
}

.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 16px;
  color: var(--go2-blue);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

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

.icon-button.compact {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1;
}

.icon-button.danger {
  color: #b33c4a;
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--go2-cyan);
}

.dropdown-menu {
  position: relative;
}

.dropdown-menu summary {
  list-style: none;
}

.dropdown-menu summary::-webkit-details-marker {
  display: none;
}

.language-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  min-width: 86px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 0 13px;
  color: #293651;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.48));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-weight: 800;
}

.language-pill::after {
  content: "";
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23526079' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 0 8px 0 16px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
}

.user-pill span {
  max-width: 120px;
  overflow: hidden;
  color: #293651;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill strong,
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--go2-blue), var(--go2-cyan));
  font-size: 12px;
}

.entity-cell .avatar {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  color: #fff;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  min-width: 160px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 16px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 46px rgba(40, 90, 170, 0.18);
  backdrop-filter: blur(18px) saturate(160%);
}

.language-menu .dropdown-panel {
  min-width: 118px;
}

.settings-menu .dropdown-panel {
  min-width: 180px;
}

.dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 11px;
  padding: 0 12px;
  color: #526079;
  font-size: 13px;
  font-weight: 800;
}

.dropdown-panel a:hover {
  color: var(--go2-blue);
  background: rgba(55, 190, 240, 0.12);
}

.page {
  max-width: 1180px;
  margin: 0 auto;
}

.page-heading {
  margin-bottom: 26px;
}

.page-heading h1 {
  margin: 0 0 6px;
  font-size: 34px;
}

.page-heading p {
  margin: 0;
  color: var(--go2-muted);
}

.page-heading-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.btn-auto {
  width: auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card {
  padding: 18px 20px;
}

.stat-card span {
  color: var(--go2-muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.app-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  border-radius: 22px;
  padding: 28px 32px;
}

.app-card h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.app-card p {
  color: var(--go2-muted);
  line-height: 1.55;
}

.app-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.app-logo,
.entity-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  padding: 10px;
  object-fit: contain;
  background: rgba(210, 247, 250, 0.72);
  box-shadow: 0 12px 24px rgba(38, 123, 178, 0.16);
}

.pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--go2-blue);
  background: rgba(55, 190, 240, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--go2-blue);
  background: rgba(55, 190, 240, 0.12);
  font-size: 12px;
  font-weight: 750;
}

.chip-strong {
  color: #fff;
  background: linear-gradient(100deg, var(--go2-blue), var(--go2-cyan));
}

.muted,
.muted-link {
  color: var(--go2-muted);
}

.empty-state {
  padding: 28px;
  color: var(--go2-muted);
}

.data-panel {
  overflow: hidden;
  border-radius: 22px;
  padding: 4px;
}

.datatable-toolbar,
.datatable-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.datatable-toolbar {
  border-bottom: 1px solid rgba(50, 110, 190, 0.10);
}

.datatable-search,
.datatable-filter,
.datatable-pager label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.datatable-search {
  flex: 1 1 280px;
}

.datatable-filter {
  flex: 0 0 180px;
}

.datatable-toolbar span,
.datatable-footer span {
  color: #34415f;
  font-size: 12px;
  font-weight: 800;
}

.datatable-export,
.datatable-pager {
  display: flex;
  align-items: end;
  gap: 8px;
}

.datatable-footer {
  border-top: 1px solid rgba(50, 110, 190, 0.10);
  color: var(--go2-muted);
}

.datatable-pager .input {
  width: 88px;
}

.datatable-pager .btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(50, 110, 190, 0.10);
  text-align: left;
}

.table th {
  color: #34415f;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.admin-table td {
  vertical-align: middle;
}

.entity-cell {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 220px;
}

.entity-cell strong,
.entity-cell span {
  display: block;
}

.entity-cell span {
  margin-top: 3px;
  color: var(--go2-muted);
  font-size: 13px;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.row-actions form {
  margin: 0;
}

.status-toggle {
  min-width: 94px;
  min-height: 32px;
  border: 1px solid rgba(50, 110, 190, 0.13);
  border-radius: 999px;
  color: #66738a;
  background: rgba(255, 255, 255, 0.64);
  font-weight: 800;
  cursor: pointer;
}

.status-toggle.is-on {
  color: #0f7d5a;
  background: rgba(225, 250, 239, 0.92);
}

.empty-table {
  padding: 32px !important;
  color: var(--go2-muted);
  text-align: center !important;
}

.modal {
  width: min(640px, calc(100vw - 32px));
  border: 0;
  border-radius: 24px;
  padding: 0;
  color: var(--go2-text);
  background: transparent;
}

.modal-wide {
  width: min(860px, calc(100vw - 32px));
}

.modal::backdrop {
  background: rgba(16, 30, 62, 0.28);
  backdrop-filter: blur(10px);
}

.modal-card {
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  padding: 26px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(240, 250, 255, 0.84));
  box-shadow: 0 28px 80px rgba(30, 80, 150, 0.26);
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-header {
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 22px;
}

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

.textarea {
  min-height: 96px;
  padding-top: 14px;
  resize: vertical;
}

.file-input {
  padding: 12px 14px;
  height: auto;
}

.dropzone {
  position: relative;
  display: flex;
  min-height: 128px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed rgba(45, 139, 186, 0.38);
  border-radius: 18px;
  padding: 22px;
  color: #34415f;
  background: rgba(255, 255, 255, 0.50);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--go2-blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dropzone strong {
  font-size: 14px;
}

.dropzone.is-dragging {
  border-color: var(--go2-cyan);
  background: rgba(222, 248, 255, 0.72);
  transform: translateY(-1px);
}

.form-field small {
  color: var(--go2-muted);
  font-size: 12px;
}

.fieldset {
  margin: 0 0 16px;
  border: 1px solid rgba(50, 110, 190, 0.12);
  border-radius: 16px;
  padding: 14px;
}

.fieldset legend {
  padding: 0 6px;
  color: #34415f;
  font-size: 13px;
  font-weight: 750;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.check-card,
.switch-row,
.switch-control {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 14px;
  color: #34415f;
  font-weight: 750;
}

.check-card {
  border: 1px solid rgba(50, 110, 190, 0.12);
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.48);
}

.switch-row {
  width: fit-content;
  padding: 8px 0;
}

.switch-control {
  width: fit-content;
  cursor: pointer;
  padding: 8px 0;
}

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

.switch-control i,
.switch-button i {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(120, 135, 158, 0.24);
  box-shadow: inset 0 1px 3px rgba(30, 55, 92, 0.16);
  transition: background 160ms ease;
}

.switch-control i::after,
.switch-button i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(30, 55, 92, 0.22);
  transition: transform 160ms ease;
}

.switch-control input:checked + i,
.switch-button.is-on i {
  background: linear-gradient(100deg, var(--go2-blue), var(--go2-cyan));
}

.switch-control input:checked + i::after,
.switch-button.is-on i::after {
  transform: translateX(20px);
}

.switch-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: #66738a;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.switch-button.is-on {
  color: #0f7d5a;
}

.compact-switch {
  min-width: 100px;
}

.access-list {
  display: grid;
  gap: 10px;
  max-height: min(520px, 65vh);
  overflow: auto;
  padding-right: 4px;
}

.access-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 180px auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(50, 110, 190, 0.10);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.50);
}

.access-row strong,
.access-row span {
  display: block;
}

.access-row span {
  margin-top: 4px;
  color: var(--go2-muted);
  font-size: 13px;
  line-height: 1.35;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  border-top: 1px solid rgba(50, 110, 190, 0.10);
  padding: 18px 2px 0;
  color: rgba(91, 102, 120, 0.72);
  font-size: 12px;
}

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 22px;
  }

  .login-hero {
    min-height: auto;
    gap: 42px;
  }

  .hero-title {
    font-size: 48px;
  }

  .drop-one,
  .drop-three {
    display: none;
  }

  .topbar,
  .page-heading-actions,
  .page-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-nav,
  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 0;
  }

  .toast-stack {
    top: 14px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .datatable-toolbar,
  .datatable-footer,
  .datatable-export,
  .datatable-pager {
    align-items: stretch;
    flex-direction: column;
  }

  .datatable-search,
  .datatable-filter {
    flex: 1 1 auto;
  }

  .stat-grid,
  .form-grid,
  .check-grid,
  .access-row {
    grid-template-columns: 1fr;
  }

  .user-pill span {
    max-width: 180px;
  }
}
