/* Pacientský portál – vizuál sladěný s veřejným webem SMed Pediatrie */

:root {
  --bg: 250 248 244;
  --surface: 255 255 255;
  --text: 15 23 42;
  --muted: 71 85 105;
  --border: 226 232 240;
  --brand: 13 148 136;
  --brand-dark: 15 118 110;
  --accent: 217 119 6;
  --sky: 2 132 199;
  --rose: 225 29 72;
  --ok: 5 150 105;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --font: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 640px) {
  html {
    font-size: 18px;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  line-height: 1.65;
  letter-spacing: -0.005em;
  color: rgb(var(--text));
  background: rgb(var(--bg));
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.18), transparent 45%),
    radial-gradient(circle at 85% 18%, rgba(236, 72, 153, 0.14), transparent 46%),
    radial-gradient(circle at 55% 95%, rgba(245, 158, 11, 0.12), transparent 48%),
    radial-gradient(circle at 20% 80%, rgba(13, 148, 136, 0.12), transparent 50%);
  filter: blur(18px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0.75)
  );
  mix-blend-mode: soft-light;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::before {
    filter: none;
  }

  .aurora-text {
    animation: none !important;
  }
}

a {
  color: rgb(var(--brand-dark));
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.shell {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, rgb(var(--brand)), rgb(var(--sky)));
  box-shadow: var(--shadow);
}

.brand-text {
  min-width: 0;
  line-height: 1.2;
}

.brand-name {
  font-weight: 650;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 0.8rem;
  color: rgb(var(--muted));
}

.top-link {
  flex-shrink: 0;
  font-size: 0.9rem;
  color: rgb(var(--muted));
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgb(var(--border) / 0.7);
}

.top-link:hover {
  background: #fff;
  color: rgb(var(--text));
}

.panel {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgb(var(--border) / 0.75);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.35rem;
}

@media (min-width: 640px) {
  .panel {
    padding: 2rem;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(var(--brand-dark));
  margin: 0 0 0.65rem;
}

h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.aurora-text {
  background: linear-gradient(90deg, #0d9488, #0284c7, #db2777, #d97706, #0d9488);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: auroraText 10s ease infinite;
}

@keyframes auroraText {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.lede {
  margin: 0 0 1.5rem;
  color: rgb(var(--muted));
  font-size: 1.02rem;
}

.steps {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.steps li {
  flex: 1;
  height: 0.35rem;
  border-radius: 999px;
  background: rgb(var(--border));
}

.steps li[aria-current="step"],
.steps li.is-done {
  background: linear-gradient(90deg, rgb(var(--brand)), rgb(var(--sky)));
}

.step {
  display: none;
}

.step.is-active {
  display: block;
  animation: fadeUp 0.35s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.step-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 650;
}

.step-help {
  margin: 0 0 1.25rem;
  color: rgb(var(--muted));
  font-size: 0.95rem;
}

.type-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .type-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.type-card {
  appearance: none;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgb(var(--border) / 0.9);
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  font: inherit;
  color: inherit;
}

.type-card:hover {
  border-color: rgb(var(--brand) / 0.45);
  box-shadow: var(--shadow);
}

.type-card:focus-visible {
  outline: 2px solid rgb(var(--brand) / 0.55);
  outline-offset: 2px;
}

.type-card.is-selected {
  border-color: rgb(var(--brand));
  box-shadow: 0 0 0 3px rgb(var(--brand) / 0.18);
  transform: translateY(-1px);
}

.type-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  background: rgb(var(--brand) / 0.1);
  color: rgb(var(--brand-dark));
}

.type-card[data-typ="administrativa"] .type-icon {
  background: rgb(var(--sky) / 0.12);
  color: rgb(var(--sky));
}

.type-card[data-typ="dotaz"] .type-icon {
  background: rgb(var(--accent) / 0.12);
  color: rgb(var(--accent));
}

.type-label {
  display: block;
  font-weight: 650;
  margin-bottom: 0.25rem;
}

.type-desc {
  display: block;
  font-size: 0.88rem;
  color: rgb(var(--muted));
  line-height: 1.45;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.field .hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: rgb(var(--muted));
}

.field input,
.field textarea,
.field select {
  width: 100%;
  font: inherit;
  color: inherit;
  border: 1px solid rgb(var(--border));
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0.9rem;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgb(var(--brand) / 0.7);
  box-shadow: 0 0 0 3px rgb(var(--brand) / 0.18);
}

.otp-input {
  letter-spacing: 0.35em;
  font-size: 1.35rem;
  font-weight: 650;
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, rgb(var(--brand)), rgb(var(--sky)));
  box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.28);
}

.btn-secondary {
  color: rgb(var(--text));
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgb(var(--border) / 0.9);
}

.btn-secondary:hover:not(:disabled) {
  background: #fff;
}

.btn-ghost {
  background: transparent;
  color: rgb(var(--muted));
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.btn-ghost:hover:not(:disabled) {
  color: rgb(var(--text));
}

.alert {
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.alert-info {
  background: rgb(var(--accent) / 0.1);
  color: #92400e;
  border: 1px solid rgb(var(--accent) / 0.25);
}

.alert-ok {
  background: rgb(var(--ok) / 0.1);
  color: #065f46;
  border: 1px solid rgb(var(--ok) / 0.25);
}

.alert-error {
  background: rgb(var(--rose) / 0.08);
  color: #9f1239;
  border: 1px solid rgb(var(--rose) / 0.22);
}

.hidden {
  display: none !important;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgb(var(--brand-dark));
  background: rgb(var(--brand) / 0.1);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  margin-bottom: 1rem;
}

.verify-status {
  margin: -0.35rem 0 0.85rem;
  padding: 0.55rem 0.8rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 650;
  background: rgb(5 150 105 / 0.12);
  color: #047857;
  border: 1px solid rgb(5 150 105 / 0.28);
}

.verify-status.is-missing {
  background: rgb(225 29 72 / 0.1);
  color: #be123c;
  border-color: rgb(225 29 72 / 0.25);
}

.success-box {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

.success-code {
  display: inline-block;
  margin: 0.75rem 0 1rem;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgb(var(--brand-dark));
  background: rgb(var(--brand) / 0.1);
  border-radius: var(--radius);
  padding: 0.65rem 1.1rem;
}

.list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.list-item {
  border: 1px solid rgb(var(--border) / 0.85);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.85);
}

.list-item header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: rgb(var(--border) / 0.7);
  color: rgb(var(--muted));
}

.badge-nova { background: rgb(var(--sky) / 0.15); color: rgb(var(--sky)); }
.badge-zpracovava_se { background: rgb(var(--accent) / 0.15); color: #b45309; }
.badge-hotova { background: rgb(var(--ok) / 0.15); color: #047857; }
.badge-zamitnuta { background: rgb(var(--rose) / 0.12); color: #be123c; }

.list-item p {
  margin: 0;
  color: rgb(var(--muted));
  font-size: 0.92rem;
}

.footer-note {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgb(var(--muted));
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-secondary .spinner {
  border-color: rgb(var(--border));
  border-top-color: rgb(var(--brand));
}

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