/* PYMES AL MUNDO - Estilos base */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800&family=Barlow:wght@400;500;600;700&display=swap');

:root {
    --brand:        #202558;
    --brand-dark:   #161a3f;
    --accent:       #E84472;
    --accent-dark:  #c93360;
    --primary:      #202558;
    --primary-dark: #161a3f;
    --success:      #16a34a;
    --warning:      #ca8a04;
    --danger:       #dc2626;
    --gray-50:      #f8f9fa;
    --gray-100:     #f0f2f5;
    --gray-200:     #e5e7eb;
    --gray-300:     #d1d5db;
    --gray-600:     #6b7280;
    --gray-700:     #374151;
    --gray-800:     #202558;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    line-height: 1.6;
    color: var(--brand);
    background: #f0f2f5;
}

/* ── Header ── */
header {
    background: var(--brand);
    color: white;
    padding: 0 2.5rem;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(32,37,88,0.18);
}

header h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

header nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

header nav span {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-right: 0.75rem;
}

header nav a {
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    opacity: 0.85;
    transition: background 0.15s, opacity 0.15s;
}

header nav a:hover {
    background: rgba(255,255,255,0.12);
    opacity: 1;
}

/* ── Main ── */
main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
}

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(32,37,88,0.07);
}

.hero h2 {
    margin-bottom: 1rem;
    color: var(--brand);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 2rem;
}

/* ── Botones ── */
.btn {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Barlow', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    line-height: 1.3;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--brand);
    color: white;
}
.btn-primary:hover { background: var(--brand-dark); }

.btn-accent {
    background: var(--accent);
    color: white;
}
.btn-accent:hover { background: var(--accent-dark); }

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover { background: #15803d; }

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { background: #b91c1c; }

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}
.btn-secondary:hover { background: var(--gray-300); }

.btn-warning {
    background: var(--warning);
    color: white;
}
.btn-warning:hover { background: #a16207; }

/* ── Formularios ── */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--brand);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.875rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Barlow', sans-serif;
    color: var(--brand);
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(32,37,88,0.1);
}

/* ── Tablas ── */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(32,37,88,0.06);
}

th, td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background: var(--gray-50);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
}

tbody tr:hover {
    background: #f8f9fc;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ── Status badges ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-nueva            { background: #e0e7ff; color: #3730a3; }
.badge-perfil_incompleto{ background: #f3f4f6; color: #6b7280; }
.badge-aceptada         { background: #dcfce7; color: #15803d; }
.badge-rechazada        { background: #fee2e2; color: #dc2626; }
.badge-requiere_ajustes { background: #fef3c7; color: #b45309; }

/* ── Filtros ── */
.filters {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(32,37,88,0.06);
}

.filters select,
.filters input[type="text"] {
    padding: 0.45rem 0.875rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Barlow', sans-serif;
    color: var(--brand);
    background: white;
    transition: border-color 0.15s;
}

.filters select:focus,
.filters input[type="text"]:focus {
    outline: none;
    border-color: var(--brand);
}

/* ── Info grid para detalle ── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}

.info-item {
    padding: 0.875rem 1rem;
    background: #f8f9fc;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

.info-item label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.info-item span {
    font-weight: 600;
    color: var(--brand);
}

/* ── Tags ── */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--brand);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* ── Section headers ── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
}

.section-header h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    text-transform: uppercase;
    color: var(--brand);
    letter-spacing: 0.02em;
}

.section-header h3 {
    margin: 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--brand);
}

/* ── Back link ── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: color 0.15s;
}

.back-link:hover { color: var(--brand); }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 3.5rem;
    color: var(--gray-600);
    background: white;
    border-radius: 12px;
}

/* ── Table responsive ── */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
}

/* ── Links en tablas ── */
table a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}

table a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ── Alertas ── */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.alert-success { background: #dcfce7; color: #15803d; border-left: 4px solid #16a34a; }
.alert-error   { background: #fee2e2; color: #dc2626; border-left: 4px solid #dc2626; }
.alert-warning { background: #fef3c7; color: #b45309; border-left: 4px solid #ca8a04; }

/* ── Footer ── */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* ── Cards ── */
.card {
    background: white;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(32,37,88,0.07);
    margin-bottom: 1rem;
}

.card h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--brand);
}

/* ── Grid ── */
.grid {
    display: grid;
    gap: 1.25rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

    header {
        height: auto;
        padding: 1rem 1.25rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    header nav a { margin: 0 0.375rem; }

    main { padding: 1.25rem; }
}

/* ===================================
   WIZARD MULTI-STEP
   =================================== */

.wizard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.wizard-header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.wizard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.wizard-header p {
    opacity: 0.9;
}

/* Progress bar */
.wizard-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 0;
    position: relative;
}

.wizard-progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    cursor: default;
}

.wizard-progress-item::before {
    content: '';
    position: absolute;
    top: 16px;
    left: -50%;
    width: 100%;
    height: 3px;
    background: var(--gray-200);
    z-index: 0;
}

.wizard-progress-item:first-child::before {
    display: none;
}

.wizard-progress-item.completed::before,
.wizard-progress-item.active::before {
    background: var(--primary);
}

.wizard-progress-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    border: 3px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.wizard-progress-item.active .wizard-progress-number {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.wizard-progress-item.completed .wizard-progress-number {
    border-color: var(--success);
    background: var(--success);
    color: white;
}

.wizard-progress-label {
    font-size: 0.7rem;
    margin-top: 0.5rem;
    color: rgba(255,255,255,0.7);
    text-align: center;
    white-space: nowrap;
}

.wizard-progress-item.active .wizard-progress-label {
    color: white;
    font-weight: 600;
}

.wizard-progress-item.completed .wizard-progress-label {
    color: rgba(255,255,255,0.9);
}

/* Wizard card */
.wizard-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.wizard-step h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

/* Wizard form layout */
.wizard-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .wizard-form-row { grid-template-columns: 1fr; }
}

.wizard-form-row .form-group.full-width {
    grid-column: 1 / -1;
}

.required::after {
    content: ' *';
    color: var(--danger);
}

.help-text {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Wizard navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.wizard-nav .btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* Radio buttons group */
.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Checkbox inline */
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Phone selector */
.phone-input-group {
    display: flex;
    gap: 0.5rem;
}

.phone-code-select {
    flex: 0 0 190px;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
}

.phone-number-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 1rem;
}

.phone-number-input:focus,
.phone-code-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Country multi-select */
.country-multiselect {
    position: relative;
}

.country-search {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 1rem;
}

.country-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    margin-top: 0.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
    display: none;
}

.country-dropdown.open {
    display: block;
}

.country-option {
    padding: 0.625rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s;
}

.country-option:hover {
    background: var(--gray-100);
}

.country-option.selected {
    background: var(--primary);
    color: white;
}

.country-option.selected:hover {
    background: var(--primary-dark);
}

.selected-countries {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    min-height: 0;
}

.country-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.625rem;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
}

.country-chip button {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.country-chip button:hover {
    opacity: 1;
}

/* Dynamic lists */
.dynamic-list {
    margin-top: 0.5rem;
}

.dynamic-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.dynamic-item input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 1rem;
}

.dynamic-item input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-add {
    background: var(--gray-100);
    border: 1px dashed var(--gray-600);
    color: var(--gray-600);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.btn-add:hover {
    background: var(--gray-200);
}

.btn-remove {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    white-space: nowrap;
}

.btn-remove:hover {
    background: #b91c1c;
}

/* Product catalog cards */
.producto-card {
    background: var(--gray-100);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-200);
}

.producto-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.producto-card-header h4 {
    font-size: 1rem;
    color: var(--gray-800);
}

.image-preview {
    margin-top: 0.5rem;
}

.image-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    object-fit: cover;
}

/* Social media fields */
.social-field {
    position: relative;
}

.social-field .social-prefix {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-600);
    font-size: 0.875rem;
    pointer-events: none;
}

.social-field input {
    padding-left: 2rem;
}

/* Review page (step 6) */
.review-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.review-section:last-child {
    border-bottom: none;
}

.review-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.review-item.full-width {
    grid-column: 1 / -1;
}

.review-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--gray-600);
    text-transform: uppercase;
}

.review-value {
    color: var(--gray-800);
    font-size: 0.95rem;
}

.review-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.review-chip {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--gray-200);
    border-radius: 4px;
    font-size: 0.8rem;
}

.review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.review-product {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.review-product h4 {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.review-logo {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

/* Alert in wizard */
.wizard-alert {
    background: #fee2e2;
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Responsive wizard */
@media (max-width: 768px) {
    .wizard-container {
        padding: 1rem;
    }

    .wizard-card {
        padding: 1.25rem;
    }

    .wizard-progress-label {
        font-size: 0.6rem;
    }

    .wizard-progress-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .review-grid {
        grid-template-columns: 1fr;
    }

    .phone-input-group {
        flex-direction: column;
    }

    .phone-code-select {
        flex: 1;
    }
}
