@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Tema Claro (Por Defecto) */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.08);
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.08);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --card-radius: 16px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tema Oscuro */
[data-bs-theme="dark"] {
    --bg-primary: #0b0f19;
    --bg-secondary: #151b2c;
    --bg-tertiary: #1f293d;
    --accent-glow: rgba(59, 130, 246, 0.18);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* NAVBAR CUSTOM STYLES */
.navbar-custom {
    background-color: var(--bg-secondary) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

[data-bs-theme="dark"] .navbar-custom {
    background-color: rgba(21, 27, 44, 0.8) !important;
}

.navbar-brand-vpec {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.nav-link-custom {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: var(--transition-smooth);
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
}

.nav-link-custom:hover, .nav-link-custom.active {
    color: var(--accent-color) !important;
    background-color: rgba(59, 130, 246, 0.06);
}

[data-bs-theme="dark"] .nav-link-custom:hover, 
[data-bs-theme="dark"] .nav-link-custom.active {
    color: var(--text-primary) !important;
    background-color: rgba(255, 255, 255, 0.05);
}

/* CARD PREMIUM & GLASSMORPHISM */
.card-premium {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

[data-bs-theme="dark"] .card-premium {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* LOGIN FORM STYLES */
.login-container {
    max-width: 450px;
    width: 100%;
}

.form-control-custom {
    background-color: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    transition: var(--transition-smooth) !important;
}

.form-control-custom:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 4px var(--accent-glow) !important;
    outline: none !important;
}

.form-label-custom {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* BUTTONS */
.btn-primary-custom {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: white;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
}

.btn-secondary-custom {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.btn-secondary-custom:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .btn-secondary-custom:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* DASHBOARD CENTRAL CARDS */
.central-option-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.02);
}

[data-bs-theme="dark"] .central-option-card {
    background: linear-gradient(145deg, #151b2c 0%, #1a2238 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.central-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.central-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    color: var(--accent-color);
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
}

.central-option-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.08), 0 0 30px var(--accent-glow);
}

[data-bs-theme="dark"] .central-option-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--accent-glow);
}

.central-option-card:hover::before {
    opacity: 1;
}

.central-option-card:hover .central-icon-wrapper {
    background-color: var(--accent-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.central-card-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.central-card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* CUSTOM TABLES */
.table-premium {
    border-collapse: separate;
    border-spacing: 0 8px;
    width: 100%;
}

.table-premium th {
    background-color: transparent !important;
    border: none !important;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem !important;
}

.table-premium tbody tr {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.table-premium tbody tr td {
    padding: 1.2rem 1.5rem !important;
    border-top: 1px solid var(--border-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary);
    vertical-align: middle;
}

.table-premium tbody tr td:first-child {
    border-left: 1px solid var(--border-color) !important;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table-premium tbody tr td:last-child {
    border-right: 1px solid var(--border-color) !important;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.table-premium tbody tr:hover {
    background-color: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

[data-bs-theme="dark"] .table-premium tbody tr:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* BADGES */
.badge-custom {
    padding: 0.4em 0.8em;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-admin {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: #2563eb !important;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

[data-bs-theme="dark"] .badge-admin {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-taller {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

[data-bs-theme="dark"] .badge-taller {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-active {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--accent-success) !important;
}

.badge-inactive {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: var(--accent-danger) !important;
}

/* NOTIFICATIONS AND ALERTS */
.alert-custom {
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #047857;
}

[data-bs-theme="dark"] .alert-success {
    color: #6ee7b7;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

[data-bs-theme="dark"] .alert-danger {
    color: #fca5a5;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

[data-bs-theme="dark"] .alert-warning {
    color: #fde047;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
}

[data-bs-theme="dark"] .alert-info {
    color: #93c5fd;
}

/* MODAL GLASSMORPHISM */
.modal-content-custom {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    color: var(--text-primary) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05) !important;
}

[data-bs-theme="dark"] .modal-content-custom {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5) !important;
}

.modal-header-custom {
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.5rem !important;
}

.modal-footer-custom {
    border-top: 1px solid var(--border-color) !important;
    padding: 1.5rem !important;
}

/* BOTÓN FLOTANTE TEMA PARA PÁGINAS SIN NAVBAR */
.theme-toggle-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.theme-toggle-floating:hover {
    transform: scale(1.05);
    background-color: var(--bg-tertiary);
}

/* ANIMATIONS */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FOOTER */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}

/* Corrección para opciones de select en temas claro/oscuro */
.form-control-custom option {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}
