/* ========================================
   TMA PRO SYSTEM - PANELES DE USUARIO
   ======================================== */

/* Layout Principal */
.tma-panel-wrap {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Sidebar */
.tma-panel-sidebar {
    width: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.tma-panel-user {
    text-align: center;
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 30px;
}

.tma-user-avatar {
    margin-bottom: 15px;
}

.tma-user-avatar img {
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
}

.tma-panel-user h3 {
    color: #fff;
    font-size: 1.2em;
    margin: 0 0 5px;
    font-weight: 600;
}

.tma-user-role {
    color: rgba(255,255,255,0.9);
    font-size: 0.9em;
    margin: 0;
}

/* Navegación */
.tma-panel-nav {
    padding: 0 15px;
}

.tma-panel-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tma-panel-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.tma-panel-nav a.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tma-nav-icon {
    font-size: 1.3em;
    width: 24px;
    text-align: center;
}

.tma-nav-logout {
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px !important;
}

/* Contenido Principal */
.tma-panel-content {
    flex: 1;
    padding: 40px;
    max-width: 1200px;
}

.tma-panel-header {
    margin-bottom: 40px;
}

.tma-panel-header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin: 0 0 10px;
    font-weight: 700;
}

.tma-panel-header p {
    color: #7f8c8d;
    font-size: 1.1em;
    margin: 0;
}

/* Stats Grid */
.tma-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tma-stat-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.tma-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.tma-stat-icon {
    font-size: 3em;
    flex-shrink: 0;
}

.tma-stat-info h3 {
    font-size: 2em;
    margin: 0 0 5px;
    color: #2c3e50;
    font-weight: 700;
}

.tma-stat-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9em;
}

.tma-stat-primary { border-left: 4px solid #3498db; }
.tma-stat-success { border-left: 4px solid #2ecc71; }
.tma-stat-warning { border-left: 4px solid #f39c12; }
.tma-stat-info { border-left: 4px solid #9b59b6; }

/* Cards */
.tma-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.tma-card h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin: 0 0 20px;
    font-weight: 600;
}

/* Dashboard Sections */
.tma-dashboard-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.tma-section-half {
    min-height: 200px;
}

/* Quick Actions */
.tma-quick-actions {
    margin-top: 40px;
}

.tma-quick-actions h2 {
    color: #2c3e50;
    font-size: 1.5em;
    margin: 0 0 20px;
}

.tma-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.tma-action-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 25px;
    border-radius: 15px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tma-action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.tma-action-icon {
    font-size: 2.5em;
}

/* Quick Links */
.tma-quick-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tma-quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.tma-quick-link:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.tma-quick-link span:first-child {
    font-size: 1.5em;
}

/* Empty States */
.tma-empty-state {
    text-align: center;
    padding: 60px 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.tma-empty-state-small {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
}

.tma-empty-icon {
    font-size: 5em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.tma-empty-state h3 {
    color: #2c3e50;
    font-size: 1.5em;
    margin: 0 0 10px;
}

.tma-empty-state p {
    color: #7f8c8d;
    margin: 0 0 20px;
}

/* Formularios */
.tma-perfil-form,
.tma-config-form {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.tma-form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.tma-form-section:last-of-type {
    border-bottom: none;
}

.tma-form-section h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin: 0 0 20px;
    font-weight: 600;
}

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

.tma-form-group {
    margin-bottom: 20px;
}

.tma-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.tma-input,
.tma-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.tma-input:focus,
.tma-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.tma-textarea {
    resize: vertical;
    min-height: 100px;
}

.tma-help {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #7f8c8d;
}

/* Botones */
.tma-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tma-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.tma-btn-search {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tma-btn-upgrade {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    padding: 12px 30px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tma-btn-upgrade:hover {
    transform: scale(1.05);
}

/* Búsqueda */
.tma-search-section {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.tma-search-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-items: end;
}

.tma-search-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

/* Info Box */
.tma-info-box {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 10px;
    padding: 20px;
    color: #1565c0;
    text-align: center;
}

/* Upgrade Banner */
.tma-upgrade-banner {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-radius: 15px;
    padding: 30px;
    color: #fff;
    text-align: center;
    margin-top: 40px;
}

.tma-upgrade-content h3 {
    font-size: 1.8em;
    margin: 0 0 10px;
}

.tma-upgrade-content p {
    margin: 0 0 20px;
    font-size: 1.1em;
    opacity: 0.95;
}

/* Documentos Grid */
.tma-documentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.tma-doc-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.tma-doc-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.tma-doc-card h4 {
    color: #2c3e50;
    margin: 0 0 10px;
    font-size: 1.1em;
}

.tma-doc-status {
    color: #27ae60;
    font-weight: 600;
    margin: 0;
}

/* Checkbox Groups */
.tma-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tma-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.tma-checkbox-group label {
    margin: 0;
    cursor: pointer;
    color: #2c3e50;
}

/* Responsive */
@media (max-width: 1024px) {
    .tma-panel-wrap {
        flex-direction: column;
    }
    
    .tma-panel-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .tma-panel-content {
        padding: 20px;
    }
    
    .tma-search-row {
        grid-template-columns: 1fr;
    }
    
    .tma-dashboard-sections {
        grid-template-columns: 1fr;
    }
    
    .tma-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tma-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tma-panel-header h1 {
        font-size: 1.8em;
    }
}