:root {
  color-scheme: light;
  --bg: #f7f8f6;
  --ink: #101412;
  --muted: #59645f;
  --line: #d7ded9;
  --accent: #087443;
  --accent-dark: #045d35;
  --danger: #b3261e;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 420px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 45px rgb(16 20 18 / 8%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.brand img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}

h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.lead {
  margin: 12px 0 28px;
  color: var(--muted);
  line-height: 1.55;
}

.time-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.timer-ring {
  --progress: 360deg;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel) 0 57%, transparent 58%),
    conic-gradient(var(--accent) var(--progress), #dfe6e2 0);
  color: var(--ink);
  font-weight: 900;
  transition: background 0.28s linear;
}

.timer-ring.warning {
  background:
    radial-gradient(circle at center, var(--panel) 0 57%, transparent 58%),
    conic-gradient(#b26a00 var(--progress), #eadfcd 0);
}

.timer-ring.expired {
  background:
    radial-gradient(circle at center, var(--panel) 0 57%, transparent 58%),
    conic-gradient(var(--danger) 360deg, #f0d7d4 0);
  color: var(--danger);
}

.timer-title {
  margin: 0;
  font-weight: 900;
}

.timer-text {
  min-height: 22px;
  margin: 4px 0 10px;
  color: var(--muted);
  line-height: 1.4;
}

.time-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #dfe6e2;
}

.time-bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: var(--accent);
  transform-origin: left center;
  transition: transform 0.28s linear;
}

form {
  display: grid;
  gap: 12px;
}

label {
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  font-size: 1.35rem;
  letter-spacing: 0;
  outline: none;
}

input[type="password"],
input[type="text"] {
  font-size: 1rem;
}

#otp {
  font-size: 1.35rem;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(8 116 67 / 16%);
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.message {
  min-height: 24px;
  margin: 4px 0 0;
  color: var(--muted);
}

.message.error {
  color: var(--danger);
}

.helper {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

a {
  color: var(--accent);
  font-weight: 800;
}

.result {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.result-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 700;
}

.otp-code {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.countdown {
  min-height: 24px;
  margin: 12px 0 18px;
  color: var(--muted);
}

.return-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
}

@media (max-width: 420px) {
  .shell {
    padding: 16px;
  }

  .panel {
    padding: 22px;
  }

  h1 {
    font-size: 1.75rem;
  }

  .time-card {
    grid-template-columns: 64px 1fr;
    padding: 12px;
  }

  .timer-ring {
    width: 64px;
    height: 64px;
    font-size: 0.92rem;
  }
}
