/* ============================================================
   Osteo Atelier – Panel Zarządzania Gabinetem
   main.css – Complete stylesheet (BEM notation)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ───────────────────────────────── */
:root {
  --color-bg: #f8f8f8;
  --color-blush: #eceded;
  --color-rose: #a8210f;
  --color-rose-dark: #8a1a0c;
  --color-brown: #111111;
  --color-brown-mid: #32373c;
  --color-muted: #7a7a7a;
  --color-border: #e0e0e0;
  --color-white: #ffffff;
  --color-success: #459647;
  --color-danger: #c62828;
  --color-warning: #e0b252;

  --sidebar-width: 220px;
  --topbar-height: 64px;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: 0.2s ease;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; zoom: 1.15; }

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  color: var(--color-brown);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Background pattern removed for clean medical design */

img { max-width: 100%; height: auto; }
a { color: var(--color-rose-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-rose); }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; line-height: 1.3; }

h1 { font-size: 28px; font-weight: 600; font-style: normal; margin-bottom: 16px; color: var(--color-brown); }
h2 { font-size: 22px; font-weight: 600; font-style: normal; margin-bottom: 12px; color: var(--color-brown); }
h3 { font-size: 18px; font-weight: 500; font-style: normal; margin-bottom: 8px; }
h4 { font-size: 16px; font-weight: 500; font-style: normal; }

p { margin-bottom: 12px; }
small { font-size: 13px; color: var(--color-muted); }

/* ── Admin Layout ────────────────────────────────────────── */
.admin-layout {
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-brown);
  color: var(--color-blush);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar__logo {
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid var(--color-brown-mid);
}

.sidebar__logo img { max-width: 140px; }

.sidebar__logo span {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-style: italic;
  font-weight: 300;
  font-size: 20px;
  color: var(--color-blush);
  letter-spacing: 1px;
}

.sidebar__nav {
  flex: 1;
  padding: 16px 0;
  list-style: none;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--color-blush);
  font-weight: 300;
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
  cursor: pointer;
}

.sidebar__link:hover {
  background: var(--color-brown-mid);
  color: var(--color-white);
}

.sidebar__link--active {
  background: var(--color-brown-mid);
  color: var(--color-white);
  border-left-color: var(--color-rose);
}

/* Sidebar group with submenu */
.sidebar__group {
  margin: 0;
}

.sidebar__group-toggle {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  justify-content: flex-start;
  text-align: left;
}

.sidebar__group-toggle .sidebar__arrow {
  margin-left: auto;
}

.sidebar__arrow {
  font-size: 10px;
  opacity: 0.6;
}

.sidebar__submenu {
  padding: 2px 0 4px;
}

.sidebar__sublink {
  display: block;
  padding: 7px 20px;
  font-size: 13px;
  color: var(--color-blush);
  text-decoration: none;
  transition: background var(--transition);
  opacity: 0.8;
  border-left: 3px solid transparent;
}

.sidebar__sublink:hover {
  background: rgba(255,255,255,0.05);
  opacity: 1;
}

.sidebar__sublink--active {
  opacity: 1;
  color: var(--color-white);
  background: rgba(255,255,255,0.1);
  border-left-color: var(--color-rose);
}

.sidebar__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar__label {
  font-size: 14px;
}

.sidebar__bottom {
  margin-top: auto;
}

.sidebar__salon-switcher {
  padding: 12px 20px;
  border-top: 1px solid var(--color-brown-mid);
}

.sidebar__select {
  width: 100%;
  padding: 6px 8px;
  background: var(--color-brown-mid);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--color-blush);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  cursor: pointer;
}

.sidebar__select:focus {
  outline: none;
  border-color: var(--color-rose);
}

.sidebar__user {
  padding: 16px 20px;
  border-top: 1px solid var(--color-brown-mid);
  font-size: 13px;
}

.sidebar__user-name {
  font-weight: 400;
  color: var(--color-white);
}

.sidebar__logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--color-muted);
  font-size: 13px;
  cursor: pointer;
  transition: color var(--transition);
}

.sidebar__logout:hover {
  color: var(--color-blush);
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 90;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-brown);
}

.topbar__hamburger svg { width: 24px; height: 24px; }

.topbar__breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-muted);
  list-style: none;
}

.topbar__breadcrumb-link {
  color: var(--color-muted);
}

.topbar__breadcrumb-link:hover {
  color: var(--color-rose-dark);
}

.topbar__breadcrumb-sep {
  color: var(--color-border);
  margin: 0 2px;
}

.topbar__breadcrumb-current {
  color: var(--color-brown);
  font-weight: 400;
}

.topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-blush);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-rose-dark);
}

.topbar__user-name {
  font-size: 14px;
  color: var(--color-brown);
}

/* ── Main Wrapper & Content ──────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  position: relative;
  z-index: 1;
  overflow-x: clip; /* mobile fix 2026-04-14 – clip zamiast hidden, nie blokuje scroll w komponentach */
}

.main-content {
  padding: 24px;
  padding-top: calc(var(--topbar-height) + 24px);
  min-height: calc(100vh - var(--topbar-height));
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header__title {
  font-family: 'Poppins', sans-serif;
  font-size: 32px;
  font-weight: 300;
  font-style: italic;
  color: var(--color-brown);
  margin-bottom: 0;
}

.page-header__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-header__meta {
  font-size: 13px;
  color: var(--color-muted);
}

.page-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-title {
  font-family: 'Poppins', sans-serif;
  font-size: 32px;
  font-weight: 300;
  font-style: italic;
  color: var(--color-brown);
  margin-bottom: 16px;
}

.page-title--italic {
  font-style: italic;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: 12px;
}

.card__title {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--color-brown);
  margin-bottom: 0;
}

.card__subtitle {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 2px;
}

.card__body {
  padding: 0;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--color-border);
}

.card__hint {
  font-size: 13px;
  color: var(--color-muted);
}

.card__label {
  font-size: 13px;
  color: var(--color-brown-mid);
  font-weight: 400;
  margin-bottom: 4px;
}

.card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}

.card__row:last-child {
  border-bottom: none;
}

.card--highlight {
  border-left: 3px solid var(--color-rose);
}

.card--sm {
  padding: 16px;
}

.card--mobile {
  display: none;
}

.card-grid {
  display: grid;
  gap: 20px;
}

.card-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cards-mobile {
  display: none;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
  min-height: 44px;
  line-height: 1.4;
}

.btn:hover {
  opacity: 0.9;
}

.btn--primary {
  background: var(--color-rose);
  color: var(--color-white);
  border-color: var(--color-rose);
}

.btn--primary:hover {
  background: var(--color-rose-dark);
  border-color: var(--color-rose-dark);
  color: var(--color-white);
}

.btn--danger {
  background: var(--color-danger);
  color: var(--color-white);
  border-color: var(--color-danger);
}

.btn--danger:hover {
  background: #8a3030;
  border-color: #8a3030;
  color: var(--color-white);
}

.btn--outline {
  background: transparent;
  color: var(--color-rose);
  border-color: var(--color-rose);
}

.btn--outline:hover {
  background: var(--color-rose);
  color: var(--color-white);
}

.btn--sm {
  padding: 6px 14px;
  font-size: 13px;
  min-height: 36px;
}

.btn--xs {
  padding: 4px 10px;
  font-size: 12px;
  min-height: 28px;
}

.btn--full {
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Forms ────────────────────────────────────────────────── */
.form {
  width: 100%;
}

.form-group,
.form__group {
  margin-bottom: 18px;
}

.form-label,
.form__label {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-brown-mid);
  margin-bottom: 6px;
}

.form__legend {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--color-brown);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.form__fieldset {
  border: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.form-input,
.input {
  width: 100%;
  padding: 10px 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--color-brown);
  transition: border-color var(--transition), box-shadow var(--transition);
}

/* Clickable table rows */
.table__row--clickable {
  cursor: pointer;
}

.table__row--clickable:hover td {
  background: rgba(201, 137, 122, 0.06);
}

select.input {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a3a30' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-input:focus,
.input:focus {
  outline: none;
  border-color: var(--color-rose);
  box-shadow: 0 0 0 3px rgba(201, 137, 122, 0.15);
}

.form-input::placeholder,
.input::placeholder {
  color: var(--color-muted);
}

.form-input--sm,
.input--sm {
  padding: 6px 10px;
  font-size: 13px;
}

.input--inline {
  display: inline-block;
  width: auto;
}

.input--textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  width: 100%;
  padding: 10px 32px 10px 12px;
  background: var(--color-blush) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a3a30' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--color-brown);
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a3a30' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-select:focus {
  outline: none;
  border-color: var(--color-rose);
  box-shadow: 0 0 0 3px rgba(201, 137, 122, 0.15);
}

.form-select--sm {
  padding: 6px 28px 6px 10px;
  font-size: 13px;
  background-position: right 8px center;
}

.form-textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--color-blush);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--color-brown);
  min-height: 120px;
  resize: vertical;
  transition: border-color var(--transition);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-rose);
  box-shadow: 0 0 0 3px rgba(201, 137, 122, 0.15);
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid--cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.form-grid--cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.form__row {
  display: flex;
  gap: 16px;
}

.form__row--two > * {
  flex: 1;
}

.form__row--three > * {
  flex: 1;
}

.form-checkbox,
.form__checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.form__radio {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form--inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form--upload {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition);
}

.form--upload:hover {
  border-color: var(--color-rose);
}

.form-actions,
.form__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.form__hint {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 4px;
}

.form__hint--warning {
  color: var(--color-warning);
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Tables ──────────────────────────────────────────────── */
.table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.table th,
.data-table th {
  background: var(--color-blush);
  text-align: left;
  padding: 10px 12px;
  color: var(--color-brown-mid);
  font-weight: 500;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table td,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  vertical-align: middle;
}

.table tr:last-child td,
.data-table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td,
.data-table tr:hover td {
  background: rgba(240, 217, 208, 0.15);
}

.table__link {
  color: var(--color-rose-dark);
  font-weight: 400;
}

.table__link:hover {
  color: var(--color-rose);
}

.table__empty,
.data-table__empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--color-muted);
  font-style: italic;
}

.table__check {
  width: 40px;
  text-align: center;
}

/* ── BP & Health badges in client list ──────────────────── */
.table__bp,
.table__health {
  width: 50px;
  text-align: center;
}

.bp-badge,
.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--color-rose);
  text-decoration: none;
  transition: color var(--transition);
}

.bp-badge:hover,
.health-badge:hover {
  color: var(--color-rose-dark);
}

.bp-badge__count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-white);
  background: var(--color-rose);
  border-radius: 10px;
  padding: 0 5px;
  line-height: 1.4;
  min-width: 18px;
  text-align: center;
}

.bp-badge--inline,
.health-badge--inline {
  font-size: 0.85rem;
  gap: 4px;
}

.health-badge {
  color: var(--color-success);
}

.health-badge:hover {
  color: #3a6045;
}

.table-responsive {
  overflow: visible;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

/* ── Dropdown (action menu) ──────────────────────────────── */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown__toggle {
  cursor: pointer;
}

.dropdown__menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 200px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 4px 0;
  z-index: 50;
}

.dropdown.open .dropdown__menu {
  display: block;
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-brown);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s;
  text-align: left;
  line-height: 1.4;
}

.dropdown__item:hover {
  background: var(--color-bg);
  color: var(--color-brown);
}

.dropdown__item svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.dropdown__item:hover svg {
  opacity: 0.8;
}

.dropdown__item--danger {
  color: var(--color-danger);
}

.dropdown__item--danger:hover {
  background: rgba(160, 64, 64, 0.06);
  color: var(--color-danger);
}

.dropdown__item--danger svg {
  opacity: 0.7;
}

.dropdown__divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

.dropdown__menu--up {
  top: auto;
  bottom: calc(100% + 4px);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.badge--done,
.badge--success {
  background: #d4e8d8;
  color: var(--color-success);
}

.badge--booked {
  background: #d0e8f0;
  color: #2a6a8a;
}

.badge--cancelled,
.badge--muted {
  background: #e8e0dc;
  color: var(--color-muted);
}

.badge--role {
  background: rgba(201, 137, 122, 0.2);
  color: var(--color-rose-dark);
}

.badge--action {
  background: var(--color-blush);
  color: var(--color-brown-mid);
}

/* ── Flash Messages ──────────────────────────────────────── */
.flash {
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 100;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash--success {
  background: #d4e8d8;
  color: var(--color-success);
  border: 1px solid #b8d6be;
}

.flash--error {
  background: #f5d4d4;
  color: var(--color-danger);
  border: 1px solid #e8b0b0;
}

.flash--warning {
  background: #f0e6cc;
  color: var(--color-warning);
  border: 1px solid #ddd0a8;
}

/* ── Alert Box ───────────────────────────────────────────── */
.alert-box {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  background: var(--color-white);
}

.alert-box--danger {
  background: #fdf2f2;
  border-color: #e8b0b0;
  color: var(--color-danger);
}

.alert-box__list {
  margin: 8px 0 0 16px;
  font-size: 14px;
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  margin-top: 24px;
}

.pagination__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--color-brown);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.pagination__link:hover {
  background: var(--color-blush);
  color: var(--color-brown);
}

.pagination__link.active {
  background: var(--color-rose);
  color: var(--color-white);
  border-color: var(--color-rose);
}

.pagination__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  font-size: 14px;
  color: var(--color-muted);
}

.pagination__info {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--color-muted);
}

/* ── Toolbar & Filters ───────────────────────────────────── */
.toolbar {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.toolbar__row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toolbar__form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.input--sm {
  padding: 6px 10px;
  font-size: 13px;
  min-width: 80px;
}

.toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* ── Status switcher (inline dropdown) ──────────────────── */
.status-switcher {
  position: relative;
  display: inline-block;
}

.status-switcher__btn {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.status-switcher__btn:hover {
  opacity: 0.8;
}

.status-switcher__menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 4px 0;
  min-width: 140px;
}

.status-switcher__item {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 6px 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.status-switcher__item:hover {
  background: var(--color-blush);
}

.status-switcher__item--active {
  font-weight: 500;
}

.toolbar__clear {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-muted);
  text-decoration: none;
}

.toolbar__clear:hover {
  color: var(--color-danger);
}

.filters-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.filters-bar__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filters-bar__group--actions {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

/* ── Tabs ────────────────────────────────────────────────── */
.tabs {
  margin-bottom: 24px;
}

.tabs__nav {
  display: flex;
  gap: 4px;
  border-bottom: none;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  margin-top: 20px;
  padding: 4px;
  overflow: visible;
  flex-wrap: wrap;
}

.tabs__link {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-brown-mid);
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: 'Poppins', sans-serif;
  border-radius: var(--radius);
  background: transparent;
  line-height: 1.4;
}

.tabs__link:hover {
  color: var(--color-brown);
  background: var(--color-white);
}

.tabs__link.active,
.tabs__link--active,
.tabs__link[data-active] {
  color: var(--color-brown);
  background: var(--color-white);
  box-shadow: 0 1px 3px rgba(46, 31, 26, 0.1);
  font-weight: 500;
}

.tabs__content {
  margin-top: 20px;
}

.tab-pane {
  display: block;
}

/* ── Stat Cards ──────────────────────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}

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

.stat-card__value {
  font-family: 'Poppins', sans-serif;
  font-size: 36px;
  font-weight: 300;
  font-style: italic;
  color: var(--color-rose);
  line-height: 1.2;
}

.stat-card__label {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 4px;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.modal--open {
  display: flex;
}

.modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(46, 31, 26, 0.5);
  z-index: 1000;
}

.modal__dialog {
  position: relative;
  z-index: 1001;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal__content {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1001;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.modal__title {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--color-brown);
  margin-bottom: 0;
}

.modal__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-muted);
  font-size: 20px;
  line-height: 1;
  transition: color var(--transition);
}

.modal__close:hover {
  color: var(--color-brown);
}

.modal__body {
  padding: 24px;
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
}

/* ── Calendar ────────────────────────────────────────────── */
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.calendar-controls__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calendar-controls__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-controls__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.calendar-controls__date {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--color-brown);
}

.calendar-controls__filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Calendar Grid (terminarz) ────────────────────────────── */
.cal {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.cal__day-title {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-style: italic;
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-brown);
}

.cal__grid {
  display: grid;
  min-width: 700px;
}

.cal__grid--week {
  grid-template-columns: 56px repeat(7, 1fr);
}

.cal__grid--day {
  grid-template-columns: 56px 1fr;
}

.cal__corner {
  background: var(--color-blush);
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.cal__day-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: var(--color-blush);
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid rgba(0,0,0,0.04);
  gap: 2px;
}

.cal__day-header--today {
  background: var(--color-rose);
  color: var(--color-white);
}

.cal__day-header--today .cal__day-name,
.cal__day-header--today .cal__day-num {
  color: var(--color-white);
}

.cal__day-name {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-brown-mid);
}

.cal__day-num {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-brown);
}

.cal__time {
  font-size: 11px;
  color: var(--color-muted);
  text-align: right;
  padding: 4px 6px 0 0;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  height: 120px;
  background: var(--color-bg);
}

.cal__cell {
  position: relative;
  border-right: 1px solid rgba(0,0,0,0.04);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  height: 120px;
  min-width: 80px;
  overflow: visible;
}

.cal__cell--day {
  min-width: 0;
}

.cal__cell:hover {
  background: rgba(240, 217, 208, 0.12);
}

.cal__cell-add {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  font-size: 14px;
  line-height: 16px;
  text-align: center;
  color: var(--color-muted);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s;
  text-decoration: none;
}

.cal__cell:hover .cal__cell-add {
  opacity: 1;
}

.cal__cell-add:hover {
  background: var(--color-rose);
  color: #fff;
}

/* Events */
.cal__event {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 3px;
  padding: 2px 4px;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  text-decoration: none;
  color: var(--color-brown);
  z-index: 2;
  cursor: pointer;
  transition: box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0;
  word-break: break-word;
}
.cal__event:hover {
  overflow: visible;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  height: auto !important;
  min-height: fit-content;
  padding: 4px 6px;
  border-radius: 4px;
}

.cal__event--day {
  padding: 6px 10px;
  font-size: 13px;
  gap: 2px;
  overflow: visible;
  min-height: 44px;
}

.cal__event-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal__event-time {
  font-weight: 600;
  font-size: 11px;
  opacity: 0.8;
  white-space: nowrap;
}

.cal__event-client {
  font-weight: 400;
  font-size: 11px;
  line-height: 1.3;
}

.cal__event-service {
  font-size: 10px;
  color: var(--color-brown-mid);
  line-height: 1.3;
}

.cal__event--day .cal__event-time {
  font-size: 13px;
}

.cal__event--day .cal__event-client {
  font-size: 14px;
  font-weight: 500;
}

.cal__event--day .cal__event-service {
  font-size: 12px;
}

.cal__event-staff {
  font-size: 10px;
  color: var(--color-muted);
}

/* Legend */
.cal__legend {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--color-brown-mid);
  flex-wrap: wrap;
}

.cal__legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal__legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* ── Month view ─────────────────────────────────────────── */
.cal__month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-white);
}

.cal__month-header {
  background: var(--color-blush);
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-brown-mid);
  border-bottom: 1px solid var(--color-border);
}

.cal__month-cell {
  min-height: 90px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  position: relative;
}

.cal__month-cell:nth-child(7n) { border-right: none; }

.cal__month-cell--other {
  background: #faf8f6;
  opacity: 0.5;
}

.cal__month-cell--today {
  background: #f0e8df;
}

.cal__month-day {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-brown);
  margin-bottom: 4px;
}

.cal__month-cell--today .cal__month-day {
  color: var(--color-rose);
  font-weight: 600;
}

.cal__month-event {
  display: block;
  font-size: 10px;
  padding: 2px 4px;
  margin-bottom: 2px;
  border-radius: 3px;
  text-decoration: none;
  color: var(--color-brown);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cal__month-event:hover {
  opacity: 0.8;
}

.cal__month-event-time {
  font-weight: 500;
  margin-right: 3px;
}

.cal__month-more {
  display: block;
  font-size: 10px;
  color: var(--color-rose);
  text-decoration: none;
  padding: 1px 4px;
}

.cal__month-more:hover {
  text-decoration: underline;
}

/* Old calendar-grid classes kept for backward compat */
.calendar-grid { display: none; }
.calendar-grid__header { display: none; }
.calendar-grid__day-label { display: none; }

/* ── Upload Zone (drag & drop) ───────────────────────────── */
.upload-zone {
  margin-top: 16px;
}

.upload-zone__droparea {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--color-bg);
}

.upload-zone__droparea:hover,
.upload-zone__droparea.drag-over {
  border-color: var(--color-rose);
  background: rgba(201, 137, 122, 0.06);
}

.upload-zone__icon {
  color: var(--color-muted);
  margin-bottom: 8px;
}

.upload-zone__droparea.drag-over .upload-zone__icon {
  color: var(--color-rose);
}

.upload-zone__text {
  font-size: 14px;
  color: var(--color-brown-mid);
  margin-bottom: 4px;
}

.upload-zone__browse {
  color: var(--color-rose-dark);
  cursor: pointer;
  font-weight: 400;
  text-decoration: underline;
}

.upload-zone__browse:hover {
  color: var(--color-rose);
}

.upload-zone__hint {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 0;
}

.upload-zone__input {
  display: none;
}

/* Preview thumbnails */
.upload-zone__preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.upload-thumb {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-thumb__remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: var(--color-danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.upload-thumb:hover .upload-thumb__remove {
  opacity: 1;
}

.upload-thumb__name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 9px;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-thumb--error {
  border-color: var(--color-danger);
}

.upload-thumb--error::after {
  content: '!';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-danger);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  font-weight: 700;
  font-size: 14px;
}

/* Progress bar */
.upload-zone__progress {
  margin-top: 12px;
}

.upload-zone__progress-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.upload-zone__progress-fill {
  height: 100%;
  background: var(--color-rose);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.upload-zone__progress-text {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 4px;
  display: inline-block;
}

/* Actions & spinner */
.upload-zone__actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.upload-zone__spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Health Grid ─────────────────────────────────────────── */
.health-grid {
  display: grid;
  gap: 0;
  counter-reset: health-q;
}

.health-grid__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 20px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
  counter-increment: health-q;
}

.health-grid__item:last-child {
  border-bottom: none;
}

.health-grid__item:hover {
  background: rgba(240, 217, 208, 0.08);
}

/* Highlight items answered "yes" */
.health-grid__item:has(input[value="yes"]:checked) {
  background: rgba(160, 64, 64, 0.05);
  border-left: 3px solid var(--color-danger);
  padding-left: 17px;
}

.health-grid__question {
  display: flex;
  align-items: center;
  gap: 10px;
}

.health-grid__label {
  font-size: 14px;
  color: var(--color-brown);
  line-height: 1.4;
}

.health-grid__question::before {
  content: counter(health-q) ".";
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
  color: var(--color-rose);
  min-width: 24px;
  flex-shrink: 0;
}

.health-grid__answer {
  display: flex;
  gap: 4px;
}

.health-grid__answer .form__radio {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}

.health-grid__answer .form__radio input[type="radio"] {
  display: none;
}

.health-grid__answer .form__radio span {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 400;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-brown-mid);
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
}

.health-grid__answer .form__radio:first-child span {
  border-radius: var(--radius) 0 0 var(--radius);
}

.health-grid__answer .form__radio:last-child span {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.health-grid__answer .form__radio:not(:first-child) span {
  border-left: none;
}

/* Selected states */
.health-grid__answer .form__radio input[value="yes"]:checked + span {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: var(--color-white);
}

.health-grid__answer .form__radio input[value="no"]:checked + span {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-white);
}

.health-grid__answer .form__radio input[value="unknown"]:checked + span {
  background: var(--color-warning);
  border-color: var(--color-warning);
  color: var(--color-white);
}

.health-grid__comment {
  grid-column: 1 / -1;
  padding-left: 34px;
}

.health-grid__comment input,
.health-grid__comment textarea {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  background: var(--color-bg);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--color-brown-mid);
  transition: border-color 0.15s, background 0.15s;
}

.health-grid__comment input:focus,
.health-grid__comment textarea:focus {
  outline: none;
  border-color: var(--color-rose);
  background: var(--color-blush);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  min-height: 60px;
  resize: vertical;
}

/* ── Photo Grid ──────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.photo-grid__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.photo-grid__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-grid__link {
  display: block;
  width: 100%;
  height: 100%;
}

.photo-grid__desc {
  font-size: 12px;
  color: var(--color-muted);
  padding: 4px;
  text-align: center;
}

.photo-grid__actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}

.photo-grid__item:hover .photo-grid__actions {
  opacity: 1;
}

.photos-group {
  margin-bottom: 24px;
}

.photos-group__title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--color-brown);
  margin-bottom: 12px;
}

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(46, 31, 26, 0.85);
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

/* ── Wizard Steps ────────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

.wizard-steps__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wizard-steps__number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  background: var(--color-blush);
  color: var(--color-brown-mid);
  border: 2px solid var(--color-border);
}

.wizard-steps__item.active .wizard-steps__number {
  background: var(--color-rose);
  color: var(--color-white);
  border-color: var(--color-rose);
}

.wizard-steps__item.completed .wizard-steps__number {
  background: var(--color-success);
  color: var(--color-white);
  border-color: var(--color-success);
}

.wizard-steps__label {
  font-size: 12px;
  color: var(--color-muted);
  white-space: nowrap;
}

.wizard-steps__arrow {
  padding: 0 12px;
  color: var(--color-border);
  font-size: 18px;
}

/* ── Staff-only indicators ───────────────────────────────── */
.staff-only-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, rgba(201, 137, 122, 0.08), rgba(201, 137, 122, 0.02));
  border: 1px solid rgba(201, 137, 122, 0.2);
  border-left: 3px solid var(--color-rose);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--color-brown-mid);
  line-height: 1.4;
}

.staff-only-banner svg {
  flex-shrink: 0;
  color: var(--color-rose);
}

.staff-only-field {
  position: relative;
}

.staff-only-field .form__label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.staff-only-field__icon {
  color: var(--color-rose);
  flex-shrink: 0;
}

.staff-only-field__badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(201, 137, 122, 0.12);
  color: var(--color-rose-dark);
  border-radius: 10px;
  border: 1px solid rgba(201, 137, 122, 0.25);
}

/* ── Info Grid ───────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-grid__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-grid__label {
  font-size: 12px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-grid__value {
  font-size: 15px;
  color: var(--color-brown);
}

/* ── Note Cards ──────────────────────────────────────────── */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}

.note-card--staff {
  border-left: 3px solid var(--color-rose);
  background: linear-gradient(135deg, #fff 90%, rgba(201, 137, 122, 0.04));
}

.note-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.note-card__author {
  font-weight: 400;
  font-size: 14px;
  color: var(--color-brown);
  display: flex;
  align-items: center;
  gap: 4px;
}

.note-card__date {
  font-size: 12px;
  color: var(--color-muted);
}

.note-card__body {
  font-size: 14px;
  color: var(--color-brown);
  line-height: 1.6;
}

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-section {
  margin-bottom: 32px;
}

.dashboard-section__title {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--color-brown);
  margin-bottom: 16px;
}

.dashboard-alerts {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.dashboard-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.dashboard-alert:last-child {
  border-bottom: none;
}

.dashboard-alert__label {
  font-size: 14px;
  color: var(--color-brown);
}

.dashboard-alert__count {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-rose-dark);
}

/* ── Client Card ─────────────────────────────────────────── */
.client-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow var(--transition);
}

.client-card:hover {
  box-shadow: var(--shadow-md);
}

.client-card__name {
  font-weight: 400;
  font-size: 15px;
  color: var(--color-brown);
}

.client-card__phone {
  font-size: 13px;
  color: var(--color-muted);
}

.client-card__visit {
  font-size: 12px;
  color: var(--color-muted);
  font-style: italic;
}

/* ── Visit Card ──────────────────────────────────────────── */
.visit-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transition: box-shadow var(--transition);
  text-decoration: none;
}

.visit-card:hover {
  box-shadow: var(--shadow-md);
}

.visit-card__date {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-brown-mid);
  white-space: nowrap;
}

.visit-card__client {
  font-size: 14px;
  color: var(--color-brown);
}

.visit-card__service {
  font-size: 13px;
  color: var(--color-muted);
}

.visit-aftercare {
  background: #fdf8f0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
}

/* ── Service List ────────────────────────────────────────── */
.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Bulk Operations ─────────────────────────────────────── */
.bulk-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--color-blush);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.bulk-bar.active {
  display: flex;
}

.bulk-bar__count {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-brown);
}

.bulk-checkbox,
.bulk-checkbox-photo {
  cursor: pointer;
}

.bulk-select-all {
  cursor: pointer;
}

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-bg);
}

.auth-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}

.auth-card__logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-card__logo img {
  max-width: 280px;
}

.auth-card__title {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 300;
  font-style: italic;
  text-align: center;
  color: var(--color-brown);
  margin-bottom: 24px;
}

.auth-form {
  width: 100%;
}

/* ── Portal Layout ───────────────────────────────────────── */
.portal-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.portal-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
}

.portal-header__logo {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: var(--color-brown);
}

.portal-header__nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.portal-header__nav--desktop {
  display: flex;
}

.portal-header__link {
  font-size: 14px;
  color: var(--color-brown-mid);
  transition: color var(--transition);
}

.portal-header__link:hover {
  color: var(--color-rose);
}

.portal-header__link--logout {
  color: var(--color-muted);
}

.portal-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  width: 100%;
}

.portal-heading {
  font-family: 'Poppins', sans-serif;
  font-size: 32px;
  font-weight: 300;
  font-style: italic;
  color: var(--color-brown);
  margin-bottom: 24px;
}

.portal-subheading {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--color-brown);
  margin-bottom: 16px;
}

.portal-section {
  margin-bottom: 32px;
}

.portal-footer {
  background: var(--color-brown);
  color: var(--color-blush);
  padding: 24px;
  margin-top: auto;
}

.portal-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.portal-footer__brand {
  font-family: 'Poppins', sans-serif;
  font-style: italic;
  font-size: 18px;
  color: var(--color-blush);
}

.portal-footer__info {
  font-size: 13px;
  color: var(--color-muted);
}

.portal-footer__copy {
  font-size: 12px;
  color: var(--color-muted);
}

.portal-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  z-index: 500;
  padding: 6px 0;
}

.portal-bottom-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  color: var(--color-muted);
  font-size: 11px;
  transition: color var(--transition);
}

.portal-bottom-nav__link:hover,
.portal-bottom-nav__link.active {
  color: var(--color-rose);
}

.portal-bottom-nav__icon {
  width: 22px;
  height: 22px;
}

.portal-bottom-nav__label {
  font-size: 11px;
}

/* ── Radio Card ──────────────────────────────────────────── */
.radio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.radio-card:hover {
  border-color: var(--color-rose);
}

.radio-card input:checked + .radio-card__content {
  border-color: var(--color-rose);
}

.radio-card__content {
  flex: 1;
}

.radio-card__desc {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 2px;
}

.radio-card__detail {
  font-size: 14px;
  color: var(--color-brown-mid);
  font-weight: 400;
}

/* ── Time Slots ──────────────────────────────────────────── */
.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.time-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--color-white);
  color: var(--color-brown);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  min-width: 80px;
}

.time-slot:hover {
  border-color: var(--color-rose);
  background: rgba(201, 137, 122, 0.1);
}

.time-slot.active,
.time-slot.selected {
  background: var(--color-rose);
  color: var(--color-white);
  border-color: var(--color-rose);
}

.time-slot__label {
  font-size: 14px;
}

/* ── Summary List ────────────────────────────────────────── */
.summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}

.summary-list__item:last-child {
  border-bottom: none;
}

.summary-list__label {
  font-size: 13px;
  color: var(--color-muted);
}

.summary-list__value {
  font-size: 15px;
  color: var(--color-brown);
  font-weight: 400;
}

/* ── Quick Links ─────────────────────────────────────────── */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-links a,
.quick-links button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-brown);
  text-decoration: none;
  transition: box-shadow var(--transition), border-color var(--transition);
  min-width: 120px;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  cursor: pointer;
}

.quick-links a:hover,
.quick-links button:hover {
  border-color: var(--color-rose);
  box-shadow: var(--shadow-md);
}

/* ── Autocomplete ────────────────────────────────────────── */
.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 240px;
  overflow-y: auto;
}

.autocomplete-results a,
.autocomplete-results div {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--color-brown);
  cursor: pointer;
  transition: background var(--transition);
}

.autocomplete-results a:hover,
.autocomplete-results div:hover {
  background: var(--color-blush);
}

/* ── Tags (multi-select) ────────────────────────────────── */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tags-container--sm {
  margin-top: 4px;
  gap: 4px;
}

.tag--sm {
  padding: 2px 8px;
  font-size: 11px;
}

/* ── Multiselect component ──────────────────────────────── */
.multiselect {
  position: relative;
  min-width: 180px;
}

.multiselect__control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 40px;
  padding: 5px 28px 5px 10px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}

.multiselect__control:hover {
  border-color: var(--color-rose);
}

.multiselect__arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--color-muted);
  pointer-events: none;
}

.multiselect__input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  flex: 1;
  min-width: 60px;
  padding: 2px 0;
}

.multiselect__input::placeholder {
  color: var(--color-muted);
}

.multiselect__tags {
  display: contents;
}

.multiselect__tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--color-blush);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--color-brown);
  white-space: nowrap;
}

.multiselect__tag-remove {
  background: none;
  border: none;
  color: var(--color-rose-dark);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 1px;
}

.multiselect__tag-remove:hover {
  color: var(--color-danger);
}

.multiselect__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
}

.multiselect__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition);
}

.multiselect__option:hover {
  background: var(--color-blush);
}

.multiselect__option input[type=checkbox] {
  accent-color: var(--color-rose);
  cursor: pointer;
}

.multiselect__empty {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--color-muted);
  text-align: center;
}

/* ── Document upload zone ──────────────────────────────── */
.doc-upload {
  margin-bottom: 20px;
}

.doc-upload__droparea {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.doc-upload__droparea:hover,
.doc-upload__droparea--active {
  border-color: var(--color-rose);
  background: rgba(201, 137, 122, 0.04);
}

.doc-upload__text {
  font-size: 14px;
  color: var(--color-brown-mid);
  margin: 8px 0 4px;
}

.doc-upload__browse {
  color: var(--color-rose);
  cursor: pointer;
  text-decoration: underline;
}

.doc-upload__hint {
  font-size: 12px;
  color: var(--color-muted);
}

.doc-upload__input {
  display: none;
}

.doc-upload__name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.doc-upload__name-row .input {
  flex: 1;
}

.doc-upload__queue {
  margin-top: 8px;
}

.doc-upload__item-remove {
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.doc-upload__item-remove:hover {
  color: var(--color-danger);
}

.doc-upload__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-size: 13px;
}

.doc-upload__item--done {
  border-color: var(--color-success);
  background: #f0f8f2;
}

.doc-upload__item--error {
  border-color: var(--color-danger);
  background: #fdf0f0;
}

.doc-upload__item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-upload__item-size {
  font-size: 11px;
  color: var(--color-muted);
  white-space: nowrap;
}

.doc-upload__item-status {
  font-size: 11px;
  color: var(--color-success);
  white-space: nowrap;
}

.doc-upload__item--error .doc-upload__item-status {
  color: var(--color-danger);
}

.doc-upload__item-progress {
  width: 120px;
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.doc-upload__item-bar {
  height: 100%;
  width: 0;
  background: var(--color-rose);
  border-radius: 3px;
  transition: width 0.2s;
}

/* ── Email template editor ─────────────────────────────── */
.email-editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.email-editor-panel {
  min-width: 0;
}

.email-preview-panel {
  position: sticky;
  top: 80px;
}

.email-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  margin-bottom: 8px;
}

.email-preview-bar__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-brown-mid);
}

.email-preview-bar__device {
  display: flex;
  gap: 4px;
}

.email-preview-device {
  padding: 4px 12px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--color-brown-mid);
}

.email-preview-device.active {
  background: var(--color-rose);
  color: #fff;
  border-color: var(--color-rose);
}

.email-preview-frame {
  display: flex;
  justify-content: center;
}

.input--code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.5;
  tab-size: 2;
}

.email-visual-editor {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #f4f0ec;
}

.email-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.email-var-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--color-blush);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  color: var(--color-brown-mid);
  transition: background var(--transition);
}

.email-var-btn:hover {
  background: var(--color-rose);
  color: #fff;
  border-color: var(--color-rose);
}

.email-var-btn code {
  font-size: 10px;
  color: var(--color-rose-dark);
}

.email-var-btn:hover code {
  color: #fff;
}

.email-var-btn span {
  font-size: 10px;
}

@media (max-width: 1024px) {
  .email-editor-layout {
    grid-template-columns: 1fr;
  }
  .email-preview-panel {
    position: static;
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-blush);
  color: var(--color-brown);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
}

.tag__info {
  color: var(--color-muted);
  font-size: 11px;
}

.tag__remove {
  background: none;
  border: none;
  color: var(--color-rose-dark);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  margin-left: 2px;
}

.tag__remove:hover {
  color: var(--color-danger);
}

/* ── Meta Item ───────────────────────────────────────────── */
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--color-muted);
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--color-muted);
  font-style: italic;
}

/* ── Results Info ────────────────────────────────────────── */
.results-info {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 12px;
}

/* ── Toggle Switch ──────────────────────────────────────── */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: 24px;
  transition: background 0.2s;
}
.toggle__slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: var(--color-white);
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle__slider {
  background: var(--color-success);
}
.toggle input:checked + .toggle__slider::before {
  transform: translateX(20px);
}

/* ── Service Checklist ─────────────────────────────────── */
.service-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.service-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}
.service-check:hover {
  background: var(--color-blush);
}
.service-check input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-rose);
}
.service-check__name {
  flex: 1;
  font-size: 14px;
}
.service-check__meta {
  font-size: 12px;
  color: var(--color-muted);
  white-space: nowrap;
}

/* ── Staff Overview Slot ───────────────────────────────── */
.overview-slot {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  line-height: 1.3;
  text-decoration: none;
}
.overview-slot--on {
  background: var(--color-blush);
  color: var(--color-brown);
}
.overview-slot--on:hover {
  background: var(--color-rose);
  color: var(--color-white);
}
.overview-slot--off {
  color: var(--color-muted);
}

/* ── Utilities ───────────────────────────────────────────── */
.text-muted { color: var(--color-muted); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }

.hide-mobile { }
.show-mobile { display: none; }

/* ── Sidebar Overlay ────────────────────────────────────── */
/* mobile fix 2026-04-14 */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(46, 31, 26, 0.35);
  z-index: 99;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
  display: block;
}

/* ── Lightbox Close Button ──────────────────────────────── */
/* mobile fix 2026-04-14 */
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* ── Topbar Help Link ────────────────────────────────────── */
.topbar__help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-right: 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-brown-mid);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.topbar__help-link:hover {
  background: var(--color-blush);
  color: var(--color-brown);
  border-color: var(--color-rose);
}
.topbar__help-link svg {
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .topbar__help-text { display: none; }
  .topbar__help-link { padding: 6px 8px; margin-right: 8px; }
}

/* ── Topbar Logout ──────────────────────────────────────── */
.topbar__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  margin-left: 8px;
  color: var(--color-muted);
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}
.topbar__logout:hover {
  color: var(--color-danger);
  background: rgba(160, 64, 64, 0.08);
}

/* ── Hint Button & Tooltip ──────────────────────────────── */
.hint-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-rose);
  background: var(--color-white);
  border: 1.5px solid var(--color-rose);
  border-radius: 50%;
  cursor: help;
  vertical-align: middle;
  position: relative;
  transition: background var(--transition), color var(--transition);
}
.hint-btn:hover,
.hint-btn:focus {
  background: var(--color-rose);
  color: var(--color-white);
  outline: none;
}
.hint-tooltip {
  position: absolute;
  z-index: 9999;
  max-width: 320px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-brown);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}
.hint-tooltip--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Help Page ──────────────────────────────────────────── */
.help-page__header {
  margin-bottom: 24px;
}
.help-page__subtitle {
  font-size: 14px;
  color: var(--color-muted);
  margin-top: 4px;
  max-width: 640px;
}
.help-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}

/* Help navigation */
.help-nav {
  position: sticky;
  top: calc(var(--topbar-height) + 16px);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 0;
  max-height: calc(100vh - var(--topbar-height) - 40px);
  overflow-y: auto;
}
.help-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.help-nav__item {
  margin: 0;
}
.help-nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-brown-mid);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.help-nav__link:hover {
  background: var(--color-bg);
  color: var(--color-brown);
}
.help-nav__link--active {
  background: rgba(201, 137, 122, 0.08);
  color: var(--color-rose-dark);
  border-left-color: var(--color-rose);
  font-weight: 500;
}
.help-nav__icon {
  font-size: 10px;
  color: var(--color-rose);
  flex-shrink: 0;
}

/* Help sections */
.help-section {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  scroll-margin-top: calc(var(--topbar-height) + 16px);
}
.help-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.help-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--color-brown);
  margin: 0;
}
.help-section__icon {
  font-size: 12px;
  color: var(--color-rose);
}
.help-section__hint {
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 16px;
}

/* Help steps */
.help-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.help-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.help-step__number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-blush);
  color: var(--color-rose-dark);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 500;
}
.help-step__body {
  flex: 1;
  min-width: 0;
}
.help-step__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-brown);
  margin: 0 0 4px;
}
.help-step__content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-brown-mid);
}
.help-step__content p {
  margin: 0 0 8px;
}
.help-step__content p:last-child {
  margin-bottom: 0;
}
.help-step__content ul {
  margin: 4px 0 8px 20px;
  padding: 0;
}
.help-step__content li {
  margin-bottom: 4px;
}
.help-step__content code {
  background: var(--color-bg);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}
.help-step__tip {
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(201, 137, 122, 0.08);
  border-left: 3px solid var(--color-rose);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13px;
  color: var(--color-brown-mid);
  line-height: 1.5;
}

/* Help page responsive */
@media (max-width: 900px) {
  .help-layout {
    grid-template-columns: 1fr;
  }
  .help-nav {
    position: static;
    max-height: none;
    display: flex;
    overflow-x: auto;
    padding: 8px;
    gap: 4px;
  }
  .help-nav__list {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
  }
  .help-nav__link {
    white-space: nowrap;
    padding: 6px 12px;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius);
    font-size: 12px;
  }
  .help-nav__link--active {
    border-left-color: transparent;
    border-bottom-color: var(--color-rose);
  }
  .help-nav__icon {
    display: none;
  }
}
@media (max-width: 600px) {
  .help-section {
    padding: 16px;
  }
  .help-section__title {
    font-size: 18px;
  }
  .help-step {
    gap: 12px;
  }
  .help-step__number {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
}

/* ── Responsive ──────────────────────────────────────────── */

/* Tablet: 768px – 1199px */
@media (max-width: 1199px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .topbar {
    left: 0;
  }

  .topbar__hamburger {
    display: flex;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .card-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .form-grid--cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-responsive {
    overflow-x: auto;
  }

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

  .portal-header__nav--desktop {
    display: none;
  }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
  /* Prevent iOS auto-zoom on input focus */
  .input, .form-input, .form-select, select.input, textarea.input, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="search"], input[type="date"], input[type="time"], select, textarea {
    font-size: 16px !important;
  }

  .sidebar {
    transform: translateX(-100%);
    width: 260px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    padding: 16px;
    padding-top: calc(var(--topbar-height) + 16px);
  }

  .page-header {
    flex-direction: column;
    gap: 12px;
  }

  .page-header__actions {
    width: 100%;
  }

  .card-grid--3,
  .card-grid--4 {
    grid-template-columns: 1fr;
  }

  .card--mobile {
    display: block;
  }

  .cards-mobile {
    display: block;
  }

  .form-grid--cols-2,
  .form-grid--cols-3 {
    grid-template-columns: 1fr;
  }

  .form__row,
  .form__row--two,
  .form__row--three {
    flex-direction: column;
  }

  .toolbar__row {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar__form {
    flex-direction: column;
    align-items: stretch; /* mobile fix 2026-04-14 – filtry na pełną szerokość */
  }

  .toolbar__field {
    width: 100%; /* mobile fix 2026-04-14 */
  }

  .toolbar__field .input,
  .toolbar__field select,
  .toolbar__field input,
  .toolbar__field .multiselect {
    width: 100%; /* mobile fix 2026-04-14 */
  }

  .toolbar__actions {
    margin-left: 0; /* mobile fix 2026-04-14 */
    width: 100%;
  }

  .toolbar__actions .btn {
    width: 100%; /* mobile fix 2026-04-14 */
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-bar__group--actions {
    margin-left: 0;
  }

  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .wizard-steps {
    flex-wrap: wrap;
    gap: 8px;
  }

  .wizard-steps__arrow {
    display: none;
  }

  .calendar-grid {
    grid-template-columns: 50px repeat(1, 1fr);
    font-size: 13px;
  }

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

  .hide-mobile {
    display: none !important;
  }

  .show-mobile {
    display: block !important;
  }

  .btn--full-mobile {
    width: 100%;
  }

  .modal__dialog {
    width: 95%;
    margin: 16px;
  }

  .auth-card {
    padding: 24px;
    margin: 16px;
  }

  .portal-bottom-nav {
    display: flex;
    justify-content: space-around;
  }

  .portal-content {
    padding: 20px 16px;
    padding-bottom: 80px;
  }

  .portal-footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .quick-links {
    flex-direction: column;
  }

  .quick-links a,
  .quick-links button {
    width: 100%;
  }

  .bulk-bar {
    flex-wrap: wrap;
  }

  .visit-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .health-grid__item {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }

  .health-grid__answer {
    justify-content: flex-start;
  }

  .health-grid__comment {
    padding-left: 0;
  }

  .time-slots {
    gap: 6px;
  }

  .time-slot {
    min-width: 70px;
    padding: 6px 12px;
  }

  /* mobile fix – kalendarz */
  .cal {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cal__grid--week {
    min-width: 600px;
  }
  .cal__grid--day {
    min-width: 0;
    width: 100%;
  }
  .cal__cell {
    min-width: 60px;
  }
  .cal__cell--day {
    min-width: 0;
    width: 100%;
  }
  .cal__event {
    padding: 8px 10px;
    font-size: 13px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .cal__event--day {
    position: relative;
    top: auto !important;
    height: auto !important;
    min-height: 44px;
  }
  .cal__day-name,
  .cal__time {
    font-size: 13px;
  }
  .cal__month-more {
    padding: 4px 8px;
    font-size: 12px;
  }

  /* mobile fix 2026-04-14 – dropdown menu */
  .dropdown__menu {
    min-width: 160px;
    position: fixed;
    right: 16px;
    left: auto;
    top: auto;
    z-index: 200;
  }

  /* mobile fix 2026-04-14 – modal close touch target */
  .modal__close {
    padding: 12px;
    margin: -8px -8px 0 0;
    font-size: 24px;
  }

  /* mobile fix 2026-04-14 – badge/status touch targets */
  .badge {
    padding: 6px 14px;
    font-size: 13px;
  }
  .status-switcher__item {
    padding: 10px 16px;
  }

  /* mobile fix 2026-04-14 – taby klientki scroll */
  .tabs__nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .tabs__nav::-webkit-scrollbar {
    display: none;
  }
  .tabs__link {
    flex-shrink: 0;
  }

  /* mobile fix 2026-04-14 – mobile card styles */
  .card--mobile {
    display: block;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--color-brown);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
  }
  .card--mobile:hover {
    box-shadow: var(--shadow-md);
    color: var(--color-brown);
  }
  .card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .card__title {
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 400;
    font-style: italic;
    color: var(--color-brown);
  }
  .card__body {
    font-size: 13px;
  }
  .card__row {
    padding: 3px 0;
    color: var(--color-brown-mid);
  }
  .card__label {
    color: var(--color-muted);
    font-weight: 400;
  }
  .card__footer {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
  }

  /* mobile fix 2026-04-14 – email test form */
  .email-preview-panel .card > div[style*="display:flex"] {
    flex-direction: column;
  }
}

/* Mobile: < 375px (small phones) */
/* mobile fix 2026-04-14 */
@media (max-width: 375px) {
  .stat-cards {
    grid-template-columns: 1fr;
  }
  .sidebar {
    width: 100%;
  }
  .auth-card {
    padding: 16px;
    margin: 8px;
  }
  .page-header__actions .btn {
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  .sidebar,
  .topbar,
  .topbar__hamburger,
  .portal-bottom-nav,
  .btn,
  .toolbar,
  .filters-bar,
  .bulk-bar {
    display: none !important;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .main-content {
    padding: 0;
    padding-top: 0;
  }

  body::after {
    display: none;
  }
}

/* mobile fix 2026-04-15 — avatar-img responsive */
.avatar-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
  max-width: 100%;
}

/* mobile fix 2026-04-15 — touch targets na mobile */
@media (max-width: 600px) {
  .btn--sm {
    min-height: 44px;
    padding: 8px 16px;
    font-size: 14px;
  }
  .btn--xs {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 13px;
  }
  .topbar__hamburger {
    padding: 10px;
  }
  .portal-bottom-nav__label {
    font-size: 12px;
  }
}
