/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* Layout principal */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ecf0f1;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-role {
    font-size: 12px;
    color: #bdc3c7;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 15px 25px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: #e74c3c;
}

.nav-item.active {
    background: rgba(231, 76, 60, 0.2);
    border-left-color: #e74c3c;
}

.nav-item i {
    margin-right: 10px;
    width: 16px;
}

/* Contenido principal */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 0;
}

.top-bar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.page-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

.content-area {
    padding: 30px;
}

/* Cards y métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #ecf0f1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

.metric-change {
    font-size: 12px;
    margin-top: 8px;
}

.metric-change.positive {
    color: #27ae60;
}

.metric-change.negative {
    color: #e74c3c;
}

/* Sección de contenido */
.content-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.section-header {
    padding: 25px 30px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.section-content {
    padding: 30px;
}

/* Tablas */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    font-size: 14px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 14px;
}

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

/* Estados */
.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status.success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.status.warning {
    background: rgba(241, 196, 15, 0.1);
    color: #f39c12;
}

.status.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.status.processing {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

/* Botones */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

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

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #e74c3c;
}

/* Alertas */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert.warning {
    background: rgba(241, 196, 15, 0.1);
    border-left: 4px solid #f39c12;
    color: #d68910;
}

/* Gráficos simulados */
.chart-placeholder {
    height: 200px;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.05));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        padding: 20px;
    }
}

/* Utilidades */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none; }

