.product-table td:nth-child(1) {
  width: 36px;
  min-width: 28px;
  max-width: 44px;
  text-align: center;
}
@media (max-width: 720px) {
  .table-responsive {
    padding-left: 0;
    padding-right: 0;
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
  }
  .table-responsive .product-table {
    min-width: 520px;
    font-size: 0.98rem;
  }
  .product-table th,
  .product-table td {
    white-space: nowrap;
    padding-left: 8px;
    padding-right: 8px;
  }
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive .product-table {
  min-width: 600px;
}
.table-responsive {
  padding-bottom: 2px;
  padding-left: 4px;
  padding-right: 4px;
}
.product-table {
  width: 100%;
  table-layout: auto;
}
.product-table th:nth-child(3),
.product-table td:nth-child(3) {
  min-width: 120px;
}
.product-table th:nth-child(4),
.product-table td:nth-child(4) {
  min-width: 80px;
}
.product-table th {
  text-align: center;
  font-weight: 600;
  padding: 10px 6px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}
.product-table td {
  text-align: left;
  padding: 8px 6px;
}
/* Header da toolbar de produtos */
.product-toolbar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.add-product-btn {
  margin-top: 0;
  margin-right: 0;
  box-shadow:
    0 4px 16px rgba(77, 124, 255, 0.25),
    0 2px 8px rgba(77, 124, 255, 0.1);
  background: #fff;
  border: 1.5px solid var(--brand-accent);
  color: var(--brand-accent);
  font-size: 1.3rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
}
.add-product-btn:hover {
  box-shadow: 0 8px 32px rgba(77, 124, 255, 0.35);
  background: var(--brand-accent);
  color: #fff;
}
/* Toolbar de produtos - lista de produtos */
.product-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.product-toolbar .input {
  flex: 1 1 240px;
  min-width: 180px;
  max-width: 340px;
}
.product-toolbar .btn {
  margin-left: 0;
}
.toolbar-spacer {
  flex: 1 1 auto;
}
.product-toolbar .icon-btn {
  margin-left: auto;
  box-shadow: 0 2px 8px rgba(77, 124, 255, 0.1);
}
:root {
  --brand-primary: #5f9800;
  --brand-accent: #7ebe00;
  --brand-accent-soft: #99cb2f;
  --brand-accent-pale: #cde89d;
  --surface-base: #ffffff;
  --surface-soft: #f2f8e8;
  --surface-warm: #e3f1cb;
  --ink-strong: #1f3a0f;
  --ink-soft: #5b7b43;
  --bg-image-light: url("../img/uploads/back.png");
  --bg-image-dark: url("../img/uploads/back-dark.png");
  --bg-image: var(--bg-image-light);
  --text: var(--ink-strong);
  --card: rgba(255, 255, 255, 0.84);
  --muted: var(--ink-soft);
}

[data-theme="dark"] {
  --bg-image: var(--bg-image-dark);
  --text: #e5e7eb;
  --card: rgba(17, 17, 17, 0.9);
  --muted: #9ca3af;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.7), rgba(227, 241, 203, 0.92)),
    var(--bg-image) no-repeat center center fixed;
  background-size: cover;
}
body[data-theme="dark"] {
  background:
    linear-gradient(rgba(10, 10, 10, 0.82), rgba(22, 22, 22, 0.94)),
    var(--bg-image) no-repeat center center fixed;
  background-size: cover;
}
.has-fixed-header {
  padding-top: 96px;
}
.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 1000;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] .header-fixed {
  background: #1a1a1a;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.6);
}
.header-fixed .container {
  padding: 6px 20px;
}
.header-fixed .logo {
  width: 96px;
}
header {
  position: relative;
  padding: 24px 16px 0;
}
header.container {
  padding-bottom: 8px;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  padding-right: 0;
}
.theme-toggle {
  border: none;
  background: transparent;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  position: absolute;
  top: 0;
  right: 0;
}
.theme-toggle .theme-label {
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.theme-toggle .theme-label-dark {
  display: none;
}
.theme-toggle.is-dark .theme-label-dark {
  display: inline;
}
.theme-toggle.is-dark .theme-label-light {
  display: none;
}
.theme-toggle:hover {
  color: var(--muted);
}
.pwa-install-btn {
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  height: auto;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.pwa-install-btn:hover {
  color: var(--muted);
}
.logo {
  width: 120px;
  height: auto;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease,
    width 0.35s ease,
    height 0.35s ease;
  transform-origin: left center;
}
.banner {
  width: 100%;
  height: 100%;
  max-height: 607px;
  object-fit: cover;
  display: block;
}
.hero-banner-carousel {
  margin-top: 16px;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
  background: #f8fafc;
}
.hero-banner-track {
  display: flex;
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.hero-banner-slide {
  flex: 0 0 100%;
  margin: 0;
  aspect-ratio: 1390 / 607;
}
.hero-banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-banner-nav:hover {
  background: rgba(15, 23, 42, 0.62);
}
.hero-banner-nav.prev {
  left: 12px;
}
.hero-banner-nav.next {
  right: 12px;
}
.hero-banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}
.hero-banner-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.hero-banner-dot.is-active {
  transform: scale(1.3);
  background: #ffffff;
}
.hero-banner-carousel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.18));
  z-index: 2;
}
.hero-banner-carousel:focus-within .hero-banner-nav,
.hero-banner-carousel:hover .hero-banner-nav {
  transform: translateY(-50%) scale(1.04);
}
.hero-banner-carousel .banner {
  display: block;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 100px;
}
.tabs {
  display: flex;
  gap: 8px;
  margin: 6px 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab-btn {
  border: 1px solid #d6e0ff;
  background: #f1f5ff;
  color: #0f172a;
  padding: 10px 14px;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
  flex: 0 0 auto;
}
.tab-btn:hover {
  background: #e7eeff;
  border-color: #c7d7ff;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}
.tab-btn.active {
  background: var(--brand-accent);
  color: #fff;
  border-color: transparent;
  border-bottom-color: transparent;
  box-shadow: 0 10px 18px rgba(77, 124, 255, 0.3);
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
}
body[data-theme="dark"] .tab-btn {
  background: #2b2b2b;
  border-color: #444;
  color: #e5e7eb;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
body[data-theme="dark"] .tab-btn:hover {
  background: #343434;
  border-color: #555;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45);
}
body[data-theme="dark"] .tab-btn.active {
  background: #3b3b3b;
  color: #f8fafc;
  border-color: transparent;
  border-bottom-color: transparent;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.55);
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
}
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}
.tab-content.active {
  display: block;
}
.tab-content .card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.tab-content .card h2.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.tab-content .card h4 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.section-title {
  font-size: 1.4rem;
  margin: 18px 0;
}
.services-search-card.guest {
  margin-bottom: 16px;
}
.services-search-card {
  margin-bottom: 16px;
}
.card {
  background: var(--card);
  backdrop-filter: blur(8px);
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.photos-card {
  margin-top: 8px;
}
.photos-carousel {
  position: relative;
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 12px 10px;
  overflow: hidden;
}
.photos-carousel-viewport {
  overflow: hidden;
  border-radius: 12px;
}
.photos-carousel-track {
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
}
.photo-slide {
  flex: 0 0 100%;
  margin: 0;
}
.photo-slide-media {
  min-height: 290px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background:
    radial-gradient(circle at 12% 18%, rgba(77, 124, 255, 0.2), transparent 48%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.photo-slide-image {
  width: 100%;
  height: 290px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  display: block;
  background: rgba(248, 250, 252, 0.85);
}
.photo-slide-icon {
  color: var(--brand-accent);
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-slide-icon svg {
  width: 42px;
  height: 42px;
  stroke-width: 1.95;
}
.photo-slide-label {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #334155;
}
.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}
.photo-nav svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}
.photo-nav:hover,
.photo-nav:focus-visible {
  transform: translateY(-50%) scale(1.05);
  background: rgba(15, 23, 42, 0.9);
}
.photo-nav-prev {
  left: 20px;
}
.photo-nav-next {
  right: 20px;
}
.photos-carousel-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.photo-counter {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}
.photo-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.photo-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.6);
  cursor: pointer;
  padding: 0;
  transition:
    width 0.2s ease,
    background 0.2s ease;
}
.photo-dot.is-active {
  width: 22px;
  background: var(--brand-accent);
}
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.photo-thumb {
  border-radius: 12px;
  overflow: hidden;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.35);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.photo-thumb:hover {
  border-color: rgba(77, 124, 255, 0.55);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}
.photo-thumb:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}
.photo-thumb.is-active {
  border-color: rgba(77, 124, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(77, 124, 255, 0.16);
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
  display: block;
}
.photo-placeholder {
  min-height: 120px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.photo-placeholder-icon {
  color: var(--brand-accent);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.photo-placeholder-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.1;
}
.photo-placeholder-label {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.92rem;
}
body[data-theme="dark"] .photo-placeholder {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(39, 39, 39, 0.8);
}
body[data-theme="dark"] .photo-placeholder-label {
  color: #cbd5e1;
}
body[data-theme="dark"] .photo-thumb {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(39, 39, 39, 0.8);
}
body[data-theme="dark"] .photo-thumb.is-active {
  border-color: rgba(99, 140, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(99, 140, 255, 0.2);
}
body[data-theme="dark"] .photos-carousel {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(26, 26, 26, 0.86);
}
body[data-theme="dark"] .photo-slide-media {
  border-color: rgba(148, 163, 184, 0.5);
  background:
    radial-gradient(circle at 12% 18%, rgba(77, 124, 255, 0.28), transparent 48%),
    linear-gradient(140deg, rgba(33, 33, 33, 0.95), rgba(26, 26, 26, 0.95));
}
body[data-theme="dark"] .photo-slide-label {
  color: #e2e8f0;
}
body[data-theme="dark"] .photo-slide-image {
  background: rgba(15, 23, 42, 0.72);
}
body[data-theme="dark"] .photo-nav {
  background: rgba(2, 6, 23, 0.75);
}
body[data-theme="dark"] .photo-nav:hover,
body[data-theme="dark"] .photo-nav:focus-visible {
  background: rgba(2, 6, 23, 0.9);
}
@media (max-width: 720px) {
  .photo-slide-media {
    min-height: 230px;
  }
  .photo-slide-image {
    height: 230px;
  }
  .photo-nav {
    width: 34px;
    height: 34px;
  }
  .photo-nav-prev {
    left: 14px;
  }
  .photo-nav-next {
    right: 14px;
  }
}
.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.admin-gallery-item {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 10px;
}
.admin-gallery-image-wrap {
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}
.admin-gallery-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}
body[data-theme="dark"] .admin-gallery-item {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(39, 39, 39, 0.8);
}
body[data-theme="dark"] .admin-gallery-image-wrap {
  background: #2b2b2b;
}
.btn {
  background: var(--brand-accent);
  border: none;
  color: #fff;
  padding: 5.4px 16px; /* Reduzido para metade */
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--brand-accent);
  color: var(--brand-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px; /* Padroniza largura para todos os botões */
}
.btn.is-active,
.btn-outline.is-active {
  background: var(--brand-accent);
  color: #fff;
  border-color: transparent;
}
.btn-danger {
  background: #ef4444;
  border: none;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px; /* Padroniza largura para todos os botões */
}
.btn-danger:hover {
  background: #dc2626;
}
body[data-theme="dark"] .btn-danger {
  background: #b91c1c;
  color: #fff;
}
.btn-success {
  background: #16a34a;
  border: none;
  color: #fff;
}
.btn-success:hover {
  background: #15803d;
}
body[data-theme="dark"] .btn-success {
  background: #15803d;
  color: #fff;
}
.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.table-actions form {
  margin: 0;
}
.contra-actions .btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.contra-actions .btn svg {
  width: 16px;
  height: 16px;
}
.reviews-actions .btn {
  min-width: 96px;
  justify-content: center;
}
body[data-theme="dark"] .btn {
  background: #3b3b3b;
  color: #f8fafc;
}
body[data-theme="dark"] .btn-outline {
  border-color: #5b5b5b;
  color: #d1d5db;
}
.btn-reservar {
  border-radius: 0;
}
.btn-cancel {
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 6px;
}
.btn-disabled-mono,
.btn:disabled.btn-disabled-mono {
  background: #cbd5e1 !important;
  color: #475569 !important;
  border: 1px solid #94a3b8;
  filter: grayscale(1);
  opacity: 0.9;
  cursor: not-allowed;
}
body[data-theme="dark"] .btn-disabled-mono,
body[data-theme="dark"] .btn:disabled.btn-disabled-mono {
  background: #3f3f46 !important;
  color: #a1a1aa !important;
  border-color: #52525b;
}
.btn-back {
  border-radius: 0;
  padding: 6px 12px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  align-self: flex-start;
}
.btn-back-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  color: var(--text);
  background: transparent;
  border: none;
  text-decoration: none;
}
.btn-back-icon:hover {
  color: var(--brand-accent);
}
.btn-back-icon:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn-back-icon svg {
  width: 20px;
  height: 20px;
}
.scroll-top-fab {
  position: fixed;
  right: 18px;
  bottom: 84px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(77, 124, 255, 0.72);
  background: var(--brand-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  cursor: pointer;
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.scroll-top-fab.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.scroll-top-fab:hover {
  background: #3f67d8;
  border-color: #3f67d8;
}
.scroll-top-fab svg {
  width: 20px;
  height: 20px;
}
body[data-theme="dark"] .scroll-top-fab {
  background: var(--brand-accent);
  border-color: rgba(99, 140, 255, 0.75);
  color: #fff;
}
@media (max-width: 720px) {
  .scroll-top-fab {
    right: 14px;
    bottom: 92px;
    width: 42px;
    height: 42px;
  }
}
.input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d4dbe8;
  background: #fff;
  color: #0f172a;
}
input[type="file"].input {
  padding: 8px 10px;
}
input[type="file"].input::file-selector-button {
  background: var(--brand-accent);
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 10px;
}
input[type="file"].input::file-selector-button:hover {
  filter: brightness(0.95);
}
body[data-theme="dark"] input[type="file"].input {
  background: #272727;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
}
body[data-theme="dark"] input[type="file"].input::file-selector-button {
  background: #3b3b3b;
  color: #f8fafc;
}
body[data-theme="dark"] #serviceSearch {
  background: #272727;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
}
body[data-theme="dark"] #tab-reviews .input,
body[data-theme="dark"] #tab-reviews textarea {
  background: #272727;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
}
body[data-theme="dark"] .booking-section .flatpickr-input.input,
body[data-theme="dark"] .booking-section .flatpickr-input.input[readonly] {
  background: #272727;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
}
.form-stack label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
}
.form-stack label:first-of-type {
  margin-top: 0;
}
.form-stack .input,
.form-stack select,
.form-stack textarea {
  margin-bottom: 8px;
}
.form-stack .btn {
  margin-top: 12px;
}
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.products-actions {
  align-items: center;
  flex-wrap: nowrap;
  margin-top: 0;
}
.products-actions .input {
  flex: 1 1 280px;
  margin-top: 0;
  width: auto;
  min-width: 220px;
}
.products-actions .icon-btn,
.products-actions .btn {
  flex: 0 0 auto;
}
@media (max-width: 720px) {
  .products-actions {
    flex-wrap: wrap;
    margin-top: 12px;
  }
}
.form-actions .btn {
  margin-top: 0;
}
.booking-form {
  gap: 14px;
}
.booking-card {
  margin-top: 16px;
}
.booking-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.booking-date {
  max-width: 320px;
}
.flatpickr-calendar.inline {
  width: 100%;
  border: none;
  box-shadow: none;
  background: transparent;
  margin-bottom: 16px;
}
.flatpickr-calendar.inline .flatpickr-months {
  margin-bottom: 6px;
}
.flatpickr-calendar.inline .flatpickr-months .flatpickr-month {
  color: var(--text);
}
.flatpickr-calendar.inline .flatpickr-weekdays,
.flatpickr-calendar.inline .flatpickr-weekday,
.flatpickr-calendar.inline .flatpickr-day {
  color: var(--text);
}
body[data-theme="dark"] .flatpickr-calendar.inline .flatpickr-weekdays,
body[data-theme="dark"] .flatpickr-calendar.inline .flatpickr-weekday,
body[data-theme="dark"] .flatpickr-calendar.inline .flatpickr-day {
  color: #fff;
}
.flatpickr-calendar.inline .flatpickr-weekdays {
  margin-bottom: 6px;
}
.flatpickr-calendar.inline .flatpickr-day {
  border-radius: 50%;
}
.flatpickr-calendar.inline .flatpickr-day.selected,
.flatpickr-calendar.inline .flatpickr-day.startRange,
.flatpickr-calendar.inline .flatpickr-day.endRange {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}
.time-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.time-chip {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.time-chip.is-selected {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}
.booking-summary {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
body[data-theme="dark"] .booking-summary {
  background: #272727;
  border-color: rgba(148, 163, 184, 0.25);
}
.booking-summary-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}
.booking-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
@media (max-width: 720px) {
  .booking-date {
    max-width: 100%;
  }
  .time-chip {
    padding: 7px 12px;
    font-size: 0.9rem;
  }
}
.pro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 6px;
  justify-items: center;
}
.pro-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 14px;
  cursor: default;
  text-align: center;
  user-select: none;
  width: 100%;
}
.form-stack .pro-card {
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 600;
}
.pro-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pro-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.pro-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pro-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  display: block;
  width: 100%;
  text-align: center;
}
body[data-theme="dark"] .pro-name,
body[data-theme="dark"] .pro-item-name {
  color: #fff;
}
.pro-photo {
  width: 100%;
  max-width: 300px;
  max-height: 300px;
  border-radius: 12px;
  margin-bottom: 8px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.pro-photo--detail {
  aspect-ratio: 1 / 1;
}
.pro-photo--profile {
  aspect-ratio: 1 / 1;
}
.details-grid .details-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  max-width: 336px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.details-grid {
  justify-items: center;
}
.details-grid .details-card .pro-photo {
  margin-left: auto;
  margin-right: auto;
}
.details-card h4 {
  margin-bottom: 4px;
}
.details-card .muted {
  margin-top: 0;
}
.details-pro-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pro-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.pro-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.pro-item-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.pro-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pro-item-name {
  font-weight: 700;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pro-item-link {
  color: var(--brand-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.pro-item-link:hover {
  text-decoration: underline;
}
.profile-card {
  margin-top: 16px;
  text-align: left;
}
.profile-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 12px auto 8px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-card h2:last-of-type {
  text-align: center;
}
@media (max-width: 720px) {
  .pro-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .pro-item-avatar {
    width: 64px;
    height: 64px;
  }
  .pro-item-name {
    font-size: 0.78rem;
  }
}
@media (max-width: 720px) {
  .pro-photo {
    max-width: 220px;
    max-height: 220px;
  }
}
@media (max-width: 480px) {
  .tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-left: 0;
    padding-right: 0;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    width: auto;
    min-width: max-content;
    padding: 8px 12px;
    font-size: 0.92rem;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
  }
  .pro-photo {
    max-width: 180px;
    max-height: 180px;
  }
  .pro-list {
    gap: 8px;
  }
  .pro-item-avatar {
    width: 56px;
    height: 56px;
  }
  .pro-item-name {
    font-size: 0.72rem;
    letter-spacing: 0;
  }
}

@media (max-width: 720px) {
  .tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    width: auto;
    min-width: max-content;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
  }
}
.pro-card input:checked + .pro-avatar {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 4px rgba(77, 124, 255, 0.15);
}
@media (max-width: 720px) {
  .logo {
    width: 0;
    height: 0;
    opacity: 0;
    transform: scale(0);
  }
  .pro-avatar {
    width: 78px;
    height: 78px;
  }
  .btn-cancel {
    padding: 6px 10px;
    font-size: 0.82rem;
  }
}
.form-stack .input[type="file"] {
  padding: 10px;
}
.form-stack .input[type="file"]::file-selector-button {
  background: var(--brand-accent);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 12px;
}
.form-stack .input[type="file"]::-webkit-file-upload-button {
  background: var(--brand-accent);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 12px;
}
.muted {
  color: var(--muted);
}
.appointments-card {
  margin-bottom: 18px;
}
.rebook-card {
  margin-bottom: 18px;
}
.rebook-grid {
  display: grid;
  gap: 12px;
}
.rebook-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}
body[data-theme="dark"] .rebook-item {
  background: #272727;
}
.rebook-copy h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.rebook-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.appointments-grid {
  gap: 14px;
}
.appointment-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
body[data-theme="dark"] .appointment-card {
  background: #272727;
}
.appointment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}
.appointment-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}
@media (hover: none) {
  .appointment-card:active {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  }
}
.appointment-main h4 {
  margin: 10px 0 0;
  font-size: 1.05rem;
}
.appointment-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}
.appointment-status.status-confirmado,
.appointment-status.status-confirmada {
  background: #e7f8ef;
  color: #0f8a4c;
}
.appointment-status.status-pendente {
  background: #edf9f1;
  color: #1f7a45;
}
.appointment-status.status-cancelado {
  background: #fdecec;
  color: #b42318;
}
.appointment-status.status-concluido,
.appointment-status.status-concluído {
  background: #e6f3ff;
  color: #1d4ed8;
}
.appointment-status.status-no_show,
.appointment-status.status-no-show {
  background: #f1f5f9;
  color: #475569;
}
.appointment-date {
  min-width: 88px;
  text-align: center;
  border-left: 1px solid #e2e8f0;
  padding-left: 16px;
}
.appointment-month {
  display: block;
  color: #64748b;
  font-weight: 600;
  text-transform: capitalize;
}
.appointment-day {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
}
.appointment-time {
  display: block;
  color: #64748b;
  font-weight: 600;
}
@media (max-width: 720px) {
  .appointment-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .appointment-date {
    border-left: none;
    border-top: 1px solid #e2e8f0;
    padding-left: 0;
    padding-top: 10px;
    text-align: left;
    display: flex;
    gap: 10px;
    align-items: baseline;
  }
  .appointment-day {
    font-size: 1.4rem;
  }
}
.service-category {
  margin-bottom: 14px;
}
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.category-indicator {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.category-indicator svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.25;
}
.category-services {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}
.category-services.open {
  overflow: hidden;
}
.service-item-layout {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 14px;
  align-items: center;
}
.service-item-copy h4 {
  margin: 0 0 6px;
}
.service-item-copy {
  min-width: 0;
}
.service-item-copy p {
  margin: 0 0 8px;
}
.service-item-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.service-item-price {
  font-size: 1.05rem;
}
.service-item-duration {
  color: var(--muted);
  font-weight: 600;
}
.service-item-duration::before {
  content: "•";
  margin-right: 6px;
}
.service-item-copy p:last-of-type {
  margin-bottom: 12px;
}
.service-item-media-wrap {
  display: flex;
  justify-content: flex-end;
}
.service-item-media-trigger {
  border: 1px solid #d4dbe8;
  border-radius: 12px;
  background: #fff;
  padding: 0;
  width: 110px;
  height: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-item-media-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  border-color: #c0cbdb;
}
.service-item-media-trigger:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}
.service-item-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.service-item-media-fallback {
  width: 110px;
  height: 110px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.service-item-media-fallback svg {
  width: 24px;
  height: 24px;
}
body[data-theme="dark"] .service-item-media-trigger {
  background: #202020;
  border-color: #3f3f46;
}
body[data-theme="dark"] .service-item-media-fallback {
  background: #232323;
  border-color: #3f3f46;
  color: #71717a;
}
@media (max-width: 720px) {
  .service-item-layout {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
    align-items: start;
  }
  .service-item-media-wrap {
    justify-content: flex-end;
    padding-top: 2px;
  }
  .service-item-media-trigger,
  .service-item-media-fallback {
    width: 92px;
    height: 92px;
    border-radius: 10px;
  }
  .service-item-copy p:last-of-type {
    margin-bottom: 10px;
  }
  .service-item-meta {
    align-items: flex-start;
    gap: 2px;
  }
  .service-item-duration {
    display: block;
    width: 100%;
  }
  .service-item-duration::before {
    content: "";
    margin-right: 0;
  }
}
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  padding: 10px 10px;
  font-size: 0.9rem;
  border-top: 1px solid #e2e8f0;
}
[data-theme="dark"] footer {
  background: #1a1a1a;
  color: #94a3b8;
  border-top-color: rgba(148, 163, 184, 0.2);
}
footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
footer a:visited {
  color: inherit;
}
.badge {
  display: inline-block;
  background: #e2e8f0;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #0f172a;
}
.badge-warning {
  background: #fff4e6;
  color: #b45309;
}
.pricing-result {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
}
body[data-theme="dark"] .pricing-result {
  background: #272727;
  border-color: rgba(148, 163, 184, 0.25);
}
.status-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}
.status-pill.status-confirmado,
.status-pill.status-confirmada {
  background: #e7f8ef;
  color: #0f8a4c;
}
.status-pill.status-pendente {
  background: #edf9f1;
  color: #1f7a45;
}
.status-pill.status-vencido {
  background: #fff4e6;
  color: #c2410c;
}
.status-pill.status-cancelado {
  background: #fdecec;
  color: #b42318;
}
.status-pill.status-concluido,
.status-pill.status-concluído {
  background: #e6f3ff;
  color: #1d4ed8;
}
.status-pill.status-no_show,
.status-pill.status-no-show {
  background: #f1f5f9;
  color: #475569;
}
.history-table .history-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
}
.history-table .history-status-pill svg {
  width: 14px;
  height: 14px;
}
.history-table .history-status-note {
  margin-top: 8px;
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.32;
}
.history-table .history-status-note svg {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex: 0 0 auto;
}
.history-table .history-actions-row {
  align-items: center;
}
.history-table .history-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
}
.history-table .history-action-btn svg {
  width: 15px;
  height: 15px;
}
.rating-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rating-option {
  border: 1px solid #d4dbe8;
  background: #fff;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.rating-option.is-selected {
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
  color: #fff;
}
.rating-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}
.rating-pill.rating-1,
.rating-option.is-selected.rating-1 {
  background: #ef4444;
  color: #fff;
}
.rating-pill.rating-2,
.rating-option.is-selected.rating-2 {
  background: #d946ef;
  color: #fff;
}
.rating-pill.rating-3,
.rating-option.is-selected.rating-3 {
  background: #f97316;
  color: #fff;
}
.rating-pill.rating-4,
.rating-option.is-selected.rating-4 {
  background: #facc15;
  color: #1f2937;
}
.rating-pill.rating-5,
.rating-option.is-selected.rating-5 {
  background: #22c55e;
  color: #fff;
}
body[data-theme="dark"] .rating-option {
  background: #272727;
  border-color: rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.professional-details-card .details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.professional-details-card .details-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
}
.details-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  font-size: 1rem;
}
.details-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.details-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.details-chip {
  background: #eef2ff;
  color: #1e293b;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 600;
  font-size: 0.85rem;
}
.details-empty {
  color: var(--muted);
  font-weight: 600;
}
body[data-theme="dark"] .details-chip {
  background: #2f2f2f;
  color: #e5e7eb;
}
.details-item {
  display: grid;
  gap: 4px;
}
.details-item-full {
  grid-column: 1 / -1;
}
.details-label {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
}
.details-value {
  font-weight: 600;
  color: var(--text);
}
body[data-theme="dark"] .details-avatar {
  background: #2b2b2b;
  color: #f8fafc;
}
@media (max-width: 720px) {
  .professional-details-card .details-body {
    grid-template-columns: 1fr;
  }
  .details-grid {
    grid-template-columns: 1fr;
  }
}
.table-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.9rem;
}
.table-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body[data-theme="dark"] .table-avatar {
  background: #2b2b2b;
  color: #f8fafc;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--brand-accent);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}
.icon-btn:hover {
  background: #f1f5ff;
}
.services-list-card {
  position: relative;
  padding-bottom: 64px;
}
.services-list-card .table-header {
  padding-right: 52px;
}
.services-list-card .icon-btn {
  position: absolute;
  top: 14px;
  right: 14px;
}
.services-list-card .category-actions {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.professionals-list-card {
  position: relative;
  padding-bottom: 64px;
}
.professionals-list-card .table-header {
  padding-right: 52px;
}
.professionals-list-card .icon-btn {
  position: absolute;
  top: 14px;
  right: 14px;
}
.professional-form-card {
  background: #fff;
}
.professional-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.professional-form-header h3 {
  margin: 0;
}
.professional-form-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.professional-form-close:hover {
  background: rgba(77, 124, 255, 0.12);
  color: var(--brand-accent);
}
.professional-form-close svg {
  width: 18px;
  height: 18px;
}
.professional-form {
  display: grid;
  gap: 14px;
}
.professional-form-row {
  display: grid;
  gap: 6px;
}
.professional-form-row label {
  font-weight: 700;
}
.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}
.checklist-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.95rem;
}
.time-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.time-grid .time-chip {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.8rem;
  cursor: pointer;
}
.time-grid .time-chip.is-selected {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}
.professional-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.day-intervals-container {
  display: grid;
  gap: 10px;
}
.day-interval-card {
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}
.day-interval-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.day-interval-rows {
  display: grid;
  gap: 8px;
}
.day-interval-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}
@media (max-width: 720px) {
  .checklist {
    grid-template-columns: 1fr;
  }
  .time-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .day-interval-row {
    grid-template-columns: 1fr;
  }
}
.service-form-card {
  background: #fff;
}
.service-form {
  display: grid;
  gap: 14px;
}
.service-form-row {
  display: grid;
  gap: 6px;
}
.service-form-row label {
  font-weight: 700;
}
.service-form-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.service-form-inline .input {
  min-width: 220px;
}
.service-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.service-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.service-form input[type="file"] {
  padding: 10px;
}
.service-form input[type="file"]::file-selector-button {
  background: var(--brand-accent);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 12px;
}
.service-form input[type="file"]::-webkit-file-upload-button {
  background: var(--brand-accent);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 12px;
}
@media (max-width: 720px) {
  .service-form-grid {
    grid-template-columns: 1fr;
  }
}
.is-hidden {
  display: none;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.modal-backdrop.is-hidden {
  display: none;
}
.modal-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px 22px;
  width: min(520px, 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  position: relative;
}
.modal-card-scroll {
  max-height: 90vh;
  overflow: auto;
}
.modal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-top: 8px;
}
.modal-form-grid .form-full {
  grid-column: 1 / -1;
}
.modal-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.modal-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.modal-grid-three {
  grid-template-columns: 1fr 1fr 0.9fr;
  align-items: start;
}
.modal-row {
  display: grid;
  gap: 4px;
}
.modal-row-full {
  grid-column: 1 / -1;
}
.modal-row-image {
  grid-column: 3 / 4;
  grid-row: 1 / span 4;
}
.modal-label {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
}
.modal-value {
  font-weight: 600;
  color: var(--text);
}
.service-view-image {
  width: 100%;
  max-width: 240px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: #0f172a;
}
.service-image-modal-backdrop {
  z-index: 2100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}
.service-image-modal-card {
  width: min(760px, 100%);
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}
.service-image-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.22s ease;
}
.service-image-modal-backdrop.is-open .service-image-modal-card {
  transform: scale(1);
  opacity: 1;
}
.service-image-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.service-image-modal-close svg {
  width: 20px;
  height: 20px;
}
.service-image-modal-img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}
body[data-theme="dark"] .service-image-modal-close {
  background: rgba(226, 232, 240, 0.15);
  color: #e2e8f0;
}
@media (max-width: 720px) {
  .modal-card {
    border-radius: 16px;
    padding: 18px;
  }
  .modal-form-grid {
    grid-template-columns: 1fr;
  }
}
.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.table th {
  text-align: left;
}
.table-responsive {
  width: 100%;
}
@media (max-width: 720px) {
  .table-responsive thead {
    display: none;
  }
  .table-responsive,
  .table-responsive tbody,
  .table-responsive tr,
  .table-responsive td {
    display: block;
    width: 100%;
  }
  .table-responsive tr {
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 0;
  }
  .table-responsive td {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.9rem;
  }
  .table-responsive td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #64748b;
  }
  .history-table tr {
    margin-bottom: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.03);
  }
  body[data-theme="dark"] .history-table tr {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(148, 163, 184, 0.32);
  }
  .history-table td {
    align-items: flex-start;
  }
  .history-table td.history-status-cell {
    display: block;
    padding-top: 8px;
  }
  .history-table td.history-status-cell::before {
    display: block;
    margin-bottom: 6px;
  }
  .history-table .history-status-pill {
    display: inline-flex;
  }
  .history-table .history-status-note {
    display: flex;
    margin-top: 8px;
    margin-left: 2px;
    max-width: 240px;
  }
  .history-table td.history-action-cell {
    display: block;
    padding-top: 10px;
  }
  .history-table td.history-action-cell::before {
    display: block;
    margin-bottom: 8px;
  }
  .history-table .history-actions-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .history-table .history-actions-row form {
    width: 100%;
  }
  .history-table .history-action-btn {
    width: 100%;
    justify-content: center;
    min-height: 40px;
  }
}
.table-compact th,
.table-compact td {
  font-size: 0.92rem;
  padding: 8px 10px;
}
.nowrap {
  white-space: nowrap;
}
.input-sm {
  padding: 10px 12px;
  font-size: 0.9rem;
}
.btn-sm {
  padding: 9px 12px;
  font-size: 0.9rem;
}
.appointments-table td {
  vertical-align: middle;
}
.appointments-table .action-cell {
  text-align: right;
  white-space: nowrap;
}
.appointments-table .table-form-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.appointments-table select.input {
  min-width: 170px;
}
.appointments-page {
  max-width: 1480px;
}
.appointments-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.appointments-hero-copy {
  display: grid;
  gap: 6px;
}
.appointments-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
  align-items: stretch;
}
.appointments-sidebar-panel {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 16px;
}
.appointments-sidebar-head,
.appointments-toolbar-card,
.appointments-toolbar-left,
.appointments-nav-group,
.appointments-month-nav,
.appointments-status-row {
  display: flex;
  align-items: center;
}
.appointments-sidebar-head,
.appointments-toolbar-card {
  justify-content: space-between;
}
.appointments-weekdays,
.appointments-calendar-grid,
.appointments-jumps-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.appointments-weekdays span {
  text-align: center;
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.appointments-calendar-day,
.appointments-jump-btn,
.appointments-month-btn,
.appointments-nav-btn,
.appointments-today-btn {
  text-decoration: none;
}
.appointments-calendar-day {
  min-height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-weight: 600;
}
.appointments-calendar-day.is-outside {
  opacity: 0.42;
}
.appointments-calendar-day.is-selected {
  background: #fce7f3;
  color: #be185d;
  border-color: rgba(190, 24, 93, 0.18);
}
.appointments-calendar-day.is-today {
  box-shadow: inset 0 0 0 1px rgba(77, 124, 255, 0.4);
}
.appointments-jumps-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.appointments-jumps-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.appointments-jump-btn,
.appointments-month-btn,
.appointments-nav-btn,
.appointments-today-btn {
  min-width: 42px;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.appointments-today-btn {
  min-width: 58px;
  padding: 0 16px;
}
.appointments-month-nav,
.appointments-nav-group {
  gap: 14px;
}
.appointments-jump-btn {
  font-size: 0.88rem;
}
.appointments-sidebar-block {
  display: grid;
  gap: 8px;
}
.appointments-legend {
  display: grid;
  gap: 8px;
}
.appointments-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}
.appointments-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f59e0b;
}
.appointments-legend-dot.is-pendente {
  background: #f59e0b;
}
.appointments-legend-dot.is-confirmado {
  background: #10b981;
}
.appointments-legend-dot.is-concluido {
  background: #2563eb;
}
.appointments-legend-dot.is-vencido {
  background: #f97316;
}
.appointments-legend-dot.is-bloqueado {
  background: #dc2626;
}
.appointments-main-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}
.appointments-toolbar-card {
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px;
}
.appointments-toolbar-left {
  gap: 18px;
  flex-wrap: wrap;
}
.appointments-view-chip {
  min-width: 58px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.appointments-date-field {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.86);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.appointments-date-label {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.appointments-date-input {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  min-width: 128px;
}
.appointments-toolbar-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
}
.appointments-board-card {
  overflow: hidden;
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 220px);
  min-height: calc(100vh - 220px);
}
.appointments-board-scroll {
  flex: 1 1 auto;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}
.appointments-board-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.appointments-board-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.appointments-board-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}
.appointments-board-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.65);
}
.appointments-board {
  --appointments-head-height: 96px;
  display: grid;
  grid-template-columns: 84px repeat(var(--appointments-resources), minmax(260px, 1fr));
  grid-template-rows: var(--appointments-head-height) minmax(var(--appointments-board-height), 1fr);
  min-width: calc(84px + (var(--appointments-resources) * 260px));
  min-height: 100%;
  position: relative;
}
.appointments-board-corner,
.appointments-resource-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(249, 250, 251, 0.96);
  border-bottom: 1px solid #e2e8f0;
}
.appointments-board-corner {
  padding: 18px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.appointments-resource-head {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 1px solid #eef2f7;
}
.appointments-resource-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #dbeafe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
}
.appointments-resource-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.appointments-resource-avatar.is-fallback {
  color: #1d4ed8;
  font-weight: 700;
}
.appointments-resource-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.appointments-resource-copy strong {
  font-size: 1.04rem;
  line-height: 1.15;
}
.appointments-resource-copy span {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appointments-time-rail,
.appointments-resource-track {
  position: relative;
  min-height: 100%;
}
.appointments-time-rail {
  background: rgba(249, 250, 251, 0.86);
  border-right: 1px solid #e2e8f0;
}
.appointments-time-slot {
  padding: 0 10px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}
.appointments-time-slot span {
  margin-top: -10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.appointments-resource-track {
  border-left: 1px solid #eef2f7;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.94));
}
.appointments-resource-grid {
  position: relative;
  min-height: 100%;
}
.appointments-grid-hour {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(203, 213, 225, 0.9);
  z-index: 0;
  pointer-events: none;
}
.appointments-grid-minute {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  transform: translateY(-3px);
  border-top: 1px solid rgba(203, 213, 225, 0.38);
  z-index: 0;
  cursor: help;
}
.appointments-break-block {
  position: absolute;
  left: 8px;
  right: 8px;
  border-radius: 12px;
  background: repeating-linear-gradient(-45deg, rgba(226, 232, 240, 0.9), rgba(226, 232, 240, 0.9) 6px, rgba(241, 245, 249, 0.9) 6px, rgba(241, 245, 249, 0.9) 12px);
  border: 1px solid rgba(203, 213, 225, 0.9);
  color: #64748b;
  padding: 8px 10px;
  z-index: 1;
}
.appointments-break-block span {
  font-size: 0.78rem;
  font-weight: 700;
}
.appointments-blocked-slot {
  position: absolute;
  left: 0;
  right: 0;
  border: 1px solid rgba(100, 116, 139, 0.34);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(203, 213, 225, 0.58),
      rgba(203, 213, 225, 0.58) 9px,
      rgba(226, 232, 240, 0.58) 9px,
      rgba(226, 232, 240, 0.58) 18px
    );
  color: #334155;
  padding: 0 10px;
  z-index: 2;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.appointments-blocked-slot-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.appointments-blocked-slot-reason {
  margin-top: 2px;
  font-size: 0.68rem;
  line-height: 1.1;
  font-weight: 600;
  opacity: 0.82;
  max-width: 92%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appointments-blocked-slot:hover {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(148, 163, 184, 0.52),
      rgba(148, 163, 184, 0.52) 9px,
      rgba(203, 213, 225, 0.52) 9px,
      rgba(203, 213, 225, 0.52) 18px
    );
}
.appointments-entry {
  position: absolute;
  --appt-lane: 0;
  --appt-lanes: 1;
  --appt-lane-gap: 4px;
  --appt-lane-width: calc((100% - 16px - ((var(--appt-lanes) - 1) * var(--appt-lane-gap))) / var(--appt-lanes));
  left: calc(8px + (var(--appt-lane) * (var(--appt-lane-width) + var(--appt-lane-gap))));
  width: var(--appt-lane-width);
  right: auto;
  border: none;
  border-radius: 14px;
  padding: 10px 12px;
  color: #fff;
  text-align: left;
  display: grid;
  gap: 3px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  z-index: 2;
  overflow: hidden;
  align-content: start;
}
.appointments-entry-origin {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.25));
}
.appointments-entry-origin svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: #ffffff;
  stroke-width: 1.5;
}
.appointments-entry.is-rose {
  background: linear-gradient(180deg, #f87171, #ef4444);
}
.appointments-entry.is-violet {
  background: linear-gradient(180deg, #a78bfa, #8b5cf6);
}
.appointments-entry.is-sky {
  background: linear-gradient(180deg, #67e8f9, #22d3ee);
  color: #164e63;
}
.appointments-entry.is-amber {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  color: #78350f;
}
.appointments-entry.is-mint {
  background: linear-gradient(180deg, #6ee7b7, #10b981);
  color: #064e3b;
}
.appointments-entry.is-pendente {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  color: #78350f;
}

/* Final override: drawer must stay above bottombar */
body.drawer-open .admin-layout .sidebar {
  z-index: 3000 !important;
}
body.drawer-open .admin-layout .sidebar-overlay {
  z-index: 2990 !important;
}
body.drawer-open .admin-bottom-bar {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(10px);
}

/* Appointments mobile refinement (keep desktop unchanged) */
@media (max-width: 820px) {
  .appointments-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .appointments-main-panel {
    order: 1;
    gap: 12px;
  }
  .appointments-sidebar-panel {
    order: 2;
    position: static;
    top: auto;
  }

  .appointments-toolbar-card {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    padding: 12px;
  }
  .appointments-toolbar-left {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .appointments-toolbar-left::-webkit-scrollbar {
    display: none;
  }
  .appointments-view-chip {
    display: none;
  }
  .appointments-nav-group {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .appointments-date-form {
    flex: 0 0 auto;
  }
  .appointments-date-field {
    min-height: 40px;
    padding: 0 12px;
    gap: 8px;
  }
  .appointments-date-label {
    white-space: nowrap;
    font-size: 0.82rem;
  }
  .appointments-date-input {
    min-width: 122px;
    width: 122px;
  }
  .appointments-today-btn,
  .appointments-nav-btn {
    min-height: 40px;
    min-width: 40px;
  }
  .appointments-toolbar-meta {
    display: none;
  }

  .appointments-board-card {
    height: min(66vh, 620px);
    min-height: 420px;
  }
  .appointments-board {
    grid-template-columns: 64px repeat(var(--appointments-resources), minmax(210px, 1fr));
    min-width: calc(64px + (var(--appointments-resources) * 210px));
  }
  .appointments-now-line {
    left: 64px;
  }
  .appointments-resource-head {
    padding: 12px 12px;
    gap: 8px;
  }
  .appointments-resource-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .appointments-resource-copy strong {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .appointments-resource-copy span {
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .appointments-modal-card {
    width: min(96vw, 560px);
    max-height: calc(100dvh - 14px);
    padding: 16px 14px;
    border-radius: 14px;
  }
  .appointments-modal-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
  }
  .appointments-rebook-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .appointments-status-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .appointments-status-row .input,
  .appointments-status-row .btn {
    width: 100%;
    min-width: 0;
  }
  .appointments-modal-card .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .appointments-modal-card .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Final safeguard: drawer above bottombar */
.admin-bottom-bar {
  transition: opacity 0.18s ease, transform 0.18s ease;
}
body.drawer-open .admin-layout .sidebar {
  z-index: 2600 !important;
}
body.drawer-open .admin-layout .sidebar-overlay {
  z-index: 2550 !important;
}
body.drawer-open .admin-bottom-bar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

/* Admin mobile-first: bottombar + drawer */
.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.admin-layout .sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(350px, 88vw);
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-right: 1px solid rgba(126, 190, 0, 0.28);
  box-shadow: 20px 0 34px rgba(95, 152, 0, 0.12);
  z-index: 2460;
  transform: translateX(-106%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.admin-layout .sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  background: #ffffff;
  border: none;
  padding: 8px 10px;
  border-radius: 14px;
}
.admin-layout .sidebar-logo img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}
.more-drawer-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: #ffffff;
  color: #4f7806;
  border: 1px solid rgba(126, 190, 0, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.more-drawer-close:hover {
  background: #fff;
}
.more-drawer-close svg {
  width: 18px;
  height: 18px;
}
.admin-layout .sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-layout .sidebar-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5b7b43;
  padding: 3px 10px 0;
}
.admin-layout .sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-layout .sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #3f6205;
  background: transparent;
  border: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.admin-layout .sidebar-link:hover {
  background: rgba(126, 190, 0, 0.14);
}
.admin-layout .sidebar-link.active {
  background: var(--brand-accent);
  color: #fff;
}
.admin-layout .sidebar-link .sidebar-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-layout .sidebar-link .sidebar-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.1;
}
.admin-layout .sidebar-link .sidebar-text {
  font-weight: 600;
}
.admin-layout .admin-content {
  width: 100%;
  margin: 0;
  padding: 16px 14px calc(108px + env(safe-area-inset-bottom));
}
.admin-layout .sidebar-overlay {
  display: none;
}
body.drawer-open .admin-layout .sidebar {
  transform: translateX(0);
}
body.drawer-open .admin-layout .sidebar-overlay {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 2440;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(1px);
}

.admin-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2350;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(126, 190, 0, 0.35);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 28px rgba(95, 152, 0, 0.14);
}
body.drawer-open .admin-bottom-bar {
  pointer-events: none;
}
.admin-bottom-link {
  border: none;
  background: transparent;
  color: #4f7806;
  border-radius: 12px;
  min-height: 58px;
  padding: 5px 2px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.admin-bottom-link .sidebar-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-bottom-link .sidebar-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.1;
}
.admin-bottom-link .sidebar-text {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
}
.admin-bottom-link.active {
  color: #3f6205;
  background: rgba(126, 190, 0, 0.2);
}
.admin-bottom-link.admin-bottom-link-more.active {
  background: rgba(126, 190, 0, 0.26);
}

@media (min-width: 960px) {
  .admin-layout .admin-content {
    padding: 20px 20px calc(106px + env(safe-area-inset-bottom));
  }
  .admin-bottom-bar {
    left: 14px;
    right: 14px;
    bottom: 12px;
    border-radius: 16px;
    border: 1px solid rgba(200, 171, 55, 0.35);
  }
}

body[data-theme="dark"] .admin-layout .sidebar {
  background: linear-gradient(180deg, #3a2d11, #2f250e);
  border-right-color: rgba(222, 205, 135, 0.25);
  box-shadow: 20px 0 34px rgba(2, 6, 23, 0.45);
}
body[data-theme="dark"] .admin-layout .sidebar-logo {
  background: rgba(16, 12, 4, 0.5);
}
body[data-theme="dark"] .admin-layout .sidebar-link {
  color: #e8dab0;
}
body[data-theme="dark"] .admin-layout .sidebar-link:hover {
  background: rgba(222, 205, 135, 0.14);
}
body[data-theme="dark"] .admin-bottom-bar {
  background: rgba(18, 13, 3, 0.96);
  border-top-color: rgba(222, 205, 135, 0.3);
}
body[data-theme="dark"] .admin-bottom-link {
  color: #e8dab0;
}
body[data-theme="dark"] .admin-bottom-link.active {
  color: #fff3ca;
  background: rgba(222, 205, 135, 0.2);
}

/* Mobile optimization for all admin tables loaded in dashboard */
.table-mobile-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-mobile-wrap .table.table-mobile-auto {
  min-width: 640px;
}
@media (max-width: 720px) {
  .table-mobile-wrap {
    margin-inline: -2px;
    padding-inline: 2px;
    padding-bottom: 6px;
  }
  .table-mobile-wrap .table.table-mobile-auto {
    min-width: 560px;
  }
  .table-mobile-wrap .table.table-mobile-auto th,
  .table-mobile-wrap .table.table-mobile-auto td {
    font-size: 0.88rem;
    padding: 8px 9px;
  }
}
.appointments-entry.is-confirmado {
  background: linear-gradient(180deg, #34d399, #10b981);
  color: #064e3b;
}
.appointments-entry.is-concluido {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}
.appointments-entry.is-vencido {
  background: linear-gradient(180deg, #fb923c, #f97316);
  color: #7c2d12;
}
.appointments-entry-time,
.appointments-entry-status {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 18px;
}
.appointments-entry-client {
  font-size: 0.9rem;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.appointments-entry-service {
  font-size: 0.8rem;
  line-height: 1.1;
  opacity: 0.94;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.appointments-entry-status {
  opacity: 0.92;
}
.appointments-entry.is-removing {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity .18s ease, transform .18s ease;
}
.appointments-entry.is-compact .appointments-entry-status {
  display: none;
}
.appointments-entry.is-compact .appointments-entry-client {
  font-size: 0.82rem;
  line-height: 1.1;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}
.appointments-entry.is-compact .appointments-entry-service {
  font-size: 0.76rem;
}
@media (max-width: 720px) {
  .appointments-entry {
    padding: 9px 10px;
  }
  .appointments-entry-origin {
    top: 7px;
    right: 7px;
  }
  .appointments-entry-client {
    font-size: 0.84rem;
  }
  .appointments-entry-service,
  .appointments-entry-time,
  .appointments-entry-status {
    font-size: 0.72rem;
  }
}
.appointments-now-line {
  position: absolute;
  left: 84px;
  right: 0;
  border-top: 2px solid #db2777;
  z-index: 4;
  pointer-events: none;
}
.appointments-now-line span {
  position: absolute;
  top: -12px;
  left: 0;
  transform: translateX(-50%);
  background: #db2777;
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.76rem;
  font-weight: 700;
}
.appointments-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(92vw, 420px);
}
.appointments-toast {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(190, 24, 93, 0.2);
  border-radius: 14px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
  padding: 12px 14px;
  color: #3f3314;
  display: grid;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.appointments-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.appointments-toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}
.appointments-toast.is-error {
  border-color: rgba(239, 68, 68, 0.4);
}
.appointments-toast.is-success {
  border-color: rgba(16, 185, 129, 0.42);
}
.appointments-toast.is-warning {
  border-color: rgba(245, 158, 11, 0.42);
}
.appointments-toast.is-confirm {
  border-color: rgba(200, 171, 55, 0.5);
}
.appointments-toast-text {
  font-size: 0.9rem;
  line-height: 1.35;
  color: #4d3f17;
}
.appointments-toast-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.appointments-toast-btn {
  border: 1px solid rgba(200, 171, 55, 0.35);
  background: #fff;
  color: #5b4819;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.appointments-toast-btn.is-ghost {
  background: rgba(255, 255, 255, 0.86);
}
.appointments-toast-btn.is-danger {
  background: linear-gradient(180deg, #ef4444, #dc2626);
  border-color: rgba(185, 28, 28, 0.7);
  color: #fff;
}
@media (max-width: 720px) {
  .appointments-toast-stack {
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-width: none;
  }
}
.appointments-empty-state {
  padding: 28px;
}
.appointments-modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  overscroll-behavior: contain;
}
.appointments-details-modal-card {
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.appointments-modal-grid {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
.appointments-modal-span-2 {
  grid-column: 1 / -1;
}
.appointments-status-form {
  display: grid;
  gap: 8px;
}
.appointments-rebook-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}
.appointments-rebook-form .appointments-status-row {
  grid-column: 1 / -1;
}
.appointments-rebook-form #appointmentRebookSubmit {
  justify-self: end;
}
.appointments-quick-status-form {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}
.appointments-status-row {
  gap: 10px;
}
.appointments-status-row .input {
  min-width: 190px;
}
body[data-theme="dark"] .appointments-calendar-day,
body[data-theme="dark"] .appointments-jump-btn,
body[data-theme="dark"] .appointments-month-btn,
body[data-theme="dark"] .appointments-nav-btn,
body[data-theme="dark"] .appointments-today-btn,
body[data-theme="dark"] .appointments-view-chip,
body[data-theme="dark"] .appointments-date-field,
body[data-theme="dark"] .appointments-board-corner,
body[data-theme="dark"] .appointments-resource-head,
body[data-theme="dark"] .appointments-time-rail {
  background: rgba(39, 39, 39, 0.94);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.22);
}
body[data-theme="dark"] .appointments-resource-track {
  background: linear-gradient(180deg, rgba(33, 33, 33, 0.9), rgba(26, 26, 26, 0.96));
  border-color: rgba(148, 163, 184, 0.16);
}
body[data-theme="dark"] .appointments-resource-copy span,
body[data-theme="dark"] .appointments-time-slot span,
body[data-theme="dark"] .appointments-toolbar-meta,
body[data-theme="dark"] .appointments-weekdays span,
body[data-theme="dark"] .appointments-legend-item {
  color: #94a3b8;
}
body[data-theme="dark"] .appointments-quick-status-form {
  border-top-color: rgba(148, 163, 184, 0.25);
}
body[data-theme="dark"] .appointments-break-block {
  background: repeating-linear-gradient(-45deg, rgba(51, 65, 85, 0.92), rgba(51, 65, 85, 0.92) 6px, rgba(30, 41, 59, 0.92) 6px, rgba(30, 41, 59, 0.92) 12px);
  border-color: rgba(100, 116, 139, 0.55);
  color: #cbd5e1;
}
body[data-theme="dark"] .appointments-grid-minute {
  border-top-color: rgba(148, 163, 184, 0.28);
}
body[data-theme="dark"] .appointments-blocked-slot {
  border-color: rgba(148, 163, 184, 0.32);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(71, 85, 105, 0.62),
      rgba(71, 85, 105, 0.62) 9px,
      rgba(51, 65, 85, 0.62) 9px,
      rgba(51, 65, 85, 0.62) 18px
    );
  color: #e2e8f0;
}
@media (max-width: 1200px) {
  .appointments-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .appointments-sidebar-panel {
    position: static;
  }
  .appointments-main-panel {
    min-height: auto;
  }
  .appointments-board-card {
    height: calc(100vh - 280px);
    min-height: calc(100vh - 280px);
  }
  .appointments-board-scroll {
    height: 100%;
    min-height: 100%;
    max-height: 100%;
  }
}
@media (max-width: 720px) {
  .appointments-hero-card,
  .appointments-toolbar-card,
  .appointments-toolbar-left,
  .appointments-status-row {
    align-items: stretch;
    flex-direction: column;
  }
  .appointments-jumps-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .appointments-board {
    grid-template-columns: 70px repeat(var(--appointments-resources), minmax(220px, 1fr));
    min-width: calc(70px + (var(--appointments-resources) * 220px));
  }
  .appointments-month-nav,
  .appointments-nav-group {
    gap: 10px;
  }
  .appointments-now-line {
    left: 70px;
  }
  .appointments-time-slot span {
    font-size: 0.74rem;
  }
  .appointments-board-scroll {
    height: 100%;
    min-height: 100%;
    max-height: 100%;
  }
  .appointments-modal-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .appointments-rebook-form {
    grid-template-columns: 1fr;
  }
  .appointments-rebook-form #appointmentRebookSubmit {
    justify-self: stretch;
  }
  .appointments-modal-span-2 {
    grid-column: auto;
  }
}
.link-button {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--brand-accent);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.link-button:hover {
  text-decoration: underline;
}
.subtle-link {
  font-size: 0.9rem;
}
.client-modal-grid {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.client-row {
  display: grid;
  gap: 6px;
}
.client-label {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
}
.client-value {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.contact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.copy-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.whatsapp-btn {
  width: 34px;
  height: 34px;
  border-radius: 0;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 6px;
  gap: 6px;
  width: auto;
}
.whatsapp-btn img {
  width: 20px;
  height: 20px;
  display: block;
}
.whatsapp-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.whatsapp-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
body[data-theme="dark"] .whatsapp-btn {
  background: transparent;
  border-color: transparent;
}
.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.public-mobile-menu-btn,
.public-mobile-greeting,
.public-mobile-drawer-overlay,
.public-mobile-action-icon {
  display: none;
}
.hero-actions-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}
.user-greeting {
  font-weight: 600;
  color: var(--muted);
}
@media (min-width: 721px) {
  .hero-actions.logged-in,
  .hero-actions.guest {
    flex-direction: column;
    align-items: flex-end;
  }
  .hero-actions.logged-in .user-greeting {
    margin-bottom: 6px;
  }
}
.hero-actions .btn,
.hero-actions .btn-outline {
  padding: 8px 14px;
  font-size: 0.95rem;
  border-radius: 0;
}
.hero-text-actions {
  gap: 6px;
  white-space: nowrap;
}
.hero-text-actions .action-link + .action-link::before {
  content: "|";
  color: var(--muted);
  margin-right: 6px;
}
body[data-theme="dark"] .hero-text-actions .action-link + .action-link::before {
  color: rgba(226, 232, 240, 0.6);
}
.hero-text-actions .action-link,
.hero-text-actions .action-link:link,
.hero-text-actions .action-link:visited,
.hero-text-actions .action-link:hover,
.hero-text-actions .action-link:focus,
.hero-text-actions .action-link:focus-visible,
.hero-text-actions .action-link:active {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: var(--muted) !important;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  cursor: pointer;
  padding: 0;
  line-height: 1.1;
  font-size: clamp(0.78rem, 2.2vw, 0.92rem);
  outline: none;
}
.hero-text-actions .action-link:hover,
.hero-text-actions .action-link:focus-visible {
  color: var(--text);
  text-decoration: none !important;
}
body[data-theme="dark"] .hero-text-actions .action-link,
body[data-theme="dark"] .hero-text-actions .action-link:link,
body[data-theme="dark"] .hero-text-actions .action-link:visited,
body[data-theme="dark"] .hero-text-actions .action-link:active {
  color: #cbd5e1 !important;
}
body[data-theme="dark"] .hero-text-actions .action-link:hover,
body[data-theme="dark"] .hero-text-actions .action-link:focus-visible {
  color: #f8fafc !important;
}
body[data-theme="dark"] .header-fixed {
  color: #e2e8f0;
}
body[data-theme="dark"] .user-greeting {
  color: #cbd5e1;
}
body[data-theme="dark"] .hero-actions .theme-toggle .theme-label,
body[data-theme="dark"] .hero-actions .pwa-install-btn {
  color: #cbd5e1;
}
body[data-theme="dark"] .hero-actions .theme-toggle:hover .theme-label,
body[data-theme="dark"] .hero-actions .theme-toggle:focus-visible .theme-label,
body[data-theme="dark"] .hero-actions .pwa-install-btn:hover,
body[data-theme="dark"] .hero-actions .pwa-install-btn:focus-visible {
  color: #f8fafc;
}
.hero-text-actions .action-link-logout,
.hero-text-actions .action-link-logout:link,
.hero-text-actions .action-link-logout:visited,
.hero-text-actions .action-link-logout:hover,
.hero-text-actions .action-link-logout:focus,
.hero-text-actions .action-link-logout:focus-visible,
.hero-text-actions .action-link-logout:active {
  color: #b42318;
}
body[data-theme="dark"] .hero-text-actions .action-link-logout,
body[data-theme="dark"] .hero-text-actions .action-link-logout:link,
body[data-theme="dark"] .hero-text-actions .action-link-logout:visited,
body[data-theme="dark"] .hero-text-actions .action-link-logout:hover,
body[data-theme="dark"] .hero-text-actions .action-link-logout:focus,
body[data-theme="dark"] .hero-text-actions .action-link-logout:focus-visible,
body[data-theme="dark"] .hero-text-actions .action-link-logout:active {
  color: #f87171;
}
button.action-link {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.hero-actions .theme-toggle {
  position: static;
  top: auto;
  right: auto;
}
.hero-actions .theme-toggle,
.hero-actions .pwa-install-btn {
  align-self: center;
}
@media (min-width: 721px) {
  .hero-actions.logged-in .hero-actions-top,
  .hero-actions.guest .hero-actions-top {
    align-self: flex-end;
  }
}
.google-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.google-login-btn img {
  height: 36px;
  width: auto;
  display: block;
}
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin: 10px 0;
  font-weight: 600;
}
.alert-success {
  background: #e8f7ee;
  color: #157347;
  border: 1px solid #c9f0d9;
}
.alert-error {
  background: #fdecec;
  color: #b42318;
  border: 1px solid #f5c2c2;
}
.alert-info {
  background: #fdecec;
  color: #b42318;
  border: 1px solid #f5c2c2;
}

.admin-layout {
  min-height: 100vh;
  overflow: visible;
}
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: auto;
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid #e2e8f0;
  padding: 18px 14px calc(70px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 260px;
  flex: 0 0 260px;
  flex-shrink: 0;
  transition: width 0.25s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(77, 124, 255, 0.4) transparent;
}
.sidebar::-webkit-scrollbar {
  width: 8px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(77, 124, 255, 0.35);
  border-radius: 999px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(77, 124, 255, 0.55);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px 1px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
}
.sidebar-logo img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}
.sidebar-toggle {
  border: none;
  background: transparent;
  color: #0f172a;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}
.sidebar-toggle-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-toggle-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.25;
}
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 2px 10px 0;
}
.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #334155;
  background: transparent;
  border: none;
  transition: 0.2s;
}
.sidebar-link:hover {
  background: #eef2ff;
}
.sidebar-link.active {
  background: var(--brand-accent);
  color: #fff;
  border-color: transparent;
}
.sidebar-link.active .sidebar-icon {
  color: #fff;
}
.sidebar-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.1;
  color: currentColor;
}
.sidebar-text {
  font-weight: 600;
}
.billing-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}
.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.billing-summary-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 12px;
}
.billing-summary-grid span {
  color: var(--muted);
}
.billing-config-alert {
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .48;
  cursor: not-allowed;
  filter: grayscale(.35);
  box-shadow: none;
  pointer-events: auto;
}
.admin-content {
  width: calc(100% - 260px);
  margin-left: 260px;
  padding: 20px 24px 100px;
  min-width: 0;
  transition:
    margin-left 0.25s ease,
    width 0.25s ease;
}
.dashboard-home-card {
  margin-bottom: 14px;
}
.dashboard-shortcuts {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.dashboard-shortcut {
  border: 1px solid rgba(148, 163, 184, 0.25);
  text-align: left;
  display: grid;
  gap: 8px;
  cursor: pointer;
  text-decoration: none !important;
  color: inherit;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.dashboard-shortcut:hover,
.dashboard-shortcut:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  border-color: rgba(77, 124, 255, 0.45);
  text-decoration: none !important;
}
.dashboard-shortcut-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--brand-accent);
}
.dashboard-shortcut-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.1;
}
.dashboard-shortcut-title {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text);
}
.dashboard-shortcut-text {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}
body[data-theme="dark"] .dashboard-shortcut {
  border-color: rgba(148, 163, 184, 0.2);
}
body[data-theme="dark"] .dashboard-shortcut:hover,
body[data-theme="dark"] .dashboard-shortcut:focus-visible {
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.5);
}
.sidebar-toggle-mobile {
  display: none;
  border: none;
  background: transparent;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  margin-bottom: 12px;
  cursor: pointer;
  min-width: 44px;
  min-height: 38px;
  justify-content: center;
}
.menu-icon {
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
  position: relative;
  display: inline-block;
}
.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
}
.menu-icon::before {
  top: -6px;
}
.menu-icon::after {
  top: 6px;
}
.sidebar-overlay {
  display: none;
}
.loader {
  display: flex;
  align-items: center;
  gap: 10px;
}
.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-accent);
  animation: pulse 0.9s ease-in-out infinite;
}
.loader-dot:nth-child(2) {
  animation-delay: 0.15s;
}
.loader-dot:nth-child(3) {
  animation-delay: 0.3s;
}
.loader-text {
  color: #475569;
  font-weight: 600;
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
.admin-panel {
  display: none;
}
.admin-panel.active {
  display: block;
}
.admin-iframe {
  width: 100%;
  height: calc(100vh - 160px);
  border: 0;
  border-radius: 14px;
  background: transparent;
}

body.sidebar-collapsed .sidebar {
  width: 78px;
  flex-basis: 78px;
}
body.sidebar-collapsed .admin-content {
  width: calc(100% - 78px);
  margin-left: 78px;
}
body.sidebar-collapsed .sidebar-text {
  display: none;
}
body.sidebar-collapsed .sidebar-section-title {
  display: none;
}
body.sidebar-collapsed .sidebar-logo span {
  display: none;
}
body.sidebar-collapsed .sidebar-link {
  justify-content: center;
}
.sidebar-hover-tag {
  position: fixed;
  left: 0;
  top: 0;
  transform: translateY(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.25);
  z-index: 1200;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.14s ease;
}
.sidebar-hover-tag::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid #0f172a;
}
.sidebar-hover-tag.is-visible {
  opacity: 1;
  visibility: visible;
}
body.sidebar-collapsed .sidebar-toggle {
  width: 100%;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  body.public-mobile-drawer-open {
    overflow: hidden;
  }
  .header-fixed .container {
    padding: 8px 12px;
  }
  .header-top {
    min-height: 84px;
    padding: 6px 2px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "logo . menu"
      "logo greeting greeting";
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
  }
  .logo {
    grid-area: logo;
    width: 124px;
    height: auto;
    opacity: 1;
    transform: none;
  }
  .public-mobile-greeting {
    grid-area: greeting;
    display: block;
    text-align: right;
    font-size: clamp(1rem, 5vw, 2rem);
    line-height: 1.1;
    font-weight: 700;
    color: #4f7a3a;
    font-family: "Segoe UI", Tahoma, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .public-mobile-greeting-link {
    text-decoration: none;
    font-weight: 700;
  }
  .public-mobile-greeting-link:hover,
  .public-mobile-greeting-link:focus-visible {
    text-decoration: underline;
  }
  body[data-theme="dark"] .public-mobile-greeting {
    color: #cfd8e3;
  }
  .public-mobile-menu-btn {
    grid-area: menu;
    display: inline-flex;
    width: 44px;
    height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.9);
    color: #6b7280;
    cursor: pointer;
    padding: 0;
  }
  .public-mobile-menu-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
  }
  body[data-theme="dark"] .public-mobile-menu-btn {
    background: rgba(24, 24, 27, 0.95);
    border-color: rgba(75, 85, 99, 0.65);
    color: #d1d5db;
  }
  .hero-actions.logged-in,
  .hero-actions.guest {
    position: fixed;
    top: 90px;
    left: 10px;
    width: min(84vw, 300px);
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    z-index: 1210;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    padding: 14px;
    transform: translateX(-115%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.2s ease;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  body[data-theme="dark"] .hero-actions.logged-in,
  body[data-theme="dark"] .hero-actions.guest {
    background: rgba(17, 17, 17, 0.98);
    border-color: rgba(75, 85, 99, 0.5);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.62);
  }
  .hero-actions.is-mobile-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  .hero-actions .user-greeting {
    display: none;
  }
  .hero-actions.logged-in .hero-actions-top,
  .hero-actions.guest .hero-actions-top {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .hero-actions .theme-toggle .theme-label,
  .hero-actions .pwa-install-btn {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.22rem;
    font-weight: 700;
    color: #4f7a3a;
  }
  .public-mobile-action-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    color: currentColor;
    flex: 0 0 18px;
  }
  .public-mobile-action-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.15;
  }
  .hero-actions .theme-toggle,
  .hero-actions .pwa-install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    line-height: 1.2;
    padding: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition:
      opacity 0.24s ease,
      transform 0.24s ease;
  }
  .hero-actions .theme-toggle {
    color: #4f7a3a;
  }
  body[data-theme="dark"] .hero-actions .theme-toggle .theme-label,
  body[data-theme="dark"] .hero-actions .pwa-install-btn {
    color: #d1d5db;
  }
  body[data-theme="dark"] .hero-actions .theme-toggle {
    color: #d1d5db;
  }
  .hero-actions-row.hero-text-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    white-space: normal;
  }
  .hero-text-actions .action-link + .action-link::before {
    content: none;
  }
  .hero-text-actions .action-link,
  .hero-text-actions .action-link:link,
  .hero-text-actions .action-link:visited,
  .hero-text-actions .action-link:active {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-size: 1.22rem;
    color: #4f7a3a !important;
    width: 100%;
    line-height: 1.2;
    opacity: 0;
    transform: translateX(-10px);
    transition:
      opacity 0.24s ease,
      transform 0.24s ease;
  }
  .hero-actions.is-mobile-open .hero-actions-top > * {
    opacity: 1;
    transform: translateX(0);
  }
  .hero-actions.is-mobile-open .hero-actions-row.hero-text-actions > * {
    opacity: 1;
    transform: translateX(0);
  }
  .hero-actions.is-mobile-open .hero-actions-top > *:nth-child(1) { transition-delay: 0.04s; }
  .hero-actions.is-mobile-open .hero-actions-top > *:nth-child(2) { transition-delay: 0.10s; }
  .hero-actions.is-mobile-open .hero-actions-row.hero-text-actions > *:nth-child(1) { transition-delay: 0.16s; }
  .hero-actions.is-mobile-open .hero-actions-row.hero-text-actions > *:nth-child(2) { transition-delay: 0.22s; }
  .hero-actions.is-mobile-open .hero-actions-row.hero-text-actions > *:nth-child(3) { transition-delay: 0.28s; }
  body[data-theme="dark"] .hero-text-actions .action-link,
  body[data-theme="dark"] .hero-text-actions .action-link:link,
  body[data-theme="dark"] .hero-text-actions .action-link:visited,
  body[data-theme="dark"] .hero-text-actions .action-link:active {
    color: #e5e7eb !important;
  }
  .public-mobile-drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    z-index: 1205;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .public-mobile-drawer-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
  header.container {
    padding-bottom: 4px;
  }
  .header-fixed .container {
    padding: 6px 16px;
  }
  .hero-actions .btn,
  .hero-actions .btn-outline {
    padding: 7px 12px;
    font-size: 0.9rem;
  }
  .hero-text-actions {
    gap: 4px;
  }
  .hero-text-actions .action-link + .action-link::before {
    margin-right: 4px;
  }
  .header-top {
    flex-direction: row;
    align-items: center;
  }
  .banner {
    max-height: 240px;
  }
  .hero-banner-nav {
    display: none;
  }
  .sidebar {
    width: 78px;
  }
  .sidebar-text {
    display: none;
  }
  .sidebar-section-title {
    display: none;
  }
  .sidebar-logo span {
    display: none;
  }
  .sidebar-link {
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    z-index: 2200;
    width: 260px;
  }
  .sidebar-toggle {
    display: none;
  }
  .sidebar-toggle-mobile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .sidebar-text {
    display: inline;
  }
  .sidebar-section-title {
    display: block;
  }
  .sidebar-logo span {
    display: none;
  }
  .sidebar-link {
    justify-content: flex-start;
  }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 2100;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .sidebar-overlay {
    display: block;
  }
  body.sidebar-mobile .admin-content {
    width: 100%;
    margin-left: 0;
    padding-left: 20px;
  }
}

.page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.page-hero-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-hero-desc {
  margin: 8px 0 0 0;
}
@media (max-width: 640px) {
  .page-hero {
    gap: 10px;
  }
}

/* JV Agenda palette override */
.header-fixed {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(200, 171, 55, 0.24);
  box-shadow: 0 10px 24px rgba(110, 90, 31, 0.1);
}
body[data-theme="dark"] .header-fixed {
  background: rgba(12, 12, 12, 0.96);
  border-bottom-color: rgba(75, 85, 99, 0.45);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.55);
}
.card,
.modal-card,
.appointments-sidebar-panel,
.appointments-toolbar-card,
.appointments-board-card {
  border: 1px solid rgba(126, 190, 0, 0.22);
  box-shadow: 0 10px 28px rgba(95, 152, 0, 0.1);
}
.tabs .tab-btn {
  border: 1px solid rgba(126, 190, 0, 0.35);
  background: #fff;
  color: var(--ink-strong);
}
.tabs .tab-btn.active {
  background: var(--surface-warm);
  border-color: var(--brand-accent);
  color: var(--ink-strong);
}
.btn {
  background: linear-gradient(180deg, var(--brand-accent-soft), var(--brand-accent));
  border-color: var(--brand-accent);
  color: #fff;
}
.btn:hover {
  background: linear-gradient(180deg, var(--brand-accent), #69a300);
  border-color: #69a300;
}
.btn-outline {
  background: #fff;
  border-color: rgba(126, 190, 0, 0.55);
  color: #4f7806;
}
.btn-outline:hover,
.btn-outline.is-active {
  background: var(--surface-soft);
  border-color: var(--brand-accent);
  color: #3f6205;
}
.btn-danger,
.btn-cancel {
  background: linear-gradient(180deg, #c97d86, #b9606a);
  border-color: #b9606a;
  color: #fff;
}
.input,
textarea.input,
select.input,
.appointments-date-field {
  border-color: rgba(200, 171, 55, 0.35);
  background: #fffdf7;
}
.input:focus,
textarea.input:focus,
select.input:focus,
.appointments-date-field:focus-within {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(200, 171, 55, 0.16);
}
.table th {
  background: #fbf7e8;
  color: #6f591b;
}
.table th,
.table td {
  border-bottom-color: rgba(200, 171, 55, 0.18);
}
.appointment-status.status-confirmado,
.appointment-status.status-confirmada,
.status-pill.status-confirmado,
.status-pill.status-confirmada {
  background: #e7f8ef;
  color: #0f8a4c;
}
.appointment-status.status-pendente,
.status-pill.status-pendente {
  background: #edf9f1;
  color: #1f7a45;
}
.appointment-status.status-cancelado,
.status-pill.status-cancelado {
  background: #f3d9dd;
  color: #954a54;
}
.appointment-status.status-concluido,
.appointment-status.status-concluído,
.status-pill.status-concluido,
.status-pill.status-concluído {
  background: #e8dfbf;
  color: #5f4d17;
}
.appointment-status.status-no_show,
.appointment-status.status-no-show,
.status-pill.status-no_show,
.status-pill.status-no-show {
  background: #f6e7cb;
  color: #8d6223;
}
.alert-success {
  background: #efe4ba;
  color: #5e4b15;
  border-color: #dfcc86;
}
.alert-error {
  background: #f8e4e8;
  color: #934955;
  border-color: #dfb4bc;
}
.alert-info {
  background: #f4eed7;
  color: #6c5d31;
  border-color: #e1d4a0;
}
.sidebar {
  background: #ffffff;
  border-right: 1px solid rgba(126, 190, 0, 0.32);
}
.sidebar-link {
  color: #3f6205;
}
.sidebar-link:hover {
  background: rgba(126, 190, 0, 0.14);
}
.sidebar-link.active {
  background: var(--brand-accent);
  color: #fff;
}
.sidebar-link.active .sidebar-icon {
  background: rgba(255, 255, 255, 0.2);
}
body[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #3a2d11, #2f250e);
}
body[data-theme="dark"] .sidebar-link {
  color: #e8dab0;
}
body[data-theme="dark"] .sidebar-link:hover {
  background: rgba(222, 205, 135, 0.14);
}
.dashboard-shortcut {
  border: 1px solid rgba(126, 190, 0, 0.22);
  background: #ffffff;
}
.dashboard-shortcut-icon {
  background: rgba(126, 190, 0, 0.16);
  color: #4f7806;
}

/* Dashboard home: colorful shortcut icons with circular background */
.dashboard-shortcuts .dashboard-shortcut:nth-child(1) .dashboard-shortcut-icon {
  background: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
}
.dashboard-shortcuts .dashboard-shortcut:nth-child(2) .dashboard-shortcut-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #047857;
}
.dashboard-shortcuts .dashboard-shortcut:nth-child(3) .dashboard-shortcut-icon {
  background: rgba(245, 158, 11, 0.22);
  color: #b45309;
}
.dashboard-shortcuts .dashboard-shortcut:nth-child(4) .dashboard-shortcut-icon {
  background: rgba(249, 115, 22, 0.2);
  color: #c2410c;
}
.dashboard-shortcuts .dashboard-shortcut:nth-child(5) .dashboard-shortcut-icon {
  background: rgba(139, 92, 246, 0.2);
  color: #6d28d9;
}
.dashboard-shortcuts .dashboard-shortcut:nth-child(6) .dashboard-shortcut-icon {
  background: rgba(14, 165, 233, 0.22);
  color: #0369a1;
}
.dashboard-shortcuts .dashboard-shortcut:nth-child(7) .dashboard-shortcut-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}
.appointments-entry.is-confirmado {
  background: linear-gradient(180deg, #34d399, #10b981);
  color: #064e3b;
}
.appointments-entry.is-concluido {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}
.appointments-entry.is-vencido {
  background: linear-gradient(180deg, #fb923c, #f97316);
  color: #7c2d12;
}
.appointments-entry.is-pendente {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  color: #78350f;
}

/* Final override: drawer must stay above bottombar */
body.drawer-open .admin-layout .sidebar {
  z-index: 3000 !important;
}
body.drawer-open .admin-layout .sidebar-overlay {
  z-index: 2990 !important;
}
body.drawer-open .admin-bottom-bar {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(10px);
}

/* Appointments mobile final override */
@media (max-width: 820px) {
  .appointments-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .appointments-main-panel {
    order: 1 !important;
    gap: 12px !important;
  }
  .appointments-sidebar-panel {
    order: 2 !important;
    position: static !important;
    top: auto !important;
  }

  .appointments-toolbar-card {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    padding: 12px !important;
  }
  .appointments-toolbar-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
    scrollbar-width: none;
  }
  .appointments-toolbar-left::-webkit-scrollbar {
    display: none;
  }
  .appointments-view-chip {
    display: none !important;
  }
  .appointments-nav-group {
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  .appointments-date-form {
    flex: 0 0 auto !important;
  }
  .appointments-date-field {
    min-height: 40px !important;
    padding: 0 12px !important;
    gap: 8px !important;
  }
  .appointments-date-label {
    white-space: nowrap !important;
    font-size: 0.82rem !important;
  }
  .appointments-date-input {
    min-width: 122px !important;
    width: 122px !important;
  }
  .appointments-today-btn,
  .appointments-nav-btn {
    min-height: 40px !important;
    min-width: 40px !important;
  }
  .appointments-toolbar-meta {
    display: none !important;
  }

  .appointments-board-card {
    height: min(66vh, 620px) !important;
    min-height: 420px !important;
  }
  .appointments-board {
    grid-template-columns: 64px repeat(var(--appointments-resources), minmax(210px, 1fr)) !important;
    min-width: calc(64px + (var(--appointments-resources) * 210px)) !important;
  }
  .appointments-now-line {
    left: 64px !important;
  }
  .appointments-resource-head {
    padding: 12px 12px !important;
    gap: 8px !important;
  }
  .appointments-resource-avatar {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
  }
  .appointments-resource-copy strong,
  .appointments-resource-copy span {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .appointments-modal-card {
    width: min(96vw, 560px) !important;
    max-height: calc(100dvh - 14px) !important;
    padding: 16px 14px !important;
    border-radius: 14px !important;
  }
  .appointments-modal-grid,
  .appointments-rebook-form {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .appointments-status-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .appointments-status-row .input,
  .appointments-status-row .btn {
    width: 100% !important;
    min-width: 0 !important;
  }
  .appointments-modal-card .form-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .appointments-modal-card .form-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  #settlementsCard {
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
  }
  #settlementsCard .table-mobile-wrap {
    margin-inline: 0 !important;
    padding-inline: 0 !important;
  }

  .scroll-top-fab {
    position: fixed !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: calc(94px + env(safe-area-inset-bottom)) !important;
    z-index: 2450 !important;
  }
}

/* Scroll-to-top spacing above admin bottombar */
.admin-bottom-bar ~ .scroll-top-fab {
  right: max(14px, env(safe-area-inset-right)) !important;
  bottom: calc(122px + env(safe-area-inset-bottom)) !important;
  z-index: 2900 !important;
}
@media (min-width: 960px) {
  .admin-bottom-bar ~ .scroll-top-fab {
    bottom: calc(136px + env(safe-area-inset-bottom)) !important;
  }
}

/* Admin bottombar polish: straight corners, near-edge, footer visible */
.admin-bottom-bar {
  left: 2px !important;
  right: 2px !important;
  bottom: calc(40px + env(safe-area-inset-bottom)) !important;
  border-radius: 0 !important;
  border-top-width: 1px !important;
  border-left: 1px solid rgba(200, 171, 55, 0.26) !important;
  border-right: 1px solid rgba(200, 171, 55, 0.26) !important;
  box-shadow: 0 -8px 20px rgba(84, 63, 9, 0.14) !important;
}
.admin-bottom-bar + footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2200;
  margin-bottom: 0 !important;
  min-height: 40px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.admin-layout .admin-content {
  padding-bottom: calc(162px + env(safe-area-inset-bottom)) !important;
}
.admin-bottom-bar ~ .scroll-top-fab {
  bottom: calc(164px + env(safe-area-inset-bottom)) !important;
}
@media (min-width: 960px) {
  .admin-bottom-bar {
    left: 4px !important;
    right: 4px !important;
  }
  .admin-layout .admin-content {
    padding-bottom: calc(176px + env(safe-area-inset-bottom)) !important;
  }
  .admin-bottom-bar ~ .scroll-top-fab {
    bottom: calc(178px + env(safe-area-inset-bottom)) !important;
  }
}

/* Admin nav/footer stabilization (especially appointments on mobile) */
.admin-layout {
  overflow-x: hidden !important;
}
.admin-layout .admin-content,
#adminContent {
  overflow-x: hidden !important;
}
.appointments-toolbar-left,
.appointments-board-scroll,
#settlementsCard .table-mobile-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}
@media (max-width: 820px) {
  .appointments-main-panel,
  .appointments-page {
    overflow-x: visible !important;
  }
  .appointments-toolbar-card {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  .appointments-toolbar-left {
    display: inline-flex !important;
    min-width: max-content !important;
  }
  .appointments-board-scroll {
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  .appointments-board-card {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  #settlementsCard {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  #settlementsCard .table {
    min-width: 720px !important;
  }
  #settlementsCard .table-responsive thead {
    display: table-header-group !important;
  }
  #settlementsCard .table-responsive,
  #settlementsCard .table-responsive tbody {
    display: table-row-group !important;
    width: auto !important;
  }
  #settlementsCard .table-responsive tr {
    display: table-row !important;
    border: 0 !important;
    padding: 0 !important;
  }
  #settlementsCard .table-responsive th,
  #settlementsCard .table-responsive td {
    display: table-cell !important;
    white-space: nowrap;
    padding: 8px 10px !important;
  }
  #settlementsCard .table-responsive td::before {
    content: none !important;
  }
  #settlementsCard .table-mobile-wrap {
    overflow-x: auto !important;
  }
}
.admin-bottom-bar {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  max-width: none !important;
}
.admin-bottom-link {
  min-width: 0 !important;
}
.admin-bottom-bar + footer {
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box;
}

/* Appointments mobile: linear calendar + settlements in modal + dual-axis board scroll */
@media (max-width: 820px) {
  .appointments-layout {
    display: block !important;
  }
  .appointments-sidebar-panel {
    display: none !important;
  }
  .appointments-main-panel {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-width: 0 !important;
  }

  .appointments-toolbar-card {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }
  .appointments-toolbar-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  .appointments-toolbar-actions {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
  }
  .appointments-settlements-trigger {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .appointments-toolbar-meta {
    display: none !important;
  }

  .appointments-linear-calendar-card {
    padding: 10px !important;
  }
  .appointments-linear-calendar-scroll {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
  }
  .appointments-linear-days {
    display: flex !important;
    gap: 8px !important;
    width: max-content !important;
    min-width: max-content !important;
  }
  .appointments-linear-day {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 64px !important;
    height: 62px !important;
    border-radius: 14px !important;
    border: 1px solid var(--line) !important;
    background: var(--panel-strong) !important;
    color: var(--ink) !important;
    text-decoration: none !important;
    gap: 2px !important;
  }
  .appointments-linear-weekday {
    font-size: 0.72rem !important;
    opacity: 0.75;
    letter-spacing: 0.04em;
  }
  .appointments-linear-daynum {
    font-size: 1.05rem !important;
    line-height: 1 !important;
  }
  .appointments-linear-day.is-selected {
    border-color: var(--gold) !important;
    box-shadow: 0 6px 16px rgba(200, 171, 55, 0.2) !important;
  }
  .appointments-linear-day.is-today:not(.is-selected) {
    border-color: var(--gold) !important;
  }

  .appointments-board-card {
    padding: 0 !important;
    overflow: hidden !important;
  }
  .appointments-board-scroll {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 56vh !important;
    max-height: 68vh !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  .appointments-board {
    min-width: calc(64px + (var(--appointments-resources) * 220px)) !important;
    grid-template-columns: 64px repeat(var(--appointments-resources), minmax(220px, 1fr)) !important;
  }
  .appointments-board-corner span {
    display: none !important;
  }
  .appointments-time-slot span {
    font-size: 0.95rem !important;
  }

  #settlementsCard {
    margin-top: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: transparent !important;
  }
  #settlementsCard .table {
    min-width: 720px !important;
  }
  #settlementsCard .table-responsive th,
  #settlementsCard .table-responsive td {
    white-space: nowrap !important;
  }
  .appointments-settlements-modal-card {
    width: min(96vw, 980px) !important;
    max-height: calc(100dvh - 14px) !important;
    padding: 16px !important;
  }
  #settlementsModalBody {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    padding-top: 6px !important;
  }
}

@media (min-width: 821px) {
  .appointments-toolbar-actions,
  .appointments-linear-calendar-card {
    display: none !important;
  }
}

/* Appointments mobile refinement: single-line filter, full-width content, internal board scrolling only */
@media (max-width: 820px) {
  .appointments-page.container {
    max-width: none !important;
    width: 100% !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
  .appointments-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .appointments-main-panel {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    gap: 10px !important;
    min-width: 0 !important;
  }
  .appointments-toolbar-card {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px !important;
    border-radius: 14px !important;
  }
  .appointments-toolbar-left {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  .appointments-nav-group {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    min-width: max-content !important;
  }
  .appointments-date-form {
    flex: 0 0 auto !important;
    min-width: 0 !important;
  }
  .appointments-date-field {
    width: auto !important;
    min-width: 210px !important;
    max-width: 72vw !important;
  }
  .appointments-date-label {
    white-space: nowrap !important;
  }
  .appointments-today-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
  .appointments-toolbar-actions {
    justify-self: end !important;
  }

  .appointments-linear-calendar-card,
  .appointments-board-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 14px !important;
  }
  .appointments-linear-calendar-card {
    padding: 8px 10px !important;
  }
  .appointments-linear-day {
    min-width: 62px !important;
    height: 58px !important;
  }
  .appointments-board-card {
    min-height: 56vh !important;
    max-height: 68vh !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }
  .appointments-board-scroll {
    width: 100% !important;
    height: 100% !important;
    min-height: 56vh !important;
    max-height: 68vh !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
  }
}

/* Final mobile-only layout for appointments: single card (filter + linear calendar + board) */
@media (max-width: 820px) {
  .appointments-page.container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    height: calc(100dvh - 170px) !important;
    overflow: hidden !important;
    display: block !important;
  }
  .appointments-layout {
    display: block !important;
    height: 100% !important;
    min-height: 0 !important;
  }
  .appointments-main-panel {
    display: block !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .appointments-mobile-unified-card {
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    gap: 10px !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 10px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }
  .appointments-toolbar-card,
  .appointments-linear-calendar-card,
  .appointments-board-card {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .appointments-toolbar-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .appointments-toolbar-left {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    scrollbar-width: none;
  }
  .appointments-toolbar-left::-webkit-scrollbar {
    display: none;
  }
  .appointments-nav-group {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    min-width: max-content !important;
  }
  .appointments-date-field {
    min-width: 220px !important;
    max-width: 72vw !important;
  }
  .appointments-toolbar-meta {
    display: none !important;
  }

  .appointments-linear-calendar-card {
    overflow: hidden !important;
  }
  .appointments-linear-calendar-scroll {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    scrollbar-width: thin !important;
  }
  .appointments-linear-days {
    display: flex !important;
    gap: 8px !important;
    width: max-content !important;
    min-width: max-content !important;
  }

  .appointments-board-card {
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .appointments-board-scroll {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
  }
  .appointments-board {
    grid-template-columns: 64px repeat(var(--appointments-resources), minmax(220px, 1fr)) !important;
    min-width: calc(64px + (var(--appointments-resources) * 220px)) !important;
  }
  .appointments-board-corner span {
    display: none !important;
  }
}

/* Absolute final mobile fix for appointments (single-card layout) */
@media (max-width: 820px) {
  .appointments-page.container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    height: calc(100dvh - 188px) !important;
    min-height: 440px !important;
    overflow: hidden !important;
  }
  .appointments-layout {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .appointments-main-panel {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  .appointments-main-panel > .appointments-mobile-unified-card > .appointments-toolbar-card,
  .appointments-main-panel > .appointments-mobile-unified-card > .appointments-linear-calendar-card,
  .appointments-main-panel > .appointments-mobile-unified-card > .appointments-board-card {
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .appointments-main-panel > .appointments-mobile-unified-card > .appointments-toolbar-card {
    flex: 0 0 auto !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-toolbar-left {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-toolbar-left::-webkit-scrollbar {
    display: none !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-nav-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: max-content !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-date-field {
    min-width: 210px !important;
    max-width: 62vw !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-date-input {
    width: 22px !important;
    min-width: 22px !important;
    padding: 0 !important;
    color: transparent !important;
    font-size: 0 !important;
    text-indent: -9999px !important;
    background: transparent !important;
    border: 0 !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-date-input::-webkit-calendar-picker-indicator {
    opacity: 1 !important;
    cursor: pointer;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-toolbar-meta {
    display: none !important;
  }

  .appointments-main-panel > .appointments-mobile-unified-card > .appointments-linear-calendar-card {
    flex: 0 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-linear-calendar-scroll {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-linear-days {
    width: max-content !important;
    min-width: max-content !important;
    display: flex !important;
    gap: 8px !important;
  }

  .appointments-main-panel > .appointments-mobile-unified-card > .appointments-board-card {
    flex: 1 1 auto !important;
    min-height: 280px !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-board-scroll {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 280px !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-board {
    grid-template-columns: 64px repeat(var(--appointments-resources), minmax(220px, 1fr)) !important;
    min-width: calc(64px + (var(--appointments-resources) * 220px)) !important;
  }
  .appointments-main-panel > .appointments-mobile-unified-card .appointments-board-corner span {
    display: none !important;
  }
}

/* Ultra-final mobile tuning: full-width appointments card + compact toolbar */
@media (max-width: 820px) {
  .appointments-page.container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .appointments-main-panel {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .appointments-main-panel > .appointments-mobile-fullbleed-card {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    margin-left: calc(50% - 50vw + 6px) !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
    padding: 8px !important;
  }

  .appointments-main-panel > .appointments-mobile-fullbleed-card > .appointments-toolbar-card {
    gap: 6px !important;
  }
  .appointments-main-panel > .appointments-mobile-fullbleed-card .appointments-nav-btn {
    min-width: 34px !important;
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }
  .appointments-main-panel > .appointments-mobile-fullbleed-card .appointments-today-btn {
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    font-size: 0.92rem !important;
  }
  .appointments-main-panel > .appointments-mobile-fullbleed-card .appointments-date-field {
    min-width: 170px !important;
    max-width: 50vw !important;
    min-height: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    padding-left: 10px !important;
    padding-right: 8px !important;
    gap: 4px !important;
  }
  .appointments-main-panel > .appointments-mobile-fullbleed-card .appointments-date-label {
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .appointments-main-panel > .appointments-mobile-fullbleed-card .appointments-date-input {
    width: 18px !important;
    min-width: 18px !important;
  }
  .appointments-main-panel > .appointments-mobile-fullbleed-card .appointments-settlements-trigger {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }
  .appointments-main-panel > .appointments-mobile-fullbleed-card .appointments-settlements-trigger svg {
    width: 17px !important;
    height: 17px !important;
  }
}

/* Hard lock: appointments mobile must occupy full useful viewport area */
@media (max-width: 820px) {
  .admin-layout .admin-content main.appointments-page.container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    height: calc(100dvh - 170px) !important;
    min-height: calc(100dvh - 170px) !important;
    overflow: hidden !important;
  }

  .admin-layout .admin-content main.appointments-page #appointmentsLayout,
  .admin-layout .admin-content main.appointments-page #appointmentsMainPanel,
  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card {
    border-radius: 0 !important;
    padding: 8px 8px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card > .appointments-toolbar-card,
  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card > .appointments-linear-calendar-card {
    flex: 0 0 auto !important;
  }

  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card > .appointments-board-card {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card .appointments-board-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
  }
}

/* Rollback hard viewport lock and let JS size the board area dynamically */
@media (max-width: 820px) {
  .admin-layout .admin-content main.appointments-page.container {
    height: auto !important;
    min-height: 0 !important;
  }
  .admin-layout .admin-content main.appointments-page #appointmentsLayout,
  .admin-layout .admin-content main.appointments-page #appointmentsMainPanel,
  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card {
    height: auto !important;
    min-height: 0 !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card > .appointments-board-card,
  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card .appointments-board-scroll {
    min-height: 260px !important;
  }
}

/* Appointments mobile rebuild (app-like layout, desktop untouched) */
@media (max-width: 820px) {
  .admin-layout .admin-content main.appointments-page.container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }
  .admin-layout .admin-content main.appointments-page #appointmentsLayout {
    display: block !important;
  }

  .admin-layout .admin-content main.appointments-page .appointments-mobile-unified-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .admin-layout .admin-content main.appointments-page .appointments-toolbar-card {
    margin: 0 !important;
    padding: 10px 10px 8px !important;
    border: 0 !important;
    border-bottom: 1px solid #eef0f5 !important;
    border-radius: 0 !important;
    background: #fff !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-view-chip,
  .admin-layout .admin-content main.appointments-page .appointments-today-btn,
  .admin-layout .admin-content main.appointments-page .appointments-nav-btn {
    display: none !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-toolbar-left {
    min-width: 0 !important;
    width: 100% !important;
    overflow: visible !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-nav-group {
    display: block !important;
    min-width: 0 !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-date-form {
    display: block !important;
    width: 100% !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-date-field {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    padding: 8px 10px !important;
    border: 1px solid #e5e9f2 !important;
    border-radius: 12px !important;
    background: #fff !important;
    gap: 4px !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-date-label {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    gap: 1px !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-date-main {
    font-size: 1.03rem !important;
    font-weight: 700 !important;
    color: #1c2430 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-date-hours {
    font-size: 0.8rem !important;
    color: #697486 !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-date-input {
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    color: transparent !important;
    font-size: 0 !important;
    text-indent: -9999px !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-toolbar-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-client-search-trigger-mobile,
  .admin-layout .admin-content main.appointments-page .appointments-filter-trigger,
  .admin-layout .admin-content main.appointments-page .appointments-settlements-trigger {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-client-search-trigger-mobile svg,
  .admin-layout .admin-content main.appointments-page .appointments-filter-trigger svg,
  .admin-layout .admin-content main.appointments-page .appointments-settlements-trigger svg {
    width: 16px !important;
    height: 16px !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-toolbar-meta {
    display: none !important;
  }

  .admin-layout .admin-content main.appointments-page .appointments-linear-calendar-card {
    margin: 0 !important;
    padding: 10px 8px !important;
    border: 0 !important;
    border-bottom: 1px solid #eef0f5 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-linear-calendar-scroll {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-linear-calendar-scroll::-webkit-scrollbar {
    display: none !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-linear-days {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    width: max-content !important;
    min-width: max-content !important;
    padding: 0 2px !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-linear-day {
    min-width: 48px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    text-decoration: none !important;
    color: #1c2430 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 0 !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-linear-weekday {
    font-size: 0.77rem !important;
    font-weight: 500 !important;
    color: #626d81 !important;
    letter-spacing: 0.01em !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-linear-daynum {
    width: 38px !important;
    height: 38px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #202938 !important;
    background: transparent !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-linear-day.is-selected .appointments-linear-daynum {
    background: #d63384 !important;
    color: #fff !important;
  }

  .admin-layout .admin-content main.appointments-page .appointments-board-card {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    overflow: hidden !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-board-scroll {
    width: 100% !important;
    min-height: 56vh !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-board {
    --appointments-head-height: 78px !important;
    grid-template-columns: 56px repeat(var(--appointments-resources), minmax(240px, 240px)) !important;
    min-width: calc(56px + (var(--appointments-resources) * 240px)) !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-board-corner {
    background: #fff !important;
    border-right: 1px solid #edf1f8 !important;
    border-bottom: 1px solid #edf1f8 !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-board-corner span {
    display: none !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-resource-head {
    background: #fff !important;
    border-bottom: 1px solid #edf1f8 !important;
    border-left: 1px solid #edf1f8 !important;
    padding: 8px 10px !important;
    gap: 8px !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-resource-avatar {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-resource-copy strong {
    font-size: 0.95rem !important;
    line-height: 1.15 !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-resource-copy span {
    font-size: 0.78rem !important;
  }

  .admin-layout .admin-content main.appointments-page .appointments-time-rail {
    width: 56px !important;
    min-width: 56px !important;
    border-right: 1px solid #edf1f8 !important;
    background: #fff !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-time-slot {
    position: relative !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 4px 4px 0 5px !important;
  }
  .appointments-time-hour {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #5f6b7d !important;
    line-height: 1 !important;
  }
  .appointments-time-quarter {
    position: absolute !important;
    left: 6px !important;
    font-size: 0.66rem !important;
    color: #a1acbc !important;
    line-height: 1 !important;
    display: inline-block !important;
  }
  .appointments-time-quarter.is-15 { top: 25%; }
  .appointments-time-quarter.is-30 { top: 50%; transform: translateY(-50%); }
  .appointments-time-quarter.is-45 { bottom: 8%; }

  .admin-layout .admin-content main.appointments-page .appointments-grid-hour {
    border-top-color: #e8edf5 !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-grid-minute {
    border-top-color: #f0f4fa !important;
    opacity: 1 !important;
  }

  .admin-layout .admin-content main.appointments-page .appointments-sidebar-panel {
    position: fixed !important;
    top: 8px !important;
    left: 8px !important;
    bottom: calc(132px + env(safe-area-inset-bottom)) !important;
    width: min(90vw, 340px) !important;
    height: calc(100dvh - 8px - (132px + env(safe-area-inset-bottom))) !important;
    max-height: calc(100dvh - 8px - (132px + env(safe-area-inset-bottom))) !important;
    z-index: 3200 !important;
    transform: translateX(-105%) !important;
    transition: transform .22s ease !important;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    display: block !important;
    border-radius: 12px !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-sidebar-panel .appointments-sidebar-block:last-child {
    padding-bottom: 104px !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-sidebar-panel.is-mobile-open {
    transform: translateX(0) !important;
  }
  .appointments-mobile-sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(24, 28, 36, 0.42) !important;
    z-index: 3190 !important;
    border: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity .2s ease !important;
  }
  .appointments-mobile-sidebar-overlay.is-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}

@media (min-width: 821px) {
  .appointments-mobile-sidebar-overlay,
  .appointments-filter-trigger {
    display: none !important;
  }
  .appointments-time-quarter {
    display: none !important;
  }
  /* Desktop safeguard: mobile wrapper must not affect layout/alignment */
  .appointments-mobile-unified-card,
  .appointments-mobile-fullbleed-card {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: contents !important;
  }
}

/* Mobile edge-to-edge: no page padding and no card borders */
@media (max-width: 820px) {
  .admin-layout .admin-content main.appointments-page.container {
    padding: 0 !important;
    margin: 0 !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-mobile-unified-card,
  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
}

/* Edge lock for appointments mobile: remove wrapper gutters from admin layout */
@media (max-width: 820px) {
  .admin-layout .admin-content > main.appointments-page.container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .admin-layout .admin-content > main.appointments-page .appointments-mobile-unified-card,
  .admin-layout .admin-content > main.appointments-page .appointments-mobile-fullbleed-card {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .admin-layout .admin-content {
    padding-top: 0 !important;
  }
}

/* True edge-to-edge in mobile when appointments page is active inside admin content */
@media (max-width: 820px) {
  .admin-layout .admin-content:has(> main.appointments-page),
  .admin-layout .admin-content:has(> #adminContent > main.appointments-page) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
  }
  #adminContent:has(> main.appointments-page) {
    padding: 0 !important;
    margin: 0 !important;
  }
  .admin-layout .admin-content main.appointments-page.container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .admin-layout .admin-content main.appointments-page .appointments-mobile-unified-card,
  .admin-layout .admin-content main.appointments-page .appointments-mobile-fullbleed-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}


/* Ensure every modal overlays the fixed admin bottom bar */
.modal-backdrop {
  z-index: 3300 !important;
  padding-bottom: calc(180px + env(safe-area-inset-bottom)) !important;
}

.modal-card,
.appointments-modal-card,
.appointments-details-modal-card,
.appointments-settlements-modal-card,
.service-image-modal-card {
  max-height: calc(100vh - 220px) !important;
  overflow: auto !important;
}

.service-image-modal-backdrop {
  z-index: 3310 !important;
}

@media (min-width: 960px) {
  .modal-backdrop {
    padding-bottom: calc(120px + env(safe-area-inset-bottom)) !important;
  }

  .modal-card,
  .appointments-modal-card,
  .appointments-details-modal-card,
  .appointments-settlements-modal-card,
  .service-image-modal-card {
    max-height: calc(100vh - 150px) !important;
  }
}
