:root {
    --color-primary: #2C3E50;
    --color-secondary: #27AE60;
    --color-accent: #E74C3C;
    --color-background: #f8f9fa;
    --color-text: #333;
    --color-text-light: #666;
    --color-border: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 8px;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.login-header {
    background: var(--color-primary);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-header h1 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.login-header p {
    opacity: 0.9;
}

.login-form, .register-form {
    padding: 2rem;
}

.login-form h2, .register-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

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

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

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.2);
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 1rem;
}

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

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

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

.btn-secondary:hover {
    background: #219653;
    transform: translateY(-2px);
}

.login-links {
    text-align: center;
}

.login-links a {
    color: var(--color-primary);
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

.error-message, .success-message {
    padding: 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.error-message {
    background: #fee;
    color: var(--color-accent);
    border-left-color: var(--color-accent);
}

.success-message {
    background: #efe;
    color: var(--color-secondary);
    border-left-color: var(--color-secondary);
}

.hidden {
    display: none;
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-header {
    background: white;
    box-shadow: var(--shadow);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-left h1 {
    margin-bottom: 0;
    color: var(--color-primary);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    background: var(--color-primary);
    color: white;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu a {
    text-decoration: none;
    color: var(--color-text);
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.user-menu a:hover {
    background: var(--color-background);
}

.dashboard-main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.filters-section {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.form-actions .btn-primary, .form-actions .btn-secondary {
    width: auto;
    margin-bottom: 0;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

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

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
}

.close-modal:hover {
    color: var(--color-text);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.empty-state i {
    color: var(--color-border);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

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

.welcome-section h2 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

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

.admin-section h3 {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-background);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.admin-table th {
    background: var(--color-background);
    font-weight: 600;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-block;
}

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

.btn-success:hover {
    background: #219653;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-activo {
    background: #d4edda;
    color: #155724;
}

.status-pendiente {
    background: #fff3cd;
    color: #856404;
}

.status-inactivo {
    background: #f8d7da;
    color: #721c24;
}

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

.stat-card {
    background: var(--color-background);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal:not(.hidden) .modal-content {
    animation: modalFadeIn 0.3s ease;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

button:disabled:hover {
    transform: none !important;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .header-left {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .main-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}