/* MDS Food — Painel Operacional 2.0 shell overrides.
 * Keep this file intentionally small: visual white-label only, no route or permission changes.
 */

/* Sidebar brand: use the commercial MDS Food lockup, while keeping the tenant name below it. */
.sidebar .logo-container::before {
  content: '' !important;
  display: block !important;
  width: 154px !important;
  height: 46px !important;
  background: url('/logo-mds-food-header.png') left center / contain no-repeat !important;
}

.sidebar .logo-container > .logo,
.sidebar .logo-container > .version,
.sidebar .commit-hash,
.sidebar .tenant-id {
  display: none !important;
}

.sidebar .sidebar-org-name {
  max-width: 172px !important;
  margin-top: 0.35rem !important;
  color: #2F3453 !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

/* Mobile header: commercial brand instead of the generic POS label. */
.mobile-header .mobile-brand {
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.6rem !important;
}

.mobile-header .mobile-brand::before {
  content: '' !important;
  display: block !important;
  flex: 0 0 auto !important;
  width: 104px !important;
  height: 32px !important;
  margin: 0 !important;
  background: url('/logo-mds-food-header.png') left center / contain no-repeat !important;
}

.mobile-header .header-title {
  display: none !important;
}

.mobile-header .header-org-name {
  max-width: min(48vw, 190px) !important;
  color: #2F3453 !important;
  font-weight: 600 !important;
}

/* Make the operational shell feel like one product, not a legacy admin skin. */
.sidebar {
  border-right-color: rgba(47, 52, 83, 0.10) !important;
}

.sidebar-header {
  min-height: 88px !important;
  background: #F7F5EF !important;
}

.nav-link.active,
.nav-sublink.active {
  color: #374B89 !important;
}

.nav-link.active {
  border-left-color: #D6A92F !important;
  background: rgba(55, 75, 137, 0.08) !important;
}

.nav-link:focus-visible,
.nav-section-header:focus-visible,
.nav-sublink:focus-visible,
.logout-btn:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid rgba(214, 169, 47, 0.42) !important;
  outline-offset: 2px !important;
}

/* Upstream support links are kept in source history/licensing context, not in the commercial UI. */
.help-section:has(a[href*="github.com/satisfecho/pos"]) {
  display: none !important;
}

/* Painel 2.0: prioritize the restaurant's daily workflow without inventing routes.
 * Existing RBAC/module checks remain authoritative because links are only repositioned visually.
 */
.nav {
  display: flex !important;
  flex-direction: column !important;
}

.nav > a.nav-link[href="/dashboard"] { order: 10; }
.nav > a.nav-link[href="/staff/orders"] { order: 20; }
.nav > .nav-section:has(a[href="/tables"]) { order: 30; }
.nav > .nav-section:has(a[href="/working-plan"]) { order: 40; }
.nav > .nav-section:has(a[href="/products"]) { order: 50; }
.nav > .nav-section:has(a[href="/settings"]) { order: 60; }
.nav > a.nav-link[href="/my-shift"] { order: 70; }
.nav > a.nav-link[href="/talk"] { order: 80; }

/* Commercial language for the operational navigation. Keep the real links and guards untouched. */
.nav > .nav-section:has(a[href="/tables"]) > .nav-section-header > span,
.nav > .nav-section:has(a[href="/working-plan"]) > .nav-section-header > span,
.nav > .nav-section:has(a[href="/products"]) > .nav-section-header > span,
.nav > .nav-section:has(a[href="/settings"]) > .nav-section-header > span {
  font-size: 0 !important;
}

.nav > .nav-section:has(a[href="/tables"]) > .nav-section-header > span::after,
.nav > .nav-section:has(a[href="/working-plan"]) > .nav-section-header > span::after,
.nav > .nav-section:has(a[href="/products"]) > .nav-section-header > span::after,
.nav > .nav-section:has(a[href="/settings"]) > .nav-section-header > span::after {
  font-size: 0.95rem !important;
}

.nav > .nav-section:has(a[href="/tables"]) > .nav-section-header > span::after {
  content: 'Operação';
}

.nav > .nav-section:has(a[href="/working-plan"]) > .nav-section-header > span::after {
  content: 'Agenda e reservas';
}

.nav > .nav-section:has(a[href="/products"]) > .nav-section-header > span::after {
  content: 'Cardápio e estoque';
}

.nav > .nav-section:has(a[href="/settings"]) > .nav-section-header > span::after {
  content: 'Gestão';
}

/* Secondary staff tools should not compete visually with the core sales/operation flow. */
.nav > a.nav-link[href="/my-shift"],
.nav > a.nav-link[href="/talk"] {
  margin-top: 0 !important;
}

/* Dashboard 2.0 — real operation first.
 * This increment only reorders cards that already exist and keeps their original permission/module rules.
 */
.quick-actions::before {
  content: 'Operação agora';
  grid-column: 1 / -1;
  order: 1;
  margin: 0 0 0.15rem;
  color: #2F3453;
  font-size: 1.05rem;
  font-weight: 700;
}

.quick-actions > .action-card {
  min-height: 156px;
}

.quick-actions > a.action-card[href="/staff/orders"] { order: 10; }
.quick-actions > a.action-card[href="/tables"] { order: 20; }
.quick-actions > a.action-card[href="/kitchen"] { order: 30; }
.quick-actions > a.action-card[href="/bar"] { order: 40; }
.quick-actions > a.action-card[href="/products"] { order: 50; }
.quick-actions > a.action-card[href*="public-menu"] { order: 60; }
.quick-actions > a.action-card[data-testid="dashboard-my-shift"] { order: 70; }
.quick-actions > a.action-card[href="/customers"] { order: 100; }
.quick-actions > a.action-card[href="/reports"] { order: 110; }
.quick-actions > a.action-card[href="/reservations"] { order: 120; }
.quick-actions > a.action-card[href="/inventory"] { order: 130; }
.quick-actions > a.action-card[href="/catalog"] { order: 140; }
.quick-actions > a.action-card[href="/working-plan"] { order: 150; }
.quick-actions > a.action-card[href="/users"] { order: 160; }
.quick-actions > a.action-card[href="/settings"] { order: 170; }

/* Changelog/upstream release notes are not part of the restaurant's daily commercial workflow. */
.quick-actions > .action-card-whats-new {
  display: none !important;
}

.quick-actions > a.action-card[href="/staff/orders"],
.quick-actions > a.action-card[href="/tables"],
.quick-actions > a.action-card[href="/kitchen"],
.quick-actions > a.action-card[href="/bar"] {
  border-top: 3px solid #D6A92F !important;
  box-shadow: 0 8px 20px rgba(47, 52, 83, 0.06);
}

.quick-actions > a.action-card[href="/staff/orders"] .action-icon,
.quick-actions > a.action-card[href="/tables"] .action-icon,
.quick-actions > a.action-card[href="/kitchen"] .action-icon,
.quick-actions > a.action-card[href="/bar"] .action-icon {
  background: rgba(55, 75, 137, 0.10) !important;
  color: #374B89 !important;
}

@media (max-width: 599px) {
  .sidebar .logo-container::before {
    width: 140px !important;
    height: 42px !important;
  }

  .quick-actions > .action-card {
    min-height: auto;
  }
}
