﻿/* ==========================================================================
   Visual "fintech dark" do painel (inspirado no LofyPay).
   Carrega depois do style.css e antes do mobile.css, então o mobile continua mandando no celular.
   Para trocar a cor de destaque, mude só --accent / --accent-soft abaixo.
   ========================================================================== */
:root {
  --bg: #09090b;
  --bg-alt: #0f0f12;
  --bg-card: #0c0c0f;
  --bg-sidebar: #09090b;
  --bg-hover: #16161a;
  --accent: #0c46e7;
  --accent-hover: #1055e9;
  --accent-soft: rgba(12,70,231, .14);
  --accent-text: #6c9bff;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --border: #1f1f24;
  --border-strong: #2a2a31;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 12px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  background-image: none;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
body:before { display: none; }

h2 { font-size: 26px; font-weight: 700; letter-spacing: -.4px; }
h3 { font-weight: 600; letter-spacing: -.1px; }

/* ---------- topbar: fina, sem sombra, só uma linha embaixo ---------- */
.topbar {
  height: 56px;
  padding: 0 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar .brand { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.topbar .brand span.mark:after { box-shadow: none; width: 6px; height: 6px; }
.topbar a.brand-btn { padding: 6px 10px; border: 0; background: transparent; border-radius: 8px; }
.topbar a.brand-btn:hover { background: var(--bg-hover); border-color: transparent; transform: none; }
.topbar .user > a { padding: 7px 11px; border-radius: 8px; font-size: 13px; color: var(--text-muted); }
.topbar .user > a:hover { background: var(--bg-hover); color: var(--text); }
.user-chip { background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px 3px 3px; }
.user-chip:hover { border-color: var(--border-strong); }
.user-chip span { font-weight: 500; }

/* ---------- menu lateral ---------- */
@media (min-width: 901px) {
  .app-shell { min-height: calc(100vh - 56px); }
  .app-sidebar {
    width: 240px;
    top: 56px;
    height: calc(100vh - 56px);
    min-height: 0;
    overflow-y: auto;
    padding: 14px 12px 24px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
  }
  .app-main { padding: 28px 32px 90px; }
}

.sidebar-guild {
  padding: 8px 10px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.sidebar-guild:hover { border-color: var(--border-strong); transform: none; background: var(--bg-hover); }
.sidebar-guild img, .sidebar-guild .icon-fallback { width: 34px; height: 34px; border-radius: 10px; }
.sidebar-guild-info strong { font-size: 13px; font-weight: 600; }
.sidebar-guild-info span { font-size: 11px; }
.sidebar-guild:hover .sidebar-guild-info span { color: var(--text-muted); }

.sidebar-nav { gap: 20px; }
.sidebar-group { gap: 1px; }
.sidebar-group-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #71717a;
  padding: 0 10px 6px;
}
.sidebar-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}
.sidebar-nav a:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-nav a.active { background: #18181c; color: var(--text); font-weight: 600; border-left: 0; }
.sidebar-icon img { opacity: .75; filter: grayscale(.2); }
.sidebar-nav a:hover .sidebar-icon img,
.sidebar-nav a.active .sidebar-icon img { opacity: 1; filter: none; }

/* ---------- cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.card h3 { border-left: 0; padding-left: 0; font-size: 15px; margin-bottom: 4px; }
.card > h3 + p, .card > h3 + .muted { margin-top: 0; }
.subcard { background: var(--bg-alt); border-color: var(--border); border-radius: 10px; }

.guild-card { background: var(--bg-card); border-radius: var(--radius); }
.guild-card:hover { transform: none; border-color: var(--accent); box-shadow: none; background: var(--bg-hover); }

/* faixa de números em um card só, dividida em colunas (como o "Saldo disponível / A receber...") */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.stat-strip .stat { padding: 18px 20px; border-left: 1px solid var(--border); min-width: 0; }
.stat-strip .stat:first-child { border-left: 0; }
.stat-strip .stat span { display: block; font-size: 12px; color: var(--text-muted); }
.stat-strip .stat strong { display: block; font-size: 22px; font-weight: 700; margin: 6px 0 4px; letter-spacing: -.3px; }
.stat-strip .stat small { color: #71717a; font-size: 11.5px; }

/* lista de linhas "rótulo ........ valor" (como o Resumo operacional) */
.kv-list { margin: 0; padding: 0; list-style: none; }
.kv-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.kv-list li:last-child { border-bottom: 0; }
.kv-list li b { color: var(--text); font-weight: 600; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h2 { margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--text-muted); }

/* ---------- botões ---------- */
.btn {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
}
.btn:hover { background: var(--accent-hover); box-shadow: none; }
.btn.secondary { background: transparent; border: 1px solid var(--border-strong); color: var(--text); }
.btn.secondary:hover { border-color: #3a3a44; background: var(--bg-hover); }
.btn.danger { background: #b42323; }
.btn.danger:hover { background: #c92a2a; }

/* ---------- formulários ---------- */
label { font-size: 12.5px; font-weight: 500; }
input[type=text], input[type=number], input[type=password], input[type=url], select, textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }

input[type=checkbox] { background: #1f1f25; border-color: var(--border-strong); }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }

.toggle-row { border-bottom-color: var(--border); padding: 12px 0; }

/* seletor pesquisável de cargos/canais */
.ms-box { background: var(--bg-alt); border-color: var(--border-strong); border-radius: 8px; }
.ms-box:hover { border-color: #3a3a44; }
.ms-chip { background: var(--accent-soft); border: 1px solid rgba(12,70,231, .35); border-radius: 999px; }
.ms-dropdown { background: #111114; border-color: var(--border-strong); border-radius: 10px; }
.ms-option:hover { background: var(--bg-hover); }
.ms-option.selected { color: var(--accent-text); }

/* barra de salvar */
.save-bar {
  background: rgba(12, 12, 15, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
}

/* tabelas e pills */
th { font-weight: 500; font-size: 12px; }
th, td { border-bottom-color: var(--border); }
.pill { background: transparent; border-color: var(--border-strong); }
.pill.on { border-color: rgba(34, 197, 94, .5); color: var(--green); }
.badge.ok { background: rgba(34, 197, 94, .12); }
.badge.no { background: rgba(239, 68, 68, .12); }

a.link, .link { color: var(--accent-text); }

/* login */
.login-box h1 { font-weight: 700; letter-spacing: -.5px; }

/* ---------- atalhos de módulos (tela inicial do servidor) ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.module-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background .15s, border-color .15s;
}
.module-tile:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.module-tile-icon { width: 34px; height: 34px; border-radius: 8px; background: #16161a; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.module-tile-icon img { width: 20px; height: 20px; object-fit: contain; }
.module-tile-label { flex: 1; font-weight: 500; font-size: 13.5px; min-width: 0; }
.module-tile-arrow { color: var(--text-muted); font-size: 13px; }
.module-tile:hover .module-tile-arrow { color: var(--accent-text); }

/* ==========================================================================
   Neutraliza o bloco de "polimento" antigo do style.css (gradientes, brilhos, barrinha no título)
   ========================================================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: none;
  padding: 22px 24px;
}
.card:hover { border-color: var(--border); }
.card h3 { display: block; font-size: 15px; letter-spacing: -.1px; margin-bottom: 6px; }
.card h3:before { content: none; display: none; }
.card p { line-height: 1.55; }

.sidebar-nav a { border: 1px solid transparent; border-radius: 8px; color: var(--text-muted); font-size: 13.5px; padding: 8px 10px; }
.sidebar-nav a:hover { background: var(--bg-hover); border-color: transparent; color: var(--text); }
.sidebar-nav a.active {
  background: #18181c;
  border-color: transparent;
  box-shadow: none;
  color: var(--text);
  font-weight: 600;
}
.sidebar-nav a .soon { font-size: 10px; }
.sidebar-icon { width: 22px; height: 22px; }
.sidebar-icon img { width: 19px; height: 19px; }
@media (min-width: 901px) {
  .app-sidebar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg-sidebar); padding: 14px 12px 24px; }
  .app-main { padding: 28px 32px 90px; }
  .app-main .container { max-width: 1180px; }
}
.sidebar-guild { padding: 8px 10px; }
.sidebar-guild-info strong { font-size: 13px; }

.guild-card,
.guild-card:nth-child(4),
.guild-card:nth-child(5) {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: none;
  min-height: 220px;
  padding: 22px;
}
.guild-card:hover { transform: none; background: var(--bg-hover); border-color: var(--border-strong); box-shadow: none; }
.guild-card img, .guild-card .icon-fallback { width: 64px; height: 64px; border: 0; box-shadow: none; border-radius: 16px; }

.btn {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
  box-shadow: none;
}
.btn:hover { background: var(--accent-hover); box-shadow: none; }
.btn.secondary { background: transparent; border: 1px solid var(--border-strong); box-shadow: none; }
.btn.secondary:hover { background: var(--bg-hover); border-color: #3a3a44; }
.btn.danger { background: #b42323; }
.topbar .user > a.btn.secondary { margin-left: 4px; padding: 6px 12px; color: var(--text); }

input[type=text], input[type=number], input[type=password], input[type=url], select, textarea {
  background: var(--bg-alt);
  padding: 9px 12px;
}
.badge { font-size: 11px; font-weight: 600; }
.badge.ok { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .2); color: #4ade80; }
.badge.no { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .2); color: #f87171; }
.app-main h2 { font-size: 26px; margin-bottom: 4px; }
.topbar .user > a.btn.secondary { display: inline-flex; align-items: center; height: 34px; line-height: 1; }

/* Builders em largura total (garante sobre o max-width:1180px do .app-main .container) */
@media (min-width: 901px) {
  .app-main .container.ticket-builder-page { max-width: none !important; width: 100% !important; }
}
.ticket-workspace[hidden], #editor[hidden] { display: none !important; }

/* Todas as páginas do painel em largura total (vence o max-width:1180px acima) */
@media (min-width: 901px) {
  .app-main .container { max-width: none !important; width: 100% !important; }
}


/* ==========================================================================
   Botões e controles — padrão único do site
   - Ação principal: .btn (azul). Ação neutra: .btn.secondary. Destaque de rodapé: .btn.large
   - Ligar/desligar algo (proteção, adicionais): checkbox nativo, que já vira o botão deslizante (pill)
     de style.css. Dentro de .toggle-row ou .addon-row. Não usar checkbox "quadrado" nem botão "Ativar".
   - Escolher uma opção entre várias (período, plano): .choice-card
   ========================================================================== */
.btn.large { padding: 13px 26px; font-size: 14px; border-radius: 10px; }
.btn.block { display: flex; width: 100%; justify-content: center; }
.btn[disabled], .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible, .choice-card:focus-within, input[type=checkbox]:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* o checkbox deslizante não pode herdar o "input ocupa a linha toda" dos formulários comerciais */
.commercial-form input[type=checkbox], .commercial-form .toggle-row input[type=checkbox] { width: 42px; min-width: 42px; padding: 0; }
.commercial-form .toggle-row { padding: 12px 0; }
.commercial-form .toggle-row span small { display: block; color: var(--text-muted); font-weight: 400; margin-top: 2px; }

/* ---------- escolha de plano e adicionais (página Planos) ---------- */
.buy-card { max-width: 760px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 16px; overflow: hidden; }
.buy-section { padding: 24px 28px; border-bottom: 1px solid var(--border); }
.buy-section:last-of-type { border-bottom: 0; }
.buy-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.buy-section-head h3 { margin: 0; font-size: 14px; padding-left: 10px; border-left: 3px solid var(--accent); line-height: 1.2; }
.buy-section-head .buy-hint { color: var(--text-muted); font-size: 12.5px; }

.period-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.choice-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px 16px; text-align: center; cursor: pointer;
  background: var(--bg-alt); border: 1px solid var(--border-strong); border-radius: 12px; transition: border-color .15s, background .15s; }
.choice-card:hover { border-color: #3a3a44; }
.choice-card input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.choice-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice-card .choice-name { font-weight: 600; font-size: 14px; }
.choice-card .choice-price { font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.choice-card .choice-price small { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-right: 3px; }
.choice-card .choice-sub { font-size: 12px; color: var(--text-muted); }
.save-badge { margin-top: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--green); background: rgba(34,197,94,.12); }

.addon-list { display: grid; gap: 10px; }
.addon-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; cursor: pointer; background: var(--bg-alt); border: 1px solid var(--border-strong); border-radius: 12px; transition: border-color .15s, background .15s; }
.addon-row.selected { border-color: var(--accent); background: var(--accent-soft); }
.addon-row .addon-info { flex: 1; min-width: 0; }
.addon-row .addon-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.addon-row .addon-desc { margin-top: 3px; color: var(--text-muted); font-size: 12.5px; line-height: 1.45; }
.addon-tag { padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); }
.addon-row .addon-price { text-align: right; white-space: nowrap; }
.addon-row .addon-price strong { display: block; font-size: 16px; }
.addon-row .addon-price span { font-size: 11.5px; color: var(--text-muted); }

.buy-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 28px; background: var(--bg); border-top: 1px solid var(--border); }
.buy-total span { display: block; font-size: 12.5px; color: var(--text-muted); }
.buy-total strong { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.buy-total small { margin-left: 8px; font-size: 12.5px; color: var(--text-muted); }
.buy-note { max-width: 760px; margin: 14px auto 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.55; text-align: center; }
.buy-error { display: none; margin: 0 28px 20px; }
.buy-error.show { display: block; }

@media (max-width: 700px) {
  .buy-section { padding: 20px 18px; }
  .buy-footer { flex-direction: column; align-items: stretch; padding: 18px; }
  .buy-footer .btn { width: 100%; justify-content: center; }
  .addon-row { flex-wrap: wrap; }
  .addon-row .addon-price { text-align: left; }
}
