/* SISU Stitch / Propertied — admin layout (sin depender de Tailwind CDN) */
:root {
  --stitch-primary: #006948;
  --stitch-primary-container: #00855d;
  --stitch-on-primary: #ffffff;
  --stitch-on-primary-container: #f5fff7;
  --stitch-tertiary: #0058be;
  --stitch-surface: #f7f9fb;
  --stitch-surface-low: #f2f4f6;
  --stitch-surface-high: #e6e8ea;
  --stitch-on-surface: #191c1e;
  --stitch-on-surface-variant: #3d4a42;
  --stitch-outline-variant: #bccac0;
  --stitch-white: #ffffff;
  --stitch-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  --stitch-radius-lg: 12px;
  --stitch-radius-xl: 16px;
  --stitch-sidebar-w: 256px;
}

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

body.stitch-body {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--stitch-surface);
  color: var(--stitch-on-surface);
}

.stitch-app {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.stitch-sidebar {
  display: none;
  width: var(--stitch-sidebar-w);
  flex-shrink: 0;
  background: var(--stitch-white);
  border-right: 1px solid var(--stitch-outline-variant);
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}

@media (min-width: 768px) {
  .stitch-sidebar { display: flex; }
}

.stitch-brand {
  padding: 16px 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--stitch-primary);
  font-weight: 700;
  font-size: 1.15rem;
}

.stitch-brand img { height: 40px; width: auto; }

.stitch-nav {
  flex: 1;
  padding: 0 8px;
  overflow-y: auto;
}

/* Fila uniforme: icono | etiqueta | chevron/espaciador */
.stitch-nav-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  padding: 7px 10px;
  margin-bottom: 2px;
  border-radius: var(--stitch-radius-lg);
  box-sizing: border-box;
}

.stitch-nav-icon {
  width: 22px;
  height: 22px;
  font-size: 20px !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stitch-nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stitch-nav-spacer {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.stitch-nav-group { margin-bottom: 2px; }

details.stitch-nav-details > summary {
  list-style: none;
  cursor: pointer;
}

details.stitch-nav-details > summary::-webkit-details-marker {
  display: none;
}

.stitch-nav-parent-link {
  display: block;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.stitch-nav-parent-link:hover {
  color: inherit;
}

details.stitch-nav-details[open] .stitch-chevron {
  transform: rotate(180deg);
}

details.stitch-nav-details[open] .stitch-submenu {
  display: flex;
}

.stitch-nav-parent,
.stitch-nav-single {
  border: none;
  background: transparent;
  text-decoration: none;
  color: var(--stitch-on-surface-variant);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
  list-style: none;
}

.stitch-nav-parent:hover,
.stitch-nav-single:hover {
  background: var(--stitch-surface-low);
}

.stitch-nav-parent.is-active {
  background: rgba(0, 105, 72, 0.12);
  color: var(--stitch-primary);
}

.stitch-nav-single.active {
  background: var(--stitch-primary-container) !important;
  color: var(--stitch-on-primary-container) !important;
}

.stitch-chevron {
  width: 18px;
  height: 18px;
  font-size: 18px !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.stitch-nav-group.is-open .stitch-chevron { transform: rotate(180deg); }

.stitch-submenu {
  display: none;
  flex-direction: column;
  padding: 2px 0 4px calc(10px + 22px + 10px);
  gap: 1px;
}

.stitch-nav-group.is-open .stitch-submenu { display: flex; }

.stitch-submenu a {
  display: block;
  padding: 5px 8px;
  margin: 0;
  border-radius: 6px;
  text-decoration: none;
  color: var(--stitch-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.stitch-submenu a:hover { background: var(--stitch-surface-low); color: var(--stitch-on-surface); }

.stitch-submenu a.active {
  background: var(--stitch-primary-container) !important;
  color: var(--stitch-on-primary-container) !important;
}

.stitch-user-box {
  margin: 10px 8px 12px;
  padding: 8px 10px;
  background: var(--stitch-surface-high);
  border-radius: var(--stitch-radius-lg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.stitch-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--stitch-primary);
  color: var(--stitch-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.stitch-user-meta { flex: 1; min-width: 0; }
.stitch-user-meta p { margin: 0; }
.stitch-user-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stitch-user-email { font-size: 12px; color: var(--stitch-on-surface-variant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stitch-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  .stitch-main { padding-bottom: 0; height: 100vh; overflow: hidden; }
}

.stitch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--stitch-surface);
  border-bottom: 1px solid rgba(188, 202, 192, 0.4);
  box-shadow: var(--stitch-shadow);
  position: sticky;
  top: 0;
  z-index: 40;
}

.stitch-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.stitch-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stitch-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 32px;
  background: var(--stitch-surface);
}

@media (max-width: 767px) {
  .stitch-content {
    padding-bottom: 96px;
  }
}

.stitch-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .stitch-stats { grid-template-columns: repeat(3, 1fr); }
}

.stitch-card {
  background: var(--stitch-white);
  border: 1px solid rgba(188, 202, 192, 0.5);
  border-radius: var(--stitch-radius-xl);
  padding: 24px;
  box-shadow: var(--stitch-shadow);
}

.stitch-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stitch-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--stitch-on-surface-variant);
  margin: 0 0 4px;
}

.stitch-stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}

.stitch-stat-value.primary { color: var(--stitch-primary); }
.stitch-stat-value.tertiary { color: var(--stitch-tertiary); }

.stitch-stat-hint {
  font-size: 14px;
  color: var(--stitch-on-surface-variant);
  margin: 4px 0 0;
}

.stitch-panel {
  background: var(--stitch-white);
  border: 1px solid rgba(188, 202, 192, 0.5);
  border-radius: var(--stitch-radius-xl);
  box-shadow: var(--stitch-shadow);
  overflow: hidden;
}

.stitch-tabs {
  display: flex;
  gap: 8px;
  padding: 8px 16px 0;
  border-bottom: 1px solid rgba(188, 202, 192, 0.4);
}

.stitch-tabs .nav-link {
  color: var(--stitch-on-surface-variant);
  font-weight: 600;
  border: none !important;
}

.stitch-tabs .nav-link.active {
  color: var(--stitch-primary) !important;
  border-bottom: 2px solid var(--stitch-primary) !important;
}

.stitch-panel-body { padding: 24px; }

.stitch-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .stitch-filters { grid-template-columns: repeat(3, 1fr); }
}

.stitch-input,
.stitch-select {
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(188, 202, 192, 0.5);
  background: var(--stitch-surface-low);
  font-family: inherit;
  font-size: 14px;
}

.stitch-input:focus,
.stitch-select:focus {
  outline: none;
  border-color: var(--stitch-primary);
  box-shadow: 0 0 0 1px var(--stitch-primary);
}

.stitch-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(188, 202, 192, 0.4);
  border-radius: var(--stitch-radius-xl);
  background: var(--stitch-white);
  margin-bottom: 0;
}

/* Espacio entre tabla y paginación (evita que se encimen) */
.stitch-body .stitch-table-wrap + div,
.stitch-body .stitch-pagination-wrap {
  margin-top: 16px;
  padding: 12px 4px 8px;
  clear: both;
}

.stitch-body .stitch-pagination-wrap nav,
.stitch-body .stitch-table-wrap + div nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stitch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 0;
}

.stitch-table thead {
  background: var(--stitch-surface-low);
  color: var(--stitch-on-surface-variant);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.stitch-table th,
.stitch-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(188, 202, 192, 0.3);
  vertical-align: middle;
}

.stitch-table tbody tr:last-child td { border-bottom: none; }

.stitch-table tbody tr:hover { background: rgba(242, 244, 246, 0.6); }

/* Bootstrap tables dentro del layout Stitch */
.stitch-body .table-responsive,
.stitch-body .card-custom .table-responsive {
  overflow-x: auto;
  border: 1px solid rgba(188, 202, 192, 0.4);
  border-radius: var(--stitch-radius-xl);
  background: var(--stitch-white);
}

.stitch-body .table,
.stitch-body table.dataTable {
  width: 100%;
  margin-bottom: 0;
  font-size: 14px;
  color: var(--stitch-on-surface);
  border-collapse: collapse;
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
  --bs-table-striped-bg: rgba(242, 244, 246, 0.45);
  --bs-table-hover-bg: rgba(242, 244, 246, 0.75);
  --bs-table-border-color: rgba(188, 202, 192, 0.28);
  --bs-table-color: var(--stitch-on-surface);
}

.stitch-body .table > :not(caption) > * > *,
.stitch-body table.dataTable > thead > tr > th,
.stitch-body table.dataTable > tbody > tr > td {
  padding: 12px 16px;
  vertical-align: middle;
  box-shadow: none !important;
}

.stitch-body .table thead th,
.stitch-body .table thead td,
.stitch-body table.dataTable thead th {
  background: var(--stitch-surface-low) !important;
  color: var(--stitch-on-surface-variant) !important;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(188, 202, 192, 0.4) !important;
  white-space: nowrap;
}

.stitch-body .table tbody td,
.stitch-body table.dataTable tbody td {
  border-bottom: 1px solid rgba(188, 202, 192, 0.22);
  font-size: 14px;
}

.stitch-body .table tbody tr:last-child td { border-bottom: none; }

.stitch-body .table.table-bordered > :not(caption) > * {
  border-width: 0;
}

.stitch-body .table.table-bordered th,
.stitch-body .table.table-bordered td {
  border-left: none;
  border-right: none;
}

.stitch-body .card-custom {
  background: var(--stitch-white);
  border: 1px solid rgba(188, 202, 192, 0.5);
  border-radius: var(--stitch-radius-xl);
  box-shadow: var(--stitch-shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.stitch-body .card-custom .table-responsive {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.stitch-body .page-header {
  margin-bottom: 1.25rem;
  padding: 0;
  background: transparent;
  border: none;
}

.stitch-body .page-header h1,
.stitch-body .page-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--stitch-on-surface);
  margin: 0;
}

/* Botones — layout admin Stitch */
.stitch-body .btn,
.stitch-body a.btn {
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.stitch-body a.btn-custom:not(.btn),
.stitch-body .btn-custom:not(.btn) {
  padding: 8px 16px;
  line-height: 1.25;
  border: 1px solid var(--stitch-primary);
}

.stitch-body .btn-custom,
.stitch-body .btn-primary:not(.btn-outline-primary):not(.btn-link) {
  background: var(--stitch-primary) !important;
  border-color: var(--stitch-primary) !important;
  color: #fff !important;
}

.stitch-body .btn-custom:hover,
.stitch-body .btn-custom:focus,
.stitch-body .btn-primary:not(.btn-outline-primary):not(.btn-link):hover,
.stitch-body .btn-primary:not(.btn-outline-primary):not(.btn-link):focus {
  background: var(--stitch-primary-container) !important;
  border-color: var(--stitch-primary-container) !important;
  color: #fff !important;
}

.stitch-body .btn-secondary {
  background: var(--stitch-surface-low);
  border-color: rgba(188, 202, 192, 0.6);
  color: var(--stitch-on-surface-variant);
}

.stitch-body .btn-secondary:hover {
  background: var(--stitch-surface-high);
  border-color: rgba(188, 202, 192, 0.8);
  color: var(--stitch-on-surface);
}

.stitch-body .btn-light {
  background: var(--stitch-white);
  border: 1px solid rgba(188, 202, 192, 0.55);
  color: var(--stitch-on-surface);
}

.stitch-body .btn-light:hover {
  background: var(--stitch-surface-low);
  border-color: rgba(188, 202, 192, 0.75);
  color: var(--stitch-on-surface);
}

.stitch-body .btn-success {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.stitch-body .btn-success:hover {
  background: #047857;
  border-color: #047857;
  color: #fff;
}

.stitch-body .btn-warning {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
}

.stitch-body .btn-outline-primary {
  color: var(--stitch-primary);
  border-color: rgba(0, 105, 72, 0.45);
  background: transparent;
}

.stitch-body .btn-outline-primary:hover {
  background: rgba(0, 105, 72, 0.08);
  border-color: var(--stitch-primary);
  color: var(--stitch-primary);
}

.stitch-body .btn-outline-secondary {
  color: var(--stitch-on-surface-variant);
  border-color: rgba(188, 202, 192, 0.65);
  background: var(--stitch-white);
}

.stitch-body .btn-outline-secondary:hover {
  background: var(--stitch-surface-low);
  border-color: rgba(188, 202, 192, 0.85);
  color: var(--stitch-on-surface);
}

.stitch-body .action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.stitch-body table .btn-sm {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.2;
}

.stitch-body table .btn-custom {
  background: var(--stitch-primary);
  border-color: var(--stitch-primary);
  color: #fff;
}

.stitch-body table .btn-custom:hover {
  background: var(--stitch-primary-container);
  border-color: var(--stitch-primary-container);
  color: #fff;
}

.stitch-body table .btn-info {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.stitch-body table .btn-info:hover {
  background: #bfdbfe;
  border-color: #60a5fa;
  color: #1e3a8a;
}

.stitch-body table .btn-danger {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.stitch-body table .btn-danger:hover {
  background: #fecaca;
  border-color: #f87171;
  color: #7f1d1d;
}

.stitch-body .badge {
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.stitch-body .badge.bg-success,
.stitch-body .badge.text-bg-success {
  background: #d1fae5 !important;
  color: #065f46 !important;
}

.stitch-body .badge.bg-danger,
.stitch-body .badge.text-bg-danger {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

.stitch-body .badge.bg-warning,
.stitch-body .badge.text-bg-warning {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.stitch-body .badge.bg-primary,
.stitch-body .badge.text-bg-primary {
  background: rgba(0, 105, 72, 0.12) !important;
  color: var(--stitch-primary) !important;
}

.stitch-body .badge.bg-secondary,
.stitch-body .badge.text-bg-secondary {
  background: #f3f4f6 !important;
  color: #374151 !important;
}

.stitch-body .pagination {
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
  justify-content: flex-end;
}

.stitch-body .pagination .page-item {
  margin: 0;
}

.stitch-body .pagination .page-link {
  border-radius: 8px;
  margin: 0 !important;
  color: var(--stitch-primary);
  border-color: rgba(188, 202, 192, 0.5);
  font-size: 14px;
  font-weight: 600;
  float: none;
  position: relative;
  z-index: 0;
}

.stitch-body .pagination .page-item.active .page-link {
  background: var(--stitch-primary);
  border-color: var(--stitch-primary);
  color: #fff;
  z-index: 1;
}

.stitch-body .pagination .page-link:hover {
  background: rgba(0, 105, 72, 0.08);
  color: var(--stitch-primary);
  z-index: 2;
}

@media (max-width: 767px) {
  .stitch-body .pagination {
    justify-content: center;
  }
}

.stitch-body .dataTables_wrapper .dataTables_filter input,
.stitch-body .dataTables_wrapper .dataTables_length select {
  border-radius: 8px;
  border: 1px solid rgba(188, 202, 192, 0.5);
  padding: 6px 12px;
  font-size: 14px;
}

.stitch-body .dataTables_wrapper .dataTables_info {
  font-size: 13px;
  color: var(--stitch-on-surface-variant);
}

.stitch-body .dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 8px !important;
  margin: 0 2px;
}

.stitch-body .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--stitch-primary) !important;
  border-color: var(--stitch-primary) !important;
  color: #fff !important;
}

.stitch-body .alert {
  border-radius: var(--stitch-radius-lg);
  border: none;
  font-size: 14px;
}

.stitch-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.stitch-chip-warning { background: #fef3c7; color: #92400e; }
.stitch-chip-info { background: #dbeafe; color: #1e40af; }
.stitch-chip-success { background: #d1fae5; color: #065f46; }
.stitch-chip-danger { background: #fee2e2; color: #991b1b; }
.stitch-chip-muted { background: #f3f4f6; color: #374151; }

.stitch-pagination-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .stitch-pagination-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.stitch-mobile-nav {
  display: flex;
  justify-content: space-around;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--stitch-white);
  border-top: 1px solid var(--stitch-outline-variant);
  padding: 8px 4px;
  z-index: 50;
}

@media (min-width: 768px) {
  .stitch-mobile-nav { display: none; }
}

.stitch-mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  text-decoration: none;
  color: var(--stitch-on-surface-variant);
  font-size: 10px;
  font-weight: 600;
}

.stitch-mobile-nav a.active { color: var(--stitch-primary); }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

.stitch-icon-btn {
  display: inline-flex;
  padding: 8px;
  border-radius: 50%;
  color: var(--stitch-on-surface-variant);
  text-decoration: none;
}

.stitch-icon-btn:hover { background: var(--stitch-surface-low); }

.stitch-scrollbar::-webkit-scrollbar { width: 4px; height: 4px; }
.stitch-scrollbar::-webkit-scrollbar-thumb { background: #e0e3e5; border-radius: 10px; }

#calendar { max-width: 100%; }
.fc-event { cursor: pointer; }

/* Calendario Stitch / FullCalendar */
.stitch-calendar-wrap {
  background: var(--stitch-white);
  border: 1px solid rgba(188, 202, 192, 0.5);
  border-radius: var(--stitch-radius-xl);
  box-shadow: var(--stitch-shadow);
  padding: 16px;
  overflow: hidden;
}

.stitch-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 12px 16px;
  background: var(--stitch-surface-low);
  border-radius: var(--stitch-radius-lg);
  border: 1px solid rgba(188, 202, 192, 0.35);
}

.stitch-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--stitch-on-surface-variant);
}

.stitch-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex-shrink: 0;
}

.stitch-legend-dot.reservacion { background: var(--stitch-primary); }
.stitch-legend-dot.liberado { background: #86efac; border: 1px solid #22c55e; }
.stitch-legend-dot.pet { background: #dbeafe; border: 1px solid #60a5fa; }

.stitch-body .fc {
  font-family: 'Manrope', system-ui, sans-serif;
  --fc-border-color: rgba(188, 202, 192, 0.45);
  --fc-button-bg-color: var(--stitch-primary);
  --fc-button-border-color: var(--stitch-primary);
  --fc-button-hover-bg-color: var(--stitch-primary-container);
  --fc-button-hover-border-color: var(--stitch-primary-container);
  --fc-button-active-bg-color: #005a3d;
  --fc-button-active-border-color: #005a3d;
  --fc-today-bg-color: rgba(0, 105, 72, 0.08);
  --fc-page-bg-color: var(--stitch-white);
  --fc-neutral-bg-color: var(--stitch-surface-low);
  --fc-list-event-hover-bg-color: rgba(242, 244, 246, 0.8);
}

.stitch-body .fc .fc-toolbar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--stitch-on-surface);
}

.stitch-body .fc .fc-button {
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 12px;
  text-transform: capitalize;
  box-shadow: none !important;
}

.stitch-body .fc .fc-button:focus {
  box-shadow: 0 0 0 2px rgba(0, 105, 72, 0.25) !important;
}

.stitch-body .fc .fc-col-header-cell-cushion,
.stitch-body .fc .fc-daygrid-day-number {
  color: var(--stitch-on-surface-variant);
  font-weight: 600;
  text-decoration: none;
}

.stitch-body .fc .fc-col-header-cell {
  background: var(--stitch-surface-low);
  padding: 8px 0;
}

.stitch-body .fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  background: var(--stitch-primary);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stitch-body .fc .stitch-fc-event-reservacion {
  background: var(--stitch-primary) !important;
  border-color: #005a3d !important;
  color: #fff !important;
}

.stitch-body .fc .stitch-fc-event-liberado {
  background: rgba(134, 239, 172, 0.45) !important;
  border-color: #22c55e !important;
  color: #14532d !important;
}

.stitch-body .fc .fc-list-event:hover td {
  background: rgba(242, 244, 246, 0.8);
}

.stitch-body .fc .fc-list-day-cushion {
  background: var(--stitch-surface-low);
  font-weight: 700;
  color: var(--stitch-on-surface);
}

.stitch-body .stitch-modal .modal-content {
  border: none;
  border-radius: var(--stitch-radius-xl);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
  overflow: hidden;
}

.stitch-body .stitch-modal .modal-header {
  background: var(--stitch-surface-low);
  border-bottom: 1px solid rgba(188, 202, 192, 0.4);
  padding: 16px 24px;
}

.stitch-body .stitch-modal .modal-title {
  font-weight: 700;
  color: var(--stitch-on-surface);
}

.stitch-body .stitch-modal .modal-footer {
  border-top: 1px solid rgba(188, 202, 192, 0.4);
  padding: 16px 24px;
}

.stitch-body .stitch-modal .property-info {
  background: var(--stitch-surface-low);
  border-radius: var(--stitch-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(188, 202, 192, 0.35);
}

.stitch-body .stitch-modal .property-image-container img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.stitch-body .stitch-modal .property-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--stitch-on-surface-variant);
}

.stitch-body .stitch-modal .property-detail-item i {
  color: var(--stitch-primary);
  margin-top: 2px;
}

.stitch-body .stitch-modal .btn-primary {
  background: var(--stitch-primary);
  border-color: var(--stitch-primary);
}

.stitch-body .stitch-modal .btn-primary:hover {
  background: var(--stitch-primary-container);
  border-color: var(--stitch-primary-container);
}

@media (max-width: 767px) {
  .stitch-calendar-wrap { padding: 8px; }
  .stitch-body .fc .fc-toolbar { flex-direction: column; gap: 8px; }
  .stitch-body .fc .fc-toolbar-title { font-size: 1.1rem; }
}

/* Panel header, toolbar y filtros Stitch */
.stitch-page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.stitch-page-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--stitch-on-surface);
}

.stitch-page-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--stitch-on-surface-variant);
}

.stitch-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stitch-stats-compact {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .stitch-stats-compact {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stitch-stat-card {
  padding: 16px 20px;
  text-align: left;
}

.stitch-stat-card .stitch-stat-value {
  font-size: 1.75rem;
}

.stitch-search-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.stitch-search-wrap .stitch-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.stitch-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(188, 202, 192, 0.5);
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: var(--stitch-surface-low);
  color: var(--stitch-on-surface-variant);
  cursor: pointer;
}

.stitch-search-btn:hover {
  background: rgba(0, 105, 72, 0.08);
  color: var(--stitch-primary);
}

.stitch-select-sm {
  width: auto;
  min-width: 72px;
  padding: 6px 10px;
  font-size: 13px;
}

.stitch-rows-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--stitch-on-surface-variant);
}

.stitch-btn-soft {
  background: rgba(0, 105, 72, 0.1);
  border: 1px solid rgba(0, 105, 72, 0.25);
  color: var(--stitch-primary);
  font-weight: 600;
}

.stitch-btn-soft:hover {
  background: rgba(0, 105, 72, 0.16);
  color: var(--stitch-primary);
}

.stitch-btn-warning {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-weight: 600;
}

.stitch-btn-warning:hover {
  background: #fde68a;
  color: #78350f;
}

.stitch-btn-outline {
  background: #fff;
  border: 1px solid rgba(188, 202, 192, 0.6);
  color: var(--stitch-on-surface-variant);
}

.stitch-btn-outline:hover {
  background: var(--stitch-surface-low);
  color: var(--stitch-primary);
}

.stitch-body .stitch-filters {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .stitch-body .stitch-filters {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

/* Tarjetas de propiedad (agendar, liberar días, etc.) */
.stitch-body .property-card {
  border: 1px solid rgba(188, 202, 192, 0.45);
  border-radius: var(--stitch-radius-xl);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stitch-body .property-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--stitch-shadow);
}

.stitch-body .property-card .property-img,
.stitch-body .property-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--stitch-surface-low);
  display: block;
}

.stitch-body .property-card .card-body {
  padding: 1rem 1.25rem 1.25rem;
}

.stitch-body .property-card .field-icon {
  color: var(--stitch-primary);
  margin-right: 4px;
}

/* Tabla propietarios — celdas y acciones */
.stitch-body .stitch-cell-title {
  font-weight: 600;
  color: var(--stitch-on-surface);
  line-height: 1.3;
}

.stitch-body .stitch-cell-sub {
  font-size: 12px;
  color: var(--stitch-on-surface-variant);
  margin-top: 2px;
}

.stitch-body .stitch-badge-count {
  background: rgba(0, 105, 72, 0.12) !important;
  color: var(--stitch-primary) !important;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.stitch-body .stitch-actions-cell {
  width: 150px;
  min-width: 150px;
  white-space: nowrap;
}

.stitch-body .stitch-action-select {
  min-width: 140px;
  max-width: 160px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(188, 202, 192, 0.55);
  padding: 6px 10px;
  cursor: pointer;
  background: var(--stitch-white);
  color: var(--stitch-on-surface-variant);
  box-shadow: none;
}

.stitch-body .stitch-action-select:focus {
  border-color: var(--stitch-primary);
  box-shadow: 0 0 0 3px rgba(0, 105, 72, 0.12);
}

.stitch-body .dataTables_wrapper .dataTables_length,
.stitch-body .dataTables_wrapper .dataTables_filter {
  margin-bottom: 1rem;
}

.stitch-body .dataTables_wrapper .dataTables_length label,
.stitch-body .dataTables_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--stitch-on-surface-variant);
  font-weight: 500;
}

.stitch-body table.dataTable thead th.sorting,
.stitch-body table.dataTable thead th.sorting_asc,
.stitch-body table.dataTable thead th.sorting_desc {
  background: var(--stitch-surface-low) !important;
  color: var(--stitch-on-surface-variant) !important;
}

/* Tarjetas de servicios (Concierge) */
.stitch-body .stitch-service-grid {
  margin-top: 0.5rem;
}

.stitch-body .stitch-service-card {
  display: flex;
  flex-direction: column;
  background: var(--stitch-white);
  border: 1px solid rgba(188, 202, 192, 0.45);
  border-radius: var(--stitch-radius-xl);
  box-shadow: var(--stitch-shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stitch-body .stitch-service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.stitch-body .stitch-service-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 24px;
  background: linear-gradient(180deg, var(--stitch-surface-low) 0%, var(--stitch-white) 100%);
  border-bottom: 1px solid rgba(188, 202, 192, 0.25);
}

.stitch-body .stitch-service-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.stitch-body .stitch-service-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 1.25rem;
  flex: 1;
}

.stitch-body .stitch-service-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--stitch-on-surface);
}

.stitch-body .stitch-service-desc {
  margin: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.45;
  color: var(--stitch-on-surface-variant);
}

.stitch-body .stitch-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.stitch-body .stitch-service-actions .btn-sm {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 12px;
  font-size: 13px;
}

/* Configuración e integraciones */
.stitch-body .stitch-config-nav .nav-link {
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  color: var(--stitch-on-surface-variant);
  padding: 8px 18px;
}

.stitch-body .stitch-config-nav .nav-link.active {
  background: var(--stitch-primary);
  color: #fff;
}

.stitch-body .stitch-config-card,
.stitch-body .stitch-integration-card {
  padding: 1.5rem;
}

.stitch-body .stitch-config-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(188, 202, 192, 0.35);
}

.stitch-body .stitch-config-card-head .material-symbols-outlined {
  font-size: 28px;
  color: var(--stitch-primary);
  background: rgba(0, 105, 72, 0.1);
  border-radius: 12px;
  padding: 10px;
}

.stitch-body .stitch-config-card-head h3,
.stitch-body .stitch-integration-brand h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--stitch-on-surface);
}

.stitch-body .stitch-config-card-head p,
.stitch-body .stitch-integration-tagline {
  font-size: 13px;
  color: var(--stitch-on-surface-variant);
}

.stitch-body .stitch-config-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(188, 202, 192, 0.25);
}

.stitch-body .stitch-integration-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(188, 202, 192, 0.35);
}

.stitch-body .stitch-integration-logo {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.stitch-body .stitch-config-form .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--stitch-on-surface-variant);
}

.stitch-body .stitch-config-form .form-control {
  border-radius: 8px;
  border-color: rgba(188, 202, 192, 0.55);
  font-size: 14px;
}

.stitch-body .stitch-config-form code {
  font-size: 12px;
  color: var(--stitch-primary);
}
