:root {
  --bg-dark: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.85);
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --accent: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.12);
  --danger: #f43f5e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.logo-badge span {
  color: var(--primary);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

p.subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

input.activation-code {
  letter-spacing: 3px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  font-family: monospace;
  font-size: 1.1rem;
}

input.pin-input {
  letter-spacing: 8px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.btn {
  width: 100%;
  padding: 0.9rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
  margin-top: 0.5rem;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.badge-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  padding: 1.5rem 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.user-societe {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0d9488;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.user-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.user-id {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 1rem;
  background: #f1f5f9;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.qr-box {
  width: 210px;
  height: 210px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;

  box-sizing: border-box;
}

.qr-box img, .qr-box canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
}

.timer-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 148, 136, 0.15);
  color: var(--primary);
  border: 1px solid rgba(13, 148, 136, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-top: 1rem;
}

.error-msg {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

.error-msg.visible {
  display: block;
}
