:root {
  --bg: #08141f;
  --bg-soft: #102436;
  --surface: rgba(9, 22, 34, 0.78);
  --surface-strong: #0d1f30;
  --surface-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(167, 192, 214, 0.18);
  --line-strong: rgba(167, 192, 214, 0.3);
  --text: #eef5fb;
  --muted: #9cb3c6;
  --brand: #2dd4bf;
  --brand-deep: #0f766e;
  --accent: #ff9b71;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(45, 212, 191, 0.16), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(255, 155, 113, 0.16), transparent 24%),
    linear-gradient(180deg, #07111b 0%, #091723 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

.app-shell,
.login-page {
  position: relative;
  overflow-x: hidden;
}

.page-glow {
  position: fixed;
  inset: auto;
  width: 30rem;
  height: 30rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.page-glow-a {
  top: -8rem;
  right: -10rem;
  background: #2dd4bf;
}

.page-glow-b {
  left: -8rem;
  bottom: -10rem;
  background: #ff9b71;
}

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

button,
.button-link {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.3rem;
  background: linear-gradient(135deg, var(--brand) 0%, #22c55e 100%);
  color: #04111a;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
  box-shadow: 0 18px 34px rgba(45, 212, 191, 0.18);
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
}

button.ghost,
.ghost.button-link {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, background 160ms ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

textarea {
  resize: vertical;
}

label span,
.muted,
.eyebrow,
.section-kicker,
.mini-label,
.metric-label,
.metric-foot,
.hero-text,
.hero-user {
  color: var(--muted);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
}

.hero,
.dashboard-grid,
.login-card {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.75fr);
  gap: 1rem;
  padding: 2rem 0 1.25rem;
}

.hero-copy,
.hero-aside,
.panel,
.login-card {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: 34px;
  padding: 2rem;
}

.hero-copy h1,
.panel h2,
.login-card h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  font-size: clamp(2.7rem, 5vw, 5rem);
  max-width: 12ch;
}

.hero-text {
  max-width: 58ch;
  margin: 1.15rem 0 0;
  font-size: 1.03rem;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
}

.status-pill,
.hero-user,
.table-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(45, 212, 191, 0.14);
}

.hero-aside {
  border-radius: 30px;
  padding: 1rem;
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.metric-card {
  padding: 1.15rem;
  border-radius: 22px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.metric-card.accent {
  background: linear-gradient(135deg, rgba(255, 155, 113, 0.16), rgba(255, 255, 255, 0.04));
}

.metric-value {
  display: block;
  margin-top: 0.4rem;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-family: "Fraunces", serif;
}

.hero-logout {
  margin-top: 0.35rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
  padding-bottom: 2rem;
}

.message-banner,
.panel-wide,
.sync-panel {
  grid-column: 1 / -1;
}

.side-panel {
  grid-column: 2;
  grid-row: span 2;
  align-self: start;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 1.35rem;
}

.panel-spotlight {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    var(--surface);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-head.compact {
  margin-bottom: 1.25rem;
}

.panel h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  margin-top: 0.15rem;
}

.sync-cards,
.filters-grid,
.export-grid {
  display: grid;
  gap: 0.9rem;
}

.sync-progress-card {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.12), rgba(255, 155, 113, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.sync-progress-head,
.sync-progress-meta,
.sync-progress-stats {
  display: flex;
  gap: 0.9rem;
  justify-content: space-between;
  align-items: center;
}

.sync-progress-head strong {
  display: block;
  margin-top: 0.2rem;
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
  font-family: "Fraunces", serif;
}

.sync-phase-pill {
  text-transform: capitalize;
}

.progress-track {
  margin: 1rem 0 0.8rem;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  box-shadow: 0 10px 24px rgba(45, 212, 191, 0.28);
  transition: width 600ms ease;
}

.sync-progress-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.sync-progress-meta span:last-child {
  white-space: nowrap;
}

.sync-progress-stats {
  align-items: stretch;
  margin-top: 0.95rem;
}

.sync-progress-stats .mini-card {
  flex: 1 1 0;
}

.sync-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.mini-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  display: grid;
  gap: 0.35rem;
}

.release-card {
  grid-column: span 2;
}

.filters-grid.refined {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.full-span {
  grid-column: 1 / -1;
}

.source-form,
.stack {
  display: grid;
  gap: 1rem;
}

.export-grid.compact-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.field-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.field-order {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.field-order input {
  width: 6rem;
  text-align: center;
}

.filter-actions,
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.alert {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 155, 113, 0.12);
  border: 1px solid rgba(255, 155, 113, 0.22);
  color: var(--text);
}

.alert.subtle {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.22);
}

.alert.error {
  background: rgba(255, 96, 96, 0.12);
  border-color: rgba(255, 96, 96, 0.22);
}

.table-wrap.polished {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(4, 13, 21, 0.4);
}

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

th,
td {
  text-align: left;
  padding: 1rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table-pill {
  font-size: 0.83rem;
}

.table-pill.neutral {
  background: rgba(255, 255, 255, 0.04);
}

.mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  letter-spacing: -0.02em;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.login-card {
  max-width: 480px;
  border-radius: 34px;
  padding: 2.1rem;
}

.login-card.modern h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin-bottom: 0.8rem;
}

small {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .sync-cards,
  .filters-grid.refined,
  .export-grid.compact-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sync-progress-stats {
    flex-wrap: wrap;
  }

  .release-card {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .hero,
  .dashboard-grid,
  .login-card {
    width: min(100%, calc(100% - 1rem));
  }

  .hero-copy,
  .hero-aside,
  .panel,
  .login-card {
    padding: 1.1rem;
    border-radius: 24px;
  }

  .panel-head,
  .filter-actions,
  .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .sync-cards,
  .filters-grid.refined,
  .export-grid.compact-cards {
    grid-template-columns: 1fr;
  }

  .sync-progress-head,
  .sync-progress-meta,
  .sync-progress-stats {
    flex-direction: column;
    align-items: stretch;
  }

  .metric-value {
    font-size: 2rem;
  }

  button,
  .button-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
