/* =========================================================
   BASE / RESET - IGUAL AO PRINT
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #242222;
  color: #f4f4f4;
}

/* ZOOM -20% SÓ NO PAINEL */
body.painel-zoom {
  zoom: 0.8;
}

/* Fallback para navegadores que não suportam zoom (ex.: Firefox) */
@supports not (zoom: 1) {
  body.painel-zoom {
    transform: scale(0.8);
    transform-origin: top left;
  }
}

/* =========================================================
   LAYOUT GERAL (sidebar ícones + conteúdo)
   ========================================================= */

.app-shell {
  display: flex;
  min-height: 100vh;
}

html, body {
  height: 100%;
}

.app-shell {
  height: 100%;
  display: flex;
}

.side-nav {
  height: 100%;
  width: 75px;
  background: #101010;
  border-right: 1px solid #1c1c1c;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
}



.side-logo {
  padding: 10px 0 8px;
}

.side-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #292929;
}

.side-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.side-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid #555555;
  background: #ffffffca;
  color: #eee;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
}

.side-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.side-btn:hover {
  background: #fffefe;
  border-color: #39f128be;
  transform: translateY(-1px);
}

.side-btn.is-active {
  background: #222;
  border-color: #333;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* conteúdo principal */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   TOPBAR – IGUAL AO PRINT
   ========================================================= */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  background: #111;
  border-bottom: 1px solid #1c1c1c;
  gap: 12px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* área da busca no topo */
.topbar-left {
  flex: 1;
  min-width: 0;
}

.topbar-search {
  flex: 1;
}

.top-search-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #262626;
  background: #0f0f0f;
  color: #f0f0f0;
  font-size: 13px;
}

.top-search-input::placeholder {
  color: #777;
}

/* pílulas do topo */
.top-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: #171717;
  border: 1px solid #262626;
  font-size: 11px;
  color: #d3d3d3;
  white-space: nowrap;
}

.top-pill-success {
  background: #122115;
  border-color: #244b2a;
  color: #bafcbf;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-user img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #333;
}

.topbar-user span {
  font-size: 13px;
}

/* =========================================================
   MAIN AREA
   ========================================================= */

.main-area {
  flex: 1;
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

/* =========================================================
   CARD GENÉRICO / SEÇÕES
   ========================================================= */

.section {
  background: #101010;
  border-radius: 12px;
  border: 1px solid #1d1d1d;
  padding: 14px 16px 18px;
}

/* =========================================================
   NOTIFICAÇÕES (CARD IGUAL AO PRINT)
   ========================================================= */

.notifications-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.notifications-header h3 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d3d3d3;
}

.notifications-count {
  font-size: 11px;
  color: #a5a5a5;
}

.notifications-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px);
}

.notification-card {
  background: #141414;
  border-radius: 10px;
  border: 1px solid #222;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-card.is-unread {
  border-color: #2f4b32;
  box-shadow: 0 0 0 1px rgba(132, 197, 138, 0.15);
}

.notification-title {
  font-size: 13px;
  font-weight: 500;
}

.notification-body {
  font-size: 12px;
  color: #bdbdbd;
}

.notification-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #888;
}

/* =========================================================
   GRID DE MÓDULOS (BOTÕES NO MEIO)
   ========================================================= */

.modules-section + .modules-section {
  margin-top: 40px; /* espaço entre categorias */
}

.modules-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b3b3b3;
  margin: 0 0 8px 2px;
}

/* GRID – cards ~30% menores */
.modules-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

/* cada card */
.module-card {
  background: transparent;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

/* link cobre o card todo */
.module-card-link {
  display: block;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
}

/* área da imagem */
.module-card-thumb {
  position: relative;
  width: 100%;
  padding-top: 64%; /* altura do card - igual print */
  overflow: hidden;
}

/* imagem ocupa 100% */
.module-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* overlay embaixo com gradiente (se quiser texto depois) */
.module-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
}

.module-card-title {
  font-size: 13px;
  font-weight: 500;
  color: #f5f5f5;
}

/* hover igual print */
.module-card-link:hover {
  outline: 1px solid #363636;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.8);
  transform: translateY(-1px);
  transition:
    outline 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.12s ease;
}

/* TAG ONLINE NO CANTO */
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tag-novo {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #00ffff;
  color: #009266;
  z-index: 2;
}

.tag-online {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #00ff1e;
  color: #007209;
  z-index: 2;
}

.tag-offline {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff0000;
  color: #ffa4a4;
  z-index: 2;
}

.tag-manutencao {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff7700;
  color: #ffeaa4;
  z-index: 2;
}

/* =========================================================
   MODAL (FLOAT / GERAL)
   ========================================================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(3px);
}

.modal-content {
  background: #111;
  margin: 40px auto;
  padding: 16px 18px;
  border-radius: 12px;
  max-width: 760px;
  border: 1px solid #262626;
  color: #f5f5f5;
}

.modal-content .close {
  float: right;
  font-size: 24px;
  cursor: pointer;
  color: #b2b2b2;
}

.modal-content .close:hover {
  color: #fff;
}

/* =========================================================
   SCROLLBAR PRINCIPAL
   ========================================================= */

.main-area::-webkit-scrollbar {
  width: 8px;
}

.main-area::-webkit-scrollbar-track {
  background: transparent;
}

.main-area::-webkit-scrollbar-thumb {
  background: #6e6d6d;
  border-radius: 999px;
}

/* =========================================================
   FLOAT LOGIN (CARD CENTRAL AO LOGAR)
   ========================================================= */

.login-float-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.login-float-card {
  background: #111;
  border-radius: 16px;
  border: 1px solid #262626;
  padding: 18px 20px 16px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.9);
  position: relative;
}

.login-float-close-x {
  position: absolute;
  top: 8px;
  right: 10px;
  cursor: pointer;
  font-size: 20px;
  color: #999;
}

.login-float-close-x:hover {
  color: #fff;
}

.login-float-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3b1d11;
  color: #f0b58b;
  font-weight: 700;
  margin-bottom: 10px;
}

.login-float-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.login-float-body {
  font-size: 13px;
  color: #ddd;
  line-height: 1.5;
  margin-bottom: 12px;
}

.login-float-btn-ok,
.login-float-action-btn {
  border-radius: 999px;
  border: 1px solid #2d2d2d;
  background: #181818;
  color: #f5f5f5;
  font-size: 13px;
  padding: 7px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-float-btn-ok:hover,
.login-float-action-btn:hover {
  background: #222;
}

/* =========================================================
   REVENDEDOR – GRID / CARDS (DO SEU CSS ANTIGO)
   ========================================================= */

#revendedorArea {
  margin-top: 16px;
}

.rev-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr);
  gap: 14px;
}

.card {
  background: #050810;
  border-radius: 12px;
  border: 1px solid #151c26;
  padding: 10px 12px 12px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-title {
  font-size: 14px;
  font-weight: 500;
}

.card-sub {
  font-size: 12px;
  color: #9ea6b7;
}

/* tabela responsiva dentro dos cards */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table thead {
  background: #080d15;
}

.table th,
.table td {
  padding: 6px 6px;
  border-bottom: 1px solid #151c24;
  text-align: left;
}

.table th {
  font-weight: 500;
  color: #aab3c5;
}

/* métricas de saldo */
.metrics {
  display: flex;
  gap: 14px;
}

.metric-label {
  font-size: 12px;
  color: #98a4b7;
}

.metric-value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 2px;
}

.metric-extra {
  font-size: 11px;
  color: #808a9b;
  margin-top: 2px;
}

/* formulário de criação de usuário */
.form-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.field label {
  display: block;
  font-size: 11px;
  margin-bottom: 4px;
  color: #9ca6b7;
}

.field input,
.field select,
textarea {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #1b2431;
  background: #050911;
  color: #f5f5f5;
  font-size: 12px;
}

.field input:focus,
.field select:focus,
textarea:focus {
  outline: none;
  border-color: #2b8cff;
}

/* botões genéricos do painel */
.btn {
  border-radius: 6px;
  border: 1px solid #293447;
  background: #111722;
  color: #e6edf7;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition:
    background 0.12s ease,
    transform 0.1s ease,
    border-color 0.12s ease;
}

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

.btn.xs {
  font-size: 11px;
  padding: 4px 8px;
}

.btn.secondary {
  background: transparent;
  border-color: #374356;
}

.btn:hover {
  transform: translateY(-1px);
  background: #182030;
}

/* card de tabela de valores */
.rev-pricing-card {
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid #1b2433;
  background: #050810;
  padding: 8px 10px 10px;
}

.rev-pricing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.rev-pricing-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c2ccdd;
}

.rev-pricing-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #153419;
  color: #a9ffb0;
}

#revCompartilharTexto {
  font-size: 12px;
}

/* =========================================================
   VIEW COMPARA 99 x UBER (DO SEU CSS ANTIGO)
   ========================================================= */

.view.hidden {
  display: none;
}

.c99x-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 16px;
  padding: 18px;
  background: #05070c;
}

.c99x-left,
.c99x-right {
  background: #050810;
  border-radius: 12px;
  border: 1px solid #151c26;
  padding: 12px 14px;
}

.c99x-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.c99x-subtitle {
  margin: 0 0 10px;
  font-size: 13px;
  color: #a1acbd;
}

.c99x-textarea {
  width: 100%;
  min-height: 160px;
  padding: 8px 10px;
  background: #050911;
  border-radius: 8px;
  border: 1px solid #1c2433;
  color: #f5f5f5;
  font-size: 12px;
}

.c99x-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.c99x-btn {
  border-radius: 6px;
  border: 1px solid #293447;
  background: #111722;
  color: #e6edf7;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.c99x-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.c99x-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.c99x-block h3 {
  margin: 0 0 4px;
  font-size: 13px;
}

.c99x-result {
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  max-height: 140px;
  overflow-y: auto;
  position: relative;
}

.c99x-green {
  background: #0c1910;
  border: 1px solid #254730;
}

.c99x-blue {
  background: #0c151f;
  border: 1px solid #28456b;
}

.c99x-yellow {
  background: #18170a;
  border: 1px solid #6a5e1f;
}

.c99x-red {
  background: #1b0b0b;
  border: 1px solid #663131;
}

.c99x-gray {
  background: #111317;
  border: 1px solid #303540;
}

.c99x-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.c99x-copy {
  position: absolute;
  top: 6px;
  right: 6px;
  border-radius: 999px;
  border: 1px solid #293447;
  background: #05080f;
  color: #e6edf7;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
}

.c99x-right .c99x-subtitle {
  margin-bottom: 8px;
}

.c99x-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 12px;
}

.c99x-legend {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  font-size: 12px;
}

.c99x-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.c99x-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.c99x-dot--green {
  background: #45cf67;
}

.c99x-dot--blue {
  background: #3a8dff;
}

.c99x-dot--yellow {
  background: #f5d657;
}

.c99x-dot--red {
  background: #ff4b4b;
}

.c99x-tip {
  font-size: 12px;
  color: #9ca6b7;
}

/* =========================================================
   RESPONSIVO BÁSICO
   ========================================================= */

/* aqui você pode adicionar ajustes mobile depois se quiser */



/* =========================
   ZOOM GLOBAL -10% (PERFEITO)
   ========================= */

body.painel-zoom {
  overflow: hidden; /* evita scroll fantasma */
}

/* Wrapper real do layout */
body.painel-zoom .app-shell {
  zoom: 0.9; /* Chrome / Edge */
}

/* Fallback Firefox */
@supports not (zoom: 1) {
  body.painel-zoom .app-shell {
    transform: scale(0.9);
    transform-origin: top center;
    width: 111.111%; /* 1 / 0.9 */
    margin-left: -5.555%;
  }
}



.notifications-section {
    margin-bottom: 25px;
}

.notifications-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notifications-list {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-behavior: smooth;

    padding: 10px 5px;

    /* remove scroll feio */
    scrollbar-width: none; 
}
.notifications-list::-webkit-scrollbar {
    display: none;
}

/* ===== CARDS ===== */
.notification-card {
    min-width: 280px;
    max-width: 280px;

    background: #111;
    border: 1px solid #2a2a2a;
    padding: 14px;
    border-radius: 12px;

    flex-shrink: 0;  /* impede quebrar linha */

    animation: fadeIn .4s ease;
}

.notification-card .notification-title {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
}
.notification-card .notification-body {
    margin: 8px 0;
    font-size: 13px;
    opacity: .8;
}
.notification-card .notification-meta {
    font-size: 12px;
    opacity: .6;
}

/* ===== Botões Navegação ===== */
.nav-btn {
    background: #222;
    border: none;
    color: #fff;
    font-size: 26px;
    height: 40px;
    width: 40px;
    border-radius: 10px;
    cursor: pointer;
    margin: 0 5px;

    transition: background .2s;
}
.nav-btn:hover {
    background: #333;
}

/* animação */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
