﻿:root {
  --color-primary-400: #3b82f6;
  --color-primary-500: #2563eb;
  --color-primary-600: #1d4ed8;
  --color-primary-700: #1e40af;
  --color-accent: #0ea5e9;
  --color-surface: #ffffff;
  --color-surface-muted: rgba(255, 255, 255, 0.65);
  --color-border: #cbd5f5;
  --color-border-strong: #94a3b8;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --shadow-floating: 0 1.25rem 3rem rgba(15, 23, 42, 0.18);
  --shadow-card: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.12);
  --shadow-card-hover: 0 1.5rem 3rem rgba(15, 23, 42, 0.18);
  --radius-lg: 1.25rem;
  --radius-md: 0.85rem;
  --radius-sm: 0.65rem;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
  /* Keep layout width stable when vertical scrollbar appears/disappears */
  scrollbar-gutter: stable both-edges;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  margin-bottom: 40px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
    sans-serif;
  color: var(--color-text);
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 25%, #f8fbff 55%, #ffffff 100%);
  line-height: 1.6;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem rgba(255, 255, 255, 0.8), 0 0 0 0.25rem rgba(37, 99, 235, 0.45);
}

.app-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding-left: clamp(0.75rem, 2vw, 1.5rem);
  padding-right: clamp(0.75rem, 2vw, 1.5rem);
}

.content-shell {
  position: relative;
  display: block;
  padding-top: clamp(1.5rem, 3vw, 2.75rem);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

main {
  display: block;
}

.topbar-wrapper {
  position: relative;
  z-index: 20;
}

.topbar-wrapper + .content-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(226, 232, 240, 0));
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.55rem 1.45rem;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
  border-width: 1px;
  border-style: solid;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.75rem 1.5rem rgba(37, 99, 235, 0.2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: inset 0 0 0 rgba(15, 23, 42, 0.12);
}

.btn-sm {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600) 55%, var(--color-primary-700));
  border-color: transparent;
  color: #f8fafc;
  box-shadow: 0 0.75rem 1.5rem rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
}

.btn-outline-primary {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--color-primary-600);
  box-shadow: none;
}

.btn-outline-primary:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.45);
  color: var(--color-primary-700);
}

.btn-outline-secondary {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.35);
  color: #475569;
}

.btn-outline-secondary:hover {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(100, 116, 139, 0.45);
  color: #1f2937;
}

.btn-outline-danger {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.3);
  color: #b91c1c;
}

.btn-outline-danger:hover {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(220, 38, 38, 0.4);
  color: #991b1b;
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669 55%, #047857);
  border-color: transparent;
  color: #f0fdf4;
  box-shadow: 0 0.75rem 1.5rem rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: linear-gradient(135deg, #34d399, #059669);
}

.btn-link {
  color: var(--color-primary-600);
}

.btn-link:hover {
  color: var(--color-primary-700);
}

.form-label {
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.form-control,
.form-select,
.form-control-color {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition: border-color 140ms ease, box-shadow 140ms ease;
  background: rgba(255, 255, 255, 0.9);
}

.form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2364768b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 0.75rem;
}

.form-select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%232563eb' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
}

.form-control:focus,
.form-select:focus,
.form-control-color:focus {
  border-color: rgba(37, 99, 235, 0.45);
}

.form-check-input {
  border-radius: 0.45rem;
}

.form-switch .form-check-input {
  border-radius: 999px;
}

.form-check-input:checked {
  background-color: var(--color-primary-600);
  border-color: var(--color-primary-600);
}

.alert-info {
  background: rgba(14, 165, 233, 0.12);
  color: #0c4a6e;
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: var(--radius-md);
}

.alert-warning {
  background: rgba(217, 119, 6, 0.12);
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: var(--radius-md);
}

.alert-danger {
  background: rgba(220, 38, 38, 0.12);
  color: #7f1d1d;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius-md);
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-card);
  background: var(--color-surface);
}

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

.card-body {
  padding: clamp(1.25rem, 2vw, 1.75rem);
}

.topbar {
  background: linear-gradient(120deg, #2f66c1 0%, #3f7de2 60%, #4f8fe8 100%);
  color: #e2e8f0;
  padding: 0;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
  position: relative;
  z-index: 20;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 -14px 0;
  height: 14px;
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.35), transparent);
  pointer-events: none;
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.7rem;
  padding-bottom: 0.65rem;
}

.topbar__brand {
  font-weight: 700;
  font-size: 1.3rem;
  color: #f8fafc;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}

.topbar__brand span {
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.topbar__logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.topbar__nav-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  margin-left: clamp(1.5rem, 4vw, 3rem);
}

.topbar__menu {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
}

.topbar__item {
  position: relative;
}
.topbar__item--rental {
  margin-left: -0.5rem;
}

.topbar__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #f1f5f9;
  font-weight: 500;
  opacity: 0.9;
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 0.35rem 0;
  transition: color 160ms ease, opacity 160ms ease;
}

.topbar__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: rgba(248, 250, 252, 0.7);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 160ms ease;
}

.topbar__link:hover,
.topbar__link:focus {
  color: #ffffff;
  opacity: 1;
}

.topbar__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.85;
  transition: transform 160ms ease, opacity 160ms ease, color 160ms ease;
}

.topbar__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}
.topbar__link--rental-cars {
  gap: 0.30rem;
}
.topbar__link--rental-moto {
  gap: 0.30rem;
}

.topbar__icon--planner {
  color: #bae6fd;
}

.topbar__icon--customers {
  color: #fde68a;
}

.topbar__icon--vehicles {
  color: #bbf7d0;
}

.topbar__icon--notes {
  color: #c7d2fe;
}

.topbar__icon--settings {
  width: 30px;
  height: 30px;
  color: #facc15;
  background: rgba(250, 204, 21, 0.14);
  border-radius: 999px;
  padding: 0.35rem;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.35);
  border: 1px solid rgba(250, 204, 21, 0.35);
}

.topbar__link:hover .topbar__icon,
.topbar__link:focus .topbar__icon {
  opacity: 1;
  transform: translateY(-1px) scale(1.08);
}

.topbar__link:hover .topbar__icon--settings,
.topbar__link:focus .topbar__icon--settings {
  transform: translateY(-1px) rotate(12deg) scale(1.12);
}

.topbar__label-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.topbar__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  background: rgba(239, 68, 68, 0.16);
  color: #fecdd3;
  border: 1px solid rgba(248, 113, 113, 0.55);
  border-radius: 999px;
}

.topbar__link--cta {
  font-weight: 600;
  opacity: 1;
  color: #fef3c7;
}

.topbar__link--cta:hover,
.topbar__link--cta:focus {
  color: #fff7b2;
}

.topbar__link:hover::after,
.topbar__link:focus::after {
  transform: scaleX(1);
}

.confirm-modal__content {
  width: min(360px, 92vw);
  padding: 1.75rem;
  display: grid;
  gap: 1.5rem;
}

.confirm-modal__header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.confirm-modal__icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  flex-shrink: 0;
}

.confirm-modal__icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
}

.confirm-modal__body p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.confirm-modal__actions {
  justify-content: flex-end;
}

.confirm-modal__actions .btn {
  min-width: 130px;
}

.confirm-modal__content--danger .confirm-modal__icon {
  background: rgba(248, 113, 113, 0.18);
  color: #dc2626;
}

.topbar__cta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1rem;
}

.topbar__avatar-btn {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: #ffffff;
}
.topbar__avatar-btn[aria-expanded="true"] {
  color: #b91c1c;
}
.topbar__avatar-btn[aria-expanded="true"] .topbar__avatar {
  color: #b91c1c;
  box-shadow: 0 0.55rem 1.2rem rgba(15, 23, 42, 0.18);
}
.topbar__avatar-btn.dropdown-toggle::after {
  margin-left: 0.5rem;
  vertical-align: middle;
  border-top-color: currentColor;
}

.topbar__avatar-btn:focus {
  box-shadow: none;
}

.topbar__avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2f66c1 0%, #3f7de2 60%, #4f8fe8 100%);
  color: #f8fafc;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0.45rem 0.9rem rgba(15, 23, 42, 0.15);
  transition: transform 120ms ease, box-shadow 120ms ease, color 120ms ease, background-color 120ms ease;
}

.topbar__avatar-btn:hover .topbar__avatar,
.topbar__avatar-btn:focus .topbar__avatar {
  transform: translateY(-1px);
  box-shadow: 0 0.55rem 1.1rem rgba(15, 23, 42, 0.2);
}

.topbar__avatar-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  opacity: 0.92;
}

.topbar__dropdown {
  min-width: 220px;
  padding: 0.35rem 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-card);
}

.topbar__dropdown-name {
  font-weight: 700;
}

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

.dropdown-item.text-danger {
  color: #b91c1c !important;
}

.dropdown-item.text-danger:hover {
  background: rgba(248, 113, 113, 0.12);
}

.topbar__user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: right;
}

.topbar__user-name {
  font-weight: 700;
  color: var(--color-text);
}

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

.topbar__logout-form {
  margin: 0;
}

@media (max-width: 768px) {
  .topbar__user {
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.75rem;
  }
}

.topbar__toggle {
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.3);
}

.topbar__toggle .navbar-toggler-icon {
  filter: invert(1);
}

.navbar-toggler {
  border: none;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.entity-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.auth-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: min(480px, 94vw);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  display: grid;
  gap: 1rem;
}

.auth-card__header h1 {
  margin: 0;
}

.auth-card__header p {
  margin: 0;
  color: var(--color-text-muted);
}

.auth-actions {
  margin-top: 0.25rem;
}

.entity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.entity-header__title {
  flex: 1;
  min-width: 0;
}

.entity-header__title h1 {
  margin: 0;
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2rem);
}

.entity-header__title p {
  margin: 0.2rem 0 0;
  color: #475569;
}

.entity-header__meta {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.entity-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.entity-actions--elevated {
  padding: 0.4rem 0.75rem 0.4rem 0.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(239, 246, 255, 0.95));
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.entity-actions__search {
  flex: 1;
  min-width: 220px;
}

.entity-actions__primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding-inline: 0.95rem;
}

.entity-actions__primary-icon {
  display: inline-flex;
}

.entity-actions__primary-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.entity-list {
  display: block;
  overflow-x: auto;
  border-radius: 1rem;
}

.entity-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 1.1rem;
  background: #fff7f7;
  border: 1px solid #fee2e2;
  box-shadow: 0 1.25rem 2.5rem rgba(248, 113, 113, 0.12);
}

.entity-pagination__info {
  font-size: 0.9rem;
  color: #991b1b;
}

.entity-pagination__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.entity-pagination__page {
  font-size: 0.9rem;
  font-weight: 500;
  color: #b91c1c;
}

.entity-pagination__controls .btn-outline-danger {
  background: #ffffff;
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

.entity-pagination__controls .btn-outline-danger:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #ffffff;
}

.entity-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border: 1px solid #dbe3f5;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.entity-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.15), rgba(13, 148, 136, 0.08));
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.entity-card:hover::before {
  opacity: 1;
}

.entity-card__body {
  display: grid;
  gap: 0.4rem;
}

.entity-card__title {
  font-weight: 600;
  font-size: 1.05rem;
  color: #0f172a;
}

.entity-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: #475569;
  font-size: 0.92rem;
}

.entity-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.entity-card__meta .entity-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  font-weight: 500;
  font-size: 0.85rem;
}

.entity-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.entity-card__actions .btn {
  min-width: 120px;
}

.entity-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  border-spacing: 0;
  background: #f3f8ff;
  border: 1px solid #d2e0f6;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.entity-table thead tr {
  background: #d9e7fb;
  color: #0f172a;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.entity-table th,
.entity-table td {
  padding: 0.9rem 1.1rem;
  /* removed thin dividing line to avoid the extra visible rule in the list */
  border-bottom: none;
  vertical-align: middle;
  font-size: 0.95rem;
}

.entity-table tbody tr {
  background: #eff5ff;
  transition: background 160ms ease;
}

.entity-table tbody tr:nth-child(even) {
  background: #e6f0ff;
}

.entity-table tbody tr:hover {
  background: #dce9ff;
}

.entity-table td strong {
  /* Keep <strong> inline by default inside table cells so it doesn't force
     a line break (company name in <strong> followed by "/ person" should
     stay on the same line). */
  display: inline;
  font-weight: 600;
  color: #0f172a;
}

.entity-table__plate {
  width: clamp(80px, 10vw, 120px);
  white-space: nowrap;
}

.entity-table__plate strong {
  display: inline;
}

.entity-table__owner {
  /* Keep this as a table-cell so the table layout stays consistent and the
     following action cell sits in the correct column. Previously set to
     block which caused the actions cell to flow under the owner. */
  display: table-cell;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.entity-table__owner strong {
  display: inline;
  font-weight: 600;
  margin-right: 0.25rem;
}

.entity-table__meta {
  display: block;
  color: #475569;
  font-size: 0.88rem;
}

.entity-table__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  white-space: nowrap; /* keep action buttons on a single line */
}

.entity-table__actions .btn {
  padding: 0.35rem 0.8rem; /* slightly smaller so two buttons fit into narrow columns */
}

/* Ensure the actions cell is a fixed-ish column at the right and its content
   is vertically centered (same as plate text). The header already sets width
   inline on the TH; this makes TD behave consistently and centers buttons. */
.entity-table td.entity-table__actions {
  width: 200px;
  text-align: right;
  vertical-align: middle; /* ensure cell content aligns to middle */
  padding-left: 0.8rem; /* small left padding so buttons don't touch cell border */
}

.entity-table__actions {
  align-items: center; /* vertically center buttons inside the flex container */
  flex-wrap: nowrap; /* don't allow wrapping; overflow will scroll if needed */
}

.entity-table__actions .btn {
  display: inline-flex; /* keep button contents centered */
  align-items: center;
}

.entity-table__actions--compact {
  gap: 0.4rem;
}

.entity-table__actions--compact .btn {
  padding: 0.35rem 0.7rem;
}

.btn-icon-only {
  width: 2.4rem;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.btn-icon-only svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.btn-icon-vehicle svg {
  width: 22px !important;
  height: 22px !important;
  transform: scale(1.2);
  transform-origin: center;
}

/* Saturated variants for compact icon buttons in tables */
.entity-table__actions--compact .btn-icon-only.btn-outline-primary {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.55);
  color: #1d4ed8;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.entity-table__actions--compact .btn-icon-only.btn-outline-primary:hover,
.entity-table__actions--compact .btn-icon-only.btn-outline-primary:focus-visible {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(37, 99, 235, 0.75);
  color: #1e40af;
}

.entity-table__actions--compact .btn-icon-only.btn-outline-danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(220, 38, 38, 0.6);
  color: #b91c1c;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.28);
}

.entity-table__actions--compact .btn-icon-only.btn-outline-danger:hover,
.entity-table__actions--compact .btn-icon-only.btn-outline-danger:focus-visible {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(220, 38, 38, 0.85);
  color: #991b1b;
}

.entity-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid #1d4ed8;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.35);
}

.entity-action-btn__icon {
  display: inline-flex;
}

.entity-action-btn__icon svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
  fill: currentColor;
}

.entity-action-btn__text {
  line-height: 1.2;
  font-weight: 500;
}

.entity-action-btn:hover,
.entity-action-btn:focus-visible {
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
  border-color: #1e3a8a;
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(30, 64, 175, 0.45);
}

.appointments-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.85rem;
}

.entity-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.35rem 0 0.75rem;
}

.entity-filter__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  color: #0f172a;
  font-weight: 600;
}

.entity-filter__label {
  color: #0284c7;
  font-weight: 600;
}

.entity-filter__value {
  font-weight: 600;
}

.entity-filter .btn-link {
  padding-left: 0;
  padding-right: 0;
}

.entity-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #94a3b8;
  border: 1px dashed #cbd5f5;
  border-radius: 1rem;
  background: rgba(148, 163, 184, 0.1);
}

.entity-modal__header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
}

.entity-modal__hint {
  margin: 0.35rem 0 0;
  color: #475569;
}

.entity-modal__content {
  position: relative;
}

.entity-modal__content::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(14, 165, 233, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.entity-modal__actions .btn-primary {
  min-width: 120px;
}

.entity-modal__actions .btn-outline-secondary {
  color: var(--color-text-muted);
}

.settings-page {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Nudge the settings header slightly upwards so the page title sits closer to the top */
.settings-page .entity-header {
  margin-top: -1.5rem;
}

/* Apply the same upward nudge to other pages with prominent headers */
.settings-page .entity-header,
[data-customers-root] .entity-header,
[data-vehicles-root] .entity-header,
[data-notes-root] .entity-header {
  margin-top: -1.5rem;
}

.settings-page .entity-header__title p {
  max-width: none;
}

.settings-tabs {
  display: inline-flex;
  gap: 0.75rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-top: -20px;
  margin-bottom: -10px;
}

.settings-tab__button {
  border: none;
  background: transparent;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-text-muted);
  transition: all 140ms ease;
  cursor: pointer;
}

.settings-tab__button:hover {
  color: var(--color-text);
  background: rgba(148, 163, 184, 0.1);
}

.settings-tab__button.is-active {
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
  color: #fff;
  box-shadow: var(--shadow-card);
}

.settings-tab-panels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-tab-panel {
  display: none;
}

.settings-tab-panel.is-active {
  display: block;
}

.settings-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: 1fr; /* full-width single column layout */
}

.settings-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: grid;
  gap: 1.25rem;
  grid-column: 1 / -1; /* span full width of grid */
}

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

.settings-card__title {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settings-card__title h3 {
  margin: 0;
  font-size: 1.25rem;
}

.settings-card__title p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.settings-card--users {
  gap: 1.25rem;
}

.settings-users__actions {
  display: flex;
  justify-content: flex-end;
}

.settings-users__actions .btn {
  min-width: auto;
}

.settings-users__form {
  display: grid;
  gap: 1rem;
}

.settings-password-group .settings-password-toggle-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: #9ca3af;
  stroke-width: 1.8;
  fill: none;
  transition: stroke 0.15s ease-in-out;
}

.settings-password-group .settings-password-toggle-icon.settings-password-toggle-icon--active svg {
  stroke: #1d4ed8;
}

.settings-user-mechanics__toggle {
  padding-left: 0;
  padding-right: 0;
  font-weight: 600;
  color: var(--color-primary);
}

.settings-user-mechanics__toggle.is-open {
  color: var(--color-text);
}

.settings-user-mechanics {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(226, 232, 240, 0.4));
}

.settings-user-mechanics__item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.6);
}

.settings-user-mechanics__item:hover {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.07);
}

.settings-user-mechanics__item input[type="checkbox"] {
  margin: 0;
}

.settings-user-mechanics__color {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-flex;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.settings-user-mechanics__name {
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-user-mechanics__badge {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border: 1px dashed rgba(148, 163, 184, 0.7);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
}

.settings-user-mechanics__empty {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.settings-users__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-users__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), #ffffff);
  box-shadow: 0 0.9rem 2rem rgba(15, 23, 42, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.settings-users__name {
  font-weight: 700;
}

.settings-users__name--highlight {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: #0f172a;
}

.settings-users__meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 0.45rem;
  padding-left: 0.4rem;
  line-height: 1.3;
}

.settings-users__meta strong {
  font-weight: 600;
  color: #1d4ed8;
}

.settings-users__meta--secondary {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem 0.25rem 0.6rem;
  line-height: 1.3;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.08);
}

.settings-users__hidden-mechanic {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.settings-users__hidden-mechanic-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15);
}

.settings-users__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.settings-users__row:hover {
  transform: translateY(-1px);
  box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.12);
}

.settings-users__empty {
  padding: 0.75rem 1rem;
  background: rgba(148, 163, 184, 0.12);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
}

.settings-fields {
  display: grid;
  gap: 1rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.settings-field-row {
  display: grid;
  gap: 1rem 1.5rem;
  width: 100%;
  grid-column: 1 / -1; /* rozta+żen+ş p+Öes celou +í+ş+Öku rodi¦Źovsk+ęho gridu */
}

.settings-field-row--primary {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
}

.settings-field-row--primary .settings-field {
  width: 100%;
}

@media (max-width: 900px) {
  .settings-field-row--primary {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Compact 2ÔÇĹsloupcov+ę rozlo+żen+ş uvnit+Ö mod+íl+» (nap+Ö. dny volna) */
.entity-modal__body .settings-field-row--primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 600px) {
  .entity-modal__body .settings-field-row--primary {
    grid-template-columns: 1fr;
  }
}

.entity-modal__body .settings-field {
  min-width: 0;
}

.settings-field {
  display: grid;
  gap: 0.35rem;
}

.settings-field--full {
  grid-column: 1 / -1;
}

.settings-lunch__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.settings-lunch__segment {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settings-lunch__segment--toggle {
  flex: 0 0 auto;
  min-width: 220px;
}

.settings-lunch__segment:not(.settings-lunch__segment--toggle) {
  flex: 0 0 230px;
  max-width: 260px;
}

@media (max-width: 900px) {
  .settings-lunch__segment:not(.settings-lunch__segment--toggle) {
    flex: 1 1 180px;
    max-width: none;
  }
}

.settings-lunch-fields[data-enabled="false"] {
  opacity: 0.6;
}

.settings-lunch-fields[data-enabled="false"] input,
.settings-lunch-fields[data-enabled="false"] select {
  cursor: not-allowed;
}

.settings-card__actions {
  display: flex;
  justify-content: space-between; /* left: blocked-days, right: save */
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.settings-card__actions .btn {
  min-width: 160px;
}

.settings-card--rental .settings-card__actions {
  justify-content: flex-end;
}

.settings-card--import .form-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.settings-import-result {
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-text);
  font-size: 0.9rem;

  white-space: pre-line;
}

/* Settings: weekdays extracted to own section; show inline */
.settings-weekdays {
  display: flex;
  flex-wrap: nowrap; /* keep in single row */
  gap: 0.5rem 1rem;
  align-items: center;
  overflow-x: auto;
}
.settings-weekdays__blocked {
  flex-basis: 100%;
  margin-top: 0.25rem;
}
.settings-weekdays__blocked .btn {
  min-width: 200px;
}
.settings-weekdays__option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.settings-weekdays__option--right {
  margin-left: auto;
  white-space: nowrap;
}
.settings-weekdays__option--highlight {
  padding: 0.4rem 0.9rem;
  padding-left: 0.8rem;
  border-radius: 999px;
  background: radial-gradient(140% 120% at 10% 35%, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0.06));
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 0.55rem 1.25rem rgba(37, 99, 235, 0.18);
  gap: 0.55rem;
  transition: transform 140ms ease, box-shadow 160ms ease, background 160ms ease;
}
.settings-weekdays__option--highlight:hover {
  transform: translateY(-1px);
  background: radial-gradient(160% 140% at 12% 32%, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0.08));
  box-shadow: 0 1rem 2rem rgba(37, 99, 235, 0.22);
}
.settings-weekdays__option--highlight span {
  color: var(--color-primary-700);
}
.settings-weekdays__option--highlight .form-check-input {
  position: static;
  float: none;
  margin: 0;
  margin-right: 0.55rem;
  margin-top: 0;
  flex-shrink: 0;
  border-color: var(--color-primary-500);
  border-radius: 0.1rem;
  transform: scale(0.94);
}
/* Hide the original in-card weekdays block if present */
.settings-field--weekdays {
  display: none;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.settings-section__title {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 520px;
}

.settings-section__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  margin-right: clamp(1.5rem, 3vw, 2rem);
  margin-top: 1rem;
}

[data-rental-cars-root] .settings-section__actions {
  margin-right: 0;
}

.settings-section__header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.settings-section__header p {
  margin: 0;
  color: var(--color-text-muted);
  max-width: 520px;
}

[data-rental-cars-root] .settings-section__title h3 {
  margin: 0;
  font-size: 1.25rem;
}

[data-rental-cars-root] .settings-section__title p {
  margin: 0;
  font-size: 0.95rem;
}

[data-rental-cars-root] {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.settings-mechanics {
  display: grid;
  gap: 1.25rem;
}

.settings-mechanic {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.05));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.12);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: grid;
  gap: 1rem;
}

/* Layout řádku u mechanika */
.settings-mechanic__body {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start;
    column-gap: 2rem;
}

/* Každé pole = jedna „buňka“ */
.settings-mechanic__body .settings-mechanic__field {
    flex: 0 0 auto;
    min-width: 0;
}

/* 1) Jméno */
.settings-mechanic__body .settings-mechanic__field:nth-child(1) {
    width: 260px;
}

/* 2) Popis */
.settings-mechanic__body .settings-mechanic__field:nth-child(2) {
    width: 260px;   /* roztáhne se podle potřeby */
}

/* 3) Barva */
.settings-mechanic__body .settings-mechanic__field:nth-child(3) {
    width: 120px;       /* malý sloupec jen pro color input */
}

/* 4) Vyloučit z hledání – TADY HO DOSTANEŠ BLÍŽ K BARVĚ */
.settings-mechanic__body .settings-mechanic__field:nth-child(4) {
    width: 350px;      /* můžeš zmenšit/zvětšit podle oka */
}

/* 5) Aktivní – drobný sloupec vpravo */
.settings-mechanic__body .settings-mechanic__field:nth-child(5) {
    width: 120px;
    text-align: left;
}

.settings-rental__item .settings-rental__row.settings-mechanic__body[data-rental-car-row] {
    column-gap: 1.25rem;
}

[data-rental-cars-root] .settings-mechanic__body .settings-mechanic__field:nth-child(4) {
    width: 260px;
}

[data-rental-cars-root] .settings-mechanic__body .settings-mechanic__field:nth-child(5) {
    width: 110px;
}

[data-rental-cars-root] .settings-mechanic__body .settings-mechanic__field:nth-child(6) {
    width: 110px;
}

[data-rental-cars-root] .settings-mechanic__body .settings-mechanic__field:nth-child(7) {
    width: 140px;
    margin-left: auto;
}

.settings-mechanic__field--insurance .form-label {
    display: block;
    text-align: center;
}

[data-rental-cars-root] .settings-mechanic__body .settings-mechanic__field:nth-child(5) input,
[data-rental-cars-root] .settings-mechanic__body .settings-mechanic__field:nth-child(6) input {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.30rem;
}

.settings-mechanic__footer {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.settings-mechanic__footer-main-actions {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
}

.settings-timeoff__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-timeoff-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* Notes list cards - styled similarly to mechanic cards (blue, soft gradient) */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.note-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(14, 165, 233, 0.03));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 99, 235, 0.14);
  box-shadow: 0 0.9rem 2rem rgba(15, 23, 42, 0.08);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.note-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 auto;
}
.note-card__text {
  color: #0f172a;
  font-size: 0.98rem;
  line-height: 1.3;
  word-break: break-word;
}
.note-card__meta {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.note-card__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* Button press animation for note complete action */
.note-card__actions .note-card__complete-btn {
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.note-card__actions .note-card__complete-btn:active,
.note-card__actions .note-card__complete-btn.is-pressed {
  transform: translateY(2px) scale(0.985);
  box-shadow: 0 0.6rem 1.2rem rgba(15, 23, 42, 0.12);
}

.settings-timeoff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.45rem 0.75rem;
  background: #ffffff;
}

.settings-timeoff-row__info {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-timeoff-row__primary {
  font-weight: 600;
}

.settings-timeoff-row__reason {
  margin-top: 0.15rem;
}

.settings-timeoff-row__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* Kompaktn¦Ťj+í+ş rozestupy v modalu dny volna */
.mechanic-timeoff-modal__body {
  row-gap: 0.3rem;
  gap: 0.3rem;
}

.mechanic-timeoff__actions {
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

.settings-timeoff-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-timeoff-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.settings-timeoff-row__info {
  flex: 1 1 auto;
  min-width: 0;
}

.settings-timeoff-row__primary {
  font-weight: 500;
}

.settings-timeoff-row__reason {
  margin-top: 0.15rem;
}

.settings-timeoff-row__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.settings-mechanic__field label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(15, 23, 42, 0.55);
}

.settings-mechanic__field input[type="text"],
.settings-mechanic__field input[type="color"] {
  margin-top: 0.35rem;
}

.settings-mechanic__field input[type="color"] {
  height: 46px;
  padding: 0.2rem;
}

.settings-alert {
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: #0c4a6e;
  font-weight: 500;
}

.settings-alert[hidden] {
  display: none;
}

.settings-alert--danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
  color: #7f1d1d;
}

.settings-toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  min-width: 260px;
  padding: 0.75rem 1.1rem;
  border-radius: 0.85rem;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.3);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 1100;
}

.settings-toast[data-variant="success"] {
  background: #e8f6ef;
  color: #14532d;
}

.settings-toast[data-variant="danger"] {
  background: #fff6f6;
  color: #7a1f1f;
}

.settings-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.topbar-wrapper + .content-shell {
  margin-top: 1.2rem;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.planner-page {
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
  min-height: 60vh;
  margin-top: -1.4rem;
  margin-bottom: -2rem;
}

.rental-planner.planner-page {
  gap: 1.1rem;
}

.rental-planner.planner-page.has-filter-visible {
  gap: 0.9rem;
}

.planner-page.has-filter-visible {
  gap: 1.2rem;
}

  .planner-header {
      display: grid;
      grid-template-columns: 1fr auto 1fr; /* center group truly centered */
      align-items: center;
      gap: 0.75rem;
      position: relative;
  }

  /* Week view: keep stejný layout headeru jako v denním pohledu,
     aby se akční prvky vpravo nehýbaly při přepínání. */
  .is-week-view .planner-header {
    grid-template-columns: 1fr auto 1fr;
  }

    .planner-mechanic-filter {
      margin-top: 0.5rem;
      margin-bottom: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
  }

  .is-day-view .planner-mechanic-filter {
    justify-content: flex-end;
  }

  .is-week-view .planner-mechanic-filter {
    justify-content: flex-end;
  }

  .is-month-view .planner-mechanic-filter {
    justify-content: flex-end;
  }

  .planner-mechanic-filter__label {
      font-size: 0.86rem;
      color: var(--color-text);
      font-weight: 600;
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }

  .planner-mechanic-filter__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

    .planner-mechanic-filter__btn {
      padding: 0.25rem 0.8rem;
      font-size: 0.8rem;
      border-radius: 999px;
      max-width: 220px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      border-width: 1px;
      border-style: solid;
      border-color: rgba(148, 163, 184, 0.6);
      background: rgba(248, 250, 252, 0.9);
      color: #0f172a;
    }
  
    .planner-mechanic-filter__btn.is-active {
      background: #dc3545;
      border-color: #dc3545;
      color: #ffffff;
      box-shadow: 0 0.1rem 0.35rem rgba(220, 38, 38, 0.55);
    }

    .planner-mechanic-filter__btn--hidden {
      background: #1f2937;
      border-color: #111827;
      color: #f8fafc;
      box-shadow: 0 0.06rem 0.18rem rgba(15, 23, 42, 0.35);
    }

    .planner-mechanic-filter__btn--hidden.is-active {
      background: #0f172a;
      border-color: #0f172a;
      color: #f8fafc;
      box-shadow: 0 0.16rem 0.35rem rgba(15, 23, 42, 0.55);
    }

    .planner-filter-toggle.is-active {
      background: rgba(37, 99, 235, 0.14);
      border-color: rgba(37, 99, 235, 0.6);
      color: #1d4ed8;
    }

    .planner-filter-toggle__label {
      display: inline-flex;
      align-items: center;
      gap: 0.15rem;
    }

    .planner-filter-toggle__clear {
      display: none;
      align-items: center;
      justify-content: center;
      margin-left: 0.4rem;
      font-size: 0.85rem;
      line-height: 1;
      font-weight: 700;
      color: #dc3545;
      cursor: pointer;
    }

    .planner-filter-toggle.has-filter .planner-filter-toggle__clear {
      display: inline-flex;
    }

  .planner-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  /* Week view používá stejnou mezeru mezi ovladači jako denní / měsíční,
     aby zůstalo zarovnání konzistentní. */
  .is-week-view .planner-controls {
    gap: 0.75rem;
    justify-self: auto;
  }

.planner-view {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 1.75rem;
  }
  .is-week-view .planner-view {
    gap: 1.75rem;
    /* V týdenním zobrazení se kvůli jinému rozložení gridu
       vytvořila malá mezera u pravého okraje, proto skupinu
       mírně posuneme doprava. */
    margin-right: -0.5rem;
  }

.planner-week-center { justify-self: center; display: flex; align-items: center; gap: 2.75rem; }
.planner-week-legend { display: flex; align-items: center; gap: 0.35rem; margin-left: 0; }
.is-week-view .planner-week-legend { display: none !important; }
/* Center the range container exactly */
.planner-week-range { justify-self: center; }
.is-week-view .planner-week-range {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  justify-self: center;
  text-align: center;
  min-width: 0;
  width: auto;
  max-width: 520px;
}

/* When legend is centered in DAY view, place it in center column */
.planner-week-range { display: flex; align-items: center; justify-content: center; min-height: 2.25rem; }
.is-week-view .planner-week-range { justify-content: center; gap: 0.35rem; flex-direction: row; align-items: center; }
.planner-week-range__label { font-size: 1.4rem; font-weight: 700; color: #0f172a; }

/* V t?denn?m zobrazen? pevne ukotvi pravou ak?n? sekci k prav?mu okraji,
   aby se p?i p?ep?n?n? re?im? nepohybovala oproti denn?mu/m?s??n?mu. */
.planner-page.is-week-view .planner-header .planner-view {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    gap: 1.75rem;
    margin-right: 0;
  }

.planner-week-legend span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.planner-week-legend span.is-disabled {
  opacity: 0.35;
  text-decoration: line-through;
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.25);
}

.planner-week-legend span.is-current {
  color: #dc2626;
  font-weight: 800;
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.35);
}

.is-week-view .planner-week-legend { justify-content: flex-start; position: static; transform: none; margin: 0; }

.planner-week-range {
  font-size: 1.4rem; /* je+ä¦ů+őÔÇít¦éÔÇ×+óÔéČ+č v¦éÔÇ×+óÔéČ+čt+ä¦ů+őÔÇí+äÔÇÜ+éTş p+äÔÇÜ+éTşsmo */
  font-weight: 700;
  color: #0f172a;
}

.planner-view-toggle .btn.active[aria-pressed="true"] {
  background: var(--color-primary-600);
  color: #fff;
  border-color: var(--color-primary-600);
}

.planner-controls .planner-date-input {
  width: 11rem;
}

/* Allowed days legend */
/* removed legend UI */

.planner-calendar {
  --meta-column-width: 260px;
  --slot-count: 20;
  --slot-bg-a: #ffffff;
  --slot-bg-b: #f8fafd;
  border: 1px solid #dee2e6;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.planner-calendar__timeline {
  display: grid;
  grid-template-columns: var(--meta-column-width) repeat(var(--slot-count), minmax(0, 1fr));
  border-bottom: 1px solid #dee2e6;
  background: var(--slot-bg-a);
  color: #495057;
  font-size: 0.875rem;
}

.planner-timeline__label {
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #ffffff;
  border-right: 1px solid #dee2e6; /* divider between label and first time cell */
}

/* In weekly view, match first-day label styling to day headers */

.is-week-view .planner-timeline__label {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 700;
  color: #0f172a;
  font-size: 1rem; /* match day headers */
}

  .planner-timeline__cell {
    padding: 0.75rem 0;
    text-align: center;
    position: relative;
    display: flex;
  align-items: center;
    justify-content: center;
    background: var(--slot-bg-a);
  }

  /* Slightly more compact timeline in daily view */
  .is-day-view .planner-calendar__timeline .planner-timeline__cell {
    padding: 0.35rem 0;
  }

  .is-day-view .planner-timeline__label {
    padding: 0.45rem 0.85rem;
  }

.planner-timeline__cell--alt {
  background: var(--slot-bg-b);
}

.planner-timeline__cell span {
  position: relative;
  z-index: 1;
  font-weight: 500;
  color: #1f2937;
}

.planner-timeline__cell::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: #dee2e6;
  z-index: 0;
  pointer-events: none;
}

.planner-calendar__viewport {
  position: relative;
  overflow: hidden;
}

.planner-calendar__grid {
  display: flex;
  flex-direction: column;
}

.is-month-view .planner-calendar__timeline {
  display: none;
}

.is-month-view .planner-calendar__viewport {
  max-height: calc(100vh - 260px);
  height: calc(100vh - 260px);
  min-height: 0;
  overflow: hidden;
}

.is-month-view .planner-calendar__grid {
  padding: 0 0 0.25rem;
  height: 100%;
}

.planner-month-table {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.15rem;
  height: 100%;
  min-height: 0;
  --planner-month-cols: 7;
}

.planner-month-legend {
  display: flex;
  align-items: center;
  gap: 0.25rem 0.6rem;
  flex-wrap: wrap;
  padding: 0.05rem 0.5rem 0.2rem;
}

.planner-month-legend__title {
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
  font-size: 0.9rem;
}

.planner-month-legend__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}

.planner-month-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 0.85rem;
}

.planner-month-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  display: inline-block;
}


.planner-month-weekdays {
  display: grid;
  grid-template-columns: repeat(var(--planner-month-cols, 7), minmax(0, 1fr));
  gap: 1px;
  background: rgba(37, 99, 235, 0.05);
  border-radius: 0.9rem;
  border: 1px solid rgba(37, 99, 235, 0.12);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}


.planner-month-weekday {
  text-align: center;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.01em;
  line-height: 1.1;
  padding: 0.12rem 0.35rem;
  font-size: 0.9rem;
  background: rgba(37, 99, 235, 0.12);
}
.planner-month-weekday:nth-child(odd) {
  background: rgba(37, 99, 235, 0.06);
}

.planner-month-grid {
  display: grid;
  grid-template-columns: repeat(var(--planner-month-cols, 7), minmax(0, 1fr));
  grid-auto-rows: minmax(90px, 1fr);
  height: 100%;
  gap: 1px;
  background: rgba(226, 232, 240, 0.9);
  border-radius: 0.9rem;
  overflow: hidden;
}

.planner-month-day {
  background: linear-gradient(180deg, #ffffff, #f8fbff 75%);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 0.75rem;
  padding: 0.3rem 0.5rem 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.01rem;
  min-height: 0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.planner-month-day__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.25rem;
  min-height: 24px;
}

.planner-month-day__number {
  font-weight: 800;
  color: #0f172a;
  font-size: 0.98rem;
  line-height: 1.1;
  margin-top: 0.05rem;
}

.planner-month-day__badge {
  background: rgba(37, 99, 235, 0.12);
  color: #1e3a8a;
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 999px;
  padding: 0.08rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  max-width: 80%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-month-day__lanes {
  display: grid;
  grid-template-rows: repeat(var(--lane-count, 1), minmax(0, 1fr));
  gap: 0.12rem;
  flex: 1;
  min-height: 0;
}

.planner-month-lane {
  position: relative;
  min-height: 0;
  border-radius: 10px;
  background: #e7e7e742;
  border: 1px solid rgba(51, 134, 250, 0.14);
  overflow: hidden;
}

.planner-month-lane::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--planner-lane-color, #2563eb);
  opacity: 0.55;
}

.planner-month-lane__strip {
  position: absolute;
  top: 1px;
  bottom: 1px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.planner-month-lane__timeoff {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 10px;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.32) 0,
    rgba(148, 163, 184, 0.32) 5px,
    rgba(148, 163, 184, 0.12) 5px,
    rgba(148, 163, 184, 0.12) 10px
  );
  border: 1px solid rgba(148, 163, 184, 0.55);
  pointer-events: none;
  z-index: 1;
}

.planner-month-lane__strip--waiting {
  border-color: #b91c1c !important;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.8), 0 2px 10px rgba(0, 0, 0, 0.18);
}

.planner-month-lane__important-dot {
  position: absolute;
  left: 4px;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #b91c1c;
  box-shadow: 0 0 0 2px #ffffff;
  pointer-events: none;
  opacity: 0.95;
}

.planner-month-day__empty {
  color: #475569;
  font-size: 0.92rem;
  white-space: normal;
  line-height: 1.25;
}

.planner-month-day.is-blocked {
  background: #fef3c7;
  border-color: rgba(217, 119, 6, 0.35);
}

.planner-month-day.is-disabled {
  opacity: 0.65;
}

.planner-month-day--empty {
  border: none;
  box-shadow: none;
  background: transparent;
}

/* Weekly day header */
.planner-day-header {
  display: flex;
  align-items: stretch;
  min-height: 18px;
  border-bottom: 1px solid #e5eaf0;
  background: #f8fafc;
}

.planner-day-header__meta {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-right: 1px solid #eef2f5;
  font-weight: 700;
  color: #0f172a;
  flex: 0 0 var(--meta-column-width);
}

.planner-day-header__body {
    background: linear-gradient(90deg, var(--slot-bg-a), var(--slot-bg-a));
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
  }

  /* Week view: when per-day timeline is hidden, tint the body to match slot stripes. */
  .is-week-view .planner-day-header__body:not(:has(.planner-day-timeline)):not(:has(.planner-day-blocked)) {
    background: linear-gradient(90deg, #fafcff 0%, #e7f1ff 45%, #e7f1ff 100%);
  }
  .planner-day-header__body--no-timeline {
    background: linear-gradient(90deg, #fafcff 0%, #e7f1ff 45%, #e7f1ff 100%);
  }

  /* Align meta (date) cell tint with the body when the header has no timeline. */
  .planner-day-header--no-timeline .planner-day-header__meta,
  .is-week-view .planner-day-header:has(>.planner-day-header__body:not(:has(.planner-day-timeline)):not(:has(.planner-day-blocked))) .planner-day-header__meta {
    background: #fafcff;
  }


/* Blocked day banner in weekly view */
.planner-day-blocked {
  padding: 0.1rem 0.75rem;
  background: #fef3c7;
  color: #0f172a;
  border-top: 1px solid rgba(217, 119, 6, 0.35);
  border-bottom: 1px solid rgba(217, 119, 6, 0.35);
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  margin: 0;
  min-height: 18px;
}

/* Per-day timeline inside weekly header */
.planner-day-timeline {
  display: grid;
  grid-template-columns: repeat(var(--slot-count), minmax(0, 1fr));
  min-height: 18px; /* match header min-height */
  height: 100%;
}
/* Ensure per-day timeline fills the full header body height */
.planner-day-header__body > .planner-day-timeline {
  flex: 1 1 auto;
}

/* Weekly: stronger tint on timeline rows while preserving alternation */
.is-week-view .planner-calendar__timeline .planner-timeline__cell { background: rgba(37, 99, 235, 0.06); }
.is-week-view .planner-calendar__timeline .planner-timeline__cell--alt { background: rgba(37, 99, 235, 0.12); }
/* Optional: match left label cell to row tint for a continuous look */
.is-week-view .planner-timeline__label { background: rgba(37, 99, 235, 0.06); }
.is-week-view .planner-day-timeline .planner-timeline__cell { background: rgba(37, 99, 235, 0.06); }
.is-week-view .planner-day-timeline .planner-timeline__cell--alt { background: rgba(37, 99, 235, 0.12); }

/* Daily view: tint global timeline rows with alternating stripes */
.planner-calendar__timeline .planner-timeline__cell { background: rgba(37, 99, 235, 0.06); }
.planner-calendar__timeline .planner-timeline__cell--alt { background: rgba(37, 99, 235, 0.12); }
.planner-timeline__label { background: rgba(37, 99, 235, 0.06); }
.planner-day-timeline .planner-timeline__cell {
  padding: 0; /* fill the full header height */
  height: 100%;
  font-size: 0.875rem;
}

.planner-row {
    display: grid;
    grid-template-columns: var(--meta-column-width) 1fr;
    min-height: 105px;
  border-bottom: 1px solid #ced7e8;
}

.planner-row:last-child {
  border-bottom: none;
}

.planner-row__meta {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
  border-right: 1px solid #eef2f5;
  background: #ffffff;
}

  .planner-avatar {
  display: grid;
  place-items: center;
    width: 64px;
    height: 64px;
  border-radius: 999px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
}

.planner-meta-name {
  font-weight: 600;
  font-size: 1rem;
}

.planner-meta-desc {
  color: #6c757d;
  font-size: 0.875rem;
}

.planner-row__body {
  position: relative;
  padding: 0.35rem 0;
  display: flex;
  align-items: stretch;
  background-color: var(--slot-bg-a);
  background-image:
    repeating-linear-gradient(
      to right,
      rgba(30, 41, 59, 0.16) 0,
      rgba(30, 41, 59, 0.16) 0.5px,
      transparent 0.5px,
      transparent calc(100% / var(--slot-count))
  );
  background-size: calc(100% / var(--slot-count)) 100%;
  overflow: hidden;
}

.planner-row__body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    var(--slot-bg-a) 0,
    var(--slot-bg-a) calc(100% / var(--slot-count)),
    var(--slot-bg-b) calc(100% / var(--slot-count)),
    var(--slot-bg-b) calc(2 * 100% / var(--slot-count))
  );
  pointer-events: none;
}

.planner-dropzone {
  position: relative;
  flex: 1;
}

.planner-lunch-block {
  position: absolute;
  /* p+Öes celou v+Ż+íku +Ö+ídku (v¦Źetn¦Ť vnit+Ön+şho odsazen+ş) */
  top: -0.35rem;
  bottom: -0.35rem;
  left: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.16) 0,
    rgba(15, 23, 42, 0.16) 4px,
    rgba(15, 23, 42, 0.06) 4px,
    rgba(15, 23, 42, 0.06) 8px
  );
  border-left: 1px solid rgba(15, 23, 42, 0.35);
  border-right: 1px solid rgba(15, 23, 42, 0.35);
  pointer-events: none;
  z-index: 1;
}
.planner-lunch-block--header {
  top: 0;
  bottom: 0;
}


.planner-timeoff-block {
  position: absolute;
  top: -0.35rem;
  bottom: -0.35rem;
  left: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.26) 0,
    rgba(148, 163, 184, 0.26) 4px,
    rgba(148, 163, 184, 0.08) 4px,
    rgba(148, 163, 184, 0.08) 8px
  );
  border-left: 1px solid rgba(148, 163, 184, 0.6);
  border-right: 1px solid rgba(148, 163, 184, 0.6);
  pointer-events: none;
  z-index: 1;
}

.planner-offhours-block {
  position: absolute;
  top: -0.35rem;
  bottom: -0.35rem;
  left: 0;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.16), rgba(148, 163, 184, 0.08));
  border-left: 1px dashed rgba(148, 163, 184, 0.55);
  border-right: 1px dashed rgba(148, 163, 184, 0.55);
  pointer-events: none;
  z-index: 0;
}

.planner-lunch-strip {
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.planner-lunch-strip__inner {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(30, 41, 59, 0.18);
  border-left: 1px solid rgba(30, 41, 59, 0.35);
  border-right: 1px solid rgba(30, 41, 59, 0.35);
}

.planner-appointment {
    position: absolute;
    z-index: 2;
    top: 0.05rem;
    bottom: 0.05rem;
    border-radius: 0.75rem;
    padding: 0.35rem 0.45rem 0.3rem;
  box-sizing: border-box;
  color: #0f172a;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
    gap: 0.25rem;
  cursor: grab;
  transition: box-shadow 120ms ease, transform 120ms ease;
  background: #e2e8f0;
  user-select: none;
}

.planner-appointment * {
  user-select: none;
}

.planner-appointment:active {
  cursor: grabbing;
  transform: scale(1.01);
  box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.2);
  z-index: 10;
}

.planner-appointment__details {
  color: #1e293b;
  line-height: 1.2;
  display: grid;
  gap: 0.1rem;
}

.planner-appointment__important {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem;
  font-weight: 700;
  color: #b91c1c;
}

.planner-appointment__important::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: #b91c1c;
  color: #ffffff;
  font-size: 0.75rem;
}

.planner-appointment__surname {
  font-weight: 700;
}

.planner-appointment__surname--waiting {
  color: inherit;
}

.planner-appointment__time {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.planner-appointment__time--waiting {
    color: inherit;
  }

.planner-appointment__flag-waiting {
  display: inline-flex;
  align-items: center;
  height: 0.95rem;
  padding: 0 0.30rem;
  margin-left: 0;
  margin-right: 0.2rem;
  border-radius: 999px;
  background: #b91c1c;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.planner-appointment__details > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-appointment__details span:not(.planner-appointment__description) {
  white-space: nowrap;
}

.planner-appointment__details .planner-appointment__description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin-top: 0.15rem;
}

.planner-appointment__details .planner-appointment__description--single-line {
  -webkit-line-clamp: 1;
  line-clamp: 1;
  white-space: nowrap;
}

/* Weekly view compaction */
.is-week-view .planner-row { min-height: 50px; }
.is-week-view .planner-row__meta { padding: 0.2rem 0.2rem 0.2rem 0.55rem; grid-template-columns: 40px 1fr; }
.is-week-view .planner-avatar { width: 36px; height: 36px; }
/* Rental weekly view: odlep avatary trochu od levého okraje */
  .rental-planner.is-week-view .planner-row__meta {
    padding-left: 0.55rem;
  }
  .rental-planner .planner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .rental-planner .planner-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
  }
/* rozumn+í mezera nad a pod kartou v t+Żdnu */
.is-week-view .planner-row__body { padding-top: 0.12rem; padding-bottom: 0.12rem; }
/* karta je lehce z+¦+żen+í na v+Ż+íku, ale vejdou se t+Öi +Ö+ídky obsahu */
.is-week-view .planner-appointment {
  padding: 0.1rem 0.28rem 0.08rem;
  gap: 0.06rem;
  top: 0.06rem;
  bottom: 0.06rem;
}
.is-week-view .planner-appointment__details .planner-appointment__description { margin-top: 0.05rem; }
.is-week-view .planner-appointment__details { line-height: 1.1; gap: 0.05rem; }
.is-week-view .planner-day-header { min-height: 14px; }
.is-week-view .planner-day-timeline { min-height: 14px; }
.is-week-view .planner-day-timeline .planner-timeline__cell span { line-height: 1; }
/* tighten per-day header left meta and top global timeline in week */
.is-week-view .planner-day-header__meta { padding-top: 0.08rem; padding-bottom: 0.08rem; }
.is-week-view .planner-calendar__timeline .planner-timeline__cell { padding: 0.05rem 0; }
.is-week-view .planner-calendar__timeline .planner-timeline__cell span { line-height: 1; }
.is-week-view .planner-timeline__label { padding: 0.05rem 0.75rem; }

.planner-appointment--waiting {
  /* Siln´¬Ż ´¬Żerven´¬Ż ohrani´¬Żen´¬Ż kolem karty */
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.98), 0 6px 14px rgba(15, 23, 42, 0.25);
}
.is-week-view .planner-appointment--waiting {
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.98);
}

.planner-appointment__resize {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  background: rgba(15, 23, 42, 0.15);
  border-radius: 0 0.75rem 0.75rem 0;
}

.planner-appointment__resize::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 68px;
  background: rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%);
  border-radius: 999px;
}\n\n/* Appointment hover card */\n.planner-hovercard { background: var(--color-surface, #ffffff); border: 1px solid rgba(148,163,184,0.35); border-left: 6px solid var(--accent, var(--color-primary-500, #2563eb)); border-radius: var(--radius-lg, 0.85rem); box-shadow: var(--shadow-floating, 0 16px 36px rgba(15, 23, 42, 0.18)); color: var(--color-text, #0f172a); }\n.planner-hovercard__inner { padding: 0.85rem 1rem; max-width: 380px; }\n.planner-hovercard__header { display: inline-block; background: linear-gradient(135deg, var(--color-primary-400, #3b82f6), var(--color-primary-600, #1d4ed8)); color: #fff; font-weight: 700; letter-spacing: 0.01em; padding: 0.3rem 0.6rem; border-radius: 0.5rem; margin-bottom: 0.5rem; }\n.planner-hovercard__row { display: grid; grid-template-columns: 92px 1fr; gap: 0.5rem; align-items: start; }\n.planner-hovercard__row + .planner-hovercard__row { margin-top: 0.25rem; }\n.planner-hovercard__row .k { color: #475569; font-weight: 600; }\n.planner-hovercard__row.--multiline .v { white-space: normal; overflow-wrap: anywhere; }\n

.planner-appointment.is-dragging,
.planner-appointment.is-resizing {
  opacity: 0.85;
  box-shadow: 0 0.75rem 2.5rem rgba(15, 23, 42, 0.3);
}

.planner-cursor-grabbing,
.planner-cursor-grabbing * {
  cursor: grabbing !important;
}

.planner-loading {
  padding: 3rem 1rem;
  text-align: center;
  color: #6c757d;
  font-size: 1rem;
}

.planner-empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #94a3b8;
}

.planner-toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  min-width: 240px;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.25);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 999;
}

.planner-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Appointment hover card ÔÇô softer visual style */
.planner-hovercard {
  background: #ffffff !important;
  border-radius: 0.9rem !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16) !important;
  color: #0f172a !important;
}

.planner-hovercard__inner {
  padding: 0.55rem 0.8rem 0.7rem !important;
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
  max-width: 460px !important;
}

.planner-hovercard .hover-time {
  display: block;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0;
  background: transparent !important;
  font-size: 0.9rem !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #020617 !important;
}

.planner-hovercard .hover-row {
  margin: 0.1rem 0 !important;
  font-size: 0.82rem !important;
  color: #0f172a !important;
}

.planner-hovercard .hover-row:first-of-type {
  display: inline;
  margin: 0 0 0.3rem 0 !important;
  margin-left: 0.5rem !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  color: #0f172a !important;
}

.planner-hovercard .hover-row:nth-of-type(2) {
  margin-top: 0.3rem !important;
  margin-bottom: 0.25rem !important;
  padding-top: 0.2rem !important;
  color: #0f172a !important;
}

.planner-hovercard .hover-row span:first-child {
  font-weight: 500 !important;
  font-size: 0.78rem !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b !important;
  margin-right: 0.35rem;
}

.planner-hovercard .hover-row span + span {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Highlight for search matches in tables */
.search-highlight,
mark.search-highlight {
  background: rgba(37, 99, 235, 0.18);
  color: inherit;
  padding: 0 0.05em;
  border-radius: var(--radius-sm);
  line-height: inherit;
  box-shadow: inset 0 -0.2em 0 rgba(37, 99, 235, 0.08);
  display: inline;
}

/* inline search input next to actions */
.customers-search-inline {
  width: 320px;
  max-width: 55vw;
  display: inline-block;
  vertical-align: middle;
  padding: 0.45rem 0.6rem;
}

.entity-actions--elevated .entity-actions__search {
  border-radius: 999px;
  overflow: hidden;
}

.entity-actions--elevated .customers-search-inline {
  border: none;
  box-shadow: none;
  border-radius: 999px;
  background: #ffffff;
  padding: 0.5rem 0.9rem;
}

.planner-modal,
.entity-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  z-index: 1000;
  padding: 0.5rem 1rem;
  overflow: hidden;
}

.confirm-modal {
  z-index: 1100;
}

.planner-modal.is-open,
.entity-modal.is-open {
  display: flex;
}

.planner-modal__content,
.entity-modal__content {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  width: min(520px, 94vw);
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.35);
  overflow: hidden;
  margin: auto;
}

.planner-print-dialog__content {
  max-height: calc(100vh - 1rem);
}

.planner-modal__content:has([data-section="customer-create"]:not([hidden])) {
  height: calc(100vh - 0.5rem);
  max-height: none;
}

.planner-modal__content:has([data-section="vehicle-create"]:not([hidden])):not(:has([data-section="customer-create"]:not([hidden]))) {
  height: min(calc(100vh - 3rem), 780px);
}

.planner-modal__header,
.entity-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0 0.5rem 0;
}

.planner-modal__header h2 {
  font-size: 1.6rem;
  margin: 0;
}

.entity-modal__header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
}

.planner-modal__body {
  display: grid;
  gap: 0.5rem;
  flex: 1 1 auto;
  overflow: visible;
  padding-right: 0;
  margin-right: 0;
}

.entity-modal__body {
  display: grid;
  gap: 0.5rem;
  overflow-y: auto; /* scroll long content */
  overflow-x: hidden; /* avoid horizontal scrolling */
}

/* Notes modal specific header: single column - title on first row, hint on second */
.entity-modal[data-note-modal] .entity-modal__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.entity-modal[data-note-modal] .entity-modal__header h2 {
  white-space: normal;
  width: 100%;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
}
.entity-modal[data-note-modal] .entity-modal__header .entity-modal__hint {
  width: 100%;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.planner-modal__actions,
.entity-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.planner-modal__actions {
  margin-top: 0.5rem;
}

.planner-modal__actions .btn {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-modal__actions {
  margin-top: 0.5rem;
}

.planner-modal__actions-gap {
  flex: 1 1 auto;
}

.planner-print-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.planner-print-dialog__header {
  align-items: flex-start;
  gap: 0.75rem;
}

.planner-print-dialog__title h2 {
  margin: 0;
}

.planner-print-dialog__hint {
  color: #64748b;
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

.planner-print-dialog__date {
  font-weight: 700;
  color: #0f172a;
  font-size: 1.15rem;
}

.planner-print-dialog__body {
  gap: 0.75rem;
}

.planner-print-dialog__controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.planner-print-dialog__controls [data-role="select-all"],
.planner-print-dialog__controls [data-role="clear-all"] {
  font-size: 0.9rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.planner-print-dialog__controls [data-role="select-all"] {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--color-primary-600);
}

.planner-print-dialog__controls [data-role="clear-all"] {
  color: #64748b;
  text-decoration: none;
}

.planner-print-dialog__list {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  padding: 0.4rem;
  display: grid;
  row-gap: 0.25rem;
  column-gap: 0.75rem;
  background: #f8fafc;
}

.planner-print-dialog__item {
  display: grid;
  grid-template-columns: auto 44px 1fr;
  column-gap: 0.75rem;
  row-gap: 0;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.planner-print-dialog__item:has(input[type="checkbox"]:checked) {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.45);
}

.planner-print-dialog__item input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #2563eb;
}

.planner-print-dialog__avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  font-size: 0.9rem;
  margin-left: 0.25rem;
}

.planner-print-dialog__name {
  font-weight: 600;
  color: #0f172a;
}

.planner-print-dialog__desc {
  margin-top: 0.1rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.2;
}

.planner-print-dialog__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.planner-print-dialog__empty {
  color: #94a3b8;
  font-style: italic;
  padding: 0.25rem 0.35rem;
}

#vehicle-appointments-title {
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

.vehicle-appointments-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.vehicle-appointments-day {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), #ffffff);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 0.9rem 2rem rgba(15, 23, 42, 0.08);
}

.vehicle-appointments-day__date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: #1e40af;
}

.vehicle-appointments-day__count {
  font-size: 0.88rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.vehicle-appointments-day__items {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.vehicle-appointments-list__item {
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(14, 165, 233, 0.03));
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 0.75rem 1.6rem rgba(15, 23, 42, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.vehicle-appointments-list__item h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.vehicle-appointments-list__item p {
  margin: 0.1rem 0;
  font-size: 0.9rem;
}

.vehicle-appointments-list__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 0.15rem;
}

.vehicle-appointments-list__time {
  font-weight: 600;
  color: #0f172a;
}

.vehicle-appointments-list__duration {
  font-size: 0.85rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}

.vehicle-appointments-list__item:hover {
  transform: translateY(-1px);
  box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.12);
}

.vehicle-appointments-list__meta--actions {
  justify-content: flex-end;
}

.vehicle-appointments-list__item .customer-rentals-list__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.98rem;
  color: #1e40af;
  margin-bottom: 0.15rem;
}

.vehicle-appointments-list__item .customer-rentals-list__time {
  font-weight: 500;
  color: #1e40af;
}

.vehicle-appointments-list__item .customer-rentals-list__meta--actions {
  justify-content: flex-end;
}

/* edit-form styles removed ÔÇô modal je pouze pro ¦Źten+ş */
.planner-modal textarea[name="internalNote"] {
  min-height: 42px;
  max-height: 42px;
}

@media (max-width: 992px) {
  .planner-calendar {
    --meta-column-width: 200px;
  }

  .planner-row {
    min-height: 140px;
  }
}

@media (max-width: 768px) {
  .planner-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .planner-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .planner-controls .planner-date-input {
    flex: 1;
  }
}

@media (max-width: 991.98px) {
  .topbar__nav-wrap {
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    gap: 1rem;
  }

  .topbar__menu {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .topbar__cta {
    margin-left: 0;
    justify-content: center;
  }
}






@media (min-width: 992px) {
  .topbar__toggle {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .topbar__nav-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .topbar__menu {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .topbar__cta {
    margin-left: 0;
    justify-content: center;
  }
}





.entity-modal__header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
}

.entity-modal__content {
  position: relative;
}

.entity-modal__content::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(14, 165, 233, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.entity-modal__actions .btn-primary {
  min-width: 120px;
}

.entity-modal__actions .btn-outline-secondary {
  color: var(--color-text-muted);
}

.settings-page {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.settings-page .entity-header__title p {
  max-width: none;
}

.settings-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: 1fr; /* full-width single column layout */
}

.settings-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: grid;
  gap: 1.25rem;
  grid-column: 1 / -1; /* span full width of grid */
}

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

.settings-card__title {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settings-card__title h3 {
  margin: 0;
  font-size: 1.25rem;
}

.settings-card__title p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.settings-fields {
  display: grid;
  gap: 1rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.settings-field {
  display: grid;
  gap: 0.35rem;
}

.settings-card__actions {
  display: flex;
  justify-content: space-between; /* left: blocked-days, right: save */
  align-items: center;
  gap: 1rem;
}

.settings-card__actions .btn {
  min-width: 160px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}


.settings-section__header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.settings-section__header p {
  margin: 0;
  color: var(--color-text-muted);
  max-width: 520px;
}

.settings-mechanics {
  display: grid;
  gap: 1.25rem;
}

.settings-mechanic {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.05));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.12);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: grid;
  gap: 1rem;
}

  .settings-mechanic__body {
    display: grid;
    gap: 1rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
  }

  .settings-mechanic__body .settings-mechanic__field.settings-mechanic__field--full {
      width: 100%;
  }

.settings-mechanic__footer {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.settings-mechanic__footer-main-actions {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
}

.settings-timeoff__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-mechanic__field label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(15, 23, 42, 0.55);
}

.settings-mechanic__field input[type="text"],
.settings-mechanic__field input[type="color"] {
  margin-top: 0.35rem;
}

.settings-mechanic__field input[type="color"] {
  height: 46px;
  padding: 0.2rem;
}

.settings-alert {
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: #0c4a6e;
  font-weight: 500;
}
.form-label__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.form-label--sub {
  font-size: 0.9rem;
  font-weight: 500;
}

.lookup-field {
  position: relative;
}

.lookup-field__clear {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  cursor: pointer;
}

.lookup-field__clear:hover {
  color: #4b5563;
}

.lookup-field__clear svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.lookup-clear-icon {
  display: none;
}

.lookup-field__clear[data-mode="arrow"] .lookup-clear-icon--arrow {
  display: inline-flex;
}

.lookup-field__clear[data-mode="clear"] .lookup-clear-icon--clear {
  display: inline-flex;
}

.lookup-field__shield {
  position: absolute;
  inset: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  border: none;
  padding: 0;
  margin: 0;
}

.lookup-field__input[disabled]::placeholder {
  color: #98a2b3;
}

.lookup-field__input[disabled],
.lookup-field__input--locked {
  background-color: #f4f7ff;
  border-color: #d8e0f5;
  color: #0f172a;
  cursor: default;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(216, 224, 245, 0.3);
}

.lookup-field__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  border: 1px solid #d0d5dd;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  max-height: 240px;
  overflow-y: auto;
  z-index: 20;
  padding: 0.25rem;
}

.lookup-field__list[hidden] {
  display: none !important;
}

.lookup-option {
  width: 100%;
  display: block;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  cursor: pointer;
  color: inherit;
}

.lookup-option:hover,
.lookup-option.is-active {
  background: #eef2ff;
}

.lookup-option__primary {
  font-weight: 600;
}

.lookup-option__secondary {
  font-size: 0.85rem;
  color: #475467;
}

.lookup-option--empty {
  cursor: default;
  font-style: italic;
  color: #475467;
}

.lookup-create {
  margin-top: 0.35rem;
  padding: 0.4rem 0.65rem 0.1rem;
  border-radius: 0.65rem;
  border: 1px dashed #c7d7fe;
  background: #f8fafc;
  max-width: 720px;
}

.lookup-create__row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  margin-bottom: 0.35rem;
}

.lookup-create__row:last-child {
  margin-bottom: 0;
}

.lookup-create__row label {
  flex: 1 1 200px;
  margin-bottom: 0;
}

.lookup-create__row--double label {
  flex: 1 1 240px;
}

.lookup-create__row--triple label {
  flex: 1 1 180px;
}

.lookup-create__row--actions {
  align-items: flex-end;
}

.lookup-create__row--actions-only {
  justify-content: flex-end;
}

.lookup-create__email {
  flex: 1 1 260px;
}

.lookup-create__actions--inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0;
  margin-top: 0;
}

.lookup-create__intro,
.lookup-create__helper {
  font-size: 0.9rem;
  color: #475467;
  margin-bottom: 0.35rem;
}

.lookup-create__actions {
  margin-top: 0.4rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lookup-create__feedback {
  min-height: 0;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.lookup-create__feedback:empty {
  display: none;
  margin-top: 0;
}

.lookup-create__feedback[data-variant="error"] {
  color: #b42318;
}

.lookup-create__feedback[data-variant="success"] {
  color: #027a48;
}

.lookup-create__feedback[data-variant="info"] {
  color: #0f62fe;
}

.planner-modal .lookup-create {
  font-size: 0.85rem;
}

.planner-modal .lookup-create .form-label--sub {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.planner-modal .lookup-create .form-control,
.planner-modal .lookup-create select {
  font-size: 0.85rem;
  padding: 0.25rem 0.45rem;
  min-height: 1.85rem;
}

.planner-modal .lookup-create__row {
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.planner-modal .lookup-create__intro {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.planner-modal .lookup-create .lookup-create__actions .btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
}

@media (max-width: 640px) {
  .lookup-create__row {
    flex-wrap: wrap;
  }

  .lookup-create__row--actions {
    align-items: flex-start;
  }
}


.service-desc-field {
  width: 100%;
}
.service-desc-wrap {
  width: 100%;
}
.service-desc-input {
  width: 100%;
}
.planner-field-error {
  display: none;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: #b91c1c;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.16), rgba(248, 113, 113, 0.08));
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.6);
  border-radius: 999px;
  padding: 0.15rem 0.75rem 0.15rem 0.55rem;
  align-items: center;
  gap: 0.4rem;
  white-space: normal;
  flex-wrap: wrap;
}
.planner-field-error::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.9);
}
.planner-field-error.is-visible {
  display: inline-flex;
}
.planner-field-error--wide {
  width: 100%;
  justify-content: flex-start;
}
.planner-field-error--wide.is-visible {
  display: flex;
}
.planner-modal .planner-field-invalid .form-control,
.planner-modal .planner-field-invalid .form-select,
.planner-modal .planner-field-invalid .lookup-field__input,
.entity-modal .planner-field-invalid .form-control,
.entity-modal .planner-field-invalid .form-select,
.entity-modal .planner-field-invalid .lookup-field__input {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.7), 0 0 0 4px rgba(248, 113, 113, 0.18);
}
.next-slot-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  margin: 0;
  margin-top: 0.6rem;
  width: 100%;
}
.next-slot-actions[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
  width: 100%;
}
.next-slot-actions__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  width: auto;
}
.next-slot-actions__button {
  white-space: nowrap;
  padding-inline: 0.75rem;
}
.next-slot-actions__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
  padding-right: 0.8rem;
}
.next-slot-actions__checkbox .form-check-input {
  transform: scale(0.92);
  margin-top: 0;
}
.next-slot-actions__status {
  display: none;
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  align-self: flex-end;
  border-radius: 999px;
  padding-inline: 0.9rem;
  padding-block: 0.15rem;
  margin-right: 0.3rem;
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-slot-actions__status:not(:empty) {
  display: block;
}
.next-slot-actions__status.is-success {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
  font-weight: 600;
}
.next-slot-actions__status.is-error {
  color: #b91c1c;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.14), rgba(248, 113, 113, 0.08));
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.6);
  font-weight: 600;
}
.duration-col .form-label {
  display: block;
  margin-bottom: 0.25rem;
}
.duration-col__controls {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
}
.duration-col__controls .form-select {
  flex: 0 0 auto;
  min-width: 8rem;
}
.duration-col__controls .next-slot-actions {
  flex: 1 1 auto;
  margin-left: auto;
}
.timing-row__next-slot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.internal-note-field {
    display: block;
  }
  .internal-note-input {
    width: 100%;
  }
  .planner-important-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-top: -0.1rem;
      margin-bottom: 0;
      padding-left: 0.2rem;
    }
  .planner-important-note {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    color: var(--color-text);
  }
  .planner-important-note .form-check-input {
    margin: 0;
  }
  .planner-waiting-flag {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    color: var(--color-text);
    margin-left: auto;
    margin-right: 0.75rem;
    white-space: nowrap;
  }
  .planner-waiting-flag .form-check-input {
    margin: 0;
  }
.timing-row__spacer {
  min-height: 1px;
}
.timing-row,
.schedule-row {
  --bs-gutter-y: 0.35rem;
}

.schedule-row {
  margin-top: 0;
}

/* Keep date and time inputs in the planner modal from overlapping */
.planner-modal .schedule-date-col,
.planner-modal .schedule-time-col {
  min-width: 0;
}

.planner-modal .schedule-datetime-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.planner-modal .schedule-datetime-wrap .schedule-date-col,
.planner-modal .schedule-datetime-wrap .schedule-time-col {
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .planner-modal .schedule-datetime-wrap {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .planner-modal .schedule-datetime-wrap .schedule-date-col,
  .planner-modal .schedule-datetime-wrap .schedule-time-col {
    flex: 1 1 100%;
  }
}

.planner-modal .schedule-date-col .form-control,
.planner-modal .schedule-time-col .form-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.planner-modal .schedule-date-col .form-control {
  min-width: 7.25rem;
}

.planner-modal .schedule-time-col .form-select {
  min-width: 6rem;
  max-width: 6.75rem;
  width: auto;
}

.planner-modal .schedule-row {
  align-items: flex-end;
  --bs-gutter-x: 0.5rem;
}

.planner-modal .schedule-date-col label,
.planner-modal .schedule-time-col label {
  display: block;
  width: 100%;
}

.planner-modal .schedule-time-col label {
  text-align: left;
}

.planner-modal .schedule-time-col {
  flex: 0 0 auto;
}

.planner-modal .schedule-row > [class*="col-"] {
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

@media (max-width: 1200px) { .planner-week-legend { margin-left: 2rem; } }
@media (max-width: 768px) { .planner-week-legend { margin-left: 0.75rem; } }


@media (max-width: 1200px) { .planner-week-legend { margin-left: 0 !important; } }
@media (max-width: 768px) { .planner-week-legend { margin-left: 0 !important; } }

.settings-actions-left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.settings-holidays__year {
  width: 7rem;
}
.settings-holidays-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1.5rem;
}
.settings-holidays__label {
  color: var(--color-text-muted);
}

.blocked-badge { background: rgba(37,99,235,0.12); color: #2563eb; border: 1px solid rgba(37,99,235,0.25); padding: 0.1rem 0.45rem; border-radius: 999px; font-size: 0.75rem; }
.blocked-row--holiday { background: rgba(37, 99, 235, 0.06); }
.blocked-row--manual { background: #fff; border-color: rgba(148,163,184,0.45) !important; }


/* Blocked days distinction */
.blocked-row--holiday { background: #fff; }
.blocked-row--manual { background: rgba(37,99,235,0.12); border-color: rgba(37,99,235,0.3) !important; font-weight: 600; }


/* Blocked days styles */
.blocked-badge { background: rgba(37,99,235,0.12); color: #2563eb; border: 1px solid rgba(37,99,235,0.25); padding: 0.1rem 0.45rem; border-radius: 999px; font-size: 0.75rem; }
.blocked-row--holiday { background: #fff; }
.blocked-row--manual { background: rgba(37,99,235,0.12); border-color: rgba(37,99,235,0.3) !important; }
.blocked-row--manual .blocked-reason { font-weight: 700; color: #0f172a; }
.blocked-row--manual .blocked-date { font-weight: 400; }
.entity-modal__content .row { margin-left: 0; margin-right: 0; }
.entity-modal__content .col, .entity-modal__content .col-auto { padding-left: 0.25rem; padding-right: 0.25rem; }
/* ensure inputs aren+óÔéČÔäót clipped at the left edge */
.entity-modal__body { padding-left: 0.5rem; padding-right: 0.5rem; }




.is-week-view .planner-appointment__details { line-height: 1.1; gap: 0.05rem; }














/* Notes */
.notes-page {
  gap: 1rem;
}

.notes-header {
  align-items: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.notes-header__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-left: auto;
}

[data-notes-root] .notes-header__meta {
  display: none;
}

.notes-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(99, 102, 241, 0.18));
  color: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.24);
  box-shadow: 0 8px 26px rgba(59, 130, 246, 0.16);
}

.notes-counter__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1d4ed8;
}

.notes-counter__label {
  color: #0f172a;
  font-weight: 600;
}

.notes-list-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 1.1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 1rem;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.notes-list-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.notes-list-card__header h2 {
  margin: 0;
}

.notes-list-card__hint {
  margin: 0.25rem 0 0;
  color: #475569;
}

.notes-list {
  display: grid;
  gap: 0.75rem;
}

.note-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.9rem;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.85), #ffffff);
}

.note-card__body {
  display: grid;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.note-card__text {
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.note-card__meta {
  color: #475569;
  font-size: 0.95rem;
}

.note-card__actions {
  flex-shrink: 0;
}

.notes-empty {
  padding: 1.25rem;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  border-radius: 0.9rem;
  text-align: center;
  color: #475569;
  background: rgba(248, 250, 252, 0.6);
}

/* Override note-card visuals for the notes list using higher-specificity selectors
   to ensure this style wins over earlier generic .note-card rules. */
[data-note-list] .note-card,
.notes-list-card [data-note-list] .note-card,
.notes-list .note-card {
  /* základní moderní karta v jemných modrých tónech */
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.04));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: 0 0.9rem 2rem rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

[data-note-list] .note-card__body,
.notes-list .note-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

[data-note-list] .note-card__text,
.notes-list .note-card__text {
  color: #0f172a;
  font-size: 0.98rem;
  line-height: 1.3;
}

[data-note-list] .note-card__meta,
.notes-list .note-card__meta {
  align-self: flex-start;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  font-size: 0.85rem;
  color: #475569;
  max-width: 100%;
  white-space: normal;
}

.note-card__meta-label {
  font-weight: 600;
  color: #1d4ed8;
}

[data-note-list] .note-card__actions .note-card__complete-btn,
.notes-list .note-card__actions .note-card__complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.55);
  color: #b91c1c;
  font-weight: 600;
}

.note-card__complete-icon svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.note-card__complete-text {
  line-height: 1;
}

/* jemné zvýraznění řádku při najetí myší */
[data-note-list] .note-card:hover,
.notes-list .note-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.12);
}

/* střídání barev pro lepší odlišení poznámek */
[data-note-list] .note-card:nth-child(odd),
.notes-list .note-card:nth-child(odd) {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.10), rgba(14, 165, 233, 0.05));
}

[data-note-list] .note-card:nth-child(even),
.notes-list .note-card:nth-child(even) {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.98));
  border-color: rgba(148, 163, 184, 0.45);
}

.notes-empty__icon {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.notes-loading {
  color: #0f172a;
  padding: 0.5rem 0;
}

.notes-history__list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.notes-history__item {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.92), #ffffff);
  box-shadow: 0 0.7rem 1.6rem rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 0.35rem;
}

.notes-history__meta {
  color: #475569;
  font-size: 0.85rem;
}

.notes-history__meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.notes-history__meta--resolved {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
}

.notes-history__resolved-text {
  display: inline-flex;
  align-items: center;
  background: rgba(59, 130, 246, 0.06);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.notes-history__empty {
  padding: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 0.85rem;
  background: rgba(248, 250, 252, 0.7);
  color: #475569;
}

.notes-history__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  background: rgba(52, 211, 153, 0.14);
  color: #0f766e;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.notes-history__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.entity-modal__title {
    margin: 0;
    line-height: 1.2;
}

.entity-modal__title-main {
    display: block;
    font-weight: 700;
    font-size: 1.5rem;
}

.entity-modal__title-name {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

#mechanic-extra-caption,
#mechanic-timeoff-caption {
    margin-bottom: 0.1rem;
}

.timeoff-first-row {
    margin-top: 0.5rem; /* můžeš dát 0.5 až 1.2 podle oka */
}

#mechanic-timeoff-caption {
    margin-bottom: 0.2rem; /* stejná mezera jako u Dny navíc */
}

.entity-modal__title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.entity-modal__header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Rental settings */
.settings-card--rental {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-rental__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.settings-rental__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.settings-rental__item {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.05));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.12);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: grid;
  gap: 1rem;
}

.settings-rental__row {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  column-gap: 2rem;
  row-gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-rental__actions-row {
  margin-top: 0.75rem;
}

.settings-rental__order {
  display: flex;
  gap: 0.35rem;
}

.settings-mechanic__footer .settings-rental__order[data-mechanic-order] {
  margin-right: 0.75rem;
}

.settings-rental__order-btn {
  padding-inline: 0.9rem;
  min-width: 0;
}

.settings-rental__order-btn:disabled {
  opacity: 0.35;
}

.settings-rental__order-arrow {
  display: inline-block;
  font-size: 1.05rem;
  line-height: 1;
}

.settings-rental__actions .btn {
  min-width: 92px;
}

.settings-field--color {
  min-width: 150px;
}

.settings-field--switch {
  min-width: 140px;
}

.settings-card--rental .alert {
  padding: 0.65rem 0.75rem;
  margin: 0;
}

/* Rental planner */
.rental-calendar {
  margin-top: 0.5rem;
}

.rental-filter {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.25rem 0 0.75rem;
}

.rental-filter__label {
  font-weight: 600;
  color: #0f172a;
}

.rental-filter__list {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.rental-filter__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #ffffff;
  font-size: 0.9rem;
}

.rental-filter__swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.rental-grid {
  display: grid;
  grid-template-columns: 190px repeat(7, 1fr);
  gap: 0.35rem;
  align-items: start;
}

.rental-grid__head {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem;
  text-align: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

.rental-grid__head--empty {
  background: transparent;
  border: none;
}

.rental-grid__timeline {
  grid-column: 1 / 2;
}

.rental-timeline__col {
  position: relative;
  height: var(--day-height, 520px);
  border-right: 1px solid #e2e8f0;
}

.rental-timeline__item {
  position: absolute;
  left: 0;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: #475569;
}

.rental-grid__car {
  padding: 0.5rem 0.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #ffffff;
}

.rental-grid__car-name {
  font-weight: 700;
  color: #0f172a;
}

.rental-grid__car-plate {
  color: #475569;
  font-size: 0.9rem;
}

.rental-day {
  position: relative;
  height: var(--day-height, 520px);
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  overflow: hidden;
}

.rental-day__lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rental-day__line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
  font-size: 0.75rem;
  color: #94a3b8;
  padding-left: 4px;
}

.rental-card {
  position: absolute;
  left: 4px;
  right: 4px;
  padding: 6px 8px 8px;
  border-radius: 0.5rem;
  border: 1px solid #2563eb;
  background: #e0e7ff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  cursor: grab;
  color: #0f172a;
  overflow: hidden;
}

.rental-card.is-dragging {
  opacity: 0.85;
  outline: 2px dashed #2563eb;
}

.rental-card__title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.15;
}

.rental-card__phone {
  font-size: 0.88rem;
  color: #0f172a;
  line-height: 1.15;
}

.rental-card__note {
  font-size: 0.82rem;
  color: #475569;
  margin-top: 0.15rem;
  line-height: 1.2;
}

.rental-card__time {
  font-size: 0.8rem;
  color: #334155;
  margin-top: 0.15rem;
}

.rental-card__handle {
  position: absolute;
  left: 2px;
  right: 2px;
  height: 6px;
  cursor: ns-resize;
}

.rental-card__handle--start { top: 0; }
.rental-card__handle--end { bottom: 0; }

.rental-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.rental-month__head {
  text-align: center;
  font-weight: 700;
  color: #0f172a;
}

.rental-month__cell {
  min-height: 120px;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.4rem 0.45rem;
  background: #ffffff;
}

.rental-month__cell.is-muted {
  background: #f8fafc;
  color: #94a3b8;
}

.rental-month__date {
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.rental-month__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rental-month__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
  padding: 0.2rem 0.25rem;
  border-left: 3px solid #2563eb;
  border-radius: 0.35rem;
  background: #f8fafc;
  cursor: pointer;
}

.rental-month__item-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.rental-month__item-car {
  color: #475569;
  font-size: 0.8rem;
}

.rental-month__more {
  font-size: 0.85rem;
  color: #475569;
}

.rental-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.rental-modal__dialog {
  width: min(520px, 94vw);
  background: #ffffff;
  border-radius: 0.65rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  padding: 1.1rem 1.2rem;
}

.rental-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.rental-modal__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
}

.rental-modal__header .btn-close {
  display: none;
}

.rental-modal__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rental-modal__row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Rental modal: sjednocení mezery u řádku Zákazník (adresář) s lookup polem */
.rental-modal__row > label.form-label > .lookup-field {
  display: block;
  margin-top: 0.25rem;
}

.rental-modal__body > .rental-modal__row:nth-of-type(3) {
  margin-top: -0.25rem;
}

.rental-modal__row--split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

/* Rental modal: Auto / Datum od / Čas od */
.rental-modal__body > .rental-modal__row:nth-of-type(4).rental-modal__row--split {
  grid-template-columns: minmax(200px, 1.7fr) minmax(170px, 1.2fr) auto;
  justify-content: flex-start;
  margin-top: 0.8rem;
}

/* Rental modal: zúžit pole Datum do, aby nebylo přes celý řádek */
.rental-modal__row [data-field="end-date"] {
  width: auto;
  max-width: 11rem;
}

/* Rental modal: Datum do / Čas do – držet u sebe, ne na krajích */
.rental-modal__body > .rental-modal__row:nth-of-type(6).rental-modal__row--split {
  grid-template-columns: max-content max-content minmax(0, 1fr);
  justify-content: flex-start;
}

/* Zúžit pole Čas od v půjčovně, ale zarovnat zprava jako ostatní */
.rental-modal__row [data-field="start-time"] {
    width: auto;
    min-width: 5.5rem;
    max-width: 7rem;
    margin-left: 0;
  }
  .rental-modal__row [data-field="end-time"] {
    width: auto;
    min-width: 5.5rem;
    max-width: 7rem;
    margin-left: 0;
  }

/* Rental modal: vizuálně sjednocené disabled vstupy (auto / datum od / čas od / lookup) */
.rental-modal .form-control:disabled,
.rental-modal .form-select:disabled {
  background-color: #edf2ff;
  border-color: #d7e3ff;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(215, 227, 255, 0.5);
  cursor: default;
}

/* Rental modal: přesnější zarovnání řádku Datum do / ¬as do */
.rental-modal__body .rental-modal__row.rental-modal__row--split.rental-modal__row--end {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.75rem;
}

/* Rental modal: přesnější zarovnání řádku Datum do / Čas do */
.rental-modal__body .rental-modal__row.rental-modal__row--split:has([data-field="end-date"]) {
  grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr);
  justify-content: flex-start;
}

.rental-modal__meta {
  font-size: 0.9rem;
  color: #475569;
}

.rental-modal__actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.rental-modal__right {
  display: flex;
  gap: 0.5rem;
}

.rental-toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  min-width: 240px;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.25);
  transition: opacity 160ms ease, transform 160ms ease;
  opacity: 0;
  transform: translateY(20px);
  z-index: 1500;
}

.rental-toast[data-variant="danger"],
.rental-toast[data-variant="success"],
.rental-toast[data-variant="info"],
.rental-toast[data-variant="warning"] {
  background: #0f172a;
  color: #f8fafc;
}

.rental-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.rental-modal__row [data-field="duration-hours"] {
  width: auto;
  min-width: 6rem;
  max-width: 9rem;
}
.rental-modal__mode-row {
  align-self: flex-start;
  width: 50%;
  margin-top: 1rem;
}


.topbar__icon--rental {
  color: #fed7aa;
  width: 22px;
  height: 22px;
}

.topbar__icon--motorcycle {
  color: #f97316;
  width: 22px;
  height: 22px;
}
