/* ============================================================
   Tyket — Design System v3
   Gestão de tickets e protocolos de atendimentos
   Marca Tyket · serviço da Noah Participações e Tecnologia Ltda
   Base AdminLTE 4 (flat, sem border-radius) + Bootstrap 5
   ============================================================ */

/* Google Fonts — Montserrat (ExtraBold 800 / Regular 400) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* ── Variáveis ─────────────────────────────────────────────── */
:root {
  /* Tyket brand — paleta oficial */
  --nt-blue-1:     #1A3AF0;   /* azul base do gradiente */
  --nt-blue-2:     #254BF4;   /* azul primário (ações) */
  --nt-purple:     #5C3AE5;   /* violeta do gradiente */
  --nt-dark:       #09172B;   /* navy profundo — sidebar, texto */
  --nt-dark-2:     #0F2240;   /* navy hover */
  --nt-slate:      #57616F;   /* cinza-azulado — texto secundário */
  --nt-gradient:   linear-gradient(135deg, #1A3AF0 0%, #5C3AE5 100%);

  /* Compat: tokens legados remapeados para a paleta Tyket */
  --nt-cyan:       var(--nt-blue-2);
  --nt-cyan-dark:  var(--nt-blue-1);
  --nt-gold:       var(--nt-purple);   /* antigos acentos gold viram violeta */
  --nt-gold-dark:  #4930B8;
  --nt-gold-soft:  rgba(92,58,229,.08);
  --nt-orange:     #F39C12;

  /* Tenant accent — personalizável pelo cliente (systems.color_hex sobrepõe) */
  --nt-primary:       var(--nt-blue-2);
  --nt-primary-hover: var(--nt-blue-1);

  /* Compat: código legado usa --nt-blue/--nt-navy */
  --nt-blue:       var(--nt-primary);
  --nt-blue-light: var(--nt-primary-hover);
  --nt-navy:       var(--nt-dark);
  --nt-navy-light: var(--nt-dark-2);

  /* AdminLTE palette (status) */
  --nt-green:  #00a65a;
  --nt-yellow: #f39c12;
  --nt-red:    #dd4b39;
  --nt-info:   var(--nt-blue-2);
  --nt-gray:   #d2d6de;

  /* UI */
  --nt-bg:         #F4F5FA;
  --nt-surface:    #ffffff;
  --nt-border:     #e3e6ec;
  --nt-text:       var(--nt-dark);
  --nt-text-muted: var(--nt-slate);

  /* Sidebar — clara (contraste navy sobre branco) */
  --sidebar-w:     240px;
  --sidebar-bg:    #ffffff;
  --sidebar-hover: rgba(37,75,244,.06);
  --sidebar-text:  #3D4757;
  --sidebar-active:var(--nt-blue-2);

  /* Typography — Montserrat (marca Tyket) */
  --font-sans: 'Montserrat', 'Segoe UI', system-ui, sans-serif;

  /* Radii / Shadows */
  --radius:    0;
  --radius-lg: 0;
  --radius-sm: 2px;
  --shadow:    0 1px 3px rgba(9,23,43,.10);
  --shadow-lg: 0 6px 24px rgba(9,23,43,.16);
}

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background:  var(--nt-bg);
  color:       var(--nt-text);
  font-size:   14px;
  line-height: 1.6;
  margin: 0;
}

/* Marca Tyket: títulos em Montserrat ExtraBold */
h1, h2, h3, .nt-page-title, .nt-login-title { font-weight: 800; }

/* Rodapé institucional (termos Tyket — padrão Expedita) */
.nt-footer-terms {
  text-align: center;
  font-size: .72rem;
  color: var(--nt-text-muted);
  line-height: 1.7;
}
.nt-footer-terms strong { color: var(--nt-text); font-weight: 700; }

/* ── Logo Tyket ────────────────────────────────────────────── */
.nt-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}
.nt-logo img { display: block; }
.nt-logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .04em;
}
.nt-logo-text span {
  color: var(--nt-gold);
  font-weight: 400;
  font-size: .95rem;
  letter-spacing: .12em;
}

/* ── Layout Principal (Sidebar + Content) ──────────────────── */
.nt-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.nt-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width .25s ease;
  overflow-x: hidden;
  border-right: 3px solid var(--nt-blue-2);
  box-shadow: 2px 0 12px rgba(9,23,43,.06);
}

.nt-sidebar-brand {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--nt-border);
  flex-shrink: 0;
  text-align: center;
}
.nt-sidebar-brand .nt-logo { justify-content: center; }
.nt-sidebar-brand .nt-logo img { max-width: 100%; }

.nt-sidebar-brand .badge {
  font-size: .6rem;
  background: var(--nt-cyan);
  color: #fff;
  margin-left: .25rem;
  vertical-align: middle;
  border-radius: var(--radius-sm);
}

.nt-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: .75rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(9,23,43,.15) transparent;
}

.nt-nav-section {
  padding: .75rem 1.25rem .25rem;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--nt-slate);
}

.nt-nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
  position: relative;
}

.nt-nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--nt-dark);
}

.nt-nav-item.active {
  background: rgba(37,75,244,.10);
  color: var(--sidebar-active);
  border-left-color: var(--nt-blue-2);
  font-weight: 700;
}

.nt-nav-item .nav-icon {
  width: 18px;
  text-align: center;
  opacity: .85;
  flex-shrink: 0;
  color: var(--nt-cyan);
}

.nt-nav-item .nav-badge {
  margin-left: auto;
  background: var(--nt-red);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  min-width: 18px;
  text-align: center;
}

.nt-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--nt-border);
  font-size: .75rem;
  color: var(--nt-slate);
}

/* ── Content Area ──────────────────────────────────────────── */
.nt-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Navbar ────────────────────────────────────────────── */
.nt-navbar {
  background: var(--nt-surface);
  border-bottom: 1px solid var(--nt-border);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 4px rgba(16,24,32,.06);
}

.nt-navbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--nt-text);
  flex: 1;
}

.nt-navbar-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* Avatar circle — círculo mantido (identidade) */
.nt-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--nt-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* ── Page Body ─────────────────────────────────────────────── */
.nt-page {
  padding: 1.5rem;
  flex: 1;
}

.nt-page-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.nt-page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nt-text);
  margin: 0;
}

.nt-page-subtitle {
  font-size: .8rem;
  color: var(--nt-text-muted);
  margin-top: .15rem;
}

/* ── Cards — AdminLTE flat: borda superior de destaque ─────── */
.nt-card {
  background: var(--nt-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--nt-border);
  border-left: 3px solid var(--nt-cyan);
  overflow: hidden;
}

.nt-card.nt-card-plain { border-top: 1px solid var(--nt-border); }

.nt-card-header {
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--nt-border);
  font-weight: 600;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nt-card-body { padding: 1.25rem; }

/* ── Stat cards — AdminLTE small-box: cor sólida, alto contraste ── */
.nt-stat-card {
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  border: 0;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--nt-dark);
  min-height: 92px;
}

.nt-stat-card::after {           /* faixa inferior estilo small-box */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(0,0,0,.18);
}

.nt-stat-card.sb-primary { background: var(--nt-primary); color: var(--nt-dark); }
.nt-stat-card.sb-gold    { background: var(--nt-gold);   color: var(--nt-dark); }
.nt-stat-card.sb-blue    { background: #2563eb; }
.nt-stat-card.sb-cyan    { background: #00a8c6; }
.nt-stat-card.sb-green   { background: var(--nt-green); }
.nt-stat-card.sb-yellow  { background: #e08e0b; }
.nt-stat-card.sb-red     { background: var(--nt-red); }
.nt-stat-card.sb-dark    { background: var(--nt-dark); }

.nt-stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  background: rgba(0,0,0,.15);
  color: inherit;
}

/* compat com classes antigas de cor do ícone */
.nt-stat-icon.blue, .nt-stat-icon.green,
.nt-stat-icon.yellow, .nt-stat-icon.red {
  background: rgba(0,0,0,.15);
  color: inherit;
}

.nt-stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: inherit;
}

.nt-stat-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: inherit;
  opacity: .85;
  margin-top: .25rem;
}

/* ── Badges de Status — flat, quadrado ─────────────────────── */
.nt-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: var(--radius-sm);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.nt-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.nt-badge-open       { background: rgba(37,99,235,.12);  color: #2563eb; }
.nt-badge-progress   { background: rgba(37,75,244,.12);  color: #1A3AF0; }
.nt-badge-waiting    { background: rgba(243,156,18,.14); color: #b06f04; }
.nt-badge-resolved   { background: rgba(0,166,90,.12);   color: var(--nt-green); }
.nt-badge-closed     { background: rgba(100,116,139,.12);color: var(--nt-text-muted); }
.nt-badge-cancelled  { background: rgba(221,75,57,.12);  color: var(--nt-red); }
.nt-badge-warning    { background: rgba(243,156,18,.14); color: #b06f04; }

/* Priority badges */
.nt-badge-critical { background: rgba(221,75,57,.14); color: var(--nt-red); }
.nt-badge-high     { background: rgba(243,156,18,.14);color: #b06f04; }
.nt-badge-medium   { background: rgba(37,99,235,.12); color: #2563eb; }
.nt-badge-low      { background: rgba(0,166,90,.12);  color: var(--nt-green); }

/* ── Table ─────────────────────────────────────────────────── */
.nt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.nt-table th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--nt-text-muted);
  border-bottom: 2px solid var(--nt-border);
  white-space: nowrap;
  background: #fafbfc;
}

.nt-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--nt-border);
  color: var(--nt-text);
  vertical-align: middle;
}

.nt-table tbody tr:hover { background: var(--nt-gold-soft); }
.nt-table tbody tr:last-child td { border-bottom: none; }

/* ── Buttons — flat AdminLTE ───────────────────────────────── */
.btn-nt {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-sans);
}

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

/* primário dourado sobre fundo claro → texto escuro p/ contraste */
.btn-nt-gold {
  background: var(--nt-gold);
  color: var(--nt-dark);
  border-color: var(--nt-gold);
}
.btn-nt-gold:hover { background: var(--nt-gold-dark); color: var(--nt-dark); }

.btn-nt-outline {
  background: transparent;
  color: var(--nt-text);
  border-color: var(--nt-border);
}
.btn-nt-outline:hover {
  background: var(--nt-gold-soft);
  border-color: var(--nt-primary);
  color: var(--nt-text);
}

.btn-nt-danger  { background: var(--nt-red);    color:#fff; border-color:var(--nt-red); }
.btn-nt-danger:hover  { background:#c23321; color:#fff; }
.btn-nt-success { background: var(--nt-green);  color:#fff; border-color:var(--nt-green); }
.btn-nt-success:hover { background:#008d4c; color:#fff; }
.btn-nt-warning { background: var(--nt-yellow); color:#fff; border-color:var(--nt-yellow); }

.btn-nt-sm { padding: .3rem .75rem; font-size: .8rem; }
.btn-nt-lg { padding: .7rem 1.5rem; font-size: 1rem; }
.btn-nt-block { width: 100%; justify-content: center; }

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

/* ── Forms — flat ──────────────────────────────────────────── */
.nt-form-group { margin-bottom: 1rem; }

.nt-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--nt-text);
  margin-bottom: .35rem;
}

.nt-input, .nt-select, .nt-textarea {
  display: block;
  width: 100%;
  padding: .55rem .85rem;
  font-size: .875rem;
  font-family: var(--font-sans);
  color: var(--nt-text);
  background: var(--nt-surface);
  border: 1px solid #c7ccd4;
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  -webkit-appearance: none;
}

.nt-input:focus, .nt-select:focus, .nt-textarea:focus {
  border-color: var(--nt-primary);
  box-shadow: 0 0 0 3px var(--nt-gold-soft);
}

.nt-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ── Login Page — dark Noah + dourado ──────────────────────── */
.nt-login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--nt-dark) 0%, var(--nt-dark-2) 60%, #232f3e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;   /* margem superior reduzida (antes centrava na tela) */
  padding: 6.5rem 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Termos institucionais abaixo do login box (fundo escuro) */
.nt-login-terms {
  position: relative;
  z-index: 1;
  margin-top: 1.25rem;
  text-align: center;
  font-size: .72rem;
  line-height: 1.8;
  color: rgba(255,255,255,.55);
}
.nt-login-terms strong { color: rgba(255,255,255,.85); font-weight: 700; }

/* Brilho dourado decorativo */
.nt-login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(37,75,244,.05);
  top: -200px; right: -200px;
}
.nt-login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(37,75,244,.05);
  bottom: -100px; left: -100px;
}

.nt-login-box {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: var(--radius);
  border-top: 4px solid var(--nt-cyan);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

.nt-login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.25rem;
}
/* Centralização real da imagem (img inline desloca pela baseline) */
.nt-login-logo img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.nt-login-logo .nt-system-name {
  font-size: .8rem;
  color: var(--nt-text-muted);
  margin-top: .25rem;
}

/* Destaque do tenant/sistema na tela de login */
.nt-tenant-banner {
  display: block;
  text-align: center;
  background: var(--nt-dark);
  color: #fff;
  border-left: 4px solid var(--nt-cyan);
  padding: .65rem 1rem;
  margin: 1rem 0 1.5rem;
}
.nt-tenant-banner .nt-tenant-label {
  display: block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--nt-cyan);
  font-weight: 700;
}
.nt-tenant-banner .nt-tenant-name {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.nt-login-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--nt-dark);
  margin-bottom: .25rem;
}

.nt-login-subtitle {
  font-size: .8rem;
  color: var(--nt-text-muted);
  margin-bottom: 1.75rem;
}

/* ── Thread de Mensagens ───────────────────────────────────── */
.nt-thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nt-message {
  display: flex;
  gap: .75rem;
}

.nt-message-body {
  flex: 1;
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
}

.nt-message.is-agent .nt-message-body {
  background: var(--nt-gold-soft);
  border-color: rgba(92,58,229,.40);
}

.nt-message.is-agent { flex-direction: row-reverse; }

.nt-message.is-internal .nt-message-body {
  background: rgba(243,156,18,.06);
  border-color: rgba(243,156,18,.3);
  border-style: dashed;
}

.nt-message-meta {
  font-size: .72rem;
  color: var(--nt-text-muted);
  margin-bottom: .35rem;
  display: flex;
  gap: .5rem;
  align-items: center;
}

.nt-message-meta strong { color: var(--nt-text); }

.nt-message-text {
  font-size: .875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── SLA Timer ─────────────────────────────────────────────── */
.nt-sla {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: var(--radius-sm);
}
.nt-sla-ok      { background: rgba(0,166,90,.12);  color:var(--nt-green); }
.nt-sla-warning { background: rgba(243,156,18,.14);color:#b06f04; }
.nt-sla-breach  { background: rgba(221,75,57,.12); color:var(--nt-red); }

/* ── Ticket Number ─────────────────────────────────────────── */
.nt-ticket-number {
  font-family: 'Courier New', monospace;
  font-size: .8rem;
  font-weight: 700;
  color: var(--nt-cyan-dark);
  background: rgba(37,75,244,.12);
  padding: .15rem .5rem;
  border-radius: var(--radius-sm);
}

/* ── Alert Box ─────────────────────────────────────────────── */
.nt-alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: 1rem;
}
.nt-alert-info    { background:rgba(37,75,244,.09);  color:#1A3AF0;        border-left:3px solid var(--nt-cyan); }
.nt-alert-success { background:rgba(0,166,90,.09);   color:var(--nt-green);border-left:3px solid var(--nt-green); }
.nt-alert-warning { background:rgba(243,156,18,.11); color:#b06f04;        border-left:3px solid var(--nt-yellow); }
.nt-alert-danger  { background:rgba(221,75,57,.09);  color:var(--nt-red);  border-left:3px solid var(--nt-red); }

/* ── Modal simples (CRUD) ──────────────────────────────────── */
.nt-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16,24,32,.55);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem;
  overflow-y: auto;
}

.nt-modal {
  background: #fff;
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius);
  border-top: 4px solid var(--nt-cyan);
  box-shadow: var(--shadow-lg);
}

.nt-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--nt-border);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nt-modal-body  { padding: 1.25rem; }
.nt-modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--nt-border);
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  background: #fafbfc;
}

.nt-modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--nt-text-muted);
}

/* Aliases usados pelo saas-admin (mesmo visual do modal CRUD) */
.nt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16,24,32,.55);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem;
  overflow-y: auto;
}

.nt-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--nt-dark);
}

.nt-card-title { font-weight: 700; font-size: .9rem; color: var(--nt-dark); }

.nt-grid-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 3rem 1rem;
  color: var(--nt-text-muted);
  font-size: .875rem;
}

.nt-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--nt-text-muted);
  font-size: .875rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.nt-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--nt-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--nt-text-muted);
  background: var(--nt-surface);
  flex-wrap: wrap;
  gap: .5rem;
}

.nt-footer-brand {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  color: var(--nt-dark);
  text-decoration: none;
  font-size: .8rem;
}

.nt-footer-brand img {
  height: 18px;
  opacity: .85;
}

/* ── Badge de sistema de origem (grades multi-tenant) ──────── */
.nt-system-badge {
  display: inline-block;
  padding: .25rem .6rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
  white-space: nowrap;
  border-left: 3px solid rgba(255,255,255,.45);
}

/* ── Responsive ────────────────────────────────────────────── */

/* Botão hamburger — só aparece em telas pequenas */
.nt-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--nt-border);
  color: var(--nt-text);
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}
.nt-sidebar-toggle:hover { border-color: var(--nt-cyan); color: var(--nt-cyan); }

/* Backdrop atrás da sidebar aberta no mobile */
.nt-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99;
}

/* Tabelas sempre roláveis horizontalmente quando não couberem */
.nt-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nt-table { min-width: 640px; }

@media (max-width: 992px) {
  /* Sidebar vira off-canvas: desliza da esquerda, com botão e backdrop */
  .nt-sidebar {
    position: fixed;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: none;
  }
  .nt-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.35);
  }

  .nt-content { margin-left: 0; }
  .nt-sidebar-toggle { display: inline-flex; }
  .nt-sidebar-backdrop.show { display: block; }

  .nt-navbar { padding: .6rem 1rem; }
}

@media (max-width: 768px) {
  .nt-page { padding: 1rem; }

  .nt-page-header { flex-direction: column; align-items: flex-start; gap: .75rem; }

  .nt-stat-card { flex-direction: column; text-align: center; gap: .5rem; }

  .nt-modal { width: calc(100vw - 2rem); max-width: none; margin: 1rem; }

  .nt-login-box { width: calc(100vw - 2rem); max-width: 420px; }

  .nt-footer { flex-direction: column; gap: .5rem; text-align: center; }
}

@media (max-width: 480px) {
  .nt-page { padding: .75rem; }
  .nt-page-title { font-size: 1.15rem; }
  .nt-table { min-width: 560px; font-size: .8rem; }
}

/* ── Utilities ─────────────────────────────────────────────── */
.text-muted  { color: var(--nt-text-muted) !important; }
.text-gold   { color: var(--nt-gold)  !important; }
.text-blue   { color: var(--nt-primary) !important; }
.text-green  { color: var(--nt-green) !important; }
.text-red    { color: var(--nt-red)   !important; }
.text-yellow { color: var(--nt-yellow)!important; }

.bg-navy  { background: var(--nt-dark);  color: #fff; }
.bg-gold  { background: var(--nt-gold);  color: var(--nt-dark); }
.bg-blue  { background: var(--nt-primary); color: #fff; }
.bg-green { background: var(--nt-green); color: #fff; }

.gap-1  { gap: .25rem; }
.gap-2  { gap: .5rem; }
.gap-3  { gap: .75rem; }

.d-flex  { display: flex; }
.ai-center { align-items: center; }
.jc-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.fw-700 { font-weight: 700; }
.fs-sm  { font-size: .8rem; }
.fs-xs  { font-size: .7rem; }
.mt-auto { margin-top: auto; }

/* Bootstrap overrides — kill radius */
.btn, .form-control, .form-select, .card, .nav-tabs .nav-link,
.dropdown-menu, .alert, .badge, .modal-content {
  border-radius: 0 !important;
}

.nav-tabs .nav-link {
  color: var(--nt-text-muted);
  font-weight: 600;
  font-size: .875rem;
  border: 0;
  border-bottom: 3px solid transparent;
}
.nav-tabs .nav-link.active {
  color: var(--nt-dark);
  border-bottom-color: var(--nt-gold);
  background: transparent;
}

/* Spinner */
.nt-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--nt-border);
  border-top-color: var(--nt-cyan);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Pulse dot — status online */
.nt-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--nt-green);
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(1.3); }
}
