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

:root {
    --navy: #0f172a;
    --navy-soft: #1e2f5f;
    --blue: #1e3a8a;
    --gold: #facc15;
    --gold-dark: #eab308;
    --red: #b91c1c;
    --bg: #f5f7fb;
    --white: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 12px 28px rgba(15, 23, 42, 0.10);

    /* Zonas seguras Android/iOS para que el contenido no quede bajo el reloj ni botones */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --bottom-nav-height: 74px;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
select,
input,
textarea {
    font-family: inherit;
}

.app-shell {
    width: 100%;
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 14px);
    overflow-x: hidden;
}

/* ===============================
   MOBILE HEADER
================================ */

.mobile-header {
    width: 100%;
    min-height: calc(74px + var(--safe-top));
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: calc(10px + var(--safe-top)) 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.brand-logo {
    display: flex;
    align-items: center;
}

.brand-logo img {
    height: 52px;
    width: auto;
    display: block;
}

.header-action {
    background: var(--navy);
    color: var(--white);
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

/* ===============================
   MAIN APP
================================ */

.app-main {
    width: 100%;
}

/* ===============================
   HERO
================================ */

.app-hero {
    padding: 12px 8px 10px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.96));
}

.hero-card {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    padding: 18px 14px;
    color: var(--white);
    box-shadow: var(--shadow);
}

.app-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.35);
    color: var(--gold);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.hero-card h1 {
    font-size: 27px;
    line-height: 1.13;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.hero-card p {
    font-size: 15px;
    color: #e2e8f0;
    margin-bottom: 18px;
}

/* ===============================
   QUICK SEARCH
================================ */

.quick-search {
    background: var(--white);
    border-radius: 22px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.input-group select,
.input-group input {
    width: 100%;
    height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0 13px;
    background: var(--white);
    color: var(--text);
    font-size: 15px;
}

.btn-main {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 16px;
    background: var(--gold);
    color: var(--navy);
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    margin-top: 2px;
    box-shadow: 0 10px 18px rgba(250, 204, 21, 0.25);
}

/* ===============================
   ACCESS
================================ */

.access-section {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 14px 8px;
}

.access-section h2,
.categories-mobile h2 {
    font-size: 20px;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
}

.access-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.access-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 13px;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.access-card.featured {
    border-color: rgba(250, 204, 21, 0.65);
    background: #fffbeb;
}

.access-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.access-card strong {
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 5px;
}

.access-card small {
    color: var(--muted);
    font-size: 12px;
}

/* ===============================
   CATEGORIES
================================ */

.categories-mobile {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 14px 8px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-head h2 {
    margin-bottom: 0;
}

.section-head a {
    font-size: 13px;
    font-weight: 800;
    color: var(--blue);
}

.category-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-pill {
    min-width: 132px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.category-pill span {
    font-size: 25px;
}

/* ===============================
   PROMO
================================ */

.promo-card {
    width: calc(100% - 28px);
    max-width: 560px;
    margin: 18px auto 26px;
    padding: 20px;
    border-radius: 24px;
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow);
}

.promo-card span {
    color: var(--gold);
    font-weight: 900;
    font-size: 13px;
}

.promo-card h2 {
    font-size: 22px;
    margin: 6px 0 8px;
}

.promo-card p {
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 16px;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    background: var(--gold);
    color: var(--navy);
    border-radius: 16px;
    font-weight: 900;
}

/* ===============================
   BOTTOM NAV
================================ */

.bottom-nav {
    width: 100%;
    min-height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    background: var(--white);
    border-top: 1px solid var(--border);
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px calc(8px + var(--safe-bottom));
    box-shadow: 0 -10px 25px rgba(15, 23, 42, 0.08);
}

.bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #64748b;
    border-radius: 16px;
    font-weight: 800;
}

.bottom-item span {
    font-size: 21px;
    line-height: 1;
}

.bottom-item small {
    font-size: 11px;
}

.bottom-item.active {
    color: var(--navy);
    background: #f1f5f9;
}

/* ===============================
   DESKTOP ADAPTATION
================================ */

@media (min-width: 768px) {
    body {
        background: #e5e7eb;
    }

    .app-shell {
        max-width: 430px;
        margin: 0 auto;
        background: var(--bg);
        min-height: 100vh;
        box-shadow: 0 0 35px rgba(15, 23, 42, 0.16);
        position: relative;
    }

    .mobile-header,
    .bottom-nav {
        max-width: 430px;
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-card h1 {
        font-size: 30px;
    }
}

@media (max-width: 370px) {
    .brand-logo img {
        height: 45px;
    }

    .header-action {
        font-size: 12px;
        padding: 8px 10px;
    }

    .hero-card h1 {
        font-size: 24px;
    }

    .access-card {
        min-height: 124px;
        padding: 14px 11px;
    }
}
/* ===============================
   INTERNAL MOBILE PAGES
================================ */

.page-screen {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 18px 14px 26px;
}

.page-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 22px 18px;
    box-shadow: var(--shadow);
}

.app-badge.dark {
    background: #eff6ff;
    color: var(--blue);
    border: 1px solid #bfdbfe;
}

.page-card h1 {
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.4px;
    margin: 14px 0 10px;
    color: var(--navy);
}

.page-description {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 18px;
}

.app-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.input-group textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 13px;
    background: var(--white);
    color: var(--text);
    font-size: 15px;
    resize: vertical;
    min-height: 110px;
}

.form-links {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.form-links a {
    color: var(--blue);
    font-weight: 800;
    font-size: 14px;
}

.empty-state {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
    padding: 24px 16px;
    text-align: center;
    margin: 18px 0;
}

.empty-state span {
    font-size: 38px;
    display: block;
    margin-bottom: 8px;
}

.empty-state h2 {
    font-size: 20px;
    margin-bottom: 6px;
    color: var(--navy);
}

.empty-state p {
    color: var(--muted);
    font-size: 14px;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===============================
   RESULTS
================================ */

.results-section {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 14px 28px;
}

.results-section h2 {
    font-size: 20px;
    margin: 4px 0 12px;
    color: var(--navy);
}

.provider-result {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

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

.provider-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.provider-top h3 {
    font-size: 17px;
    color: var(--navy);
}

.provider-top p,
.provider-description {
    color: var(--muted);
    font-size: 14px;
}

.provider-description {
    margin-bottom: 14px;
}

.provider-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-whatsapp,
.btn-profile {
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
}

.btn-whatsapp {
    background: #22c55e;
    color: white;
}

.btn-profile {
    background: #f1f5f9;
    color: var(--navy);
}
/* ===============================
   ALERTS
================================ */

.alert {
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 16px;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
/* ===============================
   PANEL ACTIONS
================================ */

.panel-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.panel-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 12px;
    align-items: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.panel-card span {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    grid-row: span 2;
}

.panel-card strong {
    color: var(--navy);
    font-size: 16px;
    line-height: 1.2;
}

.panel-card small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
}

.panel-card.danger span {
    background: #fee2e2;
}
/* ===============================
   PROFESSIONAL PANEL
================================ */

.alert.warning {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.profile-summary {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px;
    margin: 18px 0 6px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row strong {
    color: var(--navy);
    font-size: 14px;
}

.summary-row span {
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}
/* ===============================
   ADMIN
================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.stat-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 8px;
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 24px;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.admin-provider-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 15px;
}

.profile-summary.compact {
    margin: 12px 0;
    padding: 10px 12px;
}

.profile-summary.compact .summary-row {
    padding: 8px 0;
}
/* =========================================================
   AJUSTE APP ANDROID - TU SERVICIO AHORA
   Pegar al final de:
   /public_html/app/tu-servicio-ahora/assets/css/styles.css

   Objetivo:
   reducir márgenes laterales y evitar que el contenido se sienta
   fuera de pantalla dentro del WebView Android.
========================================================= */

@media (max-width: 520px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    * {
        box-sizing: border-box;
    }

    .app-main,
    .page-screen,
    main {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-left: 10px;
        padding-right: 10px;
    }

    .page-card,
    .home-card,
    .provider-card,
    .provider-result,
    .opportunity-card,
    .results-section,
    .profile-summary,
    .panel-actions,
    .app-form {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .page-card,
    .home-card,
    .provider-card,
    .provider-result,
    .opportunity-card {
        border-radius: 22px;
    }

    .app-header,
    .mobile-header,
    header {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-left: 10px;
        padding-right: 10px;
    }

    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }

    select,
    input,
    textarea,
    button {
        max-width: 100%;
    }
}

@media (max-width: 390px) {
    .app-main,
    .page-screen,
    main {
        padding-left: 8px;
        padding-right: 8px;
    }

    .page-card,
    .home-card,
    .provider-card,
    .provider-result,
    .opportunity-card {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* =========================================================
   PARCHE URGENTE SAFE AREA ANDROID - TU SERVICIO AHORA
   Mantiene header y barra inferior fuera del reloj/notch y
   fuera de los botones de navegación del teléfono.
========================================================= */

@supports (padding: max(0px)) {
    .mobile-header {
        padding-top: max(10px, calc(10px + env(safe-area-inset-top)));
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .bottom-nav {
        padding-bottom: max(10px, calc(8px + env(safe-area-inset-bottom)));
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .app-shell {
        padding-bottom: max(92px, calc(88px + env(safe-area-inset-bottom)));
    }
}

@media (max-width: 520px) {
    .app-main,
    main {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .app-hero {
        padding-left: 8px;
        padding-right: 8px;
    }

    .page-screen,
    .results-section,
    .access-section,
    .categories-mobile {
        padding-left: 10px;
        padding-right: 10px;
    }

    .page-card,
    .provider-result,
    .opportunity-card,
    .profile-summary,
    .panel-actions,
    .app-form {
        max-width: 100%;
    }

    .mobile-header {
        min-height: calc(74px + env(safe-area-inset-top, 0px));
    }

    .bottom-nav {
        min-height: calc(74px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 370px) {
    .app-hero {
        padding-left: 6px;
        padding-right: 6px;
    }

    .hero-card,
    .page-card {
        padding-left: 12px;
        padding-right: 12px;
    }
