/* IberoGlobe Profiles v45 */
:root {
    --igp-blue: #0b4ea2;
    --igp-cyan: #16b7d8;
    --igp-pink: #e94888;
    --igp-green: #19a974;
    --igp-orange: #f59e0b;
    --igp-red: #dc2626;
    --igp-dark: #102033;
    --igp-muted: #64748b;
    --igp-border: #e5eaf2;
    --igp-bg: #f5f8fc;
    --igp-card: #ffffff;
    --igp-shadow: 0 20px 55px rgba(15, 55, 100, 0.12);
}

.ig-profile-public {
    margin: 0;
    font-family: Inter, Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--igp-bg);
    color: var(--igp-dark);
}

.ig-profile-public * {
    box-sizing: border-box;
}

.igp-header {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
    padding: 12px clamp(16px, 4vw, 42px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(229, 234, 242, 0.9);
    backdrop-filter: blur(16px);
}

.igp-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--igp-dark);
    text-decoration: none;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.igp-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.igp-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.igp-nav a {
    color: #334155;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
}

.igp-nav a:hover {
    color: var(--igp-blue);
}

.igp-menu-toggle {
    display: none;
    border: 1px solid var(--igp-border);
    background: #fff;
    border-radius: 12px;
    padding: 10px 13px;
    font-weight: 900;
}

.igp-hero {
    max-width: 1180px;
    margin: 28px auto 0;
    padding: 0 18px;
}

.igp-banner {
    min-height: 260px;
    border-radius: 30px;
    background-size: cover;
    background-position: center;
    box-shadow: var(--igp-shadow);
    position: relative;
    overflow: hidden;
}

.igp-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(11, 78, 162, 0.65), rgba(22, 183, 216, 0.18)),
        radial-gradient(circle at 80% 10%, rgba(255,255,255,.22), transparent 35%);
}

.igp-hero-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    margin: -70px 24px 0;
    padding: 24px;
    border: 1px solid rgba(229, 234, 242, 0.95);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--igp-shadow);
    position: relative;
    z-index: 2;
}

.igp-avatar-wrap {
    align-self: start;
}

.igp-avatar {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 28px;
    border: 6px solid #fff;
    box-shadow: 0 18px 40px rgba(15, 55, 100, 0.18);
    background: #fff;
}

.igp-title-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.igp-kicker {
    color: var(--igp-blue);
    font-weight: 900;
    font-size: 13px;
    margin: 0 0 7px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.igp-title-row h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 50px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.igp-meta,
.igp-rating-line,
.igp-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.igp-meta span {
    display: inline-flex;
    padding: 8px 11px;
    border: 1px solid var(--igp-border);
    border-radius: 999px;
    color: var(--igp-muted);
    background: #f8fafc;
    font-weight: 800;
    font-size: 13px;
}

.igp-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.igp-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 11px;
    font-weight: 900;
    font-size: 12px;
    white-space: nowrap;
}

.igp-badge-ok { color: #067647; background: #ecfdf3; }
.igp-badge-muted { color: #475569; background: #f1f5f9; }
.igp-badge-top { color: #9a3412; background: #fff7ed; }

.ig-stars {
    display: inline-flex;
    gap: 2px;
    color: #cbd5e1;
    letter-spacing: 1px;
}

.ig-stars .is-on {
    color: #f59e0b;
}

.igp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-weight: 900;
    font-size: 14px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.igp-btn:hover {
    transform: translateY(-2px);
}

.igp-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--igp-blue), var(--igp-cyan));
    box-shadow: 0 14px 30px rgba(11, 78, 162, 0.22);
}

.igp-btn-secondary {
    color: var(--igp-blue);
    background: #fff;
    border-color: #bfdbfe;
}

.igp-btn-ghost {
    color: #334155;
    background: #f8fafc;
    border-color: var(--igp-border);
}

.igp-full {
    width: 100%;
}

.igp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    max-width: 1180px;
    margin: 26px auto 60px;
    padding: 0 18px;
}

.igp-main-col,
.igp-side-col {
    display: grid;
    gap: 20px;
    align-content: start;
}

.igp-card {
    background: var(--igp-card);
    border: 1px solid var(--igp-border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 55, 100, 0.07);
}

.igp-card h2 {
    margin: 0 0 12px;
    color: var(--igp-dark);
    font-size: 22px;
    letter-spacing: -0.02em;
}

.igp-section-head {
    margin-bottom: 18px;
}

.igp-section-head h2 {
    margin-bottom: 6px;
}

.igp-section-head p,
.igp-bio,
.igp-empty {
    color: var(--igp-muted);
    line-height: 1.65;
}

.igp-section-head.with-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.igp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.igp-stat {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    border: 1px solid var(--igp-border);
}

.igp-stat strong {
    display: block;
    font-size: 25px;
    color: var(--igp-blue);
    letter-spacing: -0.03em;
}

.igp-stat span {
    display: block;
    margin-top: 4px;
    color: var(--igp-muted);
    font-weight: 800;
    font-size: 13px;
}

.igp-progress-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.igp-progress-row {
    display: grid;
    grid-template-columns: 92px 1fr 52px;
    align-items: center;
    gap: 12px;
    color: #334155;
    font-weight: 800;
    font-size: 14px;
}

.igp-progress-row div {
    height: 10px;
    overflow: hidden;
    background: #eef2f7;
    border-radius: 999px;
}

.igp-progress-row i {
    display: block;
    height: 100%;
    background: var(--igp-green);
    border-radius: inherit;
}

.igp-progress-row i.neutral {
    background: var(--igp-orange);
}

.igp-progress-row i.negative {
    background: var(--igp-red);
}

.igp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.igp-tags span {
    display: inline-flex;
    padding: 9px 12px;
    border-radius: 999px;
    color: #075985;
    background: #ecfeff;
    border: 1px solid #bae6fd;
    font-weight: 900;
    font-size: 13px;
}

.igp-routes {
    display: grid;
    gap: 10px;
}

.igp-route {
    display: grid;
    grid-template-columns: 1fr 28px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--igp-border);
    border-radius: 18px;
    background: #f8fafc;
    font-weight: 850;
}

.igp-route b {
    color: var(--igp-cyan);
    text-align: center;
}

.igp-route em {
    justify-self: end;
    color: var(--igp-blue);
    font-size: 12px;
    font-style: normal;
    background: #eff6ff;
    padding: 6px 8px;
    border-radius: 999px;
}

.igp-vehicles {
    display: grid;
    gap: 12px;
}

.igp-vehicles article {
    padding: 14px;
    border: 1px solid var(--igp-border);
    border-radius: 18px;
    background: #f8fafc;
}

.igp-vehicles strong,
.igp-vehicles span {
    display: block;
}

.igp-vehicles span {
    margin-top: 4px;
    color: var(--igp-muted);
}

.igp-vehicles p {
    margin: 8px 0 0;
    color: var(--igp-muted);
}

.igp-trust {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.igp-trust li {
    position: relative;
    padding-left: 30px;
    color: #334155;
    font-weight: 800;
}

.igp-trust li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: -2px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: #fff;
    background: var(--igp-green);
    font-size: 12px;
}

.igp-trust li.pending::before {
    content: "!";
    background: var(--igp-orange);
}

.igp-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.igp-filter-buttons button {
    border: 1px solid var(--igp-border);
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 8px 11px;
    cursor: pointer;
    font-weight: 900;
}

.igp-filter-buttons button.is-active {
    color: #fff;
    background: var(--igp-blue);
    border-color: var(--igp-blue);
}

.igp-reviews {
    display: grid;
    gap: 14px;
}

.igp-review {
    padding: 16px;
    border: 1px solid var(--igp-border);
    border-radius: 18px;
    background: #fff;
}

.igp-review > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.igp-review span {
    color: var(--igp-muted);
    font-size: 13px;
}

.igp-review p {
    margin: 10px 0 0;
    color: #334155;
    line-height: 1.6;
}

.igp-link {
    color: var(--igp-blue);
    font-weight: 900;
}

.igp-modal[hidden] {
    display: none;
}

.igp-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(8px);
}

.igp-modal-card {
    width: min(520px, 96vw);
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
    position: relative;
}

.igp-modal-card h2 {
    margin: 0 0 8px;
}

.igp-modal-card p {
    color: var(--igp-muted);
}

.igp-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    border: 0;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 22px;
}

.igp-modal-card label {
    display: grid;
    gap: 7px;
    margin: 14px 0;
    color: #334155;
    font-weight: 850;
}

.igp-modal-card input,
.igp-modal-card textarea {
    width: 100%;
    border: 1px solid var(--igp-border);
    border-radius: 14px;
    padding: 12px;
    font: inherit;
}

/* Ajustes privados */
.ig-settings-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--igp-border);
    box-shadow: 0 12px 30px rgba(15,55,100,.07);
    margin-bottom: 20px;
}

.ig-settings-hero h1 {
    margin: 0;
}

.ig-profile-settings {
    display: grid;
    gap: 18px;
}

.ig-profile-preview-card {
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--igp-border);
    box-shadow: 0 12px 30px rgba(15,55,100,.07);
}

.ig-profile-preview-banner {
    min-height: 210px;
    background-size: cover;
    background-position: center;
}

.ig-profile-preview-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px 22px;
    margin-top: 0;
    background: #fff;
}

.ig-profile-preview-info img {
    flex: 0 0 auto;
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 22px;
    border: 4px solid #fff;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15,55,100,.14);
}

.ig-profile-preview-info > div {
    min-width: 0;
    overflow: hidden;
}

.ig-profile-preview-info h2 {
    margin: 0 0 4px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.15;
}

.ig-profile-preview-info p {
    margin: 0;
    color: var(--igp-muted);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.ig-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 18px;
}

.form-label {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
    font-weight: 850;
    color: #334155;
}

.form-label input,
.form-label textarea {
    width: 100%;
    border: 1px solid var(--igp-border);
    border-radius: 14px;
    padding: 12px;
    font: inherit;
    background: #f8fafc;
}

.form-label small {
    color: var(--igp-muted);
    font-weight: 600;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px;
    background: rgba(245, 248, 252, .86);
    backdrop-filter: blur(12px);
    border-radius: 18px;
}

.ig-profile-empty {
    min-height: 100vh;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 24px;
}

.ig-profile-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 200;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #102033;
    color: #fff;
    box-shadow: 0 18px 45px rgba(15, 55, 100, 0.24);
    font-weight: 850;
}

.ig-profile-toast.error {
    background: #991b1b;
}

@media (max-width: 900px) {
    .igp-nav {
        position: fixed;
        top: 72px;
        left: 12px;
        right: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--igp-border);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--igp-shadow);
    }

    .igp-nav.is-open {
        display: flex;
    }

    .igp-menu-toggle {
        display: inline-flex;
    }

    .igp-hero-card,
    .igp-layout,
    .ig-settings-grid {
        grid-template-columns: 1fr;
    }

    .igp-hero-card {
        margin: -54px 12px 0;
    }

    .igp-title-row,
    .igp-section-head.with-actions,
    .ig-settings-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .igp-badges {
        justify-content: flex-start;
    }

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

@media (max-width: 560px) {
    .igp-avatar {
        width: 110px;
        height: 110px;
    }

    .igp-hero-card {
        padding: 18px;
    }

    .igp-stats-grid {
        grid-template-columns: 1fr;
    }

    .igp-route {
        grid-template-columns: 1fr;
    }

    .igp-route b {
        text-align: left;
    }

    .igp-actions,
    .sticky-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .igp-btn {
        width: 100%;
    }
}

/* V130: bloque premium inferior preparado para futuras funcionalidades */
.ig-premium-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 18px;
    margin-top: 18px;
    align-items: start;
}

.ig-premium-feature-card {
    border: 1px solid rgba(59, 130, 246, .18);
    background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,246,255,.92));
}

.ig-premium-feature-card > h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ig-premium-feature-card > h2::after {
    content: 'Premium';
    font-size: 12px;
    line-height: 1;
    padding: 7px 10px;
    border-radius: 999px;
    color: #075985;
    background: rgba(14, 165, 233, .12);
    border: 1px solid rgba(14, 165, 233, .22);
}

.ig-premium-feature-card .premium-lock-card {
    margin: 0;
}

@media(max-width: 980px) {
    .ig-premium-lower-grid {
        grid-template-columns: 1fr;
    }
    .ig-premium-lower-grid > div:first-child {
        display: none;
    }
}

/* V134 - estado de email verificado en perfil */
.ig-email-status-pill{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-top:10px;
    padding:8px 12px;
    border-radius:999px;
    border:1px solid rgba(148,163,184,.35);
    background:rgba(15,23,42,.06);
    font-size:13px;
}
.ig-email-status-pill span{
    width:22px;
    height:22px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
}
.ig-email-status-pill.is-ok{
    border-color:rgba(34,197,94,.55);
    background:rgba(34,197,94,.10);
    color:#166534;
}
.ig-email-status-pill.is-ok span{
    background:#22c55e;
    color:#fff;
}
.ig-email-status-pill.is-warn{
    border-color:rgba(245,158,11,.55);
    background:rgba(245,158,11,.10);
    color:#92400e;
}
.ig-email-status-pill.is-warn span{
    background:#f59e0b;
    color:#fff;
}
.ig-email-status-pill small{opacity:.8;}

/* V139 - ajuste preview perfil: banner separado del nombre/rol */
@media(max-width: 640px) {
    .ig-profile-preview-banner {
        min-height: 150px;
    }
    .ig-profile-preview-info {
        align-items: flex-start;
        padding: 16px;
        gap: 12px;
    }
    .ig-profile-preview-info img {
        width: 70px;
        height: 70px;
        border-radius: 18px;
    }
    .ig-profile-preview-info h2 {
        font-size: 20px;
    }
}
