/* ============================================================
   style.css — Alumbrado Público · Ayuntamiento de Culiacán
   Layout editorial: panel izquierdo guinda + panel derecho blanco
   Responsive: columnas en desktop, apilado en móvil
   ============================================================ */

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

:root {
    --g: #69001d;
    --g2: #8b1d35;
    --g3: #4d0015;
    --g-tint: #f8f0f2;
    --g-mid: #e8cdd2;
    --white: #ffffff;
    --bg: #fafaf9;
    --surface: #f4f4f5;
    --border: #e4e4e7;
    --text: #18181b;
    --muted: #71717a;
    --green: #16a34a;
    --shadow: 0 1px 3px rgba(0, 0, 0, .07), 0 4px 16px rgba(0, 0, 0, .06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, .12);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   LAYOUT SPLIT — panel izquierdo + panel derecho
   ============================================================ */
.split {
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: 100vh;
}

/* ── Panel izquierdo (identidad) ── */
.panel-brand {
    background: var(--g);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 44px;
    overflow: hidden;
    position: sticky;
    top: 0;
    height: 100vh;
}

/* Decoración geométrica */
.panel-brand::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 60px solid rgba(255, 255, 255, .05);
    pointer-events: none;
}

.panel-brand::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 45px solid rgba(255, 255, 255, .04);
    pointer-events: none;
}

.deco-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.deco-lines::before {
    content: '';
    position: absolute;
    top: 35%;
    left: -60px;
    right: -60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
}

.deco-lines::after {
    content: '';
    position: absolute;
    top: 65%;
    left: -60px;
    right: -60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
}

/* Contenido del panel marca */
.brand-top {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-logo-wrap {
    margin-bottom: 28px;
}

.brand-logo-wrap img {
    width: 210px;
    display: block;
    filter: brightness(0) invert(1);
    margin: 0 auto;
}

.brand-divider {
    width: 44px;
    height: 2px;
    background: rgba(255, 255, 255, .3);
    border-radius: 2px;
    margin: 0 auto 28px;
}

.brand-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -.3px;
    margin-bottom: 12px;
}

.brand-desc {
    font-size: 14.5px;
    color: rgba(255, 255, 255, .55);
    font-weight: 300;
    line-height: 1.7;
    max-width: 280px;
}

/* Stats / info pills */
.brand-stats {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    padding: 12px 16px;
    transition: background .2s;
}

.stat-pill:hover {
    background: rgba(255, 255, 255, .12);
}

.stat-icon {
    font-size: 22px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, .1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.stat-text span {
    font-size: 12px;
    color: rgba(255, 255, 255, .5);
    font-weight: 300;
}

.brand-footer {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, .3);
    font-weight: 300;
}

/* ── Panel derecho (contenido) ── */
.panel-content {
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    min-height: 100vh;
}

.content-inner {
    width: 100%;
    max-width: 460px;
}

/* ============================================================
   INDEX — Pantalla de inicio (panel derecho)
   ============================================================ */
.home-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--g);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.home-title {
    font-family: 'Playfair Display', serif;
    font-size: 38px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.5px;
    line-height: 1.12;
    margin-bottom: 10px;
    text-align: center;
}

.home-sub {
    font-size: 15px;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 36px;
    max-width: 380px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.divider hr {
    flex: 1;
    border: none;
    border-top: 1px solid var(--border);
}

.divider span {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 20px;
    border-radius: 16px;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
    border: 1.5px solid transparent;
}

.card:active {
    transform: scale(0.977);
}

.card.primary {
    background: var(--g);
    box-shadow: 0 8px 32px rgba(105, 0, 29, .28);
}

.card.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 44px rgba(105, 0, 29, .38);
}

.card.secondary {
    background: var(--white);
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.card.secondary:hover {
    transform: translateY(-3px);
    border-color: var(--g);
    box-shadow: 0 8px 32px rgba(105, 0, 29, .1);
}

.card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.card.primary .card-icon {
    background: rgba(255, 255, 255, .14);
}

.card.secondary .card-icon {
    background: var(--g-tint);
}

.card-text {
    flex: 1;
}

.card.primary .card-text strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.card.primary .card-text small {
    font-size: 13px;
    color: rgba(255, 255, 255, .58);
}

.card.secondary .card-text strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.card.secondary .card-text small {
    font-size: 13px;
    color: var(--muted);
}

.card-badge {
    display: inline-block;
    margin-top: 5px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 2px 9px;
    border-radius: 20px;
}

.card-arrow {
    font-size: 22px;
    padding-left: 4px;
}

.card.primary .card-arrow {
    color: rgba(255, 255, 255, .3);
}

.card.secondary .card-arrow {
    color: var(--border);
}

/* ============================================================
   FORMULARIO MULTI-PASO
   ============================================================ */
.form-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--g);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.form-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.4px;
    line-height: 1.15;
    margin-bottom: 28px;
}

/* Progreso */
.prog-wrap {
    margin-bottom: 28px;
}

.prog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.prog-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.prog-steps {
    font-size: 12px;
    font-weight: 700;
    color: var(--g);
}

.prog-track {
    height: 5px;
    background: var(--surface);
    border-radius: 99px;
    overflow: hidden;
}

.prog-fill {
    height: 100%;
    background: var(--g);
    border-radius: 99px;
    transition: width .45s cubic-bezier(.22, 1, .36, 1);
}

/* Paneles */
.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
    animation: slideIn .34s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-panel h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.step-panel .hint {
    font-size: 14px;
    color: var(--muted);
    font-weight: 300;
    margin-bottom: 22px;
    line-height: 1.55;
}

/* Campos */
.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}

.field input, .field textarea {
    width: 100%;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    padding: 13px 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.field input::placeholder, .field textarea::placeholder {
    color: #a1a1aa;
}

.field input:focus, .field textarea:focus {
    border-color: var(--g);
    box-shadow: 0 0 0 3px rgba(105, 0, 29, .1);
}

.field textarea {
    resize: none;
    line-height: 1.55;
}

/* Sección mapa */
.map-section {
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.map-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    background: var(--g);
}

.map-header-icon {
    font-size: 18px;
}

.map-header-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.map-header-text span {
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
}

#map {
    width: 100%;
    height: 260px;
    display: block;
}

.map-tip {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    padding: 9px 14px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

/* Chips */
.chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.chip {
    padding: 13px 10px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--muted);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all .18s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.chip .chip-icon {
    font-size: 22px;
}

.chip:hover {
    border-color: var(--g2);
    color: var(--g);
    background: var(--g-tint);
}

.chip.selected {
    border-color: var(--g);
    background: var(--g-tint);
    color: var(--g);
    box-shadow: 0 0 0 1px var(--g) inset;
}

/* Foto */
.photo-area {
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: var(--surface);
    transition: border-color .2s, background .2s;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.photo-area:hover {
    border-color: var(--g);
    background: var(--g-tint);
}

.photo-area input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    font-size: 0;
}

.photo-area .ph-icon {
    font-size: 30px;
    display: block;
    margin-bottom: 7px;
}

.photo-area strong {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

.photo-area p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

#preview-img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 12px;
    display: none;
    border: 1.5px solid var(--border);
}

/* Resumen */
.summary-grid {
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 4px;
}

.sum-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 11px 14px;
    gap: 12px;
}

.sum-row:nth-child(odd) {
    background: var(--white);
}

.sum-row:nth-child(even) {
    background: var(--surface);
}

.sum-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.sum-key {
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}

.sum-val {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    text-align: right;
}

.sum-photo {
    width: 100%;
    border-radius: 8px;
    margin-top: 8px;
    max-height: 130px;
    object-fit: cover;
}

/* Botones */
.nav {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-back {
    flex: 0 0 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.btn-back:hover {
    border-color: var(--g);
    color: var(--g);
    background: var(--g-tint);
}

.btn-next {
    flex: 1;
    height: 50px;
    border-radius: 12px;
    border: none;
    background: var(--g);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(105, 0, 29, .25);
    transition: background .15s, transform .15s, box-shadow .15s;
}

.btn-next:hover {
    background: var(--g2);
    box-shadow: 0 6px 24px rgba(105, 0, 29, .35);
}

.btn-next:active {
    transform: scale(0.97);
}

.btn-send {
    flex: 1;
    height: 50px;
    border-radius: 12px;
    border: none;
    background: var(--green);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(22, 163, 74, .25);
    transition: background .15s, transform .15s;
}

.btn-send:hover {
    background: #15803d;
}

.btn-send:active {
    transform: scale(0.97);
}

.cancel-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color .15s;
}

.cancel-link:hover {
    color: var(--g);
}

/* ============================================================
   ESTATUS
   ============================================================ */
.estatus-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.estatus-sub {
    font-size: 15px;
    color: var(--muted);
    font-weight: 300;
    margin-bottom: 32px;
}

.search-box {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 22px 20px;
    margin-bottom: 16px;
}

.search-box label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.input-row {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 13px 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.search-box input:focus {
    border-color: var(--g);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(105, 0, 29, .1);
}

.search-box input::placeholder {
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: #a1a1aa;
    font-size: 14px;
}

.btn-search {
    background: var(--g);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 0 20px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(105, 0, 29, .25);
    transition: background .15s, transform .15s;
}

.btn-search:hover {
    background: var(--g2);
}

.btn-search:active {
    transform: scale(0.96);
}

#resultado {
    display: none;
    animation: fadeUp .4s cubic-bezier(.22, 1, .36, 1);
}

.res-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-top: 4px solid var(--g);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.res-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--g);
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.res-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.res-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.res-key {
    font-size: 12.5px;
    color: var(--muted);
}

.res-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.status-recibido {
    background: #fef3c7;
    color: #92400e;
}

.status-proceso {
    background: #dbeafe;
    color: #1e40af;
}

.status-resuelto {
    background: #dcfce7;
    color: #166534;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    transition: color .15s;
}

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

/* ============================================================
   RESPONSIVE — móvil
   ============================================================ */
@media (max-width: 860px) {
    .split {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    /* Panel marca — centrado en móvil */
    .panel-brand {
        position: relative;
        height: auto;
        padding: 36px 24px 32px;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        gap: 0;
    }

    .panel-brand::before {
        width: 220px;
        height: 220px;
        top: -70px;
        right: -70px;
        border-width: 38px;
    }

    .panel-brand::after {
        display: none;
    }

    .brand-top {
        align-items: center;
        text-align: center;
    }

    .brand-logo-wrap {
        margin-bottom: 20px;
    }

    .brand-logo-wrap img {
        width: 190px;
    }

    .brand-divider {
        margin-bottom: 18px;
    }

    .brand-heading {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .brand-desc {
        display: block;
        font-size: 13.5px;
        max-width: 90%;
    }

    .brand-stats {
        display: none;
    }

    .brand-footer {
        display: none;
    }

    /* Panel contenido en móvil — sin max-width, ocupa todo el ancho */
    .panel-content {
        padding: 28px 20px 44px;
        justify-content: flex-start;
        min-height: unset;
        align-items: stretch;
    }

    .panel-content.full-height {
        min-height: unset;
        justify-content: flex-start;
    }

    /* CRÍTICO: quitar max-width para que ocupe todo el ancho en móvil */
    .content-inner {
        max-width: 100%;
        width: 100%;
    }

    .home-title {
        font-size: 30px;
    }

    .home-sub {
        max-width: 100%;
    }

    .form-title {
        font-size: 26px;
    }

    .estatus-title {
        font-size: 26px;
    }

    .estatus-sub {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .panel-brand {
        padding: 26px 18px 26px;
    }

    .brand-logo-wrap img {
        width: 160px;
    }

    .brand-heading {
        font-size: 24px;
    }

    .brand-heading em {
        font-size: 16px;
    }

    .panel-content {
        padding: 24px 16px 40px;
    }
}

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeUp .5s cubic-bezier(.22, 1, .36, 1) both;
}

.fade-in-2 {
    animation-delay: .08s;
}

.fade-in-3 {
    animation-delay: .16s;
}

/* ============================================================
   SWEETALERT
   ============================================================ */
.swal2-popup {
    font-family: 'Outfit', sans-serif !important;
    border-radius: 16px !important;
}

.swal2-title {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
}

.swal2-html-container {
    font-family: 'Outfit', sans-serif !important;
}

.swal2-confirm {
    border-radius: 10px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
    background: var(--g) !important;
}

/* Estilo base del badge */
.status-badge {
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
}

/* PENDIENTE: Azul grisáceo (Indica espera) */
.status-pendiente {
    background: #e5e7eb;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

/* EN REVISIÓN: Ámbar/Naranja (Indica acción) */
.status-revision {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* TERMINADO: Verde Esmeralda (Indica éxito) */
.status-terminado {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.search-row {
    display: flex;
    gap: 8px;
}

.btn-search {
    background: #69001d;
    color: #fff;
    border: none;
    padding: 0 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}