/* ==========================================================================
   admin.icecoldtrans.cz — administrace ICECOLD Trans
   Světlý pracovní prostor, tmavý inkoustový panel, modrý akcent.
   ========================================================================== */

:root {
  --ink: #061722;
  --ink-2: #0b2433;
  --ink-3: #123244;
  --paper: #f3f5f9;
  --card: #ffffff;
  --line: #e3e8f0;
  --line-2: #edf1f7;
  --text: #0f2130;
  --text-2: #4b5d6d;
  --text-3: #8293a3;
  --brand: #1b6fd8;
  --brand-2: #2f8fff;
  --brand-soft: #eaf3fe;
  --ok: #12885a;
  --ok-soft: #e6f6ee;
  --warn: #b36b00;
  --warn-soft: #fdf3e3;
  --danger: #c4352f;
  --danger-soft: #fdeceb;
  --info: #3a4cc4;
  --info-soft: #eef0fd;
  --focus: #8ec6ff;
  --shadow-s: 0 1px 2px rgba(9, 26, 42, .06);
  --shadow-m: 0 8px 24px -12px rgba(9, 26, 42, .22);
  --shadow-l: 0 28px 60px -28px rgba(6, 23, 34, .45);
  --radius: 14px;
  --radius-l: 20px;
  --side-w: 268px;
  --font-head: "Archivo", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Consolas", "Menlo", monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  letter-spacing: -.015em;
  margin: 0;
}

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

[hidden] { display: none !important; }

.sr-only, .ad-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------------- splash */

.ad-splash {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  gap: 22px;
  background: var(--ink);
  transition: opacity .35s ease, visibility .35s ease;
}
.ad-splash img {
  width: 210px;
  height: auto;
  padding: 12px 20px;
  border-radius: 14px;
  background: #fff;
  opacity: 1;
}
.ad-splash.is-done { opacity: 0; visibility: hidden; }
.ad-splash__bar {
  width: 132px; height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}
.ad-splash__bar i {
  display: block; height: 100%; width: 40%;
  border-radius: 3px;
  background: var(--brand-2);
  animation: ad-slide 1.1s ease-in-out infinite;
}
@keyframes ad-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(340%); }
}

.ad-noscript {
  margin: 18vh auto;
  max-width: 460px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
  color: var(--text-2);
}

/* ------------------------------------------------------------------- auth */

.ad-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
  background: var(--card);
}

.ad-auth__brand {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: #eaf3fb;
  background:
    radial-gradient(120% 90% at 12% 0%, #103b52 0%, transparent 58%),
    radial-gradient(110% 80% at 100% 100%, #143a63 0%, transparent 62%),
    linear-gradient(155deg, #061722 0%, #08202e 55%, #061722 100%);
}
.ad-auth__glow {
  position: absolute;
  width: 520px; height: 520px;
  right: -160px; top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 143, 255, .22), transparent 65%);
  pointer-events: none;
}
.ad-auth__brand-head, .ad-auth__brand-body, .ad-auth__brand-foot {
  position: relative;
  z-index: 1;
}
.ad-auth__brand-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ad-auth__logo {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 12px;
  background: #fff;
}
.ad-auth__logo img { width: 148px; height: auto; display: block; }
.ad-auth__tag {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, .28);
  background: rgba(143, 211, 255, .08);
  color: #bfe3ff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ad-auth__brand-body { max-width: 560px; margin-top: auto; }
.ad-kicker {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: #74b6e8;
}
.ad-auth__brand-body h1 {
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
  line-height: 1.05;
  font-weight: 700;
  color: #ffffff;
}
.ad-auth__brand-body h1 em {
  font-style: normal;
  background: linear-gradient(92deg, #8fd3ff, #bfe9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ad-auth__lede {
  margin: 18px 0 0;
  max-width: 460px;
  color: #a9c2d6;
  font-size: 15px;
  line-height: 1.65;
}
.ad-auth__features {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ad-auth__features li {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(143, 211, 255, .14);
  background: rgba(255, 255, 255, .04);
}
.ad-auth__features b { display: block; font-size: 14px; color: #eef7ff; }
.ad-auth__features small { display: block; margin-top: 2px; font-size: 12.5px; color: #93aec4; }
.ad-auth__feature-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(47, 143, 255, .16);
  color: #8fd3ff;
}
.ad-auth__feature-icon svg { width: 19px; height: 19px; }
.ad-auth__brand-foot {
  display: flex;
  gap: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(143, 211, 255, .14);
}
.ad-auth__brand-foot b { display: block; font-size: 14px; color: #ffffff; }
.ad-auth__brand-foot span { font-size: 12px; color: #8ba6bc; }

.ad-auth__panel {
  display: grid;
  place-items: center;
  padding: clamp(22px, 4vw, 52px);
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
}
.ad-auth__card { width: 100%; max-width: 420px; }
.ad-auth__head { margin-bottom: 22px; }
.ad-auth__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #155aa8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ad-auth__badge svg { width: 14px; height: 14px; }
.ad-auth__head h2 { font-size: 1.6rem; }
.ad-auth__head p {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
}

.ad-stepper {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
}
.ad-stepper li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 500;
}
.ad-stepper b {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--line-2);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
}
.ad-stepper li.is-active {
  border-color: #c4ddfb;
  background: var(--brand-soft);
  color: #14508f;
}
.ad-stepper li.is-active b { background: var(--brand); color: #fff; }
.ad-stepper li.is-done { color: var(--ok); border-color: #c8e8d8; background: var(--ok-soft); }
.ad-stepper li.is-done b { background: var(--ok); color: #fff; }

.ad-auth__alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #f1c9c6;
  background: var(--danger-soft);
  color: #97322d;
  font-size: 13.5px;
}
.ad-auth__alert.is-ok {
  border-color: #c8e8d8;
  background: var(--ok-soft);
  color: #0e6b48;
}

.ad-auth__form { display: grid; gap: 14px; }
.ad-auth__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ad-secure-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ok);
}
.ad-secure-note svg { width: 15px; height: 15px; }
.ad-muted { font-size: 12px; color: var(--text-3); }

.ad-auth__support {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-3);
}
.ad-auth__support div { display: grid; }
.ad-auth__support a { font-weight: 600; color: var(--text); }
.ad-auth__support a:hover { color: var(--brand); }
.ad-auth__powered {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-3);
}
.ad-auth__powered img {
  display: block;
  width: auto;
  height: 18px;
  mix-blend-mode: multiply;
}

/* ---------------------------------------------------------------- pole */

.ad-field { display: grid; gap: 6px; }
.ad-field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.ad-field input,
.ad-field select,
.ad-field textarea,
.ad-textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ad-field input::placeholder,
.ad-field textarea::placeholder { color: #a3b0bd; }
.ad-field input:focus,
.ad-field select:focus,
.ad-field textarea:focus,
.ad-textarea:focus {
  outline: 0;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(27, 111, 216, .13);
}
.ad-field select { appearance: none; padding-right: 34px; }
.ad-select-wrap { position: relative; }
.ad-select-wrap::after {
  content: "";
  position: absolute;
  right: 13px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.8px solid var(--text-3);
  border-bottom: 1.8px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.ad-pw { position: relative; display: block; }
.ad-pw input { padding-right: 44px; }
.ad-pw__toggle {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.ad-pw__toggle:hover { background: var(--line-2); color: var(--text); }
.ad-pw__toggle svg { width: 18px; height: 18px; }

.ad-field--error input { border-color: #e3a5a1; }

/* ---------------------------------------------------------------- tlačítka */

.ad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .06s ease;
  white-space: nowrap;
}
.ad-btn svg { width: 17px; height: 17px; }
.ad-btn:active { transform: translateY(1px); }
.ad-btn:disabled { opacity: .5; cursor: not-allowed; }
.ad-btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(27, 111, 216, .9);
}
.ad-btn--primary:hover { background: #155fc0; }
.ad-btn--ghost {
  border-color: var(--line);
  background: var(--card);
  color: var(--text-2);
}
.ad-btn--ghost:hover { border-color: #cfd9e5; background: #f8fafc; color: var(--text); }
.ad-btn--quiet {
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
}
.ad-btn--quiet:hover { background: var(--line-2); color: var(--text); }
.ad-btn--danger { background: var(--danger); color: #fff; }
.ad-btn--danger:hover { background: #a92c27; }
.ad-btn--danger-ghost {
  border-color: #f0cfcc;
  background: var(--danger-soft);
  color: #9a312c;
}
.ad-btn--sm { padding: 7px 11px; font-size: 13px; border-radius: 9px; }
.ad-btn--block { width: 100%; }
.ad-btn--link { padding: 0; border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 13px; }
.ad-btn--link:hover { text-decoration: underline; }

.ad-icon-btn {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.ad-icon-btn:hover { background: rgba(255, 255, 255, .08); }
.ad-icon-btn svg { width: 18px; height: 18px; }

.ad-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--brand);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.ad-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- kód */

.ad-code-mail {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
}
.ad-code-mail b { color: var(--text); }
.ad-code-mail .ad-link { margin-left: 8px; }
.ad-code-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.ad-code-digit {
  width: 100%;
  height: 52px;
  padding: 0;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ad-code-digit:focus {
  outline: 0;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(27, 111, 216, .13);
}
.ad-code-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  font-size: 12.5px;
  color: var(--text-3);
}
.ad-code-meta .ad-link:disabled { color: var(--text-3); cursor: not-allowed; text-decoration: none; }
.ad-code-hint {
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-3);
}

/* ------------------------------------------------------------------- app */

.ad-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
}

.ad-side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 14px 16px;
  overflow-y: auto;
  color: #c8dae8;
  background:
    radial-gradient(120% 70% at 0% 0%, #0f3549 0%, transparent 60%),
    linear-gradient(180deg, #061722, #071a26 60%, #05141e);
  border-right: 1px solid rgba(255, 255, 255, .06);
  scrollbar-width: thin;
}
.ad-side__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 16px;
}
.ad-side__logo {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
}
.ad-side__logo img { width: 132px; height: auto; display: block; }
.ad-side__close { color: #c8dae8; display: none; }
.ad-side__label {
  margin: 12px 12px 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5f8098;
}
.ad-side__nav { display: grid; gap: 2px; }
.ad-side__nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #b9d0e1;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.ad-side__nav a svg { width: 18px; height: 18px; opacity: .8; flex: none; }
.ad-side__nav a:hover { background: rgba(143, 211, 255, .08); color: #eef7ff; }
.ad-side__nav a.is-active {
  background: linear-gradient(90deg, rgba(47, 143, 255, .22), rgba(47, 143, 255, .06));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(143, 211, 255, .16);
}
.ad-side__nav a.is-active::before {
  content: "";
  position: absolute;
  left: -14px; top: 50%;
  width: 3px; height: 20px;
  transform: translateY(-50%);
  border-radius: 0 3px 3px 0;
  background: var(--brand-2);
}
.ad-side__nav a.is-active svg { opacity: 1; color: #8fd3ff; }

.ad-nav-count {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(143, 211, 255, .12);
  color: #b9e2ff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.ad-nav-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e5533d;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.ad-side__links {
  display: grid;
  gap: 2px;
  margin: 14px 4px 0;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.ad-side__links a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 7px;
  color: #8ba6bc;
  font-size: 12.5px;
  text-decoration: none;
}
.ad-side__links a:hover { color: #d9ecfa; background: rgba(255, 255, 255, .05); }

.ad-side__online { padding: 4px 8px 0; }
.ad-online {
  list-style: none;
  margin: 2px 0 10px;
  padding: 0;
  display: grid;
  gap: 2px;
}
.ad-online__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 8px;
}
.ad-online__item.is-me { background: rgba(143, 211, 255, .07); }
.ad-online__avatar {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #123b52;
  color: #bfe3ff;
  font: 700 10px/1 var(--font-body);
}
.ad-online__item.is-me .ad-online__avatar { background: var(--brand); color: #fff; }
.ad-online__text { display: grid; min-width: 0; line-height: 1.2; }
.ad-online__text b {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: #eef7ff;
}
.ad-online__text span { font-size: 10.5px; color: #7fa3ba; }
.ad-online__dot {
  width: 7px;
  height: 7px;
  flex: none;
  margin-left: auto;
  border-radius: 50%;
  background: #34c38f;
  box-shadow: 0 0 0 3px rgba(52, 195, 143, .13);
}
.ad-online__count { color: #8fd3ff; }
.ad-online__empty { padding: 4px 6px 8px; font-size: 11.5px; color: #6f8fa6; }

.ad-side__user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 4px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.ad-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(47, 143, 255, .2);
  color: #bfe3ff;
  font-size: 13px;
  font-weight: 700;
}
.ad-side__user-text { display: grid; min-width: 0; }
.ad-side__user-text b {
  font-size: 13px;
  font-weight: 600;
  color: #eef7ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-side__user-text span {
  font-size: 11.5px;
  color: #7f9bb1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-side__user .ad-icon-btn { margin-left: auto; color: #8ba6bc; }
.ad-side__user .ad-icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }

/* ---------------------------------------------------------------- topbar */

.ad-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.ad-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
}
.ad-topbar__menu { display: none; color: var(--text-2); }
.ad-topbar__menu:hover { background: var(--line-2); }
.ad-topbar__title { display: grid; gap: 1px; min-width: 0; }
.ad-topbar__title p {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ad-topbar__title h1 { font-size: 1.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------------------------------------------------------------- obsah */

.ad-content {
  flex: 1;
  padding: clamp(18px, 2.6vw, 32px) clamp(16px, 3vw, 34px) 42px;
  max-width: 1420px;
  width: 100%;
}

.ad-view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ad-view-head h2 { font-size: 1.55rem; }
.ad-view-head p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; }

.ad-section { margin-top: 26px; }
.ad-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ad-section__head h3 { font-size: 1.05rem; }
.ad-section__head p { margin: 3px 0 0; font-size: 13px; color: var(--text-3); }

.ad-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--card);
  box-shadow: var(--shadow-s);
}
.ad-card--flush { padding: 0; overflow: hidden; }
.ad-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}
.ad-card__head h3 { font-size: 1rem; }
.ad-card__head p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); }

.ad-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.ad-grid--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

/* KPI */

.ad-kpis {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(198px, 1fr));
  margin-bottom: 20px;
}
.ad-kpi {
  position: relative;
  padding: 17px 18px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-s);
  overflow: hidden;
}
.ad-kpi::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  opacity: .8;
}
.ad-kpi span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.ad-kpi b { display: block; margin-top: 7px; font-family: var(--font-head); font-size: 1.75rem; letter-spacing: -.02em; color: var(--text); }
.ad-kpi small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.ad-kpi--ok::after { background: linear-gradient(90deg, #1aa46c, #3ccb8c); }
.ad-kpi--warn::after { background: linear-gradient(90deg, #d98324, #f0aa52); }
.ad-kpi--ink { background: linear-gradient(150deg, #08222f, #061722); border-color: #0d3648; }
.ad-kpi--ink span { color: #7f9bb1; }
.ad-kpi--ink b { color: #fff; }
.ad-kpi--ink small { color: #a9c2d6; }
.ad-kpi--ink::after { background: linear-gradient(90deg, #2f8fff, #8fd3ff); }

/* stavový pruh */

.ad-bars { display: grid; gap: 10px; }
.ad-bar {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-2);
}
.ad-bar__track {
  height: 8px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}
.ad-bar__fill {
  height: 100%;
  min-width: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.ad-bar__fill--ok { background: linear-gradient(90deg, #1aa46c, #46c793); }
.ad-bar__fill--warn { background: linear-gradient(90deg, #d98324, #f0aa52); }
.ad-bar__fill--danger { background: linear-gradient(90deg, #cf4a3e, #e77a6d); }
.ad-bar__fill--muted { background: #b7c4d1; }
.ad-bar b { font-weight: 700; color: var(--text); text-align: right; }

/* tabulka */

.ad-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ad-toolbar__search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 380px;
}
.ad-toolbar__search svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-3);
  pointer-events: none;
}
.ad-toolbar__search input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}
.ad-toolbar__search input:focus {
  outline: 0;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(27, 111, 216, .12);
}
.ad-toolbar select {
  padding: 9px 30px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-2);
  appearance: none;
  cursor: pointer;
}
.ad-toolbar__spacer { margin-left: auto; }

.ad-table-wrap { overflow-x: auto; }
.ad-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.ad-table th {
  position: sticky;
  top: 0;
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
  background: #f8fafd;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ad-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.ad-table tbody tr { transition: background .12s ease; }
.ad-table tbody tr:hover { background: #fafcff; }
.ad-table tbody tr.is-clickable { cursor: pointer; }
.ad-table tbody tr.is-clickable:hover { background: var(--brand-soft); }
.ad-table td b { font-weight: 600; color: var(--text); }
.ad-table td small { display: block; font-size: 12px; color: var(--text-3); }
.ad-table .ad-num { text-align: right; font-variant-numeric: tabular-nums; }
.ad-table__actions { display: flex; gap: 4px; justify-content: flex-end; }
.ad-table tr:last-child td { border-bottom: 0; }
.ad-mono { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .02em; }

/* štítky a stavy */

.ad-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--line-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.ad-chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .7;
}
.ad-chip--ok { border-color: #cde9db; background: var(--ok-soft); color: var(--ok); }
.ad-chip--warn { border-color: #f2ddb9; background: var(--warn-soft); color: var(--warn); }
.ad-chip--danger { border-color: #f1cfcb; background: var(--danger-soft); color: var(--danger); }
.ad-chip--info { border-color: #d3d8f7; background: var(--info-soft); color: var(--info); }
.ad-chip--plain { border-color: transparent; background: transparent; padding: 0; color: var(--text-2); }
.ad-chip--plain::before { display: none; }

.ad-temp { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); }
.ad-temp--ok { color: var(--ok); }
.ad-temp--warn { color: var(--warn); }
.ad-temp--danger { color: var(--danger); }

.ad-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}
.ad-empty b { display: block; margin-bottom: 4px; color: var(--text); font-family: var(--font-head); font-size: 1rem; }
.ad-loading { padding: 36px; text-align: center; color: var(--text-3); }
.ad-loading span {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: ad-spin .7s linear infinite;
}
@keyframes ad-spin { to { transform: rotate(360deg); } }

/* vozový park */

.ad-fleet {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
}
.ad-fleet-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-s);
  transition: box-shadow .16s ease, border-color .16s ease;
}
.ad-fleet-card:hover { box-shadow: var(--shadow-m); border-color: #d3dfec; }
.ad-fleet-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ad-fleet-card__head h3 { font-size: 1.02rem; }
.ad-fleet-card__plate {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 7px;
  border-radius: 5px;
  background: #f7f2d8;
  border: 1px solid #e6dcae;
  color: #5f531f;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
}
.ad-fleet-card__meta { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.ad-fleet-card__meta div { display: flex; align-items: center; gap: 7px; }
.ad-fleet-card__meta svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }
.ad-fleet-card__zones { display: flex; gap: 5px; flex-wrap: wrap; }
.ad-fleet-card__foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  display: flex;
  gap: 6px;
}
.ad-fleet-card__foot .ad-btn { flex: 1; }

/* prázdný stav obsahu stránky */

.ad-pagecards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ad-pagecard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-s);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}
.ad-pagecard:hover { border-color: #c7dcf5; box-shadow: var(--shadow-m); transform: translateY(-1px); }
.ad-pagecard b { font-family: var(--font-head); font-size: 14.5px; color: var(--text); }
.ad-pagecard span { font-size: 12.5px; color: var(--text-3); }
.ad-pagecard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* formuláře v modalu */

.ad-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}
.ad-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 23, 34, .55);
  backdrop-filter: blur(3px);
  animation: ad-fade .18s ease;
}
.ad-modal__panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--radius-l);
  background: var(--card);
  box-shadow: var(--shadow-l);
  animation: ad-pop .2s ease;
}
.ad-modal__panel--wide { max-width: 860px; }
@keyframes ad-fade { from { opacity: 0; } }
@keyframes ad-pop { from { opacity: 0; transform: translateY(10px) scale(.99); } }

.ad-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.ad-modal__head h2 { font-size: 1.25rem; }
.ad-modal__head p { margin: 5px 0 0; font-size: 13px; color: var(--text-3); }
.ad-modal__head .ad-icon-btn { color: var(--text-3); }
.ad-modal__head .ad-icon-btn:hover { background: var(--line-2); color: var(--text); }

.ad-form { display: grid; gap: 14px; }
.ad-form-grid { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ad-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ad-form-grid .ad-span-2 { grid-column: span 2; }
.ad-form__label {
  margin: 2px 0 -4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ad-form__hint { margin: 0; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.ad-form__error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid #f1cfcb;
  background: var(--danger-soft);
  color: #97322d;
  font-size: 13px;
}
.ad-form__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.ad-form__foot .ad-btn--danger-ghost { margin-right: auto; }

.ad-check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
}
.ad-check input { width: 15px; height: 15px; accent-color: var(--brand); margin: 0; }
.ad-check:has(input:checked) { border-color: #bcd8f8; background: var(--brand-soft); color: #14508f; }

.ad-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
}
.ad-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ad-switch__ui {
  position: relative;
  width: 44px; height: 25px;
  border-radius: 999px;
  background: #d7dfe9;
  transition: background .18s ease;
  flex: none;
}
.ad-switch__ui::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .18s ease;
}
.ad-switch input:checked + .ad-switch__ui { background: var(--brand); }
.ad-switch input:checked + .ad-switch__ui::after { transform: translateX(19px); }
.ad-switch input:focus-visible + .ad-switch__ui { box-shadow: 0 0 0 3px rgba(27, 111, 216, .22); }

/* seznam přístupů ve firmě */

.ad-members { display: grid; gap: 8px; }
.ad-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}
.ad-member__avatar {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: #14508f;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.ad-member__text { display: grid; min-width: 0; }
.ad-member__text b { font-size: 13.5px; font-weight: 600; }
.ad-member__text span { font-size: 12px; color: var(--text-3); }
.ad-member__actions { margin-left: auto; }
.ad-member__actions .ad-icon-btn { width: 28px; height: 28px; color: var(--text-3); }
.ad-member__actions .ad-icon-btn:hover { background: var(--danger-soft); color: var(--danger); }

/* přístupy — kopírování */

.ad-credentials {
  display: grid;
  gap: 10px;
  margin: 4px 0 0;
}
.ad-credential {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px dashed #bcd8f8;
  border-radius: 10px;
  background: #f7fbff;
}
.ad-credential__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.ad-credential__row code {
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  letter-spacing: .04em;
}
.ad-credential__row b { color: var(--text); }

/* editor obsahu */

.ad-editor { display: grid; gap: 18px; }
.ad-editor__section {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}
.ad-editor__section > h4 {
  font-size: 11px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ad-editor__item { display: grid; gap: 5px; }
.ad-editor__item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ad-editor__tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: .04em;
}
.ad-editor__item textarea {
  width: 100%;
  min-height: 62px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  resize: vertical;
}
.ad-editor__item textarea:focus {
  outline: 0;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(27, 111, 216, .12);
}
.ad-editor__item.is-edited textarea { border-color: #c4ddfb; background: #f7fbff; }
.ad-editor__item .ad-btn--link { font-size: 11.5px; }
.ad-editor__badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 10.5px;
  font-weight: 700;
}

/* detail souhrn */

.ad-facts { display: grid; gap: 9px; margin: 0; }
.ad-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
}
.ad-facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.ad-facts dt { color: var(--text-3); }
.ad-facts dd { margin: 0; font-weight: 600; color: var(--text); text-align: right; }

/* zprávy */

.ad-messages { display: grid; gap: 12px; }
.ad-message {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-s);
}
.ad-message.is-new { border-color: #c7dcf5; box-shadow: 0 0 0 3px rgba(27, 111, 216, .07); }
.ad-message__head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ad-message__head h3 { font-size: 1rem; }
.ad-message__head p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-3); }
.ad-message__head .ad-chip { margin-left: auto; }
.ad-message__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  white-space: pre-wrap;
}
.ad-message__meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-3);
}
.ad-message__meta a { color: var(--brand); }
.ad-message__foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
}

/* toast */

.ad-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  transform: translate(-50%, 16px);
  padding: 11px 18px;
  border-radius: 10px;
  background: #0b2433;
  color: #eaf3fb;
  font-size: 13.5px;
  box-shadow: var(--shadow-l);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  max-width: min(92vw, 470px);
}
.ad-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.ad-toast.is-ok { background: #0e5a3e; }
.ad-toast.is-error { background: #8e2f2a; }

/* patička aplikace */

.ad-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px clamp(16px, 3vw, 34px);
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  color: var(--text-3);
}
.ad-foot__secure { display: inline-flex; align-items: center; gap: 6px; }
.ad-foot__secure svg { width: 14px; height: 14px; }
.ad-foot__powered {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.ad-foot__powered img {
  display: block;
  width: auto;
  height: 18px;
  mix-blend-mode: multiply;
}

.ad-scrim { display: none; }

/* ---------------------------------------------------------------- respons */

@media (max-width: 1080px) {
  .ad-auth { grid-template-columns: minmax(0, 1fr) minmax(380px, .95fr); }
  .ad-auth__features { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .ad-auth { grid-template-columns: 1fr; }
  .ad-auth__brand { padding: 26px 22px 22px; gap: 18px; }
  .ad-auth__brand-foot { display: none; }
  .ad-auth__features { display: none; }
  .ad-auth__brand-body h1 { font-size: 1.85rem; }
  .ad-auth__brand-body { margin-top: 8px; }
  .ad-auth__lede { font-size: 14px; }

  .ad-app { grid-template-columns: minmax(0, 1fr); }
  .ad-side {
    position: fixed;
    left: 0; top: 0;
    z-index: 60;
    width: min(84vw, 300px);
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: 0 0 60px rgba(4, 18, 28, .4);
  }
  .ad-side.is-open { transform: translateX(0); }
  .ad-side__close { display: grid; }
  .ad-topbar__menu { display: grid; }
  .ad-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(6, 23, 34, .35);
    backdrop-filter: blur(2px);
  }
  .ad-content { padding-bottom: 34px; }
  .ad-topbar__actions .ad-btn--ghost { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .ad-auth__panel { padding: 22px 18px 30px; place-items: start center; }
  .ad-auth__card { max-width: none; }
  .ad-auth { background: #fff; }
  .ad-auth__brand { border-radius: 0 0 22px 22px; }
  .ad-topbar { padding: 12px 14px; gap: 10px; }
  .ad-topbar__title h1 { font-size: 1.15rem; }
  .ad-topbar__actions .ad-btn--sm { padding: 7px 9px; font-size: 12.5px; }
  .ad-content { padding: 16px 14px 30px; }
  .ad-form-grid, .ad-form-grid--3 { grid-template-columns: 1fr; }
  .ad-form-grid .ad-span-2 { grid-column: auto; }
  .ad-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ad-kpi { padding: 14px 14px 12px; }
  .ad-kpi b { font-size: 1.45rem; }
  .ad-fleet { grid-template-columns: 1fr; }
  .ad-modal { padding: 10px; align-items: end; }
  .ad-modal__panel { max-height: calc(100vh - 20px); padding: 18px; border-radius: 16px; }
  .ad-table th, .ad-table td { padding: 10px 11px; }
  .ad-bar { grid-template-columns: 92px minmax(0, 1fr) 36px; gap: 8px; }
  .ad-facts div { flex-direction: column; gap: 2px; align-items: flex-start; }
  .ad-facts dd { text-align: left; }
  .ad-code-digit { height: 46px; font-size: 19px; }
}

/* --------------------------------------------------------- živý náhled */

.ad-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: #f8fafd;
  overflow: hidden;
  box-shadow: var(--shadow-s);
}
.ad-preview__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.ad-preview__bar select {
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-2);
  appearance: none;
  cursor: pointer;
  max-width: 280px;
}
.ad-preview__tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ad-devices {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  margin-left: auto;
  border-radius: 8px;
  background: var(--line-2);
}
.ad-device {
  border: 0;
  border-radius: 6px;
  padding: 5px 9px;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ad-device:hover { color: var(--text); }
.ad-device.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(9, 26, 42, .12);
}
.ad-preview__stage {
  padding: 14px;
  overflow: auto;
  background: radial-gradient(90% 70% at 50% 0%, #eef4fb, #f8fafd);
}
.ad-preview__frame {
  display: block;
  width: 100%;
  height: 72vh;
  min-height: 460px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-s);
  transition: width .2s ease;
}
.ad-preview__stage[data-width="tablet"] .ad-preview__frame { width: 834px; max-width: 100%; }
.ad-preview__stage[data-width="mobile"] .ad-preview__frame { width: 390px; max-width: 100%; }
.ad-preview__frame--edit { height: calc(100vh - 250px); min-height: 520px; }
.ad-preview__note {
  margin: 0;
  padding: 10px 14px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-3);
}

/* editor obsahu — texty vlevo, náhled vpravo */

.ad-editor-split {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  align-items: start;
}
.ad-editor-pane {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: #fff;
  box-shadow: var(--shadow-s);
}
.ad-editor-pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
}
.ad-editor-pane__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-editor__item.is-active-item {
  border-color: #bcd8f8;
  background: #f5faff;
}
.ad-btn--link-back {
  margin-bottom: 6px;
  color: var(--text-2);
}
.ad-btn--link-back:hover { color: var(--brand); }

@media (max-width: 1080px) {
  .ad-editor-split { grid-template-columns: 1fr; }
  .ad-editor-pane { position: static; max-height: none; }
  .ad-preview__frame { height: 62vh; }
  .ad-preview__frame--edit { height: 68vh; }
}

/* ------------------------------------------------------ PWA a notifikace */

.ad-side__app {
  display: grid;
  gap: 6px;
  margin: 16px 16px 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.ad-side__app .ad-side__label { margin: 0 0 4px; }
.ad-app-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: #dce9f5;
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.ad-app-link:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #fff; }
.ad-app-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ad-app-link svg { width: 17px; height: 17px; flex: none; }
.ad-push-dot { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: #6e8296; }
.ad-push-dot.is-on { background: #39d98a; box-shadow: 0 0 0 3px rgba(57, 217, 138, .2); }

.ad-push { display: grid; gap: 14px; }
.ad-push__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line-2);
}
.ad-push__row > div { display: grid; gap: 3px; min-width: 0; }
.ad-push__row b { font-size: 14px; }
.ad-push__row > div span { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.ad-push__badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}
.ad-push__badge svg { width: 20px; height: 20px; }
.ad-push__state {
  align-self: center;
  flex: none;
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
}
.ad-push__state.is-on { background: var(--ok-soft); color: var(--ok); }
.ad-push__steps,
.ad-push__topics { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13px; color: var(--text-2); }
.ad-push__topics { padding-left: 16px; }
.ad-push__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-hint { margin: 0; font-size: 12.5px; color: var(--text-3); }

/* --------------------------------------------------------------- e-maily */

.ad-mail {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.ad-mail__list {
  padding: 16px;
  display: grid;
  gap: 4px;
  align-content: start;
}
.ad-mail__list .ad-section__head { margin-bottom: 6px; }
.ad-mail__item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ad-mail__item:hover { background: #f3f7fb; }
.ad-mail__item.is-active { background: #eaf3fc; border-color: #cfe4f7; }
.ad-mail__item b { font-size: 13px; color: var(--text); }
.ad-mail__item span {
  overflow: hidden;
  color: var(--text-3);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ad-mail__editor { padding: 20px; }
.ad-mail__preview {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e3ebf2;
}
.ad-mail__preview .ad-section__head { margin-bottom: 10px; }
.ad-mail__preview h4 { margin: 0 0 3px; font-size: 14px; }
.ad-mail__preview p { margin: 0; color: var(--text-3); font-size: 12px; }
.ad-mail__preview iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 1px solid #dbe6ef;
  border-radius: 10px;
  background: #f1f5f9;
}
@media (max-width: 600px) {
  .ad-mail__preview iframe { height: 260px; }
}
.ad-mail__vars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--text-3);
  font-size: 12px;
}
.ad-mail__var {
  padding: 4px 9px;
  border: 1px solid #d7e2ec;
  border-radius: 999px;
  background: #f7fafc;
  color: #315a78;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.ad-mail__var:hover { border-color: var(--brand); color: var(--brand); }
.ad-mail__send {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e3ebf2;
}
.ad-mail__send h4 { margin: 0 0 4px; font-size: 14px; }
.ad-mail__send p { max-width: 460px; margin: 0; color: var(--text-3); font-size: 12px; line-height: 1.5; }
.ad-mail__send form { display: flex; align-items: end; gap: 8px; }
.ad-mail__send .ad-field { min-width: 230px; }

/* -------------------------------------------------------------- soubory */

.ad-downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.ad-download {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}
.ad-download__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ad-download__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eaf3fc;
  color: var(--brand);
}
.ad-download__icon svg { width: 22px; height: 22px; }
.ad-download__body { flex: 1; }
.ad-download__body h3 { margin: 0 0 2px; font-size: 16px; }
.ad-download__sub { margin: 0 0 8px !important; color: var(--brand) !important; font-size: 12px !important; font-weight: 600; }
.ad-download__body p { margin: 0; color: var(--text-3); font-size: 13px; line-height: 1.55; }
.ad-download__features { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.ad-download__features li { position: relative; padding-left: 18px; color: #3d566b; font-size: 12.5px; }
.ad-download__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b9d9f3;
  box-shadow: 0 0 0 3px #eef6fd;
}
.ad-download__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 2px; }
.ad-download__meta { color: var(--text-3); font-size: 11px; }
.ad-download__note {
  margin: 0 !important;
  padding-top: 10px;
  border-top: 1px solid #e8eef4;
  color: var(--text-3) !important;
  font-size: 11.5px !important;
  line-height: 1.45 !important;
}
.ad-downloads__note { margin: 14px 2px 0; color: var(--text-3); font-size: 11.5px; }
.ad-btn.is-disabled { opacity: .6; pointer-events: none; }

@media (max-width: 900px) {
  .ad-mail { grid-template-columns: 1fr; }
  .ad-mail__send { grid-template-columns: 1fr; align-items: start; }
  .ad-mail__send form,
  .ad-mail__send .ad-field { width: 100%; min-width: 0; }
}

/* ------------------------------------------------------------ směny řidičů */

.ad-shift-list { display: grid; gap: 16px; margin-top: 18px; }

.ad-shift {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-s);
}
.ad-shift.is-open {
  border-color: rgba(18, 136, 90, .32);
  box-shadow: 0 0 0 1px rgba(18, 136, 90, .06), var(--shadow-m);
}
.ad-shift__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ad-shift__head h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  letter-spacing: -.015em;
}
.ad-shift__head p { margin: 4px 0 0; color: var(--text-3); font-size: 12px; }
.ad-shift__plate {
  padding: 2px 7px;
  border: 1px solid #cfdbe8;
  border-radius: 5px;
  background: #f4f9ff;
  color: #0a2337;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
}

.ad-shift__facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--paper);
}
.ad-shift__facts div { min-width: 0; }
.ad-shift__facts span {
  display: block;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ad-shift__facts b { display: block; margin-top: 3px; font-size: 13px; color: var(--text); white-space: nowrap; }

.ad-shift__photos { margin-top: 16px; }
.ad-shift__label {
  margin: 0 0 8px;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

.ad-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--text-3);
  font-size: 11.5px;
}
.ad-check b { color: var(--text); font-weight: 600; }
.ad-check__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #12885a;
  font-weight: 700;
}
.ad-check__state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.ad-check.is-warn { border-color: rgba(196, 132, 18, .35); background: #fffaf0; }
.ad-check.is-warn .ad-check__state { color: #a26a00; }
.ad-check__issues {
  flex-basis: 100%;
  margin: 2px 0 0;
  padding-left: 16px;
  color: var(--text-2);
}
.ad-check__issues li { margin-top: 3px; }

.ad-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.ad-photo {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.ad-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.ad-photo:hover img { transform: scale(1.04); }
.ad-photo span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 5px 7px;
  background: linear-gradient(transparent, rgba(6, 23, 34, .82));
  color: #eef8ff;
  font-size: 10.5px;
  font-weight: 600;
}

.ad-shift__fuel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}
.ad-shift__fuel summary {
  padding: 10px 12px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ad-shift__fuel ul { display: grid; gap: 6px; margin: 0; padding: 0 12px 12px; list-style: none; }
.ad-shift__fuel li {
  position: relative;
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}
.ad-shift__fuel li span { display: block; color: var(--text); }
.ad-shift__fuel li small { display: block; margin-top: 2px; color: var(--text-3); font-size: 10.5px; }
.ad-shift__fuel li a { position: absolute; right: 10px; top: 8px; font-size: 11px; color: var(--brand); }

@media (max-width: 1000px) {
  .ad-shift__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .ad-shift { padding: 16px; }
  .ad-shift__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-shift__head { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ----------------------------------------------------- zprávy řidičům */

.ad-driver-msg-layout {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.ad-driver-msg-form,
.ad-driver-msg-history { padding: 20px; }
.ad-driver-msg-form h3,
.ad-driver-msg-history h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 16px;
}
.ad-driver-msg-form .ad-field { margin-bottom: 12px; }
.ad-driver-msg-form .ad-form__hint { margin-top: 12px; }
.ad-driver-msg-list { display: grid; gap: 10px; }
.ad-driver-msg {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}
.ad-driver-msg header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ad-driver-msg h4 { margin: 0; font-size: 14px; }
.ad-driver-msg header p { margin: 3px 0 0; color: var(--text-3); font-size: 11px; }
.ad-driver-msg__text {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.ad-driver-msg footer { display: flex; justify-content: flex-end; margin-top: 10px; }

.ad-shift__gps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #f7fbff;
}
.ad-shift__gps-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(18, 136, 90, .12);
}
.ad-shift__gps div { flex: 1; min-width: 0; }
.ad-shift__gps b { display: block; font-size: 12px; }
.ad-shift__gps small { display: block; margin-top: 2px; color: var(--text-3); font-size: 10.5px; line-height: 1.4; }

@media (max-width: 1000px) {
  .ad-driver-msg-layout { grid-template-columns: 1fr; }
}
