/* ============================================================
   OPERATTA — Sistema de Gestão de Hamburguerias
   CSS Principal · v2.0.0
   Paleta: Cream #F5F0E6 · Burgundy #8B2E3C · Dark #1B1B1E
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;900&display=swap');

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand Colors */
  --primary:        #8B2E3C;
  --primary-dark:   #6A1E2A;
  --primary-light:  #B04556;
  --primary-glow:   rgba(139, 46, 60, 0.18);

  /* Neutrals */
  --dark:           #1B1B1E;
  --dark-2:         #2A2A2E;
  --dark-3:         #3A3A3F;
  --bg:             #F5F0E6;
  --bg-2:           #EDE7D8;
  --surface:        #FFFFFF;
  --surface-2:      #FAF7F2;

  /* Text */
  --text:           #1B1B1E;
  --text-muted:     #6B6370;
  --text-light:     #F5F0E6;

  /* State Colors */
  --success:        #2E7D32;
  --success-light:  #E8F5E9;
  --warning:        #E65100;
  --warning-light:  #FFF3E0;
  --danger:         #C62828;
  --danger-light:   #FFEBEE;
  --info:           #1565C0;
  --info-light:     #E3F2FD;

  /* Order Statuses */
  --status-new:     #1565C0;
  --status-prep:    #E65100;
  --status-ready:   #2E7D32;
  --status-done:    #616161;

  /* Accents */
  --accent:         #264653;
  --gold:           #C89B3C;
  --border:         #DDD4C6;

  /* Sidebar */
  --sidebar-w:      72px;
  --sidebar-w-open: 256px;

  /* Misc */
  --radius:         10px;
  --radius-lg:      16px;
  --shadow-sm:      0 1px 3px rgba(27,27,30,0.08), 0 1px 2px rgba(27,27,30,0.06);
  --shadow:         0 4px 12px rgba(27,27,30,0.12);
  --shadow-lg:      0 8px 30px rgba(27,27,30,0.18);
  --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body.dark-mode {
  --bg:       #111113;
  --bg-2:     #1A1A1D;
  --surface:  #1E1E22;
  --surface-2:#252529;
  --text:     #F0EAE0;
  --text-muted:#9A9298;
  --border:   #333338;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── TYPOGRAPHY ── */
h1, h2, h3 { font-family: 'Playfair Display', serif; line-height: 1.2; }
h4, h5, h6 { font-family: 'Montserrat', sans-serif; font-weight: 700; }
a { text-decoration: none; color: inherit; }

/* ============================================================
   LOGIN PAGE — Split Screen Premium
   ============================================================ */

body.login-body {
  background: var(--dark);
  overflow: hidden;
}

/* ── Shake animation ── */
@keyframes lf-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

@keyframes lf-fadeup {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes brand-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

/* ── Página base ── */
.login-page {
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   PAINEL ESQUERDO — Marca
══════════════════════════════════════════ */
.login-brand {
  position: relative;
  width: 46%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  overflow: hidden;
  background: linear-gradient(160deg, #1a0e11 0%, #2a1018 35%, #1B1B1E 100%);

  /* Entrada */
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1),
              transform 0.8s cubic-bezier(0.4,0,0.2,1);
}

.login-brand.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fundo decorativo do painel */
.login-brand__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 55% at 30% 30%, rgba(139,46,60,0.38) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139,46,60,0.20) 0%, transparent 60%);
  pointer-events: none;
}

/* Textura diagonal sutil */
.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 48px,
    rgba(255,255,255,0.018) 48px,
    rgba(255,255,255,0.018) 49px
  );
  pointer-events: none;
}

/* Linha vertical direita separando painéis */
.login-brand::after {
  content: '';
  position: absolute;
  right: 0; top: 15%; bottom: 15%;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(139,46,60,0.5) 30%,
    rgba(139,46,60,0.5) 70%,
    transparent
  );
}

/* Elementos geométricos decorativos */
.login-brand__deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.login-brand__deco--1 {
  width: 380px; height: 380px;
  top: -120px; right: -140px;
  border: 1px solid rgba(139,46,60,0.18);
}

.login-brand__deco--2 {
  width: 240px; height: 240px;
  bottom: -80px; left: -80px;
  border: 1px solid rgba(139,46,60,0.14);
}

.login-brand__deco--3 {
  width: 140px; height: 140px;
  bottom: 80px; right: 40px;
  background: radial-gradient(circle, rgba(139,46,60,0.12) 0%, transparent 70%);
}

/* Conteúdo do painel esquerdo */
.login-brand__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;        /* centralizado horizontalmente */
  text-align: center;
  gap: 0;
  width: 100%;
  max-width: 340px;
}

/* Espaçamentos internos controlados */
.login-brand__logo   { margin-bottom: 8px; }
.login-brand__text   { margin-bottom: 22px; }
.login-brand__features { margin-bottom: 22px; }

/* Logo */
.login-brand__logo {
  opacity: 0;
  transform: translateY(-20px) scale(0.92);
  transition: opacity 0.9s cubic-bezier(0.34,1.4,0.64,1),
              transform 0.9s cubic-bezier(0.34,1.4,0.64,1);
  /* Halo de luz atrás da logo */
  background: radial-gradient(ellipse 70% 60% at 50% 50%,
    rgba(245,220,200,0.13) 0%,
    rgba(176,69,86,0.10) 50%,
    transparent 80%
  );
  padding: 10px 20px;
  border-radius: 20px;
  align-self: center;
}

.login-brand__logo.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.login-brand__logo img {
  max-width: 200px;
  height: auto;
  display: block;
  filter:
    brightness(1.35)
    contrast(1.05)
    drop-shadow(0 0 28px rgba(255,255,254,1.0))
    drop-shadow(0 0 60px rgba(255,255,254,1.0))
    drop-shadow(0 8px 24px rgba(255,255,254,1.0));
  animation: brand-float 6s ease-in-out infinite;
}

.login-brand__logo-fallback {
  display: none;
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

.login-brand__logo-fallback span { color: var(--primary-light); }

/* Texto da marca */
.login-brand__text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
  text-align: center;
}

.login-brand__text p {
  font-size: 0.87rem;
  color: rgba(245,240,230,0.52);
  line-height: 1.65;
  font-weight: 400;
  max-width: 280px;
  margin: 0 auto;
  text-align: center;
}

/* Features */
.login-brand__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.brand-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(245,240,230,0.72);
  font-size: 0.83rem;
  font-weight: 500;
  text-align: left;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.brand-feature i {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(139,46,60,0.25);
  border: 1px solid rgba(139,46,60,0.4);
  border-radius: 7px;
  color: var(--text-light);
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* Indicador de versão/status */
.login-brand__version {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--text);
  letter-spacing: 0.06em;
  font-weight: 500;
}

.version-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4CAF50;
  box-shadow: 0 0 8px rgba(76,175,80,0.7);
  animation: dot-pulse 2.4s ease-in-out infinite;
}

/* ══════════════════════════════════════════
   PAINEL DIREITO — Formulário
══════════════════════════════════════════ */
.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  background: var(--bg);
  position: relative;
  overflow-y: auto;

  /* Entrada */
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.75s cubic-bezier(0.4,0,0.2,1) 0.1s,
              transform 0.75s cubic-bezier(0.4,0,0.2,1) 0.1s;
}

.login-form-panel.visible {
  opacity: 1;
  transform: translateX(0);
}

.login-form-panel.shake {
  animation: lf-shake 0.45s ease;
}

.login-form-inner {
  width: 100%;
  max-width: 400px;
}

/* Logo mobile (oculto em desktop) */
.login-mobile-header {
  display: none;
  justify-content: center;
  margin-bottom: 32px;
}

.login-mobile-header img {
  max-width: 140px;
  height: auto;
}

/* Cabeçalho do formulário */
.login-form-header {
  margin-bottom: 40px;
}

.login-form-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

.login-form-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: 10px;
}

.login-form-title em {
  font-style: italic;
  color: var(--primary);
}

.login-form-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Grupos de campo ── */
.lf-group {
  margin-bottom: 22px;
}

.lf-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.lf-group label i {
  color: var(--primary);
  font-size: 0.68rem;
}

.lf-group input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.lf-group input::placeholder {
  color: var(--border);
  font-weight: 400;
}

.lf-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,46,60,0.12);
  background: var(--surface);
}

/* Campo senha + botão olho */
.lf-pass-wrap {
  position: relative;
}

.lf-pass-wrap input {
  padding-right: 52px;
}

.lf-eye {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-left: 1.5px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.lf-eye:hover {
  color: var(--primary);
  background: rgba(139,46,60,0.06);
  border-left-color: var(--primary);
}

/* ── Botão de login ── */
.lf-btn {
  position: relative;
  width: 100%;
  height: 52px;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(139,46,60,0.35),
              0 1px 3px rgba(0,0,0,0.12);
}

.lf-btn__text {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Efeito shimmer no hover */
.lf-btn__shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(255,255,255,0.18) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}

.lf-btn:hover .lf-btn__shimmer {
  transform: translateX(100%);
}

.lf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(139,46,60,0.5),
              0 2px 6px rgba(0,0,0,0.14);
}

.lf-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(139,46,60,0.3);
}

.lf-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.lf-btn--success {
  background: linear-gradient(135deg, #2E7D32, #1B5E20) !important;
  box-shadow: 0 4px 20px rgba(46,125,50,0.4) !important;
}

/* ── Mensagem de erro ── */
.lf-error {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(198,40,40,0.08);
  border: 1px solid rgba(198,40,40,0.28);
  border-radius: var(--radius);
  color: #C62828;
  font-size: 0.82rem;
  font-weight: 500;
  animation: lf-fadeup 0.3s ease;
}

.lf-error.show {
  display: flex;
}

.lf-error i {
  flex-shrink: 0;
  color: var(--danger);
}

/* ── Rodapé ── */
.login-form-footer {
  margin-top: 40px;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.login-form-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition);
}

.login-form-footer a:hover { opacity: 0.75; }

/* ══════════════════════════════════════════
   RESPONSIVIDADE LOGIN
══════════════════════════════════════════ */

/* Tablet largo (≤ 1100px) */
@media (max-width: 1100px) {
  .login-brand {
    width: 42%;
    padding: 48px 36px;
  }
  .login-form-panel {
    padding: 48px 36px;
  }
}

/* Tablet (≤ 860px) — layout coluna */
@media (max-width: 860px) {
  body.login-body { overflow-y: auto; }

  .login-page {
    flex-direction: column;
    min-height: 100vh;
  }

  .login-brand {
    width: 100%;
    min-height: auto;
    padding: 36px 32px 32px;
    border-bottom: 1px solid rgba(139,46,60,0.3);
  }

  .login-brand::after { display: none; }

  /* No tablet: empilha verticalmente e centraliza tudo */
  .login-brand__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    max-width: 520px;
    margin: 0 auto;
  }

  .login-brand__logo {
    margin-bottom: 16px;
    padding: 12px 16px;
  }

  .login-brand__logo img {
    max-width: 100px;
    animation: none;
  }

  .login-brand__text  { margin-bottom: 0; }
  .login-brand__text h1 { font-size: 1.25rem; margin-bottom: 4px; }
  .login-brand__text p  { font-size: 0.8rem; display: block; }

  .login-brand__features { display: none; }
  .login-brand__version  { display: none; }

  .login-form-panel {
    flex: none;
    width: 100%;
    padding: 40px 32px 48px;
    transform: none;
  }

  .login-form-inner { max-width: 480px; margin: 0 auto; }
}

/* Mobile (≤ 540px) */
@media (max-width: 540px) {
  .login-brand {
    padding: 24px 20px 20px;
  }

  .login-brand__logo { padding: 10px 12px; margin-bottom: 12px; }
  .login-brand__logo img { max-width: 80px; }

  .login-brand__text h1 { font-size: 1.05rem; margin-bottom: 2px; }
  .login-brand__text p  { font-size: 0.76rem; }

  .login-form-panel { padding: 32px 20px 40px; }
  .login-form-title { font-size: 1.7rem; }

  .lf-group input { height: 46px; font-size: 0.87rem; }
  .lf-btn { height: 48px; font-size: 0.78rem; }
}

/* Mobile pequeno (≤ 380px) */
@media (max-width: 380px) {
  .login-brand__logo img { max-width: 70px; }
  .login-brand__text h1  { font-size: 0.95rem; }
  .login-brand__text p   { display: none; }
  .login-form-title { font-size: 1.5rem; }
  .login-form-header { margin-bottom: 28px; }
  .lf-group { margin-bottom: 16px; }
}

/* ============================================================
   APP LAYOUT (SPA)
   ============================================================ */
.app { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  transition: width var(--transition), transform var(--transition);
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.04);
}

.sidebar:hover,
.sidebar.open { width: var(--sidebar-w-open); }

.sidebar-logo {
  height: 60px;              /* reduzido de 72px */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-logo img {
  height: 32px;              /* reduzido de 38px */
  object-fit: contain;
  transition: all var(--transition);
  flex-shrink: 0;
}

.logo-collapsed { display: block; }
.logo-expanded  { display: none; position: absolute; height: 28px; }

.sidebar:hover .logo-collapsed { display: none; }
.sidebar:hover .logo-expanded  { display: block; position: static; }

.sidebar-nav {
  flex: 1;
  padding: 4px 0;
  overflow: hidden;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ── Botão Caixa ── */
.nav-caixa {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;         /* reduzido */
  margin: 4px 8px;           /* reduzido */
  border-radius: 8px;
  background: rgba(139,46,60,0.14);
  border: 1px solid rgba(139,46,60,0.28);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-caixa:hover {
  background: rgba(139,46,60,0.25);
  border-color: var(--primary);
}

.nav-caixa.caixa-open {
  background: rgba(46,125,50,0.18);
  border-color: rgba(46,125,50,0.4);
}

.nav-caixa.caixa-open:hover {
  background: rgba(46,125,50,0.28);
  border-color: #2E7D32;
}

.nav-caixa__icon {
  width: 28px; height: 28px;   /* reduzido de 32px */
  display: flex; align-items: center; justify-content: center;
  background: var(--primary);
  border-radius: 7px;
  color: #fff;
  font-size: 0.78rem;
  flex-shrink: 0;
  transition: background var(--transition);
}

.nav-caixa.caixa-open .nav-caixa__icon { background: #2E7D32; }

.nav-caixa__info {
  opacity: 0;
  transition: opacity 0.15s;
  display: flex;
  flex-direction: column;
}

.sidebar:hover .nav-caixa__info { opacity: 1; }

.nav-caixa__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.2;
}

.nav-caixa__status {
  font-size: 0.65rem;
  color: rgba(245,240,230,0.45);
  line-height: 1.2;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 22px;           /* reduzido de 10px para 8px */
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  color: rgba(245,240,230,0.55);
  border-left: 3px solid transparent;
  font-size: 0.83rem;
  font-weight: 500;
  position: relative;
  flex-shrink: 0;
}

.nav-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: color var(--transition);
}

.nav-item span { opacity: 0; transition: opacity 0.15s; white-space: nowrap; }
.sidebar:hover .nav-item span { opacity: 1; }

.nav-item:hover {
  background: rgba(139,46,60,0.12);
  color: var(--text-light);
  border-left-color: rgba(139,46,60,0.5);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(139,46,60,0.22), rgba(139,46,60,0.05));
  color: #fff;
  border-left-color: var(--primary);
}

.nav-item.active i { color: var(--primary-light); }

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 2px 0;             /* reduzido de 4px para 2px */
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.sidebar:hover .nav-badge { opacity: 1; }

.sidebar-user {
  padding: 10px 14px;        /* reduzido de 16px para 10px */
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar {
  width: 32px;               /* reduzido de 36px para 32px */
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.user-info { opacity: 0; transition: opacity 0.15s; white-space: nowrap; }
.sidebar:hover .user-info { opacity: 1; }

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.2;
}

.user-role {
  font-size: 0.7rem;
  color: rgba(245,240,230,0.4);
  line-height: 1.2;
}

/* ── MAIN CONTENT ── */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
  background: var(--bg);
}

/* ── TOPBAR ── */
.topbar {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}

body.dark-mode .topbar { background: var(--surface); border-color: var(--border); }

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1;
}

.page-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
  position: relative;
}

.topbar-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.topbar-notif {
  position: absolute;
  top: -3px; right: -3px;
  width: 16px; height: 16px;
  background: var(--primary);
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}

.topbar-clock {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

/* ── PAGE CONTENT ── */
.page-content {
  padding: 28px;
  flex: 1;
}

/* ── SECTIONS ── */
.section { display: none; }
.section.active { display: block; animation: fadeUp 0.3s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SHARED COMPONENTS
   ============================================================ */

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(139,46,60,0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(139,46,60,0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-2);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover { background: var(--bg-2); color: var(--text); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover { background: #9B1B1B; }

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-success:hover { background: #1B5E20; }

.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}

.btn-sm { padding: 6px 12px; font-size: 0.76rem; }
.btn-lg { padding: 13px 24px; font-size: 0.92rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

body.dark-mode .btn-secondary {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

body.dark-mode .card { background: var(--surface); border-color: var(--border); }

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.card-body { padding: 22px; }

/* ── KPI CARDS ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.kpi-icon.red    { background: var(--danger-light); color: var(--danger); }
.kpi-icon.green  { background: var(--success-light); color: var(--success); }
.kpi-icon.orange { background: var(--warning-light); color: var(--warning); }
.kpi-icon.blue   { background: var(--info-light); color: var(--info); }
.kpi-icon.gold   { background: #FFF8E1; color: var(--gold); }
.kpi-icon.purple { background: #F3E5F5; color: #7B1FA2; }

.kpi-info { flex: 1; min-width: 0; }

.kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi-delta {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 4px;
}

.kpi-delta.up   { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

/* ── GRID LAYOUTS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ── TABLES ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  background: var(--bg-2);
  padding: 11px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: rgba(139,46,60,0.04); }

body.dark-mode thead th { background: var(--surface-2); }
body.dark-mode tbody tr:hover { background: rgba(139,46,60,0.08); }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info    { background: var(--info-light);    color: var(--info); }
.badge-gray    { background: #F0EEF0; color: #616161; }
.badge-primary { background: var(--primary-glow);  color: var(--primary); }

body.dark-mode .badge-gray { background: #333338; color: #9A9298; }

/* ── INPUTS (generic, light theme) ── */
.input,
input[type="text"]:not(.login-card *),
input[type="email"]:not(.login-card *),
input[type="number"]:not(.login-card *),
input[type="password"]:not(.login-card *),
input[type="date"]:not(.login-card *),
select:not(.login-card *),
textarea:not(.login-card *) {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}

.input:focus,
input[type="text"]:not(.login-card *):focus,
input[type="email"]:not(.login-card *):focus,
input[type="number"]:not(.login-card *):focus,
input[type="password"]:not(.login-card *):focus,
input[type="date"]:not(.login-card *):focus,
select:not(.login-card *):focus,
textarea:not(.login-card *):focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

body.dark-mode .input,
body.dark-mode input:not(.login-card *),
body.dark-mode select:not(.login-card *),
body.dark-mode textarea:not(.login-card *) {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }
.modal-sm { max-width: 420px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover { background: var(--danger); color: #fff; }

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── TOAST ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--dark);
  color: var(--text-light);
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 380px;
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info    { border-left-color: var(--info); }

.toast i { font-size: 1rem; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.danger  i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info    i { color: var(--info); }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── SEARCH BAR ── */
.search-bar {
  position: relative;
  flex: 1;
  max-width: 340px;
}

.search-bar i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-bar input {
  padding-left: 36px !important;
  width: 100%;
}

/* ── TOOLBAR ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ── FORM GRID ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-group-full { grid-column: 1 / -1; }

.form-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i { font-size: 3rem; opacity: 0.3; margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; }

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 4px;
  width: fit-content;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 7px 18px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
}

.tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp 0.25s ease; }

/* ============================================================
   DASHBOARD
   ============================================================ */

/* ── Barra de alertas — topo do dashboard ── */
.dash-alerts-bar {
  margin-bottom: 20px;
}

.dash-alerts-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 0.83rem;
  font-weight: 500;
  border-left: 3px solid transparent;
}

.alert-item.danger  { background: var(--danger-light);  border-left-color: var(--danger);  }
.alert-item.warning { background: var(--warning-light); border-left-color: var(--warning); }
.alert-item.success { background: var(--success-light); border-left-color: var(--success); }
.alert-item.info    { background: var(--info-light);    border-left-color: var(--info);    }

.alert-item i { font-size: 0.95rem; flex-shrink: 0; }
.alert-item.danger  i { color: var(--danger); }
.alert-item.warning i { color: var(--warning); }
.alert-item.success i { color: var(--success); }
.alert-item.info    i { color: var(--info); }

.alert-text strong { font-weight: 700; }

/* ── KPI Grid ── */
.kpi-grid { margin-bottom: 20px; }

/* ── Rows do dashboard ── */
.dash-row {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.dash-row--main {
  grid-template-columns: 2fr 1fr;
}

.dash-row--three {
  grid-template-columns: repeat(3, 1fr);
}

/* Tabs de período no faturamento */
.dash-period-tabs {
  display: flex;
  gap: 4px;
}

.period-tab {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.period-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.period-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Bottom row ── */
.dashboard-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ── Charts ── */
.chart-wrap {
  position: relative;
  height: 220px;
}

.chart-wrap canvas { max-height: 220px; }

/* Recent orders mini */
.order-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.order-mini:last-child { border-bottom: none; }

.order-mini-num {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--primary);
  min-width: 52px;
}

.order-mini-info { flex: 1; }
.order-mini-name { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.order-mini-items { font-size: 0.72rem; color: var(--text-muted); }
.order-mini-val { font-size: 0.85rem; font-weight: 700; color: var(--text); }

/* ============================================================
   ORDERS (PEDIDOS)
   ============================================================ */
.orders-header-btns { display: flex; gap: 10px; align-items: center; }

/* Kanban */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
  min-height: 500px;
}

.kanban-col {
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

body.dark-mode .kanban-col { background: var(--surface-2); }

.kanban-col.drag-over { box-shadow: 0 0 0 2px var(--primary); }

.kanban-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kanban-title.new    .kanban-dot { background: var(--status-new); }
.kanban-title.prep   .kanban-dot { background: var(--status-prep); }
.kanban-title.ready  .kanban-dot { background: var(--status-ready); }
.kanban-title.done   .kanban-dot { background: var(--status-done); }

.kanban-count {
  background: var(--surface);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.kanban-cards {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-height: 80px;
}

.kanban-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px;
  cursor: grab;
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.kanban-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kanban-card.dragging { opacity: 0.5; cursor: grabbing; }

.kanban-card-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.kanban-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.kanban-card-items {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.kanban-card-time { color: var(--text-muted); }
.kanban-card-value { font-weight: 700; color: var(--text); }

/* Order list */
.order-row-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
}

/* New Order Panel */
.new-order-panel {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

.product-carousel-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.product-thumb {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.product-thumb:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  transform: translateY(-2px);
}

.product-thumb img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.product-thumb .prod-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.product-thumb .prod-price {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
}

/* Cart */
.order-cart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: fit-content;
  position: sticky;
  top: 88px;
}

.cart-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-items {
  max-height: 340px;
  overflow-y: auto;
  padding: 10px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.cart-item:hover { background: var(--bg-2); }

.cart-item-name { flex: 1; font-size: 0.83rem; font-weight: 600; color: var(--text); }
.cart-item-price { font-size: 0.83rem; font-weight: 700; color: var(--text); min-width: 60px; text-align: right; }

.qty-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}

.qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.qty-num {
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: var(--text);
}

.cart-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}

.cart-summary { margin-bottom: 14px; }

.cart-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
  color: var(--text-muted);
  padding: 3px 0;
}

.cart-row.total {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 8px;
}

.cart-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

/* ============================================================
   PRODUCTS (PRODUTOS)
   ============================================================ */
.products-grid-main {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.product-card-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.product-card-main:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.product-card-img {
  height: 160px;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-img img {
  max-height: 140px;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-card-main:hover .product-card-img img { transform: scale(1.05); }

.product-card-body { padding: 14px; }

.product-card-cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.product-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-card-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.product-card-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

.product-card-actions { display: flex; gap: 6px; }

/* ============================================================
   STOCK (ESTOQUE)
   ============================================================ */
.stock-summary { margin-bottom: 24px; }

.stock-alert-strip {
  padding: 10px 16px;
  background: var(--warning-light);
  border: 1px solid rgba(230,81,0,0.2);
  border-radius: var(--radius);
  font-size: 0.83rem;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.stock-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.level-bar {
  width: 60px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.level-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.level-fill.high   { background: var(--success); }
.level-fill.medium { background: var(--warning); }
.level-fill.low    { background: var(--danger); }

/* ============================================================
   FINANCE (FINANCEIRO)
   ============================================================ */
.finance-kpi { margin-bottom: 24px; }

.finance-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.transaction-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
}

.transaction-type.income { color: var(--success); }
.transaction-type.expense { color: var(--danger); }

/* ============================================================
   REPORTS (RELATÓRIOS)
   ============================================================ */
.report-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.report-output { margin-top: 24px; }

/* ============================================================
   ADMIN (ADMINISTRAÇÃO)
   ============================================================ */
.admin-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.71rem;
  font-weight: 700;
}

.role-admin     { background: var(--primary-glow); color: var(--primary); }
.role-gerente   { background: var(--info-light); color: var(--info); }
.role-atendente { background: var(--success-light); color: var(--success); }
.role-caixa     { background: var(--warning-light); color: var(--warning); }

/* ============================================================
   SYSTEM (SISTEMA)
   ============================================================ */
.system-section { margin-bottom: 28px; }

.system-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-section-title i { color: var(--primary); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.toggle-row:last-child { border-bottom: none; }

.toggle-label { font-size: 0.87rem; font-weight: 600; color: var(--text); }
.toggle-desc  { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.support-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
}

.support-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-glow); }

.support-link .fab.fa-whatsapp   { color: #25D366; }
.support-link .fab.fa-telegram   { color: #0088CC; }
.support-link .fab.fa-instagram  { color: #E1306C; }
.support-link .fab.fa-youtube    { color: #FF0000; }

/* ============================================================
   REAL-TIME VIEW
   ============================================================ */
.realtime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.rt-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  padding: 16px 18px;
  animation: fadeUp 0.4s ease;
  position: relative;
}

.rt-card.new   { border-color: var(--status-new); }
.rt-card.prep  { border-color: var(--status-prep); }
.rt-card.ready { border-color: var(--status-ready); box-shadow: 0 0 16px rgba(46,125,50,0.15); }

.rt-number {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 2px;
  font-family: 'Playfair Display', serif;
}

.rt-customer { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.rt-items { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }

.rt-progress { margin-bottom: 12px; }

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

.progress-fill.new   { background: var(--status-new); }
.progress-fill.prep  { background: var(--status-prep); }
.progress-fill.ready { background: var(--status-ready); }

.rt-elapsed {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.rt-elapsed.urgent { color: var(--danger); }

/* ============================================================
   LOGIN — RESPONSIVIDADE COMPLETA
   ============================================================ */

/* Tablets largos (≤ 1024px) */
@media (max-width: 1024px) {
  .login-wrapper {
    max-width: 400px;
    gap: 32px;
  }
  .login-card {
    padding: 44px 40px;
  }
}

/* Tablets (≤ 768px) */
@media (max-width: 768px) {
  .login-page {
    align-items: flex-start;
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .login-wrapper {
    max-width: 100%;
    gap: 28px;
    padding: 16px;
  }
  .login-logo img {
    max-width: 200px;
  }
  .login-card {
    padding: 36px 28px;
  }
  .login-card h1 {
    font-size: 1.75rem;
    margin-bottom: 28px;
  }
}

/* Mobile grande (≤ 480px) */
@media (max-width: 480px) {
  .login-page {
    padding-top: 32px;
    padding-bottom: 32px;
  }
  .login-wrapper {
    gap: 22px;
    padding: 12px;
  }
  .login-logo img {
    max-width: 170px;
  }
  .login-card {
    padding: 28px 20px;
    border-radius: 12px;
  }
  .login-card h2 {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }
  .login-card h1 {
    font-size: 1.55rem;
    margin-bottom: 22px;
  }
  .form-group {
    margin-bottom: 16px;
  }
  .form-group label {
    font-size: 0.68rem;
    margin-bottom: 6px;
  }
  .form-group input {
    padding: 11px 14px 11px 38px;
    font-size: 0.88rem;
  }
  .btn-login {
    padding: 13px;
    font-size: 0.8rem;
  }
  .login-footer {
    font-size: 0.72rem;
  }
}

/* Mobile pequeno (≤ 360px) */
@media (max-width: 360px) {
  .login-logo img {
    max-width: 150px;
  }
  .login-card {
    padding: 24px 16px;
  }
  .login-card h1 {
    font-size: 1.35rem;
  }
  .input-icon-wrap .toggle-pass {
    width: 38px;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Sidebar backdrop (mobile) ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 199;
  backdrop-filter: blur(2px);
}

.sidebar-backdrop.show { display: block; }

/* ── Hamburger (mobile only) ── */
.btn-hamburger {
  display: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-hamburger:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@media (max-width: 768px) {
  /* Sidebar: hidden by default, full-width overlay when open */
  .sidebar {
    transform: translateX(-100%);
    width: 260px !important;
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }

  /* Sidebar expanded labels always visible on mobile */
  .sidebar.open .nav-item span,
  .sidebar.open .nav-caixa__info,
  .sidebar.open .nav-badge,
  .sidebar.open .user-info { opacity: 1; }

  /* Main content: no left margin on mobile */
  .main {
    margin-left: 0 !important;
  }

  /* Topbar: show hamburger */
  .btn-hamburger { display: flex; }

  /* Topbar clock: hide on small screens */
  .topbar-clock { display: none; }

  /* Prevent horizontal overflow */
  body { overflow-x: hidden; }

  .page-content {
    padding: 14px;
    overflow-x: hidden;
  }

  /* Dashboard grids: single column */
  .kpi-grid         { grid-template-columns: repeat(2, 1fr); }
  .dash-row--main   { grid-template-columns: 1fr; }
  .dash-row--three  { grid-template-columns: 1fr; }
  .dashboard-bottom { grid-template-columns: 1fr; }

  /* Charts: limit height on mobile */
  .chart-wrap { height: 200px; }

  /* Tables: horizontal scroll within card */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Cards: no overflow */
  .card { overflow: hidden; }

  /* Alert bar: compact */
  .alert-item { padding: 9px 12px; font-size: 0.79rem; }

  /* Period tabs */
  .dash-period-tabs { gap: 3px; }
  .period-tab { padding: 3px 8px; font-size: 0.68rem; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar   { padding: 0 12px; gap: 8px; }
  .page-title { font-size: 1.2rem; }
}

@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .page-content { padding: 10px; }
}

@media (max-width: 1200px) {
  .dash-row--main   { grid-template-columns: 1fr; }
  .dash-row--three  { grid-template-columns: 1fr 1fr; }
  .dashboard-bottom { grid-template-columns: 1fr 1fr; }
  .kanban-board     { grid-template-columns: repeat(2, 1fr); }
  .new-order-panel  { grid-template-columns: 1fr; }
  .finance-charts   { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid-2           { grid-template-columns: 1fr; }
  .grid-3           { grid-template-columns: 1fr 1fr; }
  .kpi-grid         { grid-template-columns: repeat(2, 1fr); }
  .form-grid        { grid-template-columns: 1fr; }
  .dash-row--three  { grid-template-columns: 1fr; }
  .dashboard-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .kanban-board   { grid-template-columns: 1fr; }
  .grid-3         { grid-template-columns: 1fr; }
  .dash-period-tabs { display: none; }
}

/* ── Utility ── */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm { display: flex; align-items: center; gap: 8px; }
.flex-gap { display: flex; align-items: center; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.font-sm { font-size: 0.8rem; }
.font-xs { font-size: 0.72rem; }
.uppercase { text-transform: uppercase; letter-spacing: 0.08em; }
.separator { height: 1px; background: var(--border); margin: 20px 0; }