/* ============================================================
   CONTABILIDAD DOMÉSTICA — tema móvil
   Variables: --color-principal, --color-secundario
   ============================================================ */

:root {
    --cd-teal: var(--color-principal, #0f766e);
    --cd-teal-dark: var(--color-principal-secundario, #115e59);
    --cd-gold: var(--color-secundario, #f59e0b);
    --cd-bg: #f4f7f7;
    --cd-surface: #ffffff;
    --cd-text: #134e4a;
    --cd-muted: #5b6b6a;
    --cd-border: rgba(15, 118, 110, 0.12);
    --cd-radius: 16px;
    --cd-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 118, 110, 0.08);
    --cd-touch: 44px;
    --cd-font: "Segoe UI", system-ui, sans-serif;
}

html {
    overflow-x: hidden;
}

body.cd-app {
    background: var(--cd-bg);
    color: var(--cd-text);
    font-family: var(--cd-font);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.cd-app main {
    flex: 1 1 auto;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 16px 24px;
    box-sizing: border-box;
}

body.cd-app .flash-messages { margin: 0; }

body.cd-app.cd-app--mod main {
    max-width: none;
    padding: 0;
}

body.cd-app .cd-navbar {
    background: var(--cd-teal) !important;
    padding: 8px 12px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
    padding-left: calc(12px + env(safe-area-inset-left, 0px));
    padding-right: calc(12px + env(safe-area-inset-right, 0px));
}

body.cd-app .cd-nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
}

body.cd-app .cd-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
}

body.cd-app .cd-nav-logo {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
}

body.cd-app .cd-nav-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

body.cd-app .cd-nav-mod-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

body.cd-app .cd-navbar .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
}

body.cd-app .cd-hero,
body.cd-app .cd-dash-hero {
    margin: 0;
}

body.cd-app .cd-hero__kicker,
body.cd-app .cd-dash-hero__kicker {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cd-teal);
    margin: 0 0 4px;
}

body.cd-app .cd-dash-hero__switch {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    color: var(--cd-teal);
    text-decoration: none;
    white-space: nowrap;
}

body.cd-app .cd-hero h1,
body.cd-app .cd-dash-hero h1 {
    font-size: clamp(1.55rem, 5vw, 2rem);
    line-height: 1.2;
    margin: 0;
}

body.cd-app .cd-dash-hero--home {
    text-align: center;
    margin: 0;
}
body.cd-app .cd-dash-hero--home h1 {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
}
body.cd-app .cd-dash-hero--home h1 a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
}
body.cd-app .cd-dash-hero--home h1 a i {
    font-size: 0.7rem;
    opacity: 0.65;
}
body.cd-app .cd-dash-hero--home .cd-dash-hero__sub {
    margin-top: 4px;
}

body.cd-app .cd-hero__lead,
body.cd-app .cd-dash-hero__sub {
    color: var(--cd-muted);
    margin: 6px 0 0;
}

body.cd-app .cd-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.cd-app .cd-home-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    body.cd-app .cd-home-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    body.cd-app.cd-app--usuario .cd-home-grid,
    body.cd-app.cd-app--mod .cd-home-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

body.cd-app .cd-card {
    background: var(--cd-surface);
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    box-shadow: var(--cd-shadow);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.cd-app .cd-card > i {
    color: var(--cd-teal);
    font-size: 1.2rem;
}

body.cd-app .cd-card h2 {
    font-size: 1.05rem;
    margin: 0 0 6px;
}

body.cd-app .cd-card p {
    margin: 0;
    color: var(--cd-muted);
    font-size: 0.95rem;
}

body.cd-app .cd-card--muted {
    opacity: 0.92;
}

body.cd-app .contenedor_principal {
    margin: 0 auto 24px;
    width: 100%;
    max-width: 640px;
    padding: 18px 16px;
    background: var(--cd-surface);
    border: 1px solid var(--cd-border);
    border-radius: var(--cd-radius);
    box-shadow: var(--cd-shadow);
    box-sizing: border-box;
}

body.cd-app.cd-app--mod .body_contenido .contenedor_principal {
    max-width: 100%;
}

body.cd-app .cd-bottom-nav {
    display: none;
}

body.cd-app .cd-footer-wrap {
    width: 100%;
    margin-top: auto;
}
body.cd-app .cd-footer {
    background: var(--cd-teal);
    color: rgba(255, 255, 255, 0.86);
    padding: 24px 16px 32px;
    text-align: center;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

body.cd-app .cd-footer a {
    color: #fde68a;
}

body.cd-app .cd-footer p,
body.cd-app .cd-footer-copy,
body.cd-app .cd-footer-meta {
    margin: 8px 0 0;
    font-size: 0.85rem;
}

@media (max-width: 991.98px) {
    body.cd-app:not(.cd-app--mod) {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }
    body.cd-app:not(.cd-app--mod) main {
        padding-bottom: 16px;
    }

    body.cd-app:not(.cd-app--mod) .cd-footer-wrap {
        display: none;
    }

    body.cd-app .cd-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        background: #fff;
        border-top: 1px solid var(--cd-border);
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
        justify-content: space-around;
        align-items: stretch;
    }

    body.cd-app .cd-bottom-nav__item {
        flex: 1 1 0;
        min-height: var(--cd-touch);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--cd-muted);
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 600;
    }

    body.cd-app .cd-bottom-nav__item i {
        font-size: 1.05rem;
    }

    body.cd-app .cd-bottom-nav__item.is-active {
        color: var(--cd-teal);
    }

    body.cd-app .cd-bottom-nav__item--plus {
        position: relative;
        top: -10px;
    }

    body.cd-app .cd-bottom-nav__item--plus i {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--cd-teal);
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        box-shadow: 0 8px 18px rgba(15, 118, 110, 0.35);
    }

    body.cd-app .cd-bottom-nav__item--plus.is-active i {
        background: var(--cd-teal-dark);
    }
}

/* ---- App screens ---- */
body.cd-app .cd-page,
body.cd-app .cd-dash {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
body.cd-app .cd-muted { color: var(--cd-muted); font-size: 0.92rem; }
body.cd-app .cd-empty { color: var(--cd-muted); padding: 12px 4px; }
body.cd-app .cd-link {
    color: var(--cd-teal);
    font-weight: 600;
    font-size: 0.9rem;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
}

body.cd-app .cd-freeze {
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    color: #155e75;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.9rem;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

body.cd-app .cd-period-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
body.cd-app .cd-period {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
}
body.cd-app .cd-period__label {
    font-weight: 700;
    text-transform: capitalize;
    font-size: 1.05rem;
}
body.cd-app .cd-period__arrow {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--cd-border);
    color: var(--cd-text);
    text-decoration: none;
    font-size: 1.4rem;
}
body.cd-app .cd-period-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}
body.cd-app .cd-period-hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--cd-muted);
}
body.cd-app .cd-period-hint a {
    color: var(--cd-teal);
    font-weight: 600;
    text-decoration: none;
}
body.cd-app .cd-chip {
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--cd-border);
    color: var(--cd-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}
body.cd-app .cd-chip.is-on {
    background: var(--cd-teal);
    border-color: var(--cd-teal);
    color: #fff;
}
body.cd-app .cd-personas {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
body.cd-app .cd-personas__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cd-muted);
}
body.cd-app .cd-personas__label small {
    font-weight: 400;
}
body.cd-app .cd-personas__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
body.cd-app .cd-chip--check {
    cursor: pointer;
    gap: 8px;
}
body.cd-app .cd-chip--check input {
    margin: 0;
    accent-color: currentColor;
}

body.cd-app .cd-balance-card {
    background: linear-gradient(160deg, #0f766e 0%, #115e59 100%);
    color: #fff;
    border-radius: 20px;
    padding: 20px 18px 16px;
    box-shadow: var(--cd-shadow);
}
body.cd-app .cd-balance-card__kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    opacity: 0.8;
}
body.cd-app .cd-balance-card__num {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    font-weight: 800;
    margin: 6px 0 12px;
    letter-spacing: -0.03em;
}
body.cd-app .cd-balance-card__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.85rem;
    opacity: 0.95;
}
body.cd-app .cd-balance-card .is-in,
body.cd-app .cd-balance-card .is-out { color: inherit; }

body.cd-app .cd-quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
body.cd-app .cd-quick--3 .cd-quick__btn:last-child {
    grid-column: 1 / -1;
}
body.cd-app .cd-quick__btn {
    min-height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    background: #fff;
    border: 1px solid var(--cd-border);
    color: var(--cd-text);
}
body.cd-app .cd-quick__btn.is-out { color: #b91c1c; }
body.cd-app .cd-quick__btn.is-in { color: #0f766e; }
body.cd-app .cd-quick__btn.is-credit { color: var(--cd-teal); }

body.cd-app .is-in { color: #0f766e; }
body.cd-app .is-out { color: #dc2626; }

body.cd-app .cd-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
body.cd-app .cd-block { margin: 0; }
body.cd-app .cd-block__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin: 0;
}
body.cd-app .cd-block__head h2,
body.cd-app .cd-card h2 {
    font-size: 1.02rem;
    margin: 0;
}
body.cd-app .cd-block__head a { font-size: 0.88rem; color: var(--cd-teal); text-decoration: none; font-weight: 600; }
body.cd-app .cd-card__foot {
    margin: 0;
    padding-top: 4px;
}

body.cd-app .cd-mov-list { display: flex; flex-direction: column; gap: 8px; }
body.cd-app .cd-mov {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    min-height: 64px;
}
body.cd-app .cd-mov__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 118, 110, 0.1);
    color: var(--cd-teal);
}
body.cd-app .cd-mov__body { min-width: 0; }
body.cd-app .cd-mov__body strong {
    display: block;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.cd-app .cd-mov__body small {
    display: block;
    color: var(--cd-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}
body.cd-app .cd-mov__imp {
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}
body.cd-app .cd-mov--static {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-height: 0;
}
body.cd-app .cd-mov__main {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}
body.cd-app .cd-mov__meta {
    display: block;
    color: var(--cd-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}
body.cd-app .cd-mov__actions {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--cd-border);
}
body.cd-app .cd-mov__actions form { margin: 0; }
body.cd-app .cd-mov__actions button {
    background: none;
    border: 0;
    color: var(--cd-teal);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0;
    cursor: pointer;
}
body.cd-app .cd-mov.is-off { opacity: 0.55; }

body.cd-app .cd-sum-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
body.cd-app .cd-sum-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cd-border);
    font-size: 0.95rem;
}
body.cd-app .cd-sum-list li:first-child { padding-top: 0; }
body.cd-app .cd-sum-list li:last-child { border-bottom: 0; padding-bottom: 0; }
body.cd-app .cd-sum-list small { color: var(--cd-muted); }
body.cd-app .cd-sum-name { display: block; font-size: 0.95rem; }
body.cd-app .cd-sum-list--pad { background: #fff; border: 1px solid var(--cd-border); border-radius: 14px; padding: 4px 14px; }
body.cd-app .cd-sum-list form { margin: 0; }

body.cd-app .cd-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
body.cd-app .cd-form--inline { background: #fff; border: 1px solid var(--cd-border); border-radius: 14px; padding: 14px; }
body.cd-app .cd-form--danger { margin: 0; }
body.cd-app .cd-field {
    display: block;
    width: 100%;
    margin: 0;
}
body.cd-app .cd-field > span:first-child {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--cd-muted);
}
body.cd-app .cd-field input,
body.cd-app .cd-field select,
body.cd-app .cd-filters input,
body.cd-app .cd-filters select {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid var(--cd-border);
    padding: 10px 12px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
}
body.cd-app .cd-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.92rem;
}
body.cd-app .cd-check input { margin-top: 4px; }

body.cd-app .cd-btn {
    min-height: 48px;
    border-radius: 14px;
    border: 0;
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
body.cd-app .cd-btn--primary { background: var(--cd-teal); color: #fff; }
body.cd-app .cd-btn--ghost { background: transparent; color: var(--cd-muted); }
body.cd-app .cd-btn--danger { background: #fef2f2; color: #b91c1c; }
body.cd-app .cd-btn--tiny { min-height: 48px; padding: 8px 12px; font-size: 0.9rem; background: var(--cd-teal); color: #fff; }
body.cd-app .cd-btn--compact {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 0.82rem;
    border-radius: 10px;
    background: var(--cd-teal);
    color: #fff;
    white-space: nowrap;
}
body.cd-app .cd-form > .cd-btn--primary,
body.cd-app .cd-card > form > .cd-btn--primary,
body.cd-app .cd-card > .cd-btn--primary {
    width: 100%;
}
body.cd-app .cd-btn--full { width: 100%; }
body.cd-app .cd-cta-stack { display: flex; flex-direction: column; gap: 10px; }

body.cd-app .cd-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
@media (min-width: 520px) {
    body.cd-app .cd-filters { grid-template-columns: 1fr 140px auto; }
}

body.cd-app .cd-mini-stats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    background: #fff;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    padding: 12px 14px;
}

body.cd-app .cd-chooser {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 520px) {
    body.cd-app .cd-chooser { grid-template-columns: 1fr 1fr; }
}
body.cd-app .cd-chooser__card {
    background: #fff;
    border: 1px solid var(--cd-border);
    border-radius: 16px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    min-height: 88px;
}
body.cd-app .cd-chooser__card i { font-size: 1.3rem; color: var(--cd-teal); }
body.cd-app .cd-chooser__card.is-out i { color: #dc2626; }
body.cd-app .cd-chooser__card.is-in i { color: #0f766e; }
body.cd-app .cd-chooser__card h2 { margin: 8px 0 4px; font-size: 1.1rem; }
body.cd-app .cd-chooser__card p { margin: 0; color: var(--cd-muted); }

body.cd-app .cd-more {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--cd-border);
    border-radius: 16px;
    overflow: hidden;
}
body.cd-app .cd-more a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    min-height: 52px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--cd-border);
    font-weight: 600;
}
body.cd-app .cd-more a:last-child { border-bottom: 0; }
body.cd-app .cd-more i { color: var(--cd-teal); width: 20px; text-align: center; }

body.cd-app .cd-code {
    font-size: 1.8rem;
    letter-spacing: 0.18em;
    font-weight: 800;
    margin: 8px 0;
    font-variant-numeric: tabular-nums;
}
body.cd-app .cd-chart-card canvas { max-width: 100%; }

@media (min-width: 992px) {
    body.cd-app:not(.cd-app--mod) main { padding-bottom: 32px; }
}

body.cd-app .cd-dash-hero__kicker a {
    color: inherit;
    text-decoration: none;
}

body.cd-app .cd-panel-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
body.cd-app .cd-panel-card {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 10px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--cd-border);
    border-left: 5px solid var(--panel-c, var(--cd-teal));
    border-radius: 14px;
    padding: 12px;
    min-height: 64px;
}
body.cd-app .cd-panel-card.is-current {
    box-shadow: var(--cd-shadow);
}
body.cd-app .cd-panel-card__emoji { font-size: 1.4rem; }
body.cd-app .cd-panel-card__body { min-width: 0; }
body.cd-app .cd-panel-card__body strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.cd-app .cd-panel-card__body small,
body.cd-app .cd-panel-card__body em {
    display: block;
    color: var(--cd-muted);
    font-size: 0.8rem;
    font-style: normal;
}
body.cd-app .cd-panel-card form { margin: 0; }

body.cd-app .cd-pick {
    border: 0;
    padding: 0;
    margin: 0 0 4px;
}
body.cd-app .cd-pick legend {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cd-muted);
    margin-bottom: 8px;
}
body.cd-app .cd-pick__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
body.cd-app .cd-pick__color span,
body.cd-app .cd-pick__icon span {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    font-size: 1.2rem;
    box-sizing: border-box;
}
body.cd-app .cd-pick__icon span { background: #fff; }
body.cd-app .cd-pick__color input,
body.cd-app .cd-pick__icon input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
body.cd-app .cd-pick__color,
body.cd-app .cd-pick__icon {
    position: relative;
    margin: 0;
}
body.cd-app .cd-pick__color input:checked + span,
body.cd-app .cd-pick__icon input:checked + span {
    border-color: #134e4a;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.25);
}
body.cd-app .cd-pick__color span { border-radius: 50%; }
body.cd-app .cd-ciclo {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
}
body.cd-app .cd-ciclo legend {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cd-muted);
    padding: 0 4px;
}
body.cd-app .cd-ciclo__extra {
    padding-left: 26px;
}

body.cd-app .cd-progress {
    display: block;
    height: 6px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
    margin-top: 8px;
    width: 100%;
    max-width: none;
}
body.cd-app .cd-progress > span {
    display: block;
    height: 100%;
    background: var(--cd-teal);
}
body.cd-app .cd-credito-txt {
    display: block;
    color: var(--cd-muted);
    font-size: 0.8rem;
    font-weight: 500;
}
body.cd-app .cd-credito-box {
    background: #f8fafc;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
body.cd-app .cd-credito-box .cd-field { width: 100%; display: block; }
body.cd-app .cd-credito-box[hidden] { display: none; }
body.cd-app .cd-dia-regla {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--cd-border);
    border-radius: 14px;
    background: #fff;
}
body.cd-app .cd-dia-regla[hidden] { display: none; }
body.cd-app .cd-dia-regla__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cd-muted);
}
body.cd-app .cd-dia-regla__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
body.cd-app .cd-hint {
    display: block;
    margin: 6px 0 0;
    color: var(--cd-muted);
    font-size: 0.8rem;
    font-weight: 400;
}
body.cd-app .cd-credito-li { align-items: flex-start; }
body.cd-app .cd-credito-li > span { min-width: 0; flex: 1; }
body.cd-app .cd-credito-li > span > strong { display: block; }
body.cd-app .cd-invite-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}
body.cd-app .cd-invite-row input {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid var(--cd-border);
    padding: 10px 12px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
}
body.cd-app .cd-invite-row .cd-btn {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 16px;
}
body.cd-app .cd-splash {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cd-teal, #0f766e);
    color: #fff;
    transition: opacity 0.35s ease;
}
body.cd-app .cd-splash.is-out {
    opacity: 0;
    pointer-events: none;
}
body.cd-app .cd-splash__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 24px;
}
body.cd-app .cd-splash img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
body.cd-app .cd-splash p {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

body.cd-app .cd-install-link { display: none !important; }
@media (max-width: 1199.98px) {
    body.cd-app .cd-more a.cd-install-link,
    body.cd-app .cd-hero__cta .cd-install-link,
    body.cd-app .cd-land-hero__cta .cd-install-link {
        display: flex !important;
    }
    body.cd-app .cd-hero__cta a.cd-install-link,
    body.cd-app .cd-land-hero__cta a.cd-install-link {
        display: inline-flex !important;
        align-items: center;
    }
}
@media (display-mode: standalone) {
    body.cd-app .cd-install-link { display: none !important; }
}

body.cd-app .pwa-install-slot p {
    margin: 0 0 12px;
    color: var(--cd-muted);
}

body.cd-app .cd-card > .cd-muted { margin: 0; }
body.cd-app .cd-card > form { margin: 0; }
body.cd-app .cd-empty { margin: 0; padding: 8px 0; }

/* ---------- Landing pública ---------- */
body.cd-app.cd-app--landing main {
    max-width: none;
    width: 100%;
    padding: 0;
}
body.cd-app.cd-app--landing .cd-landing {
    display: flex;
    flex-direction: column;
    gap: 0;
}
body.cd-app.cd-app--landing .flash-messages {
    margin: 12px 16px 0;
}

body.cd-app .cd-land-wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

body.cd-app .cd-land-hero {
    background: linear-gradient(165deg, #0f766e 0%, #0f766e 42%, #115e59 100%);
    color: #fff;
    padding: 28px 0 36px;
}
body.cd-app .cd-land-hero__grid {
    display: grid;
    gap: 28px;
    align-items: center;
}
body.cd-app .cd-land-hero__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}
body.cd-app .cd-land-hero__brand img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    object-fit: cover;
}
body.cd-app .cd-land-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.85rem, 7vw, 3.1rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
}
body.cd-app .cd-land-hero__lead {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
    line-height: 1.5;
    max-width: 36rem;
}
body.cd-app .cd-land-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
body.cd-app .cd-land-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid transparent;
}
body.cd-app .cd-land-btn--gold {
    background: var(--cd-gold, #f59e0b);
    border-color: var(--cd-gold, #f59e0b);
    color: #134e4a;
}
body.cd-app .cd-land-btn--ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}
body.cd-app .cd-land-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}
body.cd-app .cd-land-pills li {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
}

body.cd-app .cd-land-phone {
    background: #fff;
    color: var(--cd-text);
    border-radius: 28px;
    padding: 18px 16px 16px;
    box-shadow: 0 24px 50px rgba(7, 40, 38, 0.28);
    max-width: 320px;
    margin: 0 auto;
}
body.cd-app .cd-land-phone__notch {
    width: 88px;
    height: 8px;
    border-radius: 999px;
    background: #e5eeed;
    margin: 0 auto 14px;
}
body.cd-app .cd-land-phone__kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--cd-teal);
}
body.cd-app .cd-land-phone__hi {
    margin: 2px 0 12px;
    font-size: 1.35rem;
    font-weight: 800;
}
body.cd-app .cd-land-phone__balance {
    background: linear-gradient(160deg, #0f766e, #115e59);
    color: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
body.cd-app .cd-land-phone__balance span {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}
body.cd-app .cd-land-phone__balance strong {
    display: block;
    font-size: 1.7rem;
    letter-spacing: -0.03em;
    margin: 2px 0 8px;
}
body.cd-app .cd-land-phone__balance div {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-style: normal;
}
body.cd-app .cd-land-phone__balance em {
    font-style: normal;
    opacity: 0.9;
}
body.cd-app .cd-land-phone__row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 9px 4px;
    border-top: 1px solid var(--cd-border);
    font-size: 0.9rem;
}
body.cd-app .cd-land-phone__row i { color: var(--cd-teal); width: 18px; text-align: center; }
body.cd-app .cd-land-phone__row b { color: #dc2626; font-variant-numeric: tabular-nums; }
body.cd-app .cd-land-phone__row.is-in b { color: #0f766e; }

@media (max-width: 639.98px) {
    body.cd-app .cd-land-phone__row { display: none; }
    body.cd-app .cd-land-pills { display: none; }
    body.cd-app .cd-land-hero {
        padding: 20px 0 24px;
    }
    body.cd-app .cd-land-hero__brand img {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    body.cd-app .cd-land-hero__lead {
        font-size: 0.98rem;
    }
    body.cd-app .cd-land-phone__balance strong {
        font-size: 1.45rem;
        margin: 2px 0 4px;
    }
}

body.cd-app .cd-land-section {
    padding: 48px 0;
}
body.cd-app .cd-land-section--alt {
    background: #fff;
}
body.cd-app .cd-land-head {
    max-width: 40rem;
    margin: 0 0 24px;
}
body.cd-app .cd-land-kicker {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cd-teal);
}
body.cd-app .cd-land-head h2 {
    margin: 0;
    font-size: clamp(1.4rem, 4vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}
body.cd-app .cd-land-head p {
    margin: 10px 0 0;
    color: var(--cd-muted);
}

body.cd-app .cd-land-feats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
body.cd-app .cd-land-feat {
    background: #fff;
    border: 1px solid var(--cd-border);
    border-radius: 16px;
    padding: 18px 16px;
    box-shadow: var(--cd-shadow);
}
body.cd-app .cd-land-section--alt .cd-land-feat {
    background: var(--cd-bg);
}
body.cd-app .cd-land-feat i {
    color: var(--cd-teal);
    font-size: 1.15rem;
}
body.cd-app .cd-land-feat h3 {
    margin: 10px 0 6px;
    font-size: 1.05rem;
}
body.cd-app .cd-land-feat p {
    margin: 0;
    color: var(--cd-muted);
    font-size: 0.95rem;
}

body.cd-app .cd-land-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
body.cd-app .cd-land-steps li {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 4px 14px;
    align-items: start;
}
body.cd-app .cd-land-steps span {
    grid-row: 1 / span 2;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--cd-teal);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}
body.cd-app .cd-land-steps h3 {
    margin: 4px 0 0;
    font-size: 1.05rem;
}
body.cd-app .cd-land-steps p {
    margin: 4px 0 0;
    color: var(--cd-muted);
}

body.cd-app .cd-land-cta {
    background: linear-gradient(165deg, #0f766e, #115e59);
    color: #fff;
    padding: 48px 0 56px;
    text-align: center;
}
body.cd-app .cd-land-cta h2 {
    margin: 0;
    font-size: clamp(1.4rem, 4vw, 2rem);
    letter-spacing: -0.02em;
}
body.cd-app .cd-land-cta p {
    margin: 12px auto 0;
    max-width: 32rem;
    color: rgba(255, 255, 255, 0.88);
}
body.cd-app .cd-land-cta .cd-land-hero__cta {
    justify-content: center;
}

@media (min-width: 640px) {
    body.cd-app .cd-land-feats {
        grid-template-columns: repeat(2, 1fr);
    }
    body.cd-app .cd-land-steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    body.cd-app .cd-land-steps li {
        grid-template-columns: 1fr;
        text-align: left;
    }
    body.cd-app .cd-land-steps span { grid-row: auto; }
}
@media (min-width: 900px) {
    body.cd-app .cd-land-hero {
        padding: 48px 0 56px;
    }
    body.cd-app .cd-land-hero__grid {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 40px;
    }
    body.cd-app .cd-land-feats {
        grid-template-columns: repeat(3, 1fr);
    }
    body.cd-app .cd-land-section {
        padding: 64px 0;
    }
    body.cd-app .cd-land-phone {
        margin-left: auto;
        margin-right: 0;
    }
}

