/**
 * Estilos globales - Plataforma de Scouting
 * Esquema de colores: Monocromático azul (#002283)
 * Diseño mejorado y moderno
 */

:root {
    --primary-color: #002283;
    --primary-dark: #001a6b;
    --primary-light: #1a3a9e;
    --primary-lighter: #4d5fb8;
    --primary-lightest: #e6e9f5;
    --primary-gradient: linear-gradient(180deg, #002283 0%, #001a6b 100%);
    --text-color: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --bg-lighter: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --success-color: #059669;
    --error-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #0284c7;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.12);
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 8px;
    --transition: all 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background: #fafbfc;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    letter-spacing: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* Header */
.main-header {
    background: var(--primary-color);
    color: white;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 34, 131, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
}

.main-header .container {
    max-width: 100%;
    padding: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0.2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    height: 100px;
    width: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .logo img {
        height: 42px;
    }
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0;
    color: white;
    margin: 0;
    line-height: 1;
}

.logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0;
    transition: opacity 0.2s ease;
    padding: 0.25rem 0;
}

.logo a:hover {
    opacity: 0.9;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav a::before {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: calc(100% - 2.5rem);
    height: 2px;
    background: white;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border-radius: 2px;
    opacity: 0;
    pointer-events: none;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.main-nav a:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.main-nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.main-nav a.active::before {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

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

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.user-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: white;
    line-height: 1.2;
}

.user-role {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    white-space: nowrap;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    background: #fafbfc;
}

.page-header {
    margin-bottom: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0;
    margin: 0;
    line-height: 1.3;
}

.dashboard-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    letter-spacing: 0;
    line-height: 1.3;
}

.dashboard-header p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin: 0.25rem 0 0 0;
    font-weight: 400;
}


.alert-notification {
    background: var(--primary-lightest);
    border: 1px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.alert-notification a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-notification a:hover {
    text-decoration: underline;
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Flash Messages */
.flash-message {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    border-left: 4px solid;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flash-success {
    background: #f0fdf4;
    border-color: var(--success-color);
    color: #166534;
}

.flash-error {
    background: #fef2f2;
    border-color: var(--error-color);
    color: #991b1b;
}

.flash-warning {
    background: #fffbeb;
    border-color: var(--warning-color);
    color: #92400e;
}

.flash-info {
    background: #eff6ff;
    border-color: var(--info-color);
    color: #1e40af;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: #ffffff;
    font-weight: 500;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
    letter-spacing: 0;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 34, 131, 0.2);
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 34, 131, 0.25);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 34, 131, 0.2);
    color: #ffffff !important;
}

.btn-secondary {
    background: #6b7280;
    color: #ffffff !important;
    box-shadow: var(--shadow);
    font-weight: 500;
}

.btn-secondary:hover {
    background: #4b5563;
    color: #ffffff !important;
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-color);
    color: #ffffff !important;
    box-shadow: var(--shadow);
    font-weight: 500;
}

.btn-success:hover {
    background: #047857;
    color: #ffffff !important;
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--error-color);
    color: #ffffff !important;
    box-shadow: var(--shadow);
    font-weight: 500;
}

.btn-danger:hover {
    background: #b91c1c;
    color: #ffffff !important;
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.4375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #ffffff !important;
}

/* Asegurar que los botones en tablas tengan texto blanco - Máxima especificidad */
.table .btn,
table .btn,
.table td .btn,
table td .btn,
td .btn,
tbody .btn,
.table tbody .btn,
table tbody .btn,
.table tbody td .btn,
table tbody td .btn {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.table .btn-primary,
table .btn-primary,
.table td .btn-primary,
table td .btn-primary,
td .btn-primary,
tbody .btn-primary,
.table tbody .btn-primary,
table tbody .btn-primary {
    background: var(--primary-color) !important;
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
}

.table .btn-primary:hover,
table .btn-primary:hover,
.table td .btn-primary:hover,
table td .btn-primary:hover,
td .btn-primary:hover,
tbody .btn-primary:hover,
.table tbody .btn-primary:hover,
table tbody .btn-primary:hover {
    background: var(--primary-dark) !important;
    background-color: var(--primary-dark) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.table .btn-secondary,
table .btn-secondary,
.table td .btn-secondary,
table td .btn-secondary,
td .btn-secondary,
tbody .btn-secondary,
.table tbody .btn-secondary,
table tbody .btn-secondary {
    background: #6b7280 !important;
    background-color: #6b7280 !important;
    color: #ffffff !important;
    border-color: #6b7280 !important;
}

.table .btn-secondary:hover,
table .btn-secondary:hover,
.table td .btn-secondary:hover,
table td .btn-secondary:hover,
td .btn-secondary:hover,
tbody .btn-secondary:hover,
.table tbody .btn-secondary:hover,
table tbody .btn-secondary:hover {
    background: #4b5563 !important;
    background-color: #4b5563 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.table .btn-danger,
table .btn-danger,
.table td .btn-danger,
table td .btn-danger,
td .btn-danger,
tbody .btn-danger,
.table tbody .btn-danger,
table tbody .btn-danger {
    background: var(--error-color) !important;
    background-color: var(--error-color) !important;
    color: #ffffff !important;
    border-color: var(--error-color) !important;
}

.table .btn-danger:hover,
table .btn-danger:hover,
.table td .btn-danger:hover,
table td .btn-danger:hover,
td .btn-danger:hover,
tbody .btn-danger:hover,
.table tbody .btn-danger:hover,
table tbody .btn-danger:hover {
    background: #b91c1c !important;
    background-color: #b91c1c !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.table .btn-success,
table .btn-success,
.table td .btn-success,
table td .btn-success,
td .btn-success,
tbody .btn-success,
.table tbody .btn-success,
table tbody .btn-success {
    background: var(--success-color) !important;
    background-color: var(--success-color) !important;
    color: #ffffff !important;
    border-color: var(--success-color) !important;
}

.table .btn-success:hover,
table .btn-success:hover,
.table td .btn-success:hover,
table td .btn-success:hover,
td .btn-success:hover,
tbody .btn-success:hover,
.table tbody .btn-success:hover,
table tbody .btn-success:hover {
    background: #047857 !important;
    background-color: #047857 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

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

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.8125rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-lightest);
    background: white;
}

.form-control:hover:not(:focus) {
    border-color: var(--primary-lighter);
}

.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    background: white;
    transition: var(--transition);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-lightest);
}

.form-select:hover:not(:focus) {
    border-color: var(--primary-lighter);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0;
    margin: 0;
    line-height: 1.4;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

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

.table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background: var(--primary-lightest);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--border-light);
}

.table a:not(.btn) {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.table a:not(.btn):hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-left: 3px solid var(--primary-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
}

.stat-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.stat-link {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
}

.stat-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.stat-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Search and Filters */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-item label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.375rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.badge-primary {
    background: var(--primary-lightest);
    color: var(--primary-color);
    border: 1px solid var(--primary-lighter);
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.badge-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #9ca3af;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.625rem 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    min-width: 44px;
    text-align: center;
}

.pagination a:hover {
    background: var(--primary-lightest);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Login Page */
.login-container {
    max-width: 440px;
    margin: 6rem auto;
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin: 0;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.25rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    /* Grids responsive */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    /* Grids de 2 columnas a 1 */
    [style*="grid-template-columns: 1fr 2fr"],
    [style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        align-items: center;
        padding: 1rem 1.25rem;
        gap: 1rem;
        position: relative;
    }
    
    .logo img {
        height: 42px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
        z-index: 1001;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        background: var(--primary-dark);
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);
        transition: right 0.3s ease;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 5rem;
        overflow-y: auto;
        margin-top: 0;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        width: 100%;
        padding: 0 1.5rem;
        overflow-x: visible;
        padding-bottom: 2rem;
    }
    
    .main-nav li {
        width: 100%;
    }
    
    .main-nav a {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        white-space: normal;
        display: block;
        text-align: left;
        border-radius: var(--radius-sm);
        margin-bottom: 0.25rem;
    }
    
    .main-nav a::before {
        display: none;
    }
    
    .main-nav a:hover,
    .main-nav a.active {
        background-color: rgba(255, 255, 255, 0.2);
    }
    
    .user-menu {
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1002;
        background: transparent;
        padding: 0;
        margin-left: 0;
    }
    
    .user-info {
        display: none;
    }
    
    .btn-logout {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 0.8125rem;
        display: block;
        overflow-x: auto;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .login-container {
        margin: 2rem auto;
        padding: 2rem 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.375rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-header > div:first-child {
        width: 100%;
    }
    
    .page-header .btn {
        width: 100%;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .filter-item {
        width: 100%;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Grids */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.form-section-header {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.form-section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.form-section-header p {
    margin: 0;
    font-size: 0.875rem;
}

/* Additional Styles */
.filter-group {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-item {
    min-width: 150px;
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-lighter);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--primary-lightest);
    color: var(--primary-color);
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: var(--text-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.5rem;
}

/* Animations - Removed excessive animations for professional look */

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-lighter);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-lighter);
    border-radius: 5px;
    border: 2px solid var(--bg-lighter);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Additional Professional Enhancements */
.filter-group {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.filter-item {
    min-width: 150px;
}

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

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Focus States */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Selection */
::selection {
    background: var(--primary-lightest);
    color: var(--primary-color);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Link Styles */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: var(--primary-dark);
}

/* Code/Pre Styles */
code, pre {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    background: var(--bg-lighter);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* HR Styles */
hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-light);
}

.text-small {
    font-size: 0.875rem;
}

/* Spacing Utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Regla final para asegurar texto blanco en botones de tablas - Máxima prioridad */
table .btn,
.table .btn,
table td .btn,
.table td .btn,
table tbody .btn,
.table tbody .btn,
table tbody td .btn,
.table tbody td .btn,
table tbody tr td .btn,
.table tbody tr td .btn {
    color: #ffffff !important;
}

table .btn-primary,
.table .btn-primary,
table td .btn-primary,
.table td .btn-primary {
    background: #002283 !important;
    background-color: #002283 !important;
    color: #ffffff !important;
}

table .btn-secondary,
.table .btn-secondary,
table td .btn-secondary,
.table td .btn-secondary {
    background: #6b7280 !important;
    background-color: #6b7280 !important;
    color: #ffffff !important;
}

table .btn-danger,
.table .btn-danger,
table td .btn-danger,
.table td .btn-danger {
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

table .btn-success,
.table .btn-success,
table td .btn-success,
.table td .btn-success {
    background: #059669 !important;
    background-color: #059669 !important;
    color: #ffffff !important;
}

/* Skip to content link (accesibilidad) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 var(--radius) 0;
    font-weight: 500;
}

.skip-to-content:focus {
    top: 0;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mejoras de impresión */
@media print {
    .main-header,
    .main-footer,
    .btn,
    .filter-group,
    .pagination {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table {
        border: 1px solid #ddd;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

