/* =========================
   THEME (Garbo) — v2
   Tokens extraídos do mockup garbo-decoded.html
   ========================= */
:root {
  /* Brand */
  --brand-blue: #2A63F0;
  --brand-blue-hover: #1D4FCF;
  --brand-blue-2: #3A4FD0;
  --brand-blue-dark: #21397A;

  --brand-purple: #564A8F;
  --brand-purple-hover: #54509F;

  --brand-lime: #AAEF54;

  /* Acento (usar com intenção, não poluir) */
  --brand-orange: #E55635;

  /* Navy (chips/badges/títulos escuros) */
  --navy: #15192a;
  --navy-2: #11152a;

  /* Neutros de superfície */
  --white: #ffffff;
  --page-bg: #EAECF1;
  --surface: #F4F5F9;
  --card-border: #E6E8EF;
  --input-border: #E2E6F0;
  --divider: #EDEFF4;
  --divider-2: #F0F1F6;

  /* Texto */
  --text-dark: #15192a;
  --text-secondary: #3a3f4d;
  --text-muted: #7a8094;
  --text-muted-light: #9aa0b0;
  --text-label: #8a90a2;
  --table-head: #9197a8;

  /* Estados */
  --success-bg: #DCFCE7;
  --success-text: #0C7F47;
  --success-dot: #16A34A;
  --success-border: #BBE99B;

  --warning-bg: #FEF3C7;
  --warning-text: #92600A;
  --warning-dot: #E0A100;

  --error-bg: #FDE4DC;
  --error-text: #B23A20;
  --error-dot: #E55635;
  --error-border: #FDE4DC;

  /* Canais */
  --canal-vd-bg: #E7EDFD;
  --canal-vd-text: #2A4BC9;
  --canal-loja-bg: #EDE9F7;
  --canal-loja-text: #5A4E92;

  /* Compat (nomes antigos usados em outros lugares do código) */
  --border: var(--card-border);
  --muted: var(--text-muted);
  --info-bg: #E7EDFD;
  --info-text: #2A4BC9;
  --focus-ring: rgba(42, 99, 240, 0.16);

  /* Fonte de marca */
  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* =========================
   BASE
   ========================= */
* { box-sizing: border-box; }

.container,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
  max-width: 100% !important;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--page-bg);
  color: var(--text-dark);
}

input, select, button, textarea {
  font-family: inherit;
}

::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-thumb { background: #cfd3dd; border-radius: 99px; }

.font-display {
  font-family: var(--font-display);
}

/* =========================
   GATE DE LOGIN (TELA CHEIA)
   ========================= */
#login-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  min-height: 100vh;
  background: var(--white);
}

#login-gate.d-none { display: none; }

.login-brand-panel {
  flex: 1;
  background: linear-gradient(150deg, var(--brand-blue) 0%, var(--brand-blue-2) 50%, var(--brand-purple) 100%);
  color: #fff;
  padding: 54px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(170, 239, 84, .22), transparent 70%);
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  left: -60px;
  bottom: -90px;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, .1), transparent 70%);
}

.login-brand-panel > * { position: relative; }

.login-brand-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.login-brand-title {
  font: 800 40px/1.08 var(--font-display);
  letter-spacing: 0;
}

.login-brand-subtitle {
  font-size: 15px;
  line-height: 1.6;
  opacity: .9;
  margin-top: 18px;
  max-width: 440px;
}

.login-benefits {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 30px;
}

.login-benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.login-benefit-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 15px;
}

.login-brand-footer {
  font-size: 12.5px;
  opacity: .7;
}

.login-form-panel {
  width: 480px;
  flex: none;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

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

.login-form-title {
  font: 800 24px/1.1 var(--font-display);
  color: var(--text-dark);
  letter-spacing: 0;
}

.login-form-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

.login-field-label {
  font: 700 11px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text-label);
  display: block;
  margin-bottom: 8px;
}

.login-field-label + .form-control {
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 14px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}

.login-divider span.line {
  flex: 1;
  height: 1px;
  background: var(--divider);
}

.login-divider span.label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted-light);
  text-transform: uppercase;
  letter-spacing: 0;
}

.login-guest-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted-light);
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 900px) {
  .login-brand-panel { display: none; }
  .login-form-panel { width: 100%; }
}

/* =========================
   APP SHELL
   ========================= */
.app-wrapper {
  width: 100%;
  max-width: 1440px;
  margin: 18px auto;
  padding: 0 16px;
}

.card-app {
  width: 100%;
  border-radius: 1.25rem;
  overflow: visible;
  border: none;
  background: transparent;
}

/* ===== HEADER ===== */
.card-header-app {
  background: var(--white);
  color: var(--text-dark);
  padding: 18px 28px 0;
  border: 1px solid var(--card-border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
}

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

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo-badge {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  border-radius: 13px;
  padding: 0 15px;
  flex: none;
}

.header-logo-badge img {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.card-header-app h1 {
  font: 800 20px/1.1 var(--font-display);
  letter-spacing: 0;
  color: var(--navy-2);
  margin: 0;
}

.card-header-app p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 3px 0 0;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-nova-entrega {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-lime);
  color: #15233a;
  border: none;
  border-radius: 11px;
  padding: 11px 16px;
  font: 700 13px var(--font-display);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(170, 239, 84, .4);
  transition: transform .12s ease, box-shadow .12s ease;
}

.btn-nova-entrega:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(170, 239, 84, .5);
  color: #15233a;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 13px 6px 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .12s ease;
}

.user-chip:hover { background: var(--divider-2); }

.user-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 12px var(--font-display);
  flex: none;
}

.user-chip-logout {
  color: var(--text-muted-light);
  display: inline-flex;
  align-items: center;
}

.guest-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--warning-bg);
  color: var(--warning-text);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 700;
}

.btn-fazer-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 10px 16px;
  font: 700 13px var(--font-display);
  cursor: pointer;
}

.btn-fazer-login:hover { background: #232842; color: #fff; }

/* ===== ABAS (underline) ===== */
.nav-tabs-garbo {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  border-bottom: none;
  flex-wrap: wrap;
}

.nav-tabs-garbo .nav-item { margin: 0; }

.nav-tabs-garbo .nav-link {
  border: none;
  background: transparent;
  padding: 12px 4px;
  margin-right: 22px;
  font: 600 13.5px var(--font-display);
  color: var(--text-muted-light);
  border-radius: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}

.nav-tabs-garbo .nav-link:hover {
  color: var(--brand-blue);
  border-color: transparent;
}

.nav-tabs-garbo .nav-link.active {
  font-weight: 800;
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
  background: transparent;
}

/* ===== CORPO ===== */
.card-body-app {
  background-color: var(--surface);
  padding: 22px;
  border: 1px solid var(--card-border);
  border-top: none;
  border-radius: 0 0 20px 20px;
}

/* ===== Seções com barrinha colorida ===== */
.section-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 22px;
}

.section-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 18px;
}

.section-card-head-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-bar {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  display: inline-block;
  flex: none;
}

.section-bar-blue { background: var(--brand-blue); }
.section-bar-lime { background: var(--brand-lime); }
.section-bar-purple { background: var(--brand-purple); }
.section-bar-amber { background: var(--warning-dot); }
.section-bar-orange { background: var(--brand-orange); }

.section-label {
  font: 800 13px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text-dark);
}

.section-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--brand-blue-dark);
  margin-bottom: 0.75rem;
  position: relative;
  padding-bottom: 0.35rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand-orange);
  margin-top: 0.35rem;
}

.form-label {
  font: 700 11px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text-label);
  margin-bottom: 8px;
}

.form-control,
.form-select {
  border-radius: 11px;
  border-color: var(--input-border);
  background-color: var(--white);
  font-size: 13.5px;
  color: var(--text-dark);
  padding: 0.55rem 0.8rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-control[readonly] {
  background-color: var(--surface);
  color: var(--text-muted);
}

/* ===== BOTÕES ===== */
.btn {
  border-radius: 11px;
  font-family: var(--font-display);
}

.btn-primary {
  background: var(--brand-blue);
  border: none;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(42, 99, 240, .25);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--brand-blue-hover);
  box-shadow: 0 10px 24px rgba(42, 99, 240, .28);
}

.btn-primary:disabled { opacity: 0.7; }

.btn-light.border {
  border-radius: 11px;
  border-color: var(--input-border) !important;
  color: var(--text-muted);
  background: #fff;
  font-weight: 600;
}

.btn-outline-success {
  border-color: var(--success-border);
  color: var(--success-text);
  background: #fff;
  font-weight: 700;
  border-radius: 11px;
}

.btn-outline-success:hover {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.btn-outline-danger {
  border-color: var(--error-border);
  color: var(--brand-orange);
  background: #fff;
  font-weight: 600;
  border-radius: 11px;
}

.btn-outline-danger:hover {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--brand-orange);
}

.btn-success {
  background: var(--brand-blue);
  border: none;
  color: #fff;
  font-weight: 700;
}

.btn-success:hover { background: var(--brand-blue-hover); }

.btn-dark-navy {
  background: var(--navy);
  color: #fff;
  border: none;
  font-weight: 700;
}

.btn-dark-navy:hover { background: #232842; color: #fff; }

a:hover { color: var(--brand-orange); }

/* ===== FOOTER ===== */
.footer-app {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 6px 0;
  font-size: 12px;
  color: var(--text-muted-light);
  gap: .5rem;
  flex-wrap: wrap;
}

.footer-app .footer-brand {
  font-weight: 700;
  color: var(--text-muted);
}

/* ===== ALERTAS ===== */
.alert-garbo {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  min-width: 280px;
  max-width: 380px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(21, 25, 42, .18);
  transform: translateX(calc(100% + 20px));
  transition: transform 0.3s ease-out;
}

.alert-garbo.show {
  transform: translateX(0);
}

.alert-garbo-icon {
  font-size: 18px;
}

.alert-garbo.alert-success {
  background: #fff;
  border-left: 4px solid var(--success-dot);
  color: var(--text-dark);
}
.alert-garbo.alert-success .alert-garbo-icon { color: var(--success-dot); }

.alert-garbo.alert-warning {
  background: #fff;
  border-left: 4px solid var(--warning-dot);
  color: var(--text-dark);
}
.alert-garbo.alert-warning .alert-garbo-icon { color: var(--warning-dot); }

.alert-garbo.alert-danger {
  background: #fff;
  border-left: 4px solid var(--error-dot);
  color: var(--text-dark);
}
.alert-garbo.alert-danger .alert-garbo-icon { color: var(--error-dot); }

/* ===== HINTS ===== */
.small-hint { font-size: 0.8rem; color: var(--text-muted); }

.small-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--brand-blue-dark);
}

.user-name { font-size: 0.85rem; font-weight: 600; }

/* ===== Pílulas / badges genéricos ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex: none;
  display: inline-block;
}

.badge-status {
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
}

.badge-status-pendente { background-color: var(--warning-bg); color: var(--warning-text); }
.badge-status-aprovado { background-color: var(--success-bg); color: var(--success-text); }
.badge-status-concluido { background-color: var(--success-bg); color: var(--success-text); }
.badge-status-outro { background-color: var(--error-bg); color: var(--error-text); }

.badge-canal-vd { background: var(--canal-vd-bg); color: var(--canal-vd-text); }
.badge-canal-loja { background: var(--canal-loja-bg); color: var(--canal-loja-text); }

.logo-garbo { height: 150px; object-fit: contain; }

/* ===== RESPONSIVO ===== */
@media (max-width: 576px) {
  .app-wrapper { max-width: 100%; margin: 0; padding: 0; }
  .card-app { border-radius: 0; box-shadow: none; }
  .card-header-app { padding: 14px 16px 0; }
  .card-body-app { padding: 16px; }
  .card-header-app h1 { font-size: 17px; }
  .logo-garbo { height: 32px; }
}

/* ===== Barra de carregamento global ===== */
.global-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 9999;
  background: transparent;
}

.global-loading-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-lime));
  box-shadow: 0 0 8px rgba(42, 99, 240, 0.35);
  transition: width 0.3s ease;
}

.global-loading.is-active .global-loading-bar {
  width: 75%;
  animation: global-loading-pulse 1s infinite ease-in-out;
}

@keyframes global-loading-pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* ===== Botões específicos do form de agendamento ===== */
#btn-add-nfe.btn-success {
  background: #EEF2FE !important;
  border: none !important;
  color: var(--brand-blue) !important;
  border-radius: 9px !important;
  font-weight: 700 !important;
}
#btn-add-nfe.btn-success:hover {
  background: #DCE5FC !important;
}

.btn-remove-nfe.btn-outline-danger {
  color: var(--brand-orange) !important;
  border-color: var(--error-border) !important;
  background: transparent !important;
}
.btn-remove-nfe.btn-outline-danger:hover,
.btn-remove-nfe.btn-outline-danger:focus {
  background: var(--error-bg) !important;
  border-color: var(--error-border) !important;
  color: var(--brand-orange) !important;
}

.modal-header-brand {
  background: var(--navy);
  color: #fff;
}

/* ===== Modais (Bootstrap) restyle leve ===== */
.modal-content {
  border-radius: 18px;
  border: none;
}

.modal-header {
  border-bottom: 1px solid var(--divider);
}

.modal-footer {
  border-top: 1px solid var(--divider);
}

.modal-title {
  font: 800 16px var(--font-display);
  color: var(--text-dark);
}

/* ===== Tabelas genéricas (gerenciamento/logs/dashboard) ===== */
.table > thead {
  background: #FAFBFD;
}

.table > thead th {
  font: 700 10px/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--table-head);
  border-bottom: 1px solid var(--divider-2);
  white-space: nowrap;
}

.table > tbody td {
  font-size: 12.5px;
  color: var(--text-secondary);
  vertical-align: middle;
  font-family: var(--font-display);
  font-weight: 500;
}

.card-inner {
  border: 1px solid var(--card-border);
  border-radius: 18px;
}

/* NOVO: Cards de item para Gerenciamento */
.ger-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
  padding: 4px;
}

.ger-item-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.ger-item-card:hover {
  border-color: var(--card-border);
  box-shadow: 0 6px 16px rgba(21, 25, 42, .05);
}

.ger-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 14px var(--font-display);
  color: #fff;
  flex: none;
}

.ger-card-main { flex: 1 1 auto; min-width: 0; }

.ger-card-title {
  font: 800 14px/1.2 var(--font-display);
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ger-card-subtitle {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ger-card-side {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.ger-card-tag-group {
  display: flex;
  gap: 6px;
}

.ger-card-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-muted);
  white-space: nowrap;
}

.ger-card-tag-alt {
  background: #eef2ff;
  color: #315bea;
}

.ger-card-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}

.ger-card-grid-empty {
  grid-column: 1 / -1;
}

/* Toggle lista/cards das telas de Gerenciamento */
.ger-view-toggler {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid #dfe4ef;
  border-radius: 11px;
  background: #f8faff;
}

.ger-view-toggler .btn {
  width: 33px;
  height: 33px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0 !important;
  border-radius: 8px;
  background: transparent;
  color: #8a93aa;
}

.ger-view-toggler .btn:hover {
  background: #fff;
  color: var(--brand-blue);
}

.ger-view-toggler .btn.active {
  background: #fff;
  color: var(--brand-blue);
  box-shadow: 0 2px 6px rgba(21, 25, 42, .08);
}

/* ===== Dropzone de importação ===== */
.import-dropzone {
  border: 2px dashed #CBD3E6;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  background: #FAFBFD;
  transition: border-color .12s ease, background .12s ease;
}

.import-dropzone:has(#input-arquivo-import:focus) {
  border-color: var(--brand-blue);
}

.import-dropzone .input-group .form-control {
  font-size: 12.5px;
}

/* badges de situação usados em import.js / app-dashboard.js via JS */
.badge-situacao-ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--success-bg);
  color: var(--success-text);
  white-space: nowrap;
}

.badge-situacao-erro {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--error-bg);
  color: var(--error-text);
  white-space: nowrap;
}
/* ===== MOBILE V2 ===== */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .app-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .card-app {
    border-radius: 0;
  }

  .card-header-app {
    border-radius: 0;
    padding: 14px 14px 0;
  }

  .header-top-row {
    align-items: stretch;
    gap: 12px;
  }

  .header-brand-group {
    align-items: center;
    min-width: 0;
  }

  .header-logo-badge {
    height: 40px;
    border-radius: 11px;
    padding: 0 12px;
  }

  .header-logo-badge img {
    height: 22px;
  }

  .card-header-app h1 {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .card-header-app p {
    font-size: 12px;
  }

  .header-actions-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .header-actions-group > * {
    min-width: 0;
  }

  .btn-nova-entrega,
  .btn-fazer-login {
    min-height: 42px;
    justify-content: center;
    padding: 10px 12px;
    text-align: center;
  }

  .guest-pill,
  #user-info,
  .user-chip {
    width: 100%;
    justify-content: center;
  }

  #user-info {
    grid-column: span 2;
  }

  .nav-tabs-garbo {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 18px;
    margin-top: 12px;
    padding-bottom: 1px;
    scrollbar-width: thin;
  }

  .nav-tabs-garbo .nav-item {
    flex: 0 0 auto;
  }

  .nav-tabs-garbo .nav-link {
    margin-right: 0;
    padding: 12px 0 10px;
    white-space: nowrap;
  }

  .card-body-app {
    border-radius: 0;
    padding: 14px;
  }

  .section-card {
    border-radius: 14px;
    padding: 16px;
  }

  .section-card-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .form-layout-v2 {
    flex-direction: column !important;
  }

  .form-main-col,
  .form-summary-card {
    width: 100% !important;
  }

  .form-summary-card {
    order: 2;
  }

  #nfe-list .nfe-item > .d-flex {
    flex-wrap: wrap;
  }

  #nfe-list input[name="nfe"] {
    flex: 1 1 160px;
  }

  #nfe-list input[name="vol"] {
    flex: 1 1 92px;
    max-width: none !important;
  }

  #nfe-list .btn-remove-nfe {
    width: 42px !important;
  }

  .modal-dialog {
    margin: 10px;
  }

  .modal-footer,
  .modal-footer > div {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .login-form-panel {
    padding: 24px 18px;
  }

  .login-form-title {
    font-size: 22px;
  }

  .header-actions-group {
    grid-template-columns: 1fr;
  }

  #user-info {
    grid-column: span 1;
  }

  .guest-pill {
    min-height: 38px;
  }

  .btn,
  .btn-nova-entrega,
  .btn-fazer-login {
    min-height: 42px;
  }

  .section-label {
    line-height: 1.25;
  }

  .section-card .d-flex.justify-content-between.align-items-center.mt-3.flex-wrap.gap-2 > .d-flex {
    width: 100%;
    flex-direction: column;
  }

  .section-card .d-flex.justify-content-between.align-items-center.mt-3.flex-wrap.gap-2 .btn {
    width: 100%;
  }

  .import-dropzone {
    padding: 14px;
  }

  .import-dropzone .input-group {
    flex-direction: column;
  }

  .import-dropzone .input-group > .form-control,
  .import-dropzone .input-group > .btn {
    width: 100%;
    border-radius: 11px !important;
  }

  #paginacao-admin-agendamentos,
  #paginacao-admin-colaboradores,
  #paginacao-logs,
  #feriado-pagination {
    justify-content: flex-start !important;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}
/* ===== LOGIN TRUCK HERO V2 ===== */
#login-gate {
  background: #0f1428;
}

.login-visual-panel {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  color: #fff;
}

.login-truck-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform: scale(1.01);
}

.login-visual-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 18, 38, .96) 0%, rgba(18, 25, 54, .76) 44%, rgba(24, 31, 62, .22) 100%),
    linear-gradient(0deg, rgba(13, 18, 38, .74), rgba(13, 18, 38, .08));
}

.login-visual-content {
  position: relative;
  z-index: 1;
  width: min(620px, 62vw);
  padding: 56px clamp(34px, 5vw, 72px) 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-kicker {
  display: inline-flex;
  width: max-content;
  margin-top: 72px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, .1);
  color: var(--brand-lime);
  font: 800 12px var(--font-display);
}

.login-visual-panel .login-brand-logo {
  position: absolute;
  top: 38px;
  left: clamp(34px, 5vw, 60px);
  height: 60px;
  width: auto;
  object-fit: contain;
}

.login-visual-panel .login-brand-title {
  font: 800 58px/.95 var(--font-display);
  color: #fff;
  max-width: 560px;
}

.login-visual-panel .login-brand-subtitle {
  max-width: 500px;
  margin-top: 22px;
  color: rgba(255, 255, 255, .82);
  font-size: 16px;
  line-height: 1.65;
}

.login-visual-panel .login-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
  max-width: 720px;
}

.login-visual-panel .login-benefit-item {
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, .09);
  backdrop-filter: blur(10px);
  font-size: 12.5px;
  line-height: 1.35;
}

.login-visual-panel .login-benefit-icon {
  background: rgba(170, 239, 84, .18);
  color: var(--brand-lime);
}

.login-visual-panel .login-brand-footer {
  position: absolute;
  z-index: 1;
  left: clamp(34px, 5vw, 72px);
  bottom: 28px;
  color: rgba(255, 255, 255, .62);
}

.login-form-panel {
  width: min(470px, 36vw);
  min-width: 420px;
  box-shadow: -20px 0 60px rgba(9, 13, 29, .22);
}

.login-mobile-logo {
  display: none;
  width: 112px;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: 14px;
  background: var(--navy);
}

.login-mobile-logo img {
  width: 90px;
  height: auto;
}

.login-form-panel .btn-primary {
  min-height: 48px;
}

#btn-guest-access {
  min-height: 46px;
  border-width: 1.5px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .login-visual-panel .login-brand-title {
    font-size: 48px;
  }

  .login-visual-panel .login-benefits {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

@media (max-width: 900px) {
  .login-visual-panel {
    display: none;
  }

  .login-form-panel {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    box-shadow: none;
  }

  .login-mobile-logo {
    display: inline-flex;
  }
}
/* ===== HEADER LOGO CONTRAST FIX ===== */
.header-logo-badge {
  width: 110px;
  height: 52px;
  padding: 0 13px;
  border-radius: 14px;
  background: linear-gradient(135deg, #10162b 0%, #1d2b5c 100%);
  border: 1px solid rgba(42, 99, 240, .18);
  box-shadow: 0 10px 24px rgba(16, 22, 43, 0.12);
}

.header-logo-badge img {
  width: 90px;
  height: auto;
  max-height: 32px;
  opacity: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18));
}

@media (max-width: 768px) {
  .header-logo-badge {
    width: 82px;
    height: 46px;
    padding: 0 11px;
  }

  .header-logo-badge img {
    width: 62px;
    max-height: 28px;
  }
}

/* ===== Notificações da plataforma (toast + confirmação) ===== */
.app-toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 24px));
}

.app-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--brand-blue);
  box-shadow: 0 14px 32px rgba(16, 22, 43, .14);
  font-family: var(--font-display);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity .22s ease, transform .22s ease;
}

.app-toast.app-toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.app-toast.app-toast-leaving {
  opacity: 0;
  transform: translateX(24px);
}

.app-toast-icon {
  flex: none;
  margin-top: 1px;
  font-size: 17px;
  color: var(--brand-blue);
}

.app-toast-msg {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-dark);
}

.app-toast-close {
  flex: none;
  border: 0;
  background: transparent;
  padding: 2px;
  color: var(--text-muted-light);
  font-size: 12px;
  line-height: 1;
}

.app-toast-close:hover {
  color: var(--text-muted);
}

.app-toast-success {
  border-left-color: #0c7f47;
}
.app-toast-success .app-toast-icon {
  color: #0c7f47;
}

.app-toast-error {
  border-left-color: #b23a20;
}
.app-toast-error .app-toast-icon {
  color: #b23a20;
}

.app-toast-warning {
  border-left-color: var(--brand-orange);
}
.app-toast-warning .app-toast-icon {
  color: var(--brand-orange);
}

.app-toast-info {
  border-left-color: var(--brand-blue);
}
.app-toast-info .app-toast-icon {
  color: var(--brand-blue);
}

.app-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 18, 34, .5);
  opacity: 0;
  transition: opacity .18s ease;
}

.app-confirm-overlay.app-confirm-visible {
  opacity: 1;
}

.app-confirm-overlay.app-confirm-leaving {
  opacity: 0;
}

.app-confirm-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 26px 26px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(16, 22, 43, .25);
  font-family: var(--font-display);
  transform: scale(.94) translateY(6px);
  transition: transform .18s ease;
}

.app-confirm-overlay.app-confirm-visible .app-confirm-card {
  transform: scale(1) translateY(0);
}

.app-confirm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--brand-blue);
  font-size: 22px;
}

.app-confirm-icon.danger {
  background: #fde4dc;
  color: #b23a20;
}

.app-confirm-title {
  font: 800 16px/1.3 var(--font-display);
  color: var(--text-dark);
  margin-bottom: 6px;
}

.app-confirm-msg {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.app-confirm-note {
  width: 100%;
  resize: none;
  border-radius: 11px;
  border-color: var(--card-border);
  font-size: 12.5px;
  margin-bottom: 18px;
  box-shadow: none;
}

.app-confirm-note:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(42, 99, 240, .12);
}

.app-confirm-actions {
  display: flex;
  gap: 10px;
}

.app-confirm-actions .btn {
  flex: 1 1 0;
  min-height: 40px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--card-border);
}

.app-confirm-cancel {
  background: #fff;
  color: var(--text-secondary);
}

.app-confirm-cancel:hover {
  background: var(--surface);
}

.app-confirm-ok {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
  box-shadow: 0 8px 18px rgba(42, 99, 240, .22);
}

.app-confirm-ok:hover {
  background: var(--brand-blue-hover);
  border-color: var(--brand-blue-hover);
  color: #fff;
}

.app-confirm-danger {
  background: #d8402a;
  color: #fff;
  border-color: #d8402a;
  box-shadow: 0 8px 18px rgba(216, 64, 42, .25);
}

.app-confirm-danger:hover {
  background: #b23a20;
  border-color: #b23a20;
  color: #fff;
}

@media (max-width: 480px) {
  .app-toast-stack {
    top: auto;
    bottom: 14px;
    right: 14px;
    left: 14px;
    max-width: none;
  }

  .app-toast {
    transform: translateY(16px);
  }

  .app-toast.app-toast-visible {
    transform: translateY(0);
  }

  .app-toast.app-toast-leaving {
    transform: translateY(16px);
  }
}

/* ===== Estado "em construção" (telas ainda não implementadas) ===== */
.construction-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  min-height: 420px;
}

.construction-icon-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--brand-blue) 0%, var(--brand-blue-2) 50%, var(--brand-purple) 100%);
  box-shadow: 0 16px 32px rgba(42, 99, 240, .22);
}

.construction-icon-badge .bi-truck {
  font-size: 56px;
  color: #fff;
}

.construction-gear {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--brand-lime);
  background: var(--navy);
  border-radius: 50%;
  border: 3px solid #fff;
  animation: construction-spin 2.4s linear infinite;
}

@keyframes construction-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.construction-state h2 {
  margin: 0 0 8px;
  font: 800 22px var(--font-display);
  color: var(--text-dark);
}

.construction-state p {
  margin: 0;
  max-width: 360px;
  color: var(--text-muted);
  font-size: 13.5px;
}
