/* ============================================================
   admin SPA — "ordinační štítek" look
   ============================================================
   The panel reads as the back office of the doctor's own site:
   it inherits the site's theme palette + display font (the
   integration stamps data-theme and the Google Fonts link into
   admin/index.html at build time), and derives its neutrals from
   the theme primary via color-mix, so every doctor's panel is
   faintly tinted their own colour. The signature element is the
   door-nameplate ("štítek") masthead: an enamel band in the
   theme primary with an engraved keyline.

   The [data-theme] blocks below are the admin-relevant subset of
   the template's themes.css — keep the token values in sync with
   templates/lysa/src/styles/themes.css.
   ============================================================ */

:root {
  /* ---- neutrals (lysa tokens.css) ---- */
  --color-bg:         #f7fafc;
  --color-surface:    #ffffff;
  --color-text:       #13233d;
  --color-text-muted: #5e6878;
  --color-border:     #dde2eb;
  --color-muted:      #eef1f5;

  /* ---- theme tokens — default = klinicka-modr ---- */
  --color-primary:      #1f4e87;
  --color-primary-600:  #2563a8;
  --color-primary-500:  #3b7dc4;
  --color-primary-100:  #dbe9f7;
  --color-primary-soft: rgba(31, 78, 135, 0.10);
  --color-accent:       #15803d;
  --color-accent-bg:    #d5f7e6;
  --font-display:       'Outfit', var(--font-sans);

  /* ---- semantic ---- */
  --color-danger:         #b3403a;
  --color-danger-bg:      #fbe9e8;
  --color-success:        #15803d;
  --color-warning:        #9a5b13;
  --color-warning-bg:     #fdf3e3;
  --color-warning-border: #f3ddb5;

  /* ---- typography ---- */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* ---- geometry & depth ---- */
  --radius-card:  1rem;
  --radius-input: 0.75rem;
  --radius-pill:  999px;
  --shadow-sm: 0 1px 2px 0 rgba(19, 35, 61, 0.05);
  --shadow-md: 0 4px 10px -2px rgba(19, 35, 61, 0.08), 0 2px 4px -2px rgba(19, 35, 61, 0.05);
  --shadow-lg: 0 16px 40px -12px rgba(19, 35, 61, 0.16), 0 4px 12px -4px rgba(19, 35, 61, 0.08);
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ---- derived surfaces (fallbacks; refined below when color-mix exists) ---- */
  --ground:    var(--color-bg);
  --hairline:  var(--color-border);
  --wash:      var(--color-primary-soft);
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --ground:   color-mix(in srgb, var(--color-primary) 3%, #fbfcfd);
    --hairline: color-mix(in srgb, var(--color-primary) 11%, #e4e8ee);
    --wash:     color-mix(in srgb, var(--color-primary) 6%, transparent);
  }
}

/* ---- theme bundles (subset of lysa themes.css) ---- */
[data-theme='zelena-duvera'] {
  --color-primary:      #1f6f54;
  --color-primary-600:  #258a68;
  --color-primary-500:  #34a47e;
  --color-primary-100:  #d6f0e5;
  --color-primary-soft: rgba(31, 111, 84, 0.10);
  --color-accent:       #1f4e87;
  --color-accent-bg:    #dbe9f7;
  --font-display:       'Plus Jakarta Sans', var(--font-sans);
}

[data-theme='tepla-hlina'] {
  --color-primary:      #9a4f3b;
  --color-primary-600:  #b35f48;
  --color-primary-500:  #c87a63;
  --color-primary-100:  #f3e1da;
  --color-primary-soft: rgba(154, 79, 59, 0.10);
  --color-accent:       #0f6e6e;
  --color-accent-bg:    #d6f0ef;
  --font-display:       'Sora', var(--font-sans);
}

[data-theme='tlumena-svestka'] {
  --color-primary:      #5b4a7e;
  --color-primary-600:  #6d5a96;
  --color-primary-500:  #8472b0;
  --color-primary-100:  #e7e1f2;
  --color-primary-soft: rgba(91, 74, 126, 0.10);
  --color-accent:       #b45309;
  --color-accent-bg:    #fef0d9;
  --font-display:       'Manrope', var(--font-sans);
}

[data-theme='bridlicova'] {
  --color-primary:      #155e63;
  --color-primary-600:  #1a7a80;
  --color-primary-500:  #259aa1;
  --color-primary-100:  #d3eef0;
  --color-primary-soft: rgba(21, 94, 99, 0.10);
  --color-accent:       #c2410c;
  --color-accent-bg:    #ffe6d5;
  --font-display:       'Outfit', var(--font-sans);
}

[data-theme='klasicka'] {
  --color-primary:      #1d3a5f;
  --color-primary-600:  #284f7d;
  --color-primary-500:  #3a6699;
  --color-primary-100:  #dce6f1;
  --color-primary-soft: rgba(29, 58, 95, 0.10);
  --color-accent:       #92722f;
  --color-accent-bg:    #f1e9d6;
  --font-display:       'Fraunces', Georgia, serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--ground);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Atmosphere: a soft theme-tinted band behind the masthead */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 260px;
  background: linear-gradient(180deg, var(--wash), transparent);
  pointer-events: none;
  z-index: 0;
}

h1 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

h2, h3 { font-family: var(--font-display); }

p { margin: 0 0 1rem; }

.muted { color: var(--color-text-muted); font-size: 0.9rem; }

.container {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  min-height: 100vh;
}

.screen { display: block; }
.screen[hidden] { display: none; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.screen:not([hidden]) { animation: screen-in 0.24s var(--ease-out) both; }

/* Centered screens (login, confirms, boot) */
.screen--center {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-height: calc(100vh - 5rem);
}
.screen--center[hidden] { display: none; }

/* ============================================================
   Masthead — the nameplate chip + tabs
   ============================================================ */
.screen-header { margin-bottom: 1.5rem; }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0 0.8rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.brand-mark {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--color-primary-600), var(--color-primary));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), var(--shadow-sm);
  position: relative;
}
/* cross of care, drawn in CSS */
.brand-mark::before,
.brand-mark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 1px;
}
.brand-mark::before { width: 12px; height: 3px; }
.brand-mark::after  { width: 3px;  height: 12px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
  white-space: nowrap;
}

/* Tabs — raised chips on the porcelain ground */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text-muted);
  font-family: inherit;
  line-height: 1.2;
  transition: color 0.18s var(--ease-out), background 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}

.tab-btn:hover {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: var(--hairline);
}

.tab-btn--active {
  color: var(--color-primary);
  background: var(--color-surface);
  border-color: var(--hairline);
  box-shadow: var(--shadow-sm);
  cursor: default;
}

/* ============================================================
   Screen intro & sub-screen headers
   ============================================================ */
.screen-intro { margin: 0 0 1.4rem; }

.screen-title {
  font-size: 1.55rem;
  margin: 0 0 0.25rem;
}

.screen-lede { margin: 0; max-width: 44ch; }

.screen-header--sub {
  margin: 1.75rem 0 1.25rem;
  padding-bottom: 0;
  border-bottom: none;
}
.screen-header--sub h1 { margin: 0; }

.screen-header--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.screen-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--color-primary);
  margin: 0 0 0.35rem;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.form-card { padding-top: 1.1rem; }

.confirm-card {
  box-shadow: var(--shadow-lg);
  border-top: 3px solid var(--color-danger);
}
.confirm-card h1 { font-size: 1.3rem; }

/* ============================================================
   Boot
   ============================================================ */
.boot-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 3rem 0;
}
.boot-indicator .muted { margin: 0; }

@keyframes boot-pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50%      { transform: scale(1.35); opacity: 1; }
}
.boot-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: boot-pulse 1.1s ease-in-out infinite;
}

/* ============================================================
   Login — the door nameplate
   ============================================================ */
.login-card {
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
}

.login-plate {
  position: relative;
  background: linear-gradient(165deg, var(--color-primary-600), var(--color-primary) 62%);
  color: #ffffff;
  padding: 1.9rem 1.75rem 1.7rem;
}
/* engraved keyline, like the rule on a brass door plate */
.login-plate::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: calc(var(--radius-card) - 7px);
  pointer-events: none;
}

.login-plate h1 {
  color: #ffffff;
  margin: 0;
  font-size: 1.65rem;
}

.login-plate-id {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  word-break: break-all;
}
.login-plate-id:empty { display: none; }

.login-body { padding: 1.4rem 1.75rem 1.75rem; }
.login-body > .error:last-child { margin-bottom: 0; }
.login-body > label:first-child { margin-top: 0.1rem; }
.login-body .btn-block { margin-bottom: 0; }

.login-footnote {
  text-align: center;
  font-size: 0.82rem;
  margin: 1.1rem 0 0;
}

/* ============================================================
   Forms
   ============================================================ */
form label {
  display: block;
  margin-top: 1.1rem;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

form input[type="text"],
form input[type="password"],
form input[type="date"],
form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-input);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  box-shadow: inset 0 1px 2px rgba(19, 35, 61, 0.04);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

form textarea { resize: vertical; min-height: 120px; line-height: 1.55; }

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: inset 0 1px 2px rgba(19, 35, 61, 0.03), 0 0 0 3px var(--color-primary-soft);
}

.field-note { margin: 0.35rem 0 0; font-size: 0.82rem; }

button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  line-height: 1.2;
  transition: background 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out),
              transform 0.12s var(--ease-out), color 0.18s var(--ease-out),
              border-color 0.18s var(--ease-out);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.btn-primary {
  background: linear-gradient(180deg, var(--color-primary-600), var(--color-primary));
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-600);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), var(--shadow-md);
}

.btn-secondary {
  background: var(--color-surface);
  border-color: var(--hairline);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--color-primary-500);
  color: var(--color-primary);
}

.btn-danger {
  background: var(--color-danger);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-danger:hover:not(:disabled) { background: #9c3531; }

.btn-link {
  background: transparent;
  color: var(--color-text-muted);
  padding: 0.4rem 0.6rem;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: none;
}
.btn-link:hover:not(:disabled) { color: var(--color-primary); text-decoration: underline; }

.btn-block {
  display: flex;
  width: 100%;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.form-actions .btn { flex: 1; }

/* ============================================================
   News / FAQ lists
   ============================================================ */
.news-items,
.faq-items {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.news-item {
  background: var(--color-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 1.15rem 1.25rem 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.news-item:hover { box-shadow: var(--shadow-md); }

.news-item-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 0 0 0.3rem;
  color: var(--color-text);
  word-break: break-word;
}

.news-item-body {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0 0 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.news-item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--wash);
  color: var(--color-primary);
  border: 1px solid var(--hairline);
}

/* quiet ghost actions inside list cards */
.news-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0.35rem -0.5rem 0;
  padding-top: 0.55rem;
  border-top: 1px solid var(--hairline);
}

.news-item-actions .btn {
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--color-primary);
}
.news-item-actions .btn:hover:not(:disabled) {
  background: var(--wash);
  border-color: transparent;
  color: var(--color-primary);
  box-shadow: none;
}
.news-item-actions .btn-danger { color: var(--color-danger); }
.news-item-actions .btn-danger:hover:not(:disabled) {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}
.news-item-actions .btn:disabled { color: var(--color-text-muted); }

.empty-state {
  text-align: center;
  padding: 2.75rem 1rem;
  background: transparent;
  border: 1px dashed var(--hairline);
  border-radius: var(--radius-card);
}

/* ============================================================
   Messages
   ============================================================ */
.error {
  color: var(--color-danger);
  font-size: 0.9rem;
  min-height: 1.2rem;
  margin: 0.5rem 0 0;
}
.error:empty { min-height: 0; margin: 0; }

.success-msg {
  color: var(--color-success);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2rem;
  margin: 0.5rem 0 0;
}
.success-msg:empty { min-height: 0; margin: 0; }

/* ============================================================
   Hours — the week as a ledger
   ============================================================ */
.hours-grid {
  margin-top: 0.25rem;
  background: var(--color-surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 0.35rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.hours-day-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  column-gap: 0.9rem;
  align-items: start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hairline);
}
.hours-day-row:last-child { border-bottom: none; }

.hours-day-label {
  grid-column: 1;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
  padding-top: 0.5rem;
  margin-bottom: 0;
}

.hours-slots-container {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* a day with no slots reads as closed */
.hours-slots-container:empty::before {
  content: 'Zavřeno';
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-style: italic;
  padding: 0.45rem 0 0.1rem;
}

.hours-slot-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.hours-slot-row input[type="time"] {
  width: 96px;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--hairline);
  border-radius: calc(var(--radius-input) - 0.25rem);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
}

.hours-slot-row input[type="text"] {
  flex: 1;
  min-width: 120px;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--hairline);
  border-radius: calc(var(--radius-input) - 0.25rem);
  font-size: 0.9rem;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
}

.hours-slot-row input:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.slot-sep {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.add-slot-btn {
  grid-column: 2;
  justify-self: start;
  margin-top: 0.45rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  background: transparent;
  border: 1px dashed var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}
.add-slot-btn:hover {
  background: var(--wash);
  border-color: var(--color-primary-500);
  transform: none;
  box-shadow: none;
}

/* Icon button (×) */
.btn-icon {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.15rem 0.45rem;
  border-radius: 7px;
  line-height: 1;
  font-family: inherit;
  transition: color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}
.btn-icon:hover { color: var(--color-danger); background: var(--color-danger-bg); }
.btn-icon:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }

/* Exceptions */
.hours-exceptions-section { margin-top: 1.9rem; }
.hours-exceptions-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.25rem;
}
.hours-exceptions-hint { font-size: 0.82rem; margin-bottom: 0.75rem; }

.hours-exceptions-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.exception-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.exception-row input[type="date"],
.exception-row input[type="text"] {
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--hairline);
  border-radius: calc(var(--radius-input) - 0.25rem);
  font-size: 0.9rem;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
}

.exception-row input[type="text"] { flex: 1; min-width: 120px; }
.exception-row input:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

/* ============================================================
   Sticky save bars (hours + copy) — frosted
   ============================================================ */
.save-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--ground);
  padding: 0.85rem 0 0.9rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}
@supports ((backdrop-filter: blur(8px)) and (color: color-mix(in srgb, red 50%, blue))) {
  .save-bar {
    background: color-mix(in srgb, var(--ground) 82%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}
.save-bar .btn-block { margin-bottom: 0; margin-top: 0.25rem; }

/* ============================================================
   Copy editor ("Texty")
   ============================================================ */
.copy-title { margin-top: 0; }

.copy-tier-heading {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--color-primary);
  margin: 1.9rem 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.copy-tier-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.copy-group-heading {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 1.5rem 0 0.1rem;
}

.copy-field { margin-top: 1rem; }

.copy-field-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.copy-field-header label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
}

.copy-badge {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border-color: var(--color-warning-border);
}

.copy-reset-btn {
  background: transparent;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.1rem 0.3rem;
  margin-left: auto;
  font-family: inherit;
  white-space: nowrap;
}
.copy-reset-btn:hover { text-decoration: underline; }
.copy-reset-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }

.copy-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-input);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  box-shadow: inset 0 1px 2px rgba(19, 35, 61, 0.04);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
textarea.copy-input { resize: vertical; min-height: 64px; line-height: 1.55; }
.copy-input:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: inset 0 1px 2px rgba(19, 35, 61, 0.03), 0 0 0 3px var(--color-primary-soft);
}

.copy-input:disabled {
  background: var(--color-muted);
  color: var(--color-text-muted);
}

.copy-hide-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text);
  cursor: pointer;
}
.copy-hide-toggle input { cursor: pointer; accent-color: var(--color-primary); }

@keyframes copy-flash {
  0% { background: var(--color-primary-100); }
  100% { background: transparent; }
}
.copy-field--flash {
  animation: copy-flash 1.5s ease-out;
  border-radius: var(--radius-input);
}

.copy-field-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.copy-hint { font-size: 0.8rem; margin: 0; flex: 1; }

.copy-counter {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.copy-counter--limit { color: var(--color-danger); font-weight: 700; }

/* Disclosure ("Pokročilé", "Nastavení účtu") */
.copy-advanced {
  margin-top: 2rem;
  border-top: 1px solid var(--hairline);
  padding-top: 1.1rem;
}
.copy-advanced summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
}
.copy-advanced summary::-webkit-details-marker { display: none; }
.copy-advanced summary::before {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(-45deg);
  transition: transform 0.18s var(--ease-out);
  flex: none;
}
.copy-advanced[open] summary::before { transform: rotate(45deg); }
.copy-advanced summary:hover { color: var(--color-primary); }
.copy-advanced summary:hover::before {
  border-color: var(--color-primary);
}

.copy-orphans-hint { font-size: 0.82rem; }

.copy-orphan {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-input);
  padding: 0.6rem 0.75rem;
  margin-top: 0.5rem;
}
.copy-orphan-key { font-size: 0.75rem; margin: 0 0 0.2rem; word-break: break-all; }
.copy-orphan-value { margin: 0 0 0.5rem; word-break: break-word; }

.copy-dirty-note {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-warning);
  margin: 0 0 0.4rem;
}

.copy-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.copy-save-actions .btn { flex: 1 1 auto; }

/* Preview iframe — let the preview screen use the full viewport width */
body:has(#copy-preview:not([hidden])) .container { max-width: 1100px; }

.copy-preview-frame {
  width: 100%;
  height: 72vh;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   Images editor ("Fotky")
   ============================================================ */
.image-card { margin-bottom: 1.25rem; padding: 1.25rem 1.25rem 1.4rem; }

.image-card-title {
  margin: 0 0 0.85rem;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.image-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--hairline);
  border-radius: calc(var(--radius-card) - 0.35rem);
  background: var(--color-muted);
  box-shadow: var(--shadow-sm);
}

.image-meta { margin: 0.7rem 0 0; font-size: 0.85rem; }
.image-note { margin: 0.25rem 0 0; font-size: 0.85rem; }

.image-actions { margin-top: 0.9rem; }
.image-actions .btn { flex: 0 1 auto; }

/* "Vrátit původní fotku" is rare + destructive — keep it quiet next to the
   primary upload action (the confirm dialog still guards it) */
.image-actions .btn-danger {
  background: transparent;
  border-color: var(--hairline);
  color: var(--color-danger);
  box-shadow: none;
}
.image-actions .btn-danger:hover:not(:disabled) {
  background: var(--color-danger-bg);
  border-color: var(--color-danger);
}

/* ============================================================
   Small screens
   ============================================================ */
@media (max-width: 430px) {
  .container { padding: 1rem 0.9rem 2.25rem; }
  .hours-day-row { grid-template-columns: 1fr; row-gap: 0.15rem; }
  .hours-day-label { padding-top: 0; grid-column: 1; }
  .hours-slots-container { grid-column: 1; }
  .add-slot-btn { grid-column: 1; }
  .login-plate { padding: 1.6rem 1.4rem 1.45rem; }
  .login-body { padding: 1.25rem 1.4rem 1.5rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .screen:not([hidden]) { animation: none; }
  .boot-dot { animation: none; }
  .copy-field--flash { animation: none; background: var(--color-primary-100); }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
