/* EPU Check-in — modern, responsive, accessible */

:root {
  /* Flyer-inspired palette (mint + medical blue) */
  --bg: #e7f6f2;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-2: rgba(255, 255, 255, 0.86);
  --text: rgba(11, 16, 32, 0.92);
  --muted: rgba(11, 16, 32, 0.66);
  --border: rgba(11, 16, 32, 0.12);
  --shadow: 0 18px 50px rgba(11, 16, 32, 0.1);

  --brand-600: #1d4ed8;
  --brand-500: #2563eb;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;

  --radius: 18px;
  --radius-sm: 12px;
  --container: 980px;
  --focus: 0 0 0 4px rgba(37, 99, 235, 0.22);
}

[data-theme="dark"] {
  --bg: #071224;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.1);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --focus: 0 0 0 4px rgba(37, 99, 235, 0.28);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    "Plus Jakarta Sans",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 520px at 20% 10%, rgba(37, 99, 235, 0.18), transparent 55%),
    radial-gradient(820px 520px at 80% 18%, rgba(20, 184, 166, 0.18), transparent 55%),
    radial-gradient(900px 600px at 50% 100%, rgba(37, 99, 235, 0.1), transparent 60%),
    var(--bg);
  letter-spacing: -0.01em;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 10px 12px;
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  border: 1px solid var(--border);
  transform: translateY(-180%);
  transition: transform 180ms ease;
  text-decoration: none;
  z-index: 10;
}
.skip-link:focus {
  transform: translateY(0);
  outline: none;
  box-shadow: var(--focus);
}

.app-shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.header {
  width: min(var(--container), calc(100% - 32px));
  margin: 22px auto 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.brand__title {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.brand__subtitle {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}
.icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
}
.icon-btn:active {
  transform: translateY(0);
}
.icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.icon-btn__label {
  font-weight: 600;
  font-size: 14px;
}

.main {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto 24px;
  display: grid;
  gap: 14px;
}

.card {
  background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(10px);
  animation: rise 500ms ease both;
}

.card--hero {
  padding: 20px;
}

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

.h1 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3.2vw, 30px);
  letter-spacing: -0.03em;
}

.h1--compact {
  margin-bottom: 14px;
}

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

.meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.meta {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.meta__label {
  font-size: 12px;
  color: var(--muted);
}
.meta__value {
  margin-top: 6px;
  font-weight: 700;
  font-size: 15px;
}

.alert-host {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  animation: slide 250ms ease both;
}

@keyframes slide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert--success {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
}
.alert--error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
}
.alert--warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
}

.alert__title {
  font-weight: 700;
  margin: 0 0 2px;
  font-size: 14px;
}
.alert__message {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.alert__close {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 180ms ease;
}
.alert__close:hover {
  background: rgba(255, 255, 255, 0.1);
}
.alert__close:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 12px 12px;
  font-size: 15px;
  outline: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

[data-theme="light"] .input::placeholder {
  color: rgba(14, 21, 45, 0.38);
}

.input:focus {
  border-color: rgba(124, 58, 237, 0.65);
  box-shadow: var(--focus);
  background: rgba(255, 255, 255, 0.08);
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.help {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.error {
  margin: 0;
  min-height: 16px;
  font-size: 12px;
  color: rgba(239, 68, 68, 0.95);
}

.field--invalid .input {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.06);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
}
.btn:active {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.btn--primary {
  border-color: rgba(29, 78, 216, 0.55);
  background: var(--brand-600);
  color: rgba(255, 255, 255, 0.96);
}
.btn--primary:hover {
  background: #1e40af;
  border-color: rgba(30, 64, 175, 0.65);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
}

.btn__spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: rgba(255, 255, 255, 0.92);
  display: none;
  animation: spin 900ms linear infinite;
}

.btn.is-loading .btn__spinner {
  display: inline-block;
}
.btn.is-loading .btn__text {
  opacity: 0.95;
}

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

.fineprint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.footer {
  text-align: center;
  padding: 6px 2px 2px;
}
.footer__text {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.logo-strip {
  width: min(var(--container), calc(100% - 32px));
  margin: 10px auto 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  overflow-x: auto;
}

.logo-strip img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: saturate(1.05);
  opacity: 0.92;
}

.logo-strip__hint {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.sep {
  margin: 0 6px;
  opacity: 0.65;
}

@media (min-width: 820px) {
  .main {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    padding: 22px;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 14px;
  }

  .actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .btn--primary {
    min-width: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

