:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #1f6f5f;
    --primary-dark: #165448;
    --danger: #b42318;
    --danger-dark: #7a271a;
    --warning: #b54708;
    --success: #027a48;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 18px;
    --sidebar-width: 270px;
    --container: 1200px;
}

/* =========================
   RESET / BASE
   ========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #f7faf8 0%, #f2f5f7 100%);
    color: var(--text);
    word-wrap: break-word;
}

body.no-scroll {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.main,
.card,
.stats-card,
.catalog-card,
.impact-card,
.info-card-impact,
.part-panel-impact,
.recipe-card-impact,
.recipe-box-impact,
.recipe-section,
.tech-card,
.preview-image {
    min-width: 0;
}

/* =========================
   UTILIDADES
   ========================= */

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.actions-inline form {
    margin: 0;
}

.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--muted);
}

.soft-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(15, 23, 42, .12), transparent);
    margin: 18px 0;
}

/* =========================
   COMPONENTES GENERALES
   ========================= */

.card {
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

.stats-card {
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f4fbf8 100%);
    border: 1px solid #e7ecef;
    box-shadow: var(--shadow);
}

.stats-card span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.stats-card strong {
    font-size: 32px;
    line-height: 1;
}

.badge {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-muted {
    background: #e5e7eb;
    color: #374151;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-success {
    background: #ecfdf3;
    color: #027a48;
    border-color: #abefc6;
}

.alert-error {
    background: #fef3f2;
    color: #b42318;
    border-color: #fecdca;
}

.alert-warning {
    background: #fffaeb;
    color: #b54708;
    border-color: #fedf89;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
    background: #e5e7eb;
    color: #111827;
    max-width: 100%;
    white-space: normal;
    text-align: center;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-warning {
    background: #fef3c7;
    color: #92400e;
}

.btn-sm {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
}

/* =========================
   TABLAS
   ========================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.table th {
    font-size: 14px;
    color: var(--muted);
    font-weight: 700;
    background: #fafafa;
}

/* =========================
   FORMULARIOS
   ========================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 600;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: white;
    color: var(--text);
    outline: none;
    transition: .2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #7cc7b2;
    box-shadow: 0 0 0 4px rgba(31, 111, 95, .12);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.error {
    color: #b42318;
    font-size: 13px;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.preview-image {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #f9fafb;
}

/* =========================
   LOGIN
   ========================= */

.login-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(31, 111, 95, .15), transparent 28%),
        radial-gradient(circle at bottom right, rgba(180, 83, 9, .12), transparent 28%),
        linear-gradient(180deg, #f8fbfa 0%, #eef4f3 100%);
}

.login-card {
    width: min(460px, 100%);
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(229, 231, 235, .9);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

.login-card p {
    margin: 0 0 24px;
    color: var(--muted);
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(23, 98, 83, .18);
    border-radius: 12px;
    background: #f4f8f6;
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-back-link:hover {
    transform: translateY(-1px);
    background: #edf4f1;
    box-shadow: 0 10px 22px rgba(18, 34, 29, .10);
}

/* =========================
   PANEL ADMIN
   ========================= */

.admin-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar-backdrop {
    display: none;
}

.admin-sidebar {
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.08), transparent 22%),
        linear-gradient(180deg, #0d2a24 0%, #11352d 100%);
    color: #fff;
    padding: 20px 16px;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255,255,255,.06);
    z-index: 1100;
}

.admin-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.admin-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2a8a76 0%, #83d7be 100%);
    color: #0b1f1b;
    font-weight: 800;
    flex-shrink: 0;
}

.admin-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.admin-brand-copy strong {
    color: #fff;
    font-size: 17px;
    display: block;
    word-break: break-word;
}

.admin-brand-copy small {
    color: rgba(255,255,255,.7);
    font-size: 12px;
    display: block;
    word-break: break-word;
}

.admin-sidebar-close {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    flex-shrink: 0;
    align-self: flex-start;
}

.menu.admin-menu {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
}

.menu.admin-menu a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 16px;
    color: rgba(255,255,255,.88);
    font-weight: 600;
    transition: .2s ease;
}

.menu.admin-menu a:hover,
.menu.admin-menu a.active {
    background: rgba(255,255,255,.14);
    color: #fff;
}

.main {
    min-width: 0;
    padding: 28px;
}

.topbar {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 231, 235, .8);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar h1 {
    margin: 0;
    font-size: 26px;
}

.topbar p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-topbar-modern {
    background: rgba(255,255,255,.84);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(229,231,235,.9);
    box-shadow: var(--shadow);
    border-radius: 20px;
}

.userbox,
.admin-userbox {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1f6f5f 0%, #75d2b7 100%);
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
}

.admin-sidebar-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    padding: 0;
    box-shadow: var(--shadow);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.admin-sidebar-toggle span {
    width: 20px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
}

/* =========================
   ENCABEZADOS ADMIN
   ========================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.page-header h2 {
    margin: 0;
    font-size: 28px;
}

.page-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

/* =========================
   SITIO PÚBLICO
   ========================= */

.public-navbar {
    background: rgba(255, 255, 255, .9);
    position: sticky;
    top: 0;
    z-index: 1200;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229,231,235,.9);
}

.public-navbar-modern {
    background: rgba(255, 255, 255, .88);
}

.public-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 82px;
}

.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.public-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f2f28 0%, #1f6f5f 100%);
    color: #fff;
    font-weight: 800;
    letter-spacing: .5px;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.public-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.public-brand-copy strong {
    font-size: 18px;
    color: #0f2f28;
}

.public-brand-copy small {
    color: #6b7280;
    font-size: 13px;
}

.public-menu-wrap {
    display: flex;
    align-items: center;
}

.public-menu-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.public-menu-modern a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    color: #1f2937;
    transition: .2s ease;
    font-weight: 600;
}

.public-menu-modern a:hover {
    background: #eef4f2;
    color: #0f2f28;
}

.public-admin-link {
    background: #0f2f28;
    color: #fff !important;
}

.public-admin-link:hover {
    background: #1f6f5f !important;
    color: #fff !important;
}

.public-nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    box-shadow: var(--shadow);
}

.public-nav-toggle span {
    width: 20px;
    height: 2px;
    background: #111827;
    border-radius: 999px;
    transition: .25s ease;
}

.public-nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.public-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.public-nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================
   HOME / CATÁLOGO
   ========================= */

.hero {
    padding: 72px 0 36px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 32px;
    align-items: center;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.05;
}

.hero p {
    font-size: 18px;
    color: var(--muted);
    margin: 0 0 20px;
}

.section {
    padding: 28px 0 50px;
}

.section-title {
    margin-bottom: 22px;
}

.section-title h2 {
    margin: 0 0 8px;
    font-size: 34px;
}

.section-title p {
    margin: 0;
    color: var(--muted);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.catalog-card {
    background: white;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, .9);
    box-shadow: var(--shadow);
    transition: .25s ease;
}

.catalog-card:hover {
    transform: translateY(-4px);
}

.catalog-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.catalog-card-content {
    padding: 18px;
    overflow-wrap: anywhere;
}

.detail-grid {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 28px;
    align-items: start;
}

.parts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.part-card {
    background: white;
    border-radius: 18px;
    border: 1px solid rgba(229, 231, 235, .9);
    padding: 18px;
    box-shadow: var(--shadow);
}

.footer {
    background: rgba(255, 255, 255, .9);
    padding: 30px 0;
    color: var(--muted);
    border-top: 1px solid var(--border);
    margin-top: 30px;
}

/* =========================
   DETALLE IMPACT
   ========================= */

.detail-impact-section {
    padding-top: 36px;
    padding-bottom: 14px;
}

.impact-hero-grid {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    gap: 24px;
    align-items: stretch;
}

.impact-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
    border: 1px solid rgba(229,231,235,.92);
    border-radius: 26px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.impact-main-image {
    width: 100%;
    height: 520px;
    object-fit: cover;
    border-radius: 22px;
    cursor: pointer;
}

.impact-empty-image {
    min-height: 520px;
    display: grid;
    place-items: center;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 22px;
}

.impact-title {
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.02;
    margin: 14px 0 10px;
}

.impact-subtitle {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 18px;
}

.impact-copy {
    color: #4b5563;
    line-height: 1.85;
}

.impact-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.impact-fact {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
    min-width: 0;
}

.impact-fact span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.impact-fact strong {
    font-size: 18px;
}

.info-grid-impact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.info-card-impact {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.info-card-impact h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
}

.info-card-impact p {
    margin: 0;
    line-height: 1.8;
    color: #4b5563;
}

/* =========================
   VISTA EXPLOTADA
   ========================= */

.exploded-orbit-layout {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 24px;
    align-items: start;
}

.exploded-stage {
    position: sticky;
    top: 88px;
    min-height: 860px;
    border-radius: 30px;
    padding: 26px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(255,255,255,.10), transparent 18%),
        radial-gradient(circle at top left, rgba(255,255,255,.08), transparent 24%),
        linear-gradient(145deg, #0c2923 0%, #12352e 45%, #173f37 100%);
    box-shadow: 0 30px 90px rgba(15, 23, 42, .24);
}

.exploded-stage-inner {
    position: relative;
    min-height: 808px;
}

.exploded-stage-head {
    position: relative;
    z-index: 5;
    max-width: 620px;
    color: #fff;
}

.exploded-stage-head h3 {
    margin: 14px 0 8px;
    font-size: 30px;
}

.exploded-stage-head p {
    margin: 0;
    color: rgba(255,255,255,.78);
    line-height: 1.7;
}

.exploded-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.exploded-pill {
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.1);
    color: #fff;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    transition: .25s ease;
    font-weight: 600;
    max-width: 100%;
}

.exploded-pill:hover,
.exploded-pill.active {
    background: rgba(255,255,255,.22);
    transform: translateY(-1px);
}

.stage-orbit-canvas {
    position: absolute;
    inset: 230px 0 0 0;
    min-height: 560px;
}

.stage-orbit-ring,
.stage-orbit-ring-2 {
    position: absolute;
    left: 50%;
    top: 54%;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.08);
    pointer-events: none;
}

.stage-orbit-ring {
    width: 420px;
    height: 420px;
}

.stage-orbit-ring-2 {
    width: 580px;
    height: 580px;
}

.stage-glow {
    position: absolute;
    left: 50%;
    top: 54%;
    transform: translate(-50%, -50%);
    width: 460px;
    height: 460px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255,255,255,.12), transparent 68%);
    pointer-events: none;
}

.stage-center {
    position: absolute;
    left: 50%;
    top: 54%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0,0,0,.32);
    border: 2px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    transition: transform .25s ease;
    z-index: 2;
}

.stage-center img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.part-node {
    position: absolute;
    left: 50%;
    top: 54%;
    width: 150px;
    min-height: 174px;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255,255,255,.11);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 60px rgba(0,0,0,.24);
    color: #fff;
    cursor: pointer;
    transform: translate(-50%, -50%) translate(0,0) scale(.5);
    opacity: 0;
    animation: explodeOutClean .8s ease forwards;
    animation-delay: var(--delay, 0ms);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, opacity .3s ease;
    z-index: 3;
}

.part-node:hover {
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(1.03);
}

.part-node.active {
    border-color: rgba(255,255,255,.42);
    box-shadow: 0 28px 70px rgba(0,0,0,.34);
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(1.08);
}

.part-node img {
    width: 100%;
    height: 108px;
    object-fit: cover;
}

.part-node-empty {
    height: 108px;
    background: rgba(255,255,255,.08);
    display: grid;
    place-items: center;
}

.part-node-body {
    padding: 12px 14px;
}

.part-node-body strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.part-node-body span {
    font-size: 12px;
    color: rgba(255,255,255,.76);
}

.part-story-column {
    display: block;
    min-width: 0;
}

.part-panel-impact {
    display: none;
    position: sticky;
    top: 88px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    padding: 22px;
    box-shadow: var(--shadow);
    animation: fadeUp .28s ease;
}

.part-panel-impact.active {
    display: block;
}

.part-panel-impact img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 16px;
    cursor: pointer;
}

.part-panel-impact h3 {
    margin-top: 0;
    font-size: 30px;
}

.part-panel-impact p {
    margin-bottom: 0;
    line-height: 1.85;
    color: #4b5563;
}

.part-mini-list,
.part-mini-item {
    display: none !important;
}

.part-view-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px;
    margin-bottom: 22px;
    border: 1px solid #dbe4df;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

.part-view-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 9px 15px;
    color: #31423c;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
    transition: .22s ease;
}

.part-view-button:hover,
.part-view-button.active {
    color: #fffaf0;
    background: #12362f;
}

.species-3d-viewer[hidden],
.exploded-orbit-layout[hidden] {
    display: none !important;
}

.species-3d-viewer {
    scroll-margin-top: 96px;
}

.species-3d-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
    gap: 24px;
    align-items: stretch;
}

.species-3d-stage {
    position: relative;
    min-height: 680px;
    border-radius: 30px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(245,213,139,.18), transparent 20%),
        linear-gradient(145deg, #08201c 0%, #12362f 56%, #1a4a40 100%);
    box-shadow: 0 30px 90px rgba(15, 23, 42, .24);
}

.species-3d-canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 680px;
    cursor: grab;
    touch-action: none;
}

.species-3d-canvas:active {
    cursor: grabbing;
}

.species-3d-overlay {
    position: absolute;
    left: 24px;
    top: 24px;
    display: grid;
    gap: 8px;
    max-width: calc(100% - 48px);
    color: #fffaf0;
    pointer-events: none;
}

.species-3d-overlay span,
.species-ar-hud span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 700;
}

.species-3d-overlay strong {
    font-size: 32px;
    line-height: 1.1;
    text-shadow: 0 2px 18px rgba(0,0,0,.3);
}

.species-3d-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    padding: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.species-3d-panel > div:first-child {
    padding-bottom: 4px;
}

.species-3d-panel h3 {
    margin: 9px 0 6px;
    font-size: 24px;
    color: #102f29;
}

.species-3d-panel p {
    margin: 0;
    color: #4b5563;
    line-height: 1.45;
}

.species-3d-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.species-3d-detail {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    padding: 10px;
    border: 1px solid #cfe0d7;
    border-radius: 20px;
    background: linear-gradient(135deg, #f7fbf8, #eef7f2);
}

.species-3d-detail-media {
    position: relative;
    min-height: 76px;
    border-radius: 16px;
    overflow: hidden;
    background: #dfeee7;
}

.species-3d-detail-media img {
    width: 100%;
    height: 100%;
    min-height: 76px;
    object-fit: cover;
}

.species-3d-detail-media span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 12px;
    color: #176253;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.species-3d-detail-body {
    min-width: 0;
}

.species-3d-detail-body small,
.species-ar-popup small {
    color: #176253;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.species-3d-detail-body h4 {
    margin: 4px 0 6px;
    color: #102f29;
    font-size: 18px;
    overflow-wrap: anywhere;
}

.species-3d-detail-body p {
    display: -webkit-box;
    margin: 0;
    color: #34443e;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.species-3d-part-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.species-3d-part {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 1px solid #dbe4df;
    border-radius: 16px;
    padding: 9px 10px;
    color: #26342f;
    background: #f8faf9;
    text-align: left;
    cursor: pointer;
    transition: .22s ease;
}

.species-3d-part span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #e8f2ed;
    color: #176253;
    font-weight: 800;
}

.species-3d-part strong {
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.25;
}

.species-3d-part:hover,
.species-3d-part.active {
    border-color: #176253;
    background: #edf7f2;
    transform: translateY(-1px);
}

.species-3d-status {
    min-height: 22px;
    font-size: 14px;
}

.species-ar-page-body {
    margin: 0;
    overflow: hidden;
    background: #071916;
}

.species-ar-page {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #071916;
}

.species-ar-video,
.species-ar-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.species-ar-video {
    object-fit: cover;
    opacity: 0;
    transition: opacity .25s ease;
}

.species-ar-page.camera-active .species-ar-video {
    opacity: 1;
}

.species-ar-canvas {
    z-index: 2;
    touch-action: none;
}

.species-ar-page.real-model-active .species-ar-canvas {
    visibility: hidden;
}

.species-ar-real-model {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #071916;
}

.species-ar-real-model canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.species-real-model-error {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    color: #fffaf0;
    text-align: center;
}

.species-ar-hud {
    position: absolute;
    z-index: 3;
    left: 18px;
    top: 18px;
    display: grid;
    gap: 8px;
    max-width: min(420px, calc(100% - 36px));
    color: #fffaf0;
    text-shadow: 0 2px 16px rgba(0,0,0,.4);
}

.species-ar-hud strong {
    font-size: 28px;
    line-height: 1.1;
}

.species-ar-hud small {
    color: rgba(255,255,255,.82);
}

.species-ar-model-types {
    width: min(380px, 100%);
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    color: rgba(255,255,255,.82);
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    font-size: 13px;
    line-height: 1.45;
}

.species-ar-model-types b {
    color: #f5d58b;
}

.species-ar-tools {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 96px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: min(440px, calc(100vw - 36px));
    transform: translateX(-50%);
}

.species-ar-tools button {
    min-height: 34px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    padding: 7px 12px;
    color: #fffaf0;
    background: rgba(7, 25, 22, .66);
    backdrop-filter: blur(14px);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0,0,0,.14);
}

.species-ar-tools button:hover,
.species-ar-tools button.active {
    color: #102f29;
    background: #f5d58b;
    border-color: #f5d58b;
}

.species-ar-popup {
    position: fixed;
    z-index: 8;
    top: 104px;
    right: 18px;
    width: min(390px, calc(100% - 36px));
    max-height: calc(100vh - 232px);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 22px;
    color: #fffaf0;
    background: rgba(7, 25, 22, .9);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(0,0,0,.36);
}

.species-ar-help {
    position: fixed;
    z-index: 8;
    left: 18px;
    bottom: 104px;
    width: min(420px, calc(100% - 36px));
    max-height: min(66vh, 520px);
    overflow: auto;
    padding: 20px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 22px;
    color: #fffaf0;
    background: rgba(7, 25, 22, .94);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(0,0,0,.34);
}

.species-ar-popup[hidden] {
    display: none !important;
}

.species-ar-help[hidden] {
    display: none !important;
}

.species-ar-popup-close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    padding: 0;
    color: #fffaf0;
    background: rgba(255,255,255,.1);
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.species-ar-help .species-ar-popup-close {
    width: auto;
    min-height: 34px;
    padding: 0 12px;
}

.species-ar-popup-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 18px 12px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.species-ar-popup-body {
    min-height: 0;
    overflow: auto;
    padding: 14px 18px;
}

.species-ar-popup-image {
    width: 100%;
    height: 132px;
    margin: 0 0 14px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.16);
}

.species-ar-popup h1 {
    margin: 6px 0 0;
    color: #fffaf0;
    font-size: 24px;
    line-height: 1.12;
}

.species-ar-popup p {
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 15px;
    line-height: 1.58;
}

.species-ar-help strong {
    display: block;
    margin: 2px 0 10px;
    font-size: 22px;
}

.species-ar-help p,
.species-ar-help li {
    color: rgba(255,255,255,.82);
    line-height: 1.55;
}

.species-ar-help ul {
    margin: 12px 0 0;
    padding-left: 18px;
}

.species-ar-help > small {
    display: block;
    margin-top: 14px;
    color: rgba(255,255,255,.66);
    line-height: 1.45;
}

.species-ar-option-actions {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.species-ar-option-actions button {
    min-height: 40px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 10px;
    padding: 9px 12px;
    color: #fffaf0;
    background: rgba(255,255,255,.08);
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.species-ar-option-actions button:hover,
.species-ar-option-actions button.active {
    color: #102f29;
    background: #f5d58b;
}

.species-ar-popup-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px 18px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.species-ar-popup-actions button {
    flex: 1 1 0;
    min-height: 38px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    padding: 8px 12px;
    color: #102f29;
    background: #f5d58b;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.species-ar-part-list {
    position: absolute;
    z-index: 4;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    background: rgba(7, 25, 22, .64);
    backdrop-filter: blur(12px);
    scrollbar-width: none;
}

.species-ar-part-list::-webkit-scrollbar {
    display: none;
}

.species-ar-part-list .species-3d-part {
    grid-template-columns: 28px minmax(0, 1fr);
    flex: 0 0 min(176px, 68vw);
    padding: 7px;
    color: #fffaf0;
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.09);
}

.species-ar-part-list .species-3d-part span {
    width: 28px;
    height: 28px;
    color: #102f29;
    background: #f5d58b;
}

.species-ar-part-list .species-3d-part.active {
    color: #102f29;
    border-color: #f5d58b;
    background: #f5d58b;
}

.species-ar-status {
    position: absolute;
    z-index: 4;
    right: 18px;
    bottom: 138px;
    display: grid;
    gap: 10px;
    width: min(330px, calc(100% - 36px));
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    color: #fffaf0;
    background: rgba(7, 25, 22, .72);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(0,0,0,.22);
}

.species-ar-status[hidden] {
    display: none !important;
}

.species-ar-status strong {
    font-size: 13px;
    line-height: 1.35;
}

.species-ar-status button {
    justify-self: start;
    min-height: 34px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    padding: 7px 12px;
    color: #102f29;
    background: #f5d58b;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.species-ar-close {
    position: absolute;
    z-index: 4;
    right: 18px;
    top: 18px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    padding: 10px 14px;
    color: #fffaf0;
    background: rgba(7, 25, 22, .72);
    backdrop-filter: blur(10px);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.species-ar-entry {
    position: fixed;
    z-index: 12;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #fffaf0;
    background: rgba(7, 25, 22, .9);
    backdrop-filter: blur(18px);
}

.species-ar-entry[hidden] {
    display: none !important;
}

.species-ar-entry-content {
    width: min(620px, 100%);
    text-align: center;
}

.species-ar-entry-content > span {
    display: inline-block;
    margin-bottom: 14px;
    color: #f5d58b;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.species-ar-entry h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
}

.species-ar-entry p {
    max-width: 540px;
    margin: 0 auto;
    color: rgba(255,255,255,.78);
    font-size: 17px;
    line-height: 1.55;
}

.species-ar-entry-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 26px 0 14px;
}

.species-ar-entry-actions button {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    padding: 11px 18px;
    color: #102f29;
    background: #f5d58b;
    font-weight: 800;
    cursor: pointer;
}

.species-ar-entry-actions button + button {
    color: #fffaf0;
    background: rgba(255,255,255,.08);
}

.species-ar-entry-content > small {
    color: rgba(255,255,255,.58);
}

.species-ar-empty {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 28px;
    color: #fffaf0;
    text-align: center;
    background: #071916;
}

@media (max-width: 1100px) {
    .species-3d-shell {
        grid-template-columns: 1fr;
    }

    .species-3d-stage,
    .species-3d-canvas {
        min-height: 560px;
    }
}

@media (max-width: 640px) {
    .part-view-switch {
        width: 100%;
        border-radius: 18px;
    }

    .part-view-button {
        flex: 1 1 100%;
        justify-content: center;
        border-radius: 14px;
    }

    .species-3d-stage,
    .species-3d-canvas {
        min-height: 430px;
    }

    .species-3d-overlay strong,
    .species-3d-panel h3,
    .species-ar-hud strong {
        font-size: 24px;
    }

    .species-3d-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .species-3d-part-list {
        grid-template-columns: 1fr;
    }

    .species-3d-detail {
        grid-template-columns: 1fr;
    }

    .species-ar-hud {
        left: 12px;
        top: 12px;
        max-width: calc(100% - 96px);
    }

    .species-ar-model-types {
        display: none;
    }

    .species-ar-tools {
        left: 12px;
        right: 12px;
        bottom: 88px;
        width: auto;
        justify-content: center;
        padding-bottom: 2px;
        transform: none;
    }

    .species-ar-tools button {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 7px 10px;
        white-space: nowrap;
    }

    .species-ar-part-list {
        left: 12px;
        right: 12px;
        bottom: 12px;
        border-radius: 18px;
    }

    .species-ar-popup {
        left: 14px;
        right: 14px;
        top: auto;
        bottom: 130px;
        width: calc(100% - 28px);
        max-height: min(56vh, 430px);
        border-radius: 20px;
    }

    .species-ar-popup-image {
        height: 118px;
    }

    .species-ar-popup h1 {
        font-size: 22px;
    }

    .species-ar-help {
        left: 14px;
        bottom: 128px;
        width: calc(100% - 28px);
        max-height: 58vh;
        padding: 18px;
        border-radius: 20px;
    }

    .species-ar-close {
        right: 12px;
        top: 12px;
    }

    .species-ar-status {
        left: 14px;
        right: 14px;
        bottom: 130px;
        width: auto;
        padding: 10px 12px;
    }

    .species-ar-entry {
        padding: 18px;
    }

    .species-ar-entry h1 {
        font-size: 36px;
    }

    .species-ar-entry p {
        font-size: 15px;
    }

    .species-ar-entry-actions {
        display: grid;
    }

    .species-ar-entry-actions button {
        width: 100%;
    }

}

@keyframes explodeOutClean {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) translate(0,0) scale(.45);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(1);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   GALERÍA / RECETAS
   ========================= */

.gallery-grid-impact {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.gallery-item-impact {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.gallery-item-impact img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform .35s ease;
}

.gallery-item-impact:hover img {
    transform: scale(1.05);
}

.gallery-item-impact span {
    position: absolute;
    inset: auto 0 0 0;
    padding: 14px 16px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.72));
    color: #fff;
    font-weight: 600;
}

.recipe-card-impact {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.recipe-card-impact-head {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 22px;
    padding: 22px;
}

.recipe-card-impact-head img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    cursor: pointer;
}

.recipe-image-empty {
    height: 300px;
    background: #f3f4f6;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: #6b7280;
}

.recipe-card-impact-body {
    display: none;
    padding: 0 22px 22px;
}

.recipe-card-impact.open .recipe-card-impact-body {
    display: block;
    animation: fadeUp .24s ease;
}

.recipe-meta-impact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 16px;
}

.recipe-meta-pill {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-width: 112px;
    min-height: 54px;
    padding: 10px 14px;
    border: 1px solid rgba(23, 98, 83, .14);
    border-radius: 14px;
    background: #f4f8f6;
    color: #12362f;
}

.recipe-meta-pill small {
    display: block;
    margin-bottom: 3px;
    color: #64746e;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.recipe-meta-pill strong {
    color: #0f2f29;
    font-size: 16px;
    line-height: 1.2;
}

.recipe-meta-pill-wide {
    flex: 1 1 220px;
}

.recipe-columns-impact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.recipe-box-impact {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 18px;
}

.recipe-box-impact h4 {
    margin-top: 0;
}

/* =========================
   LIGHTBOX
   ========================= */

.lightbox-impact {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10,15,24,.84);
    z-index: 9999;
}

.lightbox-impact.open {
    display: flex;
}

.lightbox-impact-dialog {
    position: relative;
    width: min(1020px, 100%);
    max-height: 92vh;
    background: #111827;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0,0,0,.45);
}

.lightbox-impact-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 2;
}

.lightbox-impact-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background .2s ease, transform .2s ease;
}

.lightbox-impact-nav:hover {
    background: rgba(23, 98, 83, .9);
    transform: translateY(-50%) scale(1.03);
}

.lightbox-impact-nav[hidden] {
    display: none;
}

.lightbox-impact-prev {
    left: 14px;
}

.lightbox-impact-next {
    right: 14px;
}

.lightbox-impact img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    background: #0f172a;
}

.lightbox-impact-caption {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    color: #fff;
    background: #111827;
}

.lightbox-impact-caption small {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, .68);
    font-weight: 700;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1200px) {
    .container {
        width: min(1100px, calc(100% - 28px));
    }

    .impact-main-image {
        height: 460px;
    }

    .table {
        min-width: 700px;
    }
}

@media (max-width: 1100px) {
    .public-nav-toggle {
        display: inline-flex;
    }

    .public-menu-wrap {
        position: absolute;
        top: calc(100% + 8px);
        left: 10px;
        right: 10px;
        display: none;
        background: rgba(255,255,255,.97);
        border: 1px solid rgba(229,231,235,.9);
        border-radius: 18px;
        box-shadow: 0 24px 50px rgba(15,23,42,.12);
        padding: 12px;
    }

    .public-menu-wrap.open {
        display: block;
    }

    .public-menu-modern {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .public-menu-modern a {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar-toggle {
        display: inline-flex;
    }

    .admin-sidebar-close {
        display: inline-grid;
        place-items: center;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(320px, 86vw);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .28s ease;
        box-shadow: 0 20px 60px rgba(0,0,0,.28);
        z-index: 1300;
        padding: 18px 14px;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,.45);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: .25s ease;
        z-index: 1250;
    }

    .sidebar-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
    }

    .main {
        padding: 22px;
    }

    .hero-grid,
    .detail-grid,
    .catalog-grid,
    .grid-4,
    .grid-3,
    .grid-2,
    .impact-hero-grid,
    .info-grid-impact,
    .exploded-orbit-layout,
    .gallery-grid-impact,
    .recipe-card-impact-head,
    .recipe-columns-impact {
        grid-template-columns: 1fr;
    }

    .exploded-stage,
    .part-panel-impact {
        position: relative;
        top: auto;
    }

    .exploded-stage {
        min-height: 760px;
    }

    .exploded-stage-inner {
        min-height: 710px;
    }

    .stage-orbit-canvas {
        inset: 250px 0 0 0;
        min-height: 470px;
    }

    .stage-center {
        width: 220px;
        height: 220px;
    }

    .part-node {
        width: 138px;
        min-height: 164px;
    }

    .part-panel-impact img {
        height: 240px;
    }

    .admin-userbox {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .container {
        width: calc(100% - 20px);
    }

    .main {
        padding: 16px;
    }

    .card,
    .impact-card,
    .info-card-impact,
    .part-panel-impact,
    .recipe-card-impact,
    .recipe-box-impact {
        padding: 16px;
        border-radius: 18px;
    }

    .topbar,
    .page-header,
    .public-navbar-inner {
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .btn,
    .page-header .btn {
        width: 100%;
    }

    .userbox,
    .admin-userbox {
        width: 100%;
        justify-content: space-between;
        align-items: flex-start;
    }

    .public-navbar-inner {
        min-height: 72px;
    }

    .public-brand-mark,
    .admin-brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .public-brand-copy strong,
    .admin-brand-copy strong {
        font-size: 16px;
    }

    .public-brand-copy small,
    .admin-brand-copy small {
        font-size: 12px;
    }

    .impact-main-image,
    .impact-empty-image {
        height: 340px;
    }

    .impact-title {
        font-size: clamp(30px, 8vw, 42px);
    }

    .impact-subtitle {
        font-size: 16px;
    }

    .impact-facts,
    .info-grid-impact {
        grid-template-columns: 1fr;
    }

    .exploded-stage {
        min-height: 690px;
        padding: 18px;
    }

    .exploded-stage-inner {
        min-height: 650px;
    }

    .exploded-stage-head {
        max-width: 100%;
    }

    .exploded-stage-head h3 {
        font-size: 26px;
    }

    .stage-orbit-canvas {
        inset: 270px 0 0 0;
        min-height: 420px;
    }

    .stage-center {
        width: 180px;
        height: 180px;
    }

    .stage-orbit-ring {
        width: 320px;
        height: 320px;
    }

    .stage-orbit-ring-2 {
        width: 430px;
        height: 430px;
    }

    .part-node {
        width: 124px;
        min-height: 148px;
    }

    .part-node img,
    .part-node-empty {
        height: 92px;
    }

    .part-panel-impact img,
    .recipe-card-impact-head img,
    .gallery-item-impact img {
        height: 220px;
    }

    .recipe-card-impact-head {
        padding: 16px;
        gap: 16px;
    }

    .recipe-card-impact-body {
        padding: 0 16px 16px;
    }

    .table {
        min-width: 640px;
    }

    .admin-sidebar {
        width: min(300px, 88vw);
        padding: 16px 12px;
    }

    .menu.admin-menu a {
        min-height: 48px;
        padding: 13px 14px;
        font-size: 15px;
    }

    .admin-brand-copy strong {
        font-size: 14px;
    }

    .admin-brand-copy small {
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .impact-main-image,
    .impact-empty-image {
        height: 280px;
    }

    .impact-facts {
        grid-template-columns: 1fr;
    }

    .stage-orbit-canvas {
        inset: 300px 0 0 0;
        min-height: 360px;
    }

    .stage-center {
        width: 150px;
        height: 150px;
    }

    .stage-orbit-ring {
        width: 260px;
        height: 260px;
    }

    .stage-orbit-ring-2 {
        width: 340px;
        height: 340px;
    }

    .part-node {
        width: 108px;
        min-height: 134px;
    }

    .part-node img,
    .part-node-empty {
        height: 78px;
    }

    .part-node-body {
        padding: 10px 12px;
    }

    .part-node-body strong {
        font-size: 13px;
    }

    .part-node-body span {
        font-size: 11px;
    }

    .part-panel-impact img,
    .recipe-card-impact-head img,
    .gallery-item-impact img {
        height: 190px;
    }

    .table {
        min-width: 560px;
    }
}

@media (max-width: 480px) {
    .public-brand-copy small {
        display: none;
    }

    .admin-userbox .btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .container {
        width: calc(100% - 16px);
    }

    .impact-card,
    .info-card-impact,
    .part-panel-impact,
    .recipe-card-impact,
    .recipe-box-impact,
    .card {
        padding: 14px;
    }

    .impact-title {
        font-size: 28px;
    }

    .stage-orbit-canvas {
        inset: 320px 0 0 0;
    }

    .stage-center {
        width: 132px;
        height: 132px;
    }

    .part-node {
        width: 96px;
        min-height: 122px;
    }

    .part-node img,
    .part-node-empty {
        height: 68px;
    }

    .exploded-pill {
        padding: 8px 12px;
        font-size: 13px;
    }

    .admin-sidebar {
        width: 88vw;
    }

    .admin-brand-mark {
        width: 38px;
        height: 38px;
    }

    .admin-sidebar-close {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
}

/* =========================
   LISTADOS: BÚSQUEDA + PAGINACIÓN
   ========================= */

.page-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.searchbar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(560px, 100%);
    background: #fff;
    border: 1px solid #dbe2e8;
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: var(--shadow);
}

.searchbar-icon {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 16px;
}

.searchbar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 4px 0;
    min-width: 0;
    color: var(--text);
}

.searchbar input::placeholder {
    color: #94a3b8;
}

.search-meta {
    color: var(--muted);
    font-size: 14px;
}

.search-empty {
    margin-top: 14px;
    padding: 18px;
    border: 1px dashed #d0d5dd;
    border-radius: 16px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

.listing-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    justify-content: center;
}

.pagination-btn {
    min-width: 42px;
    height: 42px;
    border: 1px solid #dbe2e8;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: .2s ease;
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: #bfc9d2;
}

.pagination-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* =========================
   FIX SIDEBAR ADMIN EN ESCRITORIO
   ========================= */

@media (min-width: 1101px) {
    .admin-shell {
        display: block;
        min-height: 100vh;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: var(--sidebar-width);
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1100;
    }

    .main {
        margin-left: var(--sidebar-width);
        min-height: 100vh;
    }

    .sidebar-backdrop {
        display: none !important;
    }
}

/* =========================
   LOGO APP HEADER PÚBLICO
   ========================= */

.public-brand-logo{
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    padding: 4px 0;
}

#login-logo {
    display: block;
    height: auto;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    margin: 0 auto;
}


#logo-app {
    display: block;
    height: 56px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.public-navbar-inner {
    align-items: center;
}

@media (max-width: 768px) {
    #logo-app {
        height: 46px;
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    #logo-app {
        height: 40px;
        max-width: 150px;
    }
}

#logo-footer {
    display: block;
    height: auto;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    margin: 0 auto;
}

/* =========================
   LOGO PANEL ADMIN SIDEBAR
   ========================= */

.admin-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    padding: 4px 0;
}

#logo-admin-sidebar {
    display: block;
    height: 56px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
}

.admin-sidebar-head {
    align-items: center;
}

@media (max-width: 768px) {
    #logo-admin-sidebar {
        height: 46px;
        max-width: 160px;
    }
}

@media (max-width: 420px) {
    #logo-admin-sidebar {
        height: 40px;
        max-width: 140px;
    }
}

/* =========================
   MENÚ PÚBLICO MEJORADO
   ========================= */

.public-navbar-inner {
    position: relative;
}

.public-menu-wrap {
    display: flex;
    align-items: center;
    margin-left: auto;
    min-width: 0;
}

.public-menu-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap; /* importante: evita que el menú se parta en 2 filas */
}

.public-menu-modern > a,
.public-menu-dropdown > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    color: #1f2937;
    transition: .2s ease;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.public-menu-modern > a:hover,
.public-menu-dropdown > summary:hover {
    background: #eef4f2;
    color: #0f2f28;
}

.public-menu-dropdown {
    position: relative;
}

.public-menu-dropdown > summary::-webkit-details-marker {
    display: none;
}

.public-menu-dropdown > summary::after {
    content: "▾";
    margin-left: 8px;
    font-size: 12px;
    transition: transform .2s ease;
}

.public-menu-dropdown[open] > summary::after {
    transform: rotate(180deg);
}

.public-menu-dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 320px;
    max-width: 560px;
    max-height: 420px;
    overflow-y: auto;
    padding: 14px;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(229,231,235,.95);
    border-radius: 18px;
    box-shadow: 0 24px 50px rgba(15,23,42,.12);
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 8px;
    z-index: 1300;
}

.public-menu-dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 500;
    color: #374151;
    transition: .2s ease;
    white-space: normal;
}

.public-menu-dropdown-panel a:hover {
    background: #eef4f2;
    color: #0f2f28;
}

.public-admin-link {
    background: #0f2f28;
    color: #fff !important;
}

.public-admin-link:hover {
    background: #1f6f5f !important;
    color: #fff !important;
}

/* =========================
   MENÚ MÓVIL / TABLET
   ========================= */

@media (max-width: 1100px) {
    .public-nav-toggle {
        display: inline-flex;
    }

    .public-menu-wrap {
        position: absolute;
        top: calc(100% + 8px);
        left: 10px;
        right: 10px;
        display: none;
        background: rgba(255,255,255,.97);
        border: 1px solid rgba(229,231,235,.9);
        border-radius: 18px;
        box-shadow: 0 24px 50px rgba(15,23,42,.12);
        padding: 12px;
        margin-left: 0;
    }

    .public-menu-wrap.open {
        display: block;
    }

    .public-menu-modern {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .public-menu-modern > a,
    .public-menu-dropdown > summary,
    .public-admin-link {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
    }

    .public-menu-dropdown {
        width: 100%;
    }

    .public-menu-dropdown-panel {
        position: static;
        min-width: 100%;
        max-width: 100%;
        max-height: 280px;
        margin-top: 10px;
        padding: 10px;
        box-shadow: none;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        background: #f8fafc;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .public-navbar-inner {
        min-height: 72px;
    }

    .public-menu-wrap {
        left: 8px;
        right: 8px;
    }
}

@media (max-width: 480px) {
    .public-menu-dropdown-panel {
        max-height: 240px;
    }
}

/* =========================
   HOME PUBLICA EDITORIAL
   ========================= */

.btn-soft {
    background: #fff;
    color: #173f37;
    border: 1px solid rgba(23, 63, 55, .16);
}

.btn-soft:hover {
    background: #f4f7f2;
}

.home-hero {
    position: relative;
    padding: 66px 0 42px;
    background:
        linear-gradient(180deg, #fbfaf5 0%, #f3f6ef 58%, #ffffff 100%);
    overflow: hidden;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(23, 63, 55, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 63, 55, .035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 78%);
}

.home-hero-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, .82fr);
    gap: 42px;
    align-items: center;
}

.home-kicker,
.home-section-label {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2e7;
    color: #38523a;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.home-hero h1 {
    margin: 18px 0 18px;
    max-width: 720px;
    color: #17332d;
    font-size: clamp(44px, 7vw, 84px);
    line-height: .96;
    font-weight: 800;
}

.home-lead {
    max-width: 720px;
    color: #405149;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.72;
    margin: 0;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.home-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 680px;
    margin: 34px 0 0;
}

.home-metrics div {
    border-top: 1px solid rgba(23, 63, 55, .18);
    padding-top: 14px;
}

.home-metrics dt {
    margin: 0;
    color: #17332d;
    font-size: 34px;
    line-height: 1;
    font-weight: 800;
}

.home-metrics dd {
    margin: 7px 0 0;
    color: #617067;
    font-size: 14px;
}

.home-featured {
    position: relative;
    min-height: 560px;
    border-radius: 8px;
    overflow: hidden;
    background: #243a32;
    box-shadow: 0 28px 80px rgba(23, 51, 45, .24);
}

.home-featured img {
    width: 100%;
    height: 560px;
    object-fit: cover;
}

.home-featured::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(10, 20, 17, .82) 100%);
    pointer-events: none;
}

.home-featured-caption,
.home-featured-empty {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 1;
    color: #fff;
}

.home-featured-caption span,
.home-featured-empty span {
    display: inline-block;
    margin-bottom: 9px;
    color: rgba(255,255,255,.76);
    font-size: 13px;
    font-weight: 700;
}

.home-featured-caption h2,
.home-featured-empty h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.05;
}

.home-featured-caption p {
    margin: 9px 0 0;
    color: rgba(255,255,255,.78);
    font-style: italic;
}

.home-featured-empty {
    top: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.home-intro {
    padding: 40px 0;
    background: #fff;
}

.home-intro-grid {
    display: grid;
    grid-template-columns: .78fr 1.22fr;
    gap: 34px;
    align-items: start;
    border-top: 1px solid #dde4dc;
    border-bottom: 1px solid #dde4dc;
    padding: 34px 0;
}

.home-intro h2,
.home-section-head h2,
.home-closing h2 {
    margin: 12px 0 0;
    color: #17332d;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
}

.home-intro p {
    margin: 0;
    color: #48584f;
    font-size: 18px;
    line-height: 1.82;
}

.home-band {
    background: #f7f5ed;
}

.home-section-head {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(260px, .45fr);
    gap: 28px;
    align-items: end;
    margin-bottom: 24px;
}

.home-section-head p {
    margin: 0;
    color: #59685f;
    line-height: 1.7;
}

.home-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.home-category-card {
    min-height: 270px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2dfd3;
    box-shadow: 0 14px 36px rgba(44, 57, 47, .08);
    transition: .22s ease;
}

.home-category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(31, 111, 95, .34);
}

.home-category-count {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #173f37;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
}

.home-category-card h3 {
    margin: 0 0 10px;
    color: #17332d;
    font-size: 25px;
    line-height: 1.12;
}

.home-category-card p {
    margin: 0;
    color: #5d6a61;
    line-height: 1.65;
}

.home-category-card a,
.home-species-card a {
    display: inline-flex;
    align-items: center;
    color: #1f6f5f;
    font-weight: 800;
}

.home-category-card a::after,
.home-species-card a::after {
    content: ">";
    margin-left: 8px;
    transition: transform .2s ease;
}

.home-category-card a:hover::after,
.home-species-card a:hover::after {
    transform: translateX(3px);
}

.home-recent-section {
    background: #fff;
}

.home-species-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.home-species-card {
    display: grid;
    grid-template-rows: 260px 1fr;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e3e8e1;
    box-shadow: 0 16px 40px rgba(31, 45, 38, .08);
}

.home-species-card img,
.home-species-empty {
    width: 100%;
    height: 260px;
}

.home-species-card img {
    object-fit: cover;
}

.home-species-empty {
    display: grid;
    place-items: center;
    background: #eef1ed;
    color: #68756c;
}

.home-species-body {
    display: flex;
    flex-direction: column;
    padding: 18px;
}

.home-species-body span {
    color: #697a70;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.home-species-body h3 {
    margin: 10px 0 6px;
    color: #17332d;
    font-size: 25px;
    line-height: 1.14;
}

.home-species-body p {
    margin: 0 0 14px;
    color: #5b6960;
    line-height: 1.62;
}

.home-species-body .home-scientific {
    margin-bottom: 12px;
    color: #6c756f;
    font-style: italic;
}

.home-species-body a {
    margin-top: auto;
}

.home-closing {
    padding: 54px 0;
    background: #17332d;
    color: #fff;
}

.home-closing-inner {
    display: grid;
    grid-template-columns: 1fr .8fr;
    gap: 32px;
    align-items: center;
}

.home-closing h2 {
    margin: 0;
    color: #fff;
}

.home-closing p {
    margin: 0;
    color: rgba(255,255,255,.78);
    font-size: 17px;
    line-height: 1.75;
}

@media (max-width: 1100px) {
    .home-hero-layout,
    .home-intro-grid,
    .home-section-head,
    .home-closing-inner {
        grid-template-columns: 1fr;
    }

    .home-featured,
    .home-featured img {
        min-height: 420px;
        height: 420px;
    }

    .home-category-grid,
    .home-species-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .home-hero {
        padding-top: 42px;
    }

    .home-metrics,
    .home-category-grid,
    .home-species-grid {
        grid-template-columns: 1fr;
    }

    .home-featured,
    .home-featured img {
        min-height: 340px;
        height: 340px;
    }

    .home-category-card {
        min-height: 230px;
    }
}

/* =========================
   MENU PUBLICO REFINADO
   ========================= */

.public-navbar {
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.public-menu-modern {
    gap: 12px;
}

.public-menu-modern > a,
.public-menu-dropdown > summary {
    min-height: 48px;
    padding: 11px 16px;
    border-radius: 999px;
    color: #0f172a;
}

.public-menu-modern > a:hover,
.public-menu-dropdown > summary:hover,
.public-menu-dropdown[open] > summary {
    background: #eef3ed;
    color: #17332d;
}

.public-menu-dropdown > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.public-menu-dropdown[open] > summary::after {
    transform: translateY(2px) rotate(225deg);
}

.public-menu-dropdown-panel {
    left: auto;
    right: 0;
    top: calc(100% + 14px);
    width: min(520px, calc(100vw - 32px));
    min-width: 480px;
    max-width: 520px;
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 16px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(249,250,247,.98) 100%);
    border: 1px solid rgba(209, 216, 207, .95);
    box-shadow: 0 28px 70px rgba(17, 36, 30, .18);
}

.public-menu-dropdown-panel::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 72px;
    width: 16px;
    height: 16px;
    background: rgba(255,255,255,.98);
    border-left: 1px solid rgba(209, 216, 207, .95);
    border-top: 1px solid rgba(209, 216, 207, .95);
    transform: rotate(45deg);
}

.public-menu-dropdown-head {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 4px 10px;
    border-bottom: 1px solid #e3e8df;
    margin-bottom: 2px;
}

.public-menu-dropdown-head strong {
    color: #17332d;
    font-size: 15px;
}

.public-menu-dropdown-head small {
    color: #6b766d;
    font-size: 12px;
    white-space: nowrap;
}

.public-menu-dropdown-panel a {
    display: grid;
    gap: 4px;
    min-height: 78px;
    align-content: center;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: rgba(255,255,255,.64);
    color: #13231f;
}

.public-menu-dropdown-panel a span {
    font-weight: 800;
    line-height: 1.2;
}

.public-menu-dropdown-panel a small {
    color: #66736b;
    font-size: 12px;
}

.public-menu-dropdown-panel a:hover {
    background: #eef3ed;
    border-color: #d8e3d7;
    color: #17332d;
    transform: translateY(-1px);
}

.public-admin-link {
    min-height: 52px !important;
    padding-inline: 20px !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 28px rgba(15, 47, 40, .18);
}

.home-featured img {
    background: #dfe7dd;
}

.detail-backbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 18px;
}

@media (max-width: 1100px) {
    .public-menu-modern {
        gap: 8px;
    }

    .public-menu-modern > a,
    .public-menu-dropdown > summary,
    .public-admin-link {
        border-radius: 14px !important;
    }

    .public-menu-dropdown-panel {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        max-height: 360px;
        grid-template-columns: 1fr;
        border-radius: 14px;
    }

    .public-menu-dropdown-panel::before {
        display: none;
    }

    .public-menu-dropdown-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .public-menu-dropdown-panel a {
        min-height: 62px;
    }
}

/* =========================
   REFINAMIENTO VISUAL GLOBAL
   ========================= */

:root {
    --bg: #f6f7f3;
    --card: #ffffff;
    --text: #17231f;
    --muted: #647067;
    --border: #dfe6df;
    --primary: #176253;
    --primary-dark: #0f3e36;
    --accent: #a56321;
    --shadow: 0 14px 34px rgba(18, 34, 29, .08);
    --radius: 8px;
}

body {
    background: #f6f7f3;
    color: var(--text);
    line-height: 1.55;
}

.container {
    width: min(1180px, calc(100% - 32px));
}

.card,
.stats-card,
.catalog-card,
.impact-card,
.info-card-impact,
.part-panel-impact,
.recipe-card-impact,
.recipe-box-impact,
.recipe-section,
.tech-card,
.login-card,
.searchbar,
.table-responsive,
.public-menu-dropdown-panel,
.home-category-card,
.home-species-card,
.home-featured {
    border-radius: 8px;
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.card,
.stats-card,
.catalog-card,
.impact-card,
.info-card-impact,
.recipe-card-impact,
.home-category-card,
.home-species-card {
    background: #fff;
}

.btn,
.pagination-btn,
button[type="submit"] {
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: none;
}

.btn:hover,
.pagination-btn:hover:not(:disabled) {
    box-shadow: 0 10px 22px rgba(18, 34, 29, .12);
}

.btn-primary,
.pagination-btn.active,
.public-admin-link {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover,
.public-admin-link:hover {
    background: var(--primary-dark);
}

input,
select,
textarea {
    border-radius: 8px;
    border: 1px solid #cfd8d0;
    background: #fff;
    color: var(--text);
    transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(23, 98, 83, .75);
    box-shadow: 0 0 0 4px rgba(23, 98, 83, .1);
}

.alert {
    border-radius: 8px;
}

.badge {
    letter-spacing: 0;
}

/* Navegacion publica */

.public-navbar {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(214, 222, 214, .9);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(18, 34, 29, .05);
}

.public-navbar-inner {
    min-height: 92px;
}

.public-brand-logo img,
#logo-app {
    max-height: 64px;
    object-fit: contain;
}

.public-menu-modern > a,
.public-menu-dropdown > summary {
    border-radius: 8px;
    color: #17231f;
    font-weight: 750;
}

.public-menu-modern > a:hover,
.public-menu-dropdown > summary:hover,
.public-menu-dropdown[open] > summary {
    background: #edf3eb;
    color: var(--primary-dark);
}

.public-admin-link {
    border-radius: 8px !important;
    box-shadow: 0 12px 26px rgba(23, 98, 83, .18);
}

.public-menu-dropdown-panel {
    border-radius: 8px;
    padding: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(18, 34, 29, .16);
}

.public-menu-dropdown-panel::before {
    background: #fff;
}

.public-menu-dropdown-panel a {
    border-radius: 8px;
    border-color: #edf1ed;
    background: #fbfcfa;
}

.public-menu-dropdown-panel a:hover {
    background: #edf3eb;
    border-color: #d6e3d4;
}

.public-menu-dropdown-head {
    border-bottom-color: #e2e8df;
}

/* Catalogo y detalle publico */

.searchbar {
    background: #fff;
    border: 1px solid var(--border);
    padding: 18px;
}

.catalog-grid,
.home-species-grid,
.home-category-grid {
    gap: 18px;
}

.catalog-card {
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.catalog-card:hover,
.home-category-card:hover,
.home-species-card:hover {
    border-color: rgba(23, 98, 83, .28);
    box-shadow: 0 18px 42px rgba(18, 34, 29, .12);
}

.catalog-card img,
.home-species-card img {
    background: #e5ebe4;
}

.catalog-card-content,
.home-species-card-content {
    padding: 18px;
}

.section-title,
.home-section-head h2,
.detail-impact-section h2 {
    color: #13251f;
    letter-spacing: 0;
}

.detail-grid,
.home-intro-grid {
    gap: 24px;
}

.detail-backbar .btn {
    background: #fff;
    border-color: var(--border);
    color: var(--primary-dark);
}

.footer {
    margin-top: 52px;
    background: #102b26;
    color: #dce9e2;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer a {
    color: #fff;
}

/* Panel administrativo */

.admin-shell {
    background: #f5f7f3;
}

.admin-sidebar {
    background: #102b26;
    border-right: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 10px 0 28px rgba(18, 34, 29, .12);
}

.admin-sidebar-head {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-menu {
    gap: 8px;
}

.admin-menu a {
    min-height: 44px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .82);
    font-weight: 700;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.admin-menu a.active {
    box-shadow: inset 3px 0 0 #d39b47;
}

.admin-menu .admin-menu-external {
    margin-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-top: 18px;
    background: transparent;
    color: rgba(255, 255, 255, .78);
    box-shadow: none;
}

.admin-menu .admin-menu-external:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.admin-menu .admin-menu-external .ui-icon {
    color: #d8a85d;
}

.main {
    background: #f5f7f3;
}

.topbar,
.admin-topbar-modern {
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow);
}

.topbar h1 {
    color: #14241f;
    letter-spacing: 0;
}

.topbar p,
.admin-userbox small,
.form-group small {
    color: var(--muted);
}

.admin-user-avatar {
    background: #e6f0eb;
    color: var(--primary-dark);
}

.admin-userbox .btn {
    white-space: nowrap;
}

.table-responsive {
    background: #fff;
    border: 1px solid var(--border);
    overflow: auto;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background: #eef3ed;
    color: #27362f;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

.table td {
    background: #fff;
}

.table tr:hover td {
    background: #fafbf8;
}

.form-grid {
    gap: 18px;
}

.form-group label {
    color: #22332d;
    font-weight: 750;
}

.form-actions {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.stats-card {
    background: #fff;
    border-left: 4px solid var(--primary);
}

.stats-card strong {
    color: #14241f;
}

.empty-state {
    background: #fbfcfa;
    border: 1px dashed #cfd8d0;
    border-radius: 8px;
}

@media (max-width: 900px) {
    .public-navbar-inner {
        min-height: 78px;
    }

    .public-brand-logo img,
    #logo-app {
        max-height: 54px;
    }

    .topbar,
    .admin-topbar-modern {
        align-items: flex-start;
    }
}

/* =========================
   CAPA VISUAL DESTACADA
   ========================= */

.catalog-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 28px;
    align-items: end;
    margin-bottom: 28px;
    padding: clamp(28px, 5vw, 48px);
    overflow: hidden;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(16, 43, 38, .96), rgba(23, 98, 83, .9)),
        linear-gradient(90deg, #102b26, #176253);
    color: #fff;
    box-shadow: 0 22px 58px rgba(18, 34, 29, .18);
}

.catalog-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: .42;
}

.catalog-hero > * {
    position: relative;
    z-index: 1;
}

.catalog-eyebrow,
.dashboard-eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .88);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.catalog-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: .98;
    color: #fff;
}

.catalog-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.75;
}

.catalog-hero-panel {
    min-height: 210px;
    display: grid;
    align-content: end;
    padding: 22px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(10px);
}

.catalog-hero-panel span {
    font-size: 64px;
    line-height: .9;
    font-weight: 850;
}

.catalog-hero-panel strong {
    margin-top: 10px;
    font-size: 18px;
}

.catalog-hero-panel small {
    margin-top: 8px;
    color: rgba(255, 255, 255, .72);
    line-height: 1.45;
}

.catalog-card {
    display: grid;
    grid-template-rows: 250px 1fr;
}

.catalog-card-media {
    position: relative;
    min-height: 250px;
    overflow: hidden;
    background: #dfe8df;
}

.catalog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.catalog-card:hover .catalog-card-media img {
    transform: scale(1.045);
}

.catalog-card-media span {
    position: absolute;
    left: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(16, 43, 38, .86);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.catalog-card-empty {
    display: grid;
    place-items: center;
}

.catalog-card-empty strong {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-dark);
    font-size: 44px;
    box-shadow: 0 14px 30px rgba(18, 34, 29, .12);
}

.catalog-card-content {
    display: flex;
    flex-direction: column;
}

.catalog-card-content h3 {
    margin: 0 0 8px;
    color: #13251f;
    font-size: 24px;
    line-height: 1.15;
}

.catalog-scientific {
    margin: 0 0 10px;
    color: #68756d;
    font-style: italic;
}

.catalog-summary {
    margin: 0 0 14px;
    color: #4d5d54;
    line-height: 1.7;
}

.catalog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: auto 0 16px;
}

.catalog-card-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef3ed;
    color: #365047;
    font-size: 12px;
    font-weight: 750;
}

.catalog-filterbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
    margin: -8px 0 22px;
}

.catalog-filterbar label {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(18, 34, 29, .06);
}

.catalog-filterbar span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #28463e;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.catalog-filterbar select {
    width: 100%;
    border: 1px solid #dce5dd;
    border-radius: 8px;
    padding: 10px 12px;
    background: #f9fbf8;
    color: #13251f;
    font: inherit;
    font-weight: 750;
}

.searchbar-icon {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: relative;
    flex: 0 0 auto;
    font-size: 0;
    color: transparent;
}

.searchbar-icon::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -4px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
    transform: rotate(45deg);
}

.empty-state-visual {
    text-align: left;
    padding: 24px;
    background: #fff;
}

.empty-state-visual strong {
    display: block;
    margin-bottom: 8px;
    color: #17231f;
    font-size: 18px;
}

.empty-state-visual p {
    margin: 0;
    color: var(--muted);
}

.detail-hero-shell {
    padding: 10px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 98, 83, .12), rgba(165, 99, 33, .1)),
        #fff;
    border: 1px solid var(--border);
    box-shadow: 0 20px 54px rgba(18, 34, 29, .1);
}

.detail-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.detail-code {
    color: #6c756f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.detail-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-section-nav a {
    padding: 10px 13px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(18, 34, 29, .06);
}

.detail-section-nav a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.detail-description-card {
    margin: 20px 0;
}

.detail-description-card h3 {
    margin-top: 0;
}

.detail-description-card p {
    margin-bottom: 0;
    color: #4d5d54;
    line-height: 1.85;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    margin-bottom: 22px;
    padding: 28px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, #102b26 0%, #176253 100%);
    color: #fff;
    box-shadow: 0 18px 44px rgba(18, 34, 29, .16);
}

.dashboard-hero h2 {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
}

.dashboard-hero p {
    max-width: 700px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .78);
    line-height: 1.7;
}

.dashboard-stat-grid {
    margin-bottom: 22px;
}

.dashboard-stat-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    border-left: 0;
}

.dashboard-stat-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: rgba(23, 98, 83, .08);
}

.dashboard-stat-card .stat-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 8px;
    background: #e6f0eb;
    color: var(--primary-dark);
    font-weight: 850;
}

.dashboard-feed-grid {
    align-items: start;
}

.dashboard-feed-card .page-header,
.dashboard-actions-card .page-header {
    margin-bottom: 14px;
}

.dashboard-feed-card .page-header h2,
.dashboard-actions-card .page-header h2 {
    margin: 0;
    font-size: 22px;
}

.dashboard-actions-card {
    margin-top: 22px;
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.dashboard-action {
    min-height: 150px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 18px;
    border-radius: 8px;
    background: #fbfcfa;
    border: 1px solid var(--border);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.dashboard-action:hover {
    transform: translateY(-2px);
    border-color: rgba(23, 98, 83, .32);
    box-shadow: 0 16px 34px rgba(18, 34, 29, .1);
}

.dashboard-action span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #102b26;
    color: #fff;
    font-weight: 850;
}

.dashboard-action strong {
    color: #17231f;
    font-size: 17px;
}

.dashboard-action small {
    color: var(--muted);
    line-height: 1.45;
}

.dashboard-health-card {
    margin-bottom: 22px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 98, 83, .06), rgba(211, 155, 71, .08)),
        #fff;
    box-shadow: 0 18px 42px rgba(18, 34, 29, .08);
}

.dashboard-health-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.dashboard-health-head .dashboard-eyebrow {
    background: #e9f2ed;
    color: #176253;
}

.dashboard-health-head h2 {
    margin: 0;
    color: #13251f;
    font-size: 26px;
}

.dashboard-health-head p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.dashboard-health-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-health-item {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 16px;
    border: 1px solid #dbe5dc;
    border-radius: 8px;
    background: #fbfcfa;
    color: #13251f;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.dashboard-health-item:hover {
    transform: translateY(-2px);
    border-color: rgba(23, 98, 83, .34);
    box-shadow: 0 16px 34px rgba(18, 34, 29, .1);
}

.dashboard-health-item span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #102b26;
    color: #fff;
}

.dashboard-health-item .ui-icon {
    width: 20px;
    height: 20px;
}

.dashboard-health-item strong {
    font-size: 34px;
    line-height: 1;
}

.dashboard-health-item small {
    color: #53675e;
    line-height: 1.45;
}

@media (max-width: 980px) {
    .catalog-hero,
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .catalog-hero-panel {
        min-height: 160px;
    }

    .dashboard-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-filterbar,
    .dashboard-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-health-head {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .catalog-hero {
        padding: 24px;
    }

    .catalog-card {
        grid-template-rows: 220px 1fr;
    }

    .catalog-card-media {
        min-height: 220px;
    }

    .dashboard-action-grid {
        grid-template-columns: 1fr;
    }

    .catalog-filterbar,
    .dashboard-health-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        padding: 22px;
    }
}

/* =========================
   SISTEMA DE ICONOS
   ========================= */

.ui-icon {
    width: 1.05em;
    height: 1.05em;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: -0.18em;
    stroke-width: 2.1;
}

.btn .ui-icon,
.badge .ui-icon,
.public-menu a .ui-icon,
.public-menu summary .ui-icon,
.admin-menu a .ui-icon,
.detail-section-nav a .ui-icon,
.catalog-card-meta .ui-icon,
.catalog-eyebrow .ui-icon,
.dashboard-eyebrow .ui-icon {
    width: 17px;
    height: 17px;
}

.btn,
.badge,
.public-menu a,
.public-menu-dropdown > summary,
.admin-menu a,
.detail-section-nav a,
.catalog-eyebrow,
.dashboard-eyebrow,
.catalog-card-meta span,
.catalog-card-media span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-menu a .ui-icon {
    color: #d8a85d;
}

.admin-menu a.active .ui-icon,
.admin-menu a:hover .ui-icon {
    color: #fff;
}

.public-menu a .ui-icon,
.public-menu-dropdown > summary .ui-icon {
    color: var(--primary);
}

.public-admin-link .ui-icon {
    color: #fff;
}

.public-menu-dropdown-panel a .ui-icon {
    width: 19px;
    height: 19px;
    color: #b0742e;
}

.public-menu-dropdown-panel a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}

.public-menu-dropdown-panel a small {
    grid-column: 2;
}

.searchbar-icon {
    width: 22px;
    height: 22px;
    border: 0;
    color: var(--primary);
    display: grid;
    place-items: center;
}

.searchbar-icon::after {
    display: none;
}

.searchbar-icon .ui-icon {
    width: 21px;
    height: 21px;
}

.dashboard-stat-card .stat-icon .ui-icon,
.dashboard-action span .ui-icon {
    width: 21px;
    height: 21px;
}

.dashboard-action span,
.dashboard-stat-card .stat-icon {
    color: inherit;
}

.impact-fact span::before,
.info-card-impact h3::before,
.recipe-box-impact h4::before {
    content: "";
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-right: 8px;
    border-radius: 999px;
    background: #d39b47;
    vertical-align: middle;
}

/* =========================
   CONTRASTE Y CIERRE PUBLICO
   ========================= */

.home-closing {
    padding: clamp(42px, 6vw, 76px) 0;
    background:
        linear-gradient(135deg, #113b34 0%, #0f2f29 58%, #17332d 100%);
    border-top: 1px solid rgba(255, 255, 255, .08);
    border-bottom: 1px solid rgba(15, 47, 40, .2);
}

.home-closing-inner {
    gap: clamp(24px, 5vw, 70px);
}

.home-closing h2 {
    max-width: 880px;
    color: #fff;
    text-shadow: none;
}

.home-closing p {
    max-width: 650px;
    color: #dbe9e2;
    text-shadow: none;
}

.footer {
    margin-top: 0;
    padding: 28px 0;
    background: #f7f8f4;
    color: #41534b;
    border-top: 1px solid #dce5dd;
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 26px;
    align-items: center;
}

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

#logo-footer {
    max-width: 230px;
    width: 100%;
    height: auto;
    filter: none;
}

.footer-copy {
    display: grid;
    gap: 8px;
    justify-items: end;
    text-align: right;
}

.footer-copy p {
    margin: 0;
    color: #41534b;
    line-height: 1.55;
}

.footer-copy b {
    color: #122f29;
}

.btn-primary .ui-icon,
.btn-danger .ui-icon,
.public-admin-link .ui-icon,
.dashboard-hero .btn .ui-icon {
    color: currentColor;
}

.btn:not(.btn-primary):not(.btn-danger) .ui-icon {
    color: #176253;
}

.badge-success .ui-icon {
    color: #0f6b44;
}

.badge-muted .ui-icon {
    color: #4b5563;
}

.catalog-eyebrow .ui-icon,
.dashboard-eyebrow .ui-icon {
    color: currentColor;
}

.catalog-card-media span .ui-icon {
    color: #f6d28f;
}

.catalog-card-meta .ui-icon {
    color: #176253;
}

.detail-section-nav a .ui-icon {
    color: currentColor;
}

.dashboard-stat-card .stat-icon {
    color: var(--primary-dark);
}

.dashboard-action span {
    color: #fff;
}

.dashboard-action span .ui-icon,
.dashboard-stat-card .stat-icon .ui-icon {
    color: currentColor;
}

.admin-userbox .btn-danger .ui-icon {
    color: #fff;
}

@media (max-width: 760px) {
    .footer-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .footer-copy {
        justify-items: center;
        text-align: center;
    }
}

/* Ajuste fino del menu publico con iconos */
.public-menu-modern > a,
.public-menu-dropdown > summary {
    gap: 9px;
    overflow: visible;
}

.public-menu-dropdown > summary {
    padding-left: 12px;
    padding-right: 14px;
}

.public-menu-dropdown > summary .nav-leading-icon {
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 8px;
    background: #e5efe9;
    color: #176253;
    stroke-width: 2.3;
}

.public-menu-dropdown > summary::after {
    margin-left: 2px;
    flex: 0 0 auto;
}

.public-menu-dropdown[open] > summary .nav-leading-icon,
.public-menu-dropdown > summary:hover .nav-leading-icon {
    background: #d9e9e1;
    color: #0f3e36;
}

.public-admin-link {
    gap: 10px;
    overflow: visible;
}

.public-admin-link .ui-icon {
    color: currentColor;
}

.public-admin-link .nav-admin-icon {
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 8px;
    background: #ffffff;
    color: #176253;
    stroke-width: 2.35;
    box-shadow: 0 8px 18px rgba(6, 31, 25, .18);
}

.public-admin-link:hover .nav-admin-icon {
    background: #e8f2ee;
    color: #0f3e36;
}

/* =========================
   MODULOS GALERIA Y PARTES
   ========================= */

.admin-media-layout {
    display: grid;
    grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr);
    gap: 22px;
    align-items: start;
}

.admin-module-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.admin-module-card-head > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e6f0eb;
    color: var(--primary-dark);
    flex: 0 0 auto;
}

.admin-module-card-head .ui-icon {
    width: 22px;
    height: 22px;
}

.admin-module-card-head h3 {
    margin: 0;
    color: #14241f;
    font-size: 22px;
    line-height: 1.15;
}

.admin-module-card-head p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-media-form-card {
    position: sticky;
    top: 96px;
}

.admin-media-list-card {
    min-height: 420px;
}

.admin-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-media-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfa;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.admin-media-card:hover {
    transform: translateY(-2px);
    border-color: rgba(23, 98, 83, .32);
    box-shadow: 0 16px 34px rgba(18, 34, 29, .1);
}

.admin-media-card img,
.admin-media-empty {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #e6ede7;
}

.admin-media-empty {
    display: grid;
    place-items: center;
    color: var(--primary-dark);
}

.admin-media-empty .ui-icon {
    width: 42px;
    height: 42px;
}

.admin-media-card-body {
    padding: 14px;
}

.admin-media-card-body strong {
    display: block;
    color: #14241f;
    font-size: 17px;
    line-height: 1.25;
}

.admin-media-card-body small {
    display: inline-flex;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef3ed;
    color: #496057;
    font-weight: 750;
}

.admin-media-card-body p {
    margin: 12px 0 0;
    color: #4d5d54;
    line-height: 1.65;
}

.admin-media-actions {
    padding: 0 14px 14px;
}

.admin-media-actions .btn {
    flex: 1 1 auto;
}

.gallery-grid-impact {
    gap: 16px;
}

.gallery-item-impact {
    border-radius: 8px;
    border-color: var(--border);
    box-shadow: 0 14px 34px rgba(18, 34, 29, .08);
}

.gallery-item-impact img {
    height: 280px;
}

.gallery-item-impact span {
    padding: 36px 16px 14px;
    font-weight: 800;
}

.part-panel-impact {
    border-radius: 8px;
    border-color: var(--border);
    box-shadow: 0 14px 34px rgba(18, 34, 29, .08);
}

.part-panel-impact img {
    border-radius: 8px;
}

.exploded-stage {
    border-radius: 8px;
}

@media (max-width: 1180px) {
    .admin-media-layout {
        grid-template-columns: 1fr;
    }

    .admin-media-form-card {
        position: relative;
        top: auto;
    }
}

@media (max-width: 720px) {
    .admin-media-grid {
        grid-template-columns: 1fr;
    }

    .admin-media-card img,
    .admin-media-empty,
    .gallery-item-impact img {
        height: 220px;
    }
}
