/* ============================================================================
   SGSST ADMIN - Panel de Administración
   Ubicación: /css/sgsst_admin.css
   ============================================================================ */

/* ▸ Encabezado de página */
#admin-sgsst .page-header {
    margin-bottom: 1.5rem;
}

#admin-sgsst .page-header h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#admin-sgsst .page-header h2 i {
    color: #22c55e;
}

#admin-sgsst .page-header p {
    color: #6b7280;
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
}

/* ▸ Tabs de navegación principal */
.sgsst-admin-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0;
}

.sgsst-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.sgsst-tab:hover {
    color: #22c55e;
}

.sgsst-tab.active {
    color: #22c55e;
    border-bottom-color: #22c55e;
}

.sgsst-tab i {
    font-size: 0.875rem;
}

/* ▸ Contenido de tabs */
.sgsst-tab-content {
    display: none;
}

.sgsst-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ▸ Sub-tabs */
.sgsst-subtabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.sgsst-subtab {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    color: #4b5563;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.sgsst-subtab:hover {
    background: #e5e7eb;
}

.sgsst-subtab.active {
    background: #22c55e;
    color: white;
}

.sgsst-subtab-content {
    display: none;
}

.sgsst-subtab-content.active {
    display: block;
}

/* ▸ Métricas Grid */
.sgsst-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
    .sgsst-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sgsst-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.sgsst-metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sgsst-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sgsst-metric-card.alert {
    border-left: 4px solid #ef4444;
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.metric-icon.bg-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.metric-icon.bg-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.metric-icon.bg-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.metric-icon.bg-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.metric-icon.bg-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.metric-icon.bg-pink { background: linear-gradient(135deg, #ec4899, #be185d); }

.metric-info {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* ▸ Dashboard Grid */
.sgsst-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .sgsst-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ▸ Paneles */
.sgsst-panel {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sgsst-panel.full-width {
    grid-column: 1 / -1;
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-title i {
    color: #22c55e;
}

/* ▸ Barras de cumplimiento */
.cumplimiento-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cumplimiento-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cumplimiento-label {
    flex: 0 0 200px;
    font-size: 0.875rem;
    color: #4b5563;
}

.cumplimiento-bar-container {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.cumplimiento-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.cumplimiento-bar.success { background: linear-gradient(90deg, #22c55e, #16a34a); }
.cumplimiento-bar.warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.cumplimiento-bar.danger { background: linear-gradient(90deg, #ef4444, #dc2626); }

.cumplimiento-percent {
    flex: 0 0 50px;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: right;
}

/* ▸ Lista de alertas */
.alerts-panel {
    max-height: 350px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.alerts-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #e5e7eb;
}

.alert-item.critica { border-left-color: #ef4444; background: #fef2f2; }
.alert-item.alta { border-left-color: #f59e0b; background: #fffbeb; }
.alert-item.media { border-left-color: #eab308; background: #fefce8; }
.alert-item.baja { border-left-color: #6b7280; }

.alert-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7280;
    flex-shrink: 0;
}

.alert-item.critica .alert-indicator { background: #ef4444; animation: pulse 1.5s infinite; }
.alert-item.alta .alert-indicator { background: #f59e0b; }
.alert-item.media .alert-indicator { background: #eab308; }

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-content strong {
    display: block;
    font-size: 0.875rem;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert-content p {
    margin: 0;
    font-size: 0.75rem;
    color: #6b7280;
}

.alert-date {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* ▸ Estadísticas de accidentes */
.accidentes-stats {
    display: flex;
    gap: 2rem;
    justify-content: space-around;
    flex-wrap: wrap;
}

.accidente-stat {
    text-align: center;
    padding: 1rem;
}

.accidente-stat .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    display: block;
}

.accidente-stat.warning .stat-number {
    color: #ef4444;
}

.accidente-stat .stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

/* ▸ Toolbar */
.sgsst-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-box input {
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    width: 250px;
}

.search-box input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* ▸ Tablas */
.sgsst-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

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

.sgsst-table th {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #4b5563;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.sgsst-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

.sgsst-table tbody tr:hover {
    background: #f9fafb;
}

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

.loading-row, .empty-row, .error-row {
    text-align: center;
    color: #6b7280;
    padding: 2rem !important;
}

.error-row {
    color: #ef4444;
}

.empleado-info strong {
    display: block;
    color: #1f2937;
}

.empleado-info small {
    color: #6b7280;
}

/* ▸ Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: #f3f4f6; color: #4b5563; }

.text-muted { color: #9ca3af; }
.text-success { color: #22c55e; }
.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }

/* ▸ Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: #22c55e;
    color: white;
}

.btn-primary:hover {
    background: #16a34a;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: white;
    border: 1px solid #d1d5db;
    color: #4b5563;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 0.375rem;
    color: #6b7280;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #22c55e;
}

.btn-icon.text-danger:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* ▸ Formularios */
.sgsst-form-panel {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sgsst-form-panel h4 {
    margin: 0 0 1.5rem;
    color: #1f2937;
    font-size: 1.125rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-group input.readonly-field {
    background: #f3f4f6;
    color: #6b7280;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.125rem;
}

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

/* ▸ Selector de participantes */
.participantes-selector {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.participantes-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.participantes-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
}

.participante-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.participante-item:hover {
    background: #f3f4f6;
}

.participante-item input {
    width: auto;
}

/* ▸ Form Tabs (dentro de modales) */
.form-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.form-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}

.form-tab:hover {
    color: #22c55e;
}

.form-tab.active {
    color: #22c55e;
    border-bottom-color: #22c55e;
}

.form-tab-content {
    display: none;
}

.form-tab-content.active {
    display: block;
}

/* ▸ Indicadores Grid */
.indicadores-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1000px) {
    .indicadores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.indicador-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.indicador-card h4 {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.indicador-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

.indicador-formula {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

.indicador-meta {
    font-size: 0.75rem;
    color: #22c55e;
    margin-top: 0.25rem;
}

/* ▸ Configuración */
.config-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .config-sections {
        grid-template-columns: 1fr;
    }
}

/* ▸ Modales */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    animation: modalIn 0.3s ease;
}

.modal-content.modal-lg {
    max-width: 700px;
}

.modal-content.modal-sm {
    max-width: 450px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 12px 12px 0 0;
}

.modal-header.bg-green { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
.modal-header.bg-pink { background: linear-gradient(135deg, #ec4899, #be185d); color: white; }
.modal-header.bg-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); color: white; }

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ▸ Firma Digital */
.firma-instruccion {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.firma-capacitacion {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.firma-canvas-container {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

#firmaCanvas {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: crosshair;
    touch-action: none;
}

.firma-canvas-container button {
    margin-top: 0.5rem;
}

/* ▸ Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin: 0;
}

/* ▸ Loading Placeholder */
.loading-placeholder {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.loading-placeholder i {
    margin-right: 0.5rem;
}

/* ▸ Asistencia inputs */
.asistencia-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8125rem;
}

.nota-input {
    width: 70px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8125rem;
    text-align: center;
}

/* ▸ Animación pulse */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ▸ Responsive */
@media (max-width: 768px) {
    .sgsst-admin-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sgsst-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .sgsst-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left, .toolbar-right {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .cumplimiento-item {
        flex-wrap: wrap;
    }
    
    .cumplimiento-label {
        flex: 1 0 100%;
        margin-bottom: 0.25rem;
    }
}

<style>
/* Overlay del modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Contenedor del modal */
.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header del modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Body del modal */
.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Pestañas del formulario */
.form-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
    gap: 5px;
    flex-wrap: wrap;
}

.form-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.form-tab:hover {
    color: #22c55e;
    background: #f0fdf4;
}

.form-tab.active {
    color: #22c55e;
    border-bottom-color: #22c55e;
    font-weight: 600;
}

/* Contenido de pestañas */
.form-tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grid del formulario */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: #22c55e;
    width: 16px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-control:read-only {
    background: #f3f4f6;
    color: #6b7280;
}

textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

.text-muted {
    color: #9ca3af;
    font-size: 12px;
}

/* Footer del modal */
.modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* Botones */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-tabs {
        overflow-x: auto;
    }
    
    .modal-container {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
}