/* Toda la presentación nueva queda limitada a celular. */
.agro-mobile-control, .agro-mobile-backdrop, .agro-install-public, .agro-shell .agro-install-action { display: none; }
.agro-install-dialog:not([open]) { display: none; }
@media (max-width: 760px) {
    html { scroll-padding-top: 80px; }
    .inicio-navigation { flex-wrap: wrap; gap: 12px; }
    .inicio-navigation > nav { min-width: 0; flex-wrap: wrap; }
    body.agro-shell { min-width: 0; }
    .agro-shell .agro-page.with-sidebar,
    .sidebar-collapsed .agro-page.with-sidebar { margin-left: 0; min-width: 0; }
    .agro-shell .agro-topbar {
        position: sticky; top: 0; z-index: 1035; min-height: 64px; height: auto;
        padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top));
        gap: 10px; flex-wrap: nowrap; background: var(--tema-superficie);
    }
    .agro-shell .agro-crumb { flex: 1; flex-wrap: nowrap; gap: 8px; overflow: hidden; }
    .agro-shell .agro-crumb > span { display: none; }
    .agro-shell .agro-crumb .agroia-identity { width: 95px; }
    .agro-shell .agro-topbar .agro-top-actions { flex-wrap: nowrap; gap: 6px; }
    .agro-shell .agro-top-actions [data-agro-theme-label],
    .agro-shell .agro-top-actions .agro-logout-button .agro-dot { display: none; }
    .agro-shell .agro-top-actions .agro-theme-toggle { width: 44px; height: 44px; padding: 0; flex-shrink: 0; }
    .agro-shell .agro-top-actions .agro-logout-button { font-size: 12px; padding: 8px 10px; min-height: 44px; white-space: normal; }
    .agro-shell .agro-top-actions > .btn { font-size: 11px; padding: 6px; }
    .agro-shell .agro-mobile-control {
        display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
        width: 44px; height: 44px; padding: 0; border: 1px solid var(--tema-borde);
        border-radius: 12px; color: var(--tema-texto); background: var(--tema-superficie); font-size: 23px;
    }
    .agro-shell > .agro-sidebar,
    .agro-shell.sidebar-collapsed > .agro-sidebar {
        position: fixed; inset: 0 auto 0 0; z-index: 1050; display: flex; flex-direction: column;
        width: min(340px, 88vw); height: 100vh; height: 100dvh; min-height: 0; max-height: none;
        padding: max(18px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
        transform: translateX(-100%); visibility: hidden; overflow: hidden;
        transition: transform .2s ease, visibility .2s; box-shadow: 8px 0 32px #0004;
    }
    .agro-shell.mobile-menu-open > .agro-sidebar { transform: translateX(0); visibility: visible; }
    body.mobile-menu-open { overflow: hidden; }
    .agro-mobile-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 1045; width: 100%; height: 100%; background: #0009; border: 0; }
    .agro-shell .agro-sidebar .agro-brand-row { display: flex; flex: 0 0 auto; margin: 0 0 18px; gap: 12px; }
    .agro-shell .agro-sidebar .agro-brand { display: flex; margin: 0; }
    .agro-shell .agro-sidebar .agroia-identity { width: 145px; }
    .agro-shell .agro-sidebar .agro-sidebar-toggle { display: none; }
    .agro-shell .agro-sidebar > .agro-menu { display: block; flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; padding: 0 0 14px; }
    .agro-shell .agro-sidebar .agro-menu a,
    .agro-shell .agro-sidebar .agro-menu-group summary { min-height: 46px; padding: 12px 10px; font-size: 14px; gap: 10px; justify-content: flex-start; }
    .agro-shell .agro-sidebar .agro-menu-group summary { justify-content: space-between; }
    .agro-shell .agro-sidebar .agro-menu-group summary::after { display: block; }
    .agro-shell .agro-sidebar .agro-menu-group-title { min-width: 0; gap: 10px; }
    .agro-shell .agro-sidebar .menu-text { display: inline; width: auto; line-height: 1.4; overflow-wrap: anywhere; }
    .agro-shell .agro-sidebar .agro-submenu { padding-left: 16px; }
    .agro-shell > .agro-sidebar > .agro-profile {
        position: static; display: flex; flex: 0 0 auto; width: 100%; margin: 12px 0 0; padding: 14px 8px 0;
        border-radius: 0; bottom: auto; gap: 8px;
    }
    .agro-shell .agro-profile-link > span:last-child { display: block; min-width: 0; overflow-wrap: anywhere; }
    .agro-shell .agro-profile .agro-avatar { flex: 0 0 38px; }
    .agro-shell .agro-profile-actions { padding-left: 0; }
    .agro-shell .agro-profile-actions a,
    .agro-shell .agro-profile-actions button { min-height: 44px; padding: 12px; }
    .agro-shell .agro-install-action:not([hidden]) { display: block; }
    .agro-shell .agro-content { padding: 20px 16px max(28px, env(safe-area-inset-bottom)); min-width: 0; }
    body:has(.producer-ad-bar) .agro-content { padding-bottom: calc(var(--agro-ad-height, 100px) + 24px); }
    .agro-shell .producer-ad-bar { position: fixed; inset: auto 0 0; width: 100%; margin: 0; border-radius: 14px 14px 0 0; z-index: 1038; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
    .agro-shell .producer-ad-bar-empty { display: flex; min-height: 48px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
    .agro-shell .producer-ad-bar-empty .producer-ad-brand, .agro-shell .producer-ad-bar-empty .producer-ad-empty-copy small { display: none; }
    .agro-shell .producer-ad-bar-empty .producer-ad-empty-copy { margin: 0; font-size: 12px; }
    .agro-shell .producer-ad-item { animation: none; transform: none; width: 100%; padding: 6px; gap: 8px; }
    .agro-shell .producer-ad-bar.is-rotating .producer-ad-item.is-current { animation: none; }
    .agro-shell .producer-ad-copy { flex: 1; min-width: 0; max-width: none; }
    .agro-shell .producer-ad-copy small { max-width: 100%; }
    .agro-shell .producer-ad-open { display: none; }
    .agro-shell .producer-ad-item img { width: 40px; height: 40px; }
    .agro-shell .producer-ad-deal { white-space: normal; max-width: 80px; }
    .agro-shell .producer-ad-price { white-space: normal; font-size: 12px; }
    .agro-shell .dashboard-heading h1, .agro-shell .profile-heading h1 { font-size: clamp(23px, 6vw, 28px); line-height: 1.2; overflow-wrap: anywhere; }
    .agro-shell .dashboard-heading p:not(.eyebrow) { font-size: 14px; line-height: 1.6; }
    .agro-shell .dashboard-card, .agro-shell .profile-card { padding: 18px; min-width: 0; }
    .agro-shell .profile-identity { gap: 12px; align-items: flex-start; }
    .agro-shell .profile-avatar { flex: 0 0 60px; width: 60px; height: 60px; font-size: 26px; }
    .agro-shell .profile-identity > div { min-width: 0; }
    .agro-shell .profile-identity h2 { font-size: 20px; overflow-wrap: anywhere; }
    .agro-shell .profile-data dd { overflow-wrap: anywhere; }
    .agro-shell .profile-actions { flex-wrap: wrap; }
    .agro-shell .profile-actions > * { width: 100%; }
    .agro-shell .agro-content :is(.form-control, .form-select) { font-size: 16px; min-height: 44px; max-width: 100%; }
    .agro-shell .agro-content textarea.form-control { min-height: 100px; }
    .agro-shell .agro-content :is(.btn, .agro-action-button) { min-height: 44px; white-space: normal; }
    .agro-shell .agro-content .table-responsive { max-width: 100%; overscroll-behavior-x: contain; }
    .agro-shell .agro-content .table-responsive:focus-visible { outline: 2px solid var(--tema-acento); }
    .agro-shell .agro-content :is(.crop-grid, .unit-grid, .platform-dashboard-grid) { grid-template-columns: minmax(0, 1fr); }
    .agro-shell .agro-content img { max-width: 100%; }
    .agro-shell .agro-content :is(.crop-page-header, .platform-heading) { gap: 14px; flex-wrap: wrap; }
    .agro-install-public:not([hidden]) {
        display: block; margin: 20px auto; padding: 12px 22px; min-height: 44px;
        border: 0; border-radius: 12px; color: white; background: #164d36; font: 600 16px system-ui;
    }
    .agro-install-dialog {
        width: min(400px, calc(100% - 32px)); max-height: calc(100dvh - 40px); box-sizing: border-box;
        border: 1px solid var(--tema-borde); border-radius: 22px; padding: 24px;
        color: var(--tema-texto); background: var(--tema-superficie); font: 15px/1.6 system-ui;
    }
    .agro-install-dialog::backdrop { background: #0009; }
    .agro-install-dialog img { border-radius: 16px; }
    .agro-install-dialog h2 { font-size: 23px; line-height: 1.3; }
    .agro-install-dismiss { float: right; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: inherit; font-size: 20px; }
    .agro-install-confirm:not([hidden]) { display: block; width: 100%; padding: 14px; border: 0; border-radius: 12px; background: #164d36; color: #fff; font: inherit; }
    .agro-shell :is(button, a, summary):focus-visible { outline: 3px solid var(--tema-acento); outline-offset: 2px; }
}
@media (max-width: 400px) {
    .inicio-navigation > nav { flex: 1 1 100%; justify-content: space-between; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
    .agro-shell > .agro-sidebar { transition: none; }
}
