/* =====================================================
   boarding.intranet — Warm & Welcoming design system
   ===================================================== */

/* Google Fonts — Plus Jakarta Sans */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* --- Tokeny --- */
:root {
  --brand:        #f97316;
  --brand-dark:   #ea6c0a;
  --brand-light:  #fff7ed;
  --brand-ring:   rgba(249,115,22,.25);

  --bg:           #fafaf9;
  --surface:      #ffffff;
  --border:       #e7e5e4;
  --border-focus: #f97316;

  --text-base:    #1c1917;
  --text-muted:   #78716c;
  --text-subtle:  #a8a29e;

  --success:      #16a34a;
  --success-bg:   #f0fdf4;
  --error:        #dc2626;
  --error-bg:     #fef2f2;
  --info:         #2563eb;
  --info-bg:      #eff6ff;

  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    16px;

  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 16px rgba(0,0,0,.07), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-base);
  background: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* --- Typografie --- */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-base);
  margin: 0 0 .5rem;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
a:hover { color: var(--brand-dark); text-decoration: underline; }

/* --- Karta --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2.25rem 2.5rem;
}

@media (max-width: 480px) {
  .card { padding: 1.75rem 1.5rem; border-radius: var(--radius); }
}

/* --- Formulář --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  margin-bottom: 1.125rem;
}

label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-base);
}

input[type="email"],
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: .625rem .875rem;
  font-family: inherit;
  font-size: .9375rem;
  color: var(--text-base);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

input::placeholder { color: var(--text-subtle); }

/* OTP input — větší, čitelnější */
input.otp-input {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .5rem;
  text-align: center;
  padding: .75rem 1rem;
}

/* --- Tlačítka --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6875rem 1.25rem;
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  text-decoration: none;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 3px rgba(249,115,22,.3);
  width: 100%;
}
.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(249,115,22,.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-size: .875rem;
  padding: .375rem .5rem;
}
.btn-ghost:hover { color: var(--text-base); text-decoration: none; }

/* --- Alerty / flash messages --- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.alert-error   { background: var(--error-bg);   color: var(--error);   border: 1px solid #fca5a5; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #86efac; }
.alert-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid #93c5fd; }

/* Nette form errors */
.error {
  font-size: .8125rem;
  color: var(--error);
  font-weight: 500;
  margin-top: .25rem;
}

input.error-input,
input:invalid:not(:placeholder-shown) {
  border-color: var(--error);
}

/* --- Stránka přihlášení — centrovaná karta --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon {
  width: 52px;
  height: 52px;
  background: var(--brand-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.auth-header h1 { font-size: 1.375rem; }
.auth-header p  { color: var(--text-muted); font-size: .9375rem; margin-top: .375rem; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* --- Progress bar wizardu --- */
.wizard-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
}

.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.wizard-step.done:not(:last-child)::after,
.wizard-step.active:not(:last-child)::after {
  background: var(--brand);
}

.wizard-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: all .2s;
}

.wizard-step.done .wizard-dot {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.wizard-step.active .wizard-dot {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 4px var(--brand-ring);
}

.wizard-label {
  font-size: .6875rem;
  font-weight: 600;
  color: var(--text-subtle);
  margin-top: .375rem;
  text-align: center;
  line-height: 1.2;
}

.wizard-step.active .wizard-label,
.wizard-step.done .wizard-label {
  color: var(--brand-dark);
}

/* --- Wizard layout --- */
.wizard-page {
  min-height: 100vh;
  padding: 2rem 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.wizard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem 2.5rem 2.5rem;
}

@media (max-width: 600px) {
  .wizard-card { padding: 1.5rem 1.25rem; }
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* --- Sekce formuláře --- */
.field-section {
  margin-bottom: 1.75rem;
}

.field-section-title {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-subtle);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

/* --- Prefilled badge (Abra) --- */
.prefilled-field {
  position: relative;
}

.prefilled-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid rgba(249,115,22,.2);
  border-radius: 20px;
  padding: .125rem .5rem;
  margin-left: .5rem;
}

/* --- Checkbox / radio --- */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 5px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* --- Shrnutí (krok 6) --- */
.summary-section {
  margin-bottom: 1.5rem;
}

.summary-title {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-subtle);
  margin-bottom: .75rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem 1.5rem;
}

.summary-item label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.summary-item span {
  display: block;
  font-weight: 600;
  color: var(--text-base);
}

/* --- Site header --- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  text-decoration: none;
  color: var(--text-base);
  font-weight: 700;
  font-size: 1rem;
}

.site-header__logo:hover {
  text-decoration: none;
  color: var(--brand);
}

.site-header__logo-mark {
  width: 36px;
  height: 36px;
  background: var(--brand-light);
  border: 1.5px solid rgba(249,115,22,.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}

.site-header__logo-text {
  color: var(--text-base);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.site-header__logout {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: .375rem .75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all .15s;
}

.site-header__logout:hover {
  color: var(--error);
  background: var(--error-bg);
  border-color: rgba(220,38,38,.15);
  text-decoration: none;
}

@media (max-width: 480px) {
  .site-header__logout span { display: none; }
  .site-header__inner { padding: 0 1rem; }
}

/* adjust wizard page to not be full-height (header takes space) */
.wizard-page { min-height: calc(100vh - 56px); }

/* --- Home stránka --- */
.home-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.home-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 3rem 3.5rem;
  max-width: 560px;
  width: 100%;
  text-align: center;
}

@media (max-width: 600px) {
  .home-card { padding: 2rem 1.5rem; }
}

.home-icon {
  width: 72px;
  height: 72px;
  background: var(--brand-light);
  border: 1.5px solid rgba(249,115,22,.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin: 0 auto 1.5rem;
}

.home-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.home-text {
  color: var(--text-muted);
  font-size: .9375rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
  text-align: left;
}

.home-checklist {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 2rem;
  text-align: left;
}

.home-check-item {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  font-size: .9rem;
  color: var(--text-base);
  line-height: 1.4;
}

.home-check-item svg {
  flex-shrink: 0;
  margin-top: .1rem;
}

.home-progress {
  margin-bottom: 2rem;
  text-align: left;
}

.home-progress-bar {
  display: flex;
  gap: .375rem;
  margin-bottom: .875rem;
  flex-wrap: wrap;
}

.home-progress-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 600;
  border: 2px solid var(--border);
  color: var(--text-muted);
  background: var(--bg);
  flex-shrink: 0;
}

.home-progress-step.done {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.home-progress-step.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

.home-progress-label {
  font-size: .875rem;
  color: var(--text-muted);
  margin: 0;
}

.btn-lg {
  padding: .875rem 2rem;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}

/* =====================================================
   Admin rozhraní
   ===================================================== */

.admin-body { background: #f4f4f5; }

/* Header */
.admin-header {
  background: var(--text-base);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.admin-header__logo {
  display: flex;
  align-items: center;
  gap: .625rem;
  color: #fff;
  text-decoration: none;
  font-size: .9375rem;
  flex-shrink: 0;
}
.admin-header__logo:hover { color: var(--brand); text-decoration: none; }
.admin-header__logo strong { color: var(--brand); }

.admin-header__nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1;
}

.admin-nav-link {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  padding: .375rem .75rem;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.admin-nav-link:hover { color: #fff; background: rgba(255,255,255,.1); text-decoration: none; }

.admin-header__user {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}

.admin-header__name {
  font-size: .875rem;
  color: rgba(255,255,255,.7);
}

.admin-header__logout {
  color: rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  transition: color .15s;
}
.admin-header__logout:hover { color: var(--brand); }

/* Layout */
.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.admin-page-header h1 {
  font-size: 1.5rem;
  margin: 0;
}

/* Karty */
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
}

.admin-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .8125rem;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

/* Statistiky */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 2rem;
  text-align: center;
}

.admin-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  margin-bottom: .375rem;
}

.admin-stat-card--success .admin-stat-value { color: var(--success); }
.admin-stat-card--muted   .admin-stat-value { color: var(--text-muted); }

.admin-stat-label {
  font-size: .875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Rychlé akce */
.admin-section { margin-bottom: 1.5rem; }
.admin-section-header { margin-bottom: 1rem; }
.admin-section-header h2 { font-size: 1rem; margin: 0; }

.admin-quick-actions {
  display: flex;
  gap: 1rem;
}

.admin-action-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--text-base);
  text-decoration: none;
  font-weight: 500;
  font-size: .9375rem;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
}
.admin-action-card:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.admin-action-card svg { color: var(--brand); }

/* Tabulka */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.admin-table th {
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #fafaf9;
}

.admin-table th:first-child { border-radius: var(--radius-lg) 0 0 0; }
.admin-table th:last-child  { border-radius: 0 var(--radius-lg) 0 0; }

.admin-table td {
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafaf9; }

.admin-table__id { color: var(--text-subtle); font-size: .8125rem; }

/* Stav */
.admin-status {
  display: inline-flex;
  align-items: center;
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 20px;
}

.admin-status--success {
  background: var(--success-bg);
  color: var(--success);
}

.admin-status--draft {
  background: var(--brand-light);
  color: var(--brand-dark);
}

/* Badge */
.admin-badge {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--border);
  padding: .25rem .75rem;
  border-radius: 20px;
  align-self: center;
}

/* Detail grid */
.admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .875rem 2rem;
}

.admin-detail-item label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .2rem;
  text-transform: none;
  letter-spacing: 0;
}

.admin-detail-item span {
  font-size: .9375rem;
  color: var(--text-base);
  font-weight: 500;
}

.admin-detail-item--full { grid-column: 1 / -1; }

/* Pomocné */
.btn-sm { font-size: .8125rem; padding: .25rem .625rem; }
.text-muted { color: var(--text-muted); }

/* Spinner animace */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; transform-origin: center; transform-box: fill-box; }
