:root {
    --primary: #15803d; 
    --primary-dark: #14532d;
    --secondary: #84cc16; 
    --accent: #65a30d;
    --bg-dark: #f3f4f6; /* Gris claro */
    --bg-card: #ffffff; /* Blanco para cards */
    --text-main: #111827; /* Texto oscuro */
    --text-muted: #6b7280;
    --success: #22c55e;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: radial-gradient(circle at top right, #d1d5db, transparent),
                radial-gradient(circle at bottom left, #9ca3af, transparent);
}

.login-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(to right, #22c55e, #84cc16);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-sm {
    width: auto;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 0.5rem;
}

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

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

.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Layout Styles */
.dashboard-layout {
    display: block;
    min-height: 100vh;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 72px; /* Altura fija para mayor precisión */
    background: var(--bg-card);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    align-items: center;
}

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

.nav-link:hover, .nav-link.active {
    background: rgba(21, 128, 61, 0.1);
    color: var(--primary);
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Sticky Table Headers - Only apply where explicitly needed */
.sticky-header th {
    position: sticky;
    top: 72px; /* Coincide con la altura del navbar */
    background: #ffffff !important;
    z-index: 100;
    box-shadow: 0 1px 0 #e5e7eb;
}

/* Ensure the table container doesn't clip the sticky header inappropriately */
.table-container {
    overflow-x: auto;
    padding: 0;
}
