/* ==========================================================================
   JACOB´S BARBEARIA — IDENTIDADE VISUAL OFICIAL (SITE & INSTAGRAM)
   Paleta Oficial Extraída de jacobsbarbearia.com.br & @jacobsbarbeariaoficial:
     • Carbono Fosco & Preto Placa: #101010 / #0E0E0E / #1A1A1A / #050505
     • Vermelho Assinatura Jacob´s: #DA312F / #EB3432
     • Âmbar Ouro Jacob´s Club:     #FFAA00 / #FA9E00
     • Detalhe Clássico Barber Pole: #DA312F • #FFFFFF • #1E4D8C
   Tipografia Oficial: 'League Spartan' (Títulos & KPIs) + 'Roboto' (Tabelas & UI)
   ========================================================================== */

:root {
  /* Superfícies em Preto Carbono Puro & Grafite Fosco (sem matiz azulado) */
  --bg-main: #101010;
  --bg-sidebar: #0a0a0a;
  --bg-surface: #141414;
  --bg-card: #191919;
  --bg-card-hover: #222222;
  --bg-input: #0e0e0e;

  --border: #2a2a2a;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-red: rgba(218, 49, 47, 0.48);
  --border-gold: rgba(255, 170, 0, 0.42);

  /* Cores Protagonistas da Marca Jacob´s */
  --jacobs-red: #da312f;
  --jacobs-red-bright: #eb3432;
  --jacobs-red-dark: #a91d1b;
  --jacobs-red-glow: rgba(218, 49, 47, 0.16);

  /* Âmbar Ouro do Clube de Assinatura (--ast-global-color-0: #fa9e00 / #ffaa00) */
  --gold: #ffaa00;
  --gold-light: #ffbb33;
  --gold-dark: #c77d00;
  --gold-glow: rgba(255, 170, 0, 0.14);

  /* Filete Clássico Barber Pole (Toldos & Fachadas Jacob´s) */
  --barber-stripe: repeating-linear-gradient(
    -45deg,
    #da312f 0px,
    #da312f 14px,
    #f5f5f5 14px,
    #f5f5f5 22px,
    #1e4d8c 22px,
    #1e4d8c 36px,
    #f5f5f5 36px,
    #f5f5f5 44px
  );

  /* Tipografia & Textos (--ast-global-color-2: #ffffff / --ast-global-color-3: #dee3e1) */
  --font-display: 'League Spartan', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-primary: #ffffff;
  --text-secondary: #b5bab8;
  --text-muted: #767c7a;

  /* Semântica Financeira */
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.14);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.14);
  --yellow: #ffaa00;
  --yellow-bg: rgba(255, 170, 0, 0.15);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.14);

  --sidebar-open-w: 268px;
  --sidebar-rail-w: 76px;

  --radius-sm: 7px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 88% 0%, rgba(218, 49, 47, 0.08), transparent 38%),
    radial-gradient(circle at 12% 100%, rgba(255, 170, 0, 0.05), transparent 40%),
    var(--bg-main);
  color: var(--text-primary);
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mobile-only {
  display: none !important;
}

/* ==================== TELA DE LOGIN (ESTILO PLACA JACOB'S BARBERCLUB) ==================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 20%, rgba(218, 49, 47, 0.16), transparent 52%),
    radial-gradient(circle at 50% 85%, rgba(255, 170, 0, 0.08), transparent 48%),
    #0b0b0b;
}

.login-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 435px;
  background: var(--bg-surface);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius-lg);
  padding: 38px 32px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* Filete Superior Barber Pole Oficial */
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--barber-stripe);
}

.login-header {
  text-align: center;
  margin-bottom: 26px;
}

/* Moldura inspirada na placa física preta com borda branca das unidades Jacob's */
.login-logo-showcase {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 26px;
  border-radius: 10px;
  background: #040404;
  border: 2px solid rgba(255, 255, 255, 0.86);
  outline: 4px solid #040404;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 24px rgba(218, 49, 47, 0.14);
}

.login-logo-img {
  width: 186px;
  max-width: 100%;
  height: auto;
  display: block;
}

.login-header h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  margin-top: 18px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.86rem;
  margin-top: 4px;
}

/* ==================== APP SHELL: SIDEBAR + FULL-WIDTH WORKSPACE ==================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(3px);
  z-index: 75;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

/* -------------------- SIDEBAR (MENU LATERAL) -------------------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-open-w);
  background: linear-gradient(180deg, #0d0d0d 0%, var(--bg-sidebar) 100%);
  border-right: 1px solid var(--border);
  z-index: 80;
  display: flex;
  flex-direction: column;
  transition: width 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Filete Barber Pole discreto no topo da Sidebar */
.sidebar::before {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  flex-shrink: 0;
  background: var(--barber-stripe);
}

.sidebar-top {
  padding: 15px 14px 13px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
}

/* Miniatura da placa preta/branca oficial Jacob's Barberclub */
.sidebar-logo-badge {
  width: 54px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #040404;
  border: 1.5px solid rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
}

.sidebar-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sidebar-brand-copy {
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-brand-title {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.1;
}

.sidebar-brand-sub {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jacobs-red-bright);
  margin-top: 3px;
}

/* Segmented Toggle: Manter aberto vs Auto-retrair */
.sidebar-mode-toggle {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  background: #050505;
  border: 1px solid #242424;
  border-radius: 8px;
}

.mode-seg-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.mode-seg-btn:hover {
  color: var(--text-primary);
}

.mode-seg-btn.active {
  background: var(--jacobs-red-glow);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px var(--border-red);
}

.mode-seg-btn.active svg {
  color: var(--jacobs-red-bright);
}

.rail-pin-hint {
  display: none;
  margin: 10px auto 0;
  width: 38px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #121212;
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.rail-pin-hint:hover {
  border-color: var(--jacobs-red-bright);
  color: #ffffff;
}

.sidebar-section-caption {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  padding: 15px 18px 6px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Lista de Itens do Menu Lateral */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 10px 14px;
}

.nav-tab {
  position: relative;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text-secondary);
  padding: 10px 12px;
  font-size: 0.87rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.045);
}

.nav-tab.active {
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(90deg, rgba(218, 49, 47, 0.22), rgba(218, 49, 47, 0.04));
  border-color: rgba(218, 49, 47, 0.4);
  box-shadow: inset 3px 0 0 var(--jacobs-red-bright);
}

.nav-tab.active .nav-tab-icon {
  color: var(--jacobs-red-bright);
}

.nav-tab-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: color 0.16s ease;
}

.nav-tab-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-badge {
  background: var(--gold);
  color: #0a0a0a;
  border-radius: 99px;
  padding: 1px 7px;
  font-size: 0.71rem;
  font-weight: 800;
  line-height: 1.35;
}

/* Rodapé do Menu Lateral (Usuário & Sair) */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-subtle);
  background: #070707;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #131313;
  border: 1px solid #262626;
  border-radius: 10px;
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(218, 49, 47, 0.15);
  border: 1px solid var(--border-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar-user-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.69rem;
  color: var(--gold);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-pwd-btn {
  background: #1c1c1c;
  border: 1px solid #333333;
  color: var(--gold-light);
  border-radius: 7px;
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.sidebar-pwd-btn:hover {
  background: rgba(255, 170, 0, 0.18);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.sidebar-logout-btn {
  background: #1c1c1c;
  border: 1px solid #333333;
  color: #e5e7eb;
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.sidebar-logout-btn:hover {
  background: var(--jacobs-red);
  border-color: var(--jacobs-red-bright);
  color: #ffffff;
}

/* -------------------- ESTADOS DO SIDEBAR NO DESKTOP (> 960px) -------------------- */
@media (min-width: 961px) {
  .app-layout.sidebar-pinned .workspace-main {
    margin-left: var(--sidebar-open-w);
    width: calc(100% - var(--sidebar-open-w));
  }

  .app-layout.sidebar-auto .workspace-main {
    margin-left: var(--sidebar-rail-w);
    width: calc(100% - var(--sidebar-rail-w));
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) {
    width: var(--sidebar-rail-w);
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-top {
    padding: 14px 10px 12px;
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-brand-row {
    justify-content: center;
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-logo-badge {
    width: 50px;
    height: 40px;
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-brand-copy,
  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-mode-toggle,
  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-section-caption,
  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .nav-tab-label,
  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-user-meta,
  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-user-avatar,
  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-pwd-btn,
  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .logout-lbl {
    display: none !important;
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .rail-pin-hint {
    display: flex;
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-nav {
    padding: 10px 10px;
    align-items: center;
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .nav-tab {
    justify-content: center;
    padding: 11px 0;
    width: 50px;
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .tab-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 0 5px;
    font-size: 0.64rem;
    min-width: 16px;
    text-align: center;
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-footer {
    padding: 10px 8px;
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-user-card {
    justify-content: center;
    padding: 6px;
    background: transparent;
    border-color: transparent;
  }

  .app-layout.sidebar-auto .sidebar:not(.hover-expanded) .sidebar-logout-btn {
    width: 44px;
    height: 38px;
    justify-content: center;
    padding: 0;
  }

  .app-layout.sidebar-auto .sidebar.hover-expanded {
    width: var(--sidebar-open-w);
    box-shadow: 20px 0 54px rgba(0, 0, 0, 0.88);
    border-right-color: var(--border-red);
  }
}

/* ==================== WORKSPACE PRINCIPAL (100% FLUIDO) ==================== */
.workspace-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sim-banner {
  background: linear-gradient(90deg, #8b1a18, var(--jacobs-red));
  color: #fff;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* -------------------- BARRA SUPERIOR REDESENHADA (COMPETÊNCIA / SYNC / EXCEL) -------------------- */
.workspace-header {
  position: sticky;
  top: 0;
  z-index: 45;
  background: rgba(16, 16, 16, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 12px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.workspace-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.workspace-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.workspace-module-title {
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.1;
  padding-top: 2px;
}

.workspace-period-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #181818;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Cápsula Integrada de Competência */
.competencia-capsule {
  display: inline-flex;
  align-items: center;
  background: #161616;
  border: 1px solid #2f2f2f;
  border-radius: 8px;
  padding: 3px 6px 3px 11px;
  gap: 8px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.competencia-capsule:hover,
.competencia-capsule:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 170, 0, 0.14);
}

.comp-capsule-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  padding-right: 8px;
  border-right: 1px solid #2e2e2e;
  white-space: nowrap;
}

.competencia-capsule select {
  background: transparent !important;
  border: none !important;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.83rem;
  padding: 6px 6px;
  min-width: 205px;
  width: auto;
  cursor: pointer;
}

.competencia-capsule select option {
  background: #161616;
  color: var(--text-primary);
}

.cidade-capsule select {
  min-width: 155px;
}

.workspace-city-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(255, 170, 0, 0.1);
  border: 1px solid var(--border-gold);
  padding: 7px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Botões Operacionais Redesenhados no Padrão CTAs Jacob's (#DA312F) */
.toolbar-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.toolbar-btn-sync {
  background: linear-gradient(135deg, var(--jacobs-red-bright), var(--jacobs-red));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(218, 49, 47, 0.32);
}

.toolbar-btn-sync:hover {
  background: #000000;
  border-color: var(--jacobs-red-bright);
  color: #ffffff;
  transform: translateY(-1px);
}

.toolbar-btn-excel {
  background: #171717;
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #4ade80;
}

.toolbar-btn-excel:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: #4ade80;
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==================== ÁREA DE CONTEÚDO (APROVEITAMENTO TOTAL DE TELA) ==================== */
.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px 26px 36px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 17px 19px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s ease;
}

.kpi-card:hover {
  border-color: #3a3a3a;
}

/* Card Protagonista no Padrão Clube Premium (#FFAA00) + Detalhe Jacob's */
.kpi-card.gold-highlight {
  border-color: var(--border-gold);
  background: linear-gradient(150deg, rgba(255, 170, 0, 0.13), var(--bg-card) 66%);
  box-shadow: inset 0 2px 0 var(--gold);
}

.kpi-label {
  font-family: var(--font-display);
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 700;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.72rem;
  font-weight: 800;
  margin-top: 7px;
  letter-spacing: -0.015em;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.kpi-value.gold { color: var(--gold); }
.kpi-value.green { color: #4ade80; }
.kpi-value.red { color: #f87171; }
.kpi-value.yellow { color: var(--gold); }

.kpi-sub {
  font-size: 0.77rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ==================== CARDS & SEÇÕES (BORDER-RADIUS 14px DO SITE) ==================== */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Títulos de Unidade com destaque Vermelho Jacob's igual à página de Londrina */
.unit-title-accent {
  color: var(--jacobs-red-bright);
}

.panel-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

/* ==================== MOBILE & TABLET (<= 960px — MENU SEMPRE AUTO-RETRAÍDO) ==================== */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .workspace-main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .sidebar {
    width: 282px;
    max-width: 86vw;
    transform: translateX(-105%);
    box-shadow: none;
  }

  .app-layout.mobile-menu-open .sidebar {
    transform: translateX(0);
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.9);
  }

  .app-layout.mobile-menu-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-close-mobile {
    background: #1a1a1a;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 7px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
  }

  .mobile-hamburger {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #171717;
    border: 1px solid var(--border);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }

  .mobile-header-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
  }

  .workspace-header {
    padding: 10px 14px;
    gap: 10px;
  }

  .container {
    padding: 14px 14px 28px;
  }
}

@media (max-width: 760px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-value { font-size: 1.38rem; }
  .workspace-period-pill { display: none; }
  .workspace-toolbar {
    width: 100%;
    justify-content: space-between;
  }
  .competencia-capsule {
    flex: 1;
    min-width: 0;
  }
  .competencia-capsule select {
    min-width: 0;
    width: 100%;
  }
  .comp-capsule-tag span {
    display: none;
  }
  .comp-capsule-tag {
    padding-right: 6px;
  }
  .toolbar-btn .btn-label-txt {
    display: none;
  }
  .toolbar-btn {
    padding: 0 11px;
  }
}

@media (max-width: 430px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ==================== FORMS, INPUTS & BUTTONS (ESTILO SITE JACOB'S) ==================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-grid.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field.field-span-2 {
  grid-column: span 2;
}

@media (max-width: 960px) {
  .form-grid.form-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .form-grid.form-grid-3 {
    grid-template-columns: 1fr;
  }
  .field.field-span-2 {
    grid-column: span 1;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
select,
textarea {
  background: var(--bg-input);
  border: 1px solid #2d2d2d;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--jacobs-red-bright);
  box-shadow: 0 0 0 2px rgba(218, 49, 47, 0.16);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  font-family: var(--font-body);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Botão Principal no Padrão Vermelho Jacob's (#DA312F -> Hover Preto #000000 c/ borda vermelha, igual ao site!) */
.btn-gold {
  background: linear-gradient(135deg, var(--jacobs-red-bright), var(--jacobs-red));
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(218, 49, 47, 0.28);
}

.btn-gold:hover:not(:disabled) {
  background: #000000;
  border-color: var(--jacobs-red-bright);
  color: #ffffff;
}

.btn-outline {
  background: #121212;
  border-color: #303030;
  color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
  background: #000000;
  border-color: var(--jacobs-red-bright);
  color: #ffffff;
}

.btn-green {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.42);
  color: #4ade80;
}

.btn-green:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.26);
  color: #ffffff;
}

.btn-red {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-red:hover:not(:disabled) {
  background: var(--jacobs-red);
  color: #ffffff;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 0.77rem;
}

/* ==================== FILTER PILLS (UNIDADES LONDRINA) ==================== */
.pill-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  background: #111111;
  border: 1px solid #2d2d2d;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.16s ease;
}

.pill:hover {
  border-color: var(--jacobs-red-bright);
  color: #ffffff;
}

.pill.active {
  background: var(--jacobs-red);
  border-color: var(--jacobs-red-bright);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(218, 49, 47, 0.35);
}

/* ==================== TABLES (CARBONO FOSCO & TABULAR NUMS) ==================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #141414;
}

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

thead th {
  background: #0d0d0d;
  color: #9fa6a3;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid #2b2b2b;
  white-space: nowrap;
}

tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid #222222;
  vertical-align: middle;
}

tbody tr:hover {
  background: var(--bg-card-hover);
}

tfoot td {
  background: rgba(255, 170, 0, 0.08);
  font-weight: 700;
  padding: 13px 15px;
  border-top: 1px solid var(--border-gold);
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.center {
  text-align: center;
}

.clickable-name {
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.clickable-name:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* ==================== BADGES & ALERTS ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-green { background: var(--green-bg); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.34); }
.badge-red { background: var(--red-bg); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.38); }
.badge-yellow { background: var(--yellow-bg); color: var(--gold-light); border: 1px solid rgba(255, 170, 0, 0.38); }
.badge-gold { background: var(--gold-glow); color: var(--gold); border: 1px solid var(--border-gold); }
.badge-blue { background: var(--blue-bg); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.34); }
.badge-muted { background: #242424; color: #d1d5db; border: 1px solid #333333; }

/* Categorias do Plano de Carreira: Ouro (44%), Prata (42%), Bronze (40%) & Acordo */
.badge-tier-ouro {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.22), rgba(250, 158, 0, 0.1));
  color: #ffbe3d;
  border: 1px solid rgba(255, 170, 0, 0.48);
}

.badge-tier-prata {
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.18), rgba(148, 163, 184, 0.08));
  color: #e2e8f0;
  border: 1px solid rgba(203, 213, 225, 0.42);
}

.badge-tier-bronze {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.24), rgba(160, 90, 35, 0.12));
  color: #f4b17a;
  border: 1px solid rgba(205, 127, 50, 0.48);
}

.badge-acordo {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.42);
}

/* Matriz de Rastreabilidade Histórica Mês a Mês */
.career-matrix-table th.col-active-comp {
  background: rgba(255, 170, 0, 0.14);
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

.career-matrix-table td.col-active-comp {
  background: rgba(255, 170, 0, 0.04);
}

.career-matrix-table th.col-next-comp {
  background: rgba(218, 49, 47, 0.16);
  color: #ffffff;
  border-bottom-color: var(--jacobs-red-bright);
}

.career-matrix-table td.col-next-comp {
  background: rgba(218, 49, 47, 0.05);
}

.cm-cell-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 112px;
}

.cm-sub {
  font-size: 0.7rem;
  color: #9fa6a3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cm-acordo-motivo {
  font-size: 0.67rem;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 2px 6px;
  border-radius: 5px;
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.cm-revisao-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #facc15;
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.35);
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

/* ==================== INSIGHT CARDS (SIMÉTRICOS & EXPANSÍVEIS) ==================== */
.insight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.insight-list.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-list.cols-1 {
  grid-template-columns: 1fr;
}

.insight-list.some-expanded {
  align-items: start;
}

@media (max-width: 1160px) {
  .insight-list.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .insight-list,
  .insight-list.cols-3,
  .insight-list.cols-2 {
    grid-template-columns: 1fr;
  }
}

.insight-card {
  background: linear-gradient(165deg, #161616 0%, #111111 100%);
  border: 1px solid #2b2b2b;
  border-left: 4px solid var(--jacobs-red-bright);
  border-radius: 12px;
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 178px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.16s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.insight-card:hover {
  border-top-color: #424242;
  border-right-color: #424242;
  border-bottom-color: #424242;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.insight-card.expanded {
  background: linear-gradient(165deg, #191919 0%, #121212 100%);
  border-top-color: #484848;
  border-right-color: #484848;
  border-bottom-color: #484848;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

.insight-card.positivo { border-left-color: var(--green); }
.insight-card.alerta { border-left-color: var(--jacobs-red-bright); }
.insight-card.info { border-left-color: var(--gold); }

.insight-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.insight-cat {
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fca5a5;
  font-weight: 700;
}

.insight-card.positivo .insight-cat { color: #4ade80; }
.insight-card.info .insight-cat { color: var(--gold-light); }

.insight-selo {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: rgba(235, 52, 50, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(235, 52, 50, 0.35);
}

.insight-card.positivo .insight-selo {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.34);
}

.insight-card.info .insight-selo {
  background: rgba(255, 170, 0, 0.14);
  color: var(--gold-light);
  border-color: rgba(255, 170, 0, 0.34);
}

.insight-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.24;
  color: #ffffff;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.insight-summary {
  font-size: 0.94rem;
  color: #e4e7e6;
  line-height: 1.56;
  margin: 0;
}

.nobr {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.insight-details-box {
  display: none;
}

.insight-card.expanded .insight-details-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #292929;
  animation: insightSlideDown 0.18s ease-out;
}

@keyframes insightSlideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.insight-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0c0c0c;
  border: 1px solid #232323;
  border-radius: 8px;
  padding: 9px 12px;
}

.insight-detail-left {
  min-width: 0;
  flex: 1;
}

.insight-detail-lbl {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f3f4f6;
  line-height: 1.3;
}

.insight-detail-sub {
  font-size: 0.77rem;
  color: #9fa6a3;
  line-height: 1.38;
  margin-top: 2px;
}

.insight-detail-val {
  font-size: 0.87rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
  color: #f3f4f6;
}

.insight-detail-val.tom-positivo { color: #4ade80; }
.insight-detail-val.tom-alerta { color: #fca5a5; }
.insight-detail-val.tom-info { color: var(--gold-light); }
.insight-detail-val.tom-neutro { color: #e5e7eb; }

@media (max-width: 520px) {
  .insight-detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .insight-detail-val {
    text-align: left;
  }
}

.insight-footer-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #262626;
  font-size: 0.79rem;
  font-weight: 600;
  color: #9fa6a3;
  transition: color 0.15s ease;
}

.insight-card:hover .insight-footer-toggle,
.insight-card.expanded .insight-footer-toggle {
  color: var(--gold-light);
}

.insight-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  background: #1d1d1d;
  border: 1px solid #303030;
  font-size: 0.72rem;
  transition: transform 0.2s ease, background 0.15s ease, border-color 0.15s ease;
}

.insight-card.expanded .insight-chevron {
  transform: rotate(180deg);
  background: rgba(255, 170, 0, 0.15);
  border-color: rgba(255, 170, 0, 0.45);
  color: var(--gold-light);
}

/* ==================== PROGRESS BARS & COMPACT LINE CHART ==================== */
.progress-track {
  width: 100%;
  height: 8px;
  background: #0c0c0c;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid #2b2b2b;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--jacobs-red), var(--gold));
  border-radius: 99px;
  transition: width 0.3s ease;
}

.progress-fill.green {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}

.line-chart-panel {
  padding: 16px 20px 14px;
}

.line-chart-panel .panel-header {
  margin-bottom: 10px;
}

.line-chart-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.line-chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.76rem;
  color: #a3aba8;
  background: #111111;
  border: 1px solid #262626;
  padding: 5px 11px;
  border-radius: 99px;
}

.lc-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.lc-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  display: inline-block;
}

.lc-dot.up { background: #4ade80; }
.lc-dot.down { background: var(--jacobs-red-bright); }
.lc-dot.api { background: var(--gold); box-shadow: 0 0 0 2px rgba(255, 170, 0, 0.25); }

.line-chart-readout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0d0d0d;
  border: 1px solid #2f2f2f;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: #f3f4f6;
}

.line-chart-wrap {
  width: 100%;
  overflow-x: auto;
  padding-top: 2px;
}

.line-chart-svg {
  width: 100%;
  min-width: 720px;
  height: 152px;
  display: block;
}

.lc-node-group {
  transition: opacity 0.15s ease;
}

.lc-node-group.clickable {
  cursor: pointer;
}

.lc-node-group:hover .lc-point-ring {
  r: 8.5px;
  opacity: 0.35;
}

.lc-node-group:hover .lc-val-lbl {
  fill: #ffffff;
  font-weight: 800;
}

.bar-chart-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 205px;
  padding: 24px 6px 4px;
  overflow-x: auto;
}

.bar-col {
  flex: 1;
  min-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.bar-val {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
  white-space: nowrap;
}

.bar-stick {
  width: 100%;
  max-width: 42px;
  background: linear-gradient(180deg, var(--jacobs-red-bright), #881715);
  border-radius: 6px 6px 2px 2px;
  min-height: 4px;
  transition: all 0.2s;
}

.bar-stick.api-live {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
}

.bar-stick.selected {
  box-shadow: 0 0 0 2px #ffffff, 0 0 16px rgba(218, 49, 47, 0.65);
}

.bar-lbl {
  font-size: 0.71rem;
  color: var(--text-secondary);
  margin-top: 6px;
  white-space: nowrap;
}

/* ==================== MODAL & TOAST ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  position: relative;
  overflow-x: hidden;
  background: var(--bg-surface);
  border: 1px solid #333333;
  border-top: 3px solid var(--jacobs-red-bright);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow);
}

.toast-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 130;
  background: #141414;
  border: 1px solid var(--border);
  border-left: 4px solid var(--jacobs-red-bright);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 0.86rem;
  display: none;
  max-width: 390px;
}

.toast-box.show {
  display: block;
}

/* ==================== STATUS DE PAGAMENTO & CHAVE PIX ==================== */
.pix-cell-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.pix-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.76rem;
  max-width: 210px;
}

.pix-type-tag {
  background: rgba(255, 170, 0, 0.16);
  color: var(--gold-light);
  border: 1px solid rgba(255, 170, 0, 0.3);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.pix-value-txt {
  color: #e5e7eb;
  font-family: monospace, var(--font-body);
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pix-actions-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-pix-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 170, 0, 0.1);
  color: var(--gold-light);
  border: 1px solid rgba(255, 170, 0, 0.32);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-pix-copy:hover {
  background: var(--gold);
  color: #0d0d0d;
  border-color: var(--gold);
}

.btn-pix-copy.copied {
  background: #15803d;
  color: #ffffff;
  border-color: #22c55e;
}

.btn-pix-edit {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 0.72rem;
  cursor: pointer;
}

.btn-pix-edit:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-pix-cadastrar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.73rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-pix-cadastrar:hover {
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(255, 170, 0, 0.08);
}

/* Badges de Status de Pagamento (interativos para admin) */
.badge-status-pago {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.42);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.badge-status-pago:hover {
  background: rgba(34, 197, 94, 0.26);
  border-color: #4ade80;
}

.badge-status-pendente {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.38);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.badge-status-pendente:hover {
  background: rgba(234, 179, 8, 0.24);
  border-color: #facc15;
}

.badge-status-sub {
  font-size: 0.65rem;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

/* Barra de Progresso de Pagamentos da Folha */
.payment-progress-panel {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(30, 30, 30, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 14px;
}

.payment-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.payment-progress-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.payment-progress-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.payment-progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.payment-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #22c55e);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.payment-filter-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.portal-payment-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.portal-payment-banner.pago {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.42);
}

.portal-payment-banner.pendente {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.16), rgba(202, 138, 4, 0.08));
  border: 1px solid rgba(234, 179, 8, 0.38);
}

.portal-pix-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

/* ==================== VALIDAÇÃO DE INPUTS & CHAVE PIX ==================== */
.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28) !important;
}

.pix-error-msg {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.38);
  border-radius: 6px;
  padding: 7px 11px;
  font-size: 0.79rem;
  color: #fca5a5;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}

.pix-helper-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==================== AJUSTE DA TABELA QUANDO MENU LATERAL ESTÁ FIXADO ==================== */
/* Quando fixado (sidebar-pinned), ajusta paddings e fontes para caber 100% sem scrollbar horizontal. */
/* Ao desfixar (sidebar-auto), retorna ao tamanho original espaçoso automaticamente. */
@media (min-width: 961px) {
  .app-layout.sidebar-pinned .container {
    padding: 16px 14px 32px;
  }

  .app-layout.sidebar-pinned thead th {
    padding: 10px 6px;
    font-size: 0.71rem;
    letter-spacing: 0.02em;
  }

  .app-layout.sidebar-pinned tbody td {
    padding: 8px 6px;
    font-size: 0.81rem;
  }

  .app-layout.sidebar-pinned tfoot td {
    padding: 10px 6px;
    font-size: 0.82rem;
  }

  .app-layout.sidebar-pinned .num {
    font-size: 0.81rem;
  }

  .app-layout.sidebar-pinned .badge-status-pago,
  .app-layout.sidebar-pinned .badge-status-pendente {
    padding: 3px 6px;
    font-size: 0.69rem;
  }

  .app-layout.sidebar-pinned .badge-status-sub {
    font-size: 0.61rem;
  }

  .app-layout.sidebar-pinned .pix-cell-box {
    max-width: 140px;
  }

  .app-layout.sidebar-pinned .pix-pill {
    padding: 2px 5px;
    font-size: 0.69rem;
    max-width: 135px;
  }

  .app-layout.sidebar-pinned .pix-type-tag {
    font-size: 0.6rem;
    padding: 1px 3px;
  }

  .app-layout.sidebar-pinned .pix-value-txt {
    font-size: 0.68rem;
  }

  .app-layout.sidebar-pinned .btn-pix-copy {
    padding: 1px 5px;
    font-size: 0.66rem;
  }

  .app-layout.sidebar-pinned .btn-pix-edit {
    padding: 1px 4px;
    font-size: 0.66rem;
  }

  .app-layout.sidebar-pinned .btn-pix-cadastrar {
    padding: 2px 6px;
    font-size: 0.68rem;
  }

  .app-layout.sidebar-pinned .btn-sm {
    padding: 3px 7px;
    font-size: 0.72rem;
  }
}

.hidden {
  display: none !important;
}

/* ==================== LOADING & PROGRESSO SINCRONIZAÇÃO (CARBON MATTE) ==================== */
.sync-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.sync-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.35);
  color: var(--gold-light);
  font-family: 'League Spartan', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sync-live-pill.done {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.sync-live-pill.error {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.sync-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: jacobsPulseDot 1.2s ease-in-out infinite;
}

.sync-live-pill.done .sync-live-dot,
.sync-live-pill.error .sync-live-dot {
  animation: none;
}

@keyframes jacobsPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.72); }
}

.sync-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.sync-headline {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px;
}

.sync-submsg {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  min-height: 22px;
}

.sync-pct-box {
  text-align: right;
  min-width: 92px;
}

.sync-pct-value {
  font-family: 'League Spartan', sans-serif;
  font-size: 2.15rem;
  font-weight: 900;
  line-height: 1;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}

.sync-elapsed {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.sync-progress-track {
  position: relative;
  height: 12px;
  margin-top: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.sync-progress-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--jacobs-red-bright) 0%, var(--gold) 100%);
  transition: width 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.sync-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 100%
  );
  animation: jacobsBarShimmer 1.5s linear infinite;
}

.sync-progress-fill.done {
  background: linear-gradient(90deg, #16a34a 0%, #4ade80 100%);
}

.sync-progress-fill.done::after {
  animation: none;
  opacity: 0;
}

@keyframes jacobsBarShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.sync-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.sync-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #121212;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.sync-step-item.active {
  background: rgba(255, 170, 0, 0.08);
  border-color: rgba(255, 170, 0, 0.42);
  color: var(--text-primary);
}

.sync-step-item.done {
  background: rgba(34, 197, 94, 0.09);
  border-color: rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.sync-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  font-size: 0.8rem;
}

.sync-spinner-mini {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 170, 0, 0.28);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: jacobsSpin 0.8s linear infinite;
}

@keyframes jacobsSpin {
  to { transform: rotate(360deg); }
}

.sync-foot-hint {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #121212;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

/* ==================== MULTI-CIDADE, REGRAS & ACESSOS ==================== */
.city-sync-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.city-sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #151515;
  color: var(--text-muted);
}

.city-sync-chip.synced {
  background: rgba(34, 197, 94, 0.11);
  border-color: rgba(34, 197, 94, 0.36);
  color: #4ade80;
}

.city-sync-chip.pending {
  background: rgba(255, 170, 0, 0.08);
  border-color: rgba(255, 170, 0, 0.28);
  color: var(--gold-light);
}

.acessos-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #141414;
  border: 1px solid var(--border);
  border-radius: 9px;
}

.btn-copy-access {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.btn-copy-access:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.26);
  color: #ffffff;
}

.career-goals-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.career-goal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.career-goal-box.prata {
  border-top: 3px solid #cbd5e1;
}

.career-goal-box.ouro {
  border-top: 3px solid var(--gold);
}

/* Ícones SVG padrão Jacob's (substituindo emojis) */
.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.ui-icon-inline {
  margin-right: 5px;
}

.rank-medal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'League Spartan', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.rank-medal.gold { color: #ffaa00; }
.rank-medal.silver { color: #cbd5e1; }
.rank-medal.bronze { color: #d97706; }

/* Controle inline de Bônus Club Manual na Folha */
.club-bonus-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.club-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}

.club-step-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: none;
  width: 24px;
  height: 26px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.club-step-btn:hover {
  background: rgba(255, 170, 0, 0.18);
  color: var(--gold-light);
}

.club-qty-input {
  width: 42px !important;
  min-width: 42px;
  height: 26px !important;
  padding: 2px 4px !important;
  border: none !important;
  border-left: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--text-primary);
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  -moz-appearance: textfield;
}

.club-qty-input::-webkit-outer-spin-button,
.club-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.club-bonus-sub {
  font-size: 0.69rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.club-bonus-sub:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-light);
}

.club-bonus-sub.has-bonus {
  color: #4ade80;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.1);
}

.club-obs-dot {
  color: var(--gold);
  font-size: 0.9rem;
  line-height: 1;
}
