:root {
    --lp-red: #ae1f27;
    --lp-red-dark: #861820;
    --lp-green: #2e7450;
    --lp-green-dark: #1f5a3b;
    --lp-cream: #fff8ef;
    --lp-cream-2: #f7ead8;
    --lp-text: #34333a;
    --lp-muted: #7a7580;
    --lp-border: #eadfce;
    --lp-card: #ffffff;
    --lp-shadow: 0 18px 45px rgba(80, 42, 25, .10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: linear-gradient(135deg, #fff8ef 0%, #fffdf9 48%, #f8efe3 100%);
    color: var(--lp-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 292px;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #c02b35 0%, var(--lp-red) 38%, var(--lp-red-dark) 100%);
    color: #fff;
    padding: 24px 18px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    box-shadow: 20px 0 55px rgba(134, 24, 32, .22);
}

.brand-box {
    text-align: center;
    padding: 12px 8px 22px;
    border-bottom: 1px solid rgba(255,255,255,.18);
    margin-bottom: 18px;
}

.brand-logo {
    width: 210px;
    max-width: 100%;
    display: block;
    margin: 0 auto 8px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,.12));
}

.brand-subtitle {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    opacity: .88;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-link {
    color: rgba(255,255,255,.86);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    border-radius: 16px;
    font-weight: 700;
    transition: .18s ease;
}

.menu-link i {
    width: 22px;
    text-align: center;
}

.menu-link:hover,
.menu-link.active {
    color: #fff;
    background: rgba(255,255,255,.15);
    transform: translateX(2px);
}

.sidebar-footer {
    position: absolute;
    bottom: 22px;
    left: 18px;
    right: 18px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.16);
}

.mini-label {
    font-weight: 800;
    font-size: .86rem;
}

.mini-year {
    opacity: .82;
    font-size: .78rem;
}

.content-wrap {
    width: 100%;
    margin-left: 292px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 86px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 30px;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(174,31,39,.08);
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--lp-red-dark);
}

.topbar-subtitle {
    color: var(--lp-muted);
    font-size: .9rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--lp-green);
    color: #fff;
    font-weight: 900;
}

.user-info {
    line-height: 1.12;
}

.user-info span {
    display: block;
    font-size: .78rem;
    color: var(--lp-muted);
}

.page-content {
    padding: 30px;
    flex: 1;
}

.card-lp {
    background: var(--lp-card);
    border: 1px solid var(--lp-border);
    border-radius: 24px;
    box-shadow: var(--lp-shadow);
}

.hero-card {
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #fff 0%, #fff9f0 100%);
}

.hero-card::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(174,31,39,.08);
    right: -80px;
    top: -80px;
}

.hero-title {
    font-size: clamp(1.2rem, 3vw, 2.0rem);
    color: var(--lp-red-dark);
    font-weight: 950;
}

.hero-text {
    color: var(--lp-muted);
    max-width: 680px;
}

.btn-brand {
    background: var(--lp-red);
    border-color: var(--lp-red);
    color: #fff;
    border-radius: 14px;
    font-weight: 800;
    padding: .68rem 1rem;
}

.btn-brand:hover {
    background: var(--lp-red-dark);
    border-color: var(--lp-red-dark);
    color: #fff;
}

.btn-green {
    background: var(--lp-green);
    border-color: var(--lp-green);
    color: #fff;
    border-radius: 14px;
    font-weight: 800;
}

.btn-green:hover {
    background: var(--lp-green-dark);
    border-color: var(--lp-green-dark);
    color: #fff;
}

.btn-outline-brand {
    border-color: rgba(174,31,39,.28);
    color: var(--lp-red-dark);
    border-radius: 12px;
    font-weight: 800;
}

.btn-outline-brand:hover {
    background: var(--lp-red);
    color: #fff;
    border-color: var(--lp-red);
}

.btn-soft {
    background: #fff;
    border: 1px solid var(--lp-border);
    color: var(--lp-red-dark);
    border-radius: 13px;
}

.stat-card {
    min-height: 128px;
    padding: 22px;
    border-left: 6px solid var(--lp-red);
    position: relative;
    overflow: hidden;
}

.stat-card.green { border-left-color: var(--lp-green); }

.stat-card i {
    position: absolute;
    right: 18px;
    bottom: 12px;
    font-size: 3.2rem;
    opacity: .08;
    color: var(--lp-red-dark);
}

.stat-label {
    color: var(--lp-muted);
    font-size: .86rem;
    font-weight: 700;
}

.stat-value {
    font-size: 2rem;
    font-weight: 950;
    color: var(--lp-red-dark);
}

.category-card {
    padding: 20px;
    transition: .18s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(174,31,39,.25);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(174,31,39,.10);
    color: var(--lp-red);
    margin-bottom: 14px;
}

.table-lp {
    vertical-align: middle;
}

.table-lp thead th {
    background: #fff7ed;
    color: var(--lp-red-dark);
    border-bottom: 1px solid var(--lp-border);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.form-control, .form-select {
    border-radius: 14px;
    border-color: var(--lp-border);
    padding: .72rem .9rem;
}

.form-control:focus, .form-select:focus {
    border-color: rgba(174,31,39,.45);
    box-shadow: 0 0 0 .2rem rgba(174,31,39,.10);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top left, rgba(174,31,39,.16), transparent 35%), linear-gradient(135deg, #fff8ef, #fff);
}

.login-card {
    width: min(1060px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    overflow: hidden;
}

.login-brand {
    background: linear-gradient(135deg, var(--lp-red), var(--lp-red-dark));
    color: #fff;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand img {
    width: 410px;
    max-width: 100%;
    margin-bottom: 46px;
    display: block;
}

.login-form-box {
    padding: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge-lp {
    background: rgba(46,116,80,.12);
    color: var(--lp-green-dark);
    border: 1px solid rgba(46,116,80,.15);
    border-radius: 999px;
    padding: .38rem .7rem;
    font-weight: 800;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-105%);
        transition: .22s ease;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .content-wrap {
        margin-left: 0;
    }
    .login-card {
        grid-template-columns: 1fr;
    }
    .login-brand {
        min-height: 300px;
    }
}

@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .content-wrap { margin-left: 0; }
    .page-content { padding: 0; }
    body { background: #fff; }
}

/* Ajustes mobile da sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 18, 18, .48);
    backdrop-filter: blur(2px);
    z-index: 45;
    opacity: 0;
    transition: .2s ease;
}

body.sidebar-open {
    overflow: hidden;
}

/* Botão secundário do hero mais alinhado ao padrão da marca */
.hero-actions .btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    padding: .72rem 1.08rem;
}

.btn-hero-outline {
    background: #fff;
    border: 1px solid rgba(174,31,39,.22);
    color: var(--lp-red-dark);
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(134, 24, 32, .06);
}

.btn-hero-outline:hover {
    background: rgba(174,31,39,.07);
    border-color: rgba(174,31,39,.34);
    color: var(--lp-red-dark);
}

.department-card {
    padding: 22px;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.department-card::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -42px;
    top: -42px;
    border-radius: 50%;
    background: rgba(174,31,39,.07);
}

.department-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}

.department-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--lp-red), var(--lp-red-dark));
    box-shadow: 0 12px 22px rgba(174,31,39,.18);
}

.department-title {
    color: var(--lp-red-dark);
    font-weight: 950;
    margin: 0;
}

.subcategory-list {
    display: grid;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.subcategory-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff9f3;
    border: 1px solid rgba(234, 223, 206, .95);
    color: var(--lp-text);
    font-weight: 750;
    font-size: .92rem;
}

.subcategory-pill i {
    color: var(--lp-green);
    font-size: .72rem;
}

@media (max-width: 991px) {
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }

    .sidebar {
        z-index: 60;
    }

    .topbar {
        padding: 0 16px;
        height: 76px;
    }

    .page-content {
        padding: 18px;
    }

    .topbar-user .btn {
        padding: .45rem .6rem;
    }

    .hero-card {
        border-radius: 20px;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
    }
}

/* Etapa 2 - Usuários */
.user-stat-card {
    min-height: 116px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    border-left: 6px solid var(--lp-red);
}

.user-stat-card.green {
    border-left-color: var(--lp-green);
}

.user-stat-card.muted {
    border-left-color: #8b8790;
}

.user-stat-card span {
    display: block;
    color: var(--lp-muted);
    font-weight: 800;
    font-size: .86rem;
    margin-bottom: 8px;
}

.user-stat-card strong {
    display: block;
    font-size: 2rem;
    color: var(--lp-red-dark);
    line-height: 1;
}

.user-stat-card i {
    position: absolute;
    right: 18px;
    bottom: 12px;
    font-size: 3.1rem;
    opacity: .08;
    color: var(--lp-red-dark);
}

.user-mini-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(174,31,39,.09);
    color: var(--lp-red-dark);
    font-weight: 950;
    flex: 0 0 auto;
}

.modal-lp {
    border: 1px solid var(--lp-border);
    border-radius: 24px;
    box-shadow: var(--lp-shadow);
}

.password-box {
    border: 1px dashed rgba(174,31,39,.24);
    background: #fff9f3;
    border-radius: 20px;
    padding: 18px;
}

.table-lp td {
    border-color: rgba(234, 223, 206, .75);
}

@media (max-width: 767px) {
    .table-lp .btn {
        width: 100%;
    }
}
/* Ajustes premium - Usuários */
.usuarios-panel .form-label {
    color: var(--lp-text);
}

.usuarios-filtros .form-control,
.usuarios-filtros .form-select {
    min-height: 50px;
    background-color: #fff;
}

.usuarios-table-card {
    overflow: hidden;
}

.usuarios-loading {
    position: absolute;
    right: 24px;
    top: 18px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 248, 239, .96);
    border: 1px solid var(--lp-border);
    color: var(--lp-red-dark);
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(80, 42, 25, .08);
}

.modal-usuario-premium {
    overflow: hidden;
}

.modal-header-lp {
    padding: 24px 24px 0;
}

.modal-header-lp .modal-title {
    color: var(--lp-red-dark);
    font-size: 1.35rem;
}

.modal-icon-lp {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(174,31,39,.14), rgba(46,116,80,.12));
    color: var(--lp-red-dark);
    border: 1px solid rgba(174,31,39,.12);
    font-size: 1.18rem;
}

.lp-switch-card {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 16px;
    border-radius: 18px;
    border: 1px solid var(--lp-border);
    background: linear-gradient(135deg, #fff, #fff9f3);
    cursor: pointer;
    user-select: none;
}

.lp-switch-card span {
    display: grid;
    gap: 3px;
}

.lp-switch-card strong {
    color: var(--lp-red-dark);
    font-size: .95rem;
}

.lp-switch-card small {
    color: var(--lp-muted);
}

.lp-switch-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lp-switch-card em {
    width: 58px;
    height: 32px;
    border-radius: 999px;
    background: #ded8cf;
    position: relative;
    flex: 0 0 auto;
    transition: .18s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,.08);
}

.lp-switch-card em::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.16);
    transition: .18s ease;
}

.lp-switch-card input:checked + em {
    background: var(--lp-green);
}

.lp-switch-card input:checked + em::after {
    transform: translateX(26px);
}

.password-box-premium {
    border-style: solid;
    background: linear-gradient(135deg, #fff9f3, #fff);
}

.senha-default-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(46,116,80,.10);
    color: var(--lp-green-dark);
    font-size: .88rem;
    font-weight: 750;
    border: 1px solid rgba(46,116,80,.14);
}

.modal-confirm-lp,
.modal-message-lp {
    border-radius: 26px;
}

.confirm-icon-lp,
.message-icon-lp {
    width: 62px;
    height: 62px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    font-size: 1.45rem;
}

.confirm-icon-lp {
    background: rgba(174,31,39,.10);
    color: var(--lp-red-dark);
}

.message-icon-lp.success {
    background: rgba(46,116,80,.12);
    color: var(--lp-green-dark);
}

.message-icon-lp.danger {
    background: rgba(174,31,39,.11);
    color: var(--lp-red-dark);
}

#usuariosTabelaContainer {
    transition: opacity .15s ease;
}

@media (max-width: 767px) {
    .modal-header-lp {
        padding: 20px 18px 0;
    }

    .modal-icon-lp {
        width: 44px;
        height: 44px;
        border-radius: 16px;
    }

    .lp-switch-card {
        min-height: 70px;
    }

    .usuarios-loading {
        position: static;
        margin-bottom: 12px;
        width: 100%;
        justify-content: center;
    }
}

/* Lapolitália - ajustes da Etapa 3: Categorias e Subcategorias */
.section-title {
    color: var(--lp-red-dark);
    font-weight: 900;
}

.btn-soft-brand {
    background: #fff;
    border: 1px solid rgba(174,31,39,.22);
    color: var(--lp-red-dark);
    border-radius: 14px;
    font-weight: 800;
    padding: .68rem 1rem;
}

.btn-soft-brand:hover {
    background: rgba(174,31,39,.08);
    border-color: rgba(174,31,39,.36);
    color: var(--lp-red-dark);
}

.btn-outline-brand {
    border-color: rgba(174,31,39,.25);
    color: var(--lp-red-dark);
    font-weight: 800;
    border-radius: 12px;
}

.btn-outline-brand:hover {
    background: var(--lp-red);
    border-color: var(--lp-red);
    color: #fff;
}

.btn-icon-soft {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    border: 1px solid rgba(174,31,39,.16);
    background: #fff;
    color: var(--lp-red-dark);
}

.metric-card {
    min-height: 116px;
    background: #fff;
    border: 1px solid var(--lp-border);
    border-radius: 22px;
    padding: 22px 24px;
    box-shadow: var(--lp-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--lp-red);
}

.metric-card.metric-green::before {
    background: var(--lp-green);
}

.metric-card span {
    color: var(--lp-muted);
    display: block;
    font-weight: 800;
    font-size: .92rem;
    margin-bottom: 8px;
}

.metric-card strong {
    display: block;
    color: var(--lp-red-dark);
    font-size: 2rem;
    line-height: 1;
    font-weight: 950;
}

.metric-card i {
    color: rgba(174,31,39,.08);
    font-size: 3.2rem;
}

.metric-card.metric-green i {
    color: rgba(46,116,80,.10);
}

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.categoria-panel {
    background: #fff;
    border: 1px solid var(--lp-border);
    border-radius: 24px;
    box-shadow: var(--lp-shadow);
    padding: 22px;
    min-height: 320px;
}

.categoria-panel-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.categoria-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(174,31,39,.08);
    color: var(--lp-red-dark);
    flex: 0 0 auto;
}

.categoria-panel h5 {
    color: var(--lp-red-dark);
    font-weight: 950;
}

.lp-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
}

.lp-status.success {
    color: #0f6b3e;
    background: rgba(46,116,80,.12);
}

.lp-status.muted {
    color: #74717a;
    background: rgba(116,113,122,.12);
}

.categoria-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.categoria-meta-row span {
    background: var(--lp-cream);
    border: 1px solid rgba(234,223,206,.9);
    color: var(--lp-muted);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .78rem;
    font-weight: 800;
}

.subcategoria-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subcategoria-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 17px;
    border: 1px solid rgba(234,223,206,.9);
    background: linear-gradient(135deg, #fff 0%, #fffaf3 100%);
}

.subcategoria-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.subcategoria-main strong {
    display: block;
    color: var(--lp-text);
    font-size: .94rem;
    line-height: 1.2;
}

.subcategoria-main small {
    display: block;
    color: var(--lp-muted);
    font-size: .78rem;
    max-width: 330px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subcategoria-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--lp-green);
    box-shadow: 0 0 0 4px rgba(46,116,80,.12);
    flex: 0 0 auto;
}

.subcategoria-dot.off {
    background: #8b8a92;
    box-shadow: 0 0 0 4px rgba(139,138,146,.12);
}

.subcategoria-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex: 0 0 auto;
}

.subcategoria-count {
    color: var(--lp-muted);
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.empty-subcategoria {
    border: 1px dashed rgba(174,31,39,.22);
    border-radius: 18px;
    padding: 18px;
    color: var(--lp-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,248,239,.72);
}

.empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    background: rgba(174,31,39,.08);
    color: var(--lp-red-dark);
    font-size: 1.3rem;
}

.lp-modal {
    border: 1px solid var(--lp-border);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(32, 20, 15, .24);
}

.lp-modal-header {
    padding: 24px 28px 14px;
    border-bottom: 0;
}

.lp-modal-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.lp-modal-title-wrap h5 {
    color: var(--lp-red-dark);
    font-weight: 950;
    margin: 0;
}

.lp-modal-title-wrap p {
    color: var(--lp-muted);
    margin: 3px 0 0;
}

.lp-modal-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(174,31,39,.10);
    color: var(--lp-red-dark);
    flex: 0 0 auto;
}

.lp-modal-icon.success {
    background: rgba(46,116,80,.12);
    color: var(--lp-green-dark);
}

.lp-modal-icon.danger {
    background: rgba(174,31,39,.10);
    color: var(--lp-red-dark);
}

.lp-modal-body {
    padding: 12px 28px 22px;
}

.lp-modal-footer {
    padding: 18px 28px 24px;
    border-top: 0;
    background: linear-gradient(180deg, #fff 0%, #fffaf3 100%);
}

.lp-switch-card {
    border: 1px solid var(--lp-border);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: linear-gradient(135deg, #fff 0%, #fffaf4 100%);
    cursor: pointer;
}

.lp-switch-card strong,
.lp-switch-card span:not(.lp-switch-wrap):not(.lp-switch-slider) {
    display: block;
}

.lp-switch-card strong {
    color: var(--lp-red-dark);
    font-weight: 900;
    margin-bottom: 3px;
}

.lp-switch-card span:not(.lp-switch-wrap):not(.lp-switch-slider) {
    color: var(--lp-muted);
    font-size: .9rem;
}

.lp-switch-wrap {
    position: relative;
    width: 58px;
    height: 34px;
    flex: 0 0 58px;
    display: inline-block;
}

.lp-switch-wrap input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lp-switch-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #d3c8bd;
    border-radius: 999px;
    transition: .2s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.12);
}

.lp-switch-slider::before {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    transition: .2s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,.18);
}

.lp-switch-wrap input:checked + .lp-switch-slider {
    background: var(--lp-green);
}

.lp-switch-wrap input:checked + .lp-switch-slider::before {
    transform: translateX(24px);
}

.categoria-filtros .form-control,
.categoria-filtros .form-select,
.lp-modal .form-control,
.lp-modal .form-select {
    border-radius: 15px;
    border-color: var(--lp-border);
    min-height: 52px;
}

.categoria-filtros .form-control:focus,
.categoria-filtros .form-select:focus,
.lp-modal .form-control:focus,
.lp-modal .form-select:focus {
    border-color: rgba(174,31,39,.42);
    box-shadow: 0 0 0 .22rem rgba(174,31,39,.10);
}

@media (max-width: 1400px) {
    .categorias-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .categorias-grid {
        grid-template-columns: 1fr;
    }

    .categoria-panel {
        padding: 18px;
    }

    .categoria-panel-head,
    .subcategoria-item,
    .lp-switch-card {
        align-items: flex-start;
    }

    .subcategoria-item {
        flex-direction: column;
    }

    .subcategoria-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .lp-modal-header,
    .lp-modal-body,
    .lp-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ===== Etapa 4 - Receitas ===== */
.table-main-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.table-main-info strong {
    display: block;
    color: var(--lp-text);
    font-weight: 900;
    line-height: 1.2;
}

.table-main-info small {
    display: block;
    color: var(--lp-muted);
    margin-top: 2px;
}

.avatar-soft {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(181, 31, 42, .10);
    color: var(--lp-red);
    flex: 0 0 auto;
}

.badge-soft-light,
.badge-soft-success,
.badge-soft-muted {
    border-radius: 999px;
    padding: 7px 10px;
    font-weight: 900;
    font-size: 12px;
}

.badge-soft-light {
    background: #fff7ef;
    color: var(--lp-red-dark);
    border: 1px solid rgba(128, 20, 29, .12);
}

.badge-soft-success {
    background: rgba(39, 125, 87, .12);
    color: #127145;
}

.badge-soft-muted {
    background: rgba(108, 117, 125, .12);
    color: #6c757d;
}

.actions-cell {
    white-space: nowrap;
    min-width: 310px;
}

.btn-outline-dark-soft,
.btn-outline-muted,
.btn-outline-success-soft {
    border-radius: 12px;
    font-weight: 800;
    border-width: 1px;
}

.btn-outline-dark-soft {
    color: #4a4a4a;
    border-color: rgba(80, 80, 80, .22);
    background: #fff;
}

.btn-outline-dark-soft:hover {
    color: #fff;
    background: #4a4a4a;
}

.btn-outline-muted {
    color: #7a7f88;
    border-color: rgba(122, 127, 136, .35);
    background: #fff;
}

.btn-outline-muted:hover {
    color: #fff;
    background: #7a7f88;
}

.btn-outline-success-soft {
    color: #127145;
    border-color: rgba(39, 125, 87, .28);
    background: #fff;
}

.btn-outline-success-soft:hover {
    color: #fff;
    background: #277d57;
}

.loading-soft {
    opacity: .55;
    pointer-events: none;
}

.small-empty {
    max-width: 300px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(181, 31, 42, .10);
    color: var(--lp-red);
    font-size: 22px;
}

.recipe-form-hero {
    background: linear-gradient(135deg, #fff, #fff8f1);
}

.section-subtitle {
    color: var(--lp-red-dark);
    font-size: 20px;
    font-weight: 950;
    margin-bottom: 16px;
}

.lp-switch-card.compact-switch {
    min-height: 52px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(128, 20, 29, .14);
    border-radius: 16px;
    background: #fffaf6;
    cursor: pointer;
}

.lp-switch-card.compact-switch strong {
    display: block;
    color: var(--lp-text);
    font-size: 14px;
}

.lp-switch-card.compact-switch small {
    display: block;
    color: var(--lp-muted);
    font-size: 12px;
}

.lp-switch-card input {
    display: none;
}

.lp-switch-slider {
    width: 54px;
    height: 30px;
    border-radius: 999px;
    background: #c9ced6;
    position: relative;
    flex: 0 0 auto;
    transition: .2s ease;
}

.lp-switch-slider::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    transition: .2s ease;
}

.lp-switch-card input:checked + .lp-switch-slider {
    background: #277d57;
}

.lp-switch-card input:checked + .lp-switch-slider::after {
    transform: translateX(24px);
}

.ingredients-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ingredient-row {
    display: grid;
    grid-template-columns: 1fr 150px 150px 48px;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid rgba(128, 20, 29, .12);
    border-radius: 18px;
    background: #fffdfb;
}

.ingredient-row .form-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--lp-text);
    margin-bottom: 6px;
}

.btn-remove-ingredient {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(181,31,42,.18);
    color: var(--lp-red);
    background: rgba(181,31,42,.07);
}

.btn-remove-ingredient:hover {
    color: #fff;
    background: var(--lp-red);
}

.min-textarea {
    min-height: 420px;
    resize: vertical;
}

.obs-textarea {
    min-height: 180px;
    resize: vertical;
}

.sticky-side-card {
    position: sticky;
    top: 96px;
}

@media (max-width: 1199px) {
    .sticky-side-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .ingredient-row {
        grid-template-columns: 1fr;
    }

    .btn-remove-ingredient {
        width: 100%;
    }

    .actions-cell {
        min-width: 240px;
        white-space: normal;
    }

    .actions-cell .btn {
        margin-bottom: 6px;
    }
}

/* Ajustes - Receita Form V2: ficha técnica em blocos */
.recipe-form-hero-v2 .recipe-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-soft-back {
    background: #fffaf7;
    color: var(--lp-red-dark);
    border: 1px solid rgba(137, 13, 27, .18);
    border-radius: 14px;
    font-weight: 800;
    padding: 12px 18px;
    box-shadow: 0 10px 22px rgba(84, 33, 18, .06);
}

.btn-soft-back:hover {
    background: rgba(185, 28, 43, .08);
    color: var(--lp-red-dark);
    border-color: rgba(185, 28, 43, .28);
}

.recipe-status-switch {
    min-height: 56px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.recipe-status-switch > span:first-child {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.recipe-status-switch .lp-switch-slider {
    position: relative;
    flex: 0 0 54px;
    width: 54px;
    height: 30px;
    margin-left: auto;
    display: inline-block;
    border-radius: 999px;
    background: #c9cdd2;
    box-shadow: inset 0 2px 4px rgba(0,0,0,.12);
}

.recipe-status-switch input:checked + .lp-switch-slider {
    background: var(--lp-green);
}

.recipe-status-switch .lp-switch-slider::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,.18);
    transition: .22s ease;
}

.recipe-status-switch input:checked + .lp-switch-slider::before {
    transform: translateX(24px);
}

.recipe-status-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ficha-card {
    overflow: hidden;
}

.ficha-help-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff8ed;
    border: 1px dashed rgba(137, 13, 27, .24);
    color: #66524b;
    border-radius: 16px;
    padding: 12px 14px;
    font-size: .92rem;
}

.ficha-help-box i {
    color: var(--lp-red);
    margin-top: 3px;
}

.recipe-blocks-box {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.recipe-tech-block {
    border: 1px solid rgba(137, 13, 27, .17);
    border-radius: 20px;
    background: #fffdfb;
    box-shadow: 0 14px 34px rgba(80, 38, 20, .06);
    overflow: hidden;
}

.recipe-tech-block-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    background: linear-gradient(135deg, #fff7ef, #ffffff);
    border-bottom: 1px solid rgba(137, 13, 27, .12);
    padding: 16px;
}

.block-title-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 190px;
    gap: 12px;
    width: 100%;
}

.bloco-titulo-input {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.btn-remove-block,
.btn-remove-item {
    border: 1px solid rgba(137, 13, 27, .15);
    background: rgba(185, 28, 43, .06);
    color: var(--lp-red-dark);
    border-radius: 12px;
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-block:hover,
.btn-remove-item:hover {
    background: var(--lp-red);
    color: #fff;
}

.recipe-table-editor {
    padding: 14px 16px 16px;
}

.recipe-table-editor-head,
.recipe-item-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 130px 150px 46px;
    gap: 10px;
    align-items: center;
}

.recipe-table-editor-head {
    background: #fff3dd;
    color: var(--lp-red-dark);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 10px;
}

.recipe-items-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recipe-item-row input:first-child {
    text-transform: uppercase;
}

.btn-add-item {
    margin-top: 12px;
    border-radius: 12px;
    border: 1px dashed rgba(137, 13, 27, .28);
    color: var(--lp-red-dark);
    font-weight: 800;
    background: #fff;
}

.btn-add-item:hover {
    background: rgba(185, 28, 43, .06);
    color: var(--lp-red-dark);
}

.block-rendimento-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 130px 150px;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    background: #ffc21a;
    border-top: 2px solid rgba(0,0,0,.68);
}

.rendimento-label {
    color: #111;
    font-weight: 950;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: .03em;
}

.block-rendimento-row .form-control {
    border-color: rgba(0,0,0,.28);
    font-weight: 900;
    color: #111;
}

@media (max-width: 992px) {
    .block-title-grid,
    .recipe-table-editor-head,
    .recipe-item-row,
    .block-rendimento-row {
        grid-template-columns: 1fr;
    }

    .recipe-table-editor-head {
        display: none;
    }

    .recipe-item-row {
        background: #fff;
        border: 1px solid rgba(137, 13, 27, .12);
        border-radius: 14px;
        padding: 12px;
    }

    .block-rendimento-row {
        text-align: left;
    }

    .rendimento-label {
        text-align: left;
    }
}

@media (max-width: 576px) {
    .recipe-form-hero-v2 .recipe-actions-bar {
        width: 100%;
        justify-content: stretch;
    }

    .recipe-form-hero-v2 .recipe-actions-bar .btn {
        width: 100%;
    }

    .recipe-tech-block-head {
        align-items: stretch;
        flex-direction: column;
    }
}

/* ===============================
   Lapolitália - Receitas V3
   Visualização em ficha técnica + foto do produto
   =============================== */

.btn-lp-back {
    background: #fffaf4;
    border: 1px solid rgba(139, 18, 32, .22);
    color: var(--lp-red-dark, #8b1220);
    border-radius: 14px;
    font-weight: 800;
    padding: 12px 18px;
    box-shadow: 0 10px 24px rgba(139, 18, 32, .08);
}

.btn-lp-back:hover {
    background: var(--lp-red, #b51d2a);
    border-color: var(--lp-red, #b51d2a);
    color: #fff;
}

.recipe-actions-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.recipe-status-switch-v3 {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 14px 13px 16px;
    border-radius: 18px;
}

.recipe-status-switch-v3 .lp-switch-slider {
    flex: 0 0 58px;
    width: 58px;
    height: 32px;
    margin: 0;
}

.recipe-status-switch-v3 .lp-switch-slider::before {
    width: 26px;
    height: 26px;
    top: 3px;
    left: 3px;
}

.recipe-status-switch-v3 input:checked + .lp-switch-slider::before {
    transform: translateX(26px);
}

.recipe-photo-upload {
    border: 1px dashed rgba(139, 18, 32, .28);
    border-radius: 20px;
    padding: 22px;
    min-height: 148px;
    background: linear-gradient(135deg, #fffaf5, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    cursor: pointer;
    transition: .2s ease;
}

.recipe-photo-upload:hover {
    border-color: var(--lp-red, #b51d2a);
    box-shadow: 0 14px 30px rgba(139, 18, 32, .08);
    transform: translateY(-1px);
}

.recipe-photo-upload input {
    display: none;
}

.photo-upload-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: rgba(139, 18, 32, .1);
    color: var(--lp-red-dark, #8b1220);
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    font-size: 20px;
}

.recipe-photo-upload strong {
    color: var(--lp-red-dark, #8b1220);
}

.recipe-photo-upload small {
    color: #6b6570;
    margin-top: 4px;
}

.current-recipe-photo {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fffaf5;
    border: 1px solid rgba(139, 18, 32, .16);
    border-radius: 16px;
    padding: 10px;
}

.current-recipe-photo img {
    width: 76px;
    height: 58px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.08);
}

.current-recipe-photo span {
    font-weight: 800;
    color: var(--lp-red-dark, #8b1220);
    font-size: .9rem;
}

.receitas-table-v2 .actions-cell {
    min-width: 430px;
}

.visual-receita-modal .modal-body {
    background: #f7f2ea;
    border-radius: 0 0 26px 26px;
}

.ficha-preview-a4 {
    background: #fff;
    width: min(100%, 820px);
    margin: 0 auto;
    padding: 28px;
    box-shadow: 0 22px 60px rgba(0,0,0,.16);
    border-radius: 10px;
}

.ficha-print-table {
    width: 100%;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    border: 3px solid #000;
    background: #fff;
}

.ficha-print-row {
    border-bottom: 3px solid #000;
    text-align: center;
    font-weight: 900;
    line-height: 1.1;
}

.ficha-print-yellow {
    background: #ffc000;
}

.ficha-print-small-title {
    font-size: 21px;
    padding: 5px 8px;
}

.ficha-print-main-title {
    font-size: 29px;
    padding: 7px 8px;
}

.ficha-print-update {
    font-size: 18px;
    padding: 5px 8px;
    font-weight: 700;
}

.ficha-photo-line {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 14px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 3px solid #000;
    min-height: 92px;
}

.ficha-photo-line img {
    width: 112px;
    height: 76px;
    object-fit: cover;
    border: 2px solid #000;
}

.ficha-photo-line strong {
    display: block;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
}

.ficha-photo-line span {
    display: block;
    font-size: 14px;
    margin-top: 4px;
}

.ficha-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
}

.ficha-grid > div {
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    text-align: center;
    padding: 3px 6px;
    min-height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ficha-grid > div:last-child {
    border-right: 0;
}

.ficha-grid-head > div {
    font-size: 22px;
    font-weight: 900;
    padding: 5px 6px;
}

.ficha-grid-line > div {
    font-size: 18px;
    font-weight: 500;
}

.ficha-grid-total > div {
    background: #ffc000;
    font-size: 22px;
    font-weight: 900;
    padding: 5px 6px;
}

.ficha-grid-total > div:nth-child(1),
.ficha-grid-total > div:nth-child(2) {
    background: #ffc000;
}

.ficha-print-block-title {
    font-size: 20px;
    padding: 4px 8px;
    background: #fff;
}

.ficha-print-separator {
    height: 17px;
    background: #d9d9d9;
    border-bottom: 3px solid #000;
}

.mt-ficha {
    margin-top: 0;
}

.ficha-preparo-text {
    min-height: 110px;
    border-bottom: 0;
    padding: 8px 10px;
    font-size: 16px;
    line-height: 1.22;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .receitas-table-v2 .actions-cell {
        min-width: 360px;
    }

    .ficha-preview-a4 {
        padding: 12px;
    }

    .ficha-print-small-title {
        font-size: 15px;
    }

    .ficha-print-main-title {
        font-size: 20px;
    }

    .ficha-print-update,
    .ficha-grid-line > div,
    .ficha-preparo-text {
        font-size: 12px;
    }

    .ficha-grid-head > div,
    .ficha-grid-total > div,
    .ficha-print-block-title {
        font-size: 14px;
    }

    .ficha-photo-line {
        grid-template-columns: 82px 1fr;
    }

    .ficha-photo-line img {
        width: 82px;
        height: 58px;
    }
}



/* ===============================
   Lapolitália - Receita Form V4
   Foto com prévia + apenas modo de preparo fixo
   =============================== */
.recipe-photo-card {
    position: relative;
}

.recipe-preparo-sticky {
    position: sticky;
    top: 96px;
    z-index: 3;
}

.recipe-photo-upload.has-selected-file {
    border-style: solid;
    border-color: rgba(38, 124, 82, .45);
    background: linear-gradient(135deg, rgba(38, 124, 82, .08), #ffffff);
}

.recipe-photo-upload.has-selected-file .photo-upload-icon {
    background: rgba(38, 124, 82, .12);
    color: #267c52;
}

.selected-recipe-photo {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7fff9;
    border: 1px solid rgba(38, 124, 82, .22);
    border-radius: 16px;
    padding: 10px;
}

.selected-recipe-photo img {
    width: 82px;
    height: 62px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(38, 124, 82, .2);
    background: #fff;
}

.selected-recipe-photo strong {
    display: block;
    color: #267c52;
    font-weight: 900;
    font-size: .92rem;
}

.selected-recipe-photo span {
    display: block;
    color: #6b6570;
    font-size: .82rem;
    word-break: break-word;
}

.ficha-photo-after-preparo {
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 10px;
    align-items: stretch;
    padding: 8px 10px;
    border-top: 3px solid #000;
    min-height: 118px;
}

.ficha-photo-after-preparo > div {
    display: flex;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    border: 2px solid #000;
    padding: 8px;
    text-transform: uppercase;
}

.ficha-photo-after-preparo img {
    width: 170px;
    height: 108px;
    object-fit: cover;
    object-position: center;
    border: 2px solid #000;
    background: #fff;
}

.ficha-photo-after-preparo strong {
    font-size: 16px;
    font-weight: 900;
}

.ficha-photo-after-preparo span {
    font-size: 12px;
    margin-top: 4px;
}

@media (max-width: 1199px) {
    .recipe-preparo-sticky {
        position: relative;
        top: auto;
    }
}

@media (max-width: 768px) {
    .ficha-photo-after-preparo {
        grid-template-columns: 1fr 112px;
        min-height: 82px;
    }

    .ficha-photo-after-preparo img {
        width: 112px;
        height: 72px;
    }

    .ficha-photo-after-preparo strong {
        font-size: 12px;
    }

    .ficha-photo-after-preparo span {
        font-size: 10px;
    }
}

/* =========================================================
   LAPOLITÁLIA - STYLE CONSOLIDADO V8
   Ajuste final da foto da ficha técnica
   - Remove regras duplicadas V5/V6/V7
   - Foto ocupa o bloco da ficha sem cortar
   - Mantém bordas quando a proporção não encaixar
   ========================================================= */

.ficha-photo-after-preparo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 175px !important;
    min-height: 175px !important;
    max-height: 175px !important;
    padding: 8px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #fff !important;
    border-top: 3px solid #000 !important;
    border-left: 3px solid #000 !important;
    border-right: 3px solid #000 !important;
    border-bottom: 3px solid #000 !important;
}

.ficha-photo-after-preparo img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
}

/* Oculta o quadro/texto lateral antigo "Foto do produto pronto" */
.ficha-photo-after-preparo > div {
    display: none !important;
}

/* Prévia da foto no formulário: mostra inteira, sem cortar */
.current-recipe-photo img,
.selected-recipe-photo img {
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff !important;
}

/* Impressão A4: controla a altura para ajudar a ficha a caber em uma folha */
@media print {
    .ficha-photo-after-preparo {
        height: 145px !important;
        min-height: 145px !important;
        max-height: 145px !important;
        padding: 6px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .ficha-photo-after-preparo img {
        object-fit: contain !important;
        object-position: center center !important;
    }
}

@media (max-width: 768px) {
    .ficha-photo-after-preparo {
        height: 135px !important;
        min-height: 135px !important;
        max-height: 135px !important;
    }
}

/* =========================================================
   Lapolitália - Receita Form V9
   Seleção de resultado: RENDIMENTO manual ou TOTAL automático
   ========================================================= */
.block-resultado-row {
    grid-template-columns: minmax(220px, 1fr) 130px 150px;
}

.block-resultado-row .bloco-resultado-tipo {
    background-color: #ffc21a;
    border-color: rgba(0,0,0,.38);
    color: #111;
    text-transform: uppercase;
    font-weight: 950;
    min-height: 50px;
}

.block-resultado-row .bloco-resultado-quantidade[readonly],
.block-resultado-row .resultado-auto {
    background: #fff7dc;
    border-color: rgba(0,0,0,.28);
    color: #111;
    cursor: not-allowed;
}

.block-resultado-row .bloco-resultado-quantidade[readonly]::placeholder {
    color: #856404;
}

@media (max-width: 992px) {
    .block-resultado-row {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Lapolitália - Histórico da Receita v1
   Linha do tempo premium
   Cole no final de assets/css/style.css
   ========================================================= */
.history-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lp-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 900;
    margin-bottom: 6px;
}

.history-recipe-title {
    color: var(--lp-red-dark);
    font-weight: 950;
    letter-spacing: -.02em;
}

.history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-tags span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #fff8ef;
    border: 1px solid rgba(234, 223, 206, .9);
    color: var(--lp-muted);
    font-size: .84rem;
    font-weight: 800;
}

.history-tags span.active {
    background: rgba(46,116,80,.10);
    color: var(--lp-green-dark);
    border-color: rgba(46,116,80,.18);
}

.history-tags span.inactive {
    background: rgba(122,117,128,.10);
    color: #68636f;
}

.history-meta-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 12px;
    min-width: min(100%, 440px);
}

.history-meta-box > div {
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fffaf4, #fff);
    border: 1px solid var(--lp-border);
}

.history-meta-box small,
.history-stat-card span {
    display: block;
    color: var(--lp-muted);
    font-weight: 850;
    font-size: .8rem;
    margin-bottom: 4px;
}

.history-meta-box strong {
    display: block;
    color: var(--lp-red-dark);
    font-weight: 950;
    line-height: 1.15;
}

.history-meta-box span {
    display: block;
    color: var(--lp-muted);
    font-size: .82rem;
    margin-top: 3px;
}

.history-stat-card {
    min-height: 116px;
    padding: 22px;
    border-left: 6px solid var(--lp-red);
    position: relative;
    overflow: hidden;
}

.history-stat-card.green {
    border-left-color: var(--lp-green);
}

.history-stat-card strong {
    color: var(--lp-red-dark);
    display: block;
    font-size: 2rem;
    font-weight: 950;
    line-height: 1;
}

.history-stat-card i {
    position: absolute;
    right: 18px;
    bottom: 12px;
    font-size: 3.2rem;
    opacity: .08;
    color: var(--lp-red-dark);
}

.history-last-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(174,31,39,.08);
    color: var(--lp-red-dark);
    border: 1px solid rgba(174,31,39,.14);
    font-size: .86rem;
    font-weight: 850;
}

.history-empty-state {
    border: 1px dashed rgba(174,31,39,.20);
    border-radius: 22px;
    padding: 34px;
    text-align: center;
    background: #fffaf5;
}

.history-timeline {
    position: relative;
    display: grid;
    gap: 18px;
    padding-left: 28px;
}

.history-timeline::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(174,31,39,.28), rgba(46,116,80,.24));
}

.history-item {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
}

.history-point {
    width: 34px;
    height: 34px;
    margin-left: -28px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--lp-red);
    color: #fff;
    box-shadow: 0 10px 24px rgba(174,31,39,.18);
    z-index: 2;
}

.history-item.success .history-point { background: var(--lp-green); box-shadow: 0 10px 24px rgba(46,116,80,.18); }
.history-item.warning .history-point { background: #d99612; box-shadow: 0 10px 24px rgba(217,150,18,.18); }
.history-item.print .history-point { background: #34333a; box-shadow: 0 10px 24px rgba(52,51,58,.18); }
.history-item.muted .history-point { background: #85818a; box-shadow: 0 10px 24px rgba(133,129,138,.16); }

.history-content {
    border: 1px solid var(--lp-border);
    border-radius: 22px;
    padding: 18px;
    background: linear-gradient(135deg, #fff 0%, #fffaf4 100%);
    box-shadow: 0 14px 34px rgba(80,42,25,.06);
}

.history-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.history-item-head h4 {
    color: var(--lp-red-dark);
    font-weight: 950;
    margin: 0 0 3px;
    font-size: 1.05rem;
}

.history-item-head p {
    color: var(--lp-muted);
    font-size: .88rem;
}

.history-item-head p strong {
    color: var(--lp-text);
}

.history-field-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(174,31,39,.08);
    color: var(--lp-red-dark);
    font-size: .76rem;
    font-weight: 900;
    white-space: nowrap;
}

.history-description {
    color: var(--lp-muted);
    margin-bottom: 12px;
}

.history-diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.history-diff-grid > div {
    border: 1px solid rgba(234,223,206,.92);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.history-diff-grid small {
    display: block;
    padding: 8px 10px;
    background: #fff2df;
    color: var(--lp-red-dark);
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .72rem;
}

.history-diff-grid pre {
    margin: 0;
    padding: 10px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--lp-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: .86rem;
    line-height: 1.35;
    max-height: 220px;
    overflow: auto;
    background: #fff;
}

@media (max-width: 768px) {
    .history-meta-box,
    .history-diff-grid {
        grid-template-columns: 1fr;
    }

    .history-timeline {
        padding-left: 18px;
    }

    .history-timeline::before {
        left: 9px;
    }

    .history-item {
        grid-template-columns: 26px 1fr;
        gap: 10px;
    }

    .history-point {
        width: 30px;
        height: 30px;
        margin-left: -18px;
        border-radius: 12px;
    }

    .history-item-head {
        flex-direction: column;
    }

    .history-field-chip {
        white-space: normal;
    }
}

/* =========================================================
   Lapolitália - Histórico da Receita v1
   Linha do tempo premium
   Cole no final de assets/css/style.css
   ========================================================= */
.history-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lp-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 900;
    margin-bottom: 6px;
}

.history-recipe-title {
    color: var(--lp-red-dark);
    font-weight: 950;
    letter-spacing: -.02em;
}

.history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-tags span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #fff8ef;
    border: 1px solid rgba(234, 223, 206, .9);
    color: var(--lp-muted);
    font-size: .84rem;
    font-weight: 800;
}

.history-tags span.active {
    background: rgba(46,116,80,.10);
    color: var(--lp-green-dark);
    border-color: rgba(46,116,80,.18);
}

.history-tags span.inactive {
    background: rgba(122,117,128,.10);
    color: #68636f;
}

.history-meta-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 12px;
    min-width: min(100%, 440px);
}

.history-meta-box > div {
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fffaf4, #fff);
    border: 1px solid var(--lp-border);
}

.history-meta-box small,
.history-stat-card span {
    display: block;
    color: var(--lp-muted);
    font-weight: 850;
    font-size: .8rem;
    margin-bottom: 4px;
}

.history-meta-box strong {
    display: block;
    color: var(--lp-red-dark);
    font-weight: 950;
    line-height: 1.15;
}

.history-meta-box span {
    display: block;
    color: var(--lp-muted);
    font-size: .82rem;
    margin-top: 3px;
}

.history-stat-card {
    min-height: 116px;
    padding: 22px;
    border-left: 6px solid var(--lp-red);
    position: relative;
    overflow: hidden;
}

.history-stat-card.green {
    border-left-color: var(--lp-green);
}

.history-stat-card strong {
    color: var(--lp-red-dark);
    display: block;
    font-size: 2rem;
    font-weight: 950;
    line-height: 1;
}

.history-stat-card i {
    position: absolute;
    right: 18px;
    bottom: 12px;
    font-size: 3.2rem;
    opacity: .08;
    color: var(--lp-red-dark);
}

.history-last-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(174,31,39,.08);
    color: var(--lp-red-dark);
    border: 1px solid rgba(174,31,39,.14);
    font-size: .86rem;
    font-weight: 850;
}

.history-empty-state {
    border: 1px dashed rgba(174,31,39,.20);
    border-radius: 22px;
    padding: 34px;
    text-align: center;
    background: #fffaf5;
}

.history-timeline {
    position: relative;
    display: grid;
    gap: 18px;
    padding-left: 28px;
}

.history-timeline::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(174,31,39,.28), rgba(46,116,80,.24));
}

.history-item {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
}

.history-point {
    width: 34px;
    height: 34px;
    margin-left: -28px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--lp-red);
    color: #fff;
    box-shadow: 0 10px 24px rgba(174,31,39,.18);
    z-index: 2;
}

.history-item.success .history-point { background: var(--lp-green); box-shadow: 0 10px 24px rgba(46,116,80,.18); }
.history-item.warning .history-point { background: #d99612; box-shadow: 0 10px 24px rgba(217,150,18,.18); }
.history-item.print .history-point { background: #34333a; box-shadow: 0 10px 24px rgba(52,51,58,.18); }
.history-item.muted .history-point { background: #85818a; box-shadow: 0 10px 24px rgba(133,129,138,.16); }

.history-content {
    border: 1px solid var(--lp-border);
    border-radius: 22px;
    padding: 18px;
    background: linear-gradient(135deg, #fff 0%, #fffaf4 100%);
    box-shadow: 0 14px 34px rgba(80,42,25,.06);
}

.history-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.history-item-head h4 {
    color: var(--lp-red-dark);
    font-weight: 950;
    margin: 0 0 3px;
    font-size: 1.05rem;
}

.history-item-head p {
    color: var(--lp-muted);
    font-size: .88rem;
}

.history-item-head p strong {
    color: var(--lp-text);
}

.history-field-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(174,31,39,.08);
    color: var(--lp-red-dark);
    font-size: .76rem;
    font-weight: 900;
    white-space: nowrap;
}

.history-description {
    color: var(--lp-muted);
    margin-bottom: 12px;
}

.history-diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.history-diff-grid > div {
    border: 1px solid rgba(234,223,206,.92);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.history-diff-grid small {
    display: block;
    padding: 8px 10px;
    background: #fff2df;
    color: var(--lp-red-dark);
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .72rem;
}

.history-diff-grid pre {
    margin: 0;
    padding: 10px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--lp-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: .86rem;
    line-height: 1.35;
    max-height: 220px;
    overflow: auto;
    background: #fff;
}

@media (max-width: 768px) {
    .history-meta-box,
    .history-diff-grid {
        grid-template-columns: 1fr;
    }

    .history-timeline {
        padding-left: 18px;
    }

    .history-timeline::before {
        left: 9px;
    }

    .history-item {
        grid-template-columns: 26px 1fr;
        gap: 10px;
    }

    .history-point {
        width: 30px;
        height: 30px;
        margin-left: -18px;
        border-radius: 12px;
    }

    .history-item-head {
        flex-direction: column;
    }

    .history-field-chip {
        white-space: normal;
    }
}

/* ===============================
   Lapolitália - Histórico V2
   Modal lateral na tela de receitas
   =============================== */
.lp-history-drawer {
    width: min(720px, 96vw) !important;
    border-left: 1px solid var(--lp-border);
    background: linear-gradient(135deg, #fffdf9 0%, #fff8ef 100%);
    box-shadow: -22px 0 70px rgba(35, 20, 15, .20);
}

.lp-history-drawer-header {
    border-bottom: 1px solid rgba(174,31,39,.10);
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(12px);
    padding: 20px 22px;
}

.lp-history-drawer-header .offcanvas-title {
    color: var(--lp-red-dark);
    font-weight: 950;
    margin-bottom: 2px;
}

.lp-history-drawer-header small {
    color: var(--lp-muted);
    font-weight: 650;
}

.history-drawer-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(174,31,39,.10);
    color: var(--lp-red-dark);
    flex: 0 0 auto;
}

.lp-history-drawer-body {
    padding: 22px;
}

.history-drawer-summary {
    background: #fff;
    border: 1px solid var(--lp-border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(80, 42, 25, .07);
    margin-bottom: 16px;
}

.history-drawer-summary h3 {
    color: var(--lp-red-dark);
    font-weight: 950;
    margin: 2px 0 0;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.history-drawer-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.history-drawer-meta > div,
.history-drawer-stats > div {
    background: #fff;
    border: 1px solid var(--lp-border);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 10px 24px rgba(80, 42, 25, .055);
}

.history-drawer-meta small,
.history-drawer-stats span {
    display: block;
    color: var(--lp-muted);
    font-weight: 800;
    font-size: .78rem;
    margin-bottom: 4px;
}

.history-drawer-meta strong {
    display: block;
    color: var(--lp-text);
    font-weight: 900;
}

.history-drawer-meta span {
    color: var(--lp-muted);
    font-size: .84rem;
}

.history-drawer-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.history-drawer-stats strong {
    color: var(--lp-red-dark);
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 950;
}

.history-drawer-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 18px;
}

.history-drawer-title-row h4 {
    color: var(--lp-red-dark);
    font-size: 1.08rem;
    font-weight: 950;
    margin: 0;
}

.history-drawer-title-row p {
    color: var(--lp-muted);
    margin: 2px 0 0;
    font-size: .9rem;
}

.history-drawer-title-row > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(174,31,39,.08);
    border: 1px solid rgba(174,31,39,.12);
    color: var(--lp-red-dark);
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 850;
    white-space: nowrap;
}

.history-timeline.drawer-mode {
    padding-left: 24px;
}

.history-timeline.drawer-mode .history-item {
    grid-template-columns: 36px 1fr;
    gap: 13px;
    margin-bottom: 14px;
}

.history-timeline.drawer-mode .history-content {
    padding: 16px;
    border-radius: 20px;
}

.history-timeline.drawer-mode .history-item-head h4 {
    font-size: 1rem;
}

.history-timeline.drawer-mode .history-description {
    font-size: .9rem;
}

.history-image-box {
    min-height: 130px;
    background: #fff;
    border: 1px dashed rgba(174,31,39,.25);
    border-radius: 16px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.history-image-box img {
    max-width: 100%;
    max-height: 190px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.08);
    background: #fff;
}

.history-image-box small {
    color: var(--lp-muted);
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-diff-grid.image-diff {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-item.image-change .history-content {
    border-color: rgba(46,116,80,.20);
}

.history-empty-state.compact {
    background: #fff;
    border: 1px dashed rgba(174,31,39,.22);
    border-radius: 22px;
    padding: 28px 18px;
    text-align: center;
}

@media (max-width: 768px) {
    .lp-history-drawer {
        width: 100vw !important;
    }

    .lp-history-drawer-body {
        padding: 16px;
    }

    .history-drawer-meta,
    .history-drawer-stats,
    .history-diff-grid.image-diff {
        grid-template-columns: 1fr;
    }

    .history-drawer-title-row {
        flex-direction: column;
    }

    .history-drawer-title-row > span {
        white-space: normal;
    }
}

/* Lapolitália - Receitas V7: ações apenas com ícones */
.actions-cell-icons {
    min-width: 230px !important;
    white-space: nowrap;
}

.actions-cell-icons .btn-icon-action {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    margin-left: 4px;
    vertical-align: middle;
}

.actions-cell-icons .btn-icon-action i {
    margin: 0 !important;
    font-size: .92rem;
}

@media (max-width: 768px) {
    .actions-cell-icons {
        min-width: 190px !important;
        white-space: normal;
    }

    .actions-cell-icons .btn-icon-action {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
    }
}

/* =========================================================
   Lapolitália - Histórico V3
   Destaque linha a linha no antes/depois da ficha técnica
   ========================================================= */

.history-diff-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 8px;
}

.diff-change-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(174, 31, 39, .10);
    color: var(--lp-red-dark);
    border: 1px solid rgba(174, 31, 39, .15);
    font-size: .78rem;
    font-weight: 900;
}

.diff-change-badge.neutral {
    background: rgba(46, 116, 80, .10);
    color: var(--lp-green-dark);
    border-color: rgba(46, 116, 80, .16);
}

.history-diff-grid.text-diff.enhanced {
    align-items: stretch;
}

.history-diff-grid.text-diff.enhanced > div {
    overflow: hidden;
}

.diff-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: #fff;
}

.diff-line {
    border-radius: 10px;
    padding: 7px 9px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .86rem;
    line-height: 1.35;
    color: var(--lp-text);
    border: 1px solid transparent;
    word-break: break-word;
    white-space: pre-wrap;
}

.diff-line.same {
    background: #fff;
    color: #55515a;
}

.diff-line.removed {
    background: rgba(174, 31, 39, .12);
    border-color: rgba(174, 31, 39, .24);
    color: #7f111c;
    font-weight: 900;
    position: relative;
}

.diff-line.added {
    background: rgba(46, 116, 80, .13);
    border-color: rgba(46, 116, 80, .24);
    color: #185c3d;
    font-weight: 900;
    position: relative;
}

.diff-line.removed::before,
.diff-line.added::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border-radius: 999px;
    color: #fff;
    font-size: .72rem;
    font-weight: 950;
}

.diff-line.removed::before {
    content: "−";
    background: var(--lp-red);
}

.diff-line.added::before {
    content: "+";
    background: var(--lp-green);
}

.diff-line.placeholder {
    background: rgba(122, 117, 128, .08);
    border-color: rgba(122, 117, 128, .12);
    color: var(--lp-muted);
    font-style: italic;
}

.history-diff-grid.image-diff .history-image-box img {
    object-fit: contain;
    background: #fff;
}

@media (max-width: 768px) {
    .history-diff-toolbar {
        justify-content: flex-start;
    }

    .diff-line {
        font-size: .78rem;
        padding: 7px 8px;
    }
}

/* Lapolitália - Index V4: subcategorias clicáveis */
.subcategory-pill.subcategory-link {
    text-decoration: none;
    cursor: pointer;
    justify-content: space-between;
    transition: .18s ease;
}

.subcategory-pill.subcategory-link span {
    flex: 1;
}

.subcategory-pill.subcategory-link em {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(174, 31, 39, .08);
    color: var(--lp-red-dark);
    font-style: normal;
    opacity: 0;
    transform: translateX(-4px);
    transition: .18s ease;
}

.subcategory-pill.subcategory-link:hover {
    border-color: rgba(174, 31, 39, .28);
    background: #fff;
    color: var(--lp-red-dark);
    transform: translateX(3px);
    box-shadow: 0 10px 22px rgba(80, 42, 25, .08);
}

.subcategory-pill.subcategory-link:hover em {
    opacity: 1;
    transform: translateX(0);
}

/* Lapolitália - Alertbox premium com ícone verificado */
.feedback-premium-modal {
    position: relative;
    border: 1px solid var(--lp-border);
    border-radius: 28px;
    padding: 28px 28px 26px;
    text-align: center;
    box-shadow: 0 28px 90px rgba(34, 20, 20, .26);
    overflow: hidden;
}

.feedback-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7a747c;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
}

.feedback-close:hover {
    background: rgba(134, 24, 32, .08);
    color: var(--lp-red-dark);
}

.feedback-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 1.7rem;
}

.feedback-icon.success {
    background: rgba(46,116,80,.12);
    color: var(--lp-green-dark);
}

.feedback-icon.danger,
.feedback-icon.warning {
    background: rgba(174,31,39,.10);
    color: var(--lp-red-dark);
}

.feedback-title {
    color: var(--lp-text);
    font-size: 1.38rem;
    line-height: 1.1;
    font-weight: 950;
    margin: 0 0 8px;
}

.feedback-text {
    color: var(--lp-muted);
    font-size: 1rem;
    line-height: 1.35;
    margin: 0 0 22px;
}

.feedback-btn {
    min-width: 190px;
    min-height: 52px;
    border-radius: 16px;
    font-size: 1rem;
}

@media (max-width: 576px) {
    .feedback-premium-modal {
        margin: 0 14px;
        padding: 26px 20px 22px;
    }

    .feedback-btn {
        width: 100%;
    }
}

/* Lapolitália - padrão único para alertbox/modal de mensagem */
.feedback-premium-modal {
    position: relative;
    border: 1px solid var(--lp-border);
    border-radius: 28px;
    padding: 28px 28px 26px;
    text-align: center;
    box-shadow: 0 28px 90px rgba(34, 20, 20, .26);
    overflow: hidden;
}

.feedback-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7a747c;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
}

.feedback-close:hover {
    background: rgba(134, 24, 32, .08);
    color: var(--lp-red-dark);
}

.feedback-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 1.7rem;
}

.feedback-icon.success {
    background: rgba(46,116,80,.12);
    color: var(--lp-green-dark);
}

.feedback-icon.danger,
.feedback-icon.warning {
    background: rgba(174,31,39,.10);
    color: var(--lp-red-dark);
}

.feedback-title {
    color: var(--lp-text);
    font-size: 1.38rem;
    line-height: 1.1;
    font-weight: 950;
    margin: 0 0 8px;
}

.feedback-text {
    color: var(--lp-muted);
    font-size: 1rem;
    line-height: 1.35;
    margin: 0 0 22px;
}

.feedback-btn {
    min-width: 190px;
    min-height: 52px;
    border-radius: 16px;
    font-size: 1rem;
}

@media (max-width: 576px) {
    .feedback-premium-modal {
        margin: 0 14px;
        padding: 26px 20px 22px;
    }

    .feedback-btn {
        width: 100%;
    }
}

/* Etapa 8 v7 - Temas sazonais limpo: sem logo gigante, com textura sazonal no background */

/* 
   IMPORTANTE:
   Esta versão substitui totalmente os CSS de temas sazonais anteriores.
   Remova os blocos antigos da Etapa 8 v1/v2/v3/v4/v5/v6 e deixe apenas este.
*/

.tema-sazonal {
    --season-main: var(--lp-red);
    --season-secondary: var(--lp-green);
}

/* Base */
.hero-card.tema-sazonal,
body.tema-sazonal .login-brand,
body.tema-sazonal .login-card {
    position: relative;
    overflow: hidden;
}

/* Remove qualquer selo, watermark de logo, bolinhas soltas ou ornamentos antigos */
.hero-card.tema-sazonal::after,
body.tema-sazonal .login-brand::after,
.hero-card.tema-sazonal .row::before,
.hero-card.tema-sazonal .row::after,
.hero-card.tema-sazonal .hero-actions::before,
body.tema-sazonal .login-card::before,
body.tema-sazonal .login-card::after,
body.tema-sazonal .login-form-box::before {
    content: none !important;
    display: none !important;
}

/* Conteúdo acima dos fundos decorativos */
.hero-card.tema-sazonal .row,
body.tema-sazonal .login-brand > * {
    position: relative;
    z-index: 2;
}

/* HERO - textura suave em todo o card, sem logo gigante */
.hero-card.tema-sazonal {
    border-color: color-mix(in srgb, var(--season-main) 20%, var(--lp-border));
    box-shadow: 0 18px 45px rgba(80, 42, 25, .10);
}

.hero-card.tema-sazonal::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--season-main) 8%, transparent) 0 15%, transparent 16%),
        radial-gradient(circle at 14% 86%, color-mix(in srgb, var(--season-secondary) 6%, transparent) 0 18%, transparent 19%),
        linear-gradient(135deg, color-mix(in srgb, var(--season-main) 4%, transparent), transparent 62%);
    pointer-events: none;
    z-index: 1;
}

/* LOGIN - textura em todo o bloco vermelho, sem duplicar a logo */
body.tema-sazonal .login-brand {
    border-top: 4px solid color-mix(in srgb, var(--season-secondary) 55%, var(--season-main) 45%);
}

body.tema-sazonal .login-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 86% 16%, rgba(255,255,255,.10) 0 13%, transparent 14%),
        radial-gradient(circle at 12% 88%, rgba(255,255,255,.07) 0 18%, transparent 19%),
        linear-gradient(135deg, color-mix(in srgb, var(--season-secondary) 8%, transparent), transparent 66%);
    pointer-events: none;
    z-index: 1;
}

/* SIDEBAR - somente mensagem, legível */
.sidebar.tema-sazonal .brand-box {
    position: relative;
}

.sidebar.tema-sazonal .brand-box::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 18px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--season-secondary);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--season-secondary) 16%, transparent);
}

.season-sidebar-footer {
    border-color: rgba(255,255,255,.18) !important;
    background: rgba(255,255,255,.10) !important;
    color: rgba(255,255,255,.92) !important;
}

.season-sidebar-footer .mini-label {
    color: #fff !important;
    font-weight: 950;
}

.season-sidebar-footer .mini-year {
    color: rgba(255,255,255,.82) !important;
    max-height: 2.8em;
    line-height: 1.4;
    overflow: hidden;
}

/* =========================
   NATAL
   ========================= */

/* Linha fina no topo e textura de neve/luzes */
.tema-natal.hero-card,
body.tema-natal .login-brand {
    border-top: 4px solid color-mix(in srgb, var(--season-secondary) 60%, var(--season-main) 40%);
}

.tema-natal.hero-card::before,
body.tema-natal .login-brand::before {
    background:
        radial-gradient(circle at 12% 20%, rgba(255,255,255,.15) 0 2px, transparent 3px),
        radial-gradient(circle at 30% 66%, rgba(255,255,255,.10) 0 2px, transparent 3px),
        radial-gradient(circle at 62% 28%, rgba(255,255,255,.12) 0 2px, transparent 3px),
        radial-gradient(circle at 84% 76%, rgba(255,255,255,.10) 0 2px, transparent 3px),
        radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--season-secondary) 11%, transparent) 0 15%, transparent 16%),
        linear-gradient(135deg, color-mix(in srgb, var(--season-secondary) 8%, transparent), transparent 64%);
}

/* Luzes discretas, presas no topo do bloco */
.tema-natal.hero-card .row::before,
body.tema-natal .login-brand .brand-logo::before {
    content: none !important;
}

.tema-natal.hero-card::after {
    content: "" !important;
    display: block !important;
    position: absolute;
    right: 28px;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fff8ef;
    box-shadow:
        -26px 0 0 color-mix(in srgb, var(--season-secondary) 88%, #fff 12%),
        -52px 0 0 #fff8ef,
        -78px 0 0 color-mix(in srgb, var(--season-main) 92%, #fff 8%),
        -104px 0 0 color-mix(in srgb, var(--season-secondary) 88%, #fff 12%),
        -130px 0 0 #fff8ef,
        -156px 0 0 color-mix(in srgb, var(--season-main) 92%, #fff 8%);
    opacity: .72;
    z-index: 3;
    pointer-events: none;
}

body.tema-natal .login-brand::after {
    content: "" !important;
    display: block !important;
    position: absolute;
    right: 28px;
    top: 24px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.95);
    box-shadow:
        -26px 0 0 color-mix(in srgb, var(--season-secondary) 88%, #fff 12%),
        -52px 0 0 rgba(255,255,255,.95),
        -78px 0 0 color-mix(in srgb, var(--season-main) 92%, #fff 8%),
        -104px 0 0 color-mix(in srgb, var(--season-secondary) 88%, #fff 12%),
        -130px 0 0 rgba(255,255,255,.95);
    opacity: .58;
    z-index: 3;
    pointer-events: none;
}

/* =========================
   PÁSCOA
   ========================= */
.tema-pascoa.hero-card,
body.tema-pascoa .login-brand {
    border-top: 4px solid color-mix(in srgb, var(--season-main) 55%, var(--season-secondary) 45%);
}

.tema-pascoa.hero-card::before,
body.tema-pascoa .login-brand::before {
    background:
        radial-gradient(ellipse at 88% 18%, color-mix(in srgb, var(--season-secondary) 13%, transparent) 0 14%, transparent 15%),
        radial-gradient(ellipse at 16% 82%, color-mix(in srgb, var(--season-main) 10%, transparent) 0 18%, transparent 19%),
        linear-gradient(135deg, color-mix(in srgb, var(--season-main) 4%, transparent), transparent 62%);
}

/* =========================
   DIA DAS MÃES / NAMORADOS
   ========================= */
.tema-dia-das-maes.hero-card,
.tema-dia-dos-namorados.hero-card,
body.tema-dia-das-maes .login-brand,
body.tema-dia-dos-namorados .login-brand {
    border-top: 4px solid color-mix(in srgb, var(--season-main) 65%, #fff 35%);
}

.tema-dia-das-maes.hero-card::before,
.tema-dia-dos-namorados.hero-card::before,
body.tema-dia-das-maes .login-brand::before,
body.tema-dia-dos-namorados .login-brand::before {
    background:
        radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--season-main) 10%, transparent) 0 16%, transparent 17%),
        radial-gradient(circle at 15% 86%, color-mix(in srgb, var(--season-secondary) 7%, transparent) 0 15%, transparent 16%),
        linear-gradient(135deg, color-mix(in srgb, var(--season-main) 4%, transparent), transparent 64%);
}

/* =========================
   DIA DOS PAIS
   ========================= */
.tema-dia-dos-pais.hero-card,
body.tema-dia-dos-pais .login-brand {
    border-top: 4px solid color-mix(in srgb, var(--season-secondary) 70%, #fff 30%);
}

/* =========================
   INVERNO
   ========================= */
.tema-inverno.hero-card,
body.tema-inverno .login-brand {
    border-top: 4px solid color-mix(in srgb, var(--season-main) 65%, #fff 35%);
}

.tema-inverno.hero-card::before,
body.tema-inverno .login-brand::before {
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,.15) 0 2px, transparent 3px),
        radial-gradient(circle at 82% 25%, rgba(255,255,255,.12) 0 2px, transparent 3px),
        radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--season-main) 10%, transparent) 0 16%, transparent 17%);
}

/* =========================
   VERÃO
   ========================= */
.tema-verao.hero-card,
body.tema-verao .login-brand {
    border-top: 4px solid color-mix(in srgb, var(--season-main) 65%, var(--season-secondary) 35%);
}

/* Responsivo */
@media (max-width: 992px) {
    .tema-natal.hero-card::after {
        right: 20px;
        top: 14px;
        transform: scale(.82);
        transform-origin: right center;
    }
}

@media (max-width: 576px) {
    body.tema-natal .login-brand::after {
        right: 18px;
        top: 18px;
        transform: scale(.78);
        transform-origin: right center;
    }
}

/* Ajuste premium - Remover foto com botão X */
.current-recipe-photo-premium {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 52px 14px 14px;
    border: 1px solid rgba(174,31,39,.18);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(174,31,39,.035), rgba(255,248,239,.72));
    transition: .2s ease;
}

.current-recipe-photo-premium img {
    width: 78px;
    height: 58px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(174,31,39,.14);
}

.current-recipe-photo-premium span {
    display: block;
    color: var(--lp-red-dark);
    font-weight: 900;
}

.photo-remove-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(174,31,39,.18);
    border-radius: 12px;
    background: #fff;
    color: var(--lp-red);
    display: grid;
    place-items: center;
    font-size: .98rem;
    transition: .18s ease;
}

.photo-remove-x:hover {
    background: var(--lp-red);
    border-color: var(--lp-red);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(174,31,39,.18);
}

.current-recipe-photo-premium.photo-marked-remove {
    border-color: rgba(46,116,80,.28);
    background: linear-gradient(135deg, rgba(46,116,80,.075), rgba(255,248,239,.72));
}

.current-recipe-photo-premium.photo-marked-remove .photo-remove-x {
    color: var(--lp-green-dark);
    border-color: rgba(46,116,80,.25);
}

.current-recipe-photo-premium.photo-marked-remove .photo-remove-x:hover {
    background: var(--lp-green-dark);
    border-color: var(--lp-green-dark);
    color: #fff;
}

