.management-shell {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--color-cream) 0%, #f5f4f0 50%, #ebe8e0 100%);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.side-nav {
  width: 280px;
  background: var(--color-ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: width .2s ease;
  flex-shrink: 0; /* never collapse to 0 on narrow screens */
}

.nav-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: .75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-area {
  background: #ffffff;
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 1.6rem;
  font-weight: bold;
  color: #2c2c2c;
  border-bottom: 2px solid #f5f4f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--color-ink);
}

.brand-subtitle {
  font-size: 0.9rem;
  color: var(--color-coffee);
  font-weight: 500;
}

.user-info {
  padding: 1.5rem;
  background: rgba(255,255,255,0.1);
  margin: 1rem;
  border-radius: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: 1rem;
  color: #f5f4f0;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  flex: 1;
}

.menu-item {
  color: #f5f4f0;
  text-decoration: none;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.menu-item:hover {
  background: #444444;
  color: #ffffff;
  transform: translateX(3px);
}

.menu-item.active {
  background: var(--color-coffee);
  color: #ffffff;
  border-color: rgba(255,255,255,0.2);
}

.menu-icon {
  font-size: 1rem;
  line-height: 1;
  color: #f5f4f0;
}

.menu-label { white-space: nowrap; }

.content-area {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 20px 0 0 20px;
  margin: 1rem 1rem 1rem 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  min-width: 0; /* allow content to shrink instead of pushing sidebar off-screen */
}

.page-header {
  background: linear-gradient(135deg, #ffffff, #faf9f7);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border-left: 4px solid var(--color-coffee);
}

.page-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-ink);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.page-subtitle {
  color: #666666;
  font-size: 1.1rem;
  margin: 0;
}

.filter-bar {
  background: linear-gradient(135deg, #ffffff, #faf9f7);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: flex;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border: 1px solid #ebe8e0;
}

.filter-bar label {
  font-weight: 600;
  font-size: 1.05rem;
  color: #2c2c2c;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.filter-bar select {
  padding: 0.8rem 1rem;
  border-radius: 6px;
  border: 2px solid #ebe8e0;
  background: white;
  font-size: 1rem;
  transition: all 0.3s ease;
  min-width: 150px;
  color: #2c2c2c;
}

.filter-bar select:focus {
  outline: none;
  border-color: #8b6914;
  box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}

.stock-table {
  width: 100%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid #ebe8e0;
}

.stock-table th {
  background: var(--color-ink);
  color: white;
  padding: 1.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-table td {
  padding: 1.2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid #f5f4f0;
  font-size: 1.05rem;
  transition: background-color 0.3s ease;
}

.stock-table tr:hover td {
  background-color: #faf9f7;
}

.stock-table tr:last-child td {
  border-bottom: none;
}

.stock-number {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-ink);
}

.stock-low {
  color: #8b1538;
  background: rgba(139, 21, 56, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-weight: 600;
}

.stock-medium {
  color: #8b6914;
  background: rgba(139, 105, 20, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-weight: 600;
}

.stock-high {
  color: #2d5016;
  background: rgba(45, 80, 22, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-weight: 600;
}

.branch-name {
  font-weight: 600;
  color: var(--color-ink);
  font-size: 1.1rem;
}

.shipment-date {
  color: #666666;
  font-style: italic;
}

.site-footer {
  margin-top: auto;
  text-align: center;
  color: #666666;
  font-size: 0.95rem;
  padding: 2rem 0;
  border-top: 1px solid #ebe8e0;
}

.veronika {
  color: #8b6914;
  font-weight: bold;
} 

/* Collapsible sidebar */
.collapse-btn {
  margin: 0;
  background: #444444;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease;
}

.collapse-btn:hover { background: #555555; }

.side-nav.collapsed { width: 76px; }
.side-nav.collapsed .brand-text,
.side-nav.collapsed .user-info,
.side-nav.collapsed .menu-label { display: none; }
.side-nav.collapsed .menu { gap: .25rem; }
.side-nav.collapsed .menu-item {
  justify-content: center;
  padding: 0.9rem 0.5rem;
}
.side-nav.collapsed .collapse-btn { margin: 0; }

/* Auto-collapse on smaller screens */
@media (max-width: 1024px) {
  .side-nav.expanded { width: 220px; }
  .side-nav.collapsed { width: 64px; }
  .side-nav.collapsed .menu-label { display: none; }
  .side-nav.expanded .menu-label { display: inline; }
  .side-nav .menu { gap: .25rem; }
  .side-nav .menu-item { padding: 0.9rem 0.75rem; }
}

/* Topbar (right aligned logo) */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #ffffff, #faf9f7);
  border-radius: 12px;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border: 1px solid #ebe8e0;
}

.topbar-logo-box {
  width: 56px;
  height: 56px;
  border: 2px solid #e7e5e4; /* light gray frame */
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden; /* ensure the logo stays inside */
}

.topbar-logo {
  width: 100%;
  height: 100%;
  object-fit: cover; /* crop horizontally if needed */
  object-position: center;
  display: block;
}