/* Pigcasso Vouchers — modern UI */

:root {
  --font: "Plus Jakarta Sans", system-ui, sans-serif;

  --bg: #f8f9fc;
  --bg-elevated: #ffffff;
  --bg-muted: #eef1f6;
  --bg-dark: #111827;

  --text: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;

  --accent: #ea580c;
  --accent-hover: #c2410c;
  --accent-soft: rgba(234, 88, 12, 0.1);
  --accent-glow: rgba(234, 88, 12, 0.35);

  --blue: #0ea5e9;
  --blue-soft: rgba(14, 165, 233, 0.12);
  --green: #16a34a;
  --green-soft: rgba(22, 163, 74, 0.12);
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.1);
  --amber: #f59e0b;

  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.1);
  --shadow-accent: 0 12px 32px var(--accent-glow);

  --header-h: 56px;
  --sidebar-w: 260px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.2s var(--ease);

  /* legacy aliases */
  --primary: var(--accent);
  --surface: var(--bg-elevated);
  --text-muted: var(--text-secondary);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
  user-select: none;
  line-height: 1;
}

a { color: inherit; text-decoration: none; }

/* Ambient background */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(234, 88, 12, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 0%, rgba(14, 165, 233, 0.08), transparent 45%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(245, 158, 11, 0.06), transparent 50%),
    var(--bg);
}

/* App shell + sidebar */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  width: var(--sidebar-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.app-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.sidebar-brand__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.sidebar-close {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text-secondary);
  cursor: pointer;
}

.sidebar-loc {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 1rem 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
}

.sidebar-loc .material-symbols-rounded {
  font-size: 1.1rem;
  color: var(--accent);
}

.sidebar-loc a {
  color: var(--accent);
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.65rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-nav__link,
.sidebar-group__toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-nav__link .material-symbols-rounded,
.sidebar-group__toggle .material-symbols-rounded {
  font-size: 1.2rem;
}

.sidebar-nav__link:hover,
.sidebar-group__toggle:hover {
  color: var(--text);
  background: var(--bg-muted);
}

.sidebar-nav__link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.sidebar-nav__link--muted { opacity: 0.85; }

.sidebar-nav__spacer { flex: 1; min-height: 0.5rem; }

.sidebar-group__chevron {
  margin-left: auto;
  font-size: 1rem !important;
  transition: transform 0.15s ease;
}

.sidebar-group.is-open .sidebar-group__chevron {
  transform: rotate(180deg);
}

.sidebar-group__items {
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.15rem 0 0.35rem 0.35rem;
  margin-left: 0.85rem;
  border-left: 2px solid var(--border);
}

.sidebar-group.is-open .sidebar-group__items {
  display: flex;
}

.sidebar-nav__sublink {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.sidebar-nav__sublink:hover {
  color: var(--text);
  background: var(--bg-muted);
}

.sidebar-nav__sublink.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
}

.sidebar-user__name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell__main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-shell__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(15, 23, 42, 0.35);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(180%);
}

.sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.app-topbar__title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.app-topbar__actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
}

.app-main--guest {
  width: min(1200px, 100%);
  margin: 0 auto;
}

/* Header (legacy — login pages) */
.app-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.app-header__inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand__logo { height: 38px; width: 38px; object-fit: contain; display: block; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1.5rem;
}

.app-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.app-nav__link .material-symbols-rounded { font-size: 1.125rem; }

.app-nav__link:hover {
  color: var(--text);
  background: var(--bg-muted);
}

.app-nav__link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.app-nav__link--muted { opacity: 0.85; }

/* Dropdown: Grupy */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.nav-dropdown__chevron {
  font-size: 1rem !important;
  transition: transform 0.15s ease;
}

.nav-dropdown.is-open .nav-dropdown__chevron {
  transform: rotate(180deg);
}

.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 220px;
  padding: 0.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  z-index: 250;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-dropdown.is-open .nav-dropdown__menu {
  display: flex;
}

.nav-dropdown__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.nav-dropdown__item .material-symbols-rounded {
  font-size: 1.125rem;
}

.nav-dropdown__item:hover {
  color: var(--text);
  background: var(--bg-muted);
}

.nav-dropdown__item.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-header-cta {
  margin-left: auto;
  white-space: nowrap;
}

/* Main */
.app-main {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) clamp(0.75rem, 2.5vw, 1.25rem) clamp(2.5rem, 6vw, 4rem);
  box-sizing: border-box;
}

.app-footer {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
}

.app-footer a {
  color: var(--accent);
  font-weight: 500;
}

.app-footer a:hover { text-decoration: underline; }

/* Toasts */
.toasts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.toast-host {
  position: fixed;
  top: calc(var(--header-h) + 0.75rem);
  right: 1rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast, .flash {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.35s var(--ease);
}

.toast--float {
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.toast--out {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

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

.toast--success, .flash-success {
  background: var(--green-soft);
  color: #166534;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.toast--error, .flash-error {
  background: var(--red-soft);
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.toast__icon, .flash-icon { font-size: 1.25rem; }

.data-table tbody tr.row-clickable {
  cursor: pointer;
}

.data-table tbody tr.row-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.search-panel__grow {
  flex: 1 1 16rem;
  min-width: 12rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.625rem 1.125rem;
  min-height: 42px;
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn .material-symbols-rounded { font-size: 1.125rem; }

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

.btn-accent:hover, .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px var(--accent-glow);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.btn-ghost, .btn-text, .btn-outline {
  background: transparent;
  color: var(--text-secondary);
  box-shadow: none;
}

.btn-ghost:hover, .btn-text:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.btn-outline {
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-lg { padding: 0.75rem 1.375rem; min-height: 48px; font-size: 0.9375rem; }
.btn-sm { padding: 0.4rem 0.75rem; min-height: 34px; font-size: 0.8125rem; }
.btn-block { width: 100%; }

.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  min-height: unset;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.icon-btn:hover {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border);
  transform: none;
  box-shadow: none;
}

.icon-btn--accent:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn--danger:hover { background: var(--red-soft); color: var(--red); }

/* Dashboard */
.dash-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.dash-hero__title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.dash-hero__lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: 1.75rem;
}

.dash-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dash-hero__visual { display: flex; justify-content: center; }

.dash-hero__card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 340px;
  transform: rotate(2deg);
  transition: transform 0.4s var(--ease);
}

.dash-hero__card:hover { transform: rotate(0deg) scale(1.02); }

.dash-hero__logo { height: 180px; width: auto; max-width: 100%; margin-bottom: 1rem; }

.dash-hero__tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Module hub */
.hub-hero {
  margin: 0.5rem 0 1.75rem;
  max-width: 40rem;
  animation: hub-fade-up 0.55s var(--ease) both;
}

.hub-hero__brand {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.hub-hero__title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hub-hero__lead {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 28rem;
}

.hub-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.hub-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.1rem;
  min-height: 7.5rem;
  padding: 1.35rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
  animation: hub-fade-up 0.55s var(--ease) both;
}

.hub-tile:nth-child(1) { animation-delay: 0.05s; }
.hub-tile:nth-child(2) { animation-delay: 0.1s; }
.hub-tile:nth-child(3) { animation-delay: 0.15s; }
.hub-tile:nth-child(4) { animation-delay: 0.2s; }
.hub-tile:nth-child(5) { animation-delay: 0.25s; }
.hub-tile:nth-child(6) { animation-delay: 0.3s; }

.hub-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--hub-accent, var(--accent));
  opacity: 0.9;
}

.hub-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.hub-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hub-tile__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-md);
  font-size: 1.75rem;
  color: var(--hub-accent, var(--accent));
  background: color-mix(in srgb, var(--hub-accent, var(--accent)) 14%, transparent);
}

.hub-tile__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.hub-tile__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.hub-tile__meta {
  margin-top: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hub-accent, var(--accent));
}

.hub-tile__arrow {
  color: var(--text-tertiary);
  font-size: 1.5rem;
  transition: transform 0.28s var(--ease), color 0.28s var(--ease);
}

.hub-tile:hover .hub-tile__arrow {
  color: var(--hub-accent, var(--accent));
  transform: translateX(4px);
}

.hub-tile--vouchery { --hub-accent: #ea580c; }
.hub-tile--wycieczki { --hub-accent: #0284c7; }
.hub-tile--integracje { --hub-accent: #0f766e; }
.hub-tile--urodziny { --hub-accent: #db2777; }
.hub-tile--influencerzy { --hub-accent: #7c3aed; }
.hub-tile--dzis { --hub-accent: #ca8a04; }

@keyframes hub-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-hero,
  .hub-tile {
    animation: none;
  }
  .hub-tile:hover {
    transform: none;
  }
}

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

.metric {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.375rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.metric:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

a.metric--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.metric--link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.metric__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric__icon .material-symbols-rounded { font-size: 1.375rem; }

.metric--all .metric__icon { background: var(--blue-soft); color: var(--blue); }
.metric--active .metric__icon { background: var(--accent-soft); color: var(--accent); }
.metric--done .metric__icon { background: var(--green-soft); color: var(--green); }

.metric__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.metric__label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Bento grid */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.bento__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.375rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.bento__item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.bento__item:hover {
  border-color: rgba(234, 88, 12, 0.25);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.bento__item:hover::before { opacity: 1; }

.bento__item--wide { grid-column: 1 / -1; }

.bento__icon {
  font-size: 1.5rem;
  color: var(--accent);
  background: var(--accent-soft);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.bento__item h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  position: relative;
}

.bento__item p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  position: relative;
}

.bento__arrow {
  margin-left: auto;
  align-self: center;
  color: var(--text-tertiary);
  transition: var(--transition);
  position: relative;
}

.bento__item:hover .bento__arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* Page header (inner pages) */
.page-top {
  margin-bottom: 1.75rem;
}

.page-top__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.page-top h1, .page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.page-top p, .page-header p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.page-header { margin-bottom: 1.75rem; }

/* Panels / cards */
.panel, .form-card, .detail-card, .card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.form-card {
  max-width: none;
  width: 100%;
}

.panel + .panel { margin-top: 1rem; }

.card-heading, .detail-card h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.card-hint, .hint {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Forms — kolumny dopasowują się do szerokości okna */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.75rem 1.25rem;
  align-items: start;
}

.form-group {
  margin-bottom: 1.125rem;
  min-width: 0;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea,
.voucher-select,
.search-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  width: auto;
  max-width: none;
  padding: 0;
  border: none;
  background: transparent;
  accent-color: var(--accent);
}

.form-group input[readonly] {
  background: var(--bg-muted, #f3f4f6);
  color: var(--text);
  cursor: default;
}

.form-checks {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 1.125rem;
}

.form-group .form-checks {
  margin: 0.55rem 0 0;
}

.form-checks--row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
}

.form-checks .checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.form-checks .checkbox-inline input {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--accent);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.voucher-select:focus,
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

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

/* Filters — segmented control */
.filter-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  margin-top: 1rem;
  max-width: 100%;
}

.filter-btn {
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.filter-btn:hover { color: var(--text); }

.filter-btn.active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.filter-divider {
  width: 1px;
  height: 1.25rem;
  background: var(--border);
  margin: 0 0.25rem;
  align-self: center;
}

/* Ewidencja voucherów — styl arkusza */
.data-table-ewidencja thead {
  background: #dbeafe;
}

.data-table-ewidencja thead th {
  color: #0f172a;
}

.data-table-ewidencja thead .sort-link {
  color: #1e293b;
}

.data-table-ewidencja thead .sort-link:hover {
  color: #0f172a;
}

.data-table-ewidencja thead .sort-active {
  color: #0f172a;
}

.data-table-ewidencja thead .sort-link::after {
  color: #334155;
  opacity: 0.7;
}

.data-table-ewidencja thead .sort-active::after {
  color: var(--accent);
  opacity: 1;
}

.data-table-ewidencja thead .col-muted,
.data-table-ewidencja thead .col-realizacja {
  background: #dbeafe;
}

.data-table-ewidencja .col-muted {
  background: rgba(148, 163, 184, 0.12);
}

.data-table-ewidencja .col-realizacja {
  background: rgba(254, 243, 199, 0.5);
}

.data-table-ewidencja .col-realizacja--empty {
  background: rgba(254, 243, 199, 0.85);
}

.opcja-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.3;
}

.opcja-pill--ulgowy {
  background: #2155a3;
  color: #fff;
}

.opcja-pill--normalny {
  background: #9c251d;
  color: #fff;
}

.opcja-pill--ulgowy-dodatkowa {
  background: #3e6b48;
  color: #c5dcc5;
}

.opcja-pill--normalny-dodatkowa {
  background: #f8cecc;
  color: #a92424;
}

.opcja-pill--default {
  background: #e2e8f0;
  color: #334155;
}

.opcja-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.opcja-picker__item {
  display: block;
  cursor: pointer;
}

.opcja-picker__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.opcja-picker__item .opcja-pill {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 0 0 0 2px transparent;
}

.opcja-picker__item:hover .opcja-pill {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.opcja-picker__item input:checked + .opcja-pill {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 0 3px var(--accent);
}

.opcja-picker__item input:focus-visible + .opcja-pill {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.paragon-check {
  display: inline-flex;
  color: var(--text-tertiary);
}

.paragon-check--on {
  color: #15803d;
}

.paragon-check .material-symbols-rounded {
  font-size: 1.25rem;
}

.col-center {
  text-align: center;
}

.cell-nowrap {
  white-space: nowrap;
}

.radio-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
}

.radio-pill:has(input:checked) {
  border-color: var(--accent);
  background: rgba(234, 88, 12, 0.08);
  color: var(--accent);
}

.radio-pill input {
  accent-color: var(--accent);
}

.form-group--checkbox {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.5rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

/* Table */
.table-wrap {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-wrap--scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.6) transparent;
}

.table-wrap--scroll::-webkit-scrollbar {
  height: 10px;
}

.table-wrap--scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 0 0.5rem;
}

.table-wrap--scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-elevated);
}

.table-wrap--scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.75);
}

.table-wrap--scroll .data-table-ewidencja {
  min-width: 1180px;
  width: max-content;
}

.table-wrap--scroll .data-table-ewidencja th,
.table-wrap--scroll .data-table-ewidencja td {
  white-space: nowrap;
}

.table-wrap--scroll .data-table-ewidencja .cell-truncate {
  max-width: 200px;
}

.table-wrap--scroll .data-table-ewidencja th:last-child,
.table-wrap--scroll .data-table-ewidencja td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--bg-elevated);
  box-shadow: -6px 0 10px -6px rgba(15, 23, 42, 0.12);
}

.table-wrap--scroll .data-table-ewidencja thead th:last-child {
  background: #dbeafe;
  z-index: 3;
}

.table-wrap--scroll .data-table-ewidencja tbody tr:hover td:last-child {
  background: #fffaf5;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--bg-muted);
}

.data-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.data-table td {
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(234, 88, 12, 0.03);
}

.data-table td strong {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
}

.sort-link:hover { color: var(--accent); }

.sort-link::after {
  font-family: "Material Symbols Rounded";
  content: "swap_vert";
  font-size: 0.875rem;
  opacity: 0.4;
}

.sort-link.sort-active::after { opacity: 1; color: var(--accent); }
.sort-link.sort-active.sort-asc::after { content: "arrow_upward"; }
.sort-link.sort-active.sort-desc::after { content: "arrow_downward"; }

.row-actions {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
}

.cell-truncate {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

.cell-center { text-align: center; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-aktywny { background: var(--green-soft); color: #15803d; }
.badge-zrealizowany { background: var(--blue-soft); color: #0369a1; }
.badge-anulowany { background: var(--red-soft); color: #b91c1c; }

.badge-sklep {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}

.badge-zamowienie--oczekuje-platnosci { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-zamowienie--oplacone { background: var(--blue-soft); color: #0369a1; }
.badge-zamowienie--voucher-wyslany { background: var(--green-soft); color: #15803d; }
.badge-zamowienie--blad { background: var(--red-soft); color: #b91c1c; }
.badge-zamowienie--anulowane { background: rgba(100, 116, 139, 0.15); color: #475569; }

.detail-side-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel--shop-order {
  border-color: rgba(234, 88, 12, 0.25);
  background: linear-gradient(180deg, rgba(234, 88, 12, 0.04), transparent);
}

.shop-order-error {
  color: #b91c1c;
  font-size: 0.8125rem;
  font-weight: 500;
}

.order-id {
  font-size: 0.75rem;
  white-space: nowrap;
}

.shop-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.shop-alert--warn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #92400e;
}

.shop-alert--warn .material-symbols-rounded {
  color: #d97706;
  flex-shrink: 0;
}

.shop-alert--warn strong {
  display: block;
  margin-bottom: 0.15rem;
}

.shop-alert--warn span {
  font-size: 0.875rem;
  opacity: 0.9;
}

.shop-alert--dashboard {
  align-items: center;
  background: rgba(234, 88, 12, 0.08);
  border: 1px solid rgba(234, 88, 12, 0.2);
  margin: 0 0 1.25rem;
}

.shop-alert--dashboard .material-symbols-rounded {
  color: var(--accent);
  font-size: 1.5rem;
}

.shop-alert__body {
  flex: 1;
  min-width: 0;
}

.shop-alert__body p {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.shop-alert--zadatek {
  background: rgba(220, 38, 38, 0.07);
  border: 1px solid rgba(220, 38, 38, 0.22);
}

.shop-alert--zadatek .material-symbols-rounded {
  color: #dc2626;
}

.shop-alert--zadatek.shop-alert--dashboard .material-symbols-rounded {
  color: #dc2626;
}

.shop-alert--zadatek strong {
  color: #991b1b;
}

.zadatek-alert-list {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.zadatek-alert-list a {
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.zadatek-alert-list .text-muted {
  font-size: 0.8125rem;
}

.data-table tr.row--danger td {
  background: rgba(185, 28, 28, 0.04);
}

.data-table tr.row--warn td {
  background: rgba(245, 158, 11, 0.05);
}

.data-table tr.row--zadatek td {
  background: rgba(220, 38, 38, 0.05);
}

.data-table tr.row--zadatek td:first-child {
  box-shadow: inset 3px 0 0 #dc2626;
}

.row-zadatek-flag {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 0.2rem;
  color: #dc2626;
}

.row-zadatek-flag .material-symbols-rounded {
  font-size: 1.15rem;
  line-height: 1;
}

.row-zadatek-name {
  color: #991b1b;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(185, 28, 28, 0.45);
}

.extend-count {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}

.text-muted { color: var(--text-tertiary); }

/* Detail layout */
.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.detail-list {
  display: grid;
  gap: 1rem;
}

.detail-list dt {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.15rem;
}

.detail-list dd { font-size: 0.9375rem; font-weight: 500; }

.action-stack { display: flex; flex-direction: column; gap: 0.5rem; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 1.5rem;
}

.back-link:hover { color: var(--accent); }

/* Search */
.realizacja-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.search-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.search-input {
  flex: 1;
  border-radius: var(--radius-full);
  padding-left: 1.125rem;
}

.search-results-panel {
  margin-top: 1rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s var(--ease), opacity 0.25s;
}

.search-results-panel.is-open {
  max-height: 420px;
  opacity: 1;
}

.search-status {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.search-list { list-style: none; }

.search-result-item {
  border-radius: var(--radius-sm);
  margin-bottom: 0.25rem;
}

.search-result-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.search-result-link:hover {
  background: var(--bg-muted);
}

.search-result-main strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.search-result-main span { font-size: 0.8125rem; color: var(--text-secondary); }

.search-result-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.search-result-type { font-size: 0.6875rem; color: var(--text-tertiary); }

/* Modal — dopasowanie do viewportu (szerokość + wysokość) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  align-items: safe center;
  justify-content: center;
  padding:
    max(0.75rem, env(safe-area-inset-top, 0px))
    max(0.75rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px))
    max(0.75rem, env(safe-area-inset-left, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  width: min(26.25rem, 100%);
  max-height: min(90dvh, calc(100vh - 1.5rem));
  margin: auto;
  padding: clamp(1.125rem, 3vw, 1.75rem);
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s var(--ease);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-box h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.modal-box p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.modal-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.modal-body p { margin-bottom: 0.75rem; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body a { color: var(--accent); font-weight: 600; }
.modal-body code {
  font-size: 0.8125rem;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
}

.modal-box--error h2 { color: var(--red); }
.modal-box--success h2 { color: var(--green, #16a34a); }
.modal-box--warning h2 { color: var(--amber, #d97706); }

.modal-box--error {
  border-top: 3px solid var(--red);
}

.modal-box--success {
  border-top: 3px solid var(--green, #16a34a);
}

.modal-box--warning {
  border-top: 3px solid var(--amber, #d97706);
}

.modal-warning { color: var(--red) !important; }

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.modal-actions .btn {
  flex: 1 1 auto;
  min-width: min(100%, 7.5rem);
}

body.modal-open { overflow: hidden; }

/* History */
.history-card {
  margin-top: 1rem;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.history-card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.history-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.history-item {
  display: grid;
  grid-template-columns: 110px 90px 1fr;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  border-left: 3px solid var(--border-strong);
}

.history-utworzenie { border-left-color: var(--green); }
.history-edycja { border-left-color: var(--blue); }
.history-przedluzenie { border-left-color: var(--accent); }
.history-realizacja { border-left-color: var(--text); }
.history-usuniecie { border-left-color: var(--red); }

.history-date { color: var(--text-tertiary); font-size: 0.75rem; }
.history-op { font-weight: 600; }
.history-detail { color: var(--text-secondary); }

/* Voucher preview */
.preview-layout { display: flex; flex-direction: column; gap: 1.25rem; }

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.voucher-preview { max-width: 560px; margin: 0 auto; width: 100%; }

.voucher-border {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.voucher-border::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--amber), var(--blue));
}

.voucher-header { text-align: center; margin-bottom: 1.25rem; }
.voucher-logo { height: 100px; width: auto; }
.voucher-subbrand { color: var(--accent); font-weight: 600; font-size: 0.875rem; margin-top: 0.35rem; }
.voucher-title { text-align: center; font-size: 1.125rem; font-weight: 700; letter-spacing: 0.04em; margin: 1rem 0; }
.voucher-recipient { text-align: center; font-size: 1rem; margin-bottom: 1.25rem; }

.voucher-details { max-width: 380px; margin: 0 auto 1.25rem; }

.voucher-detail-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.5rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

.voucher-detail-row dt {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.voucher-detail-row dd { font-size: 0.875rem; font-weight: 500; margin: 0; }

.voucher-note {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.voucher-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.pdf-embed-section {
  margin-top: 0.5rem;
}

.pdf-embed-section .card-heading {
  text-align: center;
  margin-bottom: 1rem;
}

.pdf-embed {
  width: 100%;
  max-width: 560px;
  height: 780px;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: block;
  margin: 0 auto;
}

.card-heading-icon {
  color: var(--accent);
  vertical-align: -3px;
  margin-right: 0.35rem;
  font-size: 1.25rem;
}

.card-heading-icon--blue { color: var(--blue); }

.empty-state, .empty-state-inline {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

code {
  font-size: 0.8125em;
  padding: 0.125rem 0.375rem;
  background: var(--bg-muted);
  border-radius: 4px;
}

.results h2 { font-size: 0.875rem; color: var(--text-secondary); margin: 1.5rem 0 0.75rem; }

.inline-form { display: inline; }

/* Legacy class compat */
.main { width: 100%; padding: 0; }
.header, .footer, .flash-wrap { /* mapped above */ }
.stats-grid, .cards-grid, .hero, .hero-logo, .hero-lead, .hero-actions,
.stat-card, .stat-num, .stat-label, .stat-active, .stat-done,
.nav, .nav-link, .nav-link-accent, .logo, .logo-img,
.md-top-app-bar, .md-nav-bar, .md-nav-item, .md-nav-icon,
.md-headline-large, .md-title-large, .md-body-medium, .md-label-medium,
.md-elevated-card, .md-filled-button, .md-outlined-button, .md-text-button,
.md-snackbar { /* unused but harmless */ }

/* Responsive */
@media (max-width: 900px) {
  .sidebar-toggle { display: inline-flex; }
  .sidebar-close { display: inline-flex; align-items: center; justify-content: center; }
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease);
  }
  .app-sidebar.is-open { transform: translateX(0); }
  .app-shell__backdrop:not([hidden]) { display: block; }
  .app-shell__main { margin-left: 0; }
  .topbar-cta-label { display: none; }
  .dash-hero { grid-template-columns: 1fr; }
  .dash-hero__visual { order: -1; }
  .dash-hero__card { transform: none; max-width: 100%; }
  .hub-tiles { grid-template-columns: 1fr; }
  .hub-tile { min-height: 6.5rem; }
  .metrics { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento__item--wide { grid-column: auto; }
  .detail-grid, .realizacja-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .btn-header-cta span:last-child { display: none; }
  .btn-header-cta { padding: 0 0.75rem; min-width: 44px; }

  .app-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    margin-left: 0;
  }

  .app-nav.is-open { display: flex; }

  .app-nav__link {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
  }

  .nav-dropdown__menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 0.75rem;
    min-width: 0;
  }

  .nav-dropdown.is-open .nav-dropdown__menu {
    display: flex;
  }

  .app-header__inner { position: relative; flex-wrap: wrap; }

  .history-item { grid-template-columns: 1fr; }
  .search-result-link { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .row-actions { flex-wrap: wrap; }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn,
  .modal-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .page-top h1,
  .page-header h1 {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }
}

@media (max-width: 480px) {
  .panel,
  .form-card,
  .detail-card,
  .card {
    padding: 0.875rem;
    border-radius: var(--radius-md);
  }

  .form-group input,
  .form-group select,
  .form-group textarea,
  .voucher-select,
  .search-input {
    padding: 0.7rem 0.85rem;
    font-size: 1rem; /* unika zoomu iOS */
  }

  .login-card {
    padding: 1.25rem;
  }
}

@media print {
  .app-header, .app-sidebar, .app-topbar, .app-footer, .no-print, .toasts, .flash-wrap { display: none !important; }
  .app-shell__main { margin-left: 0 !important; }
  body { background: white; }
  .app-main { padding: 0; max-width: none; }
  .voucher-border { box-shadow: none; }
}

/* Login */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
}

.login-card {
  width: min(400px, 100%);
  text-align: center;
  padding: 2rem;
}

.login-logo { height: 160px; width: auto; max-width: 100%; margin-bottom: 0.5rem; }
.login-card h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.login-lead { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.875rem; }
.login-form { text-align: left; }
.login-hint { margin-top: 1rem; font-size: 0.75rem; color: var(--text-tertiary); }

/* Header extras */
.header-loc {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

.header-loc .material-symbols-rounded { font-size: 1rem; color: var(--accent); }
.header-loc__link { color: var(--accent); text-decoration: none; }
.header-loc__link:hover { text-decoration: underline; }

.header-user {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.header-user__name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.header-user__link {
  text-decoration: none;
  color: var(--text-secondary);
}

.header-user__link:hover {
  color: var(--accent);
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
}

.godzina-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 9rem);
  gap: 0.5rem;
  align-items: stretch;
}

.godzina-picker select,
.godzina-picker input {
  width: 100%;
  min-width: 0;
}

@media (max-width: 520px) {
  .godzina-picker {
    grid-template-columns: 1fr;
  }
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 0.15rem;
}

.checkbox-grid .checkbox-inline,
.checkbox-grid > label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 0.55rem 0.9rem;
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  color: var(--text);
  transition: var(--transition);
}

.checkbox-grid .checkbox-inline:hover,
.checkbox-grid > label:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.checkbox-grid .checkbox-inline:has(input:checked),
.checkbox-grid > label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.checkbox-grid input[type="checkbox"] {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--accent);
}

@media (max-width: 480px) {
  .checkbox-grid .checkbox-inline,
  .checkbox-grid > label {
    white-space: normal;
    width: 100%;
  }
}

/* Location picker */
.loc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.loc-card {
  display: block;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.loc-card input { display: none; }
.loc-card:hover { border-color: var(--accent); }
.loc-card.is-selected, .loc-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.loc-card__city { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.loc-card__addr { display: block; font-size: 0.75rem; color: var(--text-secondary); }
.loc-card__pref { display: block; font-size: 0.6875rem; color: var(--text-tertiary); margin-top: 0.35rem; }

.loc-card__mods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-full, 999px);
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.loc-chip .material-symbols-rounded { font-size: 0.875rem; }

.loc-chip--vouchery {
  background: rgba(234, 88, 12, 0.12);
  color: var(--accent);
}

.loc-chip--wycieczki {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.loc-chip--influencerzy {
  background: rgba(236, 72, 153, 0.12);
  color: #db2777;
}

.loc-chip--integracje {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

/* Wycieczki status badges */
.badge-do_potwierdzenia { background: var(--blue-soft); color: #0369a1; }
.badge-potwierdzona { background: var(--green-soft); color: #15803d; }
/* Legacy (inne moduły) */
.badge-zapytanie { background: var(--blue-soft); color: #0369a1; }
.badge-oferta { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-zrealizowana { background: rgba(100, 116, 139, 0.15); color: #475569; }
.badge-anulowana { background: var(--red-soft); color: #b91c1c; }
.badge-negocjacje { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-opublikowana { background: rgba(16, 185, 129, 0.15); color: #047857; }

/* Kalendarz — filtry typów */
.cal-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
}

.cal-filters__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 0.25rem;
}

.cal-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  background: #fff;
}

.cal-filter-chip input { accent-color: var(--accent); }

.cal-filter-chip--wycieczki:has(input:checked) {
  border-color: #4285f4;
  background: rgba(66, 133, 244, 0.1);
  color: #1a73e8;
}

.cal-filter-chip--integracje:has(input:checked) {
  border-color: #0d9488;
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
}

.cal-filter-chip--influencerzy:has(input:checked) {
  border-color: #ea580c;
  background: rgba(234, 88, 12, 0.1);
  color: #c2410c;
}

.cal-type-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.cal-type-pill--wycieczki { background: rgba(66, 133, 244, 0.15); color: #1a73e8; }
.cal-type-pill--integracje { background: rgba(13, 148, 136, 0.15); color: #0f766e; }
.cal-type-pill--influencerzy { background: rgba(234, 88, 12, 0.15); color: #c2410c; }

.cal-event--wycieczki { box-shadow: inset 3px 0 0 #4285f4; }
.cal-event--integracje { box-shadow: inset 3px 0 0 #0d9488; }
.cal-event--influencerzy { box-shadow: inset 3px 0 0 #ea580c; }

.settings-subtitle {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

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

.text-accent {
  color: var(--accent);
  font-size: 1.125rem;
  vertical-align: middle;
}

/* Kalendarz wycieczek */
.cal-shell {
  padding: 1.25rem;
  overflow: hidden;
}

.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.cal-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0 0.5rem;
  min-width: 10rem;
}

.cal-view-switch .filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  cursor: pointer;
  font: inherit;
}

.cal-view-switch .filter-btn .material-symbols-rounded {
  font-size: 1.125rem;
}

.cal-view { min-height: 12rem; }

.cal-event {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-event:hover {
  opacity: 0.9;
  text-decoration: none;
  transform: translateY(-1px);
}

.cal-event__time {
  opacity: 0.85;
  margin-right: 0.15rem;
}

/* Podgląd rezerwacji po najechaniu */
.cal-preview {
  position: fixed;
  z-index: 400;
  width: min(280px, calc(100vw - 16px));
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  pointer-events: auto;
  font-size: 0.8125rem;
}

.cal-preview[hidden] {
  display: none !important;
}

.cal-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.cal-preview__type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cal-preview__head--wycieczki .cal-preview__type { color: #1a73e8; }
.cal-preview__head--integracje .cal-preview__type { color: #0f766e; }
.cal-preview__head--influencerzy .cal-preview__type { color: #c2410c; }

.cal-preview__title {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.cal-preview__row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.3rem;
  align-items: start;
}

.cal-preview__label {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.cal-preview__value {
  color: var(--text);
  word-break: break-word;
}

.cal-preview__hint {
  margin: 0.65rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.cal-preview--wycieczki { border-left: 3px solid #4285f4; }
.cal-preview--integracje { border-left: 3px solid #0d9488; }
.cal-preview--influencerzy { border-left: 3px solid #ea580c; }

/* Tydzień */
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  min-height: 18rem;
}

.cal-week__col {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  min-height: 14rem;
}

.cal-week__col.is-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.25);
}

.cal-week__head {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cal-week__dow {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.cal-week__num {
  font-size: 1.125rem;
  font-weight: 700;
}

.cal-week__col.is-today .cal-week__num {
  color: var(--accent);
}

.cal-week__body {
  padding: 0.5rem;
  flex: 1;
  overflow-y: auto;
}

.cal-week__empty {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Miesiąc */
.cal-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cal-month__dow {
  background: var(--bg-muted);
  padding: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-align: center;
}

.cal-month__cell {
  background: var(--bg-elevated);
  min-height: 6.5rem;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cal-month__cell.is-outside {
  background: var(--bg-muted);
  opacity: 0.65;
}

.cal-month__cell.is-today .cal-month__num {
  background: var(--accent);
  color: #fff;
}

.cal-month__num {
  align-self: flex-end;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
}

.cal-month__events {
  flex: 1;
  overflow: hidden;
}

.cal-month__more {
  font-size: 0.625rem;
  color: var(--text-tertiary);
  padding-left: 0.25rem;
}

@media (max-width: 900px) {
  .cal-week {
    grid-template-columns: 1fr;
  }

  .cal-week__col {
    min-height: auto;
  }

  .cal-month__cell {
    min-height: 4.5rem;
  }

  .cal-event__title {
    display: none;
  }
}

@media (max-width: 640px) {
  .cal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .cal-view-switch {
    justify-content: center;
  }

  .cal-title {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }
}

/* Import wycieczek */
.page-top__lead {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-top: 0.35rem;
  max-width: 42rem;
}

.import-help {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.import-help__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.import-help__title .material-symbols-rounded {
  color: var(--accent);
  font-size: 1.25rem;
}

.import-help__steps {
  margin: 0 0 0.75rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.import-help__hint {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin: 0;
}

.import-form { max-width: none; width: 100%; }

.form-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
}

.form-meta {
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.form-meta strong {
  color: var(--text);
  font-weight: 600;
}

.import-preview { margin-bottom: 1.25rem; }

.import-preview__meta {
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.import-preview__more {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

.import-messages {
  list-style: none;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.import-messages--warn {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

.import-messages--error {
  background: var(--red-soft);
  color: #b91c1c;
}

.import-messages li + li { margin-top: 0.25rem; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.form-group--checkbox { margin-bottom: 0.5rem; }

/* Google Calendar panel */
.gcal-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
}

.gcal-panel__status {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 220px;
}

.gcal-panel__status .material-symbols-rounded {
  font-size: 1.5rem;
  color: var(--text-tertiary);
  margin-top: 0.1rem;
}

.gcal-panel__status--ok .material-symbols-rounded { color: #15803d; }
.gcal-panel__status--warn .material-symbols-rounded { color: #b45309; }

.gcal-panel__status strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 0.15rem;
}

.gcal-panel__meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
}

.gcal-panel__meta code {
  font-size: 0.75rem;
  background: var(--bg-muted);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.gcal-panel__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gcal-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.gcal-hint .material-symbols-rounded { font-size: 1rem; }

/* Admin — ustawienia */
.settings-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.settings-toc {
  position: sticky;
  top: calc(var(--header-h, 4rem) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - var(--header-h, 4rem) - 2rem);
  overflow-y: auto;
}

.settings-toc__group {
  margin: 0.65rem 0 0.25rem;
  padding: 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.settings-toc__group:first-child {
  margin-top: 0;
}

.settings-toc__link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.settings-toc__link .material-symbols-rounded {
  font-size: 1.125rem;
  color: var(--text-tertiary);
}

.settings-toc__link:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.settings-toc__link:hover .material-symbols-rounded {
  color: var(--accent);
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.settings-section-label {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.settings-panel {
  padding: clamp(1.125rem, 2.5vw, 1.5rem);
  scroll-margin-top: calc(var(--header-h, 4rem) + 1rem);
}

.settings-panel--spaced {
  margin-top: 0;
}

.settings-form--danger {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.settings-form--last {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.settings-form__hint {
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}

.settings-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.settings-panel__title {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-width: 0;
  flex: 1 1 16rem;
}

.settings-panel__title .material-symbols-rounded {
  font-size: 1.75rem;
  color: var(--accent);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.settings-panel__title h2 {
  font-size: 1.125rem;
  margin: 0 0 0.25rem;
}

.settings-panel__title p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 42rem;
}

.settings-subcard {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-muted, #f8fafc);
}

.settings-subcard:last-of-type {
  margin-bottom: 1.25rem;
}

.settings-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.settings-badge--ok {
  background: var(--green-soft);
  color: #15803d;
}

.settings-badge--warn {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.settings-form {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.settings-info {
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
}

.settings-info h3 {
  font-size: 0.875rem;
  margin: 0 0 0.5rem;
}

.settings-info p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
}

.settings-code {
  display: block;
  font-size: 0.75rem;
  word-break: break-all;
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.settings-status h3 {
  font-size: 0.9375rem;
  margin: 0 0 0.75rem;
}

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

.settings-status__list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.settings-status__list li span { color: var(--text-secondary); }

.settings-status__list li strong {
  text-align: right;
  min-width: 0;
  word-break: break-word;
}

.settings-status__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.settings-help {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.settings-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.settings-help ol {
  margin: 0.75rem 0 0 1.25rem;
}

.settings-help li + li { margin-top: 0.35rem; }

@media (max-width: 900px) {
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .settings-toc {
    position: static;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem;
  }

  .settings-toc__group {
    flex: 0 0 100%;
    margin: 0.35rem 0 0;
  }

  .settings-toc__group:first-child {
    margin-top: 0;
  }

  .settings-toc__link {
    padding: 0.4rem 0.65rem;
    background: var(--bg-muted);
    font-size: 0.75rem;
  }

  .settings-toc__link .material-symbols-rounded {
    font-size: 1rem;
  }
}

.email-send-panel {
  margin-top: 1.5rem;
}

.email-send-panel__header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.email-send-panel__header .material-symbols-rounded {
  font-size: 1.75rem;
  color: var(--accent);
}

.email-send-panel__header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
}

.email-send-form textarea {
  font-family: inherit;
  line-height: 1.5;
}

.metrics--reports {
  grid-template-columns: repeat(4, 1fr);
}

.metric--reports-alt .metric__icon {
  background: var(--purple-soft, #f3e8ff);
  color: var(--purple, #7c3aed);
}

.metric__sub {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.report-filters {
  margin-bottom: 1.5rem;
}

.report-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.report-filters__row .form-group {
  flex: 1 1 10rem;
  min-width: 8rem;
  margin-bottom: 0;
}

.report-filters__actions {
  flex: 0 0 auto;
}

.report-export {
  margin-bottom: 1.5rem;
}

.report-export__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
}

.report-export__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.report-export__label {
  font-weight: 600;
  font-size: 0.875rem;
  min-width: 7rem;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.report-grid__wide {
  grid-column: 1 / -1;
}

.report-tables {
  margin-bottom: 1.5rem;
}

.data-table-compact th,
.data-table-compact td {
  padding: 0.5rem 0.75rem;
}

.page-top__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 900px) {
  .metrics--reports {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .metrics--reports {
    grid-template-columns: 1fr;
  }
}

.search-panel {
  margin-bottom: 1.5rem;
}

.search-panel__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.search-panel__row .form-group {
  flex: 1 1 12rem;
  min-width: 9rem;
  margin-bottom: 0;
}

.search-panel__actions {
  flex: 0 0 auto;
}

.search-panel__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.shop-cennik-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.input-suffix {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-suffix input {
  flex: 1;
}

.input-suffix span {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.settings-form--inline {
  margin-top: 0.75rem;
}

/* Studio day + contact notes */
.studio-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.studio-strip__body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.studio-strip__body .material-symbols-rounded {
  color: var(--accent);
  font-size: 1.5rem;
}

.studio-strip__body p {
  margin: 0.15rem 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.studio-day {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.studio-day__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.studio-day__header h2 {
  font-size: 1.125rem;
  font-weight: 700;
}

.studio-day__date {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
}

.studio-day__count {
  min-width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
}

.studio-day__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.studio-day__item {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  transition: var(--transition);
}

.studio-day__item:hover {
  background: var(--accent-soft);
}

.studio-day__time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.studio-day__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.studio-day__meta {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.kontakt-notes {
  margin-top: 1.25rem;
}

.kontakt-notes__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.kontakt-notes__item {
  padding: 0.75rem 1rem;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}

.kontakt-notes__meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.kontakt-notes__item p {
  margin: 0;
  white-space: pre-wrap;
}

.kontakt-notes__form textarea {
  width: 100%;
  resize: vertical;
  min-height: 4.5rem;
}

.empty-state--compact {
  padding: 0.75rem 0;
  margin: 0 0 1rem;
  font-size: 0.875rem;
}

.page-top__lead {
  color: var(--text-secondary);
  margin-top: 0.35rem;
  max-width: 36rem;
}

@media (max-width: 640px) {
  .studio-strip {
    flex-direction: column;
    align-items: stretch;
  }
  .studio-day__item {
    grid-template-columns: 3rem 1fr;
  }
  .studio-day__item .badge {
    grid-column: 2;
  }
}

