:root {
    --primary: #e31e24; /* Rojo Global Fitness */
    --primary-dark: #b8171c;
    --dark: #2d2d2d; /* Gris muy oscuro, no negro */
    --light: #ffffff;
    --grey-light: #f8f9fa;
    --grey: #e0e0e0;
    --text: #1a1a1a;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
}

/* Filtro para logo: pasar negro a blanco manteniendo el rojo */
.logo-inverse {
    filter: brightness(0) invert(1) drop-shadow(0 0 1px white);
}
/* Si el logo tiene rojo, usar este filtro específico para que solo cambie el negro a blanco */
.logo-white-text {
    filter: brightness(10) grayscale(1) brightness(10); /* Esto blanquea todo */
}
/* Truco: para mantener el rojo usar un filtro de matriz de color (avanzado) o simplemente poner fondo blanco detrás del logo siempre */
.logo-bg-white { background: white; padding: 5px; border-radius: 5px; }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', 'Inter', sans-serif;
}

body {
    background-color: var(--grey-light);
    color: var(--text);
    display: flex;
    min-height: 100vh;
}

/* Sidebar navigation */
.sidebar {
    width: 260px;
    background: var(--white);
    color: var(--text);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    border-right: 3px solid var(--primary);
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container img {
    max-width: 180px;
    height: auto;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    gap: 10px;
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    background: #fff0f0;
    color: var(--primary);
    transform: translateX(5px);
}

.logout-btn {
    background: var(--grey-light);
    border: none;
    color: var(--dark);
    padding: 0.8rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: var(--primary);
    color: white;
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    padding: 2rem;
    width: calc(100% - 260px);
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

h1, h2, h3 {
    color: var(--dark);
    font-weight: 700;
}

/* Buttons */
.btn {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

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

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

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

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th {
    text-align: left;
    padding: 1rem;
    background: var(--grey-light);
    color: var(--dark);
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--grey-light);
}

tr:hover td {
    background-color: #fafafa;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--grey);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary);
}

/* Badge tags for status */
.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-active { background: #e6ffed; color: #22863a; }
.badge-inactive { background: #ffeef0; color: #d73a49; }

/* Login Page khusus */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: var(--grey-light);
}

.login-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.login-card img {
    margin-bottom: 2rem;
}

/* Modal Simple Style */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Utilities */
.text-danger { color: var(--primary); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.w-100 { width: 100%; }
