/* ===== CSS VARIABLES ===== */
:root {
  --green: #2d8a3e;
  --green-dark: #1e6b2e;
  --green-light: #e8f5eb;
  --green-medium: #4caf60;
  --blue: #1a6bbf;
  --blue-dark: #145599;
  --blue-light: #dbeafe;
  --red: #dc2626;
  --red-light: #fee2e2;
  --yellow: #d97706;
  --yellow-light: #fef3c7;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 0.2s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ===== AUTH PAGE ===== */
.auth-body {
  background: linear-gradient(135deg, #1e4d2b 0%, #2d8a3e 50%, #1a6bbf 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 16px;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.logo-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(45,138,62,0.35);
}

/* Brand logo image */
.brand-logo { display: block; object-fit: contain; }
.brand-logo-lg { height: 84px; margin: 0 auto 14px; }
.brand-logo-sm { height: 34px; width: auto; }

.auth-logo h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: -0.3px;
}

.auth-logo p {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

.auth-form h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 20px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--gray-500);
}

.auth-switch a { font-weight: 500; }

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,138,62,0.12);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { opacity: 0.92; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-full { width: 100%; }

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 2px 4px rgba(45,138,62,0.3);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}

.btn-danger {
  background: var(--red);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
}

.btn-blue {
  background: var(--blue);
  color: var(--white);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius);
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  font-size: 16px;
}

/* ===== ALERTS ===== */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-danger {
  background: var(--red-light);
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-success {
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid #86efac;
}

.alert-warning {
  background: var(--yellow-light);
  color: #92400e;
  border: 1px solid #fcd34d;
}

/* ===== LOADING ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== APP LAYOUT ===== */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.header-logo-text h1 {
  font-size: 15px;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.2;
}

.header-logo-text span {
  font-size: 11px;
  color: var(--gray-500);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  display: none;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  flex-shrink: 0;
}

.badge-role {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: none;
}

.badge-admin { background: var(--blue-light); color: var(--blue-dark); }
.badge-cliente { background: var(--green-light); color: var(--green-dark); }

/* ===== TAB NAVIGATION (Dashboard) ===== */
.tab-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 14px 18px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--transition);
  font-family: inherit;
}

.tab-btn.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.tab-btn:hover:not(.active) { color: var(--gray-700); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== DATE NAVIGATION ===== */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.date-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.date-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  text-transform: capitalize;
}

.date-sub {
  font-size: 12px;
  color: var(--gray-500);
}

.date-nav-actions {
  display: flex;
  gap: 6px;
}

.today-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--green-light);
  color: var(--green);
  border: 1px solid #86efac;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.today-btn:hover { background: var(--green); color: var(--white); }

/* ===== CALENDAR GRID ===== */
.calendar-wrapper {
  padding: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calendar-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 560px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

.calendar-table th {
  padding: 10px 8px;
  background: var(--green);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap;
}

.calendar-table th:first-child {
  background: var(--green-dark);
  min-width: 90px;
  width: 90px;
}

.calendar-table th:last-child { border-right: none; }

.calendar-table td {
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.calendar-table td:last-child { border-right: none; }
.calendar-table tr:last-child td { border-bottom: none; }

.time-cell {
  padding: 8px;
  background: var(--gray-50);
  text-align: center;
  width: 90px;
  min-width: 90px;
  border-right: 2px solid var(--gray-200) !important;
}

.time-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
}

.time-end {
  font-size: 11px;
  color: var(--gray-400);
}

.price-tag {
  margin-top: 4px;
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--yellow-light);
  color: var(--yellow);
}

/* SLOT CELLS */
.slot {
  height: 72px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.slot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 6px 4px;
  gap: 2px;
}

.slot.available {
  background: var(--green-light);
  color: var(--green-dark);
  cursor: pointer;
}

.slot.available:hover {
  background: var(--green);
  color: var(--white);
  transform: scale(1.02);
  z-index: 2;
  box-shadow: var(--shadow-md);
}

.slot.occupied {
  background: var(--red-light);
  color: var(--red);
  cursor: default;
}

.slot.occupied-own {
  background: var(--blue-light);
  color: var(--blue-dark);
  cursor: pointer;
}

.slot.occupied-own:hover {
  background: var(--blue);
  color: var(--white);
}

.slot.unavailable {
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: not-allowed;
}

.slot-name {
  font-size: 11px;
  font-weight: 600;
}

.slot-detail {
  font-size: 10px;
  opacity: 0.8;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== LEGEND ===== */
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-600);
}

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

.legend-dot.available { background: var(--green-light); border: 1px solid var(--green-medium); }
.legend-dot.occupied { background: var(--red-light); border: 1px solid #fca5a5; }
.legend-dot.own { background: var(--blue-light); border: 1px solid #93c5fd; }
.legend-dot.unavailable { background: var(--gray-100); border: 1px solid var(--gray-300); }

/* ===== RESERVATION CARDS ===== */
.reservas-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reserva-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--green);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reserva-card.cancelada {
  border-left-color: var(--gray-400);
  opacity: 0.7;
}

.reserva-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.reserva-cancha {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
}

.reserva-estado {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.reserva-estado.activa { background: var(--green-light); color: var(--green-dark); }
.reserva-estado.cancelada { background: var(--gray-100); color: var(--gray-500); }

.reserva-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--gray-600);
}

.reserva-info span { display: flex; align-items: center; gap: 4px; }

.reserva-precio {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
}

.reserva-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--gray-100);
  padding-top: 10px;
  margin-top: 4px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}

@media (min-width: 600px) {
  .modal-overlay { align-items: center; }
}

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

.modal-card {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 600px) {
  .modal-card {
    border-radius: var(--radius-xl);
    max-height: 80vh;
  }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-900);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--gray-500);
  transition: all var(--transition);
  font-family: inherit;
}

.modal-close:hover { background: var(--gray-200); color: var(--gray-900); }

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--gray-200);
}

.modal-footer .btn { flex: 1; }

.reserva-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-item {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 12px;
}

.detail-item .label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.detail-item .value {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
}

.detail-item.full { grid-column: 1 / -1; }

.price-highlight {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, var(--green-light), var(--blue-light));
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.price-highlight .price-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
}

.price-highlight .price-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ===== ADMIN LAYOUT ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.admin-sidebar {
  background: var(--gray-900);
  color: var(--white);
  display: none;
  flex-direction: column;
  width: 240px;
  min-height: calc(100vh - 60px);
  flex-shrink: 0;
}

.admin-main {
  flex: 1;
  overflow: hidden;
}

.admin-body {
  display: flex;
  min-height: calc(100vh - 60px);
}

.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

.sidebar-nav-item.active {
  background: var(--green);
  color: var(--white);
}

.sidebar-icon { font-size: 18px; flex-shrink: 0; }

.sidebar-section-label {
  padding: 16px 20px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
}

/* Admin bottom nav (mobile) */
.admin-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gray-900);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color var(--transition);
}

.bottom-nav-item .nav-icon { font-size: 20px; }
.bottom-nav-item .nav-label { font-size: 10px; font-weight: 500; }
.bottom-nav-item.active { color: var(--green-medium); }

.admin-content-area {
  padding: 20px 16px;
  padding-bottom: 80px;
}

.admin-section { display: none; }
.admin-section.active { display: block; }

/* ===== CARDS & STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

.stat-card-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.stat-card-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}

.stat-card-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.stat-card.green { border-top: 3px solid var(--green); }
.stat-card.blue { border-top: 3px solid var(--blue); }
.stat-card.yellow { border-top: 3px solid var(--yellow); }
.stat-card.red { border-top: 3px solid var(--red); }

/* ===== DATA TABLES ===== */
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-table-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

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

.data-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  color: var(--gray-700);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }

.data-table .td-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* ===== FILTERS ===== */
.filters-bar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 130px;
}

.filter-group label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.filter-group select,
.filter-group input {
  padding: 8px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--green);
}

/* ===== CLIENT CARDS ===== */
.clients-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.client-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

.client-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.client-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  flex-shrink: 0;
}

.role-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 2px;
}
.role-pill.admin   { background: var(--blue-light);  color: var(--blue-dark); }
.role-pill.cliente { background: var(--green-light); color: var(--green-dark); }

.client-info { flex: 1; overflow: hidden; }
.client-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-email { font-size: 12px; color: var(--gray-500); }
.client-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}
.client-stats strong { color: var(--green); }

/* ===== PERIOD SELECTOR ===== */
.period-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius);
  width: fit-content;
}

.period-btn {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.period-btn.active {
  background: var(--white);
  color: var(--green);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: auto;
  max-width: 320px;
  text-align: center;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--green); color: var(--white); }
.toast.error { background: var(--red); color: var(--white); }
.toast.info { background: var(--blue); color: var(--white); }
.toast.warning { background: var(--yellow); color: var(--white); }

/* ===== EMPTY STATES ===== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--gray-500); }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.text-green { color: var(--green); }
.text-blue { color: var(--blue); }
.text-red { color: var(--red); }
.text-gray { color: var(--gray-500); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
  .user-name { display: block; }
  .badge-role { display: inline-block; }
  .clients-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .toast-container { bottom: 24px; }
}

@media (min-width: 768px) {
  .admin-bottom-nav { display: none; }
  .admin-sidebar { display: flex; }
  .admin-content-area { padding: 24px; padding-bottom: 24px; }
  .clients-grid { grid-template-columns: repeat(3, 1fr); }
  .calendar-wrapper { padding: 20px; }
}

@media (min-width: 1024px) {
  .auth-card { padding: 40px; }
  .header-logo-text h1 { font-size: 16px; }
  .clients-grid { grid-template-columns: repeat(4, 1fr); }
}
