/* ============================================================================
   shell.css — Layout do shell (headerbar + sidebar + conteúdo)
   Réplica do web.camaleaocamisas.com.br (Vue + Bootstrap 5.3):
   _headerbar.scss, _sidebar.scss, SidebarItem*.vue. Valores tirados do CSS no ar.
   ============================================================================ */

body.shell { min-height: 100vh; }

/* ============================================================================
   HEADERBAR — 50px, #343a40, sombra 0 0 5px rgba(0,0,0,.3)
   ============================================================================ */

.shell-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: var(--z-header);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--web-dark);
  box-shadow: 0 0 5px rgba(0, 0, 0, .3);
}
.shell-header__esq { display: flex; align-items: center; height: 100%; }

/* Hambúrguer (hamburgers "squeeze" em scale .65 no web) */
.shell-header__burger {
  width: 40px;
  height: 40px;
  margin: 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.shell-header__burger span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: #e9ecef;
  transition: transform .15s, opacity .15s;
}
.shell-header__burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.shell-header__burger.is-active span:nth-child(2) { opacity: 0; }
.shell-header__burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.shell-header__logo { display: flex; align-items: center; height: 100%; margin-left: 8px; }
.shell-header__logo img { height: 30px; width: auto; display: block; }

.shell-header__voltar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  margin-right: 16px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color .15s;
}
.shell-header__voltar:hover { background-color: rgba(255, 255, 255, .1); }
.shell-header__voltar:active { background-color: rgba(255, 255, 255, .2); }

/* ============================================================================
   SIDEBAR — 280px, #343a40, recolhe para a esquerda
   ============================================================================ */

.shell-sidebar {
  position: fixed;
  bottom: 0;
  left: 0;
  height: calc(100% - var(--header-height));
  width: var(--sidebar-width);
  background-color: var(--web-dark);
  z-index: 1000;
  box-shadow: 0 0 5px rgba(0, 0, 0, .3);
  overflow: auto;
  padding-bottom: 40px;
  transition: margin-left .15s;
}
.shell-sidebar:not(.active) { margin-left: calc(-1 * var(--sidebar-width)); }

.shell-sidebar__usuario { text-align: center; margin: 24px 0; padding: 0 8px; color: #fff; }
.shell-sidebar__usuario h5 { margin: 16px 0 0; font-size: 1.25rem; font-weight: 500; line-height: 1.2; color: #fff; }
.shell-sidebar__usuario b { font-size: .875em; color: #f8f9fa; }

.shell-sidebar__nav { list-style: none; margin: 0; padding: 0; }

.shell-sidebar__item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 24px;
  font-size: .95rem;
  color: #fff;
  background-color: var(--web-dark);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}
.shell-sidebar__item:hover { background-color: var(--web-dark-hover); color: #fff; text-decoration: none; }
.shell-sidebar__item.active { font-weight: 700; background-color: var(--web-dark-active); }
.shell-sidebar__item .fa-fw { margin-right: 8px; color: var(--primary); }
.shell-sidebar__item--filho { padding-left: 40px; }
.shell-sidebar__item[hidden] { display: none; }

.shell-sidebar__grupo-titulo { flex: 1; }
.shell-sidebar__chevron { transition: transform .25s; font-size: .8rem; }
.shell-sidebar__grupo.aberto > .shell-sidebar__item .shell-sidebar__chevron { transform: rotate(-90deg); }
.shell-sidebar__grupo > ul { list-style: none; margin: 0; padding: 0; display: none; }
.shell-sidebar__grupo.aberto > ul { display: block; }

/* ============================================================================
   CONTEÚDO — padding-top da headerbar; empurrado pela sidebar aberta (>= 576px)
   ============================================================================ */

.shell-main {
  padding-top: var(--header-height);
  transition: margin-left .15s;
  min-height: 100vh;
}
@media (min-width: 576px) {
  .shell-sidebar.active + .shell-main { margin-left: var(--sidebar-width); }
}
.shell-main__container {
  /* .container do Bootstrap */
  width: 100%;
  margin: 0 auto;
  padding: 24px 12px;
}
@media (min-width: 576px)  { .shell-main__container { max-width: 540px; } }
@media (min-width: 768px)  { .shell-main__container { max-width: 720px; } }
@media (min-width: 992px)  { .shell-main__container { max-width: 960px; } }
@media (min-width: 1200px) { .shell-main__container { max-width: 1140px; } }
@media (min-width: 1400px) { .shell-main__container { max-width: 1320px; } }

.shell-main__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  color: var(--text-tertiary);
}

/* As sub-abas dos módulos que já estão no menu lateral somem (no web cada tela é item do menu) */
.mod-camisas__subnav,
.mod-printflow__subnav,
.mod-financeiro-grupo__subnav,
#rhSubnav { display: none !important; }

/* Celular: sidebar ocupa a tela toda por cima do conteúdo, igual ao web */
@media (max-width: 575.98px) {
  .shell-sidebar { width: 100%; }
  .shell-sidebar:not(.active) { margin-left: -100%; }
  .shell-header__logo { margin: auto; }
}

/* ============================================================================
   LOGIN
   ============================================================================ */

body.login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-secondary);
}

.login-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}

.login-card__logo {
  text-align: center;
  margin-bottom: var(--space-6);
}
.login-card__logo-mark {
  color: var(--primary);
  font-size: var(--font-size-2xl);
  font-weight: 700;
}
.login-card__title {
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.form-group {
  margin-bottom: var(--space-4);
}
.form-group label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
}
.form-group input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-primary {
  width: 100%;
  padding: var(--space-3);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============================================================================
   TOAST
   ============================================================================ */

.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.toast {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--gray-800);
  color: white;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s ease;
  min-width: 260px;
  max-width: 400px;
}
.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }
.toast--warning { background: var(--warning); }
.toast--info { background: var(--info); }
@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
