/*
 * Hoja de estilos global para la documentación de la API RestMaster
 * Aplica a todos los controladores y endpoints
 */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #222;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header .icon {
    font-size: 2em;
    color: #e74c3c;
}

.header .subtitle {
    color: #7f8c8d;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.breadcrumb {
    background: #f8f9fa;
    color: #4b2995;
    border-radius: 8px;
    padding: 12px 24px;
    margin-bottom: 28px;
    font-size: 1.05em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: #2980b9;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card .icon {
    font-size: 1.2em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 5px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.endpoints-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.endpoints-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.endpoint-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
}

.endpoint-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.endpoint-method {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.method-get { background: #27ae60; }
.method-post { background: #e67e22; }

.endpoint-path {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.endpoint-description {
    font-size: 0.9em;
    opacity: 0.8;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list .check {
    color: #27ae60;
    font-weight: bold;
}

.auth-types {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: bold;
}

.auth-traditional { background: #3498db; color: white; }
.auth-jwt { background: #e74c3c; color: white; }

.models-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.models-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.model-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
}

.model-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.model-description {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.model-properties {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: #34495e;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .endpoints-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilos para endpoints individuales */
.endpoint {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 25px;
    margin: 20px 0;
    border-radius: 5px;
}

.endpoint h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.method {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    color: white;
    font-weight: bold;
    margin-right: 10px;
}

.get { background: #28a745; }
.post { background: #007bff; }
.put { background: #ffc107; color: #333; }
.delete { background: #dc3545; }

.url {
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 8px 12px;
    border-radius: 3px;
    color: #495057;
    font-size: 1rem;
}

.description {
    margin: 15px 0;
    color: #666;
    font-size: 1rem;
}

.parameters {
    margin: 20px 0;
}

.parameter {
    background: #f1f3f4;
    padding: 12px;
    margin: 8px 0;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

.parameter strong {
    color: #667eea;
}

.response {
    margin: 15px 0;
}

.response-code {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    color: white;
    font-weight: bold;
    margin-right: 10px;
    font-size: 0.9rem;
}

.success { background: #28a745; }
.error { background: #dc3545; }
.not-found { background: #ffc107; color: #333; }

.example {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.endpoint-list {
    list-style: none;
    padding-left: 0;
    margin: 10px 0 0 0;
}
.endpoint-list li {
    padding: 6px 0 6px 0;
    font-size: 1em;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}
.endpoint-list li:last-child {
    border-bottom: none;
}

.back-link {
    display: inline-block;
    background: #f8f9fa;
    color: #4b2995;
    padding: 10px 22px;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 18px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.back-link:hover {
    background: #e0e0e0;
    color: #764ba2;
}

.content-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 28px 28px 20px 28px;
    margin-bottom: 32px;
}

.content-card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.endpoint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.endpoint-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.endpoint-card:hover {
    transform: translateY(-3px);
}

.endpoint-card h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.endpoint-card .description {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-right: 5px;
    margin-bottom: 5px;
    background: #667eea;
    color: white;
}

.services-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.services-list h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.services-list ul {
    list-style: none;
    padding: 0;
}

.services-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.services-list li:last-child {
    border-bottom: none;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.warning-box h4 {
    color: #856404;
    margin-bottom: 10px;
}

.warning-box ul {
    color: #856404;
    margin: 10px 0;
}

.info-box {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    color: #222;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.info-box h4 {
    color: #1976d2;
    margin-bottom: 10px;
}

.info-box ul {
    color: #1976d2;
    margin: 10px 0;
}

/* ========================================
   ESTILOS ESPECÍFICOS PARA ENDPOINTS
   ======================================== */

/* Estilos para páginas de endpoints individuales */
.endpoint-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.endpoint-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.endpoint-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.endpoint-meta {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.endpoint-meta .method {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.endpoint-meta .path {
    font-family: 'Courier New', monospace;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.endpoint-meta .category {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.endpoint-meta .auth {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.endpoint-meta .auth.jwt {
    background: #e74c3c;
}

/* Secciones de contenido para endpoints */
.endpoint-description {
    margin: 15px 0;
    color: #666;
    font-size: 1rem;
}

.endpoint-parameters {
    margin: 20px 0;
}

.endpoint-examples {
    margin: 20px 0;
}

.endpoint-responses {
    margin: 20px 0;
}

.endpoint-notes {
    margin: 20px 0;
}

.endpoint-security {
    margin: 20px 0;
}

.endpoint-performance {
    margin: 20px 0;
}

.endpoint-footer {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

/* Tablas de parámetros */
.parameters-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.parameters-table th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.parameters-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

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

/* Tablas de respuestas */
.responses-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.responses-table th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.responses-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

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

/* Ejemplos de código */
.code-example {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
}

.code-example h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1rem;
}

.code-example pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.code-example code {
    font-family: 'Courier New', monospace;
}

/* Ejemplos de uso */
.example {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.example h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.example .request {
    margin-bottom: 15px;
}

.example .request h4 {
    color: #28a745;
    margin-bottom: 10px;
    font-size: 1rem;
}

.example .response {
    margin-top: 15px;
}

.example .response h4 {
    color: #007bff;
    margin-bottom: 10px;
    font-size: 1rem;
}

/* Notas importantes */
.important-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.important-note strong {
    color: #856404;
}

.warning-note {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.warning-note strong {
    color: #721c24;
}

.info-note {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.info-note strong {
    color: #0c5460;
}

/* Breadcrumbs mejorados */
.breadcrumb {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #2980b9;
}

.breadcrumb strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Enlaces de documentación */
.endpoint-links {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.endpoint-links a {
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.endpoint-links a:hover {
    background: #5a67d8;
}

/* Métodos HTTP específicos para endpoints */
.method.get { background: #28a745; }
.method.post { background: #007bff; }
.method.put { background: #ffc107; color: #333; }
.method.delete { background: #dc3545; }

/* Códigos de respuesta específicos */
.response-code.success { background: #28a745; }
.response-code.error { background: #dc3545; }
.response-code.not-found { background: #ffc107; color: #333; }
.response-code.unauthorized { background: #fd7e14; }
.response-code.forbidden { background: #6f42c1; }
.response-code.conflict { background: #e83e8c; }

/* Responsive para endpoints */
@media (max-width: 768px) {
    .endpoint-header h1 {
        font-size: 2rem;
    }
    
    .endpoint-meta {
        flex-direction: column;
        align-items: center;
    }
    
    .parameters-table,
    .responses-table {
        font-size: 0.9rem;
    }
    
    .parameters-table th,
    .parameters-table td,
    .responses-table th,
    .responses-table td {
        padding: 8px;
    }
    
    .example {
        padding: 15px;
    }
    
    .code-example pre {
        font-size: 0.8rem;
        padding: 10px;
    }
}

/* =============================
   ESTILO UNIFICADO ENDPOINTS
   ============================= */

h1, h2, h3, h4 {
    color: #4b2995;
    font-weight: 700;
    margin-bottom: 12px;
}

h2 {
    font-size: 1.7em;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
    margin-top: 18px;
}

h3 {
    font-size: 1.2em;
    margin-top: 12px;
}

.parameter, .parameters-table td, .parameters-table th {
    color: #333;
    font-size: 1em;
}

.parameters-table, .responses-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.parameters-table th, .responses-table th {
    background: #667eea;
    color: #fff;
    padding: 13px;
    text-align: left;
    font-weight: 600;
}

.parameters-table td, .responses-table td {
    padding: 13px;
    border-bottom: 1px solid #e0e0e0;
}

.parameters-table tr:last-child td, .responses-table tr:last-child td {
    border-bottom: none;
}

.parameters-table tr:hover, .responses-table tr:hover {
    background: #f8f9fa;
}

.example, .code-example {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px 20px;
    margin: 18px 0;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    color: #23272e;
}

.code-example pre, .example pre {
    background: #23272e;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.98em;
}

.info-box {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    color: #222;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.success {
    background: #e6f9ed;
    color: #218838;
    border-left: 4px solid #28a745;
    padding: 10px 18px;
    border-radius: 6px;
    margin: 10px 0;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
    padding: 10px 18px;
    border-radius: 6px;
    margin: 10px 0;
}

.not-found {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
    padding: 10px 18px;
    border-radius: 6px;
    margin: 10px 0;
}

.response-code {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1em;
    margin-right: 10px;
}

.response-code.success { background: #28a745; color: #fff; }
.response-code.error { background: #dc3545; color: #fff; }
.response-code.not-found { background: #ffc107; color: #333; }

/* Mejorar contraste de descripciones y textos secundarios */
.description, .endpoint-description, .parameter, .info-box, .warning-box, .example, .code-example {
    color: #222;
}

/* Botón de volver */
.back-link {
    display: inline-block;
    background: #f8f9fa;
    color: #4b2995;
    padding: 10px 22px;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 18px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.back-link:hover {
    background: #e0e0e0;
    color: #764ba2;
}

/* Responsive */
@media (max-width: 900px) {
    .content-card, .endpoint, .example, .response, .info-box, .warning-box {
        padding: 16px 8px;
    }
    .parameters-table th, .parameters-table td, .responses-table th, .responses-table td {
        padding: 8px;
    }
} 