/* ==========================================================================
   HARAS DE ÉLITE - HIGH PERFORMANCE EQUESTRIAN OS DESIGN SYSTEM
   Theme: Luxury Equestrian Obsidian & Racing Emerald with Champagne Gold Accents
   ========================================================================== */

:root {
  color-scheme: dark;
  /* Color Palette */
  --bg-core: #090d12;
  --bg-surface: rgba(18, 25, 36, 0.78);
  --bg-surface-elevated: rgba(26, 36, 51, 0.88);
  --bg-surface-hover: rgba(35, 48, 68, 0.95);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-gold: rgba(212, 175, 55, 0.45);

  --accent-gold: #d4af37;
  --accent-gold-hover: #e5c053;
  --accent-emerald: #10b981;
  --accent-emerald-dark: #064e3b;
  --accent-cyan: #38bdf8;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Typography */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-gold: #f3e4a9;

  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.65);
  --shadow-glow-gold: 0 0 20px rgba(212, 175, 55, 0.25);
  --shadow-glow-emerald: 0 0 20px rgba(16, 185, 129, 0.3);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-core);
  background-image: 
    radial-gradient(at 0% 0%, rgba(6, 78, 59, 0.22) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(212, 175, 55, 0.12) 0px, transparent 40%),
    radial-gradient(at 50% 100%, rgba(15, 23, 42, 0.6) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ==========================================================================
   HEADER COMPONENT
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1.2rem;
  background: rgba(9, 13, 18, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  gap: 0.85rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.brand-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: auto;
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.tenant-logo-img {
  height: 46px;
  max-height: 46px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
  transition: transform var(--transition-fast);
}

.tenant-logo-img:hover {
  transform: scale(1.04);
}

.brand-title {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #ffffff, var(--text-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  line-height: 1.15;
}

.brand-subtitle {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.view-toggle-group {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.view-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-btn:hover {
  color: var(--text-primary);
}

.view-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--accent-gold);
  border: 1px solid var(--border-medium);
}

/* User Session Management Bar (Login / Logout / Switcher) */
.user-session-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.user-role-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-role-selector:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #b38914);
  color: #0b0f14;
  font-weight: 700;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.user-meta-header {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.user-name-header {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 95px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 0.64rem;
  color: var(--accent-gold);
  font-weight: 600;
  text-transform: capitalize;
}

.role-select {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-family: var(--font-body);
  font-weight: 600;
  outline: none;
  cursor: pointer;
  padding-left: 0.15rem;
  max-width: 75px;
}

.role-select option {
  background: #111827;
  color: var(--text-primary);
  padding: 0.5rem;
}

.btn-session-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-session-action.btn-open-auth-modal {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.btn-session-action.btn-open-auth-modal:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-session-action.btn-logout {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.25);
}

.btn-session-action.btn-logout:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

/* Header Voice FAB */
.header-voice-fab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(16, 185, 129, 0.3));
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.header-voice-fab:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-glow-gold);
}

.mic-pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 1px solid var(--accent-gold);
  animation: pulse-ring 2s infinite ease-out;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ==========================================================================
   APP LAYOUT & DASHBOARD
   ========================================================================== */
.app-layout {
  padding: 1.5rem 2rem 5rem;
  max-width: 1750px;
  margin: 0 auto;
}

.calendar-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.85rem;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.65rem 1.15rem;
  box-shadow: var(--shadow-sm);
}

.controls-left-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.date-navigator {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.nav-arrow-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

.current-date-display {
  display: flex;
  flex-direction: column;
}

.date-day-name {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.date-full {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.today-chip-btn {
  padding: 0.28rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.today-chip-btn:hover {
  color: var(--accent-gold);
  border-color: var(--border-gold);
}

.calendar-view-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 0.2rem;
}

.view-granularity-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.view-granularity-btn:hover {
  color: var(--text-primary);
}

.view-granularity-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--accent-gold);
  border: 1px solid var(--border-medium);
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.btn-action-outline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.85rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  color: var(--accent-amber);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-action-outline:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--accent-amber);
  transform: translateY(-1px);
}

.btn-action-primary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(135deg, var(--accent-gold), #b38914);
  border: none;
  border-radius: var(--radius-md);
  color: #0b0f14;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-glow-gold);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-action-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   CALENDAR WITH SIDEBAR LAYOUT
   ========================================================================== */
.calendar-with-sidebar {
  display: block;
  width: 100%;
}

@media (max-width: 1200px) {
  .calendar-with-sidebar {
    grid-template-columns: 1fr;
  }
}

/* Calendar Board */
.calendar-board {
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: 75px repeat(auto-fit, minmax(220px, 1fr));
  background: rgba(15, 23, 34, 0.95);
  border-bottom: 1px solid var(--border-medium);
}

.time-col-header {
  padding: 1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-align: center;
  border-right: 1px solid var(--border-subtle);
}

.arena-col-header {
  padding: 0.9rem 1rem;
  border-right: 1px solid var(--border-subtle);
}

.arena-col-header:last-child {
  border-right: none;
}

.arena-header-title {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arena-header-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.arena-surface-tag {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: capitalize;
}

/* Calendar Grid Body */
.calendar-grid-body {
  max-height: 720px;
  overflow-y: auto;
}

.hour-row {
  display: grid;
  grid-template-columns: 75px repeat(auto-fit, minmax(220px, 1fr));
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  min-height: 86px;
}

.hour-cell {
  padding: 0.75rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  border-right: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
}

.drop-slot-cell {
  padding: 0.4rem;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: background var(--transition-fast);
  position: relative;
}

.drop-slot-cell:last-child {
  border-right: none;
}

.drop-slot-cell.empty-slot {
  cursor: pointer;
}

.drop-slot-cell.empty-slot:hover {
  background: rgba(255, 255, 255, 0.025);
}

.drop-slot-cell.drag-over {
  background: rgba(212, 175, 55, 0.12);
  border: 1px dashed var(--accent-gold);
}

/* Drag and Drop Booking Card */
.booking-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  user-select: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.booking-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-gold);
}

.booking-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
  transform: scale(0.98);
}

.booking-card.status-pending_reschedule {
  border-left-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.08);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.card-time-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.card-status-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.status-confirmed-pill {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.status-reschedule-pill {
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent-amber);
}

.card-student-name {
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-details-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
  font-size: 0.73rem;
  color: var(--text-secondary);
}

.card-horse-tag {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-gold);
  font-weight: 500;
}

.card-instructor-tag {
  color: var(--text-muted);
}

/* ==========================================================================
   COLLISION ALERTS SIDEBAR
   ========================================================================== */
.alerts-sidebar {
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.sidebar-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-title-group h3 {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.status-indicator-dot.alert-pulse {
  background: var(--accent-rose);
  animation: dot-pulse 1.8s infinite;
}

@keyframes dot-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.alerts-count-badge {
  background: rgba(244, 63, 94, 0.18);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.sidebar-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
}

.alert-item-card {
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: transform var(--transition-fast);
}

.alert-item-card:hover {
  transform: translateX(3px);
}

.alert-item-card.severity-danger {
  border-left: 3px solid var(--accent-rose);
  background: rgba(244, 63, 94, 0.06);
}

.alert-item-card.severity-warning {
  border-left: 3px solid var(--accent-amber);
  background: rgba(245, 158, 11, 0.06);
}

.alert-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.alert-card-msg {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

/* Quick Horse Workload Meters */
.horse-workload-widget {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.horse-workload-widget h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.85rem;
}

.workload-bars-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.horse-meter-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meter-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.meter-horse-name {
  font-weight: 600;
  color: var(--text-primary);
}

.meter-values {
  color: var(--text-muted);
}

.meter-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.meter-fill.normal { background: var(--accent-emerald); }
.meter-fill.warning { background: var(--accent-amber); }
.meter-fill.danger { background: var(--accent-rose); }

/* ==========================================================================
   MOBILE TIMELINE VIEW
   ========================================================================== */
.mobile-container {
  display: flex;
  justify-content: center;
}

.mobile-frame {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.mobile-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.greeting-subtitle {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.greeting-name {
  font-family: var(--font-primary);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.role-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
  margin-top: 0.25rem;
}

.mobile-request-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, var(--accent-gold), #b38914);
  border: none;
  border-radius: var(--radius-md);
  color: #0b0f14;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-glow-gold);
}

.timeline-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-header h3 {
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 700;
}

.timeline-date-chip {
  font-size: 0.75rem;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.timeline-track {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  padding-left: 1.25rem;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 3px;
  width: 2px;
  background: var(--border-medium);
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -1.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 2px solid var(--bg-core);
  box-shadow: var(--shadow-glow-gold);
}

.timeline-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-time {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.timeline-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   FLOATING ACTION BUTTON (MIC FAB)
   ========================================================================== */
.floating-voice-fab-container {
  position: fixed;
  bottom: 2rem;
  right: 2.2rem;
  z-index: 999;
}

.floating-voice-btn {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #10b981);
  border: none;
  color: #090d12;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(16, 185, 129, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.floating-voice-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(212, 175, 55, 0.55);
}

.fab-pulse-effect {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  animation: pulse-ring 2.4s infinite cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 6, 10, 0.82);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity var(--transition-normal);
  overflow-y: auto;
}

.modal-overlay.hidden,
.modal-backdrop.hidden {
  display: none !important;
  opacity: 0;
}

.modal-scrollable {
  overflow-y: auto;
  max-height: calc(88vh - 120px);
  padding-right: 0.35rem;
}

.modal-card {
  background: #0f1722;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: modal-appear 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin: auto;
}

@keyframes modal-appear {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title-group h3 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

.modal-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.06em;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   GLOBAL SELECT & DROPDOWN MENUS (DARK THEME WITH HIGH CONTRAST)
   ========================================================================== */
select,
.form-select,
.form-group select,
.datagrid-select {
  background-color: #111827 !important;
  color: #f8fafc !important;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.65rem 2.2rem 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85rem center !important;
  background-size: 14px 14px !important;
  color-scheme: dark !important;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

select:focus,
.form-select:focus,
.form-group select:focus,
.datagrid-select:focus {
  border-color: var(--accent-gold) !important;
  background-color: #162235 !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}

/* Dropdown Menu Options (Options list popup on click) */
select option,
.form-select option,
.form-group select option,
.datagrid-select option,
.role-select option,
option {
  background-color: #111827 !important;
  color: #f8fafc !important;
  padding: 0.75rem 0.9rem !important;
  font-size: 0.88rem !important;
  font-family: var(--font-body) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

select option:checked,
.form-select option:checked,
.form-group select option:checked,
option:checked {
  background: #1e293b !important;
  background-color: #1e293b !important;
  color: var(--accent-gold) !important;
  font-weight: 700 !important;
}

select option:hover,
select option:focus,
.form-select option:hover,
option:hover {
  background-color: #243247 !important;
  color: #ffffff !important;
}

select optgroup,
.form-select optgroup,
optgroup {
  background-color: #0b0f17 !important;
  color: var(--accent-gold) !important;
  font-weight: 700 !important;
  font-family: var(--font-primary) !important;
  padding: 0.5rem 0.6rem !important;
}

.field-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.alert-info-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 0.78rem;
  color: #bae6fd;
  line-height: 1.4;
}

.slot-validation-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.validation-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-cancel {
  padding: 0.65rem 1.25rem;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit {
  padding: 0.65rem 1.45rem;
  background: linear-gradient(135deg, var(--accent-gold), #b38914);
  border: none;
  border-radius: var(--radius-md);
  color: #0b0f14;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-glow-gold);
}

/* ==========================================================================
   VOICE ASSISTANT MODAL (STT / NLP)
   ========================================================================== */
.voice-modal-card {
  max-width: 520px;
}

.voice-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.voice-avatar-indicator {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(16, 185, 129, 0.3));
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-gold);
}

.wave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.wave-bars span {
  width: 3px;
  background: var(--accent-gold);
  border-radius: var(--radius-full);
  animation: wave-anim 1.2s infinite ease-in-out;
}

.wave-bars span:nth-child(1) { height: 8px; animation-delay: 0.1s; }
.wave-bars span:nth-child(2) { height: 16px; animation-delay: 0.3s; }
.wave-bars span:nth-child(3) { height: 22px; animation-delay: 0.5s; }
.wave-bars span:nth-child(4) { height: 14px; animation-delay: 0.2s; }
.wave-bars span:nth-child(5) { height: 7px; animation-delay: 0.4s; }

@keyframes wave-anim {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.voice-title-group {
  flex: 1;
}

.voice-title-group h3 {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  font-weight: 700;
}

.voice-status {
  font-size: 0.75rem;
  color: var(--accent-emerald);
}

.voice-transcript-box {
  min-height: 70px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.transcript-placeholder {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.82rem;
}

.voice-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.voice-text-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  outline: none;
  font-size: 0.85rem;
}

.voice-send-btn {
  padding: 0.65rem 1.25rem;
  background: var(--accent-emerald);
  border: none;
  border-radius: var(--radius-md);
  color: #0b0f14;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.voice-send-btn:hover {
  filter: brightness(1.1);
}

.voice-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.voice-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.75rem;
  font-size: 0.74rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.voice-chip:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold);
  border-color: var(--border-gold);
}

.voice-response-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 0.9rem;
}

.voice-response-card.error-card {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.35);
}

.response-icon {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.error-card .response-icon {
  color: var(--accent-rose);
}

.response-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}

.response-text {
  font-size: 0.84rem;
  color: var(--text-primary);
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  min-width: 300px;
  max-width: 440px;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 34, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.85rem;
  pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.toast.toast-success {
  border-left: 4px solid var(--accent-emerald);
}

.toast.toast-error {
  border-left: 4px solid var(--accent-rose);
}

.toast.toast-warning {
  border-left: 4px solid var(--accent-amber);
}

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   FASE 6: BILLING & BONOS MODULE STYLES
   ========================================================================== */
.billing-modal-card {
  max-width: 960px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.billing-modal-body {
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.billing-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(212, 175, 55, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.billing-hero-info h4 {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.35rem 0 0.5rem 0;
}

.billing-hero-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 650px;
}

.cron-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse-ring 1.8s infinite;
}

.btn-batch-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
  color: #ffffff;
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-batch-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  filter: brightness(1.1);
}

.batch-result-banner {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--accent-emerald);
  color: var(--text-primary);
  font-size: 0.85rem;
  animation: fadeIn 0.3s ease;
}

.batch-result-header {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-emerald);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.batch-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.batch-stat-card {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.batch-stat-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.batch-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.billing-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.billing-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.billing-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.billing-tab-btn.active {
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.billing-table th {
  background: rgba(26, 36, 51, 0.95);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-medium);
}

.billing-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.billing-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.pdf-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pdf-link-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.btn-renew-inline {
  padding: 0.35rem 0.75rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-renew-inline:hover {
  background: var(--accent-gold);
  color: #000000;
}

/* Billing Status Chips on Bookings */
.card-billing-pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.billing-bono {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.billing-unbilled {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.billing-invoiced {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

/* Card Quick Action Buttons */
.card-actions-row {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.btn-card-action {
  flex: 1;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-action-complete {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-action-complete:hover {
  background: var(--accent-emerald);
  color: #ffffff;
}

.btn-action-absence {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.btn-action-absence:hover {
  background: var(--accent-rose);
  color: #ffffff;
}

.btn-action-cancel {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.btn-action-cancel:hover {
  background: rgba(148, 163, 184, 0.3);
  color: #ffffff;
}

/* Mobile Bono Widget */
.mobile-bono-widget {
  margin-top: 1rem;
}

.mobile-bono-card-inner {
  background: rgba(26, 36, 51, 0.85);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-md);
}

.bono-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.bono-title {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bono-classes-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-gold);
}

.bono-progress-container {
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0.6rem 0;
}

.bono-progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.bono-bar-good {
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
}

.bono-bar-warn {
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-rose));
}

.bono-bar-empty {
  background: var(--accent-rose);
}

.bono-renewal-alert-box {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid var(--accent-rose);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bono-renewal-alert-box p {
  font-size: 0.78rem;
  color: #fda4af;
  line-height: 1.4;
}

.btn-renew-gateway {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--accent-rose), #be123c);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
  transition: all var(--transition-fast);
}

.btn-renew-gateway:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ==========================================================================
   FASE 7: MARCA DINÁMICA (WHITE-LABEL) & TENANT SETTINGS STYLES
   ========================================================================== */
.tenant-logo-img {
  height: 46px;
  max-height: 48px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
  transition: transform var(--transition-fast);
}

.tenant-modal-card {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.tenant-modal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  padding: 1.5rem;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .tenant-modal-grid {
    grid-template-columns: 1fr;
  }
}

.tenant-form-fields {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-picker-wrapper input[type="color"] {
  width: 44px;
  height: 38px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 2px;
}

.color-hex-text {
  flex: 1;
  padding: 0.6rem 0.8rem;
  background: rgba(15, 23, 34, 0.6);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.85rem;
}

.file-upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  border: 2px dashed rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-md);
  background: rgba(212, 175, 55, 0.04);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.file-upload-dropzone:hover, .file-upload-dropzone.dragover {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.08);
  color: var(--text-primary);
}

.file-upload-dropzone svg {
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.file-upload-dropzone p {
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.dropzone-file-name {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Right Column: Live White-Label Preview Card */
.tenant-preview-column h4 {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.brand-preview-card {
  background: rgba(18, 25, 36, 0.9);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
}

.preview-header-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}

.preview-logo-box {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.preview-logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-brand-titles {
  display: flex;
  flex-direction: column;
}

.preview-company-name {
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
}

.preview-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.preview-doc-sample {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.preview-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-doc-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

.preview-doc-cif {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-muted);
}

.preview-doc-body {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.preview-stamp-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.preview-stamp-line {
  width: 24px;
  height: 4px;
  background: var(--accent-gold);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   FASE 8: DIRECTORIO DE JINETES & PERFILES TÉCNICOS
   ========================================================================== */
.modal-card-xlarge {
  width: 95vw;
  max-width: 1080px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.riders-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.edit-badge {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold);
}

/* Filters & Search Bar */
.datagrid-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem;
  flex: 1;
  min-width: 240px;
  color: var(--text-muted);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.86rem;
  width: 100%;
  outline: none;
}

.filter-controls-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.datagrid-select {
  background-color: #111827;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 12px 12px;
  color-scheme: dark;
  transition: var(--transition-fast);
}

.datagrid-select:hover,
.datagrid-select:focus {
  border-color: var(--accent-gold);
  background-color: #162235;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

.datagrid-stats-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Table Design */
.datagrid-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(10, 14, 23, 0.4);
}

.datagrid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.datagrid-table thead {
  background: rgba(15, 23, 34, 0.95);
  border-bottom: 1px solid var(--border-medium);
  position: sticky;
  top: 0;
  z-index: 2;
}

.datagrid-table th {
  padding: 0.8rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.datagrid-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.datagrid-table tbody tr {
  transition: background var(--transition-fast);
}

.datagrid-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Rider Cell & Avatar */
.rider-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rider-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.rider-name-title {
  font-weight: 600;
  color: var(--text-primary);
}

/* Level Badges */
.riding-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge-iniciacion {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-medio {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-avanzado {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-competicion {
  background: rgba(212, 175, 55, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.1);
}

.level-jump-tag {
  font-size: 0.68rem;
  opacity: 0.85;
  font-weight: 500;
}

/* Metrics & License */
.metrics-pill {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.license-tag {
  font-family: monospace;
  font-size: 0.76rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Condition / Medical Badges */
.medical-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.medical-ok-chip {
  color: var(--text-muted);
  font-size: 0.74rem;
}

/* Edit Button */
.btn-edit-profile-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-edit-profile-action:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

/* Legend in Footer */
.datagrid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Edit Modal Layout */
.rider-preview-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.08), rgba(123, 17, 32, 0.12));
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.rider-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.rider-info-meta {
  flex: 1;
}

.rider-info-meta h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0;
}

.rider-role-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.rider-current-level-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Animal Welfare Compatibility Card */
.animal-welfare-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.welfare-icon {
  color: var(--accent-emerald);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.welfare-content h5 {
  margin: 0 0 0.25rem 0;
  font-size: 0.82rem;
  color: var(--accent-emerald);
  font-weight: 700;
}

.welfare-content p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Suffix inputs */
.input-with-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-suffix input {
  padding-right: 2.2rem;
}

.input-suffix {
  position: absolute;
  right: 0.8rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  pointer-events: none;
  font-weight: 600;
}

/* ==========================================================================
   CALENDAR GRANULARITY SWITCHER (DÍA / SEMANA / MES)
   ========================================================================== */
.calendar-view-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem;
  border-radius: var(--radius-full);
}

.view-granularity-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-granularity-btn svg {
  stroke: currentColor;
  transition: stroke var(--transition-fast);
}

.view-granularity-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.view-granularity-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(16, 185, 129, 0.18));
  color: var(--accent-gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 0 0 1px var(--border-gold);
}

.view-granularity-btn.active svg {
  stroke: var(--accent-gold);
}

/* ==========================================================================
   WEEK VIEW CALENDAR STYLES
   ========================================================================== */
.week-grid-header {
  display: grid;
  grid-template-columns: 75px repeat(7, minmax(130px, 1fr));
  background: rgba(15, 23, 34, 0.95);
  border-bottom: 1px solid var(--border-medium);
}

.week-col-header {
  padding: 0.85rem 0.6rem;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.week-col-header:last-child {
  border-right: none;
}

.week-col-header:hover {
  background: rgba(212, 175, 55, 0.08);
}

.week-col-header.is-today {
  background: rgba(212, 175, 55, 0.12);
  border-bottom: 2px solid var(--accent-gold);
}

.week-day-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.week-col-header.is-today .week-day-title {
  color: var(--accent-gold);
}

.week-day-num {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.week-col-header.is-today .week-day-num {
  color: var(--text-gold);
}

.week-badge-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.week-badge-pill.has-classes {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hour-row.week-row {
  display: grid;
  grid-template-columns: 75px repeat(7, minmax(130px, 1fr));
}

.drop-slot-cell.week-slot {
  min-height: 86px;
}

/* Compact Card for Week View */
.booking-card.compact-card {
  padding: 0.45rem 0.55rem;
  gap: 0.2rem;
}

.booking-card.compact-card .card-student-name {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.booking-card.compact-card .card-details-row {
  font-size: 0.68rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   MONTH VIEW CALENDAR STYLES
   ========================================================================== */
.month-grid-wrapper {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.month-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: rgba(15, 23, 34, 0.95);
  border-bottom: 1px solid var(--border-medium);
}

.month-header-col {
  padding: 0.85rem 0.5rem;
  text-align: center;
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-right: 1px solid var(--border-subtle);
}

.month-header-col:last-child {
  border-right: none;
}

.month-grid-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(115px, 1fr);
  background: rgba(9, 13, 18, 0.5);
}

.month-day-cell {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 115px;
  background: transparent;
  transition: background var(--transition-fast);
  cursor: pointer;
}

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

.month-day-cell:hover {
  background: rgba(255, 255, 255, 0.03);
}

.month-day-cell.other-month {
  background: rgba(0, 0, 0, 0.3);
  opacity: 0.4;
}

.month-day-cell.is-today {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border-gold);
}

.month-day-cell.is-selected {
  outline: 2px solid var(--accent-gold);
  outline-offset: -2px;
}

.month-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.month-day-num {
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.month-day-cell.is-today .month-day-num {
  color: var(--accent-gold);
  font-weight: 800;
}

.month-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.month-day-bookings {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
  max-height: 95px;
}

.month-booking-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.45rem;
  background: rgba(26, 36, 51, 0.9);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.month-booking-chip:hover {
  transform: translateX(2px);
  border-color: var(--accent-gold);
  background: rgba(35, 48, 68, 0.95);
}

.month-booking-chip.discipline-salto {
  border-left-color: var(--accent-gold);
}

.month-booking-chip.discipline-doma {
  border-left-color: var(--accent-emerald);
}

.month-booking-chip.discipline-cross {
  border-left-color: var(--accent-amber);
}

.month-booking-chip.status-reschedule {
  border-left-color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.08);
}

.chip-time {
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.66rem;
  flex-shrink: 0;
}

.chip-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-horse {
  color: var(--text-muted);
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.month-more-indicator {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 600;
  padding: 0.1rem;
}

/* ==========================================================================
   BOOKING DETAILS MODAL
   ========================================================================== */
.booking-details-card {
  max-width: 620px;
  width: 95%;
}

.modal-title-with-badge {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.modal-icon-badge.gold-badge {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
}

.booking-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

@media (max-width: 600px) {
  .booking-details-grid {
    grid-template-columns: 1fr;
  }
}

.detail-section-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.detail-section-title svg {
  stroke: var(--accent-gold);
}

.detail-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
}

.detail-label {
  color: var(--text-secondary);
}

.detail-value {
  color: var(--text-primary);
  font-weight: 600;
}

.detail-value.highlight-gold {
  color: var(--text-gold);
}

.detail-value.highlight-emerald {
  color: var(--accent-emerald);
}

.billing-badge-in-details {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.billing-badge-in-details.unbilled {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.billing-badge-in-details.deducted_from_bono {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.billing-badge-in-details.invoiced {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* ==========================================================================
   FASE 9: GESTIÓN DE BONOS DE CLASES & DIRECCIONES TÉCNICAS (RBAC)
   ========================================================================== */

.bono-management-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.bono-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.bono-filter-btn {
  padding: 0.35rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bono-filter-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.bono-filter-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(16, 185, 129, 0.2));
  color: var(--accent-gold);
  box-shadow: inset 0 0 0 1px var(--border-gold);
}

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

.bono-section-header {
  margin-bottom: 1rem;
}

.bono-section-header h4 {
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.bono-section-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.section-title-with-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-shield-badge {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: var(--accent-rose);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Bono Plans Grid & Cards */
.bono-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.bono-plan-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.bono-plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md), 0 0 15px rgba(212, 175, 55, 0.1);
}

.bono-plan-card.category-direccion_tecnica {
  border-top: 3px solid var(--accent-gold);
}

.bono-plan-card.category-bono_clases {
  border-top: 3px solid var(--accent-emerald);
}

.bono-plan-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.plan-category-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
}

.plan-category-badge.badge-category-clases {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.plan-category-badge.badge-category-direccion {
  background: rgba(212, 175, 55, 0.18);
  color: var(--text-gold);
  border: 1px solid var(--border-gold);
}

.plan-price-display {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.plan-price-display .price-curr {
  font-size: 0.85rem;
  color: var(--accent-gold);
}

.bono-plan-title {
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-top: 0.4rem;
}

.bono-plan-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.bono-plan-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.bono-plan-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.btn-card-assign {
  width: 100%;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-card-assign:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(16, 185, 129, 0.15));
  border-color: var(--border-gold);
  color: var(--text-gold);
}

/* Professor Permissions Manager */
.professor-permissions-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 2rem;
}

.professor-permissions-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.professor-perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  transition: border-color var(--transition-fast);
}

.professor-perm-row:hover {
  border-color: var(--border-medium);
}

.prof-info-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.prof-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(212, 175, 55, 0.2));
  border: 1px solid var(--border-subtle);
  color: var(--accent-gold);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prof-name-text {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

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

.btn-toggle-perm {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-toggle-perm.perm-granted {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.35);
}

.btn-toggle-perm.perm-granted:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.35);
}

.btn-toggle-perm.perm-revoked {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-toggle-perm.perm-revoked:hover {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.35);
}

/* Modals sizing */
.create-plan-modal-card,
.assign-bono-modal-card {
  max-width: 580px;
  width: 95%;
}

/* ==========================================================================
   PORTAL DE ACCESO / INICIO Y CIERRE DE SESIÓN (RBAC)
   ========================================================================== */
.modal-auth-session {
  max-width: 900px;
  width: 95%;
  max-height: calc(100vh - 2.5rem);
  height: auto;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(180deg, #111827 0%, #0b0f17 100%);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 45px rgba(212, 175, 55, 0.12);
  margin: auto;
}

.modal-auth-session .modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.6rem;
  margin-bottom: 0 !important;
  background: rgba(17, 24, 39, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-auth-session .modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.modal-auth-session .modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.25;
}

.modal-auth-session .modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
  line-height: 1.35;
}

.modal-auth-session .modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
}

.modal-auth-session .modal-close-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.5);
  transform: scale(1.05);
}

.auth-modal-logo-wrapper {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--accent-gold);
  overflow: hidden;
  background: rgba(26, 54, 93, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
  flex-shrink: 0;
  padding: 4px;
}

.auth-modal-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto;
  padding: 1.35rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.4) rgba(0, 0, 0, 0.2);
}

.auth-modal-body::-webkit-scrollbar {
  width: 7px;
}

.auth-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.auth-modal-body::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.35);
  border-radius: 4px;
}

.auth-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.6);
}

/* Gate Banner for Unauthenticated Visitors */
.auth-gate-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.16) 0%, rgba(212, 175, 55, 0.05) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin: 0.75rem 1.6rem 0.25rem 1.6rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.auth-gate-banner .gate-banner-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.auth-gate-banner .gate-banner-text {
  font-size: 0.86rem;
  color: #fef08a;
  line-height: 1.4;
}

.auth-gate-banner .gate-banner-text strong {
  color: #fff;
}

/* Privacy Banner for Students */
.auth-privacy-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.03) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-left: 4px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
}

.auth-privacy-banner .privacy-banner-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.auth-privacy-banner .privacy-banner-text {
  font-size: 0.84rem;
  color: #a7f3d0;
  line-height: 1.45;
}

.auth-privacy-banner .privacy-banner-text strong {
  color: #fff;
}

/* Student Guardian Box in Profile Card */
.auth-student-guardian-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: #d1d5db;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-student-guardian-box .guardian-title {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.auth-student-guardian-box .guardian-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Current Session Status Box */
.current-session-status-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-lg);
  gap: 1rem;
}

.session-status-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.session-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.session-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.session-status-dot.offline {
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

.session-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.session-user-text {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.btn-logout-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-logout-danger:hover {
  background: rgba(244, 63, 94, 0.3);
  color: #fff;
  border-color: rgba(244, 63, 94, 0.6);
  transform: translateY(-1px);
}

/* Auth Filter Tabs */
.auth-filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.8rem;
  flex-wrap: wrap;
}

.auth-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.auth-filter-btn.active {
  background: rgba(212, 175, 55, 0.18);
  color: var(--accent-gold);
  border-color: rgba(212, 175, 55, 0.4);
}

/* Profiles Grid */
.auth-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.auth-profile-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}

.auth-profile-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.auth-profile-card.active-session-card {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}

.auth-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.auth-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.auth-card-avatar.role-admin {
  background: linear-gradient(135deg, #d4af37, #996515);
  color: #0b0f14;
}

.auth-card-avatar.role-director_tecnico {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
}

.auth-card-avatar.role-profesor {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.auth-card-avatar.role-alumno {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
}

.auth-card-info {
  flex: 1;
  min-width: 0;
}

.auth-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-card-role-title {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.auth-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.3;
}

.btn-open-session-card {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-open-session-card.btn-switch-to {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold);
  border-color: rgba(212, 175, 55, 0.3);
}

.btn-open-session-card.btn-switch-to:hover {
  background: var(--accent-gold);
  color: #0b0f14;
  border-color: var(--accent-gold);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-open-session-card.btn-active-session {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
  cursor: default;
}

.auth-modal-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.75rem;
  background: rgba(8, 12, 18, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-footer-security-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   PORTAL DE ACCESO & GESTIÓN DE PERMISOS (RBAC DELEGATION)
   ========================================================================== */

/* Permissions Row in Profile Cards */
.auth-card-perms-row {
  margin: 0.75rem 0 0.6rem;
  padding: 0.65rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-perms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.auth-perms-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.auth-perms-badge-count {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold);
  font-weight: 600;
}

.auth-perms-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.perm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.perm-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.perm-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b7280;
  transition: all 0.2s ease;
}

.perm-pill.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.perm-pill.active .pill-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.perm-pill.active:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.perm-pill.active:hover .pill-dot {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

.perm-pill:not(.active):hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.perm-pill:not(.active):hover .pill-dot {
  background: var(--accent-gold);
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.8);
}

/* Card Actions Row: Ceder Permisos Button & Session Button */
.auth-card-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-card-manage-perms {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-manage-perms:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
}

.btn-card-edit-profile {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-card-edit-profile:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #93c5fd;
  transform: translateY(-1px);
}

.edit-rider-credentials-box {
  background: rgba(212, 175, 55, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.15rem;
}

.credentials-box-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.25);
}

.auth-card-actions-row .btn-open-session-card {
  flex: 1;
}

/* --------------------------------------------------------------------------
   MODAL DE GESTIÓN Y DELEGACIÓN DE PERMISOS (RBAC)
   -------------------------------------------------------------------------- */
.modal-manage-permissions {
  max-width: 620px;
  width: 95%;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(212, 175, 55, 0.15);
}

.perm-modal-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), #996515);
  color: #0b0f14;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.perm-user-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.08), rgba(0, 0, 0, 0.3));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.perm-user-name {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-right: 0.6rem;
}

.perm-security-tag {
  font-size: 0.7rem;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(212, 175, 55, 0.25);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.permissions-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.permission-item-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.permission-item-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(212, 175, 55, 0.25);
}

.permission-item-row.is-active {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.3);
}

.perm-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.perm-item-info {
  flex: 1;
  min-width: 0;
}

.perm-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.perm-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.btn-perm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-perm-toggle:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.toggle-switch-track {
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  position: relative;
  transition: background-color 0.2s ease;
  display: inline-block;
}

.toggle-switch-thumb {
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-perm-toggle.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.btn-perm-toggle.active .toggle-switch-track {
  background: #10b981;
}

.btn-perm-toggle.active .toggle-switch-thumb {
  transform: translateX(16px);
  background: #ffffff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   MULTI-TENANT ARCHITECTURE & BRAND SWITCHER
   ========================================================================== */
.tenant-switcher-container {
  position: relative;
  display: inline-block;
  margin-left: 0.75rem;
}

.tenant-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.tenant-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.tenant-switcher-locked {
  cursor: default !important;
  opacity: 0.95;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.tenant-switcher-locked:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: none !important;
}

.badge-tenant-locked {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--accent-gold, #D4AF37);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-sm, 4px);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tenant-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px currentColor;
}

.tenant-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: rgba(18, 20, 26, 0.96);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.15);
  backdrop-filter: blur(20px);
  z-index: 1010;
  overflow: hidden;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tenant-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tenant-dropdown-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.btn-new-tenant-quick {
  background: transparent;
  border: none;
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.btn-new-tenant-quick:hover {
  background: rgba(212, 175, 55, 0.15);
}

.tenant-dropdown-list {
  padding: 0.4rem;
  max-height: 260px;
  overflow-y: auto;
}

.tenant-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  color: var(--text-secondary);
}

.tenant-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.tenant-dropdown-item.active {
  background: rgba(212, 175, 55, 0.12);
  color: #fff;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.tenant-item-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tenant-color-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tenant-item-name {
  font-size: 0.82rem;
  font-weight: 600;
}

.tenant-item-active-pill {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  background: var(--accent-gold);
  color: #000;
  font-weight: 700;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   PENDING APPROVALS BUTTON & BADGE
   ========================================================================== */
.btn-pending-approvals {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-weight: 600;
  font-size: 0.76rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-pending-approvals:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.pending-icon-pulse {
  display: inline-block;
  animation: pendingPulse 1.5s infinite;
}

@keyframes pendingPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

.pending-badge-counter {
  background: #f59e0b;
  color: #000000;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.btn-action-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-action-warning:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
}

/* ==========================================================================
   AUTH TABS & CREDENTIAL / REGISTRATION FORMS
   ========================================================================== */
.auth-nav-tabs {
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  background: rgba(8, 12, 18, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 1.75rem;
}

.auth-nav-tab-btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  white-space: nowrap;
}

.auth-nav-tab-btn svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.auth-nav-tab-btn:focus {
  outline: none;
}

.auth-nav-tab-btn:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 1px;
}

.auth-nav-tab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.auth-nav-tab-btn:hover svg {
  color: #fff;
}

.auth-nav-tab-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(212, 175, 55, 0.08) 100%);
  border-color: var(--accent-gold);
  color: #fff;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-weight: 700;
}

.auth-nav-tab-btn.active svg {
  color: var(--accent-gold);
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.5));
}

.auth-pane {
  padding: 0.25rem 0 0.5rem;
  animation: fadeIn 0.2s ease-in-out;
}

.auth-pane-header {
  margin-bottom: 1.25rem;
}

.auth-pane-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.auth-pane-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-credential-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-icon .form-input {
  padding-left: 2.6rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.auth-pane-switch-hint {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--accent-gold);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: var(--transition-fast);
}

.link-btn:hover {
  color: #fff;
}

/* Feedback alert box */
.auth-feedback-box {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.auth-feedback-box.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.auth-feedback-box.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
}

.auth-feedback-box.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.homologation-info-box {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}

.homologation-info-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.homologation-info-content {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.badge-pending-text {
  color: #f59e0b;
  font-weight: 700;
}

/* ==========================================================================
   PENDING APPROVALS MODAL & CARDS
   ========================================================================== */
.modal-pending-approvals {
  max-width: 820px;
  width: 95vw;
}

.pending-approvals-summary-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  color: #f59e0b;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.pending-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pending-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  gap: 0.9rem;
  transition: all var(--transition-fast);
}

.pending-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(245, 158, 11, 0.35);
}

.pending-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pending-user-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pending-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.pending-user-details h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.pending-user-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pending-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
}

.pending-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pending-metric-pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.pending-notes-box {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid #f59e0b;
}

.pending-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-approve-homologate {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-approve-homologate:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-reject-homologate {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-reject-homologate:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   HOMOLOGATION / APPROVAL MODAL & DISCIPLINES CHECKBOXES
   ========================================================================== */
.modal-approve-card {
  max-width: 680px;
  width: 95vw;
}

.applicant-summary-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.applicant-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.applicant-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.applicant-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.applicant-tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.app-tag {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.modalities-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.modality-checkbox-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.modality-checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.modality-card-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.modality-icon {
  font-size: 1.2rem;
}

.modality-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.modality-checkbox-card input[type="checkbox"]:checked + .modality-card-inner {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.modality-checkbox-card input[type="checkbox"]:checked + .modality-card-inner .modality-name {
  color: #ffffff;
}

/* Modality Tag Pills in Riders Table */
.modality-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-gold);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.25);
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Status Pending Badge in Tables */
.status-pill-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Color picker row */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-color-picker {
  -webkit-appearance: none;
  border: none;
  width: 44px;
  height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
}

.form-color-picker::-webkit-color-swatch {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.color-preview-code {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   HÍPICA & CUADRAS MODULE DESIGN SYSTEM
   ========================================================================== */

/* Button in dashboard actions */
.btn-hipica-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(16, 185, 129, 0.12));
  border: 1px solid var(--accent-gold);
  color: var(--text-gold);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
  transition: all var(--transition-normal);
}

.btn-hipica-highlight:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(16, 185, 129, 0.25));
  border-color: var(--accent-gold-hover);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

.hipica-nav-icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* Modal sizing */
.modal-hipica-wide {
  width: 95vw;
  max-width: 1260px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: rgba(14, 20, 29, 0.96);
  border: 1px solid var(--border-gold);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(212, 175, 55, 0.2);
}

.hipica-header {
  padding: 1.25rem 1.8rem;
  background: rgba(9, 13, 18, 0.7);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.hipica-crest-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #7B1120, #d4af37);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.hipica-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tenant-badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
}

/* Header KPI Chips */
.hipica-quick-kpis {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.hipica-kpi-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hipica-kpi-chip .kpi-icon {
  font-size: 1rem;
}

.hipica-kpi-chip .kpi-val {
  color: var(--text-primary);
  font-weight: 700;
}

/* Nav Tabs */
.hipica-nav-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1.8rem;
  background: rgba(9, 13, 18, 0.5);
  border-bottom: 1px solid var(--border-subtle);
}

.hipica-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hipica-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.hipica-tab-btn.active {
  color: var(--text-gold);
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--border-gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.18);
}

.hipica-tab-btn .tab-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: inherit;
}

.hipica-modal-body {
  padding: 1.5rem 1.8rem;
  overflow-y: auto;
  flex: 1;
}

/* Tab panes */
.hipica-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hipica-tab-pane.hidden {
  display: none;
}

/* Toolbar & Filters */
.hipica-pane-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.box-filter-group {
  display: flex;
  gap: 0.4rem;
}

.box-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.box-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.box-filter-btn.active {
  background: var(--accent-emerald-dark);
  border-color: var(--accent-emerald);
  color: #a7f3d0;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   CUADRAS & BOXES GRID
   ========================================================================== */
.hipica-boxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.hipica-box-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  transition: all var(--transition-normal);
}

.hipica-box-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Status variants */
.hipica-box-card.status-occupied {
  border-left: 4px solid var(--accent-cyan);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.06), rgba(18, 25, 36, 0.85));
}

.hipica-box-card.status-vacant {
  border-left: 4px solid var(--accent-emerald);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(18, 25, 36, 0.85));
}

.hipica-box-card.status-cleaning {
  border-left: 4px solid var(--accent-amber);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(18, 25, 36, 0.85));
}

.hipica-box-card.status-maintenance {
  border-left: 4px solid var(--accent-rose);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.06), rgba(18, 25, 36, 0.85));
}

.box-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.box-number-badge {
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.box-status-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-occupied .box-status-tag {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-vacant .box-status-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-cleaning .box-status-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-maintenance .box-status-tag {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.box-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 70px;
}

.box-horse-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.box-horse-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7B1120, #450a0a);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-gold);
  flex-shrink: 0;
}

.box-horse-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.92rem;
}

.box-vacant-msg {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
}

.box-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.6rem;
}

.bedding-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.box-card-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-box-action {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-box-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-box-clean {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.btn-box-clean:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

/* ==========================================================================
   ALIMENTACIÓN & DIETAS TAB
   ========================================================================== */
.diets-layout-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .diets-layout-grid {
    grid-template-columns: 1fr;
  }
}

.diet-horse-selector-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.selector-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.horse-chips-scroll {
  display: flex;
  gap: 0.5rem;
}

.horse-chip-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.horse-chip-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.horse-chip-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--border-gold);
  color: var(--text-gold);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.2);
}

/* Active Diet Card */
.diet-card-main {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
}

.diet-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.diet-horse-title-group h3 {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  color: var(--text-primary);
}

.diet-horse-title-group span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.rations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

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

.ration-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ration-time-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.ration-kg-display {
  font-family: var(--font-primary);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ration-type-display {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.forage-section-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 78, 59, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forage-info-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.forage-icon {
  font-size: 1.6rem;
}

.forage-type-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #a7f3d0;
}

.forage-kg-badge {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-weight: 800;
  color: #10b981;
}

.diet-supplements-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.supplements-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.supplements-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.supplement-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}

.diet-instructions-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Barn Feed Sheet (Right Column) */
.barn-feed-sheet-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.feed-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.8rem;
}

.sheet-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sheet-icon {
  font-size: 1.4rem;
}

.sheet-title {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sheet-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-print-sheet {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-print-sheet:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.feed-totals-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.feed-total-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feed-total-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.feed-total-val {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.feed-distribution-schedule {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.distrib-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.distrib-step {
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--accent-gold);
  padding: 0.5rem 0.8rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.step-time {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.special-feed-notes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.special-feed-notes-list li {
  background: rgba(245, 158, 11, 0.08);
  border-left: 2px solid var(--accent-amber);
  padding: 0.4rem 0.6rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ==========================================================================
   SERVICIOS EXTRAS & PUPILAJE TAB
   ========================================================================== */
.extras-top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.banner-title {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  color: var(--text-primary);
}

.banner-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.banner-actions {
  display: flex;
  gap: 0.6rem;
}

.daily-progress-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.progress-pct-text {
  color: var(--accent-gold);
  font-weight: 700;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-gold));
  border-radius: var(--radius-full);
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Checklist Table */
.extras-checklist-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
}

.extras-checklist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.extras-checklist-table th {
  background: rgba(9, 13, 18, 0.6);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.extras-checklist-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.extras-checklist-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.btn-toggle-log {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-toggle-log:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-toggle-log.completed {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--accent-emerald);
  color: #6ee7b7;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.btn-toggle-log.completed:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--accent-rose);
  color: #fda4af;
}

/* Services Catalog Cards */
.services-catalog-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.catalog-header h4 {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.catalog-header .catalog-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.services-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.service-catalog-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.srv-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.srv-icon {
  font-size: 1.4rem;
}

.srv-price {
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.srv-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.srv-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ==========================================================================
   CUADRAS: VIEW SWITCHER, PROPIETARIOS Y PLANILLA GENERAL DE OCUPACIÓN
   ========================================================================== */

/* View Switcher Controls */
.box-view-switcher {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.2rem;
  gap: 0.2rem;
}

.view-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-switch-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.view-switch-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Owner & Horse Meta on Box Cards */
.box-owner-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  margin-top: 0.35rem;
}

.box-owner-name-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.box-owner-icon {
  font-size: 0.9rem;
}

.box-owner-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-gold);
}

.box-owner-phone {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  transition: color var(--transition-fast);
}

.box-owner-phone:hover {
  color: var(--accent-emerald);
}

.box-horse-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 0.2rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Planilla / Matriz General de Control de Boxes */
.hipica-boxes-table-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.table-card-title {
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.table-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.table-summary-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge-kpi {
  font-size: 0.74rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.badge-kpi strong {
  color: var(--text-primary);
}

.badge-kpi-occupied {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
  color: #7dd3fc;
}

.badge-kpi-vacant {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
}

.badge-kpi-rate {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.08);
  color: var(--text-gold);
}

.hipica-occupancy-table {
  width: 100%;
  border-collapse: collapse;
}

.hipica-occupancy-table th {
  background: rgba(9, 13, 18, 0.6);
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-medium);
  text-align: left;
}

.hipica-occupancy-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  color: var(--text-primary);
  vertical-align: middle;
}

.hipica-occupancy-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.box-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.box-status-pill.status-occupied {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--accent-cyan);
  color: #38bdf8;
}

.box-status-pill.status-vacant {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--accent-emerald);
  color: #34d399;
}

.box-status-pill.status-cleaning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--accent-amber);
  color: #fbbf24;
}

.box-status-pill.status-maintenance {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid var(--accent-rose);
  color: #f87171;
}

/* Modal Box & Capacity Custom */
.modal-box-custom {
  max-width: 680px;
  width: 95vw;
}

.form-section-title {
  display: flex;
  align-items: center;
  font-family: var(--font-primary);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1rem 0 0.65rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.capacity-info-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.capacity-info-box code {
  color: var(--text-gold);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
}

.capacity-stats-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.cap-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cap-pill .cap-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.cap-pill .cap-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.15rem;
}

.cap-pill.cap-occupied .cap-num {
  color: #38bdf8;
}

.cap-pill.cap-vacant .cap-num {
  color: #34d399;
}

/* Dual-Mode Horse Assignment in Box Modal */
.horse-mode-segmented-control {
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.85rem;
}

.btn-horse-mode {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-horse-mode:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.btn-horse-mode.active {
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-horse-mode svg {
  stroke: currentColor;
}

.horse-assign-pane {
  animation: fadeInPane 0.2s ease-out;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.new-horse-highlight-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(26, 35, 50, 0.6) 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.form-input-gold {
  border-color: rgba(212, 175, 55, 0.4) !important;
  background: rgba(0, 0, 0, 0.5) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.form-input-gold:focus {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2) !important;
}

.new-horse-badge-hint {
  font-size: 0.74rem;
  color: var(--accent-gold);
  line-height: 1.35;
  background: rgba(212, 175, 55, 0.1);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(212, 175, 55, 0.25);
}

/* ==========================================================================
   GESTIÓN DE BONOS, EDICIÓN/ELIMINACIÓN Y CADUCIDADES
   ========================================================================== */

/* Plan Card Action Group */
.plan-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.plan-actions-group .btn-card-assign {
  flex: 1;
  margin: 0;
}

.btn-card-edit,
.btn-card-delete {
  padding: 0.52rem 0.65rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.btn-card-edit:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--border-gold);
  color: var(--text-gold);
  transform: translateY(-1px);
}

.btn-card-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  transform: translateY(-1px);
}

/* Bono Plan Validity Indicator */
.bono-plan-validity-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
  margin-top: 0.35rem;
}

/* Quick Validity Chips in Modals */
.quick-validity-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.quick-chip-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 0.2rem;
}

.btn-quick-date {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 0.22rem 0.55rem;
  font-size: 0.73rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-quick-date:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--border-gold);
  color: var(--text-gold);
}

.btn-quick-date.active {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--accent-gold);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* Expiration Status Badges */
.pill-vigente {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pill-por-vencer {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  animation: pulseAmber 2s infinite ease-in-out;
}

.pill-vencido {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pill-agotado {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}

.pill-cancelado {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(100, 116, 139, 0.4);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: line-through;
}

@keyframes pulseAmber {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* Action Buttons in Tables */
.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.btn-table-action {
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-table-action.edit:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--border-gold);
  color: var(--text-gold);
}

.btn-table-action.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Danger Delete Button in Modal */
.btn-delete-danger {
  padding: 0.55rem 1rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-md);
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-delete-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

/* Edit Assigned Bono Modal Card sizing */
.edit-assigned-bono-modal-card {
  max-width: 580px;
  width: 90%;
}

/* ==========================================================================
   AUTH, LOGIN & MINOR STUDENT / GUARDIAN PROFILE STYLES
   ========================================================================== */

/* Header Login / Register Button */
.btn-header-login {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b8860b 100%);
  color: #000;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.25);
  transition: all var(--transition-fast);
}

.btn-header-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
  filter: brightness(1.1);
}

/* Age Calculation Badge */
.age-calculated-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  letter-spacing: 0.02em;
}

.age-calculated-badge.is-minor {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
  animation: pulse 2s infinite;
}

/* Minor Student Toggle Card */
.minor-toggle-card {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin: 0.5rem 0 1rem;
  transition: all var(--transition-fast);
}

.minor-toggle-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(15, 23, 42, 0.75);
}

.minor-toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.minor-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: #f59e0b;
  cursor: pointer;
}

.minor-toggle-text strong {
  display: block;
  font-size: 0.88rem;
  color: #f59e0b;
  margin-bottom: 0.2rem;
}

.minor-toggle-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
}

/* Guardian / Representative Profile Section */
.guardian-profile-section {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  margin: 0.75rem 0 1.25rem;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.25s ease-out;
}

.guardian-section-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.guardian-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.guardian-banner-content strong {
  display: block;
  font-size: 0.85rem;
  color: var(--accent-gold);
  margin-bottom: 0.15rem;
}

.guardian-banner-content p {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.3;
}

.guardian-consent-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  width: 100%;
}

.consent-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-main);
  cursor: pointer;
  line-height: 1.3;
}

.consent-checkbox-label input {
  width: 16px;
  height: 16px;
  margin-top: 0.1rem;
  accent-color: var(--accent-emerald);
  flex-shrink: 0;
}

/* Minor Badge in Pending Approvals & Riders Directory */
.badge-minor-applicant {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.guardian-info-preview-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.guardian-info-preview-box strong {
  color: var(--accent-gold);
}


@media (max-width: 1360px) {
  .app-header {
    padding: 0.55rem 1rem;
    gap: 0.65rem;
  }
  .brand-title {
    font-size: 1.05rem;
  }
  .tenant-switcher-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.74rem;
  }
  .user-name-header {
    max-width: 100px;
  }
  .calendar-controls-bar {
    padding: 0.5rem 0.85rem;
  }
  .controls-left-group {
    width: 100%;
    justify-content: space-between;
  }
  .dashboard-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 1100px) {
  .brand-subtitle {
    display: none;
  }
  .dashboard-actions {
    justify-content: flex-start;
  }
}

/* ==========================================================================
   SUPER ADMINISTRADOR GLOBAL STYLING
   ========================================================================== */
.auth-card-avatar.role-super_admin,
.auth-card-avatar.role-superadmin {
  background: linear-gradient(135deg, #7c3aed, #d4af37) !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.45);
  border: 1px solid #d4af37;
}

.user-avatar.role-super_admin,
.user-avatar.role-superadmin {
  background: linear-gradient(135deg, #7c3aed, #d4af37) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  border: 1px solid #d4af37;
}

.superadmin-profile-card {
  border: 1.5px solid rgba(212, 175, 55, 0.5) !important;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), rgba(9, 13, 18, 0.95)) !important;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25), 0 0 15px rgba(212, 175, 55, 0.2) !important;
}

.superadmin-profile-card:hover {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.35) !important;
}

.superadmin-meta {
  color: #f6e05e !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.02em;
}

.btn-delete-tenant-quick {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: var(--radius-sm);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-left: auto;
  flex-shrink: 0;
}

.btn-delete-tenant-quick:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  transform: scale(1.08);
}

/* ==========================================================================
   ARENAS CONFIGURATION & DYNAMIC CENTER MANAGEMENT
   ========================================================================== */
.modal-arenas-card {
  max-width: 920px;
  width: 95vw;
}

.arena-create-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.arena-create-card .section-title {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.arena-creation-form .form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.flex-2 { flex: 2; min-width: 200px; }
.flex-1 { flex: 1; min-width: 120px; }

.arena-form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.arenas-list-section {
  margin-top: 1rem;
}

.section-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
}

.section-header-bar h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.arenas-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
  max-height: 380px;
  overflow-y: auto;
  padding: 0.25rem;
}

.arena-card-item {
  background: rgba(18, 24, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.arena-card-item:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.arena-card-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gold);
}

.arena-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.arena-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.arena-card-surface {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.arena-card-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.arena-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-arena-edit,
.btn-arena-delete {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all var(--transition-fast);
}

.btn-arena-edit {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.btn-arena-edit:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--text-primary);
}

.btn-arena-delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-arena-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
}

/* ==========================================================================
   BOOKING MODAL (REORGANIZADO & PERFECTAMENTE CONTENIDO)
   ========================================================================== */
.booking-modal-card {
  max-width: 660px !important;
  width: min(660px, calc(100vw - 32px)) !important;
  max-height: min(92vh, 780px) !important;
  box-sizing: border-box !important;
  padding: 1.6rem 2rem !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid rgba(212, 175, 55, 0.28) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(212, 175, 55, 0.08) !important;
}

.booking-modal-card .modal-header {
  flex-shrink: 0;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.booking-modal-form {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding-right: 0.4rem;
  box-sizing: border-box;
  width: 100%;
}

/* Custom scrollbar for booking modal form */
.booking-modal-form::-webkit-scrollbar {
  width: 6px;
}

.booking-modal-form::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.booking-modal-form::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.35);
  border-radius: 4px;
}

.booking-modal-form::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

.booking-modal-card .form-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 1.1rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.booking-modal-card .form-group {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
}

.booking-modal-card select,
.booking-modal-card input,
.booking-modal-card textarea {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  text-overflow: ellipsis !important;
}

.booking-modal-card .arena-select-group {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.booking-modal-card .field-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.booking-modal-card .field-header-row label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0;
}

.btn-quick-pista-action {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--accent-gold);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.btn-quick-pista-action:hover {
  background: var(--accent-gold);
  color: #0b0f14;
}

/* Standalone Quick Add Arena Box within Booking Modal */
.booking-modal-card .quick-arena-box {
  width: 100% !important;
  box-sizing: border-box !important;
  background: linear-gradient(145deg, rgba(17, 26, 39, 0.95), rgba(11, 17, 26, 0.98)) !important;
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  border-radius: var(--radius-md) !important;
  padding: 1rem 1.15rem !important;
  margin: 0 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(212, 175, 55, 0.15) !important;
  animation: fadeInQuickBox 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeInQuickBox {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.quick-arena-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.quick-arena-badge-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1c40f !important;
}

.arena-icon-badge {
  font-size: 1rem;
}

.btn-close-quick-arena {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.1rem 0.3rem;
  transition: color var(--transition-fast);
}

.btn-close-quick-arena:hover {
  color: var(--text-primary);
}

.booking-modal-card .quick-arena-inputs {
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 0.8fr) !important;
  gap: 0.75rem !important;
  margin-bottom: 0.85rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.booking-modal-card .quick-input-col {
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.booking-modal-card .quick-input-col label {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  margin-bottom: 0.25rem !important;
  display: block !important;
}

.booking-modal-card .quick-input-col input,
.booking-modal-card .quick-input-col select {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 0.5rem 0.65rem !important;
  font-size: 0.82rem !important;
  border-radius: var(--radius-sm) !important;
}

.booking-modal-card .btn-save-quick-arena {
  width: 100% !important;
  justify-content: center !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

.booking-modal-card .slot-validation-banner {
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  margin-top: 0.15rem !important;
}

.booking-modal-footer {
  position: sticky !important;
  bottom: 0 !important;
  background: #0f1722 !important;
  z-index: 10 !important;
  flex-shrink: 0 !important;
  margin-top: auto !important;
  padding-top: 0.85rem !important;
  padding-bottom: 0.25rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.85rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 600px) {
  .booking-modal-card .form-row {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
  .booking-modal-card .quick-arena-inputs {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }
}

/* Empty Calendar Arenas Card */
.calendar-empty-arenas-card {
  grid-column: 1 / -1;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.9));
  border: 1.5px dashed rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 620px;
  margin: 3rem auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.empty-icon-halo {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  animation: pulse-halo 2.5s infinite;
}

@keyframes pulse-halo {
  0% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.2)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.6)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.2)); }
}

.calendar-empty-arenas-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calendar-empty-arenas-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 auto 1.5rem auto;
  max-width: 480px;
}

.empty-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   DOCUMENTACIÓN LEGAL OBLIGATORIA & CONSENTIMIENTOS INDIVIDUALES
   ========================================================================== */
.legal-docs-instruction-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.legal-instruction-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.legal-instruction-text strong {
  display: block;
  color: var(--accent-gold);
  font-size: 0.84rem;
  margin-bottom: 0.2rem;
}

.legal-instruction-text p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.legal-document-card {
  background: linear-gradient(180deg, rgba(26, 32, 44, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  margin-bottom: 1.15rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.legal-document-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.legal-document-card.accepted {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.legal-doc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.legal-doc-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.legal-doc-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.legal-doc-badge-icon.warning-badge {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

.legal-doc-title {
  margin: 0 0 0.2rem 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.legal-doc-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.12);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.legal-doc-tag.warning {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
}

.doc-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  transition: all 0.2s ease;
}

.doc-status-indicator.accepted {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f87171;
}

.status-indicator-dot.accepted {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

.legal-doc-summary {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 0.85rem 0;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-gold);
}

.legal-doc-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.btn-read-legal-document {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-read-legal-document:hover {
  background: rgba(212, 175, 55, 0.25);
  color: #ffffff;
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.legal-doc-counter-tag {
  font-size: 0.68rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
}

.legal-doc-checkbox-wrapper {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.legal-doc-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.legal-doc-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #10b981;
  flex-shrink: 0;
}

.legal-checkbox-content {
  font-size: 0.76rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.legal-signature-summary-box {
  background: rgba(30, 41, 59, 0.35);
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}

.signature-summary-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.signature-icon {
  font-size: 1.25rem;
}

.signature-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   MODAL VISOR DE DOCUMENTO LEGAL OFICIAL
   ========================================================================== */
.legal-modal-card {
  max-width: 860px !important;
  width: 95% !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #0f172a !important;
  border: 1.5px solid rgba(212, 175, 55, 0.4) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.15) !important;
}

.legal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding: 1rem 1.25rem;
}

.legal-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.legal-crest-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(123, 17, 32, 0.3));
  border: 1px solid rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.legal-badge-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  margin-bottom: 0.2rem;
}

.legal-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-print-legal-doc {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-print-legal-doc:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--accent-gold);
}

.legal-document-body {
  padding: 1.5rem;
  color: #e2e8f0;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  font-size: 0.85rem;
  background: #0b1120;
}

/* Formal Contract Typography inside Reader */
.legal-contract-sheet {
  background: #ffffff;
  color: #1e293b;
  padding: 2.25rem 2.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  max-width: 760px;
  margin: 0 auto;
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.7;
}

.legal-sheet-header {
  text-align: center;
  border-bottom: 2px solid #7B1120;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.legal-sheet-crest {
  font-size: 2.2rem;
  margin-bottom: 0.35rem;
}

.legal-sheet-entity {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #7B1120;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.legal-sheet-subentity {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: #64748b;
  text-transform: uppercase;
  margin: 0.15rem 0 0.5rem;
}

.legal-sheet-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.legal-sheet-preamble {
  font-size: 0.82rem;
  color: #475569;
  margin-bottom: 1.25rem;
  text-align: justify;
}

.legal-parties-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.35rem;
  font-size: 0.8rem;
}

.legal-parties-box strong {
  color: #0f172a;
}

.legal-clause-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #7B1120;
  margin: 1.15rem 0 0.35rem 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.legal-clause-text {
  font-size: 0.82rem;
  color: #334155;
  text-align: justify;
  margin-bottom: 0.75rem;
}

.legal-clause-list {
  padding-left: 1.25rem;
  margin: 0.5rem 0 0.85rem 0;
  font-size: 0.82rem;
  color: #334155;
}

.legal-clause-list li {
  margin-bottom: 0.35rem;
}

.legal-signatures-block {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.legal-signature-col {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
}

.legal-signature-line {
  height: 50px;
  border-bottom: 1px dashed #64748b;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal-digital-seal {
  display: inline-block;
  border: 2px solid #16a34a;
  color: #16a34a;
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  transform: rotate(-3deg);
}

.legal-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(15, 23, 42, 0.8);
}

.legal-secure-badge {
  font-size: 0.72rem;
  color: #94a3b8;
}

.legal-footer-buttons {
  display: flex;
  gap: 0.5rem;
}

/* ==========================================================================
   DIRECTORIO & EDIT PERFIL: INDICADORES LEGALES
   ========================================================================== */
.doc-badges-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
}

.badge-legal-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.badge-legal-pill.signed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-legal-pill.pending {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-legal-pill:hover {
  transform: scale(1.04);
}

.edit-rider-legal-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-top: 1rem;
}

.edit-legal-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.legal-badge-icon-sm {
  font-size: 1.2rem;
}

.edit-legal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.edit-legal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
}

.edit-legal-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-item-icon {
  font-size: 1rem;
}

.legal-item-name {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-primary);
}

.legal-status-badge {
  font-size: 0.65rem;
  font-weight: 600;
}

.legal-status-badge.signed {
  color: #34d399;
}

.legal-status-badge.pending {
  color: #f87171;
}

.btn-preview-legal-doc {
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
}

.btn-preview-legal-doc:hover {
  background: rgba(212, 175, 55, 0.25);
  color: #ffffff;
}

.edit-legal-signer-info {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  color: var(--text-muted, #94a3b8);
}

.create-rider-legal-box {
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  margin-top: 0.85rem;
}

.legal-box-title {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.35rem;
}

.legal-check-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  cursor: pointer;
}

.legal-check-line input {
  accent-color: #10b981;
}

@media print {
  body * {
    visibility: hidden;
  }
  #legal-document-modal,
  #legal-document-modal .legal-contract-sheet,
  #legal-document-modal .legal-contract-sheet * {
    visibility: visible;
  }
  #legal-document-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: transparent !important;
  }
  .legal-contract-sheet {
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
  .legal-modal-header,
  .legal-modal-footer,
  .btn-print-legal-doc,
  .modal-close-btn {
    display: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN: PORTAL DE ACCESO Y GESTIÓN DE SESIONES
   ========================================================================== */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0.75rem;
  }
  .modal-auth-session {
    width: 100%;
    max-height: calc(100vh - 1.25rem);
  }
  .modal-auth-session .modal-header {
    padding: 0.85rem 1.1rem;
  }
  .auth-nav-tabs {
    padding: 0.5rem 1rem;
    gap: 0.4rem;
  }
  .auth-nav-tab-btn {
    padding: 0.55rem 0.6rem;
    font-size: 0.78rem;
    gap: 0.35rem;
  }
  .auth-modal-body {
    padding: 1rem 1.1rem;
  }
  .auth-modal-footer {
    padding: 0.75rem 1.1rem;
  }
}

@media (max-width: 600px) {
  .auth-nav-tabs {
    flex-direction: column;
  }
  .modal-auth-session .modal-title {
    font-size: 1.05rem;
  }
  .modal-auth-session .modal-subtitle {
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   CABALLOS, CUADRA ECOESTRE & PUPILAJES DE ALUMNOS (RBAC RESTRICTED)
   ========================================================================== */

/* Botón Destacado en Dashboard Actions */
.btn-horses-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.16), rgba(245, 158, 11, 0.14));
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: var(--accent-gold);
  font-weight: 600;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.18);
  transition: all var(--transition-normal);
}

.btn-horses-highlight:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.28), rgba(245, 158, 11, 0.22));
  border-color: var(--accent-gold);
  color: #fff;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

/* Modal Ancho de Gestión de Caballos */
.modal-horses-wide {
  width: 95vw;
  max-width: 1320px;
  height: 92vh;
  max-height: 94vh;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  background: rgba(14, 20, 29, 0.98);
  border: 1px solid var(--border-gold);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.horses-header {
  padding: 0.95rem 1.6rem;
  background: rgba(9, 13, 18, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-shrink: 0;
}

.horses-crest-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(245, 158, 11, 0.1));
  border: 1.5px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
  flex-shrink: 0;
}

.horses-header-badge-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}

.horses-header-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--accent-gold);
}

.horses-header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* KPI Summary Ribbon */
.horses-kpis-ribbon {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.6rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.horse-kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  transition: all 0.2s ease;
}

.horse-kpi-chip .kpi-icon {
  font-size: 0.95rem;
}

.horse-kpi-chip .kpi-number {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
}

.horse-kpi-chip .kpi-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.horse-kpi-chip.kpi-total {
  border-color: rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.06);
}
.horse-kpi-chip.kpi-total .kpi-number {
  color: var(--accent-gold);
}

.horse-kpi-chip.kpi-escuela {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}
.horse-kpi-chip.kpi-escuela .kpi-number {
  color: #10b981;
}

.horse-kpi-chip.kpi-propietarios {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}
.horse-kpi-chip.kpi-propietarios .kpi-number {
  color: #fbbf24;
}

.horse-kpi-chip.kpi-medio-pupilaje {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
}
.horse-kpi-chip.kpi-medio-pupilaje .kpi-number {
  color: #60a5fa;
}

.horse-kpi-chip.kpi-pupilaje-completo {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.08);
}
.horse-kpi-chip.kpi-pupilaje-completo .kpi-number {
  color: #c084fc;
}

/* Toolbar: Search & Tabs */
.horses-toolbar {
  padding: 0.65rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(10, 15, 22, 0.4);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.horses-search-box {
  position: relative;
  min-width: 280px;
  flex: 1;
  max-width: 420px;
}

.horses-search-box .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.horses-search-box input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.35rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.horses-search-box input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.horses-filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.horse-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.horse-filter-pill:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.horse-filter-pill.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

/* Horses Cards Grid Container & Ultra-Smooth Scrolling */
.horses-modal-body,
.horses-cards-container {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding: 1.5rem 1.8rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Custom Visible Scrollbar for Horses Modal ("cursos de movimiento") */
.horses-modal-body::-webkit-scrollbar,
.horses-cards-container::-webkit-scrollbar {
  width: 10px;
  display: block;
}

.horses-modal-body::-webkit-scrollbar-track,
.horses-cards-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  margin: 6px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.horses-modal-body::-webkit-scrollbar-thumb,
.horses-cards-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-gold), #f59e0b);
  border-radius: 8px;
  border: 2px solid rgba(14, 20, 29, 0.98);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.horses-modal-body::-webkit-scrollbar-thumb:hover,
.horses-cards-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fce085, var(--accent-gold));
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.8);
}

.horses-modal-body,
.horses-cards-container {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-gold) rgba(0, 0, 0, 0.45);
}

/* Horses Modal Footer */
.horses-modal-footer {
  padding: 0.85rem 1.8rem;
  background: rgba(9, 13, 18, 0.85);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  margin-top: 0;
}

.horses-footer-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.horses-footer-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-scroll-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-scroll-nav:hover {
  background: rgba(212, 175, 55, 0.16);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.btn-scroll-nav span {
  font-size: 0.7rem;
}

.horses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

/* Horse Card */
.horse-card {
  background: rgba(18, 24, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.horse-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.horse-card.regimen-propietario {
  border-top: 3px solid #fbbf24;
}

.horse-card.regimen-medio_pupilaje {
  border-top: 3px solid #60a5fa;
}

.horse-card.regimen-pupilaje_completo {
  border-top: 3px solid #c084fc;
}

.horse-card.regimen-escuela {
  border-top: 3px solid #10b981;
}

.horse-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.horse-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.horse-title-info {
  flex: 1;
  min-width: 0;
}

.horse-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.horse-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.horse-breed-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.horse-gender-dot {
  opacity: 0.4;
}

/* Status Pills */
.horse-status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.horse-status-pill.status-active {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.horse-status-pill.status-injured {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.horse-status-pill.status-rest {
  background: rgba(156, 163, 175, 0.12);
  border: 1px solid rgba(156, 163, 175, 0.35);
  color: #9ca3af;
}

.horse-status-pill.status-competition {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
}

/* Affiliation Badges */
.horse-affiliation-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.horse-affiliation-badge .badge-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.horse-affiliation-badge .badge-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.horse-affiliation-badge .badge-student {
  font-size: 0.75rem;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-propietario {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(212, 175, 55, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}
.badge-propietario strong {
  color: #fbbf24;
}

.badge-medio-pupilaje {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
}
.badge-medio-pupilaje strong {
  color: #60a5fa;
}

.badge-pupilaje-completo {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(192, 132, 252, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #e9d5ff;
}
.badge-pupilaje-completo strong {
  color: #c084fc;
}

.badge-escuela {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}
.badge-escuela strong {
  color: #10b981;
}

.badge-cesion {
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: #fef08a;
}

/* Pupilaje Detail Box */
.horse-pupilaje-detail-box {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pupilaje-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  gap: 0.5rem;
}

.pupilaje-detail-row span {
  color: var(--text-muted);
}

.pupilaje-detail-row strong {
  color: var(--text-primary);
  text-align: right;
}

/* Specs Grid */
.horse-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.horse-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.spec-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spec-val {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Detail Info Bars */
.horse-passport-bar,
.horse-diet-bar,
.horse-vet-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passport-code {
  font-family: monospace;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  color: var(--accent-gold);
}

.diet-text, .vet-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Card Actions */
.horse-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-horse-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-edit-horse {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--accent-gold);
}

.btn-edit-horse:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--accent-gold);
  color: #fff;
}

.btn-delete-horse {
  flex: 0 0 auto;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.btn-delete-horse:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
}

/* Form Modal */
.modal-horse-form {
  width: 92vw;
  max-width: 860px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: rgba(14, 20, 29, 0.98);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.horse-form-header {
  padding: 1.25rem 1.6rem;
  background: rgba(9, 13, 18, 0.75);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-horse-form .modal-body,
.horse-form-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.4rem 1.6rem;
  overflow-y: auto !important;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.modal-horse-form .modal-body::-webkit-scrollbar,
.horse-form-modal-body::-webkit-scrollbar {
  width: 8px;
  display: block;
}

.modal-horse-form .modal-body::-webkit-scrollbar-track,
.horse-form-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  margin: 4px 0;
}

.modal-horse-form .modal-body::-webkit-scrollbar-thumb,
.horse-form-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-gold), #f59e0b);
  border-radius: 6px;
  border: 1px solid rgba(14, 20, 29, 0.98);
}

.form-section-header {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-gold);
  padding: 0.6rem 0;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.form-section-header:first-of-type {
  margin-top: 0;
}

/* Affiliation Agreement Block */
.affiliation-agreement-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.06), rgba(59, 130, 246, 0.06));
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.affiliation-agreement-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.affiliation-agreement-header .affiliation-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(212, 175, 55, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.affiliation-agreement-header strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.affiliation-agreement-header p {
  margin: 0.15rem 0 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Empty State */
.horses-empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px dashed rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.horses-empty-state .empty-icon {
  font-size: 2.8rem;
  display: block;
  margin-bottom: 0.75rem;
}

.horses-empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.horses-empty-state p {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 1.25rem auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .horses-grid {
    grid-template-columns: 1fr;
  }
  .horses-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .horses-header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .horses-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .horses-search-box {
    max-width: 100%;
  }
}

/* Optimización para laptops y pantallas de poca altura vertical (ej. 1280x665) */
@media (max-height: 750px) {
  .modal-horses-wide {
    height: 96vh;
    max-height: 97vh;
  }
  .horses-header {
    padding: 0.5rem 1.25rem;
    gap: 0.8rem;
  }
  .horses-header .modal-subtitle {
    display: none;
  }
  .horses-crest-icon {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
  .horses-header .modal-title {
    font-size: 1.05rem;
    margin: 0;
  }
  .horses-header-badge-row {
    margin-bottom: 0.15rem;
  }
  .horses-kpis-ribbon {
    padding: 0.35rem 1.25rem;
    gap: 0.45rem;
  }
  .horse-kpi-chip {
    padding: 0.22rem 0.55rem;
    font-size: 0.72rem;
  }
  .horses-toolbar {
    padding: 0.45rem 1.25rem;
    gap: 0.5rem;
  }
  .horses-modal-body,
  .horses-cards-container {
    padding: 0.85rem 1.25rem;
  }
  .horses-modal-footer {
    padding: 0.45rem 1.25rem;
  }
}

html.modal-open,
body.modal-open {
  overflow: hidden !important;
}

/* ==========================================================================
   CALENDARIO DE CLASES: HORAS LIBRES Y HORAS OCUPADAS (ALUMNOS & STAFF)
   ========================================================================== */

/* Barra de Leyenda de Estados en el Calendario */
.calendar-legend-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: rgba(14, 20, 29, 0.78);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  padding: 0.55rem 1.15rem;
  margin-bottom: 0.85rem;
  font-size: 0.77rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.legend-items-group {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-free {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.dot-occupied {
  background: #f43f5e;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.6);
}

.dot-own {
  background: var(--accent-gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
}

.legend-quick-tip {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.legend-quick-tip strong {
  color: #34d399;
}

/* Bloques de Horas Libres en Vista Diaria */
.calendar-free-block {
  min-height: 58px;
  height: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.04), rgba(5, 150, 105, 0.02));
  border: 1.5px dashed rgba(16, 185, 129, 0.28);
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
}

.calendar-free-block:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(5, 150, 105, 0.08));
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.free-block-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.free-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #34d399;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: 0.04em;
}

.free-capacity {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.free-block-hint {
  font-size: 0.72rem;
  color: #a7f3d0;
  font-weight: 600;
  margin-top: 0.3rem;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.calendar-free-block:hover .free-block-hint {
  opacity: 1;
  color: #fff;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Bloque Parcialmente Libre (con aforo restante) */
.calendar-partial-free-block {
  margin-top: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.06);
  border: 1px dashed rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.2s ease;
}

.calendar-partial-free-block:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.partial-tag {
  color: #34d399;
  font-weight: 600;
}

.partial-action {
  color: #fff;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.35);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

/* Bloques Libres en Vista Semanal */
.calendar-free-week-block {
  min-height: 38px;
  height: 100%;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.03);
  border: 1px dashed rgba(16, 185, 129, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-free-week-block:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

.free-week-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #34d399;
}

/* Tarjeta de Hora Ocupada por otro alumno (Privacidad protegida) */
.booking-card.occupied-other-card {
  border-left-color: #f43f5e !important;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.8)) !important;
  border-color: rgba(244, 63, 94, 0.28) !important;
  cursor: pointer !important;
}

.booking-card.occupied-other-card:hover {
  border-color: rgba(244, 63, 94, 0.5) !important;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15) !important;
}

.status-occupied-pill {
  background: rgba(244, 63, 94, 0.18) !important;
  color: #fda4af !important;
  border: 1px solid rgba(244, 63, 94, 0.4) !important;
}

/* Tarjeta Propia del Alumno Logueado */
.booking-card.own-student-card {
  border-left-color: var(--accent-gold) !important;
  border-color: rgba(212, 175, 55, 0.45) !important;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(16, 185, 129, 0.08)) !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.18) !important;
}

.status-own-pill {
  background: rgba(212, 175, 55, 0.22) !important;
  color: var(--accent-gold) !important;
  border: 1px solid rgba(212, 175, 55, 0.6) !important;
  font-weight: 700 !important;
}

.own-student-tag {
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.35rem;
}

/* ==========================================================================
   NOTIFICACIONES DE SOLICITUDES DE CLASE (CAMPANITA & BADGE)
   ========================================================================== */
.btn-notifications {
  position: relative;
  background: rgba(212, 175, 55, 0.12) !important;
  border-color: rgba(212, 175, 55, 0.4) !important;
  color: var(--accent-gold) !important;
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn-notifications:hover {
  background: rgba(212, 175, 55, 0.25) !important;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
  transform: translateY(-1px);
}

.notif-icon-bell {
  font-size: 1rem;
  display: inline-block;
  animation: bellWiggle 3s infinite ease-in-out;
}

@keyframes bellWiggle {
  0%, 85%, 100% { transform: rotate(0deg); }
  88% { transform: rotate(14deg); }
  92% { transform: rotate(-14deg); }
  96% { transform: rotate(8deg); }
}

.pending-badge-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 9999px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: badgePulse 2s infinite ease-in-out;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
  50% { transform: scale(1.15); box-shadow: 0 0 14px rgba(239, 68, 68, 0.85); }
}

/* ==========================================================================
   TARJETAS DE CLASES ABIERTAS / GRUPALES EN EL CALENDARIO
   ========================================================================== */
.booking-card.open-class-card {
  border-left: 4px solid #10b981 !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.85)) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  cursor: pointer;
  transition: all 0.25s ease;
}

.booking-card.open-class-card:hover {
  border-color: rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.2) !important;
}

.open-class-badge-pill {
  background: rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.5) !important;
  font-weight: 700 !important;
  font-size: 0.68rem !important;
}

.badge-discipline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  margin-top: 0.25rem;
  margin-bottom: 0.3rem;
}

.badge-discipline.salto {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.badge-discipline.doma {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

.badge-discipline.iniciacion {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.badge-discipline.ponis {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.4);
  color: #f472b6;
}

.badge-discipline.cross {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.card-open-spots-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
}

.spots-count-text {
  color: var(--text-secondary);
  font-weight: 500;
}

.spots-badge-free {
  color: #34d399;
  font-weight: 700;
}

.spots-badge-full {
  color: #fda4af;
  font-weight: 700;
}

.card-open-actions-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.btn-open-enroll {
  flex: 1;
  padding: 0.35rem 0.6rem;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-open-enroll:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.4);
}

.btn-open-unenroll {
  flex: 1;
  padding: 0.32rem 0.5rem;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fda4af;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-open-unenroll:hover {
  background: rgba(244, 63, 94, 0.3);
  color: #ffffff;
}

.tag-already-enrolled {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ==========================================================================
   MODAL: SOLICITUD DE RESERVA DE CLASE (WHATSAPP)
   ========================================================================== */
.student-request-modal-card {
  max-width: 600px;
  width: 95vw;
}

.modal-badge-whatsapp {
  background: rgba(37, 211, 102, 0.18) !important;
  color: #25d366 !important;
  border: 1px solid rgba(37, 211, 102, 0.4) !important;
}

.alert-whatsapp-box {
  background: rgba(37, 211, 102, 0.1) !important;
  border: 1px solid rgba(37, 211, 102, 0.35) !important;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.alert-whatsapp-box p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.whatsapp-bubble-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.btn-whatsapp-submit {
  background: linear-gradient(135deg, #25d366, #128c7e) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.65rem 1.25rem !important;
  border-radius: 6px !important;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp-submit:hover {
  background: linear-gradient(135deg, #20ba59, #0e7266) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.5);
}

/* ==========================================================================
   MODAL: BANDEJA DE SOLICITUDES DE CLASE (ADMIN & STAFF)
   ========================================================================== */
.booking-requests-modal-card {
  max-width: 860px;
  width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.requests-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.requests-filter-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.req-tab-btn {
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.req-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.req-tab-btn.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.5);
  color: var(--accent-gold);
}

.btn-refresh-requests {
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-refresh-requests:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.requests-list-container {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.request-card-item {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  transition: all 0.2s ease;
}

.request-card-item:hover {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.request-card-item.status-pending {
  border-left: 4px solid #f59e0b;
}

.request-card-item.status-approved {
  border-left: 4px solid #10b981;
  opacity: 0.85;
}

.request-card-item.status-rejected {
  border-left: 4px solid #ef4444;
  opacity: 0.7;
}

.request-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.request-student-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.request-student-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.request-time-ago {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.request-status-pill {
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.request-status-pill.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.request-status-pill.approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.request-status-pill.rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.request-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  background: rgba(0, 0, 0, 0.15);
  padding: 0.75rem 1rem;
  border-radius: 6px;
}

.request-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.request-detail-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.request-detail-value {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
}

.request-notes-box {
  margin-bottom: 0.85rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.request-card-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-req-action {
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
}

.btn-req-approve {
  background: #10b981;
  color: #ffffff;
}

.btn-req-approve:hover {
  background: #059669;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
}

.btn-req-reject {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-req-reject:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}

.btn-req-whatsapp {
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: #25d366;
}

.btn-req-whatsapp:hover {
  background: #25d366;
  color: #ffffff;
}





