/* ============================================================
   SERGIFITNESS - Gym Pro Dark Theme
   Fondo #121212, acentos neón #ccff00 / Rojo pasión
   Tipografías Sans Serif robustas
   ============================================================ */

:root {
  --bg-dark: #121212;
  --bg-card: #1a1a1a;
  --bg-elevated: #242424;
  --text-primary: #f5f5f5;
  --text-secondary: #b0b0b0;
  --accent-neon: #ccff00;
  --accent-red: #e63946;
  --accent-red-hover: #ff4757;
  --border-subtle: #2a2a2a;
  --success: #2ecc71;
  --warning: #f39c12;
  --font-sans: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Oswald', 'DM Sans', sans-serif;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

/* Tipografía */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; color: var(--accent-neon); }
h3 { font-size: 1.25rem; }

a {
  color: var(--accent-neon);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #e6ff66;
}

/* Layout principal */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
}

.sidebar-logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
}

.sidebar-logo a:hover {
  color: var(--accent-neon);
}

.sidebar-logo img {
  height: 42px;
  width: auto;
}

.sidebar-logo .brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--accent-neon);
  background: rgba(204, 255, 0, 0.06);
  border-left-color: var(--accent-neon);
}

.sidebar-nav .icon {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-x: auto;
}

/* Header de página */
.page-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 {
  margin: 0;
  color: var(--text-primary);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-neon);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background: #e6ff66;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--accent-red);
  color: #fff;
}

.btn-danger:hover {
  background: var(--accent-red-hover);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--border-subtle);
}

/* Tabla de clientes */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
}

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

table.data-table th,
table.data-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

table.data-table th {
  background: var(--bg-elevated);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

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

table.data-table .badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-online { background: rgba(204, 255, 0, 0.2); color: var(--accent-neon); }
.badge-presencial { background: rgba(230, 57, 70, 0.2); color: var(--accent-red); }
.badge-mixto { background: rgba(46, 204, 113, 0.2); color: var(--success); }

/* Formularios */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-neon);
  box-shadow: 0 0 0 3px rgba(204, 255, 0, 0.15);
}

.form-control::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23b0b0b0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Alertas */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.alert-success {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.4);
  color: var(--success);
}

.alert-error {
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.4);
  color: var(--accent-red);
}

/* Grid de cards (dashboard / clientes) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.client-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.client-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  border-color: var(--accent-neon);
}

.client-card .client-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--accent-neon);
}

.client-card .client-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.client-card .client-meta span {
  display: inline-block;
  margin-right: 1rem;
}

.client-card .client-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* Hero / Landing */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(204, 255, 0, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero .logo {
  width: 120px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 20px rgba(204, 255, 0, 0.3));
}

.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero .btn {
  font-size: 1rem;
  padding: 0.9rem 2rem;
}

/* Login - página principal */
.login-page .hero-login {
  min-height: 100vh;
  justify-content: flex-start;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.login-box {
  width: 100%;
  max-width: 400px;
  margin: 1.5rem auto 2rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  text-align: left;
  position: relative;
  z-index: 1;
}

.login-box-title,
.login-box h2 {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  text-align: center;
  color: var(--accent-neon);
}

.login-form {
  display: block;
}

.login-box .form-group {
  margin-bottom: 1.25rem;
}

.login-box .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.alert-error {
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid var(--accent-red);
  color: #ff6b7a;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-success {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid var(--success);
  color: #7bed9f;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Stats (dashboard) */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-neon);
  line-height: 1.2;
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Utilidades */
.text-muted { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }

/* Responsive */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
  }

  .sidebar-nav a {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  .main-content {
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
