﻿    <link rel="stylesheet" href="styles_moderno.css">
    <style>
        /* Toggle Menu Mobile */
        .sidebar-toggle-checkbox {
            display: none;
        }

        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 998;
        }

        .menu-toggle-btn {
            display: none;
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 1000;
            background-color: var(--primary-color, #007bff);
            color: white;
            border: none;
            padding: 0.75rem;
            border-radius: 0.5rem;
            cursor: pointer;
            font-size: 1.25rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        @media (max-width: 768px) {
            .menu-toggle-btn {
                display: block;
            }

            .sidebar {
                position: fixed;
                left: -280px;
                top: 0;
                height: 100vh;
                width: 280px;
                transition: left 0.3s ease;
                z-index: 999;
                overflow-y: auto;
            }

            .sidebar-toggle-checkbox:checked ~ .container .sidebar {
                left: 0;
            }

            .sidebar-toggle-checkbox:checked ~ .sidebar-overlay {
                display: block;
            }

            .main-content {
                margin-left: 0;
                width: 100%;
            }
        }

        /* Loading States */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.8);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 9999;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid var(--primary-color, #007bff);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Enhanced Table Responsiveness */
        .table-container {
            overflow-x: auto;
            margin: 1rem 0;
            border-radius: 0.5rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            font-size: 0.875rem;
        }

        .table th {
            background: linear-gradient(135deg, var(--primary-color, #007bff), var(--primary-dark, #0056b3));
            color: white;
            padding: 1rem 0.75rem;
            text-align: left;
            font-weight: 600;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .table th:hover {
            background: linear-gradient(135deg, var(--primary-dark, #0056b3), var(--primary-color, #007bff));
        }

        .table td {
            padding: 0.75rem;
            border-bottom: 1px solid #e9ecef;
            transition: background-color 0.2s ease;
        }

        .table tr:hover {
            background-color: #f8f9fa;
        }

        .table tr:nth-child(even) {
            background-color: #f8f9fa;
        }

        .table tr:nth-child(even):hover {
            background-color: #e9ecef;
        }

        /* Enhanced Form Styles */
        .search-form {
            background: white;
            padding: 1.5rem;
            border-radius: 0.5rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            margin-bottom: 1.5rem;
        }

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

        .form-control {
            width: 100%;
            padding: 0.75rem;
            border: 2px solid #e9ecef;
            border-radius: 0.375rem;
            font-size: 1rem;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary-color, #007bff);
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
        }

        .form-control.is-valid {
            border-color: #28a745;
            box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
        }

        .form-control.is-invalid {
            border-color: #dc3545;
            box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
        }

        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 0.375rem;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary-color, #007bff), var(--primary-dark, #0056b3));
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
        }

        .btn-outline {
            background: transparent;
            border: 2px solid var(--gray-light, #6c757d);
            color: var(--gray-dark, #495057);
        }

        .btn-outline:hover {
            background: var(--gray-light, #6c757d);
            color: white;
        }

        /* Enhanced Card Styles */
        .card {
            background: white;
            border-radius: 0.5rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            margin-bottom: 2rem;
        }

        .card-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text-dark, #212529);
        }

        /* Alert Styles */
        .alert {
            padding: 1rem;
            border-radius: 0.375rem;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .alert-success {
            background-color: #d4edda;
            border: 1px solid #c3e6cb;
            color: #155724;
        }

        .alert-danger {
            background-color: #f8d7da;
            border: 1px solid #f5c6cb;
            color: #721c24;
        }

        .alert-info {
            background-color: #d1ecf1;
            border: 1px solid #bee5eb;
            color: #0c5460;
        }

        /* Enhanced Top Bar */
        .top-bar {
            background: linear-gradient(135deg, var(--primary-color, #007bff), var(--primary-dark, #0056b3));
            color: white;
            padding: 1.5rem;
            border-radius: 0.5rem;
            margin-bottom: 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .user-greeting h2 {
            margin: 0;
            font-size: 1.5rem;
            font-weight: 700;
        }

        .user-greeting p {
            margin: 0.5rem 0 0 0;
            opacity: 0.9;
        }

        .user-actions {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        /* Sortable Headers */
        .sortable-header {
            cursor: pointer;
            user-select: none;
            transition: background-color 0.2s ease;
        }

        .sortable-header:hover {
            background-color: rgba(255, 255, 255, 0.1) !important;
        }

        .sort-icon {
            margin-left: 0.5rem;
            opacity: 0.7;
        }

        .sort-icon.active {
            opacity: 1;
            color: #ffd700;
        }

        /* Badge Styles */
        .badge {
            display: inline-block;
            padding: 0.25rem 0.5rem;
            font-size: 0.75rem;
            font-weight: 600;
            line-height: 1;
            text-align: center;
            white-space: nowrap;
            vertical-align: baseline;
            border-radius: 0.25rem;
        }

        .badge-info {
            background-color: #17a2b8;
            color: white;
        }

        /* Button Sizes */
        .btn-sm {
            padding: 0.375rem 0.75rem;
            font-size: 0.875rem;
            border-radius: 0.25rem;
        }

        /* Screen Reader Only */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* Responsive Design Improvements */
        @media (max-width: 1024px) {
            .table th, .table td {
                padding: 0.5rem 0.25rem;
                font-size: 0.8rem;
            }

            .top-bar {
                flex-direction: column;
                text-align: center;
            }

            .user-actions {
                justify-content: center;
            }
        }

        @media (max-width: 768px) {
            .search-form {
                padding: 1rem;
            }

            .form-control {
                font-size: 16px; /* Prevent zoom on iOS */
            }

            .table {
                font-size: 0.75rem;
            }

            .btn {
                padding: 0.5rem 1rem;
                font-size: 0.875rem;
            }

            .d-none.d-md-inline {
