/* ========================================================================
   Loděnice VK LS Brno — global stylesheet
   Klubová paleta: bílá / červená / černý text
   ======================================================================== */

:root {
  /* Brand */
  --red:        #c8102e;
  --red-deep:   #9b0c23;
  --red-light:  #e63950;
  --red-bg:     #fdeaed;

  /* Neutral */
  --bg:         #fafafa;
  --surface:    #ffffff;
  --surface-2:  #f7f7f7;
  --surface-3:  #efefef;
  --ink:        #0a0a0a;
  --ink-soft:   #2a2a2a;
  --muted:      #707070;
  --line:       #e5e5e5;
  --line-soft:  #f0f0f0;

  /* Status */
  --water:      #1e6dad;
  --water-bg:   #e8f1fa;
  --green:      #15803d;
  --green-bg:   #e7f5ed;
  --warn:       #b45309;
  --warn-bg:    #fdf3e1;
  --danger:     #b91c1c;
  --danger-bg:  #fee2e2;

  /* Shadows */
  --shadow:     0 1px 2px rgba(0,0,0,.04), 0 4px 12px -6px rgba(0,0,0,.08);
  --shadow-pop: 0 1px 3px rgba(0,0,0,.06), 0 24px 60px -20px rgba(0,0,0,.20);

  /* Radii */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

/* ========================== TOPBAR ============================== */

.topbar {
  background: #0a0a0a;
  color: #fff;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid var(--red);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  width: 42px; height: 42px;
  background: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-logo .fallback {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  color: var(--red);
  font-size: 13px;
}
.brand-text .name {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand-text .sub {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.topbar-right { display: flex; align-items: center; gap: 18px; }
.admin-tag {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  background: var(--red);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.user-mini { display: flex; align-items: center; gap: 10px; color: #fff; }
.user-mini .av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: grid; place-items: center;
}
.user-mini .nm { font-size: 13px; font-weight: 500; }
.user-mini .rl { font-size: 11px; color: rgba(255,255,255,.55); }
.user-mini form { margin: 0; }
.logout-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.logout-btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }

/* ========================== NAV ============================== */

.nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}
.nav a {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--red); }
.nav a.active {
  color: var(--ink);
  border-bottom-color: var(--red);
  font-weight: 600;
}

/* ========================== LAYOUT ============================== */

.main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 32px;
  margin: 0;
  line-height: 1.1;
}
.page-head h1 em { font-style: italic; color: var(--red); }
.page-head .sub {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
}

/* ========================== STAT CARDS ============================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  position: relative;
}
.stat-card.accent {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.stat-card.accent .v { color: #fff; }
.stat-card.accent .l { color: rgba(255,255,255,.55); }
.stat-card.accent .accent-bar {
  position: absolute;
  top: 0; left: 20px; right: 20px;
  height: 3px;
  background: var(--red);
}
.stat-card .l {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
  font-weight: 500;
}
.stat-card .v {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-card .v-unit {
  font-size: 13px;
  color: var(--muted);
  margin-left: 4px;
  font-family: 'Manrope', sans-serif;
}
.stat-card.accent .v-unit { color: rgba(255,255,255,.55); }
.stat-card .v-trend {
  margin-top: 8px;
  font-size: 12px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  color: var(--green);
}

/* ========================== PANELS ============================== */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 22px;
}
.panel-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  margin: 0;
}
.panel-head .meta {
  font-size: 12px;
  color: var(--muted);
  font-family: 'Geist Mono', ui-monospace, monospace;
}
.panel-body { padding: 18px 22px; }
.panel-body--flush { padding: 0; }

/* ========================== TABLES ============================== */

.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  padding: 10px 22px;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.data-table td {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.data-table tr:hover td { background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }

.mono {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
}
.code-pill {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  background: var(--ink);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
}
.badge.green  { background: var(--green-bg); color: var(--green); }
.badge.water  { background: var(--water-bg); color: var(--water); }
.badge.warn   { background: var(--warn-bg);  color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.muted  { background: var(--surface-3); color: var(--muted); }

/* ========================== BUTTONS ============================== */

.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red-deep);
  box-shadow: 0 4px 12px -4px rgba(200,16,46,.4);
}
.btn-primary:hover {
  background: var(--red-light);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--ink-soft);
  text-decoration: none;
}
.btn-dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-dark:hover { background: var(--ink-soft); color: #fff; text-decoration: none; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled {
  background: var(--surface-3);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ========================== FORMS ============================== */

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,.12);
}
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--danger);
}
.form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.form-checkbox input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--red);
}
.form-help {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

/* ========================== ALERTS / FLASH ============================== */

.alerts { margin-bottom: 18px; }
.alert {
  padding: 12px 16px;
  border-radius: var(--r);
  margin-bottom: 8px;
  font-size: 14px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert.success { background: var(--green-bg); color: var(--green); border-color: rgba(21,128,61,.2); }
.alert.info    { background: var(--water-bg); color: var(--water); border-color: rgba(30,109,173,.2); }
.alert.warning { background: var(--warn-bg);  color: var(--warn);  border-color: rgba(180,83,9,.2); }
.alert.danger  { background: var(--danger-bg); color: var(--danger); border-color: rgba(185,28,28,.2); }

/* ========================== AUTH LAYOUT ============================== */

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(700px 500px at 100% 0%, rgba(200,16,46,.06), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(0,0,0,.04), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: 32px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}
.auth-brand .brand-logo {
  width: 48px; height: 48px;
  border: 2px solid var(--red);
}
.auth-brand .brand-text .name {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
}
.auth-brand .brand-text .sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.auth-card h1 {
  font-size: 28px;
  margin-bottom: 4px;
}
.auth-card h1 em { font-style: italic; color: var(--red); }
.auth-card .lede {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ========================== KIOSEK LAYOUT ============================== */

.kiosek-shell {
  min-height: 100vh;
  background:
    radial-gradient(800px 500px at 100% 0%, rgba(200,16,46,.04), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(0,0,0,.03), transparent 60%),
    var(--bg);
  display: flex;
  flex-direction: column;
}
.kiosek-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  text-align: center;
}
.kiosek-main h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 56px;
  letter-spacing: -0.02em;
}
.kiosek-main h1 em { font-style: italic; color: var(--red); }
.nfc-circle {
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 2px dashed rgba(200,16,46,.30);
  display: grid; place-items: center;
  position: relative;
  color: var(--red);
  margin: 0 auto 32px;
}
.nfc-circle::before, .nfc-circle::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid var(--red);
  opacity: 0;
  animation: pulse 2.4s ease-out infinite;
}
.nfc-circle::after { animation-delay: 1.2s; }
@keyframes pulse {
  0%   { transform: scale(.85); opacity: .8; }
  100% { transform: scale(1.4);  opacity: 0; }
}
.nfc-circle svg { width: 96px; height: 96px; }

/* ========================== ERROR PAGES ============================== */

.error-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  text-align: center;
}
.error-card {
  max-width: 480px;
}
.error-code {
  font-family: 'Fraunces', serif;
  font-size: 110px;
  line-height: 1;
  color: var(--red);
  font-weight: 400;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.error-title {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  margin-bottom: 12px;
}
.error-text {
  color: var(--muted);
  margin-bottom: 28px;
}

/* ========================== UTILS ============================== */

.text-muted { color: var(--muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-12 { gap: 12px; }

/* ========================================================================
   KIOSEK WORKFLOW
   ======================================================================== */

.kiosek-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 18px;
}

.kiosek-stage {
  flex: 1;
  position: relative;
}

.kiosek-screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 40px 32px;
  overflow-y: auto;
}
.kiosek-screen.active { display: flex; }

/* --- IDLE --- */

#screen-idle .kiosek-screen-inner,
#screen-pin .kiosek-screen-inner,
#screen-welcome .kiosek-screen-inner,
#screen-success .kiosek-screen-inner,
#screen-return .kiosek-screen-inner,
#screen-return-done .kiosek-screen-inner,
#screen-error .kiosek-screen-inner {
  margin: auto;
  text-align: center;
  max-width: 720px;
}

/* Service report - centrované ale bez text-align (textarea a klávesnice mají vlastní) */
#screen-return-service {
  align-items: center;
  justify-content: center;
}
#screen-return-service .kiosek-screen-inner {
  margin: auto;
  max-width: 720px;
  width: 100%;
}
#screen-return-service .kiosek-h1,
#screen-return-service .kiosek-lede {
  text-align: center;
}

/* Hidden input pro NFC čtečku — neviditelný ale focusable */
.nfc-hidden-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px; height: 1px;
}

.kiosek-h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 56px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
}
.kiosek-h1 em { font-style: italic; color: var(--red); }

.kiosek-lede {
  font-size: 22px;
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 50ch;
}

.btn-kiosek {
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  padding: 22px 48px;
  border-radius: var(--r-lg);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 12px;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  min-height: 72px;
  min-width: 200px;
  justify-content: center;
}
.btn-kiosek:active { transform: scale(0.98); }
.btn-kiosek-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red-deep);
  box-shadow: 0 8px 24px -8px rgba(200,16,46,.45);
}
.btn-kiosek-primary:hover { background: var(--red-light); }
.btn-kiosek-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-kiosek-secondary:hover { background: var(--surface-2); }
.btn-kiosek-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  font-size: 18px;
  padding: 14px 24px;
}
.btn-kiosek-ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn-kiosek-danger {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: rgba(180,83,9,.3);
}

.kiosek-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* --- PIN keypad --- */

#pin-display {
  font-family: 'Geist Mono', monospace;
  font-size: 64px;
  letter-spacing: 0.2em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 32px;
  margin: 0 auto 28px;
  display: inline-block;
  min-width: 280px;
}

#pin-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

.pin-key {
  font-family: inherit;
  font-size: 32px;
  font-weight: 500;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  color: var(--ink);
  transition: background 0.1s ease;
  min-height: 80px;
}
.pin-key:active { background: var(--surface-3); }
.pin-key:hover { background: var(--surface-2); }
.pin-key-ok {
  background: var(--red);
  color: #fff;
  border-color: var(--red-deep);
}
.pin-key-ok:active { background: var(--red-deep); }
.pin-key-clear {
  background: var(--surface-2);
  color: var(--muted);
}

/* --- Výběr lodi --- */

#screen-boats {
  padding: 16px 24px 0;
  overflow: hidden;
}
#screen-boats.active {
  display: flex;
  flex-direction: column;
}
#screen-boats h2 {
  flex-shrink: 0;
}
.boat-filters {
  flex-shrink: 0;
}
.boat-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.boat-filter-btn {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  cursor: pointer;
  color: var(--ink-soft);
}
.boat-filter-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.boat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 12px;
  padding-right: 6px;
}

.boat-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 18px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.boat-card:hover { border-color: var(--red); transform: translateY(-2px); }
.boat-card:active { transform: translateY(0); }
.boat-card-code {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  color: #fff;
  background: var(--ink);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 12px;
}
.boat-card-name {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 4px;
}
.boat-card-meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}
.boat-card-seats {
  font-size: 13px;
  color: var(--muted);
  font-family: 'Geist Mono', monospace;
}

/* --- Posádka --- */

#screen-crew {
  padding: 24px 32px;
}
.crew-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 22px;
}
.crew-row {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
}
.crew-row:last-child { border-bottom: none; }
.crew-empty {
  color: var(--muted);
  font-style: italic;
  background: var(--surface-2);
}
.crew-remove {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--danger);
  padding: 6px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.crew-remove:hover { background: var(--danger-bg); }

#crew-search {
  width: 100%;
  font-size: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-family: inherit;
  margin-bottom: 12px;
}
#crew-search:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,.12);
}

#crew-search-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.search-result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
}
.search-result:hover { background: var(--red-bg); border-color: var(--red); }

.empty-message {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

/* --- Potvrzení --- */

#screen-confirm .kiosek-screen-inner {
  max-width: 640px;
  margin: 40px auto;
}
.confirm-boat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}
.confirm-boat strong {
  font-family: 'Geist Mono', monospace;
  font-size: 18px;
  background: var(--ink);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  margin-right: 12px;
}
.confirm-crew {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

/* --- Success --- */

.success-icon {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green);
  font-size: 60px;
  display: grid; place-items: center;
  margin: 0 auto 24px;
}

/* --- Sticky bottom bar pro back/continue --- */

.kiosek-bottom {
  padding: 10px 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  min-height: 0;
}
.kiosek-bottom .btn-kiosek-ghost {
  font-size: 15px;
  padding: 8px 16px;
  min-height: 0;
  min-width: 0;
}

/* --- Crew screen - floating hint --- */

.crew-hint {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--ink);
  color: #fff;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 18px;
  font-weight: 500;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}
.crew-hint.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Volné místo jako velké klikací tlačítko --- */

.crew-empty-btn {
  font-family: inherit;
  background: var(--surface-2);
  border: 2px dashed var(--line);
  cursor: pointer;
  text-align: center;
  width: 100%;
  color: var(--muted);
  font-style: italic;
  transition: background 0.1s ease, border-color 0.15s ease;
}
.crew-empty-btn:hover {
  border-color: var(--red);
  color: var(--ink);
  background: var(--red-bg);
}

/* --- Search panel (overlay) --- */

.crew-search-panel {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  padding: 20px 16px;
}
.crew-search-panel.show {
  display: flex;
}
.crew-search-panel-inner {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  width: 100%;
  max-width: 700px;
  max-height: calc(100vh - 40px);
  height: calc(100vh - 40px);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.4);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.crew-search-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 auto;
}
.crew-search-panel-inner #crew-search {
  flex: 0 0 auto;
  margin-bottom: 0;
}
#crew-search-results {
  flex: 1 1 auto;
  min-height: 100px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
}
.crew-search-panel-inner #crew-keyboard {
  flex: 0 0 auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
#crew-search-results:empty::before {
  content: "Začni psát jméno nebo příjmení (alespoň 2 znaky)…";
  display: block;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}
#crew-search-results .search-result {
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}
#crew-search-results .search-result:last-child { border-bottom: none; }

/* --- On-screen klávesnice (fixní pozice dole v panelu) --- */

.crew-keyboard {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.kb-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.kb-key {
  font-family: inherit;
  font-size: 20px;
  font-weight: 500;
  min-width: 44px;
  min-height: 52px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--ink);
  transition: background 0.1s ease;
  flex: 1 1 auto;
  max-width: 60px;
}
.kb-key:active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.kb-key:hover { background: var(--surface-3); }
.kb-key-wide { min-width: 110px; max-width: 140px; font-size: 14px; }
.kb-key-space { min-width: 200px; max-width: 280px; font-size: 14px; }

/* Mobil / menší tablety */
@media (max-width: 700px) {
  .kb-key { min-width: 32px; min-height: 44px; padding: 6px 8px; font-size: 16px; }
  .kb-key-wide { min-width: 80px; }
  .kb-key-space { min-width: 120px; }
}

/* --- Loading overlay (přes celou obrazovku) --- */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  z-index: 9999;
  animation: lo-fade-in 0.15s ease;
}
.loading-overlay.show {
  display: flex;
}
@keyframes lo-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading-spinner {
  width: 64px;
  height: 64px;
  border: 5px solid var(--surface-2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: lo-spin 0.8s linear infinite;
}
@keyframes lo-spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

/* --- Long-press popup pro diakritiku --- */

.kb-key.has-variants {
  position: relative;
}
.kb-key.has-variants::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 4px;
  height: 4px;
  background: var(--red);
  border-radius: 50%;
  opacity: 0.6;
}

.kb-popup {
  position: fixed;
  background: var(--ink);
  border-radius: var(--r);
  padding: 6px;
  display: flex;
  gap: 4px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.5);
  z-index: 10000;
  animation: kb-popup-in 0.1s ease;
}
@keyframes kb-popup-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.kb-popup-key {
  min-width: 56px;
  min-height: 60px;
  padding: 10px 14px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 28px;
  font-weight: 500;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.1s ease, transform 0.1s ease;
}
.kb-popup-key.selected {
  background: var(--red);
  transform: scale(1.05);
}

/* --- Boat card v servisu (kiosek) --- */

.boat-card-disabled {
  opacity: 0.55;
  filter: grayscale(0.6);
  cursor: not-allowed;
  position: relative;
  pointer-events: auto;
  background: var(--surface-2);
}
.boat-card-disabled:hover,
.boat-card-disabled:active,
.boat-card-disabled:focus {
  transform: none !important;
  box-shadow: none !important;
}
.boat-card-service-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--warn);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  letter-spacing: 0.02em;
}
.boat-card-service-reason {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Login - velké logo nahoře --- */

.auth-brand-large {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.auth-logo {
  max-width: 180px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ============================================================
   KIOSEK RESPONSIVE — laptop a menší obrazovky
   ============================================================ */

/* Laptop (do 1280px šířky) - mírné zmenšení */
@media (max-width: 1280px) {
  .kiosek-h1 { font-size: 48px; }
  .kiosek-lede { font-size: 20px; margin-bottom: 22px; }
  .kiosek-screen { padding: 32px 28px; }

  /* PIN keypad zmenšit */
  #pin-display { font-size: 52px; padding: 18px 28px; margin-bottom: 20px; min-width: 240px; }
  #pin-keys { max-width: 360px; gap: 10px; }
  .pin-key { font-size: 28px; padding: 18px; min-height: 64px; }

  /* Kiosek tlačítka menší */
  .btn-kiosek { font-size: 19px; padding: 18px 36px; min-height: 60px; min-width: 170px; }
  .btn-kiosek-ghost { font-size: 16px; padding: 12px 20px; }

  /* Lodě - menší karty */
  .boat-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
  .boat-card { padding: 16px 14px; }
  .boat-card-name { font-size: 18px; }

  /* On-screen klávesnice menší */
  .kb-key { min-width: 44px; min-height: 50px; font-size: 18px; }
  .kb-key-wide { min-width: 110px; }
  .kb-key-space { min-width: 200px; }
}

/* Notebook / menší laptop (do 1024px) - výraznější zmenšení */
@media (max-width: 1024px) {
  .kiosek-h1 { font-size: 40px; margin-bottom: 12px; }
  .kiosek-lede { font-size: 18px; margin-bottom: 18px; }
  .kiosek-screen { padding: 24px 20px; }

  /* PIN keypad ještě menší */
  #pin-display { font-size: 42px; padding: 14px 22px; margin-bottom: 16px; letter-spacing: 0.18em; min-width: 200px; }
  #pin-keys { max-width: 300px; gap: 8px; }
  .pin-key { font-size: 24px; padding: 14px; min-height: 54px; }

  .btn-kiosek { font-size: 17px; padding: 14px 28px; min-height: 52px; min-width: 150px; }
  .btn-kiosek-ghost { font-size: 15px; padding: 10px 16px; }

  .boat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .boat-card { padding: 14px 12px; }
  .boat-card-code { font-size: 12px; padding: 3px 8px; margin-bottom: 8px; }
  .boat-card-name { font-size: 16px; }
  .boat-card-meta { font-size: 12px; margin-bottom: 6px; }
  .boat-card-seats { font-size: 12px; }

  /* Service report textarea menší */
  #screen-return-service textarea { font-size: 16px; padding: 10px; }

  /* On-screen klávesnice ještě menší */
  .kb-key { min-width: 38px; min-height: 42px; font-size: 16px; padding: 4px; }
  .kb-key-wide { min-width: 90px; }
  .kb-key-space { min-width: 160px; }
  .kb-row { gap: 4px; }
}

/* Velmi malé (do 700px) - nejmenší elementy */
@media (max-width: 700px) {
  .kiosek-h1 { font-size: 32px; }
  .kiosek-lede { font-size: 16px; }
  .kiosek-screen { padding: 16px 12px; }

  #pin-display { font-size: 34px; padding: 12px 18px; min-width: 180px; }
  #pin-keys { max-width: 260px; }
  .pin-key { font-size: 22px; padding: 10px; min-height: 48px; }

  .btn-kiosek { font-size: 15px; padding: 12px 22px; min-height: 46px; min-width: 130px; }

  .boat-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  .kb-key { min-width: 32px; min-height: 38px; font-size: 14px; }
  .kb-key-wide { min-width: 75px; }
  .kb-key-space { min-width: 120px; }

  /* Long-press popup menší */
  .kb-popup-key { min-width: 44px; min-height: 50px; font-size: 22px; padding: 6px 10px; }
}

/* Nízká výška (laptop 768px nebo méně) - méně paddingu */
@media (max-height: 800px) {
  .kiosek-screen { padding: 16px 28px; }
  .kiosek-h1 { font-size: 40px; margin-bottom: 8px; }
  .kiosek-lede { margin-bottom: 14px; }
  #pin-display { margin-bottom: 14px; padding: 12px 22px; }
  #pin-keys { gap: 8px; }
  .pin-key { padding: 12px; min-height: 50px; }
  .kiosek-actions { margin-top: 4px; }
  .kb-key { min-height: 40px; }
}
