:root {
  color-scheme: light;
  --bg: #faf6f2;
  --bg-alt: #f3ebe4;
  --ink: #2e2320;
  --muted: #6b5a52;
  --brand: #a4463c;
  --brand-dark: #6f2c26;
  --brand-soft: rgba(164, 70, 60, 0.1);
  --accent: #d98a5f;
  --white: #ffffff;
  --card: #ffffff;
  --border: rgba(164, 70, 60, 0.14);
  --shadow: 0 24px 60px rgba(86, 45, 38, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --transition: 200ms ease;
}

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

body {
  font-family: "Sora", "Segoe UI", sans-serif;
  background-color: #faf6f2;
  background-image: 
    url('assets/paws-pattern.svg'),
    radial-gradient(circle at top, #fdfaf7 0%, #f7efe8 45%, #f2e8e0 100%);
  background-repeat: repeat, no-repeat;
  background-size: 240px 240px, 100% 100%;
  background-attachment: fixed, fixed;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

img {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
  padding: 0;
}

.container {
  width: min(1100px, 90vw);
  margin: 0 auto;
}

.bg-orb {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.6;
  z-index: -2;
  pointer-events: none;
}

.orb-1 {
  top: -120px;
  right: -60px;
  background: radial-gradient(circle, rgba(217, 138, 95, 0.35), rgba(217, 138, 95, 0));
}

.orb-2 {
  bottom: -140px;
  left: -80px;
  background: radial-gradient(circle, rgba(164, 70, 60, 0.2), rgba(164, 70, 60, 0));
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      rgba(164, 70, 60, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(164, 70, 60, 0.04) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.3;
  z-index: -3;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(250, 246, 242, 0.94);
  border-bottom: 1px solid rgba(164, 70, 60, 0.12);
  box-shadow: 0 4px 20px rgba(86, 45, 38, 0.04);
  z-index: 100;
}

.header-content {
  width: 100%;
  max-width: 100%;
  padding: 10px clamp(12px, 2.5vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--white);
  padding: 5px;
  box-shadow: 0 8px 20px rgba(86, 45, 38, 0.1);
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  display: block;
  font-family: "Fraunces", "Georgia", serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.2;
}

.brand-tagline {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(86, 45, 38, 0.06);
  transition: all var(--transition);
  flex-shrink: 0;
  user-select: none;
}

.nav-toggle:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(164, 70, 60, 0.15);
  transform: translateY(-1px);
}

.nav-toggle[aria-expanded="true"] {
  background: var(--brand);
  border-color: var(--brand-dark);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(164, 70, 60, 0.25);
}

.nav-toggle .menu-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
}

.nav-toggle .menu-label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-toggle .nav-caret {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
  stroke: currentColor;
}

.nav-toggle[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

.nav-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: clamp(12px, 2.5vw, 32px);
  right: clamp(12px, 2.5vw, 32px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(86, 45, 38, 0.18);
  padding: 20px 24px;
  display: none;
  flex-direction: column;
  gap: 16px;
  max-height: calc(88vh - 70px);
  overflow-y: auto;
  z-index: 120;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.nav-panel.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.nav-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.nav-panel-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-panel-mobile-bar {
  display: none;
}

.nav-panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.nav-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fdfaf7;
  color: var(--brand-dark);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.nav-action:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

@media (max-width: 460px) {
  .nav-panel-actions {
    grid-template-columns: 1fr;
  }
}

.menu-title-icon {
  stroke: var(--brand);
}

.nav-panel-close {
  background: var(--brand-soft);
  border: none;
  color: var(--brand-dark);
  font-size: 1.4rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.nav-panel-close:hover {
  background: var(--brand);
  color: var(--white);
}

.site-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.nav-group {
  background: #fdfaf7;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.nav-group:hover {
  background: #ffffff;
  border-color: rgba(164, 70, 60, 0.25);
  box-shadow: 0 8px 20px rgba(86, 45, 38, 0.08);
}

.nav-group .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  background: rgba(164, 70, 60, 0.06);
  transition: background var(--transition), color var(--transition);
}

.nav-group .nav-link:hover,
.nav-group .nav-link.is-active {
  background: var(--brand);
  color: var(--white);
}

.nav-group .nav-link .nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand-dark);
  transition: background var(--transition), color var(--transition);
}

.nav-group .nav-link:hover .nav-icon,
.nav-group .nav-link.is-active .nav-icon {
  background: rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.nav-group .nav-dropdown {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 0 0 4px;
}

.nav-group .nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.nav-group .nav-dropdown a::before {
  content: "•";
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
}

.nav-group .nav-dropdown a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
  transform: translateX(3px);
}

.nav-group .nav-dropdown a.is-active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.notif-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(86, 45, 38, 0.05);
  transition: all var(--transition);
  flex-shrink: 0;
}

.notif-btn:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: var(--brand);
}

.notif-icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
}

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #e63946;
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.4);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* Floating Live Notifications (Avisos en tiempo real) */
.live-notifications {
  position: fixed;
  top: 75px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.live-notif-card {
  pointer-events: auto;
  display: flex;
  gap: 14px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(164, 70, 60, 0.25);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 16px 36px rgba(86, 45, 38, 0.18), 0 0 0 1px rgba(164, 70, 60, 0.08);
  animation: live-notif-enter 300ms cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 220ms ease, transform 220ms ease;
}

.live-notif-card.is-hiding {
  opacity: 0;
  transform: translateX(30px) scale(0.95);
}

@keyframes live-notif-enter {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.live-notif-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.live-notif-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.live-notif-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.live-notif-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0;
  line-height: 1.25;
}

.live-notif-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color var(--transition);
}

.live-notif-close:hover {
  color: var(--brand-dark);
}

.live-notif-text {
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.35;
  margin: 0;
}

.live-notif-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.live-notif-action {
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

/* Resaltado de fila al navegar a la asignación */
tr.row-highlight {
  animation: row-glow 4s ease-out;
}

@keyframes row-glow {
  0% {
    background-color: rgba(217, 138, 95, 0.4);
    box-shadow: 0 0 16px rgba(164, 70, 60, 0.4);
  }
  70% {
    background-color: rgba(217, 138, 95, 0.15);
  }
  100% {
    background-color: transparent;
  }
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.search-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--ink);
  width: 130px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--brand);
  color: var(--white);
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.user-id {
  font-size: 0.72rem;
  color: var(--muted);
}

.hero {
  padding: 80px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(164, 70, 60, 0.1);
  color: var(--brand-dark);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.hero h1 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(2.3rem, 2.2rem + 2vw, 3.4rem);
  margin: 16px 0 18px;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin: 26px 0 30px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn.primary {
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 16px 40px rgba(164, 70, 60, 0.25);
}

.btn.ghost {
  border-color: rgba(164, 70, 60, 0.3);
  color: var(--brand-dark);
  background: rgba(164, 70, 60, 0.05);
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.highlight {
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(86, 45, 38, 0.08);
}

.highlight-title {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.highlight-body {
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-panel {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(164, 70, 60, 0.08);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.panel-chip {
  background: rgba(217, 138, 95, 0.18);
  color: #8a3f2f;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.panel-stats {
  display: grid;
  gap: 16px;
}

.stat-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-alt);
  border: 1px solid rgba(164, 70, 60, 0.08);
}

.stat-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 0.9rem;
  color: var(--muted);
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 22px;
}

.panel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.section {
  padding: 70px 0;
}

.section-header {
  max-width: 560px;
  margin-bottom: 40px;
}

.section-header h2 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(1.8rem, 1.6rem + 1vw, 2.5rem);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--muted);
  line-height: 1.6;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.service-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(86, 45, 38, 0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 45px rgba(86, 45, 38, 0.12);
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: rgba(164, 70, 60, 0.12);
  color: var(--brand-dark);
  margin-bottom: 16px;
}

.service-card h3 {
  margin-bottom: 10px;
}

.service-card p {
  color: var(--muted);
  line-height: 1.5;
}

.admin-section {
  background: var(--bg-alt);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: start;
}

.admin-copy h2 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(1.8rem, 1.6rem + 1vw, 2.3rem);
  margin: 16px 0;
}

.admin-card {
  margin-top: 28px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(86, 45, 38, 0.08);
}

.admin-card ul {
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.data-card {
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(86, 45, 38, 0.08);
  margin-bottom: 20px;
}

.data-card h3 {
  margin-bottom: 8px;
}

.data-card p {
  color: var(--muted);
  margin-bottom: 16px;
}

.field-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.field-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(164, 70, 60, 0.08);
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 600;
}

.site-footer {
  padding: 40px 0;
  border-top: 1px solid rgba(164, 70, 60, 0.08);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-content strong {
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
  transition-delay: var(--delay, 0s);
}

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

.app-main {
  padding: 32px 0 64px;
}

.panels {
  position: relative;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
  animation: panel-in 320ms ease both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.crumb-sep {
  color: var(--muted);
}

.panel-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  margin: 6px 0;
}

.panel-sub {
  color: var(--muted);
  font-size: 0.95rem;
}

.panel-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.overview-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(86, 45, 38, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}

.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 45px rgba(86, 45, 38, 0.12);
}

.overview-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--brand-soft);
  color: var(--brand-dark);
  margin-bottom: 4px;
}

.overview-title {
  font-weight: 600;
  color: var(--ink);
}

.overview-desc {
  font-size: 0.8rem;
  color: var(--muted);
}

.table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(86, 45, 38, 0.06);
  overflow-x: auto;
}

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

.data-table thead th {
  text-align: left;
  padding: 14px 18px;
  background: var(--bg-alt);
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.empty-row td {
  text-align: center;
  padding: 40px 18px;
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 992px) {
  .site-nav {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .brand-tagline {
    display: none;
  }

  .header-content {
    padding: 8px 14px;
    gap: 10px;
  }

  .header-left {
    gap: 10px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    padding: 4px;
    border-radius: 10px;
  }

  .brand-name {
    font-size: 0.88rem;
  }

  .nav-panel {
    top: calc(100% + 6px);
    left: 8px;
    right: 8px;
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }

  .site-nav {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 580px) {
  .header-content {
    padding: 8px 10px;
    gap: 6px;
  }

  .brand-name {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .search {
    padding: 6px 8px;
  }

  .search input {
    width: 65px;
    font-size: 0.8rem;
  }

  .user-meta {
    display: none;
  }

  .user-chip {
    padding: 3px;
  }

  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }

  .chip-action {
    padding: 5px 8px;
    font-size: 0.76rem;
  }

  .nav-toggle {
    padding: 6px 12px;
    font-size: 0.82rem;
    gap: 5px;
  }

  .nav-toggle .menu-icon {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 680px) {
  .panel-actions {
    width: 100%;
  }

  .panel-actions .btn {
    flex: 1;
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

.user-chip {
  font-family: inherit;
  cursor: pointer;
}

.chip-action {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--brand-dark);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.chip-action:hover {
  background: var(--brand);
  color: var(--white);
}

.table-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.table-state code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 6px;
}

.filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.88rem;
  color: var(--brand-dark);
}

.filter-banner strong {
  color: var(--brand-dark);
}

.detail-row > td {
  background: var(--bg-alt);
  padding: 0 !important;
  border-top: 1px solid var(--border);
}

.detail-content {
  padding: 16px 18px;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--brand-dark);
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-actions .mini-btn {
  margin-left: 0;
}

.detail-empty {
  color: var(--muted);
  font-style: italic;
  padding: 8px 0;
}

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

.mini-btn.primary:hover {
  background: var(--brand-dark);
}

.detail-table {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.detail-table thead th {
  background: transparent;
  color: var(--muted);
}

.mini-btn.is-open {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}

.link-btn {
  border: none;
  background: none;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.actions-col {
  text-align: right;
  white-space: nowrap;
}

.mini-btn {
  padding: 5px 10px;
  margin-left: 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--brand-dark);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.mini-btn:hover {
  background: var(--brand-soft);
}

.mini-btn.danger {
  color: #b02a22;
  border-color: rgba(176, 42, 34, 0.3);
}

.mini-btn.danger:hover {
  background: rgba(176, 42, 34, 0.1);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  background: rgba(46, 35, 32, 0.5);
  backdrop-filter: blur(3px);
  overflow-y: auto;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  width: min(640px, 100%);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: visible;
  animation: panel-in 240ms ease both;
}

.modal-sm {
  width: min(420px, 100%);
}

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

.modal-head h3 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.3rem;
}

.modal-close {
  border: none;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-form {
  padding: 22px 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.span-2 {
  grid-column: 1 / -1;
}

.form-field > span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.form-field input[type="checkbox"] {
  width: auto;
  align-self: flex-start;
}

.radio-group {
  display: flex;
  gap: 18px;
  padding: 8px 2px;
}

.radio-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

.radio-opt input[type="radio"] {
  width: auto;
  accent-color: var(--brand);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.form-field input[readonly] {
  background: var(--brand-soft);
  color: var(--brand-dark);
  cursor: default;
}

.empresa-link-box {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--brand-soft);
}

.empresa-links {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.empresa-link-row label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.empresa-link-input {
  display: flex;
  gap: 6px;
  align-items: center;
}

.empresa-link-box .empresa-link-input input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: text;
}

.empresa-link-input .mini-btn {
  margin-left: 0;
  white-space: nowrap;
  text-decoration: none;
}

.form-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(176, 42, 34, 0.1);
  color: #b02a22;
  font-size: 0.85rem;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--brand-dark);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition),
    visibility var(--transition);
  z-index: 200;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast-error {
  background: #b02a22;
}

@media (max-width: 680px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.date-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.date-filter input {
  border: none;
  background: transparent;
  font: inherit;
  color: var(--ink);
}

.date-filter input:focus {
  outline: none;
}

.panel-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.filter-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 240px;
  min-width: 200px;
}

.filter-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
}

.filter-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.ref-search {
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font: inherit;
  font-size: 0.85rem;
}

.ref-search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.matrix {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.matrix th,
.matrix td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
}

.matrix thead th {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
}

.matrix tbody th {
  text-align: left;
  white-space: nowrap;
  background: var(--white);
  font-weight: 600;
  color: var(--ink);
}

.matrix-cell {
  min-width: 130px;
}

.matrix-checks {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
}

.matrix-checks label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

.matrix-cell input[type="time"] {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  font: inherit;
  font-size: 0.8rem;
}

.combo {
  position: relative;
}

.combo-row {
  display: flex;
  gap: 6px;
}

.combo-row select {
  flex: 1;
  min-width: 0;
}

.combo-input {
  flex: 1;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
}

.combo-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.combo-btn {
  flex-shrink: 0;
  width: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--brand-dark);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.combo-btn:hover {
  background: var(--brand);
  color: var(--white);
}

.combo-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.combo-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.combo-item:hover {
  background: var(--brand-soft);
}

.combo-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

.back-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--brand-dark);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.back-btn:hover {
  background: var(--brand);
  color: var(--white);
}

.back-btn[hidden] {
  display: none;
}

@media (display-mode: standalone) {
  .header-content {
    padding-top: calc(16px + env(safe-area-inset-top));
  }

  .app-main {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .site-footer {
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
}

.image-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.image-field input[type="file"] {
  font-size: 0.85rem;
  color: var(--muted);
}

.image-preview {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.thumb-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thumb-wrap img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.data-table .thumb {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.thumb-btn {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 0;
}

.thumb-btn img {
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(24, 16, 14, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.permisos-grid {
  overflow-x: auto;
}

.permisos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.permisos-table th,
.permisos-table td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: center;
}

.permisos-table thead th {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.permisos-table tbody th {
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
}

.permisos-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.perm-col {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  justify-content: center;
}

.permisos-table thead input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.btn.is-active {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}

.data-table tbody tr.row-mine {
  background: rgba(164, 70, 60, 0.07);
}

.data-table tbody tr.row-mine td {
  font-weight: 600;
}

/* ===== Ventana exclusiva del Técnico de Grooming ===== */
.btn-block {
  width: 100%;
  justify-content: center;
}

.tech-assignments {
  margin-top: 6px;
}

.tech-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tech-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 26px rgba(86, 45, 38, 0.07);
}

.tech-card.is-pending {
  border-left: 5px solid var(--accent);
}

.tech-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.tech-card-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.05rem;
  color: var(--brand-dark);
  line-height: 1.25;
}

.tech-card-sub {
  margin-top: 4px;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}

.tech-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.tech-badge.is-pending {
  background: rgba(217, 138, 95, 0.18);
  color: #9a5a2c;
}

.tech-badge.is-progress {
  background: rgba(164, 70, 60, 0.16);
  color: var(--brand-dark);
}

.tech-badge.is-done {
  background: rgba(46, 125, 50, 0.14);
  color: #2e7d32;
}

.tech-badge.is-cancelled {
  background: rgba(120, 120, 120, 0.16);
  color: #5f5f5f;
}

.tech-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.tech-card-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.tech-card-meta dd {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.tech-card-notes {
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.tech-card-photos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tech-card-photos .thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.tech-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.tech-card-actions .btn {
  flex: 1;
  min-width: 130px;
  text-align: center;
}

.assignment-overlay {
  z-index: 1100;
}

.assignment-window {
  width: min(460px, 100%);
}

.assignment-head {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-bottom: none;
}

.assignment-head h3 {
  color: var(--white);
}

.assignment-head .modal-close {
  color: rgba(255, 255, 255, 0.85);
}

.assignment-head .modal-close:hover {
  color: var(--white);
}

.assignment-body {
  padding: 22px 24px;
}

.assignment-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  margin-bottom: 18px;
}

.assignment-paw {
  font-size: 2.4rem;
  line-height: 1;
}

.assignment-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  font-weight: 700;
}

.assignment-service {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.25rem;
  color: var(--brand-dark);
  line-height: 1.2;
  margin: 2px 0;
}

.assignment-pet {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.assignment-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-bottom: 16px;
}

.assignment-meta div {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.assignment-meta dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.assignment-meta dd {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.assignment-notes {
  font-size: 0.86rem;
  color: var(--ink);
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.assignment-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assignment-ok {
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
  font-weight: 600;
  font-size: 0.9rem;
}

.assignment-body .table-state {
  padding: 24px 12px;
}

.notify-channels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.notify-channels .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.notify-contact {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.assignment-photos {
  margin-bottom: 16px;
}

.assignment-photos-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 10px;
}

.assignment-photos-title span {
  font-weight: 400;
  color: var(--muted);
}

.assignment-photos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.assignment-photo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.assignment-photo-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.assignment-photo .image-preview img.thumb {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.assignment-photo .thumb-btn {
  width: 100%;
}

.assignment-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.assignment-photo-btn:hover {
  background: var(--brand);
  color: var(--white);
}

/* ---------- Comentario / fotos al cliente ---------- */
.assignment-comment,
.notify-comment {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assignment-comment textarea,
.notify-comment textarea {
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.assignment-comment textarea:focus,
.notify-comment textarea:focus {
  outline: none;
  border-color: var(--brand);
}

.assignment-comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notify-comment-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.notify-comment-label span,
.assignment-photos-title span {
  font-weight: 400;
  color: var(--muted);
}

.notify-photos {
  margin-bottom: 16px;
}

.notify-photos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.notify-photo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.notify-photo-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.notify-photo .thumb-btn {
  width: 100%;
}

.notify-photo .thumb-btn img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.cell-comment {
  display: inline-block;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.comment-sent {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .tech-card-meta,
  .assignment-meta {
    grid-template-columns: 1fr;
  }
}

/* ---------- Selector de empresa (SuperUsuario) ---------- */
#empresa-selector {
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
}

/* ---------- Tarjeta de datos de la empresa ---------- */
.empresa-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
}
.empresa-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.empresa-card-head h3 {
  margin: 0;
  font-family: var(--font-display, inherit);
}
.empresa-code {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}
.empresa-estado {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.empresa-estado.is-on {
  background: #e6f5ec;
  color: #1e6b3a;
}
.empresa-estado.is-off {
  background: #fbe9e7;
  color: #a4463c;
}
.empresa-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.empresa-card-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.empresa-card-grid span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.empresa-card-grid strong {
  font-size: 0.95rem;
}
.empresa-card-grid > div.span-all {
  grid-column: 1 / -1;
}
.empresa-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.empresa-card-actions a { text-decoration: none; }

/* ---------- Árbol en cascada (SuperUsuario) ---------- */
.tree-section { margin-top: 22px; }
.tree-section-title {
  margin: 0 0 10px;
  font-family: var(--font-display, inherit);
  font-size: 1.05rem;
}
#empresa-tree { padding: 6px 6px 10px; }
.tree-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
}
.tree-head .tree-meta { margin-left: auto; }
.tree {
  display: flex;
  flex-direction: column;
}
.tree-node { position: relative; }
.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
}
.tree-row:hover { background: rgba(164, 70, 60, 0.06); }
.tree-title { font-weight: 600; }
.tree-meta { color: var(--muted); font-size: 0.8rem; }
.tree-code {
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 8px;
  border-radius: 999px;
}
.tree-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--brand);
  width: 18px;
  text-align: center;
}
.tree-dot { color: var(--brand); font-size: 0.8rem; }
.tree-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.tree-badge.is-on { background: #e6f5ec; color: #1e6b3a; }
.tree-badge.is-off { background: #fbe9e7; color: #a4463c; }
.tree-children {
  margin-left: 22px;
  border-left: 2px solid rgba(164, 70, 60, 0.15);
  padding-left: 8px;
}
.tree-empresa > .tree-row { background: rgba(164, 70, 60, 0.04); margin-top: 4px; }
.tree-admin > .tree-row .tree-title { color: var(--brand-dark, var(--brand)); }
.tree-empty, .tree-loading {
  padding: 6px 12px;
  color: var(--muted);
  font-size: 0.82rem;
}
.tree-mascota > .tree-row { padding-top: 5px; padding-bottom: 5px; }

/* ---------- Selector de color (Parámetros Web) ---------- */
.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-row input[type="color"] {
  width: 46px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}
.color-row input[type="text"] { flex: 1; }
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease;
}
.swatch:hover { transform: scale(1.12); }

/* Calendario de Grooming */
.cal-card { padding: 16px; }
.cal-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 12px;
  text-align: center;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-dow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 4px;
}
.cal-cell {
  position: relative;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  padding: 6px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.cal-cell.cal-empty {
  border: none;
  background: transparent;
  cursor: default;
}
.cal-cell:not(.cal-empty):hover { background: var(--brand-soft); }
.cal-cell.has-items { background: #fdf3f1; border-color: rgba(164, 70, 60, 0.35); }
.cal-cell.has-solicitud { background: #fff3e2; border-color: #f0a24b; }
.cal-cell.has-solicitud .cal-num { color: #b45309; }
.cal-cell.is-today { outline: 2px solid var(--brand); }
.cal-cell.is-selected { background: var(--brand); }
.cal-cell.is-selected .cal-num { color: var(--white); }
.cal-num { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.cal-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brand);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cal-cell.is-selected .cal-badge { background: var(--white); color: var(--brand); }
.cal-badge-cita { background: #e07a2f; }
.cal-cell.is-selected .cal-badge-cita { background: var(--white); color: #e07a2f; }
.cal-day,
.cal-upcoming { margin-top: 16px; padding: 14px 16px; }
.cal-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.cal-day-head h3,
.cal-section-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.05rem;
  color: var(--brand-dark);
}
.cal-list { display: grid; gap: 8px; }
.cal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  flex-wrap: wrap;
}
.cal-item-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 140px; }
.cal-item-main strong { color: var(--brand-dark); }
.cal-item-main span { font-size: 0.8rem; color: var(--muted); }
.cal-item-date { font-weight: 700; color: var(--brand); font-size: 0.82rem; min-width: 88px; }
.cal-item-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cal-item-actions .mini-btn { margin-left: 0; }

.cal-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  vertical-align: middle;
}
.cal-tag-prox { background: #eef4ff; color: #1f4e8c; }
.cal-tag-cita { background: #ffe8d6; color: #b45309; }

.cal-day-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-day-head-actions .mini-btn { margin-left: 0; }
.cal-day-head-actions .mini-btn.is-cta {
  background: #fff3e2;
  border-color: #f0a24b;
  color: #b45309;
  font-weight: 700;
}
.cal-day-head-actions .mini-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Tarjetas de solicitud de cita ---------- */
.cita-card {
  border: 1px solid #f0a24b;
  border-radius: var(--radius-sm);
  background: #fffaf4;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.cita-card:last-child { margin-bottom: 0; }
.cita-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.cita-card-head strong { color: var(--brand-dark); }
.cita-estado {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffe8d6;
  color: #b45309;
  white-space: nowrap;
}
.cita-card-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }
.cita-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Mi Registro (admin de empresa) ---------- */
.mi-reg { display: flex; flex-direction: column; gap: 8px; }
.mi-reg-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.05rem;
  color: var(--brand-dark);
  margin: 10px 0 4px;
}
.mi-reg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}
.mi-reg-row {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.mi-reg-row dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 2px;
}
.mi-reg-row dd { margin: 0; font-size: 0.92rem; font-weight: 600; color: var(--ink); word-break: break-word; }
.mi-reg-note {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #f0a24b;
  border-radius: var(--radius-sm);
  background: #fff6ea;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mi-reg-note strong { color: #b45309; font-size: 0.92rem; }
.mi-reg-note-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .mi-reg-grid { grid-template-columns: 1fr; }
}

/* ---------- Publicar Catálogo ---------- */
.catalog-cta {
  margin-top: 16px;
  text-align: center;
}
.catalogo-window {
  width: min(760px, 100%);
}
.catalogo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.catalogo-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.catalogo-check input { width: auto; }
.catalogo-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}
.catalogo-send select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  max-width: 220px;
}
.catalogo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.catalogo-preview {
  display: flex;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 16px;
  padding: 18px;
}
.cat-card {
  width: min(420px, 100%);
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(46, 35, 32, 0.14);
  border: 1px solid var(--border);
}
.cat-head {
  background: var(--cat-brand, #a4463c);
  color: #fff;
  text-align: center;
  padding: 20px 20px 22px;
}
.cat-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  padding: 6px;
  margin: 0 auto 10px;
  display: block;
}
.cat-logo-fallback {
  font-size: 2.4rem;
  line-height: 84px;
}
.cat-head h3 {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.35rem;
  margin: 4px 0 2px;
  color: #fff;
}
.cat-head p { margin: 0; font-size: 0.85rem; opacity: 0.92; }
.cat-body { padding: 18px 20px; }
.cat-body h4 {
  font-family: "Fraunces", "Georgia", serif;
  color: var(--brand-dark);
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.cat-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border-bottom: 1px solid var(--border);
}
.cat-item:last-child { border-bottom: none; }
.cat-item:nth-child(odd) { background: rgba(0, 0, 0, 0.025); }
.cat-item-main { display: flex; flex-direction: column; gap: 2px; }
.cat-item-main strong { color: var(--ink); font-size: 0.95rem; }
.cat-item-main span { color: var(--muted); font-size: 0.8rem; }
.cat-price {
  font-weight: 700;
  color: var(--cat-brand, #a4463c);
  white-space: nowrap;
  font-size: 0.95rem;
}
.cat-foot {
  background: var(--cat-brand, #a4463c);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  padding: 12px;
  font-size: 0.82rem;
}

/* Estados de empresa */
.estado-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
  background: #eee;
  color: #555;
}
.estado-pendiente { background: #fff3cd; color: #7a5b00; }
.estado-aprobada { background: #d9f0e3; color: #1c6b46; }
.estado-rechazada { background: #f7d9d6; color: #8c1714; }

.politica-texto {
  max-height: 45vh;
  overflow-y: auto;
  white-space: pre-wrap;
  background: #fdfaf7;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

.date-filter select {
  border: none;
  background: transparent;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Totales acumulados (por empresa y por cliente) ---------- */
.totales-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.totales-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-alt);
}
.totales-kpi span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.totales-kpi strong {
  font-family: var(--font-display, inherit);
  font-size: 1.4rem;
  color: var(--brand-dark);
}
.totales-kpi.is-total {
  background: var(--brand-soft);
  border-color: rgba(164, 70, 60, 0.35);
}
.totales-kpi.is-total strong { color: var(--brand); }
.totales-subtitle {
  margin: 18px 0 10px;
  font-family: var(--font-display, inherit);
  font-size: 1rem;
  color: var(--brand-dark);
}
.totales-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.totales-table thead th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-alt);
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.totales-table tbody td {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
.totales-table th.num, .totales-table td.num { text-align: right; white-space: nowrap; }
.totales-table tbody td strong { color: var(--brand-dark); }
.totales-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.table-scroll { width: 100%; overflow-x: auto; }

.tree-total {
  font-size: 0.78rem;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.date-filter select:focus { outline: none; }

/* ---------- Consola vApps (SuperUsuario) ---------- */
.console-btn {
  font-weight: 700;
}
.console-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.console-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.console-app {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.console-app-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.console-app-icon {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 1.2rem;
}
.console-app-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink);
}
.console-app-code {
  font-size: 0.75rem;
  color: var(--muted);
}
.console-app-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}
.console-app-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.console-app-stats span {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--bg-alt);
  border-radius: 999px;
  padding: 4px 10px;
}
.console-app-stats strong {
  color: var(--ink);
}
.console-app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.console-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.85rem;
}
