:root{font-family:Arial,system-ui,sans-serif;color:#171717;background:#e6e1d5;--mobile-bottom-height:92px}*{box-sizing:border-box}body{margin:0}.login{position:fixed;inset:0;display:grid;place-items:center;padding:20px;background:#e6e1d5}.login[hidden]{display:none}.login form{width:min(430px,100%);padding:30px;border:2px solid #171717;border-radius:10px;background:#faf8ed;box-shadow:4px 4px 0 #171717}.login small{font-weight:900;letter-spacing:.18em}.login h1{margin:5px 0 8px;font:900 52px/.9 Impact,'Arial Black',Arial,sans-serif;text-transform:uppercase}.login p{font-weight:700}.login label{display:grid;gap:5px;margin:14px 0;font-weight:900}.login input,.login button{min-height:48px;border:2px solid #171717;border-radius:6px;padding:9px;font:inherit}.login input{background:#fffef9}.login button{width:100%;background:#bab900;box-shadow:3px 3px 0 #171717;font-weight:900;cursor:pointer}#loginMessage{min-height:20px;color:#a40000}.shell{display:grid;grid-template-columns:230px 1fr;height:100vh}.shell[hidden]{display:none}aside{display:flex;flex-direction:column;min-height:0;padding:19px 13px;border-right:3px solid #171717;background:#171717;color:#faf8ed}.brand{display:grid;padding:8px 8px 18px}.brand small{font-weight:900;letter-spacing:.18em}.brand strong{font:900 29px Impact,'Arial Black',Arial,sans-serif;letter-spacing:.02em}nav{display:grid;gap:6px;overflow:auto}nav button,.logout,.menu-toggle{min-height:46px;border:2px solid #faf8ed;background:transparent;color:#faf8ed;text-align:left;padding:9px 11px;font:800 14px Arial,sans-serif;cursor:pointer}nav button.active{border-color:#171717;background:#bab900;color:#171717;box-shadow:3px 3px 0 #faf8ed}.logout{margin-top:auto}.menu-toggle{display:none}.workspace{position:relative;min-width:0;height:100vh;background:#e6e1d5}.workspace iframe{width:100%;height:100%;border:0;background:#e6e1d5}#moduleState{position:absolute;z-index:2;left:20px;top:16px;padding:8px 11px;border:2px solid #171717;background:#faf8ed;box-shadow:4px 4px 0 #171717;font-weight:800}#moduleState:empty{display:none}.mobile-bottom-nav{display:none}
@media(max-width:800px){.shell{display:block;height:100dvh;padding-bottom:calc(var(--mobile-bottom-height) + env(safe-area-inset-bottom))}.shell>aside{display:none}.shell>aside.open{position:fixed;z-index:40;inset:0 0 calc(var(--mobile-bottom-height) + env(safe-area-inset-bottom)) 0;display:flex;padding:16px 12px;border:0;border-bottom:3px solid #171717;background:#171717;overflow:auto}.shell>aside.open .brand{padding:4px 6px 14px}.shell>aside.open .brand strong{font-size:25px}.shell>aside.open .menu-toggle{display:none}.shell>aside.open nav{position:static;display:grid;padding:0;background:#171717;border:0}.shell>aside.open .logout{margin-top:14px}.workspace{height:calc(100dvh - var(--mobile-bottom-height) - env(safe-area-inset-bottom));min-height:0}.workspace iframe{display:block;height:100%}.mobile-bottom-nav{position:fixed;z-index:50;left:0;right:0;bottom:0;height:calc(var(--mobile-bottom-height) + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:6px 8px env(safe-area-inset-bottom);overflow:visible;border-top:2px solid #171717;background:#faf8ed;box-shadow:0 -6px 18px #17171722}.mobile-bottom-nav button{display:grid;place-items:center;align-content:center;gap:3px;min-width:0;min-height:58px;padding:4px 2px;border:0;border-radius:8px;background:transparent;color:#5f655d;text-align:center;box-shadow:none;font-weight:900;-webkit-tap-highlight-color:transparent}.mobile-bottom-nav button span{font-size:21px;line-height:1}.mobile-bottom-nav button strong{font-size:11px;white-space:normal}.mobile-bottom-nav[data-active="registrar"] button[data-bottom="registrar"],.mobile-bottom-nav[data-active="cocina"] button[data-bottom="cocina"],.mobile-bottom-nav[data-active="incidencias"] button[data-bottom="incidencias"],.mobile-bottom-nav[data-active="mas"] button[data-bottom="mas"]{border:2px solid #171717;background:#bab900;color:#171717;box-shadow:2px 2px 0 #171717}.mobile-bottom-nav button:disabled{opacity:.42}.mobile-bottom-nav button:not([aria-current="page"]):focus-visible{outline:3px solid #00a6d6;outline-offset:-3px}}

/* Iconos originales de la barra inferior de Apps Script v638. */
.mobile-bottom-nav button:nth-child(1){--mobile-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23174c46%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%203H5v18h14v-9M8%208h3M8%2013h3M8%2017h6M14%209l6-6%202%202-6%206-3%201z%22%2F%3E%3C%2Fsvg%3E")}
.mobile-bottom-nav button:nth-child(2){--mobile-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23174c46%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2020h16M5%2017V7h14v10zM8%203v2M12%203v2M16%203v2M8%2010h8M8%2013h5%22%2F%3E%3C%2Fsvg%3E")}
.mobile-bottom-nav button:nth-child(3){--mobile-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23174c46%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m14%205%205-3-1%206-4%203-9%2010-3-3%2010-9zM4%203l4%204M17%2015l5%205-3%202-5-5%22%2F%3E%3C%2Fsvg%3E")}
.mobile-bottom-nav button:nth-child(4){--mobile-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23174c46%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%225%22%20cy%3D%2212%22%20r%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.5%22%2F%3E%3Ccircle%20cx%3D%2219%22%20cy%3D%2212%22%20r%3D%221.5%22%2F%3E%3C%2Fsvg%3E")}
.mobile-bottom-nav button>span{display:block;width:28px;height:28px;flex:none;font-size:0;color:#174c46}
.mobile-bottom-nav button>span::before{content:"";display:block;width:100%;height:100%;background:currentColor;mask:var(--mobile-icon) center/contain no-repeat;-webkit-mask:var(--mobile-icon) center/contain no-repeat}

.mobile-more-menu{display:none}
.mobile-bottom-nav button.active{border:0;background:transparent;color:#5f655d;box-shadow:none}
@media(max-width:800px){.mobile-bottom-nav button[aria-current="page"]{border:2px solid #171717;background:#bab900;color:#171717;box-shadow:2px 2px 0 #171717}}
@media(max-width:800px) and (hover:none) and (pointer:coarse){.mobile-bottom-nav button:focus,.mobile-bottom-nav button:focus-visible{outline:none}}
@media(max-width:800px){
  .shell>aside.open.more-mode{color:#171717;background:#e6e1d5;padding:0 12px 22px}
  .shell>aside.open.more-mode>.brand,.shell>aside.open.more-mode>#modules,.shell>aside.open.more-mode>.logout{display:none}
  .mobile-more-menu:not([hidden]){display:grid;gap:8px;width:min(620px,100%);margin:0 auto;padding:0 0 18px}
  .mobile-more-menu>header{margin:0 -12px 8px;padding:18px 18px 28px;border-bottom:3px solid #171717;background:#bab900;color:#171717}
  .mobile-more-menu>header small{font-size:10px;font-weight:900;letter-spacing:.16em}
  .mobile-more-menu>header h2{margin:3px 0 1px;font:900 30px/1 Impact,'Arial Black',Arial,sans-serif;text-transform:uppercase}
  .mobile-more-menu>header p{margin:0;font-size:12px;font-weight:800}
  .mobile-more-row,.mobile-more-children button{display:grid;grid-template-columns:42px minmax(0,1fr) 18px;align-items:center;gap:12px;width:100%;min-height:68px;padding:11px 13px;border:2px solid #171717;border-radius:8px;background:#faf8ed;color:#171717;text-align:left;box-shadow:3px 3px 0 #171717;font:inherit}
  .mobile-more-row>span:nth-child(2){display:grid;gap:3px;min-width:0}
  .mobile-more-row strong,.mobile-more-children strong{font-size:15px;font-weight:900}
  .mobile-more-row small{font-size:11px;font-weight:700;color:#58645b}
  .mobile-more-row>b,.mobile-more-children b{font-size:24px;transition:transform .16s ease}
  .mobile-more-group{background:#e4e6bf}
  .mobile-more-group[aria-expanded="true"]>b{transform:rotate(90deg)}
  .mobile-more-icon{display:grid;width:38px;height:38px;place-items:center;border:2px solid #171717;border-radius:6px;background:#bab900;font-size:21px;font-weight:900}
  .mobile-more-row:nth-of-type(3n+2) .mobile-more-icon{background:#a6dbc8}
  .mobile-more-row:nth-of-type(3n+3) .mobile-more-icon{background:#a9c9d3}
  .mobile-more-children{display:grid;gap:8px;padding:5px 2px 8px 18px}
  .mobile-more-children[hidden],.mobile-more-row[hidden],.mobile-more-children button[hidden]{display:none}
  .mobile-more-children button{grid-template-columns:32px minmax(0,1fr) 18px;min-height:56px;border-left:5px solid #bab900;background:#f7f8f2;box-shadow:2px 2px 0 #c7c8b7}
  .mobile-more-children button>span{font-size:20px;text-align:center}
}
/* Personal abre sus módulos en una ventana emergente, no dentro de la cinta. */
.desktop-nav-group{display:grid;gap:5px;border:2px solid #143f36;border-radius:14px;padding:5px;background:rgba(255,255,255,.08)}
.desktop-nav-group[hidden]{display:none!important}
#modules .desktop-nav-group-toggle{display:flex;align-items:center;justify-content:space-between;background:#bab900;color:#17211e;font-weight:900}
#modules .desktop-nav-group-toggle b{font-size:1.1rem;line-height:1}
.desktop-nav-group.active{border-color:#c46345}
.module-option-dialog{width:min(720px,calc(100vw - 32px));padding:0;border:3px solid #171717;border-radius:20px;background:#f4f1e7;color:#173f36;box-shadow:9px 9px 0 #171717}
.module-option-dialog::backdrop{background:rgba(15,37,31,.62);backdrop-filter:blur(5px)}
.module-option-dialog>form>header{display:flex;justify-content:space-between;gap:18px;padding:24px;border-bottom:3px solid #171717;background:#bab900;color:#171717}
.module-option-dialog h2{margin:3px 0 4px;font:900 34px/1 Impact,'Arial Black',Arial,sans-serif;text-transform:uppercase}
.module-option-dialog header small{font-weight:900;letter-spacing:.14em}.module-option-dialog header p{margin:0;font-weight:700}
.module-option-close{width:48px;height:48px;border:2px solid #171717;border-radius:50%;background:#f4f1e7;font-size:28px;font-weight:900;box-shadow:3px 3px 0 #171717}
.module-option-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:24px}
.module-option-grid button{display:grid;grid-template-rows:auto auto 1fr;gap:8px;min-height:170px;padding:20px;border:2px solid #171717;border-radius:16px;background:#d7e4bc;color:#173f36;text-align:left;box-shadow:5px 5px 0 #171717}
.module-option-grid button:nth-child(2){background:#a9c9d3}.module-option-grid button:nth-child(3){background:#d9b3a4}
.module-option-grid button span{font-size:34px}.module-option-grid button strong{font-size:20px}.module-option-grid button small{font-size:13px;font-weight:700}
.module-option-grid button[hidden]{display:none}.module-option-grid button:active{transform:translate(3px,3px);box-shadow:2px 2px 0 #171717}
@media(max-width:800px){.module-option-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 110px)}.module-option-dialog>form>header{padding:18px}.module-option-grid{grid-template-columns:1fr;padding:16px}.module-option-grid button{min-height:98px;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto auto}.module-option-grid button span{grid-row:1/3}.module-option-grid button strong{align-self:end}.module-option-grid button small{align-self:start}}

/* Cinta corporativa retráctil: iconos visibles y rótulos al desplegarse. */
.nav-settings{display:none}
.module-option-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:801px){
  .shell{grid-template-columns:68px minmax(0,1fr)}
  .shell>aside{position:relative;z-index:20;width:68px;padding:19px 9px;overflow:hidden;transition:box-shadow .2s ease}
  .shell>aside:hover,.shell>aside:focus-within{width:240px;box-shadow:8px 0 18px #17171735}
  .workspace{z-index:1}
  .brand{position:relative;width:216px;min-height:63px;padding:8px 54px 18px 8px}
  .brand small,.brand strong{opacity:0;transition:opacity .12s ease}
  .brand::before{content:"G";position:absolute;top:9px;left:11px;font:900 29px/1 Impact,'Arial Black',Arial,sans-serif;color:#bab900}
  .shell>aside:hover .brand small,.shell>aside:hover .brand strong,.shell>aside:focus-within .brand small,.shell>aside:focus-within .brand strong{opacity:1}
  .shell>aside:hover .brand::before,.shell>aside:focus-within .brand::before{display:none}
  .nav-settings{position:absolute;z-index:2;top:18px;right:9px;display:grid;width:44px;height:44px;min-height:44px;place-items:center;padding:0;border:2px solid #faf8ed;border-radius:50%;background:#bab900;color:#171717;box-shadow:2px 2px 0 #faf8ed;cursor:pointer}
  .nav-settings strong{display:none}
  #modules{overflow-x:hidden}
  #modules>button,#modules .desktop-nav-group-toggle{display:grid;grid-template-columns:34px minmax(0,1fr) 18px;align-items:center;justify-content:initial;gap:8px;width:216px;min-width:0;padding:6px;white-space:nowrap}
  #modules>button>.nav-option-icon,#modules .desktop-nav-group-toggle>.nav-option-icon{display:grid;width:30px;height:30px;place-items:center;border:1px solid currentColor;border-radius:6px;font-size:18px;line-height:1}
  #modules>button>strong,#modules .desktop-nav-group-toggle>strong{min-width:0;overflow:hidden;text-overflow:ellipsis}
  #modules>button>b{grid-column:3}
  .desktop-nav-group{width:216px;padding:4px}
  .logout{width:216px;white-space:nowrap}
}
@media(max-width:800px){
  .shell>aside{width:auto}
  .shell>aside.open>.nav-settings{display:none}
  .mobile-more-menu>header{position:relative;padding:18px 76px 28px 18px}
  .mobile-settings-button{position:absolute;top:16px;right:16px;display:grid;width:48px;height:48px;place-items:center;border:2px solid #171717;border-radius:50%;background:#faf8ed;color:#171717;font-size:22px;box-shadow:3px 3px 0 #171717}
  .module-option-grid-two{grid-template-columns:1fr}
}

/* Navegación de escritorio más limpia; conserva el rail retráctil y sus rutas. */
@media (min-width:801px) {
  :root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
  .login form {
    border: 1px solid #e1e7e3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 52px rgba(31, 48, 40, .11);
  }
  .login h1 { font: 760 42px/1 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.04em; }
  .login input { border-color: #dce5df; border-radius: 10px; background: #fff; }
  .login button { border: 0; border-radius: 10px; background: #c2cb18; box-shadow: none; }

  .shell>aside {
    border-right:1px solid #505852;
    background:#303632;
    padding:16px 8px;
    transition:width .16s ease;
  }
  .shell>aside:hover,.shell>aside:focus-within {
    width:232px;
    box-shadow:none;
  }
  .brand { min-height:56px; padding-bottom:12px; }
  .brand::before { content:"A"; }
  #modules { gap:3px; padding:4px 0; }
  #modules>button,#modules .desktop-nav-group-toggle {
    grid-template-columns:40px minmax(0,1fr) 18px;
    min-height:42px;
    border:1px solid transparent;
    border-radius:7px;
    background:transparent;
    color:#f4f4ed;
    box-shadow:none;
    padding:5px;
    transition:background-color .12s ease,color .12s ease;
  }
  #modules>button:hover:not(.active),#modules .desktop-nav-group-toggle:hover {
    background:#292929;
  }
  #modules>button.active {
    border-color:transparent;
    border-left:3px solid #171717;
    background:#bab900;
    color:#171717;
    box-shadow:none;
  }
  #modules>button>.nav-option-icon,#modules .desktop-nav-group-toggle>.nav-option-icon {
    width:36px;
    height:36px;
    border:0;
    border-radius:5px;
    font-size:22px;
  }
  .desktop-nav-group,.desktop-nav-group.active {
    gap:2px;
    border:0;
    border-radius:0;
    padding:0;
    background:transparent;
  }
  #modules .desktop-nav-group-toggle { justify-content:initial; }
  #modules .desktop-nav-group-toggle b { font-size:14px; }
  .nav-settings {
    width:42px;
    height:42px;
    min-height:42px;
    border:1px solid #565656;
    border-radius:7px;
    box-shadow:none;
    font-size:18px;
  }
  .nav-settings span { display:grid; place-items:center; font-size:28px; line-height:1; }
  .logout {
    min-height:40px;
    border:1px solid transparent;
    border-radius:7px;
    background:transparent;
    box-shadow:none;
    padding:8px;
    color:#d4d4cc;
  }
  .logout:hover { background:#292929; color:#fff; }
}

/* Escritorio Atlas: cinta grafito translúcida, iconos simples y selección pistacho. */
@media (min-width:801px) {
  .shell>aside {
    color: #eef3ef;
    border-right: 1px solid rgba(226, 236, 230, .14);
    background: rgba(37, 48, 43, .94);
    -webkit-backdrop-filter: saturate(145%) blur(16px);
    backdrop-filter: saturate(145%) blur(16px);
  }
  .brand::before {
    top: 8px;
    left: 10px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: #c2cb18;
    color: #25302b;
    font: 850 19px/1 Inter, ui-sans-serif, system-ui, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  }
  .brand small { color: #dfe7e2; font-size: 10px; letter-spacing: .2em; }
  .brand strong { color: #fff; font: 760 22px/1.05 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.025em; }
  #modules>button,#modules .desktop-nav-group-toggle {
    min-height: 46px;
    border-radius: 9px;
    color: #e8efeb;
  }
  #modules>button:hover:not(.active),#modules .desktop-nav-group-toggle:hover {
    background: rgba(255, 255, 255, .085);
    color: #fff;
  }
  #modules>button>.nav-option-icon,#modules .desktop-nav-group-toggle>.nav-option-icon {
    border-radius: 9px;
    background: rgba(255, 255, 255, .075);
    color: #d8e2dc;
  }
  #modules>button.active {
    border-left-color: #25302b;
    border-radius: 9px;
    background: #c2cb18;
    color: #202a26;
    font-weight: 800;
  }
  #modules>button.active>.nav-option-icon {
    background: rgba(255, 255, 255, .38);
    color: #202a26;
  }
  .nav-settings {
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    background: #c2cb18;
    color: #202a26;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
  }
  .logout { color: #cbd5cf; }
  .logout:hover { background: rgba(255, 255, 255, .085); color: #fff; }
}

/* Atlas PC · traducción del sistema visual aprobado en la propuesta. */
@media (min-width:801px) {
  .shell { grid-template-columns:206px minmax(0,1fr); }
  .shell>aside {
    position:relative;
    width:206px;
    padding:20px 12px;
    overflow-x:hidden;
    border-right:1px solid rgba(255,255,255,.24);
    background:rgba(31,38,35,.91);
    box-shadow:8px 0 22px rgba(22,33,28,.12);
    -webkit-backdrop-filter:blur(16px) saturate(130%);
    backdrop-filter:blur(16px) saturate(130%);
  }
  .shell>aside:hover,.shell>aside:focus-within { width:206px; box-shadow:8px 0 22px rgba(22,33,28,.12); }
  .brand { width:auto; min-height:48px; padding:5px 48px 9px 47px; }
  .brand::before {
    content:"A"; top:5px; left:2px; display:grid; width:34px; height:34px; place-items:center;
    border-radius:10px; background:#bec524; color:#1d2924; font:750 17px/1 Inter,ui-sans-serif,system-ui,sans-serif; box-shadow:none;
  }
  .brand small,.brand strong { opacity:1; }
  .brand small { color:#c6d0ca; font-size:10px; letter-spacing:.09em; }
  .brand strong { color:#f4f7f4; font:750 15px/1.1 Inter,ui-sans-serif,system-ui,sans-serif; letter-spacing:.12em; }
  #modules { gap:4px; padding:0; }
  #modules>button,#modules .desktop-nav-group-toggle {
    grid-template-columns:28px minmax(0,1fr) 16px; width:100%; min-height:39px; gap:9px; padding:5px 9px;
    border:0; border-radius:8px; background:transparent; color:#f4f7f4; font-weight:550;
  }
  #modules>button>.nav-option-icon,#modules .desktop-nav-group-toggle>.nav-option-icon {
    width:26px; height:26px; border:0; border-radius:7px; background:transparent; color:#c6d0ca; font-size:17px;
  }
  #modules>button:hover:not(.active),#modules .desktop-nav-group-toggle:hover { background:rgba(255,255,255,.09); color:#fff; }
  #modules>button.active { border:0; border-radius:8px; background:#bec524; color:#1d2924; box-shadow:none; font-weight:700; }
  #modules>button.active>.nav-option-icon { background:rgba(255,255,255,.32); color:#1d2924; }
  .desktop-nav-group,.desktop-nav-group.active { width:100%; gap:2px; padding:0; border:0; border-radius:0; background:transparent; }
  .nav-settings { top:20px; right:12px; width:34px; height:34px; min-height:34px; border:0; border-radius:10px; background:#bec524; color:#1d2924; box-shadow:none; }
  .nav-settings span { font-size:21px; }
  .logout { width:100%; min-height:39px; padding:10px 8px; border:0; border-top:1px solid rgba(255,255,255,.18); border-radius:0; color:#c6d0ca; }
}

/* Navegación móvil Atlas: cápsula flotante de cristal claro y translúcido,
   inspirada en Instagram; conserva las leyendas y resalta la acción activa. */
@media (max-width:800px) {
  .mobile-bottom-nav {
    --nav-ink:#203b33;
    --nav-muted:#52675f;
    left:16px;
    right:16px;
    bottom:calc(12px + env(safe-area-inset-bottom));
    height:72px;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:2px;
    padding:5px;
    border:1px solid rgba(255,255,255,.78);
    border-radius:999px;
    background:rgba(245,248,245,.70);
    box-shadow:0 8px 26px rgba(31,48,40,.16),inset 0 1px 0 rgba(255,255,255,.82);
    -webkit-backdrop-filter:blur(20px) saturate(145%);
    backdrop-filter:blur(20px) saturate(145%);
  }
  .mobile-bottom-nav button,
  .mobile-bottom-nav[data-active] button {
    min-height:60px;
    grid-template-rows:46px auto;
    align-content:center;
    justify-items:center;
    gap:2px;
    padding:2px;
    border:1px solid transparent;
    border-radius:999px;
    background:transparent;
    color:var(--nav-muted);
    box-shadow:none;
    transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease;
  }
  .mobile-bottom-nav button>span {
    display:grid;
    width:46px;
    height:46px;
    place-items:center;
    padding:0;
    border-radius:0;
    background:transparent;
    color:currentColor;
  }
  .mobile-bottom-nav button>span::before { width:100%;height:100%; }
  .mobile-bottom-nav button>span { transform:translateY(12px); }
  .mobile-bottom-nav button>strong { transform:translateY(4px); }
  .mobile-bottom-nav button>strong {
    color:inherit;
    font-size:10px;
    font-weight:750;
    line-height:1;
    letter-spacing:.005em;
    white-space:nowrap;
  }
  .mobile-bottom-nav button[aria-current="page"],
  .mobile-bottom-nav[data-active="registrar"] button[data-bottom="registrar"],
  .mobile-bottom-nav[data-active="cocina"] button[data-bottom="cocina"],
  .mobile-bottom-nav[data-active="incidencias"] button[data-bottom="incidencias"],
  .mobile-bottom-nav[data-active="mas"] button[data-bottom="mas"] {
    border:1px solid rgba(255,255,255,.62);
    background:rgba(255,255,255,.66);
    color:var(--nav-ink);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.92),0 2px 7px rgba(31,48,40,.08);
  }
  .mobile-bottom-nav button:focus-visible { outline:2px solid #87963a;outline-offset:1px; }
}

/* Menu Más · misma superficie clara y compacta que las tarjetas de Atlas. */
@media (max-width:800px) {
  .shell>aside.open.more-mode {
    inset:12px 12px calc(88px + env(safe-area-inset-bottom));
    padding:0;
    overflow:hidden;
    border:1px solid #e1e7e3;
    border-radius:18px;
    background:#fff;
    box-shadow:0 16px 44px rgba(31,48,40,.18);
  }
  .mobile-more-menu:not([hidden]) {
    align-content:start;
    gap:8px;
    width:100%;
    height:100%;
    margin:0;
    padding:12px;
    overflow:auto;
    overscroll-behavior:contain;
    background:#fff;
  }
  .mobile-more-menu>header {
    display:grid;
    align-content:center;
    min-height:76px;
    margin:0 0 2px;
    padding:8px 58px 10px 4px;
    border:0;
    border-bottom:1px solid #e6ebe7;
    background:#fff;
    color:#202a26;
  }
  .mobile-more-menu>header small { color:#62716a;font-size:10px;letter-spacing:.14em; }
  .mobile-more-menu>header h2 {
    margin:2px 0;
    font:750 25px/1.05 Inter,ui-sans-serif,system-ui,sans-serif;
    letter-spacing:-.035em;
    text-transform:none;
  }
  .mobile-more-menu>header p { color:#68736e;font-size:12px;font-weight:550; }
  .mobile-settings-button {
    top:16px;
    right:4px;
    width:42px;
    height:42px;
    border:1px solid #dce5df;
    border-radius:12px;
    background:#f4f7f4;
    color:#174c46;
    font-size:20px;
    box-shadow:none;
  }
  .mobile-more-row,.mobile-more-children button {
    grid-template-columns:40px minmax(0,1fr) 18px;
    gap:11px;
    min-height:62px;
    padding:9px 11px;
    border:1px solid #e1e7e3;
    border-radius:12px;
    background:#fff;
    color:#202a26;
    box-shadow:0 3px 10px rgba(31,48,40,.055);
    font-family:Inter,ui-sans-serif,system-ui,sans-serif;
  }
  .mobile-more-row strong,.mobile-more-children strong { font-size:14px;font-weight:700; }
  .mobile-more-row small { color:#68736e;font-size:11px;font-weight:500; }
  .mobile-more-row>b,.mobile-more-children b { color:#68736e;font-size:20px; }
  .mobile-more-group { background:#f7f8f2; }
  .mobile-more-icon {
    width:34px;
    height:34px;
    border:0;
    border-radius:10px;
    background:#eef2df;
    color:#174c46;
    font-size:18px;
  }
  .mobile-more-row:nth-of-type(3n+2) .mobile-more-icon { background:#e6f2ed; }
  .mobile-more-row:nth-of-type(3n+3) .mobile-more-icon { background:#e7f0f3; }
  .mobile-more-children { gap:6px;padding:2px 0 4px 14px; }
  .mobile-more-children button {
    grid-template-columns:30px minmax(0,1fr) 18px;
    min-height:52px;
    border-left:3px solid #bec524;
    border-radius:10px;
    background:#f7f8f6;
    box-shadow:none;
  }
}

/* Encabezado compartido que libera espacio al desplazarse por el módulo. */
.workspace.header-collapsed #portalModuleHeader{min-height:0;max-height:0;padding-block:0;margin-bottom:0;opacity:0;transform:translateY(-100%);pointer-events:none}
.workspace.header-collapsed #moduleState{top:12px}
@media(max-width:800px){html body .shell > .workspace{padding-inline:4px!important}}
.workspace{display:flex;flex-direction:column;gap:0;height:100vh;padding:18px 22px 0;background:#fff}
.workspace iframe{display:block;flex:1 1 auto;width:100%;height:0;min-height:0;border:0;background:#fff}
.portal-module-header{position:relative;display:flex;align-items:center;min-height:154px;max-height:260px;overflow:hidden;flex:none;margin:0 0 10px;padding:26px 30px;border:0;border-radius:30px;background:#153f36;color:#f4f7f4;box-shadow:none;transition:transform .3s ease,opacity .3s ease,min-height .3s ease,max-height .3s ease,padding .3s ease,margin .3s ease}
@media(prefers-reduced-motion:reduce){.portal-module-header{transition:none}}
.portal-module-heading{min-width:0;padding-right:210px}
.portal-module-header small{display:block;margin:0 0 8px;color:#c4d4ce;font-size:clamp(13px,1.4vw,20px);font-weight:500;letter-spacing:.12em;text-transform:uppercase}
.portal-module-header h1{margin:0;color:#f4f7f4;font-size:clamp(28px,3.25vw,46px);font-weight:750;line-height:1.08;letter-spacing:-.035em}
.portal-module-header p{margin:12px 0 0;color:#d9e5e0;font-size:clamp(15px,1.9vw,26px);line-height:1.2}
.portal-module-status{position:absolute;top:50%;right:28px;display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 20px;transform:translateY(-50%);border-radius:999px;background:#f7faf8;color:#173f36}
.portal-module-status span{width:16px;height:16px;border-radius:50%;background:#72bd5a;box-shadow:0 0 0 7px #e2f1dd}
.portal-module-status strong{font-size:14px;font-weight:750;white-space:nowrap}
#moduleState{top:174px}
@media(max-width:800px){
  .workspace{height:calc(100dvh - var(--mobile-bottom-height) - env(safe-area-inset-bottom));padding:10px 10px 0}
  .portal-module-header{min-height:112px;margin-bottom:7px;padding:17px 18px;border-radius:22px}
  .portal-module-heading{padding-right:104px}
  .portal-module-header small{margin-bottom:6px;font-size:10px;letter-spacing:.1em}
  .portal-module-header h1{font-size:clamp(23px,6vw,32px);line-height:1.05}
  .portal-module-header p{margin-top:7px;font-size:14px}
  .portal-module-status{right:12px;gap:0;min-height:42px;padding:10px 12px}
  .portal-module-status span{width:13px;height:13px;box-shadow:0 0 0 5px #e2f1dd}
  .portal-module-status strong{display:none}
  #moduleState{top:126px}
}

#portalOrdersSettings{position:absolute;right:250px;top:50%;transform:translateY(-50%);width:44px;height:44px;padding:0;border:1px solid #dce5df;border-radius:10px;background:#f7faf8;color:#173f36;font:24px/1 system-ui;cursor:pointer}#portalOrdersSettings[hidden]{display:none!important}.portal-module-header:has(#portalOrdersSettings:not([hidden])) .portal-module-heading{padding-right:290px}@media(max-width:800px){#portalOrdersSettings{right:115px;width:40px;height:40px}.portal-module-header:has(#portalOrdersSettings:not([hidden])) .portal-module-heading{padding-right:146px}}
/* Mobile More submenus: bottom sheet, retaining permission-filtered routes. */
@media(max-width:800px){
 html body dialog.module-option-dialog{position:fixed!important;inset:auto 10px 10px!important;margin:0!important;width:calc(100vw - 20px)!important;max-width:none!important;max-height:82dvh!important;padding:0!important;border:0!important;border-radius:24px!important;background:#fff!important;color:#173f36!important;box-shadow:0 -8px 32px #102a2326!important;overflow:auto!important}
 html body dialog.module-option-dialog[open]{animation:more-sheet-enter .28s cubic-bezier(.2,.8,.2,1)}
 html body dialog.module-option-dialog::backdrop{background:#12271f66!important;backdrop-filter:none!important}
 html body dialog.module-option-dialog form::before{content:'';display:block;width:42px;height:5px;margin:8px auto 0;border-radius:8px;background:#c9cec9}
 html body dialog.module-option-dialog>form>header{position:relative!important;display:block!important;padding:20px 48px 16px!important;border:0!important;background:#fff!important;text-align:center!important;color:#173f36!important}
 html body dialog.module-option-dialog header small,html body dialog.module-option-dialog header p{display:none!important}
 html body dialog.module-option-dialog h2{font:650 18px/1.3 system-ui!important;text-transform:none!important;color:#173f36!important;margin:0!important}
 html body dialog.module-option-dialog .module-option-close{position:absolute;right:14px;top:15px;width:30px!important;height:30px!important;padding:0!important;border:0!important;border-radius:8px!important;background:#f2f5ee!important;box-shadow:none!important;color:#65746a!important;font-size:22px!important}
 html body dialog.module-option-dialog .module-option-grid{display:block!important;padding:0 0 calc(12px + env(safe-area-inset-bottom))!important}
 html body dialog.module-option-dialog .module-option-grid button{display:block!important;min-height:60px!important;width:100%!important;margin:0!important;padding:18px 22px!important;border:0!important;border-top:1px solid #e6eae6!important;border-radius:0!important;background:#fff!important;color:#253e34!important;box-shadow:none!important;text-align:left!important;transform:none!important}
 html body dialog.module-option-dialog .module-option-grid button[hidden]{display:none!important}
 html body dialog.module-option-dialog .module-option-grid button span,html body dialog.module-option-dialog .module-option-grid button small{display:none!important}
 html body dialog.module-option-dialog .module-option-grid button strong{font-size:16px!important;font-weight:500!important}
 html body dialog.module-option-dialog .module-option-grid button:active{background:#f0f4e5!important}
 @keyframes more-sheet-enter{from{transform:translateY(110%);opacity:.6}to{transform:translateY(0);opacity:1}}
}
@media(prefers-reduced-motion:reduce){html body dialog.module-option-dialog[open]{animation:none!important}}

/* Desktop navigation opens beside its own button; mobile keeps its sheet. */
@media (min-width: 801px) {
 html body dialog.module-option-dialog.desktop-anchored {
  position:fixed!important;inset:auto!important;left:var(--popup-left,220px)!important;top:var(--popup-top,100px)!important;
  margin:0!important;width:280px!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;
  padding:0!important;overflow:auto!important;border:1px solid #dce6df!important;border-radius:16px!important;
  background:#fff!important;color:#173f36!important;box-shadow:0 8px 28px #102a2326!important;
 }
 html body dialog.module-option-dialog.desktop-anchored::backdrop {background:transparent!important;backdrop-filter:none!important}
 html body dialog.module-option-dialog.desktop-anchored>form>header {padding:14px 16px!important;border-bottom:1px solid #e6eae6!important;background:#f3f6ec!important;color:#173f36!important;align-items:center}
 html body dialog.module-option-dialog.desktop-anchored header small,
 html body dialog.module-option-dialog.desktop-anchored header p {display:none!important}
 html body dialog.module-option-dialog.desktop-anchored h2 {margin:0!important;font:700 18px/1.3 system-ui!important;text-transform:none!important}
 html body dialog.module-option-dialog.desktop-anchored .module-option-close {width:30px!important;height:30px!important;border:0!important;border-radius:8px!important;background:#fff!important;box-shadow:none!important;font-size:22px!important}
 html body dialog.module-option-dialog.desktop-anchored .module-option-grid {display:grid!important;grid-template-columns:1fr!important;gap:5px!important;padding:8px!important}
 html body dialog.module-option-dialog.desktop-anchored .module-option-grid button {display:grid!important;grid-template-columns:28px 1fr!important;grid-template-rows:auto auto!important;gap:2px 8px!important;padding:10px!important;min-height:52px!important;border:1px solid #e3e9e1!important;border-radius:10px!important;background:#fff!important;color:#173f36!important;box-shadow:none!important;text-align:left!important;transform:none!important}
 html body dialog.module-option-dialog.desktop-anchored .module-option-grid button[hidden] {display:none!important}
 html body dialog.module-option-dialog.desktop-anchored .module-option-grid button>span {grid-row:1/3;font-size:20px!important;align-self:center}
 html body dialog.module-option-dialog.desktop-anchored .module-option-grid button strong {font:650 14px/1.3 system-ui!important}
 html body dialog.module-option-dialog.desktop-anchored .module-option-grid button small {font:400 11px/1.4 system-ui!important}
 html body dialog.module-option-dialog.desktop-anchored .module-option-grid button:hover {background:#f3f6ec!important}
}
