/* Tema vermelho/preto */
/* Auth hero */
.auth-hero {
  background:
    linear-gradient(180deg, rgba(0,0,0,.44), rgba(0,0,0,.82)),
    url('/public/assets/img/tex.png') center/36%,
    var(--bg-dark) no-repeat center/cover;
  /* bg.jpg controlado via CSS var para evitar stretch: usa cover + center e overlay forte */
  background-image: var(--bg-url, none), url('/public/assets/img/tex.png'), none;
  background-position: center center, center center, center center;
  background-size: cover, 36%, cover;
}
.auth-overlay { position:absolute; inset:0; }
.auth-card {
  position: relative;
  backdrop-filter: blur(8px);
  background: rgba(15,15,16,0.9);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.06);
  animation: authFade .6s ease both;
  transition: transform .25s ease, box-shadow .25s ease;
}
.auth-card:hover { transform: translateY(-2px); box-shadow: 0 18px 46px rgba(0,0,0,.6); }
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px; /* espessura da borda */
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(209,15,47,.9));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.auth-logo { max-height: 220px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)) drop-shadow(0 0 16px rgba(255,255,255,.1)); }
.auth-card h2 { color: #fff; letter-spacing: .06em; font-weight: 800; text-transform: uppercase; }
@keyframes authFade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Cores base */
:root {
  --bg-dark: #0b0b0c;
  --bg-card: #151517;
  --text: #ececee; /* branco leve */
  --muted: #c7c7ca; /* branco ainda mais suave */
  --primary: #d10f2f; /* vermelho */
  --primary-600: #b60d29;
  --border: #222326;
}

/* Texto geral e tabelas em branco leve */
html, body { background: var(--bg-dark); color: var(--text); }
.card { background: var(--bg-card); border-color: var(--border); }
.table { color: var(--text); }
.table thead th { color: #dedee0; border-color: var(--border); }
.table td { border-color: var(--border); }
.navbar.bg-dark { background-color: #0d0d0e !important; }

/* Botões */
.btn { border-radius: 12px; transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease, color .25s ease; }
.btn-primary { background-color: var(--primary); border-color: var(--primary-600); }
.btn-primary:hover { background-color: var(--primary-600); border-color: var(--primary-600); }
.btn-outline-danger { color: var(--primary); border-color: var(--primary); }
.btn-outline-danger:hover { background-color: var(--primary); color: #fff; }
.btn-danger { background-color: var(--primary); border-color: var(--primary-600); box-shadow: 0 10px 26px rgba(209,15,47,.28); text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.btn-danger:hover { background-color: var(--primary-600); box-shadow: 0 12px 28px rgba(209,15,47,.36); }

/* Inputs (apenas branco/vermelho/preto) */
.form-label { color: #e6e6e8; }
.auth-card .form-label { color: #e6e6e8; }
.form-control, .form-select {
  background: #0f1012; color: var(--text); border-color: #2a2b2e;
  border-radius: 14px; padding: .7rem 1rem;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease, color .25s ease;
  caret-color: var(--primary);
}
.form-control::placeholder { color: #9a9aa0; transition: color .25s ease; }
.form-control:hover { background-color: #111215; }
.form-control:focus, .form-select:focus {
  background-color: #121316; /* mantém escuro, sem flash branco */
  border-color: var(--primary);
  box-shadow: 0 0 0 .25rem rgba(209,15,47,.17), inset 0 0 0 1px rgba(255,255,255,.12);
}
/* Evitar branco no autofill (Chrome/Safari) */
input.form-control:-webkit-autofill,
input.form-control:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0f1012 inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--primary);
  transition: background-color 5000s ease-in-out 0s;
}

.auth-sep { height: 2px; background: linear-gradient(90deg, rgba(212,175,55,.0), rgba(212,175,55,.8), rgba(209,15,47,.85), rgba(212,175,55,.8), rgba(212,175,55,.0)); border-radius: 999px; }

.alert-danger { background: #2a0c12; color: #ffd1d8; border-color: #3a0f16; border-radius: 12px; }

/* Acessibilidade e responsividade */
img { max-width: 100%; height: auto; }
.container { max-width: 1140px; }

/* Links */
a { color: #ff3b57; }
a:hover { color: #ff5c74; }

/* Lux theme touches (dourado/vermelho/preto) */
.text-gold { color: #d4af37; }
.link-gold { color: #e0b84b; text-decoration: none; }
.link-gold:hover { color: #f1cc6b; text-decoration: underline; }

/* Footer elegante refinado */
.site-footer { position: relative; }
.site-footer::before {
  content: "";
  position: absolute; inset: 0 auto auto 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(209,15,47,.6), transparent);
  opacity: .45;
}
.site-footer .container { max-width: 1140px; }
.footer-brand .footer-title { color: #ffffff; font-weight: 800; letter-spacing: .12em; font-size: .95rem; }
.footer-logo { height: 34px; filter: drop-shadow(0 2px 10px rgba(0,0,0,.35)); }
.footer-meta .small { color: #e8e8ea; opacity: .9; letter-spacing: .08em; text-transform: uppercase; }

/* Footer panel elegante (vidro + gradiente) */
.footer-panel {
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00));
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.footer-logo { height: 38px; filter: drop-shadow(0 2px 10px rgba(0,0,0,.35)); }
.footer-meta .small { color: #f1f1f3; opacity: .9; }

/* --- Footer clean & modern (overrides) --- */
.site-footer { background: #0b0b0c; border-top: 0; }
.site-footer::before { display: none; content: none; }
.footer-panel { background: transparent; backdrop-filter: none; border: 0; border-radius: 0; box-shadow: none; padding: 8px 0; }
.site-footer .container { max-width: 1200px; gap: 1rem; }
.footer-logo { height: 40px; filter: none; }
.footer-sep { height: 1px; background: rgba(255,255,255,.08); border-radius: 999px; }
.footer-meta .small { color: var(--muted); opacity: .95; letter-spacing: .02em; text-transform: none; }
.footer-brand .footer-title { letter-spacing: .08em; font-size: .95rem; }

/* Footer centrado e elegante */
.footer-center .footer-title { color: #fff; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; font-size: .9rem; opacity: .9; }
.footer-center .footer-meta { color: var(--muted); }
.footer-center .footer-sep { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); border-radius: 999px; }
.footer-center .footer-logo { height: 42px; }

/* Interações elegantes no footer */
.footer-logo { height: 42px; transition: transform .25s ease, filter .25s ease; }
.footer-logo-link { display: inline-flex; align-items: center; border-radius: 8px; outline: none; }
.footer-logo-link:hover .footer-logo,
.footer-logo-link:focus .footer-logo,
.footer-logo-link:focus-visible .footer-logo { transform: translateY(-1px) scale(1.02); filter: drop-shadow(0 0 10px rgba(209,15,47,.35)); }
.footer-logo-link:focus-visible { box-shadow: 0 0 0 3px rgba(209,15,47,.28); }

.footer-center .footer-title { margin-top: 4px; letter-spacing: .2em; }
.footer-center .footer-sep { height: 1px; background-size: 200% 100%; background-image: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent, rgba(209,15,47,.35), transparent, rgba(255,255,255,.22), transparent); animation: sepShimmer 6s linear infinite; }
@keyframes sepShimmer { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .footer-logo { transition: none; }
  .footer-logo-link:focus-visible { box-shadow: 0 0 0 2px rgba(209,15,47,.25); }
  .footer-center .footer-sep { animation: none; }
}

@media (max-width: 576px) {
  .site-footer .container { gap: .5rem; }
  .footer-meta { text-align: center !important; }
  .footer-brand { justify-content: center !important; }
  .footer-sep { display: none; }
  .auth-logo { max-height: 180px; }
} 

/* --- Login clean overrides --- */
.auth-card::before { display: none; }
.auth-card { box-shadow: 0 10px 28px rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.05); }
.auth-card h2 { color: #fff; font-weight: 700; letter-spacing: .04em; }
.auth-card .form-label { color: #e9e9ea; }
.form-control, .form-select { background: #0e0f11; color: #ffffff; border-color: #2a2b2e; }
.form-control::placeholder { color: #cfcfd2; }
.form-control:focus, .form-select:focus { background-color: #101113; }
/* Garantir texto branco no autofill */
input.form-control:-webkit-autofill,
input.form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #0e0f11 inset !important;
} 

/* Forçar texto branco nos inputs do login e otimizar foco em dark */
.auth-card input,
.auth-card textarea,
.auth-card select,
.auth-card .form-control,
.auth-card .form-select {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff; /* WebKit */
  caret-color: var(--primary);
  color-scheme: dark; /* sugestão ao UA para palete escura */
}
.auth-card .form-control::placeholder { color: #dfe0e3; }

/* Autofill (reforço) */
.auth-card input.form-control:-webkit-autofill,
.auth-card input.form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #0e0f11 inset !important;
} 

/* Fade para preto no fundo do login (transição suave até ao footer) */
.auth-hero { position: relative; }
.auth-overlay { z-index: 0; }
.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, rgba(11,11,12,0) 0%, rgba(11,11,12,.6) 70%, #0b0b0c 100%);
}
.auth-hero > .container { position: relative; z-index: 1; } 

/* --- Bordas elegantes do cartão de login --- */
.auth-card {
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 14px 42px rgba(0,0,0,.55), inset 0 0 0 1px rgba(209,15,47,.06);
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(209,15,47,.18) 60%, rgba(255,255,255,.12));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}

/* Inputs com bordas mais elegantes */
.auth-card .form-control, .auth-card .form-select {
  border-radius: 16px;
  border: 1px solid #2c2d31;
}
.auth-card .form-control:hover, .auth-card .form-select:hover { border-color: #34363a; }
.auth-card .form-control:focus, .auth-card .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .22rem rgba(209,15,47,.16), inset 0 0 0 1px rgba(255,255,255,.10);
} 

/* --- Card-body moderno + borda neon colada --- */
.auth-card .card-body { position: relative; overflow: visible; }
/* desativa o contorno anterior para evitar conflito */
.auth-card .card-body::before { display: none; }
/* neon colado à borda do card-body */
.auth-card .card-body::after {
  content: "";
  position: absolute;
  inset: -1px; /* cola o neon à borda (1px para cobrir o hairline) */
  border-radius: 19px; /* 1px acima do body (18px) para casar */
  border: 1px solid #d10f2f;
  box-shadow:
    0 0 10px rgba(209,15,47,.70),
    0 0 22px rgba(209,15,47,.45),
    inset 0 0 0 1px rgba(255,255,255,.05);
  pointer-events: none;
  animation: neonPulse 3s ease-in-out infinite;
}
@keyframes neonPulse {
  0%, 100% {
    opacity: .65;
    box-shadow:
      0 0 10px rgba(209,15,47,.70),
      0 0 22px rgba(209,15,47,.45),
      inset 0 0 0 1px rgba(255,255,255,.05);
  }
  50% {
    opacity: 1;
    box-shadow:
      0 0 14px rgba(209,15,47,.85),
      0 0 34px rgba(209,15,47,.55),
      inset 0 0 0 1px rgba(255,255,255,.07);
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-card .card-body::after { animation: none; }
} 

/* Admin layout sem header: sidebar colapsável */
.admin-body { background: var(--bg-dark); }
.admin-layout { min-height: 100vh; }
/* FAB mobile minimal elegante */
.mobile-sidebar-fab { position: fixed; z-index: 1040; bottom: 18px; right: 18px; width: 54px; height: 54px; border-radius: 16px; background: rgba(17,18,20,.72); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 14px 28px rgba(0,0,0,.32); display: none; align-items: center; justify-content: center; font-size: 0; }
.mobile-sidebar-fab::before { content: ""; display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; box-shadow: 0 6px 0 #fff, 0 -6px 0 #fff; }
.mobile-sidebar-fab:hover { background: rgba(20,21,24,.82); box-shadow: 0 16px 32px rgba(0,0,0,.36); }
@media (max-width: 992px){ .mobile-sidebar-fab { display: inline-flex; } }
/* Mostrar também em desktop quando escondido (como antes) */
.sidebar-hidden .mobile-sidebar-fab { display: inline-flex; top: 16px; left: 16px; right: auto; bottom: auto; width: 42px; height: 42px; border-radius: 12px; }
.sidebar { width: 250px; flex: 0 0 250px; background: #0d0d0f; border-right: 1px solid #1a1b1e; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding-bottom: 1rem; transition: width .25s ease, transform .25s ease, opacity .25s ease; will-change: transform, opacity; }
.sidebar-logo { height: 72px; }
.sidebar .sidebar-brand { border-bottom: 1px solid #1a1b1e; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 .5rem 4.5rem; }
.sidebar-link { color: #e7e7ea; text-decoration: none; padding: .625rem .75rem; border-radius: 10px; display: block; position: relative; }
.sidebar-link:hover { background: #151517; color: #fff; }
.sidebar-link.active { background: linear-gradient(180deg, #1a1b1e, #16171a); color: #fff; box-shadow: inset 0 0 0 1px rgba(209,15,47,.40), 0 6px 14px rgba(0,0,0,.25); }
.sidebar-link.active::before { content:""; position:absolute; left:0; top:10%; bottom:10%; width:3px; border-radius:2px; background: #d10f2f; }
.sidebar-toggle { border-color: #2a2b2e; color: #e7e7ea; border-radius: 12px; padding: .35rem .55rem; line-height: 1; background: rgba(255,255,255,.04); backdrop-filter: blur(6px); box-shadow: 0 8px 18px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.06); transition: transform .2s ease, box-shadow .25s ease, background-color .2s ease; }
.sidebar-toggle:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,.08); background: rgba(255,255,255,.06); }
.sidebar-toggle:active { transform: translateY(0); box-shadow: 0 6px 14px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.06); }
.sidebar-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(209,15,47,.28); }
.admin-main { padding: 1rem; }

/* Colapsado */
.sidebar-collapsed .sidebar { width: 64px; }
.sidebar-collapsed .sidebar .sidebar-brand { justify-content: center; }
.sidebar-collapsed .sidebar .sidebar-link { text-align: center; padding-left: .5rem; padding-right: .5rem; }
/* Ocultar sidebar totalmente em desktop quando escondida explicitamente */
.sidebar-hidden .sidebar { width: 0; flex: 0 0 0; overflow: hidden; border-right: 0; transform: translateX(-100%); opacity: 0; pointer-events: none; position: fixed; left: -260px; }
.sidebar.is-hidden { width: 0 !important; flex: 0 0 0 !important; transform: translateX(-100%) !important; opacity: 0 !important; pointer-events: none !important; position: fixed !important; left: -260px !important; }
@media (max-width: 992px) {
  .sidebar { position: fixed; z-index: 1031; left: 0; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1030; opacity: 0; transition: opacity .25s ease; }
  .sidebar-open #sidebarBackdrop { opacity: 1; }
  .sidebar-open #sidebarBackdrop[hidden] { display: block; }
  .admin-main { padding: 1rem; margin-left: 0; }
} 

/* --- Admin: palete refinada para maior contraste e elegância --- */
.admin-main h1, .admin-main h2, .admin-main h3, .admin-main h4 { color: #ffffff; letter-spacing: .02em; }
.admin-main .text-muted { color: #d2d2d6 !important; opacity: .9; }

/* Cartões */
.admin-main .card { background: #141416; border: 1px solid #292a2e; box-shadow: 0 10px 24px rgba(0,0,0,.28); border-radius: 14px; }
.kpi-card { transition: transform .2s ease, box-shadow .25s ease; display: block; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0,0,0,.35); }
.kpi-card:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(209,15,47,.28); }
.admin-main .card-header { background: #101114; color: #ffffff; border-bottom: 1px solid #2a2b30; font-weight: 700; letter-spacing: .02em; }
.admin-main .card .card-body { color: #f1f1f3; }

/* Tabelas */
.admin-main .table { color: #f0f0f2; }
.admin-main .table thead th { background: #121317; color: #ececef; border-color: #2d2f34; font-weight: 700; letter-spacing: .02em; }
.admin-main .table tbody tr { background: #141519; }
.admin-main .table-striped tbody tr:nth-of-type(odd) { background-color: #121317; }
.admin-main .table-hover tbody tr:hover { background-color: #1a1c22; }
.admin-main .table td { border-color: #2a2c31; }

/* Inputs nos painéis */
.admin-main .form-control, .admin-main .form-select { background: #101114; color: #ffffff; border-color: #2a2b2e; }
.admin-main .form-control:hover, .admin-main .form-select:hover { background: #111215; }
.admin-main .form-control:focus, .admin-main .form-select:focus { background: #121316; border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(209,15,47,.16), inset 0 0 0 1px rgba(255,255,255,.08); }

/* Botões no contexto admin */
.admin-main .btn-primary { background-color: var(--primary); border-color: var(--primary-600); }
.admin-main .btn-primary:hover { background-color: var(--primary-600); }
.admin-main .btn-outline-secondary { color: #e7e7ea; border-color: #3a3b40; }
.admin-main .btn-outline-secondary:hover { background: #1a1b1f; color: #fff; border-color: #46484e; }

/* Espaçamento do conteúdo */
.admin-main { padding: 1.25rem; } 

/* Botão destacar adicionar utilizador */
.btn-add-user { background: linear-gradient(180deg, #d10f2f, #b60d29); color: #fff; padding: .5rem .9rem; border-radius: 12px; box-shadow: 0 12px 26px rgba(209,15,47,.32); border: 0; font-weight: 700; letter-spacing: .02em; }
.btn-add-user:hover { color: #fff; background: linear-gradient(180deg, #db1435, #bf1030); box-shadow: 0 14px 30px rgba(209,15,47,.38); }
.btn-add-user:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(209,15,47,.28); }

/* Select com seta personalizada */
.select-chevron { position: relative; }
.select-chevron::after { content: "\25BE"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #cfcfd4; pointer-events: none; font-size: .9rem; }
.select-chevron > select { padding-right: 2rem; appearance: none; -webkit-appearance: none; -moz-appearance: none; background-color: #0f1012; color: #fff; border-color: #2a2b2e; }
.select-chevron > select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(209,15,47,.18), inset 0 0 0 1px rgba(255,255,255,.08); } 

/* Ações de tabela elegantes */
.btn-table-edit { background: #0f1012; color: #fff; border: 0; border-radius: 10px; padding: .35rem .6rem; box-shadow: 0 6px 16px rgba(0,0,0,.28); }
.btn-table-edit:hover { background: #1a1b1f; color: #fff; box-shadow: 0 8px 18px rgba(0,0,0,.32); }
.btn-table-edit:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.12); }

.btn-table-delete { background: #d10f2f; color: #fff; border: 0; border-radius: 10px; padding: .35rem .6rem; box-shadow: 0 6px 16px rgba(209,15,47,.28); }
.btn-table-delete:hover { background: #b60d29; color: #fff; box-shadow: 0 8px 18px rgba(209,15,47,.32); }
.btn-table-delete:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(209,15,47,.28); }

/* Contraste ao hover da linha com botões escuros/vermelhos */
.table-hover tbody tr:hover { background-color: #f5f5f7; color: #0e0f11; }
.table-hover tbody tr:hover .btn-table-edit { background: #0e0f11; }
.table-hover tbody tr:hover .btn-table-delete { background: #d10f2f; } 

/* Centro vertical para ecrãs médios/grandes no edit */
@media (min-width: 992px) {
  .admin-edit-center { min-height: calc(100vh - 120px); display: flex; align-items: center; }
  .admin-edit-center > .card { width: 100%; }
} 

/* Toggle seta na borda da sidebar */
.sidebar-edge-toggle { position: absolute; right: -14px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; background: #101114; color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.35); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; cursor: pointer; }
.sidebar-edge-toggle:hover { background: #15171b; }
.sidebar-hidden .sidebar-edge-toggle { right: -14px; }
/* Orientação da seta conforme estado */
body:not(.sidebar-hidden) .sidebar-edge-toggle { content: '‹'; }
body.sidebar-hidden .sidebar-edge-toggle { content: '›'; }

@media (max-width: 992px){
  .sidebar-edge-toggle { display: none; }
} 

/* Botão flutuante de seta (desktop) */
.sidebar-edge-floating { position: fixed; left: 252px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(17,18,20,.72); backdrop-filter: blur(6px); color: #fff; box-shadow: 0 10px 22px rgba(0,0,0,.28); display: none; align-items: center; justify-content: center; font-size: 0; z-index: 1040; cursor: pointer; transition: transform .2s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, opacity .2s ease, left .25s ease; opacity: .96; }
.sidebar-edge-floating::before { content: ""; display: inline-block; width: 12px; height: 12px; border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(135deg); margin-left: 2px; border-radius: 1px; filter: drop-shadow(0 0 6px rgba(255,255,255,.45)); }
.sidebar-edge-floating:hover { transform: translateY(-50%) translateX(1px); box-shadow: 0 18px 36px rgba(0,0,0,.46), 0 0 0 1px rgba(255,255,255,.08) inset; background: #121317; opacity: 1; }
@media (min-width: 992px){ .sidebar-edge-floating { display: inline-flex; } .sidebar-hidden .sidebar-edge-floating { display: inline-flex; left: 16px; } }
@media (max-width: 992px){ .sidebar-edge-floating { display: none !important; } } 

/* Remover item (orders create) */
.btn-remove-item { width: 32px; height: 32px; padding: 0; border-radius: 10px; border: 1px solid rgba(255,255,255,.10); background: rgba(20,21,24,.72); box-shadow: 0 8px 18px rgba(0,0,0,.28); display: inline-block; position: relative; }
.btn-remove-item::before, .btn-remove-item::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; background: #fff; border-radius: 2px; transform-origin: center; }
.btn-remove-item::before { transform: translate(-50%, -50%) rotate(45deg); }
.btn-remove-item::after { transform: translate(-50%, -50%) rotate(-45deg); }
.btn-remove-item:hover { background: rgba(22,23,26,.86); }
.btn-remove-item:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(209,15,47,.28); }

/* Separador subtil entre itens (orders create) */
#orderItems .order-item-row { border-top: 1px solid rgba(255,255,255,.06); padding-top: 8px; margin-top: 8px; }
#orderItems .order-item-row:first-child { border-top: 0; padding-top: 0; margin-top: 0; } 

/* Centro vertical genérico para forms (criar/editar) */
@media (min-width: 992px) {
  .admin-form-center { min-height: calc(100vh - 120px); display: flex; flex-direction: column; justify-content: center; align-items: center; }
  .admin-form-center > .container-narrow { width: 100%; max-width: 720px; }
} 

/* Scrollbar escura e clean (global) */
html {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #2a2b2e transparent; /* polegar e trilho */
}
html::-webkit-scrollbar { width: 12px; height: 12px; }
html::-webkit-scrollbar-track { background: #0b0b0c; }
html::-webkit-scrollbar-thumb {
  background-color: #2a2b2e;
  border-radius: 10px;
  border: 2px solid #0b0b0c;
}
html::-webkit-scrollbar-thumb:hover { background-color: #3a3b40; }

/* Scrollbar escura e clean (sidebar) */
.sidebar {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #2a2b2e transparent;
}
.sidebar::-webkit-scrollbar { width: 10px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
  background-color: #2a2b2e;
  border-radius: 8px;
  border: 2px solid #0d0d0f;
}
.sidebar::-webkit-scrollbar-thumb:hover { background-color: #3a3b40; } 

/* Separadores subtis em tabelas e listas (tema escuro) */
.table-dark > :not(caption) > * > * { border-color: rgba(255,255,255,.08) !important; }
.table-dark thead th { border-bottom: 1px solid rgba(255,255,255,.10); }
.table-dark tbody tr + tr { border-top: 1px solid rgba(255,255,255,.08); }
.list-group-flush .list-group-item { background-color: transparent; border-color: rgba(255,255,255,.08); color: var(--text); } 

.table.table-dark th,
.table.table-dark td { vertical-align: middle; }
.table.table-dark th.text-end,
.table.table-dark td.text-end { text-align: right; }

/* Larguras consistentes para colunas numéricas em resumos */
.table.table-dark th.col-num,
.table.table-dark td.col-num { width: 120px; }
.table.table-dark th.col-num-sm,
.table.table-dark td.col-num-sm { width: 90px; }

/* Evitar quebra de números longos */
.table.table-dark td.text-end { white-space: nowrap; } 

/* Ícone do input date a branco para modo escuro */
input[type="date"].form-control::-webkit-calendar-picker-indicator {
	filter: invert(1) brightness(1.8);
	opacity: .95;
}
/* Firefox - usa color-scheme para UI nativa clara no escuro */
input[type="date"].form-control { color-scheme: dark; } 

/* Wrapper e emoji para substituir o ícone do input date */
.date-emoji-wrap { position: relative; }
.date-emoji-wrap > .form-control { padding-right: 3rem; }
.date-emoji-hide-native::-webkit-calendar-picker-indicator { opacity: 0; }
.date-emoji-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.10); background: #1a1b1f; color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0,0,0,.28); }
.date-emoji-btn:hover { background: #202127; }
.date-emoji-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(209,15,47,.28); } 

/* Esconder COMPLETAMENTE o ícone nativo no date quando usamos o emoji custom */
input[type="date"].date-emoji-hide-native { -webkit-appearance: none; appearance: none; background-image: none; }
input[type="date"].date-emoji-hide-native::-webkit-calendar-picker-indicator { display: none !important; opacity: 0 !important; pointer-events: none !important; }
input[type="date"].date-emoji-hide-native::-webkit-inner-spin-button { display: none !important; }
input[type="date"].date-emoji-hide-native::-webkit-clear-button { display: none !important; }
/* Edge (legacy) */
input[type="date"].date-emoji-hide-native::-ms-expand { display: none !important; } 

/* --- Vendas: toggle Parceria elegante --- */
.btn-parceria { border-radius: 12px; font-weight: 600; letter-spacing: .02em; }
.btn-check:checked + .btn-parceria {
  background-color: var(--primary);
  border-color: var(--primary-600);
  color: #fff;
  box-shadow: 0 10px 24px rgba(209,15,47,.28);
}
.btn-parceria .state-on { display: none; }
.btn-check:checked + .btn-parceria .state-on { display: inline; }
.btn-check:checked + .btn-parceria .state-off { display: none; }