/* Facial Bar Activation Card Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

:root {
  --primary: #274239;
  --primary-dark: #1b2f28;
  --primary-light: #e8f0ec;
  --secondary: #769a6e;
  --secondary-light: #f0f5ee;
  
  --primary-gradient: linear-gradient(135deg, #274239 0%, #1f362e 100%);
  --bg-gradient: linear-gradient(135deg, #f3f7f4 0%, #e7f0ea 50%, #d9e6dc 100%);
  
  --text-main: #2d3748;
  --text-muted: #5a6a70;
  --text-dark: #1a2521;
  --danger: #e53e3e;
  --success: #274239;
  
  --card-bg: #ffffff;
  --border-color: #d1dfd6;
  --shadow-sm: 0 4px 6px -1px rgba(39, 66, 57, 0.05);
  --shadow-lg: 0 20px 40px -15px rgba(39, 66, 57, 0.18), 0 10px 25px -5px rgba(0, 0, 0, 0.04);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 16px;
  line-height: 1.6;
}

/* Application Container */
.app-viewport {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.brand-header {
  text-align: center;
  margin-bottom: 20px;
}

.brand-logo-img {
  max-width: 220px;
  height: auto;
  display: inline-block;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(39, 66, 57, 0.12));
}

.activation-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.9);
  overflow: hidden;
  position: relative;
}

/* Card Header Banner */
.card-header-bar {
  background: linear-gradient(90deg, #e4efe7 0%, #f0f6f2 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-header-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #274239;
  text-transform: uppercase;
}

.card-body {
  padding: 28px 24px;
}

/* Steps Transition Logic */
.step-page {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.step-page.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Step 1 Form Styling */
.page-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  color: #274239;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-label .required-star {
  color: var(--secondary);
  margin-right: 2px;
}

.input-wrapper {
  position: relative;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-dark);
  background: #f9fbf9;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  background: #ffffff;
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(118, 154, 110, 0.2);
}

.form-control.is-invalid {
  border-color: var(--danger);
  background: #fff5f5;
}

#serialNumber {
  text-transform: uppercase;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  display: none;
  font-weight: 500;
}

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

/* Global Error Alert Banner */
.alert-box.error {
  background-color: #fff5f5;
  border: 1px solid #f8b4b4;
  color: #9b2c2c;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 22px;
  line-height: 1.6;
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.08);
}

.alert-box.error .error-heading {
  font-weight: 700;
  font-size: 14.5px;
  color: #c53030;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.alert-box.error .error-body {
  color: #2d3748;
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3.5px solid #e53e3e;
  margin-bottom: 8px;
  font-size: 13.5px;
  line-height: 1.7;
}

.alert-box.error .error-body strong {
  color: #1a202c;
}

.alert-box.error .error-note {
  font-size: 13px;
  font-weight: 600;
  color: #742a2a;
  margin-top: 6px;
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
}

/* Primary Button with #274239 */
.btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(39, 66, 57, 0.45);
  transition: all 0.25s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 28px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -4px rgba(39, 66, 57, 0.6);
  background: linear-gradient(135deg, #1b2f28 0%, #152520 100%);
}

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

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Step 2 Success Styling */
.success-banner {
  text-align: center;
  margin-bottom: 24px;
}

.success-icon-box {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #e8f2ea 0%, #d5e6d8 100%);
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
  color: var(--primary);
  box-shadow: 0 0 0 8px rgba(118, 154, 110, 0.2);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(118, 154, 110, 0.35);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(118, 154, 110, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(118, 154, 110, 0);
  }
}

.success-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.success-info-card {
  background: #f6faf7;
  border: 1px dashed var(--secondary);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 13px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.info-row:not(:last-child) {
  border-bottom: 1px solid #e2ece5;
}

.info-label {
  color: var(--text-muted);
}

.info-val {
  font-weight: 700;
  color: var(--text-dark);
}

.instructions-list {
  background: #f0f6f2;
  border-left: 4px solid var(--secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 16px;
  margin-bottom: 24px;
}

.instructions-list p {
  font-size: 13.5px;
  color: #233b32;
  margin-bottom: 10px;
  line-height: 1.5;
}

.instructions-list p:last-child {
  margin-bottom: 0;
}

/* QR Code Section */
.qr-section {
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.qr-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.qr-container {
  display: inline-block;
  padding: 10px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(39, 66, 57, 0.1);
  border: 1px solid #e7efe9;
  margin-bottom: 12px;
}

.qr-img {
  width: 190px;
  height: 190px;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-sm);
}

.qr-caption {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-secondary {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--secondary-light);
  color: var(--primary-dark);
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.footer-credits {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
}
