/* ============================================================
   al-components.css — Shared Design Primitives
   Reusable across all Automation Lab pages.
   Load after al-variables.css, before page-specific CSS.
   ============================================================ */

.al-glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.al-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  border: none;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--cyan);
  color: #07111f;
}

.al-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(94, 240, 166, 0.3);
}

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

.al-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.al-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.al-input-dark {
  width: 100%;
  padding: 14px 18px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  outline: none;
}

.al-input-dark::placeholder {
  color: rgba(174, 187, 208, 0.5);
}

.al-input-dark:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(78, 231, 240, 0.15);
  background: rgba(255, 255, 255, 0.09);
}

.al-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
}

.al-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: al-spin 1s linear infinite;
  margin: 0 auto;
}

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

.al-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: al-pulse 2s ease-in-out infinite;
}

@keyframes al-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.al-msg-error {
  padding: 12px 16px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 12px;
  color: var(--red);
  font-size: 14px;
  margin-bottom: 20px;
}

.al-dark-footer {
  text-align: center;
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
}

.al-dark-footer a {
  color: var(--cyan);
  text-decoration: none;
}

.al-dark-footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   Layout & Typography Utilities
   Spacing scale: 1 unit = 4px
   ============================================================ */

.al-flex-center { display: flex; align-items: center; justify-content: center; }
.al-flex-col { flex-direction: column; }
.al-w-full { width: 100%; }
.al-max-w-sm { max-width: 420px; }
.al-max-w-md { max-width: 480px; }
.al-text-center { text-align: center; }

.al-text-muted { color: var(--muted); }
.al-text-sm { font-size: 14px; }
.al-text-base { font-size: 15px; }
.al-text-lg { font-size: 16px; }
.al-text-xl { font-size: 20px; }
.al-text-2xl { font-size: 24px; }
.al-text-3xl { font-size: 30px; }
.al-text-4xl { font-size: 36px; }
.al-font-bold { font-weight: 700; }
.al-font-extrabold { font-weight: 800; }

.al-p-4 { padding: 16px; }
.al-p-5 { padding: 20px; }
.al-p-6 { padding: 24px; }
.al-p-8 { padding: 32px; }
.al-p-10 { padding: 40px; }
.al-p-12 { padding: 48px; }

.al-px-8 { padding-left: 32px; padding-right: 32px; }
.al-px-10 { padding-left: 40px; padding-right: 40px; }

.al-mb-2 { margin-bottom: 8px; }
.al-mb-3 { margin-bottom: 12px; }
.al-mb-4 { margin-bottom: 16px; }
.al-mb-5 { margin-bottom: 20px; }
.al-mb-6 { margin-bottom: 24px; }
.al-mb-8 { margin-bottom: 32px; }
.al-mt-2 { margin-top: 8px; }
.al-mt-8 { margin-top: 32px; }

.al-gap-4 { gap: 16px; }

/* ============================================================
   Centered Card Wrapper
   Shared across all pages extending layouts.app
   ============================================================ */

.al-glass-card-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 36px 0 72px;
  width: calc(100% - 40px);
}

@media (max-width: 760px) {
  .al-glass-card-wrapper {
    max-width: 100%;
    padding: 24px 0 48px;
  }
}