/* Proposed navigation shell. Business components remain in admin.css. */

/* Firma del local: proporción y separación compartidas por la barra lateral. */
.control-brand {
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  min-width: 0;
}
.control-brand img { width: 64px; height: 64px; }
.control-brand .control-brand-signature { display: grid; gap: 3px; min-width: 0; text-align: left; }
.control-brand .control-brand-signature small { display: block; margin: 0; font: 600 10px/1.3 'Barlow Condensed',sans-serif; letter-spacing: .08em; color: var(--text-muted); }
.control-brand .control-brand-signature b { font: 800 25px/1.15 'Barlow Condensed',sans-serif; letter-spacing: .05em; color: var(--text); }

/* La barra de iconos de tablet sólo tiene espacio para el sello. */
@media (min-width: 761px) and (max-width: 1320px) {
  .control-brand { justify-content: center; gap: 0; }
  .control-brand img { width: 48px; height: 48px; }
  .control-brand .control-brand-signature { display: none; }
}

.control-topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  min-height: 72px;
  padding-block: 12px;
  flex-wrap: nowrap;
}
.control-topbar-context { flex-basis: auto; }
.control-topbar-actions {
  width: auto;
  flex-wrap: nowrap;
  gap: 12px;
}
.control-topbar .control-storage {
  position: relative;
  justify-content: center;
  min-height: 44px;
  padding-inline: 8px;
}
.control-topbar .control-storage small { display: none; }
.control-topbar .control-command-button { margin-left: 0; order: 0; }
.control-profile { position: relative; flex-shrink: 0; }
.control-profile > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.control-profile > summary::-webkit-details-marker { display: none; }
.control-profile > summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.control-profile > summary:hover,
.control-profile[open] > summary { background: var(--surface-raised); }
.control-profile-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--accent);
  font: 21px/1 'DM Serif Display', Georgia, serif;
}
.control-profile-name { font-size: 13px; font-weight: 650; white-space: nowrap; }
.control-profile > summary > svg { width: 14px; height: 14px; transform: rotate(90deg); }
.control-profile[open] > summary > svg { transform: rotate(-90deg); }
.control-profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: 276px;
  max-width: calc(100vw - 32px);
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.control-profile-heading { margin-bottom: 16px; }
.control-profile-heading strong { display: block; font-size: 15px; font-weight: 750; }
.control-profile-heading small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.control-profile-appearance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
  border-top: 1px solid var(--border);
}
.control-profile-appearance > span { font-size: 13px; color: var(--text-muted); }
.control-profile-appearance .theme-switch { flex-shrink: 0; width: auto; }
.control-profile-appearance .theme-switch button { width: 44px; min-width: 44px; min-height: 44px; padding: 10px; }
.control-profile-menu .control-role-select { display: block; margin-top: 0; }
.control-profile-menu .control-role-select > span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 12px;
}
.control-profile-menu .control-role-select select { width: 100%; max-width: none; min-height: 44px; font-size: 14px; }
.control-profile-shop {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  text-align: left;
}
.control-profile-shop > svg:last-child { margin-left: auto; width: 16px; height: 16px; }
.control-profile-menu > p { margin: 10px 0 0; color: var(--text-subtle); font-size: 11px; }

/* New child nodes animate on a route change; the navigation stays still. */
.control-main.section-enter { animation: none; }
.control-main.section-enter > .control-page-head { animation: panel-heading-arrive 330ms cubic-bezier(.2,.8,.2,1) both; }
.control-main.section-enter > :not(.control-page-head):not(.control-footer) { animation: panel-content-arrive 380ms 45ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes panel-heading-arrive { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes panel-content-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .control-topbar { gap: 12px; }
  .control-topbar-actions { gap: 8px; justify-content: flex-end; }
  .control-topbar .control-command-button { width: 44px; padding: 10px; justify-content: center; }
  .control-topbar .control-command-button > span,
  .control-topbar .control-command-button > kbd,
  .control-profile-name { display: none; }
}

/* The same controls form one compact, persistent shell on phones. */
@media (max-width: 760px) {
  .control-shell {
    --admin-space: 18px;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: 60px auto 1fr;
    align-items: start;
  }
  .control-sidebar,
  .control-workspace { display: contents; }
  .control-location,
  .sidebar-label,
  .control-sidebar-bottom { display: none; }
  .control-brand {
    position: sticky;
    top: 0;
    z-index: 41;
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    width: 100%;
    height: 60px;
    padding: 10px 0 10px 16px;
    background: var(--surface-muted);
  }
  .control-brand img { width: 36px; height: 36px; border-width: 1px; }
  .control-brand > span { display: block; font-size: 21px; letter-spacing: 1.1px; }
  .control-brand small { margin-top: 3px; font-size: 9px; letter-spacing: 1.8px; }
  .control-brand .control-brand-signature small { font-size: 8px; }
  .control-brand .control-brand-signature b { font-size: 18px; }
  .control-topbar {
    grid-column: 2;
    grid-row: 1;
    z-index: 41;
    height: 60px;
    min-height: 60px;
    padding: 8px 12px 8px 4px;
    border: 0;
    background: var(--surface-muted);
  }
  .control-topbar-context { display: none; }
  .control-topbar-actions { width: auto; gap: 3px; }
  .control-topbar .control-storage {
    order: 0;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }
  .control-topbar .control-storage i { width: 7px; height: 7px; }
  .control-topbar .control-storage > span,
  .control-topbar .control-storage > small {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
  }
  .control-topbar .control-storage.error,
  .control-topbar .control-storage.conflict { box-shadow: inset 0 0 0 1px var(--danger-text); border-radius: 5px; }
  .control-profile > summary { gap: 0; padding: 4px; }
  .control-profile > summary > svg { display: none; }
  .control-profile-menu { top: calc(100% + 8px); }
  .control-nav {
    position: sticky;
    top: 60px;
    z-index: 40;
    grid-column: 1/-1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 4px;
    min-height: 56px;
    margin: 0;
    padding: 4px 12px 7px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
  }
  .control-nav > button {
    position: relative;
    width: auto;
    min-height: 44px;
    gap: 3px;
    padding: 5px 1px;
    border-radius: 7px;
    font-size: 11px;
    line-height: 1.2;
  }
  .control-nav > button > svg { width: 17px; height: 17px; }
  .control-nav > button > b { top: 2px; right: 13%; min-width: 14px; height: 14px; font-size: 9px; }
  .control-main { grid-column: 1/-1; grid-row: 3; padding-top: 22px; }
  .control-page-head { gap: 16px; margin-bottom: 20px; }
  .control-page-head h1 { margin-bottom: 8px; font-size: 30px; }
  .control-page-head > div > p:last-child { font-size: 14px; line-height: 1.65; }
  .control-eyebrow { margin-bottom: 6px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .control-main.section-enter > * { animation: none !important; }
}
