/* Tarjetas y Secciones */
.card {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    color: var(--text-primary);
}

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

/* Calendario */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    background: var(--surface-color);
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.day-header {
    text-align: center;
    font-weight: 600;
    padding: 0.5rem;
    color: var(--text-secondary);
}

.calendar-day {
    aspect-ratio: 1;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.5rem;
    position: relative;
    cursor: pointer;
}

.calendar-day:hover {
    background-color: var(--background-color);
}

.day-number {
    font-size: 0.875rem;
    font-weight: 500;
}

.activity-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
}

.has-activity {
    background-color: rgba(37, 99, 235, 0.05);
}

/* Mensajes */
.success-message {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.error-message {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.75rem;
    border-radius: 0.5rem;
}

/* Modales Responsive */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: fadeInUp 0.3s ease;
}

@media (min-width: 768px) {
    .modal-content {
        padding: 2.5rem;
    }
}

/* Gestión de Usuarios */
.scrollable-box {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.scrollable-select-box {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.scrollable-select-box select {
    border: none;
    width: 100%;
}

.modal-lg {
    max-width: 600px;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }

.form-row { 
    display: flex; 
    flex-direction: column;
    gap: 1rem; 
}

@media (min-width: 768px) {
    .form-row { flex-direction: row; }
}

.col { flex: 1; }
.d-block { display: block; }

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-active { background-color: var(--success); }
.status-inactive { background-color: var(--secondary-color); }

/* Paginación */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-dots {
    color: var(--text-secondary);
    padding: 0 0.25rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(0,0,0,0.05);
}

.animate-slide {
    animation: slideUp 0.5s ease-out;
}

/* Section Titles in Modals */
.form-section {
    background: rgba(0,0,0,0.02);
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .form-section {
    background: rgba(255,255,255,0.03);
}

.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Badges and Pills */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.code-badge {
    font-family: 'Courier New', monospace;
    background: var(--background-color);
    padding: 0.25rem 0.5rem;
    border-radius: 0.4rem;
    border: 1px dashed var(--border-color);
    font-weight: 600;
    color: var(--secondary-color);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pill.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-pill.active::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

.status-pill.inactive {
    background: rgba(100, 116, 139, 0.1);
    color: var(--secondary-color);
}

.status-pill.inactive::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--secondary-color);
    border-radius: 50%;
}

/* Icon Actions */
.btn-icon-action {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-action:hover {
    background: var(--background-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Search Wrapper */
.search-wrapper {
    position: relative;
    max-width: 300px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-wrapper .form-control {
    padding-left: 2.75rem;
}

.font-bold { font-weight: 700; }
