/* 
   styles.css
   Tema: iOS 26 Glassmorphism (Futuristic Crystal)
   Autor: Lumo (para Abel Maestre)
*/

:root {
    /* Paleta de Colores Base */
    --bg-gradient-start: #0f0c29;
    --bg-gradient-mid: #302b63;
    --bg-gradient-end: #24243e;
    
    /* Colores de Cristal */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-highlight: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Tipografía y Acentos */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-color: #0a84ff; /* Azul iOS vibrante */
    --accent-glow: rgba(10, 132, 255, 0.4);
    --danger-color: #ff453a;
    --success-color: #30d158;
    
    /* Efectos */
    --blur-strength: 20px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --transition-speed: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-mid), var(--bg-gradient-end));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Animación suave del fondo */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Elementos decorativos flotantes (Orbs) para resaltar el efecto cristal */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: #ff00cc;
    top: -50px;
    left: -50px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: #3333ff;
    bottom: -100px;
    right: -100px;
    animation-delay: 2s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: #00ffcc;
    top: 40%;
    left: 60%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -20px); }
}

/* --- CLASES DE UTILIDAD PARA EL EFECTO CRISTAL --- */

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-left: 1px solid var(--glass-highlight);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: all var(--transition-speed);
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.25);
}

/* --- TIPOGRAFÍA Y ELEMENTOS --- */

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.8rem; }
p { color: var(--text-secondary); line-height: 1.6; }

/* --- FORMULARIOS --- */

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

input:focus, select:focus, textarea:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* --- BOTONES --- */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #0056b3);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--text-primary);
}

.btn-danger {
    background: rgba(255, 69, 58, 0.2);
    color: var(--danger-color);
    border: 1px solid rgba(255, 69, 58, 0.4);
}

.btn-danger:hover {
    background: rgba(255, 69, 58, 0.3);
    box-shadow: 0 0 15px rgba(255, 69, 58, 0.4);
}

/* --- LAYOUT ESPECÍFICO --- */

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.login-container {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* --- TABLAS (Estilo Cristal) --- */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
}

tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
}

/* --- RESPONSIVE --- */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .navbar { flex-direction: column; gap: 1rem; }
    .nav-link { margin: 0 1rem; }
}