:root {
  color-scheme: light;
  --background: #f5f5f3;
  --surface: #ffffff;
  --surface-muted: #f0f0ed;
  --text: #181818;
  --text-muted: #666662;
  --border: #d9d9d4;
  --border-strong: #b8b8b2;
  --accent: #1d1d1b;
  --success: #2d7d46;
  --danger: #9d2f2f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 34rem),
    linear-gradient(135deg, #f8f8f6 0%, #efefeb 100%);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

.status-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
}

.status-card,
.login-card {
  width: min(100%, 920px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(100%, 620px);
}

.brand,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 30px;
}

.brand {
  border-bottom: 1px solid var(--border);
}

.brand-name {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text-muted);
  background: var(--surface-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(45, 125, 70, 0.35);
  animation: pulse 2s infinite;
}

.status-content,
.login-content {
  padding: clamp(38px, 7vw, 78px) clamp(30px, 8vw, 92px);
}

.login-content {
  padding-top: 54px;
  padding-bottom: 58px;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.login-card h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.intro {
  max-width: 690px;
  margin: 28px 0 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.login-form label span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 13px 14px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 29, 27, 0.1);
}

.login-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
}

.progress-panel {
  margin-top: 42px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9d9d4;
}

.progress-bar {
  display: block;
  width: 55%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.technical-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--border);
}

.technical-status > div {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
}

.technical-label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.technical-status strong {
  display: block;
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice {
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.reload-button,
.secondary-button {
  border-radius: 9px;
  padding: 12px 17px;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.reload-button {
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
}

.secondary-button {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: #fff;
}

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

.reload-button:hover {
  background: #353532;
}

.secondary-button:hover {
  background: var(--surface-muted);
}

.footer {
  justify-content: flex-start;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-strong);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 125, 70, 0.35); }
  70% { box-shadow: 0 0 0 8px rgba(45, 125, 70, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 125, 70, 0); }
}

@media (max-width: 680px) {
  .status-page {
    align-items: start;
    padding: 14px;
  }

  .status-card,
  .login-card {
    border-radius: 14px;
  }

  .brand,
  .footer {
    padding: 19px 20px;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-content,
  .login-content {
    padding: 42px 22px 48px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.15rem);
  }

  .technical-status {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
