/* ---- Reset suave ---- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Fondo premium institucional */
    background:
        linear-gradient(135deg, rgba(0, 128, 89, 0.12), rgba(0, 163, 255, 0.10)),
        radial-gradient(circle at top center, #ffffff, #f2f6f7, #e9eff0);
    backdrop-filter: blur(3px);

    color: #111827;
}

/* ---- Encabezado con logos ---- */
.site-header {
    background: #ffffffcc;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #00a859;
}

/* ✅ NUEVO: header solo 2 logos (izq y der) + más grandes */
.site-header-inner.header-logos-fixed{
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 16px; /* un poquito más alto */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo-left,
.logo-right{
    display:flex;
    align-items:center;
}

.logo-left img{
    height: 62px;        /* ✅ más grande */
    width: auto;
    display:block;
}

.logo-right img{
    height: 70px;        /* ✅ más grande */
    width: auto;
    display:block;
}

/* ================================
   🔧 AJUSTE FINO LOGO INFOP
   Lo mueve un poco a la izquierda
   ================================ */
.logo-right{
    margin-right: 42px;
}



/* Responsive: que no se rompa en móvil */
/* ==============================
   AJUSTE DASHBOARD MOBILE
   NO TOCAR CSS ORIGINAL
============================== */
@media (max-width: 768px){

  .app-menu-wrap{ position: relative; }

.app-menu-wrap::after{
  content:"";
  position:absolute;
  top:0; right:0;
  width:28px; height:100%;
  pointer-events:none;
  background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
  border-radius: 16px;

  /* NAV tipo app con swipe horizontal */
  .app-menu{
    position: sticky;
    top: 8px;
    z-index: 50;

    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 10px 10px;
    scroll-snap-type: x mandatory;
  }

  .app-menu::-webkit-scrollbar{
    height: 6px;
  }

  .app-menu a{
    flex: 0 0 auto;
    min-width: 92px;          /* ancho de cada “botón app” */
    text-align: center;
    scroll-snap-align: start;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 10px 12px;
    border-radius: 12px;
  }

  .app-menu a i{
    font-size: 18px;
    margin-bottom: 6px;
  }

  .app-menu a span{
    font-size: 12px;
    line-height: 1.1;
    white-space: nowrap;
  }

/* ====== (TU CSS ORIGINAL DEBAJO, SIN CAMBIOS) ====== */

.site-header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-left img {
    height: 40px;
}

.brand-right img {
    height: 60px;
}

/* ---- Contenedor principal ---- */
.site-main {
    max-width: 1000px;
    margin: 24px auto 40px;
    padding: 0 16px;
}

/* Tarjeta del formulario */
.form-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px 32px;
    max-width: 900px;
    margin: 20px auto;
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.18),
        0 4px 12px rgba(148, 163, 184, 0.12);
    border-top: 4px solid #0f8059;
    transition: 0.2s ease-in-out;
}

/* Cabecera de la tarjeta */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.form-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.form-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.badge-empresa {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: #eff6ff;
    border-radius: 999px;
    padding: 5px 12px;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Títulos de sección */
.section-title {
    font-size: 15px;
    font-weight: 600;
    margin: 18px 0 8px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title span.step {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grillas de campos */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.form-grid.full-width {
    grid-template-columns: minmax(0, 1fr);
}

.field-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #374151;
}

.field-group small {
    font-size: 11px;
    color: #9ca3af;
}

/* Inputs */
.field-group input,
.field-group select,
.field-group textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    background: #f9fafb;
}

.field-group textarea {
    resize: vertical;
    min-height: 60px;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #bfdbfe;
    background: #ffffff;
}

/* Botón principal */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    background: #00a859;
    color: #ffffff;
    border-radius: 999px;
    padding: 9px 20px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.45);
    transition: transform .12s ease, box-shadow .12s ease, background .12s;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(16, 185, 129, 0.55);
}

.btn-primary span.icon {
    font-size: 15px;
}

/* HEADER CENTRADO Y ELEGANTE */
.center-header {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

.logos-row {
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo-small {
    height: 48px;
    opacity: 0.95;
}

.logo-large {
    height: 55px;
    opacity: 0.95;
}

.logo-small:hover,
.logo-large:hover {
    opacity: 1;
    transition: 0.2s ease;
}

/* === Listado de cursos (checkboxes) para Solicitud de cursos === */
.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 16px;
    margin: 10px 0 24px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1f2933;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* === Badges de estado para la vista de empresa === */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #e6f6e9;
    color: #0f8133;
}

.badge-danger {
    background: #fde8e8;
    color: #b91c1c;
}

.badge-warning {
    background: #fff4e5;
    color: #92400e;
}

.badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

/* === Tabla para solicitudes de empresa === */
.table-wrapper {
    overflow-x: auto;
}

.table-solicitudes {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table-solicitudes th,
.table-solicitudes td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.table-solicitudes th {
    font-weight: 600;
    color: #4b5563;
    background: #f9fafb;
}

/* ===============================
   VALIDACIONES + WIZARD (PASOS)
   =============================== */

/* Mensaje de error debajo del campo */
.field-error {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 4px;
}

/* Bordes rojo/verde para inputs */
.input-invalid,
select.input-invalid,
textarea.input-invalid {
    border: 1px solid #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18) !important;
    background: #fff !important;
}

.input-valid,
select.input-valid,
textarea.input-valid {
    border: 1px solid #22c55e !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.14) !important;
    background: #fff !important;
}

/* ===== Wizard / pasos ===== */
.steps-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 18px;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 2px solid #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #1d4ed8;
    background: #eff6ff;
    font-weight: 700;
}

.step-circle.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.step-circle.done {
    border-color: #00a859;
    background: #00a859;
    color: #ffffff;
}

/* Mostrar/ocultar pasos (IMPORTANTE para que sea 1 pantalla por paso) */
.form-step { display: none !important; }
.form-step.form-step-active { display: block !important; }

/* Botones del wizard */
.wizard-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
}

.btn-secondary-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 14px;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease;
}

.btn-secondary-outline:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

/* Botón siguiente */
.btn-next {
    background: #2563eb;
    border: none;
    color: #ffffff;
    padding: 9px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.btn-next:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.30);
}

/* =========================
   ALERTA PREMIUM (ÉXITO/ERROR)
   ========================= */
.alert {
    border-radius: 14px;
    padding: 14px 16px;
    margin: 14px 0 18px;
    font-size: 14px;
    line-height: 1.35;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
    border: 1px solid transparent;
}

.alert strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(0,168,89,.12), rgba(34,197,94,.10));
    border-color: rgba(0,168,89,.35);
    color: #065f46;
}

.alert-success::before {
    content: "✅";
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    background: rgba(0,168,89,.18);
    color: #065f46;
    font-weight: 700;
}

.alert-error {
    background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(248,113,113,.10));
    border-color: rgba(239,68,68,.35);
    color: #991b1b;
}

.alert-error::before {
    content: "⚠️";
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    background: rgba(239,68,68,.18);
    color: #991b1b;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {

  body { font-size: 14px; }

  .container,
  .contenedor,
  .wrapper,
  .content,
  .main-content {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }

  input, select, textarea {
    width: 100%;
    max-width: 100%;
    font-size: 16px; /* evita zoom iPhone */
    box-sizing: border-box;
  }

  /* Si estas clases son contenedores, esto los acomoda en columna */
  .row,
  .form-row,
  .filters,
  .actions,
  .header-actions {
    display: flex;           /* 👈 agrega esto */
    flex-direction: column;
    gap: 10px;
  }

  button, .btn {
    width: 100%;
    max-width: 100%;
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    width: 100%;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    border-collapse: collapse;
  }

  .card, .panel, .box { width: 100%; }

  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-right img { height: 48px; }

  .form-card { padding: 18px 16px 22px; }

  .form-grid { grid-template-columns: minmax(0, 1fr); }

  .wizard-buttons { flex-direction: column; }

  .btn-next,
  .btn-secondary-outline,
  .btn-primary {
    width: 100%;
    justify-content: center;
  }
}
