* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(145deg, #f0f4ff 0%, #d9e2f0 100%);
    min-height: 100vh;
    padding: 1.5rem;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 2rem;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 10, 30, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    width: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 60px;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: #3d4b68;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover {
    color: #1a263b;
}

.nav-links a i {
    font-size: 1rem;
}

.nav-links a.hidden {
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 1rem 0.5rem 0.8rem;
    background: white;
    border-radius: 40px;
    border: 1px solid #e3eaf5;
    cursor: pointer;
    transition: all 0.2s;
}

.user-profile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #b0c2dd;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2a3b5e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
    color: #1a263b;
    font-size: 0.9rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-type {
    font-size: 0.7rem;
    color: #6a7a9a;
    background: #eef3fc;
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
    font-weight: 500;
    white-space: nowrap;
}

.logout-btn {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #fee;
    color: #c62828;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 0.8rem;
    width: 100%;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a263b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-title i {
    color: #4a6fa5;
    font-size: 1.4rem;
}

.header-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 0.4rem 0.9rem;
    background: #1a263b;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #2f3f62;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 38, 59, 0.25);
}

.btn-primary i {
    font-size: 0.8rem;
}

.btn-primary .btn-text {
    font-size: 0.8rem;
}

/* ===== FILA DE ACCIONES DE TABLA ===== */
.table-actions-row td {
    padding: 0.8rem !important;
    text-align: center !important;
    border-bottom: none !important;
}

.table-actions-row .actions-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    width: 100%;
}

.main-layout .left {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.main-layout .right {
    flex-shrink: 0;
    width: 300px;
}

/* ===== FILTROS ===== */
.filters-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 10, 30, 0.06);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    width: 100%;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: 500;
    font-size: 0.75rem;
    color: #1f2a44;
    white-space: nowrap;
}

.filter-input-text {
    padding: 0.4rem 0.7rem;
    border: 1px solid #dbe1ed;
    border-radius: 10px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    background: white;
    min-width: 130px;
    transition: border 0.2s;
    width: 100%;
}

.filter-input-text:focus {
    outline: none;
    border-color: #2a3b5e;
    box-shadow: 0 0 0 3px rgba(42, 59, 94, 0.1);
}

.filter-select {
    padding: 0.4rem 0.7rem;
    border: 1px solid #dbe1ed;
    border-radius: 10px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    background: white;
    min-width: 110px;
    width: 150px;
    max-width: 150px;
    transition: border 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a7a9a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    padding-right: 1.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-select:focus {
    outline: none;
    border-color: #2a3b5e;
    box-shadow: 0 0 0 3px rgba(42, 59, 94, 0.1);
}

.filter-time-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.filter-time {
    padding: 0.4rem 0.7rem;
    border: 1px solid #dbe1ed;
    border-radius: 10px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    background: white;
    width: 140px;
    flex: 1;
    min-width: 0;
    transition: border 0.2s;
}

.filter-time:focus {
    outline: none;
    border-color: #2a3b5e;
    box-shadow: 0 0 0 3px rgba(42, 59, 94, 0.1);
}

.filter-separator {
    color: #6a7a9a;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.btn-filter-clear {
    padding: 0.4rem 0.9rem;
    background: #eef3fc;
    border: none;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    color: #1a263b;
    white-space: nowrap;
}

.btn-filter-clear:hover {
    background: #dbe1ed;
}

/* ===== CALENDARIO ===== */
.calendar-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 10, 30, 0.06);
    position: sticky;
    top: 1.2rem;
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.calendar-nav {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.calendar-nav button {
    background: #eef3fc;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav button:hover {
    background: #dbe1ed;
}

.calendar-month-year {
    font-weight: 600;
    color: #1a263b;
    font-size: 0.85rem;
    min-width: 100px;
    text-align: center;
}

.btn-today-small {
    padding: 0.2rem 0.7rem;
    background: #1a263b;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.btn-today-small:hover {
    background: #2f3f62;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    width: 100%;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.6rem;
    color: #6a7a9a;
    padding: 0.3rem 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
    font-weight: 500;
    color: #1a263b;
    position: relative;
    background: transparent;
    border: 2px solid transparent;
    min-height: 32px;
}

.calendar-day:hover {
    background: rgba(42, 59, 94, 0.05);
}

.calendar-day.selected {
    background: #2a3b5e;
    color: white;
    border-color: #2a3b5e;
}

.calendar-day.other-month {
    color: #b0c2dd;
}

.calendar-day.today {
    border-color: #4a6fa5;
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4a6fa5;
}

.calendar-day.selected.has-event::after {
    background: white;
}

.calendar-day.has-urgent::after {
    background: #dc3545;
    width: 6px;
    height: 6px;
}

.calendar-day.selected.has-urgent::after {
    background: white;
}

/* ===== TABLA DE EVENTOS ===== */
.events-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 10, 30, 0.06);
    width: 100%;
    overflow: hidden;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.events-title {
    font-weight: 600;
    color: #1a263b;
    font-size: 0.95rem;
}

.events-title span {
    color: #6a7a9a;
    font-weight: 400;
}

.events-count {
    font-size: 0.8rem;
    color: #6a7a9a;
}

.events-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 900px;
}

.events-table thead {
    background: rgba(42, 59, 94, 0.05);
    border-radius: 0.5rem;
}

.events-table th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    font-weight: 600;
    color: #1a263b;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.events-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #2a3b5e;
    vertical-align: middle;
}

/* ===== ESTILOS PARA EL ÍCONO DE ENLACE ===== */
.event-link-icon {
    color: #4a6fa5;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
}

.event-link-icon:hover {
    color: #1a263b;
    transform: scale(1.1);
}

/* ===== HOVER MEJORADO PARA EVENTOS NORMALES ===== */
.events-table tr:hover td {
    background: rgba(42, 59, 94, 0.08) !important;
    transition: background 0.2s ease;
}

.events-table tbody tr:not(.priority-urgent-row):not(.completed-row):hover td {
    background: rgba(42, 59, 94, 0.07) !important;
}

.events-table .priority-urgent-row {
    background: rgba(220, 53, 69, 0.12) !important;
    border-left: 4px solid #dc3545;
}

.events-table .priority-urgent-row:hover td {
    background: rgba(220, 53, 69, 0.22) !important;
}

.events-table .priority-urgent-row td:first-child {
    border-left: 4px solid #dc3545;
    padding-left: 0.8rem;
}

.events-table .priority-urgent-row .event-title-urgent {
    color: #c62828;
    font-weight: 700;
}

.events-table .priority-urgent-row .urgent-badge {
    background: #dc3545;
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 40px;
    font-size: 0.55rem;
    font-weight: 700;
    animation: pulse-urgent-badge 1.5s infinite;
    display: inline-block;
}

@keyframes pulse-urgent-badge {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.events-table .completed-row {
    opacity: 0.5;
}

.event-priority-badge-table {
    padding: 0.1rem 0.4rem;
    border-radius: 40px;
    font-size: 0.55rem;
    font-weight: 600;
    white-space: nowrap;
}

.event-priority-badge-table.urgent {
    background: #fce4ec;
    color: #c62828;
}

.event-priority-badge-table.normal {
    background: #e3f2fd;
    color: #0d47a1;
}

.event-actions-table {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.btn-event-table {
    padding: 0.2rem 0.5rem;
    border: none;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.btn-event-table:hover {
    transform: scale(1.05);
}

.btn-edit-event-table {
    background: #e3f2fd;
    color: #0d47a1;
}

.btn-edit-event-table:hover {
    background: #bbdefb;
}

.event-empty {
    text-align: center;
    padding: 2rem;
    color: #6a7a9a;
}

.event-empty i {
    font-size: 2.5rem;
    color: #dbe1ed;
    margin-bottom: 0.8rem;
    display: block;
}

.event-empty p {
    font-size: 0.9rem;
}

.section-badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #eef3fc;
    color: #2a3b5e;
    white-space: nowrap;
}

/* ===== ESTILOS PARA FILAS DE EVENTOS - CURSOR DEFAULT ===== */
.event-row {
    cursor: default;
}

/* ===== MODAL DE CONFIRMACIÓN ===== */
.modal-confirm {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-confirm.active {
    display: flex;
}

.modal-confirm-content {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-confirm-icon {
    text-align: center;
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.modal-confirm-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a263b;
    margin-bottom: 0.5rem;
}

.modal-confirm-message {
    text-align: center;
    color: #4a5a7a;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-confirm-message .highlight-text {
    color: #c62828;
    font-weight: 600;
}

.modal-confirm-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}

.modal-confirm-actions .btn-cancel-confirm {
    padding: 0.6rem 1.8rem;
    background: #eef3fc;
    color: #1a263b;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.modal-confirm-actions .btn-cancel-confirm:hover {
    background: #dbe1ed;
}

.modal-confirm-actions .btn-delete-confirm {
    padding: 0.6rem 1.8rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.modal-confirm-actions .btn-delete-confirm:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
}

/* ===== MODAL EVENTO ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a263b;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6a7a9a;
    transition: color 0.2s;
    padding: 0.2rem 0.5rem;
}

.modal-close:hover {
    color: #1a263b;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.8rem;
    color: #1f2a44;
    margin-bottom: 0.3rem;
}

.form-group label .required {
    color: #dc3545;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #dbe1ed;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: border 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2a3b5e;
    box-shadow: 0 0 0 3px rgba(42, 59, 94, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a7a9a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group small {
    display: block;
    color: #6a7a9a;
    font-size: 0.7rem;
    margin-top: 0.2rem;
}

.form-group input[readonly] {
    background: #f5f7fa;
    cursor: default;
}

.form-group input:disabled,
.form-group select:disabled {
    background: #f5f7fa;
    color: #6a7a9a;
    cursor: not-allowed;
    opacity: 0.85;
}

.btn-submit {
    width: 100%;
    padding: 0.8rem;
    background: #1a263b;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-submit:hover {
    background: #2f3f62;
}

.btn-cancel {
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    color: #6a7a9a;
    border: 1px solid #dbe1ed;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    margin-top: 0.5rem;
}

.btn-cancel:hover {
    background: #f5f7fa;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #1a263b;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 0.8rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    animation: slideUp 0.3s ease;
    max-width: 90%;
    text-align: center;
    font-size: 0.9rem;
}

.toast.success {
    background: #2e7d32;
}

.toast.error {
    background: #c62828;
}

.toast.warning {
    background: #e65100;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ===== CAMPO TÍTULO MÁS GRANDE ===== */
#eventTitle {
    font-size: 1.1rem !important;
    padding: 0.8rem !important;
    width: 100% !important;
    text-transform: uppercase;
}

/* Ocultar el campo de descripción */
.form-group-description {
    display: none !important;
}

/* Ajustar el modal para que el título sea más visible */
.form-group:has(#eventTitle) {
    margin-bottom: 1.5rem;
}

/* Hacer el select de sección más prominente */
#eventSection {
    font-size: 1rem !important;
    padding: 0.8rem !important;
    text-transform: uppercase;
}

/* Estilo para las secciones en la tabla */
.section-badge {
    font-weight: 700 !important;
    padding: 0.4rem 0.8rem !important;
    font-size: 0.8rem !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .main-layout {
        gap: 1rem;
    }
    .main-layout .right {
        width: 260px;
    }
    .events-table {
        min-width: 850px;
    }
}

@media (max-width: 900px) {
    body {
        padding: 1rem;
    }
    .main-layout {
        flex-direction: column-reverse;
        width: 100%;
    }
    .main-layout .right {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    .calendar-container {
        position: static;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
    .navbar {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem 1.2rem;
        border-radius: 1.5rem;
        width: 100%;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
        width: 100%;
    }
    .nav-links a {
        font-size: 0.85rem;
    }
    .page-title {
        font-size: 1.3rem;
    }
    .events-table {
        font-size: 0.8rem;
        min-width: 750px;
    }
    .events-container {
        padding: 1rem;
    }
    .filters-container {
        padding: 0.8rem 1rem;
        gap: 0.6rem;
        width: 100%;
    }
    .filter-input-text,
    .filter-select,
    .filter-time {
        min-width: 100px;
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        width: 100%;
        max-width: 100%;
    }
    .calendar-container {
        padding: 0.6rem;
        width: 100%;
    }
    .calendar-grid {
        width: 100%;
    }
    .calendar-day {
        font-size: 0.6rem;
        min-height: 28px;
        border-radius: 4px;
    }
    .filter-group {
        flex: 1;
        min-width: 120px;
    }
    .filter-actions {
        flex: 1;
        min-width: 100px;
    }
}

@media (max-width: 700px) {
    body {
        padding: 0.8rem;
    }
    .table-actions-row .actions-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
    .modal-confirm-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    .modal-confirm-actions {
        flex-direction: column;
    }
    .modal-confirm-actions .btn-cancel-confirm,
    .modal-confirm-actions .btn-delete-confirm {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .navbar {
        padding: 0.7rem 1rem;
        border-radius: 1.2rem;
        gap: 0.6rem;
        width: 100%;
    }
    .logo-icon {
        width: 48px;
        height: 48px;
    }
    .nav-links a {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    .nav-links a i {
        font-size: 0.8rem;
    }
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    .user-name {
        font-size: 0.75rem;
        max-width: 70px;
    }
    .logout-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }
    .page-header {
        margin-bottom: 1rem;
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    .page-title {
        font-size: 1.1rem;
        justify-content: center;
        width: 100%;
    }
    .page-title i {
        font-size: 1rem;
    }
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    .btn-primary {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
        width: 100%;
        justify-content: center;
    }
    .btn-primary i {
        font-size: 0.7rem;
    }
    .btn-primary .btn-text {
        font-size: 0.7rem;
    }
    .filters-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem;
        border-radius: 1.2rem;
        width: 100%;
    }
    .filter-group {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
        flex: none;
    }
    .filter-group label {
        min-width: 60px;
        font-size: 0.7rem;
    }
    .filter-input-text,
    .filter-select,
    .filter-time {
        flex: 1;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        font-size: 0.75rem;
    }
    .filter-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        flex: none;
    }
    .filter-actions .btn-filter-clear {
        flex: 1;
        justify-content: center;
    }
    .calendar-container {
        max-width: 100%;
        padding: 0.5rem;
        border-radius: 1.2rem;
        margin: 0;
        width: 100%;
    }
    .calendar-grid {
        justify-content: center;
        width: 100%;
    }
    .calendar-day {
        font-size: 0.6rem;
        min-height: 28px;
        border-radius: 4px;
    }
    .calendar-day-header {
        font-size: 0.5rem;
        padding: 0.2rem 0;
        text-align: center;
    }
    .calendar-nav {
        justify-content: center;
        flex: 1;
    }
    .calendar-nav button {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }
    .calendar-month-year {
        font-size: 0.75rem;
        min-width: 80px;
        text-align: center;
    }
    .btn-today-small {
        font-size: 0.55rem;
        padding: 0.15rem 0.5rem;
    }
    .calendar-header {
        justify-content: center;
    }
    .events-container {
        padding: 0.8rem;
        border-radius: 1.2rem;
        width: 100%;
    }
    .events-title {
        font-size: 0.85rem;
    }
    .events-count {
        font-size: 0.7rem;
    }
    .events-table {
        font-size: 0.7rem;
        min-width: 650px;
    }
    .events-table th {
        font-size: 0.6rem;
        padding: 0.4rem 0.4rem;
    }
    .events-table td {
        font-size: 0.7rem;
        padding: 0.4rem 0.4rem;
    }
    .btn-event-table {
        font-size: 0.55rem;
        padding: 0.15rem 0.4rem;
    }
    .event-priority-badge-table {
        font-size: 0.5rem;
        padding: 0.05rem 0.3rem;
    }
    .modal-content {
        padding: 1rem;
        border-radius: 1.2rem;
    }
    .modal-title {
        font-size: 1rem;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .form-group {
        margin-bottom: 0.8rem;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }
    .btn-submit,
    .btn-cancel {
        font-size: 0.85rem;
        padding: 0.7rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    .navbar {
        padding: 0.5rem 0.7rem;
        border-radius: 1rem;
        gap: 0.4rem;
        width: 100%;
    }
    .logo-icon {
        width: 100px;
        height: 40px;
    }
    .nav-links a {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    .nav-links a i {
        font-size: 0.7rem;
    }
    .nav-links a span {
        display: none;
    }
    .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }
    .user-name {
        font-size: 0.6rem;
        max-width: 40px;
    }
    .user-type {
        display: none;
    }
    .logout-btn {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    .logout-btn span {
        display: none;
    }
    .page-title {
        font-size: 0.95rem;
        justify-content: center;
    }
    .page-title i {
        font-size: 0.85rem;
    }
    .btn-primary {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
        width: 100%;
        justify-content: center;
    }
    .btn-primary i {
        font-size: 0.65rem;
    }
    .btn-primary .btn-text {
        font-size: 0.65rem;
    }
    .filters-container {
        padding: 0.6rem;
        gap: 0.4rem;
        width: 100%;
    }
    .filter-group label {
        font-size: 0.6rem;
        min-width: 50px;
    }
    .filter-input-text,
    .filter-select,
    .filter-time {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        border-radius: 8px;
    }
    .btn-filter-clear {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }
    .calendar-container {
        padding: 0.4rem;
        width: 100%;
    }
    .calendar-day {
        font-size: 0.5rem;
        min-height: 24px;
        border-radius: 3px;
    }
    .calendar-day-header {
        font-size: 0.45rem;
        padding: 0.15rem 0;
    }
    .calendar-nav button {
        width: 22px;
        height: 22px;
        font-size: 0.55rem;
    }
    .calendar-month-year {
        font-size: 0.65rem;
        min-width: 70px;
    }
    .btn-today-small {
        font-size: 0.5rem;
        padding: 0.1rem 0.4rem;
    }
    .events-container {
        padding: 0.6rem;
        width: 100%;
    }
    .events-title {
        font-size: 0.75rem;
    }
    .events-table {
        font-size: 0.6rem;
        min-width: 550px;
    }
    .events-table th {
        font-size: 0.55rem;
        padding: 0.3rem 0.3rem;
    }
    .events-table td {
        font-size: 0.6rem;
        padding: 0.3rem 0.3rem;
    }
    .btn-event-table {
        font-size: 0.5rem;
        padding: 0.1rem 0.3rem;
    }
    .event-empty {
        padding: 1.2rem;
    }
    .event-empty i {
        font-size: 2rem;
    }
    .event-empty p {
        font-size: 0.75rem;
    }
    .modal-confirm-content {
        padding: 1.2rem;
    }
    .modal-confirm-icon {
        font-size: 2.5rem;
    }
    .modal-confirm-title {
        font-size: 1rem;
    }
    .modal-confirm-message {
        font-size: 0.85rem;
    }
}

@media (max-width: 380px) {
    body {
        padding: 0.3rem;
    }
    .calendar-day {
        font-size: 0.45rem;
        min-height: 20px;
    }
    .events-table {
        min-width: 480px;
        font-size: 0.55rem;
    }
    .events-table th,
    .events-table td {
        padding: 0.2rem 0.2rem;
    }
    .btn-event-table {
        font-size: 0.45rem;
        padding: 0.05rem 0.2rem;
    }
}

/* Landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 0.5rem;
    }
    .navbar {
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.8rem;
        width: 100%;
    }
    .page-header {
        margin-bottom: 0.6rem;
    }
    .page-title {
        font-size: 1rem;
    }
    .filters-container {
        padding: 0.4rem 0.6rem;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .filter-group {
        flex: 1;
        min-width: 120px;
    }
    .calendar-container {
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
    .events-container {
        padding: 0.6rem;
    }
    .events-table {
        font-size: 0.65rem;
        min-width: 500px;
    }
    .modal-confirm-content {
        padding: 1rem;
        max-width: 400px;
    }
    .modal-confirm-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    .modal-confirm-message {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    .modal-confirm-actions {
        flex-direction: row;
    }
    .modal-confirm-actions .btn-cancel-confirm,
    .modal-confirm-actions .btn-delete-confirm {
        padding: 0.4rem 1.2rem;
        font-size: 0.8rem;
    }
}