:root {
  --gd-bg: #fff5f6;
  --gd-surface: #ffffff;
  --gd-surface-alt: #fff0f2;
  --gd-text: #3a1117;
  --gd-muted: #87565e;
  --gd-primary: #d11f3f;
  --gd-secondary: #8f1730;
  --gd-accent: #ff6b81;
  --gd-border: #f2d7dc;
  --gd-shadow: 0 18px 44px rgba(145, 20, 44, 0.14);
}

.gd-shell,
.gd-auth-shell {
  color: var(--gd-text);
  font-family: inherit;
  margin: 0 auto;
  max-width: 1180px;
}

.gd-shell {
  padding: 24px 0 40px;
}

.gd-auth-shell {
  align-items: flex-start;
  background: transparent;
  border-radius: 0;
  display: flex;
  justify-content: center;
  min-height: auto;
  padding: 8px 0 0;
  width: 100%;
}

.gd-auth-card,
.gd-header-card,
.gd-card {
  background: linear-gradient(180deg, var(--gd-surface) 0%, var(--gd-surface-alt) 100%);
  border: 1px solid var(--gd-border);
  border-radius: 24px;
  box-shadow: var(--gd-shadow);
  margin: 16px 0;
  padding: 24px;
}

.gd-auth-card {
  margin: 0;
  max-width: 480px;
  width: 100%;
}

.gd-auth-card h2,
.gd-section-head h2,
.gd-portal-hero h1,
.gd-header-content h2,
.gd-big-number {
  color: var(--gd-primary);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.04;
  margin: 8px 0;
}

.gd-auth-card p,
.gd-portal-hero p,
.gd-section-head p,
.gd-empty-copy,
.gd-note-grid span,
.gd-note-grid strong,
.gd-card small {
  color: var(--gd-muted);
}

.gd-kicker {
  color: var(--gd-secondary);
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gd-portal-hero {
  align-items: stretch;
  background: linear-gradient(135deg, var(--gd-primary), var(--gd-secondary));
  border-radius: 28px;
  box-shadow: var(--gd-shadow);
  color: #fff;
  display: grid;
  gap: 24px;
  margin-bottom: 18px;
  padding: 32px;
}

.gd-portal-hero .gd-kicker,
.gd-portal-hero h1,
.gd-portal-hero p,
.gd-portal-hero small,
.gd-portal-hero strong,
.gd-portal-hero span {
  color: #fff;
}

.gd-portal-hero-actions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gd-hero-topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.gd-hero-topbar-copy {
  align-items: center;
  display: inline-flex;
  gap: 12px;
}

.gd-hero-topbar-copy .gd-kicker {
  margin: 0;
}

.gd-hero-main {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
}

.gd-logo-badge {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  min-height: 82px;
  padding: 12px 16px;
}

.gd-logo-badge-auth {
  background: linear-gradient(180deg, #fff8f9 0%, #fff 100%);
  border: 1px solid var(--gd-border);
  margin: 0 auto 18px;
}

.gd-logo {
  display: block;
  height: auto;
  filter: brightness(0) invert(1);
  max-width: 112px;
  mix-blend-mode: screen;
  width: 112px;
}

.gd-logo-auth {
  filter: none;
  margin: 0;
  max-width: 150px;
  mix-blend-mode: normal;
  width: 150px;
}

.gd-portal-copy {
  max-width: 560px;
}

.gd-portal-copy .gd-kicker {
  margin-bottom: 10px;
}

.gd-hero-stat {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  min-width: 250px;
  padding: 18px 20px;
}

.gd-hero-stat span,
.gd-split-metrics span,
.gd-toolbar-group span {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.gd-hero-stat strong,
.gd-split-metrics strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
}

.gd-btn {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.gd-btn:hover,
.gd-btn:focus {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.gd-btn-secondary {
  background: #fff;
  color: var(--gd-secondary);
}

.gd-btn-light {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
}

.gd-btn-outline {
  background: #fff;
  border: 1px solid var(--gd-border);
  color: var(--gd-secondary);
  cursor: pointer;
}

.gd-hero-actions-row {
  display: flex;
  gap: 12px;
}

.gd-auth-layout {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 640px;
  width: 100%;
}

.gd-auth-brand-panel {
  align-content: center;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  box-shadow: 0 14px 38px rgba(143, 23, 48, 0.08);
  color: #7c1830;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 18px 20px;
  text-align: center;
}

.gd-auth-brand-panel .gd-kicker,
.gd-auth-brand-panel h2,
.gd-auth-brand-panel p {
  color: #7c1830;
}

.gd-auth-brand-panel h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.05;
  margin: 0;
}

.gd-auth-brand-panel p {
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0;
  max-width: 360px;
}

.gd-auth-brand-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.gd-auth-brand-pills span {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  color: #8f1730;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
}

.gd-auth-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.gd-auth-card-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  min-height: 560px;
  max-width: 640px;
  text-align: center;
  width: 100%;
  padding: 18px 36px 20px;
}

.gd-auth-card-compact > * {
  max-width: 100%;
}

.gd-auth-card-compact .gd-logo-badge-auth,
.gd-auth-card-compact h2,
.gd-auth-card-compact p,
.gd-auth-card-compact .gd-auth-brand-pills,
.gd-auth-card-compact .gd-auth-form,
.gd-auth-card-compact .gd-auth-link {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.gd-auth-card-compact .gd-auth-form {
  display: block;
  width: min(100%, 420px);
}

.gd-auth-card .gd-kicker {
  margin-bottom: 6px;
}

.gd-auth-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  margin-bottom: 10px;
  text-align: center;
}

.gd-auth-card p {
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 8px;
  max-width: 360px;
  text-align: center;
}

.gd-logo-badge-auth {
  background: transparent;
  border: 0;
  display: flex;
  justify-content: center;
  margin: 0 auto 18px;
  padding: 0;
}

.gd-auth-brand-pills-compact {
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 14px;
}

.gd-auth-brand-pills-compact span {
  font-size: 0.78rem;
  padding: 6px 12px;
}

.gd-modal {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.2s ease;
  z-index: 99999;
}

.gd-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gd-modal-backdrop {
  background: rgba(34, 8, 13, 0.6);
  inset: 0;
  position: absolute;
}

.gd-modal-dialog {
  background: linear-gradient(180deg, #fff8f9 0%, #ffffff 100%);
  border: 1px solid var(--gd-border);
  border-radius: 28px;
  box-shadow: 0 26px 60px rgba(58, 17, 23, 0.28);
  left: 50%;
  max-height: min(86vh, 920px);
  max-width: 1120px;
  overflow: auto;
  padding: 28px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
}

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

.gd-modal-head h2 {
  color: var(--gd-primary);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 4px 0 0;
}

.gd-modal-close {
  background: #fff;
  border: 1px solid var(--gd-border);
  border-radius: 999px;
  color: var(--gd-secondary);
  cursor: pointer;
  font-size: 1.8rem;
  height: 48px;
  line-height: 1;
  width: 48px;
}

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

.gd-regulation-card {
  background: linear-gradient(135deg, #ff2947, #d11f3f);
  border-radius: 20px;
  color: #fff;
  min-height: 116px;
  padding: 22px;
}

.gd-regulation-card p,
.gd-regulation-card strong,
.gd-regulation-card h3 {
  color: inherit;
  margin: 0;
}

.gd-regulation-card p {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.gd-regulation-card strong {
  color: #ffe45e;
}

.gd-regulation-card-neutral {
  background: linear-gradient(135deg, #8f8a8c, #6e686b);
}

.gd-regulation-card-neutral h3 {
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.gd-toolbar-card {
  padding: 18px 22px;
}

.gd-dashboard-menu {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 20px 0 10px;
}

.gd-dashboard-menu-link {
  background: linear-gradient(180deg, #fff 0%, #fff8f9 100%);
  border: 1px solid #f2cfd7;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(145, 20, 44, 0.08);
  color: var(--gd-text);
  display: block;
  min-height: 138px;
  padding: 18px 20px;
  position: relative;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gd-dashboard-menu-link:hover,
.gd-dashboard-menu-link:focus {
  border-color: #e39aaa;
  box-shadow: 0 16px 34px rgba(145, 20, 44, 0.12);
  transform: translateY(-1px);
}

.gd-dashboard-menu-link::after {
  background: linear-gradient(90deg, var(--gd-primary), var(--gd-accent));
  border-radius: 999px;
  bottom: 12px;
  content: '';
  height: 4px;
  left: 20px;
  opacity: 0.2;
  position: absolute;
  right: 20px;
}

.gd-dashboard-menu-link strong,
.gd-dashboard-menu-link small,
.gd-dashboard-menu-link span {
  display: block;
}

.gd-dashboard-menu-link strong {
  color: var(--gd-primary);
  font-size: 1.1rem;
  margin: 2px 0 6px;
}

.gd-dashboard-menu-link small,
.gd-dashboard-menu-eyebrow {
  color: var(--gd-muted);
  line-height: 1.35;
}

.gd-dashboard-menu-link.is-active {
  background: linear-gradient(135deg, var(--gd-primary), var(--gd-secondary));
  border-color: transparent;
  box-shadow: 0 18px 42px rgba(145, 20, 44, 0.24);
}

.gd-dashboard-menu-link.is-active strong,
.gd-dashboard-menu-link.is-active small,
.gd-dashboard-menu-link.is-active span {
  color: #fff;
}

.gd-dashboard-menu-link.is-active::after {
  background: rgba(255, 255, 255, 0.45);
  opacity: 1;
}

.gd-toolbar,
.gd-filter-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.gd-toolbar label,
.gd-filter-form label {
  display: grid;
  gap: 6px;
}

.gd-toolbar-label,
.gd-toolbar label span,
.gd-filter-form label strong {
  color: var(--gd-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.gd-toolbar select,
.gd-filter-form select,
.gd-auth-form input[type="text"],
.gd-auth-form input[type="password"] {
  background: #fff;
  border: 1px solid var(--gd-border);
  border-radius: 14px;
  color: var(--gd-text);
  min-height: 46px;
  min-width: 190px;
  padding: 10px 14px;
}

.gd-section-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
}

.gd-section-head h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 2px;
}

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

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

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

.gd-card h3 {
  color: var(--gd-secondary);
  font-size: 1.1rem;
  margin: 0;
}

.gd-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.gd-badge {
  background: #ffe1e7;
  border: 1px solid #f6bcc9;
  border-radius: 999px;
  color: var(--gd-primary);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 12px;
}

.gd-progress {
  background: #f8dbe1;
  border-radius: 999px;
  height: 10px;
  margin: 14px 0 8px;
  overflow: hidden;
}

.gd-progress > span {
  background: linear-gradient(90deg, var(--gd-primary), var(--gd-accent));
  display: block;
  height: 100%;
}

.gd-progress-lg {
  height: 14px;
}

.gd-metric-card small {
  display: block;
  min-height: 42px;
}

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

.gd-note-grid {
  margin-top: 12px;
}

.gd-note-grid div,
.gd-timeline > div {
  background: #fff;
  border: 1px solid var(--gd-border);
  border-radius: 18px;
  padding: 14px;
}

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

.gd-table td,
.gd-table th {
  border-bottom: 1px solid var(--gd-border);
  padding: 10px 8px;
  text-align: left;
}

.gd-table th {
  color: var(--gd-muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gd-table-ranking tbody tr.is-current-user {
  background: #fff3f5;
}

.gd-table-ranking tbody tr.is-current-user td {
  color: var(--gd-secondary);
  font-weight: 700;
}

.gd-highlight,
.gd-highlight-card {
  border-left: 6px solid var(--gd-primary);
}

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

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

.gd-card-compact-note {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gd-card-chart canvas {
  max-height: 320px;
  width: 100% !important;
}

.gd-auth-form form {
  display: grid;
  gap: 14px;
  justify-items: stretch;
  margin: 0 auto;
  margin-top: 0;
  max-width: 420px;
  width: 100%;
}

.gd-auth-form label {
  color: var(--gd-muted);
  display: block;
  font-weight: 700;
  margin: 0;
}

.gd-auth-form p {
  margin: 0;
  text-align: center;
  width: 100%;
}

.gd-auth-alert,
.gd-auth-notice {
  border-radius: 16px;
  font-size: 0.94rem;
  font-weight: 700;
  margin: 0 auto 14px;
  max-width: 420px;
  padding: 12px 16px;
  text-align: center;
  width: 100%;
}

.gd-auth-alert {
  background: #fff1f3;
  border: 1px solid #f3b6c1;
  color: #9f1834;
}

.gd-auth-notice {
  background: #eefaf3;
  border: 1px solid #b9e4c8;
  color: #146c43;
}

.gd-auth-form .login-username,
.gd-auth-form .login-password,
.gd-auth-form .login-captcha,
.gd-auth-form .login-submit {
  margin: 0 auto;
  width: 100%;
}

.gd-auth-form .login-captcha {
  display: grid;
  gap: 8px;
}

.gd-auth-form .login-captcha label {
  text-align: left;
}

.gd-auth-form input[type="text"],
.gd-auth-form input[type="password"] {
  background: #fff;
  border: 1px solid #edd4da;
  box-shadow: inset 0 1px 2px rgba(58, 17, 23, 0.04);
  min-height: 46px;
  min-width: 0;
  width: 100%;
}

.gd-auth-form .login-submit input {
  background: linear-gradient(135deg, var(--gd-primary), var(--gd-secondary));
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 48px;
  padding: 0 18px;
  width: 100%;
}

.gd-auth-link {
  color: var(--gd-secondary);
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 14px;
  text-decoration: none;
}

.gd-auth-link a {
  color: inherit;
  text-decoration: none;
}

.gd-auth-link a:hover,
.gd-auth-link a:focus {
  text-decoration: underline;
}

body.gd-modal-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .gd-dashboard-menu,
  .gd-grid-3,
  .gd-grid-2,
  .gd-timeline,
  .gd-split-metrics,
  .gd-note-grid {
    grid-template-columns: 1fr;
  }

  .gd-section-head,
  .gd-portal-hero {
    align-items: flex-start;
  }

  .gd-hero-main {
    grid-template-columns: 1fr;
  }

  .gd-auth-layout {
    max-width: 100%;
  }

  .gd-portal-hero-actions {
    align-items: stretch;
    width: 100%;
  }

  .gd-hero-actions-row,
  .gd-regulation-grid {
    grid-template-columns: 1fr;
  }

  .gd-hero-actions-row {
    display: grid;
  }

  .gd-hero-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .gd-hero-stat {
    min-width: 0;
    width: 100%;
  }

  .gd-logo {
    max-width: 118px;
    width: 118px;
  }

  .gd-logo-auth {
    max-width: 138px;
    width: 138px;
  }

  .gd-logo-badge {
    min-height: 72px;
  }

  .gd-auth-shell {
    min-height: auto;
    padding: 0;
  }

  .gd-auth-brand-panel {
    padding: 16px;
  }

  .gd-auth-card {
    padding: 0;
  }

  .gd-auth-card-compact {
    min-height: auto;
    padding: 12px 16px 8px;
  }

  .gd-modal-dialog {
    max-height: calc(100vh - 24px);
    padding: 22px;
    width: calc(100% - 16px);
  }
}
