
body { margin:0;font-family:Inter,system-ui;background:#0f172a;color:#e5e7eb;}
.container{display:flex;height:100vh;}
.sidebar{width:320px;background:#020617;border-right:1px solid #1e293b;padding:20px;overflow-y:auto;}
.sidebar h2{color:#38bdf8; margin-bottom: 20px;}

.sidebar-nav { margin: 20px 0; }
.nav-item {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    color: #94a3b8;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    font-size: 0.95em;
}
.nav-item:hover { background: #1e293b; color: #e5e7eb; }
.nav-item.active { background: #38bdf8; color: #020617; font-weight: bold; }

.search-container { margin: 20px 0; padding-top: 20px; border-top: 1px solid #1e293b; }
.sidebar input{width:100%;padding:8px;border-radius:6px;border:1px solid #1e293b;background:#020617;color:#e5e7eb;}

.sidebar ul{list-style:none;padding:0;margin-top: 10px;}
.sidebar li{padding:10px;margin-bottom:6px;border-radius:6px;cursor:pointer;font-size: 0.9em;}
.sidebar li:hover{background:#1e293b;}

.method{font-weight:bold;margin-right:8px;}
.GET{color:#22c55e;}
.POST{color:#38bdf8;}
.PUT{color:#f59e0b;}
.DELETE{color:#ef4444;}

.content{flex:1;padding:0;overflow-y:auto;background:#0f172a;}
pre{background:#020617;padding:15px;border-radius:6px;border:1px solid #1e293b;overflow-x:auto;font-size:0.9em;line-height:1.5;}

/* Layout de dos columnas */
.endpoint-container {
    display: flex;
    min-height: 100%;
}

.endpoint-info {
    flex: 1;
    padding: 40px;
    /*max-width: 600px;*/
    border-right: 1px solid #1e293b;
}

.endpoint-code {
    flex: 1;
    background: #020617;
    padding: 40px;
}

.sticky-code {
    position: sticky;
    top: 40px;
}

.url-box {
    background: #1e293b;
    padding: 12px;
    border-radius: 6px;
    margin: 20px 0;
}

.url-box code {
    color: #38bdf8;
}

.description-section {
    margin: 30px 0;
}

.text-content {
    line-height: 1.6;
    color: #94a3b8;
}

.text-content a {
    color: #38bdf8;
    text-decoration: none;
    border-bottom: 1px dotted #38bdf8;
}

.links_ref{
    color: #38bdf8 !important;
    text-decoration: none;
}

.text-content a:hover {
    color: #7dd3fc;
    border-bottom-style: solid;
}

.text-content code {
    background: #1e293b;
    padding: 2px 5px;
    border-radius: 4px;
    color: #e5e7eb;
}

.no-data {
    color: #64748b;
    font-style: italic;
}

/* Status Badges y Formato de Respuesta */
.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    margin-right: 10px;
}
.status-success { color: #22c55e; border: 1px solid #22c55e; }
.status-warnign { color: #ff8000; border: 1px solid #ff8000; }
.status-error { color: #ef4444; border: 1px solid #ef4444; }

pre.status-success { border-left: 4px solid #22c55e; }
pre.status-warnign { border-left: 4px solid #ff8000; }
pre.status-error { border-left: 4px solid #ef4444; }

.response-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #94a3b8;
}

.response-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #020617;
    border-radius: 8px;
    border: 1px solid #1e293b;
}

/* Home Styles */
.home-container { /*padding: 60px;*/ max-width: 900px; margin: 0 auto; }
.home-container h1 { color: #38bdf8; font-size: 2.5em; margin-bottom: 20px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 40px; }
.home-card { background: #020617; border: 1px solid #1e293b; padding: 30px; border-radius: 12px; cursor: pointer; transition: transform 0.2s, border-color 0.2s; }
.home-card:hover { transform: translateY(-5px); border-color: #38bdf8; }
.home-card i { font-size: 2em; color: #38bdf8; margin-bottom: 15px; }

/* Error Table Styles */
.errors-container { padding: 40px; max-width: 1000px; margin: 0 auto; }
.error-table { width: 100%; border-collapse: collapse; margin-top: 30px; background: #020617; border-radius: 8px; overflow: hidden; }
.error-table th, .error-table td { padding: 15px; text-align: left; border-bottom: 1px solid #1e293b; }
.error-table th { background: #1e293b; color: #38bdf8; }
.error-table td:first-child { font-family: monospace; color: #ef4444; font-weight: bold; }

/* Ajuste para la sección de tipos de datos */
#endpoint-detail:has(.data-type-section), 
#endpoint-detail:has(.errors-container),
#endpoint-detail:has(.video-grid),
#endpoint-detail:has(.home-container) {
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.data-type-section {
    margin-bottom: 40px;
}
.data-type-section h3 {
    color: #38bdf8;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 10px;
    margin-top: 30px;
}
.type-card {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.type-card h4 {
    margin-top: 0;
    color: #f59e0b;
    font-family: monospace;
    font-size: 1.2em;
}
.type-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.type-table th, .type-table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #1e293b;
}
.type-table th {
    color: #94a3b8;
    font-size: 0.9em;
    text-transform: uppercase;
}
.type-table td:first-child {
    font-family: monospace;
    color: #22c55e;
    font-weight: bold;
    width: 80px;
}

/* Botones de Copiado */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    margin-top: 20px;
}
.code-header h3 { margin: 0; }
.copy-btn {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.copy-btn:hover {
    background: #334155;
    color: #e5e7eb;
}
.copy-btn.copied {
    background: #065f46;
    color: #34d399;
    border-color: #059669;
}

/* Botón Postman */
.download-section {
    margin: 30px 0;
}
.postman-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ef5b25;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}
.postman-btn:hover {
    background: #ff6c37;
}

.list_fields li{
    
    margin-bottom: 15px; /* Espacio debajo de cada elemento */
}

.json-tree-table {
  width: 100%;
  border-collapse: collapse;
  background: #111;
  color: #eee;
  font-size: 14px;
}

.json-tree-table th,
.json-tree-table td {
  border: 1px solid #333;
  padding: 8px;
}

.json-tree-table th {
  background: #1e1e1e;
  text-align: left;
}

.tree-node {
  font-family: monospace;
  color: #6ab7ff;
}

.editable {
  background: #161616;
  outline: none;
}

.editable:focus {
  background: #222;
  box-shadow: inset 0 0 0 1px #6ab7ff;
}

.error {
  color: #ff6b6b;
  text-align: center;
}

.required {
  color: #ff6b6b;
  margin-left: 6px;
  font-weight: bold;
}

/*button Up*/
.h-top-link, .h-top-link:hover {
    display: none;
    cursor: pointer;
    width: 48px;
    height: 48px;
    text-align: center;
    background: #ff3c41;
    color: #fff;
    position: fixed;
    right: 30px;
    bottom: 30px;
}

.h-top-link i {
    margin-top: 16px;
}

.inline-code {
  background-color: #1e1e1e;
  color: #9cdcfe;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
}



/*Controles*/

.verifactu-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #0f172a;
    color: #e5e7eb;
}

.verifactu-table th {
    background: #020617;
    color: #93c5fd;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #1e293b;
}

.verifactu-table td {
    padding: 12px;
    border-bottom: 1px solid #1e293b;
    vertical-align: top;
}

.verifactu-table tr:hover {
    background: #020617;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 4px;
}

.badge.required { background:#7f1d1d; color:#fecaca; }
.badge.conditional { background:#78350f; color:#fde68a; }
.badge.fiscal { background:#075985; color:#bae6fd; }
.badge.logic { background:#064e3b; color:#a7f3d0; }

code {
    background: #020617;
    color: #93c5fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}


.endpoint-group {
    margin-top: 20px;
}

.group-title {
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    padding: 10px 15px;
    margin: 0;
    border-left: 3px solid #4CAF50;
    background: rgba(0,0,0,0.03);
}

.group-title.webhook {
    border-left: 3px solid #ff9800;
    color: #ff9800;
}

.endpoint-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.endpoint-group li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
}

.endpoint-group li:hover {
    background: rgba(222, 222, 222, 0.2);
}

.endpoint-group li.active {
    background: linear-gradient(
        90deg,
        rgba(0, 191, 255, 0.25),
        rgba(0, 191, 255, 0.05)
    );
    border-left: 3px solid #00bfff;
}


.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    transition: transform 0.2s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-frame iframe {
    width: 100%;
    height: 180px;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    font-size: 16px;
    margin: 0 0 8px;
    color: #fff;
}

.video-info p {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 10px;
}

.video-category {
    font-size: 11px;
    background: #00bfff;
    color: #000;
    padding: 3px 8px;
    border-radius: 5px;
}

.video-fallback {
    display: block;
    text-align: center;
    padding: 40px;
    color: #00bfff;
    text-decoration: none;
}

