:root {
  --green-light: #2f7909;
  --green-dark: #7abf43;
  --green-darker: #1a4505;
  --green-glow: rgba(47, 121, 9, 0.35);
  --green-muted: rgba(47, 121, 9, 0.12);
  --card-radius: 22px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
  background: var(--green-darker);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(122, 191, 67, 0.18) 0%, transparent 55%),
    linear-gradient(rgba(47, 121, 9, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 121, 9, 0.07) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  -webkit-font-smoothing: antialiased;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 0;
}

.ambient-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: rgba(122, 191, 67, 0.22);
  animation: float 9s ease-in-out infinite;
}

.ambient-2 {
  width: 360px;
  height: 360px;
  bottom: -100px;
  left: -60px;
  background: rgba(47, 121, 9, 0.28);
  animation: float 11s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(12px, 18px); }
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  z-index: 1;
}

.card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(
    165deg,
    rgba(122, 191, 67, 0.88) 0%,
    rgba(38, 95, 12, 0.94) 45%,
    rgba(20, 58, 6, 0.97) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--card-radius);
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(47, 121, 9, 0.2) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  overflow: hidden;
  animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--green-dark) 30%,
    rgba(255, 255, 255, 0.5) 50%,
    var(--green-dark) 70%,
    transparent
  );
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.08);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-icon {
  width: 36px;
  height: 36px;
  color: rgba(255, 255, 255, 0.9);
  padding: 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-icon svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.brand-tag {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.header-logo {
  flex-shrink: 0;
  max-width: 120px;
  max-height: 56px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.header-logo img {
  width: auto;
  height: auto;
  max-width: 120px;
  max-height: 56px;
  object-fit: contain;
  display: block;
}

main {
  padding: 22px 28px 26px;
}

.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 22px;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: all 0.35s ease;
  flex-shrink: 0;
}

.progress-dot.active {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
  transform: scale(1.15);
}

.progress-dot.done {
  background: var(--green-dark);
  border-color: var(--green-dark);
  box-shadow: 0 0 10px rgba(122, 191, 67, 0.6);
}

.progress-line {
  width: 48px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1px;
  transition: background 0.35s ease;
}

.progress-line.filled {
  background: linear-gradient(90deg, var(--green-dark), rgba(255, 255, 255, 0.6));
}

h1 {
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.subtitle {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 28px;
}

.step {
  display: none;
}

.step.active {
  display: block;
  animation: stepIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  margin-bottom: 20px;
}

input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: #1a2a44;
  background: rgba(255, 255, 255, 0.97);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

input::placeholder {
  color: rgba(26, 42, 68, 0.38);
}

input:focus {
  border-color: #fff;
  box-shadow:
    0 0 0 3px var(--green-glow),
    0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.input-hint {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(47, 121, 9, 0.12);
  color: var(--green-light);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  border: 1px solid rgba(47, 121, 9, 0.2);
  transition: background 0.2s;
}

.input-hint:hover {
  background: rgba(47, 121, 9, 0.2);
}

.waiting-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: -8px 0 16px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  border-left: 3px solid var(--green-dark);
}

.btn-primary {
  position: relative;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #3a8f0f 0%, var(--green-light) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(122, 191, 67, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.btn-primary:hover:not(:disabled)::after {
  transform: translateX(100%);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.error {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(220, 60, 60, 0.15);
  border: 1px solid rgba(220, 60, 60, 0.35);
  color: #ffaaaa;
  font-size: 13px;
}

.step-done {
  text-align: center;
  padding: 12px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid var(--green-dark);
  color: #fff;
  font-size: 30px;
  line-height: 60px;
  box-shadow: 0 0 24px rgba(122, 191, 67, 0.4);
  animation: successPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes successPop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.step-done h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.step-done p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

.card-footer svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--green-dark);
  opacity: 0.85;
}

/* Admin panel */
.admin-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px;
}

.admin-page h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.admin-page .meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin-bottom: 24px;
}

.admin-login {
  max-width: 360px;
  background: rgba(122, 191, 67, 0.55);
  border: 1px solid rgba(47, 121, 9, 0.2);
  border-radius: 12px;
  padding: 24px;
}

.admin-login input {
  margin-bottom: 12px;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-item {
  background: rgba(122, 191, 67, 0.55);
  border: 1px solid rgba(47, 121, 9, 0.15);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 13px;
}

.session-item.completed {
  border-color: rgba(47, 121, 9, 0.45);
}

.session-item .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.session-item .label {
  color: rgba(255, 255, 255, 0.45);
}

.session-item code {
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.awaiting {
  background: rgba(255, 180, 0, 0.15);
  color: #ffc850;
}

.status-badge.completed {
  background: var(--green-muted);
  color: var(--green-light);
}

.empty-state {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  text-align: center;
  padding: 40px;
}

.connection-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.connection-dot.online {
  background: var(--green-light);
}

.connection-dot.offline {
  background: #ff5555;
}
