:root {
  --bg: #0a0a0a;
  --bg-alt: #1a1a1a;
  --bg-card: #1a1a1a;
  --bg-sidebar: #0d0d0f;
  --accent: #0c46e7;
  --accent-hover: #1055e9;
  --text: #ffffff;
  --text-muted: #9a9a9a;
  --green: #169631;
  --red: #0044ff;
  --border: #222222;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(circle at 15% 0%, rgba(20, 49, 211, 0.575), transparent 40%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

/* ===================== TOPBAR ===================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-alt);
  padding: 14px 28px;
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar .brand { font-weight: 800; font-size: 19px; display: flex; align-items: center; gap: 8px; letter-spacing: .5px; }
.topbar .brand span.mark { color: var(--accent); }
.topbar .user { display: flex; align-items: center; gap: 6px; }
.topbar .user > a { padding: 8px 12px; border-radius: 8px; font-size: 14px; transition: background .15s, color .15s; }
.topbar .user > a:hover { background: var(--bg-card); color: var(--accent); }
.topbar .user > a.btn.secondary { margin-left: 6px; }

/* chip do usuário logado — vira um "botãozinho" ao invés de bolinha solta com anel vermelho */
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  margin: 0 4px;
  transition: border-color .15s, background .15s;
}
.user-chip:hover { border-color: var(--accent); }
.user-chip img.avatar, .user-chip .icon-fallback { width: 28px; height: 28px; border-radius: 50%; }
.user-chip img.avatar { border: none; object-fit: cover; background: var(--bg-alt); }
.user-chip span { font-size: 13px; font-weight: 600; }

/* ===================== APP SHELL (sidebar + conteúdo) ===================== */
.app-shell {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 63px);
}

.app-sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  min-height: calc(100vh - 63px);
  position: sticky;
  top: 63px;
  padding: 18px 14px 24px;
}

.sidebar-guild {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.sidebar-guild:hover { border-color: var(--accent); transform: translateY(-1px); }
.sidebar-guild img, .sidebar-guild .icon-fallback { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.sidebar-guild img { border: none; object-fit: cover; background: var(--bg-alt); }
.sidebar-guild-info { display: flex; flex-direction: column; min-width: 0; }
.sidebar-guild-info strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-guild-info span { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sidebar-guild:hover .sidebar-guild-info span { color: var(--accent); }

.sidebar-nav { display: flex; flex-direction: column; gap: 18px; }
.sidebar-group-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 10px 6px;
}
.sidebar-group { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.sidebar-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}
.sidebar-label { flex: 1; }
.sidebar-nav a:hover { background: var(--bg-card); color: var(--text); }
.sidebar-nav a.active { background: var(--bg-card); color: var(--text); border-left-color: var(--accent); font-weight: 600; }
.sidebar-nav a .soon { font-size: 10px; color: var(--text-muted); background: var(--bg-alt); border: 1px solid var(--border); padding: 2px 6px; border-radius: 20px; }

.app-main { flex: 1; min-width: 0; padding: 32px 36px 90px; }
.app-main .container { max-width: 900px; margin: 0; padding: 0; }
.app-main h2 { margin-top: 0; }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { width: 100%; position: static; min-height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .sidebar-group { flex-direction: row; flex-wrap: wrap; }
  .sidebar-group-label { width: 100%; }
  .app-main { padding: 20px 16px 90px; }
}

/* ===================== CONTAINER (páginas sem sidebar) ===================== */
.container { max-width: 1000px; margin: 0 auto; padding: 32px 20px; }

/* ===================== CARDS ===================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
.card h3 { margin-top: 0; border-left: 3px solid var(--accent); padding-left: 10px; }

/* Grade dos servidores: 3 cards por linha, todos com o mesmo tamanho.
   A segunda linha fica centralizada quando houver apenas 2 cards. */
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.guild-card {
  grid-column: span 2;
  min-width: 0;
  min-height: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform .15s, border-color .15s;
}

.guild-card:nth-child(4) { grid-column: 2 / span 2; }
.guild-card:nth-child(5) { grid-column: 4 / span 2; }
.guild-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 0 18px rgba(225,29,46,.25); }
.guild-card img, .guild-card .icon-fallback { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; }
.guild-card img { object-fit: cover; background: var(--bg-alt); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; margin-top: 8px; }

/* círculo com inicial, usado quando um ícone/avatar não existe ou falha ao carregar */
.icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.guild-card .icon-fallback { font-size: 24px; }
.sidebar-guild .icon-fallback { font-size: 15px; }
.user-chip .icon-fallback { font-size: 13px; }
.badge.ok { background: rgba(35,165,90,.15); color: var(--green); }
.badge.no { background: rgba(255,59,59,.15); color: var(--red); }

/* ===================== BOTÕES ===================== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent-hover); box-shadow: 0 0 14px rgba(29, 75, 225, 0.45); }
.btn.secondary { background: transparent; border: 1px solid var(--border); }
.btn.secondary:hover { border-color: var(--accent); box-shadow: none; }
.btn.danger { background: #1a2e9c; }
.btn.danger:hover { background: #1a2e9c; }

/* Responsividade apenas da grade de servidores */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guild-card,
  .guild-card:nth-child(4),
  .guild-card:nth-child(5) { grid-column: auto; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
}

/* ===================== FORMULÁRIOS ===================== */
label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--text-muted); }
input[type=text], input[type=number], select, textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

/* switch estilo "pill" — funciona no checkbox nativo, sem precisar de markup extra */
input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 24px;
  min-width: 42px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  transition: background .18s, border-color .18s;
}
input[type=checkbox]::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s;
}
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::before { transform: translateX(18px); }

/* checkbox "de verdade" (multi-select de cargos por lista) continua com aparência nativa */
select[multiple] { appearance: auto; padding: 6px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: none; }

/* ===================== SAVE BAR (barra fixa de salvar) ===================== */
.save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 -4px 18px rgba(0,0,0,.35);
}
.save-bar .toast { margin: 0; }

.login-wrap { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-box { text-align: center; }
.login-box h1 { font-size: 34px; margin-bottom: 8px; letter-spacing: 1px; }
.login-box h1 span { color: var(--accent); }
.login-box p { color: var(--text-muted); margin-bottom: 24px; }

.toast { margin-top: 14px; font-size: 13px; }
.toast.ok { color: var(--green); }
.toast.err { color: var(--red); }

.preview-img { max-width: 96px; border-radius: 50%; margin-top: 10px; display: block; border: 2px solid var(--accent); }

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  margin: 3px 4px 3px 0;
}
.pill.on { border-color: var(--green); color: var(--green); }
.pill.off { border-color: var(--border); color: var(--text-muted); }

.subcard { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-top: 12px; }
.row-flex { display: flex; gap: 12px; flex-wrap: wrap; }
.row-flex > div { flex: 1; min-width: 160px; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { color: var(--text-muted); font-weight: 600; }

/* ===================== MULTI-SELECT PESQUISÁVEL (cargos/canais) ===================== */
.ms-wrap { position: relative; margin-bottom: 4px; }
.ms-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: 14px 0 6px; }
.ms-label .ms-count { color: var(--text); font-weight: 700; }
.ms-box {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  min-height: 42px;
}
.ms-box:hover { border-color: var(--accent); }
.ms-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.ms-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(32, 29, 225, 0.12);
  color: var(--text);
  border: 1px solid rgba(29, 58, 225, 0.35);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 13px;
}
.ms-chip b {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1;
}
.ms-chip b:hover { color: var(--red); }
.ms-placeholder { color: var(--text-muted); font-size: 14px; }
.ms-arrow { color: var(--text-muted); font-size: 12px; margin-left: auto; }
.ms-dropdown {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0;
  background: #1c1c1c; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  max-height: 260px; display: flex; flex-direction: column; overflow: hidden;
}
.ms-dropdown[hidden] { display: none; }
.ms-clear { cursor: pointer; color: var(--text-muted); font-weight: 700; margin-left: 4px; }
.ms-clear:hover { color: var(--red); }
.ms-search {
  margin: 8px; width: calc(100% - 16px);
  padding: 8px 10px; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 13px;
}
.ms-options { overflow-y: auto; padding: 0 6px 6px; }
.ms-option { padding: 8px 10px; font-size: 13px; border-radius: 5px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.ms-icon { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; vertical-align: middle; margin-right: 6px; flex-shrink: 0; }
.ms-placeholder .ms-icon, .ms-chip .ms-icon { margin-right: 6px; }
.ms-option:hover { background: var(--bg-card); }
.ms-option.selected { color: var(--accent-hover); font-weight: 600; }
.ms-option.selected::before { content: '✓'; }
.ms-option:not(.selected)::before { content: ''; width: 12px; display: inline-block; }
.ms-empty { padding: 12px; color: var(--text-muted); font-size: 13px; text-align: center; }

.vip-editor-note {
  display:flex; align-items:flex-start; gap:10px;
  margin-top:14px; padding:11px 13px;
  border:1px solid var(--border); border-radius:8px;
  background:var(--bg-alt); color:var(--text-muted); font-size:12px;
}
.vip-editor-note > span { color:var(--accent); font-size:15px; line-height:1; margin-top:1px; }
.vip-editor-note b { display:block; color:var(--text); margin-bottom:3px; }
.vip-editor-note small { display:block; color:var(--text-muted); font-size:11px; line-height:1.45; }
.vip-editor-note code { color:var(--text); background:rgba(255,255,255,.05); padding:1px 4px; border-radius:4px; }

/* ===================== TICKET BUILDER RENOVADO ===================== */
.ticket-builder-page { max-width: 1280px !important; }
.ticket-head { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:18px; }
.ticket-head h2 { margin-bottom:6px; }
.muted, .ticket-builder-page small { color:var(--text-muted); font-size:12px; }
.ticket-count { min-width:120px; padding:12px 16px; border:1px solid var(--border); background:var(--bg-card); border-radius:10px; text-align:center; }
.ticket-count strong { display:block; font-size:22px; }
.ticket-count span { color:var(--text-muted); font-size:11px; }
.builder-toolbar,.section-title,.preview-head,.block-head,.dynamic-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.builder-toolbar h3 { margin:0; }
.eyebrow { display:block; color:var(--accent); font-size:10px; font-weight:800; letter-spacing:.12em; margin-bottom:4px; }
.panel-list-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid var(--border); }
.panel-list-row:last-child { border-bottom:0; }
.panel-list-row small { display:block; margin-top:4px; }
.panel-actions { display:flex; gap:8px; flex-wrap:wrap; }
.ticket-workspace { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr); gap:20px; align-items:start; }
.ticket-preview-card { position:sticky; top:82px; padding:0; overflow:hidden; }
.preview-head { padding:16px 18px; border-bottom:1px solid var(--border); }
.preview-head strong { font-size:15px; }
#previewBadge { font-size:10px; background:var(--bg-alt); border:1px solid var(--border); border-radius:999px; padding:5px 9px; color:var(--text-muted); }
.discord-preview { background:#313338; min-height:520px; padding:20px 16px 28px; color:#dbdee1; }
.discord-user { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.discord-user > div { display:flex; align-items:center; gap:5px; font-size:13px; }
.discord-user small { background:#5865f2; color:#fff; padding:1px 4px; border-radius:3px; font-size:8px; font-weight:800; }
.discord-user em { color:#949ba4; font-style:normal; font-size:11px; }
.preview-avatar { width:28px; height:28px; border-radius:50%; background:#5865f2; display:grid; place-items:center; font-weight:800; }
.discord-embed,.v2-container { position:relative; background:#2b2d31; border-left:4px solid #5865f2; border-radius:4px; padding:14px 14px 12px; overflow:hidden; }
.embed-title { font-weight:700; font-size:16px; margin-bottom:8px; }
.embed-desc,.v2-text { white-space:pre-wrap; font-size:13px; line-height:1.45; color:#dbdee1; }
.embed-thumb { width:64px; height:64px; object-fit:cover; border-radius:4px; float:right; margin-left:12px; }
.embed-image,.v2-image { display:block; width:100%; max-height:260px; object-fit:cover; border-radius:4px; margin-top:12px; }
.embed-footer { margin-top:12px; color:#949ba4; font-size:11px; }
.preview-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.preview-fields div { display:flex; flex-direction:column; gap:3px; font-size:11px; }
.preview-fields span { color:#b5bac1; }
.preview-buttons { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.preview-buttons span { background:#5865f2; color:white; border-radius:3px; padding:7px 12px; font-size:12px; }
.v2-container { padding:12px; display:flex; flex-direction:column; gap:10px; }
.v2-sep { height:1px; background:#4e5058; width:100%; }
.v2-section { display:flex; align-items:center; gap:12px; background:#232428; padding:10px; border-radius:6px; font-size:13px; }
.v2-section img { width:48px; height:48px; object-fit:cover; border-radius:4px; margin-left:auto; }
.preview-select { background:#1e1f22; border:1px solid #4e5058; border-radius:4px; padding:9px 11px; font-size:12px; color:#b5bac1; }
.mode-tabs { display:flex; gap:4px; background:var(--bg-alt); padding:4px; border-radius:9px; margin:18px 0; border:1px solid var(--border); }
.mode-tab { flex:1; border:0; border-radius:6px; padding:11px; background:transparent; color:var(--text-muted); cursor:pointer; font-weight:700; }
.mode-tab.active { background:var(--accent); color:white; }
.builder-section { border-top:1px solid var(--border); padding-top:18px; margin-top:18px; }
.section-title { margin-bottom:12px; }
.section-title.inline { margin-top:18px; }
.section-title strong { font-size:14px; }
.section-title small { display:block; margin-top:3px; }
.form-grid { display:grid; gap:12px; }
.form-grid.two { grid-template-columns:1fr 1fr; }
.form-grid.three { grid-template-columns:repeat(3,1fr); }
.form-grid.four { grid-template-columns:1fr 1.4fr 1fr 1fr; }
.form-grid.compact { align-items:end; }
.dynamic-row,.dynamic-card { background:var(--bg-alt); border:1px solid var(--border); border-radius:8px; padding:12px; margin-top:9px; }
.field-row { display:grid; grid-template-columns:1fr 1.4fr auto auto; gap:8px; align-items:end; }
.option-card { padding-top:10px; }
.dynamic-head { margin-bottom:6px; }
.icon-btn { width:30px; height:30px; padding:0; border:1px solid var(--border); background:transparent; color:var(--text-muted); border-radius:6px; cursor:pointer; }
.icon-btn:hover { border-color:var(--accent); color:var(--text); }
.icon-btn.danger:hover { border-color:#1d26a3; color:#383be4; }
.inline-check { display:flex; align-items:center; gap:7px; margin:0 2px 6px; white-space:nowrap; }
.inline-check input { width:18px; height:18px; min-width:18px; appearance:auto; }
.component-addbar { display:flex; flex-wrap:wrap; gap:7px; padding:10px; background:var(--bg-alt); border:1px dashed var(--border); border-radius:9px; }
.component-addbar button { background:transparent; border:1px solid var(--border); color:var(--text); border-radius:6px; padding:8px 10px; cursor:pointer; }
.component-addbar button:hover { border-color:var(--accent); }
.component-stack { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.component-block { background:#101114; border:1px solid var(--border); border-radius:9px; overflow:hidden; }
.block-head { padding:9px 11px; background:var(--bg-alt); }
.drag-dot { color:#6d7077; letter-spacing:-3px; }
.block-body { padding:11px; }
.block-note { padding:10px; border:1px dashed var(--border); border-radius:6px; }
.check-grid { display:flex; flex-wrap:wrap; gap:7px; }
.check-chip { margin:0; display:flex; align-items:center; gap:7px; background:var(--bg-alt); border:1px solid var(--border); padding:7px 9px; border-radius:6px; color:var(--text); }
.check-chip input { width:17px; height:17px; min-width:17px; appearance:auto; }
.builder-tip,.empty-builder { padding:12px; margin-top:10px; background:var(--bg-alt); border:1px dashed var(--border); border-radius:8px; color:var(--text-muted); font-size:12px; }
.v2-color { min-width:150px; }
.save-bar { z-index:5; }
@media(max-width:1050px){.ticket-workspace{grid-template-columns:1fr}.ticket-preview-card{position:static}.form-grid.four{grid-template-columns:1fr 1fr}.field-row{grid-template-columns:1fr 1fr}.field-row .inline-check{margin-top:8px}.ticket-head{flex-direction:column}.ticket-count{align-self:flex-start}}
@media(max-width:700px){.form-grid.two,.form-grid.three,.form-grid.four{grid-template-columns:1fr}.panel-list-row{align-items:flex-start;flex-direction:column}.panel-actions{width:100%}.panel-actions .btn{flex:1}.ticket-preview-card{display:none}}

/* ===================== TICKET BUILDER POLISH ===================== */
.ticket-builder-page input,
.ticket-builder-page textarea,
.ticket-builder-page select {
  color-scheme: dark;
  background: #111318;
  border: 1px solid #2a2e36;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 4px 16px rgba(0,0,0,.12);
  transition: border-color .16s, box-shadow .16s, background .16s, transform .16s;
}
.ticket-builder-page input::placeholder,
.ticket-builder-page textarea::placeholder { color: #666b76; opacity: 1; }
.ticket-builder-page input:hover,
.ticket-builder-page textarea:hover,
.ticket-builder-page select:hover { border-color:#3a3f49; background:#14171d; }
.ticket-builder-page input:focus,
.ticket-builder-page textarea:focus,
.ticket-builder-page select:focus { border-color:var(--accent); background:#15181f; box-shadow:0 0 0 3px rgba(221,20,37,.12), 0 8px 22px rgba(0,0,0,.18); }
.ticket-builder-page textarea { resize:vertical; min-height:90px; line-height:1.55; }
.ticket-builder-page select option { background:#111318; color:#fff; }
.ticket-builder-page code { color:#9577ff; background:#181a20; border:1px solid #2a2e36; padding:2px 5px; border-radius:5px; }
.mode-tabs { box-shadow:0 8px 28px rgba(0,0,0,.18); }
.mode-tab.active { box-shadow:0 4px 14px rgba(15, 29, 218, 0.22); }
.component-addbar { background:linear-gradient(180deg,#15181e,#101216); border-color:#30343d; padding:12px; }
.component-addbar button { background:#191c22; border-color:#30343d; transition:.16s; }
.component-addbar button:hover { background:#20242c; transform:translateY(-1px); }
.component-block { background:#0e1014; border-color:#292e37; box-shadow:0 8px 24px rgba(0,0,0,.16); }
.block-head { background:#15181e; border-bottom:1px solid #252a32; }
.block-body { background:#101217; }
.dynamic-card,.dynamic-row { background:linear-gradient(180deg,#15181e,#111318); border-color:#2a2e36; box-shadow:0 7px 22px rgba(0,0,0,.12); }
.feature-card { display:flex; align-items:center; gap:12px; min-height:68px; margin:0; padding:12px 14px; border:1px solid #292e37; border-radius:10px; background:linear-gradient(180deg,#15181e,#111318); cursor:pointer; transition:.16s; }
.feature-card:hover { border-color:#414752; background:#171a20; transform:translateY(-1px); }
.feature-card input { margin:0; flex:0 0 auto; }
.feature-card span { display:flex; flex-direction:column; gap:3px; }
.feature-card b { font-size:13px; color:#f2f3f5; }
.feature-card small { color:#7f8590; font-size:11px; line-height:1.35; }
.advanced-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
.internal-editor { margin-top:18px; padding:15px; border:1px solid #292e37; border-radius:12px; background:radial-gradient(circle at 100% 0%,rgba(221,20,37,.07),transparent 35%),#101217; }
.compact-feature { min-height:43px; margin-top:22px; }
.ticket-count { background:linear-gradient(180deg,#17191e,#111318); box-shadow:0 8px 24px rgba(0,0,0,.18); }
.panel-list-row { padding:16px 2px; }
.panel-list-row:hover { background:rgba(255,255,255,.015); }
.preview-head { background:#15171c; }
.discord-preview { background:#2b2d31; background-image:linear-gradient(180deg,rgba(255,255,255,.02),transparent 120px); }
@media(max-width:700px){.advanced-grid{grid-template-columns:1fr}.internal-editor{padding:12px}}
.ticket-builder-page input:-webkit-autofill,
.ticket-builder-page input:-webkit-autofill:hover,
.ticket-builder-page input:-webkit-autofill:focus,
.ticket-builder-page textarea:-webkit-autofill,
.ticket-builder-page select:-webkit-autofill {
  -webkit-text-fill-color:#fff;
  -webkit-box-shadow:0 0 0 1000px #111318 inset;
  transition:background-color 9999s ease-out 0s;
}

/* ===================== TICKET BUILDER — LAYOUT REFINADO ===================== */
.ticket-builder-page { max-width: 1360px !important; }
.ticket-builder-page .card { border-color:#20242c; }
.ticket-config-card { padding:26px; background:linear-gradient(180deg,#121418 0%,#0f1115 100%); }
.builder-toolbar { padding-bottom:14px; border-bottom:1px solid #252a32; }
.builder-toolbar h3 { border-left:0; padding-left:0; }
.builder-section { border-top-color:#252a32; padding-top:22px; margin-top:22px; }
.section-title { align-items:flex-start; }
.section-title strong { font-size:15px; letter-spacing:.01em; }
.section-title small { max-width:680px; line-height:1.45; }
.ticket-name-section { background:linear-gradient(180deg,rgba(255,255,255,.012),transparent); }
.ticket-variables { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; margin-top:14px; padding:13px 14px; border:1px solid #272c35; border-radius:8px; background:#0d0f13; color:#a8adb7; font-size:12px; }
.ticket-variables strong { color:#c6cad2; margin-right:4px; }
.ticket-variables span { white-space:nowrap; }
.ticket-variables code { margin-right:4px; }
.settings-stack { border-top:1px solid #252a32; }
.setting-select-row,
.setting-toggle-row { min-height:78px; display:grid; grid-template-columns:minmax(0,1fr) minmax(250px,44%); align-items:center; gap:24px; padding:14px 4px; border-bottom:1px solid #252a32; }
.setting-toggle-row { grid-template-columns:minmax(0,1fr) auto; cursor:pointer; }
.setting-select-row > div,
.setting-toggle-row > span { display:flex; flex-direction:column; gap:4px; }
.setting-select-row b,
.setting-toggle-row b { color:#e8eaed; font-size:14px; }
.setting-select-row small,
.setting-toggle-row small { color:#8b929e; font-size:12px; line-height:1.45; }
.setting-select-row select { width:100%; }
.setting-toggle-row input[type=checkbox] { justify-self:end; margin-right:0; }
.setting-toggle-row:hover b { color:#fff; }
.option-card { margin-top:12px; padding:0; overflow:hidden; border-radius:8px; background:#0e1014; box-shadow:none; }
.option-head { min-height:64px; padding:12px 14px; margin:0; background:#121419; border-bottom:1px solid #252a32; }
.option-head > div { display:flex; flex-direction:column; gap:3px; }
.option-head strong { font-size:13px; }
.option-head small { color:#777e89; font-size:11px; }
.option-remove { min-width:112px; }
.option-primary-grid { display:grid; grid-template-columns:1fr 1.08fr; gap:12px; padding:14px 14px 0; }
.option-secondary-grid { display:grid; grid-template-columns:1.05fr 1.05fr .9fr .8fr; gap:12px; padding:12px 14px 14px; }
.required { color:#656fff; }
.advanced-ticket-section .internal-editor { margin-top:22px; border-radius:8px; background:#101217; border-color:#252a32; box-shadow:none; }
.compact-feature { margin-top:22px; }
@media(max-width:1050px){
  .setting-select-row { grid-template-columns:1fr; gap:10px; }
  .option-secondary-grid { grid-template-columns:1fr 1fr; }
}
@media(max-width:700px){
  .ticket-config-card { padding:18px; }
  .ticket-variables { flex-direction:column; align-items:flex-start; gap:7px; }
  .option-primary-grid,.option-secondary-grid { grid-template-columns:1fr; }
  .option-head { align-items:flex-start; flex-direction:column; }
  .option-remove { width:100%; }
}

/* ===================== TICKET CONFIG — DETALHES COLAPSÁVEIS ===================== */
.collapsible-config {
  padding: 0;
  margin-top: 18px;
  border: 1px solid #252a32;
  border-radius: 10px;
  overflow: hidden;
  background: #101217;
}
.collapsible-config + .collapsible-config { margin-top: 12px; }
.collapsible-config-head {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg,#14171d,#111318);
}
.collapsible-config-head > div { display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.collapsible-config-head .eyebrow { margin-bottom: 1px; }
.collapsible-config-head strong { color:#eef0f3; font-size:15px; }
.collapsible-config-head small { color:#8b929e; font-size:12px; line-height:1.45; }
.collapsible-config-head .details-toggle { min-width:132px; white-space:nowrap; }
.collapsible-config-body {
  padding: 0 18px 18px;
  border-top: 1px solid #252a32;
  background: #101217;
}
.collapsible-config-body[hidden] { display:none !important; }
.collapsible-config-body:not([hidden]) { padding-top:18px; }
.collapsible-config.details-open { border-color:#353b45; box-shadow:0 10px 26px rgba(0,0,0,.14); }
.collapsible-config.details-open .collapsible-config-head { background:#15181f; }
.collapsible-config .ticket-variables { margin-top:14px; }
.collapsible-config .settings-stack { border-top:0; margin-top:-4px; }
.collapsible-config .settings-stack .setting-select-row:first-child { padding-top:0; }
.collapsible-config .internal-editor { margin-top:0; }
@media(max-width:700px){
  .collapsible-config-head { align-items:flex-start; flex-direction:column; }
  .collapsible-config-head .details-toggle { width:100%; }
  .collapsible-config-body { padding-left:14px; padding-right:14px; }
}

/* Ticket options: independent details and multi-role picker */
.option-actions{display:flex;gap:8px;align-items:center}.option-summary,.option-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.option-details-body{margin-top:14px;padding-top:14px;border-top:1px solid var(--border,#252a33)}.option-detail-grid{margin-top:12px}.option-detail-grid.four{grid-template-columns:1fr 1fr 1fr 1fr;align-items:end}.role-picker-box{position:relative;border:1px solid var(--border,#2b303a);border-radius:8px;background:var(--input,#0d0f14);min-height:42px}.role-picker-selected{padding:11px 12px;color:var(--text,#dfe4ea);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}.role-picker-menu{max-height:180px;overflow:auto;border-top:1px solid var(--border,#2b303a);padding:6px}.role-check{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:6px;cursor:pointer}.role-check:hover{background:rgba(255,255,255,.04)}.role-check input{width:16px;height:16px}.mini-toggle{display:flex;align-items:center;gap:8px;min-height:42px;padding:0 4px;color:var(--text,#dfe4ea);font-size:12px}.mini-toggle input{width:17px;height:17px}@media(max-width:900px){.option-summary,.option-detail-grid,.option-detail-grid.four{grid-template-columns:1fr}.option-head{align-items:flex-start}.option-actions{flex-wrap:wrap}}
/* FINAL: cada botão possui suas próprias configurações */
#options { display:flex; flex-direction:column; gap:14px; }
#options .option-card { margin:0; padding:0; overflow:hidden; border:1px solid #262c35; border-radius:12px; background:#101217; }
#options .option-card.details-open { border-color:#3a424f; box-shadow:0 12px 30px rgba(0,0,0,.16); }
#options .option-head { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:74px; padding:15px 18px; background:linear-gradient(180deg,#15181e,#111318); border-bottom:1px solid #262c35; }
#options .option-summary { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; padding:16px 18px; background:#0f1115; }
#options .option-details-body { margin:0; padding:0 18px 20px; border-top:1px solid #262c35; background:#101217; }
#options .option-details-body[hidden] { display:none!important; }
#options .option-section-title { padding:18px 0 8px; display:flex; flex-direction:column; gap:4px; }
#options .option-section-title strong { font-size:15px; color:#eef0f3; }
#options .option-section-title small,.option-subhead small { color:#8b929e; font-size:12px; line-height:1.45; }
#options .option-subsection { margin-top:12px; padding:18px; border:1px solid #252b34; border-radius:10px; background:#12151b; }
#options .option-subhead { margin-bottom:16px; }
#options .option-subhead > div { display:flex; flex-direction:column; gap:4px; }
#options .option-subhead strong { font-size:14px; color:#f0f2f5; }
#options .option-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:0 0 16px; }
#options .role-picker { margin:0 0 16px; }
#options .role-picker-box { border-color:#2a303a; background:#0d0f14; }
#options .role-picker-menu { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; max-height:190px; }
#options .role-check { min-width:0; }
#options .role-picker-selected { color:#dce1e8; min-height:42px; display:flex; align-items:center; }
#options .option-switches { border-top:1px solid #252b34; }
#options .option-switches .setting-toggle-row { min-height:74px; padding:12px 0; }
#options .option-switches .setting-toggle-row:last-child { border-bottom:0; }
#options .option-button-style { margin-bottom:0; }
#options .option-actions { display:flex; gap:8px; flex-shrink:0; }
#options .option-details { min-width:132px; }
#options .ticket-variables { margin-top:14px; }
@media(max-width:850px){
 #options .option-summary,#options .option-detail-grid { grid-template-columns:1fr; }
 #options .role-picker-menu { grid-template-columns:1fr; }
}
@media(max-width:620px){
 #options .option-head { align-items:flex-start; flex-direction:column; }
 #options .option-actions { width:100%; }
 #options .option-actions .btn { flex:1; }
 #options .option-summary,#options .option-details-body { padding-left:14px; padding-right:14px; }
 #options .option-subsection { padding:14px; }
}

/* ===================== VIP — SELEÇÃO DE PERMISSÕES ===================== */
.vip-permission-grid { align-items: start; gap: 16px; }
.vip-permission-field {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.018);
}
.vip-permission-title {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.vip-permission-title code {
  color: var(--accent-hover);
  background: rgba(12,70,231,.10);
  border: 1px solid rgba(12,70,231,.18);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
}
.vip-permission-field .ms-wrap { margin-top: 8px; }
.vip-permission-field .ms-label { margin-top: 0; }

/* ===================== VIP ===================== */
.vip-page .ticket-head { align-items: center; }
.vip-list { display:flex; flex-direction:column; gap:10px; }
.vip-type-card { display:grid; grid-template-columns:minmax(220px,1fr) minmax(280px,1fr) auto; gap:14px; align-items:center; padding:14px; border:1px solid var(--border); border-radius:10px; background:var(--bg-alt); }
.vip-type-main { display:flex; align-items:center; gap:12px; min-width:0; }
.vip-type-main > div:last-child { min-width:0; }
.vip-type-main strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vip-type-main small { display:block; color:var(--text-muted); margin-top:3px; }
.vip-type-icon { width:46px; height:46px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; background:#111; border:1px solid var(--border); font-size:11px; font-weight:800; color:var(--accent); overflow:hidden; }
.vip-type-icon img { width:40px; height:40px; object-fit:contain; }
.vip-type-features { display:flex; gap:7px; flex-wrap:wrap; }
.vip-type-features .badge { margin-top:0; }
.vip-editor { border-color:#353535; }
.vip-editor[hidden] { display:none; }
.vip-option-stack { display:flex; flex-direction:column; gap:8px; }
.vip-option-stack .feature-card { min-height:58px; }
.vip-active-list { display:flex; flex-direction:column; gap:7px; }
.vip-active-row { display:grid; grid-template-columns:1.1fr 1fr 1fr 1.2fr; gap:10px; align-items:center; padding:11px 12px; border:1px solid var(--border); border-radius:8px; background:var(--bg-alt); font-size:13px; }
.vip-active-row > div { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vip-active-row small { display:block; color:var(--text-muted); margin-top:2px; }
.vip-help-card { margin-bottom:0; }
.vip-command-grid { display:grid; grid-template-columns:minmax(180px,.8fr) 2fr; gap:8px 14px; align-items:center; }
.vip-command-grid code { background:#0d0d0f; border:1px solid var(--border); padding:8px 10px; border-radius:6px; color:#eee; }
.vip-command-grid span { color:var(--text-muted); font-size:13px; }
@media(max-width:950px){ .vip-type-card{grid-template-columns:1fr}.vip-active-row{grid-template-columns:1fr 1fr}.vip-type-features{margin-top:-2px} }
@media(max-width:700px){ .vip-command-grid{grid-template-columns:1fr}.vip-active-row{grid-template-columns:1fr}.vip-page .ticket-head{align-items:flex-start;flex-direction:column} }


/* ===================== DASHBOARD POLISH — CAMPOS E SELETORES =====================
   Camada visual: não altera valores, rotas ou regras de salvamento. */
input[type=text], input[type=number], select, textarea {
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 11px;
  border-color: #292d36;
  background: #111318;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 5px 18px rgba(0,0,0,.10);
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}

input[type=text]:hover, input[type=number]:hover, select:hover, textarea:hover {
  border-color: #3a404c;
  background: #14171d;
}

input[type=text]:focus, input[type=number]:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background: #15181f;
  box-shadow: 0 0 0 3px rgba(12,70,231,.13), 0 8px 22px rgba(0,0,0,.16);
}

textarea { min-height: 92px; }

.btn {
  padding: 11px 18px;
  min-height: 42px;
  border-radius: 11px;
  transition: background .16s, box-shadow .16s, transform .16s, border-color .16s;
}
.btn:hover { transform: translateY(-1px); }

.card {
  border-radius: 14px;
  border-color: #252932;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}

label {
  margin: 15px 0 7px;
  font-weight: 600;
}

/* Seletor pesquisável: maior, arredondado e visualmente alinhado ao restante da dashboard. */
.ms-wrap {
  width: 100%;
  margin-bottom: 7px;
}

.ms-label {
  margin: 14px 0 7px;
}

.ms-box {
  min-height: 50px;
  width: 100%;
  padding: 9px 13px;
  border: 1px solid #2a2f39;
  border-radius: 13px;
  background: linear-gradient(180deg, #15181e, #111318);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 6px 20px rgba(0,0,0,.13);
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.ms-box:hover, .ms-box:focus-visible {
  border-color: var(--accent);
  background: #15181f;
  box-shadow: 0 0 0 3px rgba(12,70,231,.10), 0 9px 24px rgba(0,0,0,.17);
  outline: none;
}

.ms-placeholder {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  color: #858b97;
  font-size: 14px;
}

.ms-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: #8d94a0;
  font-size: 14px;
  transition: transform .16s, background .16s, color .16s;
}
.ms-box:hover .ms-arrow {
  color: #fff;
  background: rgba(255,255,255,.06);
}

.ms-chips {
  gap: 6px;
}

.ms-chip {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(12,70,231,.12);
  border-color: rgba(29,86,231,.38);
  font-size: 12px;
}

.ms-chip b {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}

.ms-dropdown {
  top: calc(100% + 7px);
  max-height: 330px;
  border: 1px solid #2c313b;
  border-radius: 14px;
  background: #17191d;
  box-shadow: 0 18px 45px rgba(0,0,0,.58), 0 0 0 1px rgba(255,255,255,.015);
  overflow: hidden;
  animation: msDropIn .12s ease-out;
}

@keyframes msDropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ms-search {
  height: 44px;
  min-height: 44px;
  width: calc(100% - 16px);
  margin: 8px;
  padding: 10px 13px;
  border-radius: 10px;
  background: #101216;
  border-color: #2b3039;
  box-shadow: none;
  font-size: 14px;
}

.ms-search:focus {
  box-shadow: 0 0 0 3px rgba(12,70,231,.12);
}

.ms-options {
  padding: 2px 7px 8px;
  scrollbar-width: thin;
  scrollbar-color: #565b65 transparent;
}

.ms-option {
  min-height: 40px;
  margin: 2px 0;
  padding: 9px 11px;
  border-radius: 9px;
  color: #dfe2e7;
  font-size: 13px;
  transition: background .12s, color .12s;
}

.ms-option:hover {
  background: #22252c;
  color: #fff;
}

.ms-option.selected {
  background: rgba(12,70,231,.12);
  color: #5e8cff;
}

.ms-option.selected::before {
  width: 18px;
  display: grid;
  place-items: center;
  color: #5e8cff;
  font-size: 13px;
}

.ms-option:not(.selected)::before {
  width: 18px;
}

.ms-empty {
  padding: 18px 12px;
  font-size: 13px;
}

/* ===================== LOGS DE EVENTOS — GRID MAIS LIMPO ===================== */
.logs-config-card {
  padding: 20px;
}

.logs-intro {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
  padding: 14px 15px;
  border: 1px solid #292e37;
  border-radius: 12px;
  background: linear-gradient(180deg, #15181e, #111318);
}

.logs-intro-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(12,70,231,.13);
  border: 1px solid rgba(12,70,231,.28);
  color: #6f96ff;
  font-size: 22px;
  font-weight: 800;
}

.logs-intro strong {
  display: block;
  font-size: 14px;
}

.logs-intro p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.logs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.log-setting {
  position: relative;
  min-width: 0;
  padding: 13px 13px 12px;
  border: 1px solid #272c35;
  border-radius: 12px;
  background: #111318;
  transition: border-color .16s, background .16s, transform .16s, box-shadow .16s;
}

.log-setting:hover {
  border-color: #343a46;
  background: #14171d;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0,0,0,.14);
  z-index: 100;
}

.log-setting-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.log-setting-title label {
  flex: 1;
  min-width: 0;
  margin: 0 0 7px;
  color: #e6e8ec;
  font-size: 13px;
}

.log-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin-bottom: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px rgba(12,70,231,.45);
}

.log-setting .ms-wrap {
  margin: 0;
}

.log-setting .ms-box {
  min-height: 46px;
  border-radius: 11px;
}

@media (max-width: 720px) {
  .logs-grid { grid-template-columns: 1fr; }
  .logs-intro { align-items: flex-start; }
  .logs-config-card { padding: 15px; }
}


/* =========================================================
   DASHBOARD REFRESH — visual inspirado em plataformas de streaming
   Mantém a paleta azul existente e não altera a lógica do bot.
   ========================================================= */
:root{
  --bg:#08090c;
  --bg-alt:#101218;
  --bg-card:#11141b;
  --bg-sidebar:#0b0d12;
  --accent:#0c46e7;
  --accent-hover:#1659ff;
  --text:#f7f8fb;
  --text-muted:#9298a7;
  --green:#27c777;
  --red:#ff4d68;
  --border:rgba(255,255,255,.075);
  --border-strong:rgba(255,255,255,.12);
  --shadow:0 18px 50px rgba(0,0,0,.28);
}

html{scroll-behavior:smooth}
body{
  min-height:100vh;
  font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;
  background:
    radial-gradient(900px 420px at 16% -8%, rgba(12,70,231,.25), transparent 65%),
    radial-gradient(700px 380px at 95% 15%, rgba(12,70,231,.08), transparent 70%),
    #08090c;
}
body:before{
  content:"";
  position:fixed; inset:0; pointer-events:none; z-index:-1;
  background:linear-gradient(180deg,rgba(255,255,255,.018),transparent 30%);
}

.topbar{
  height:72px;
  padding:0 30px;
  background:rgba(9,11,15,.82);
  border-bottom:1px solid var(--border);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.topbar .brand{
  font-size:20px;
  letter-spacing:.8px;
}
.topbar .brand span.mark{
  color:#fff;
}
.topbar .brand span.mark:after{
  content:"";
  display:inline-block;
  width:7px;height:7px;margin:0 0 2px 6px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 18px rgba(12,70,231,.9);
}
.topbar .user{gap:8px}
.topbar .user>a{
  padding:9px 13px;
  border-radius:10px;
  color:#c9cdd7;
}
.topbar .user>a:hover{
  background:rgba(255,255,255,.055);
  color:#fff;
}
.user-chip{
  background:rgba(255,255,255,.045);
  border:1px solid var(--border);
  border-radius:13px;
  padding:5px 13px 5px 5px;
}
.user-chip:hover{
  border-color:rgba(12,70,231,.55);
  background:rgba(12,70,231,.08);
}
.user-chip img.avatar,.user-chip .icon-fallback{
  width:31px;height:31px;
}

.app-shell{
  min-height:calc(100vh - 72px);
  gap:0;
}
.app-sidebar{
  width:278px;
  min-height:calc(100vh - 72px);
  top:72px;
  padding:22px 16px 28px;
  background:rgba(10,12,17,.76);
  border-right:1px solid var(--border);
  backdrop-filter:blur(18px);
}
.sidebar-guild{
  padding:11px;
  margin-bottom:24px;
  border-radius:15px;
  background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.018));
  border:1px solid var(--border);
  box-shadow:0 12px 30px rgba(0,0,0,.16);
}
.sidebar-guild img,.sidebar-guild .icon-fallback{
  width:44px;height:44px;
}
.sidebar-guild-info strong{font-size:14px}
.sidebar-guild-info span{font-size:11px}
.sidebar-nav{gap:22px}
.sidebar-group{gap:4px}
.sidebar-group-label{
  padding:0 12px 8px;
  font-size:10px;
  letter-spacing:.13em;
  color:#666d7b;
}
.sidebar-nav a{
  position:relative;
  padding:10px 12px;
  border:1px solid transparent;
  border-left:0;
  border-radius:11px;
  color:#858b99;
  font-size:13px;
}
.sidebar-nav a:hover{
  background:rgba(255,255,255,.045);
  color:#f2f4f8;
  border-color:var(--border);
}
.sidebar-nav a.active{
  color:#fff;
  font-weight:650;
  background:linear-gradient(90deg,rgba(12,70,231,.22),rgba(12,70,231,.055));
  border-color:rgba(12,70,231,.22);
  box-shadow:inset 3px 0 0 var(--accent),0 8px 25px rgba(0,0,0,.12);
}
.sidebar-nav a.active .sidebar-icon{
  color:#fff;
}
.sidebar-icon{width:24px;height:24px}
.sidebar-icon img{width:19px;height:19px;opacity:.82}
.sidebar-nav a.active .sidebar-icon img{opacity:1}
.sidebar-nav a .soon{
  background:rgba(255,255,255,.04);
  border-color:var(--border);
  color:#737987;
  font-size:9px;
}

.app-main{
  padding:38px 42px 100px;
}
.app-main .container{
  max-width:1180px;
}
.app-main h2{
  font-size:26px;
  line-height:1.2;
  letter-spacing:-.025em;
  margin-bottom:8px;
}
.app-main h2 + p{
  margin-top:0;
}

.container{max-width:1180px;padding:32px 24px}
.card{
  position:relative;
  background:linear-gradient(145deg,rgba(20,23,31,.92),rgba(13,15,21,.92));
  border:1px solid var(--border);
  border-radius:16px;
  padding:24px;
  margin-bottom:18px;
  box-shadow:var(--shadow);
}
.card:hover{
  border-color:rgba(255,255,255,.095);
}
.card h3{
  border-left:0;
  padding-left:0;
  font-size:15px;
  letter-spacing:.01em;
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:18px;
}
.card h3:before{
  content:"";
  width:4px;height:18px;
  border-radius:999px;
  background:var(--accent);
  box-shadow:0 0 14px rgba(12,70,231,.55);
}
.card p{line-height:1.6}

.grid{
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:18px;
}
.guild-card,
.guild-card:nth-child(4),
.guild-card:nth-child(5){
  grid-column:span 4;
  min-height:245px;
  padding:24px;
  border-radius:18px;
  background:
    radial-gradient(160px 100px at 50% 0%,rgba(12,70,231,.12),transparent 70%),
    linear-gradient(145deg,#13161e,#0f1117);
  border:1px solid var(--border);
  box-shadow:0 12px 36px rgba(0,0,0,.22);
}
.guild-card:hover{
  transform:translateY(-4px);
  border-color:rgba(12,70,231,.5);
  box-shadow:0 20px 45px rgba(0,0,0,.32),0 0 30px rgba(12,70,231,.10);
}
.guild-card img,.guild-card .icon-fallback{
  width:76px;height:76px;
  margin-bottom:14px;
  border:3px solid rgba(255,255,255,.05);
  box-shadow:0 10px 25px rgba(0,0,0,.25);
}
.guild-card .icon-fallback{font-size:27px}
.guild-card strong{font-size:15px}
.badge{
  padding:5px 11px;
  border-radius:999px;
  font-size:11px;
  font-weight:650;
  border:1px solid transparent;
}
.badge.ok{
  background:rgba(39,199,119,.08);
  border-color:rgba(39,199,119,.16);
  color:#48d892;
}
.badge.no{
  background:rgba(255,77,104,.08);
  border-color:rgba(255,77,104,.16);
  color:#ff7187;
}

.btn{
  padding:11px 18px;
  border-radius:11px;
  font-size:13px;
  font-weight:700;
  background:linear-gradient(135deg,#0c46e7,#0a3fd0);
  box-shadow:0 8px 20px rgba(12,70,231,.18);
}
.btn:hover{
  background:linear-gradient(135deg,#1659ff,#0c46e7);
  box-shadow:0 10px 28px rgba(12,70,231,.30);
}
.btn.secondary{
  background:rgba(255,255,255,.025);
  border:1px solid var(--border-strong);
  box-shadow:none;
}
.btn.secondary:hover{
  background:rgba(255,255,255,.06);
  border-color:rgba(12,70,231,.45);
}
.btn.danger{background:#17288a}

input[type=text],input[type=number],select,textarea{
  padding:12px 13px;
  background:rgba(5,7,10,.58);
  border:1px solid var(--border);
  border-radius:11px;
  color:#f4f6fa;
}
input:focus,select:focus,textarea:focus{
  border-color:rgba(12,70,231,.7);
  box-shadow:0 0 0 3px rgba(12,70,231,.10);
}
label{
  margin:15px 0 7px;
  font-size:12px;
  font-weight:600;
  color:#a1a7b4;
}
.toggle-row{
  padding:14px 0;
  border-bottom:1px solid rgba(255,255,255,.055);
}
input[type=checkbox]{
  width:46px;height:26px;
  background:#181b23;
}
input[type=checkbox]::before{
  width:20px;height:20px;
}
input[type=checkbox]:checked::before{transform:translateX(20px)}

.subcard{
  background:rgba(255,255,255,.025);
  border:1px solid var(--border);
  border-radius:12px;
}
.save-bar{
  bottom:18px;
  padding:13px 15px;
  background:rgba(15,18,25,.88);
  border:1px solid var(--border-strong);
  border-radius:14px;
  box-shadow:0 15px 45px rgba(0,0,0,.35);
  backdrop-filter:blur(15px);
}
.toast{font-weight:600}

.ms-box{
  min-height:46px;
  padding:8px 12px;
  border-radius:11px;
  background:rgba(5,7,10,.58);
  border-color:var(--border);
}
.ms-box:hover{border-color:rgba(12,70,231,.5)}
.ms-dropdown{
  margin-top:7px;
  border:1px solid var(--border-strong);
  border-radius:13px;
  background:#11141b;
  box-shadow:0 20px 45px rgba(0,0,0,.45);
  overflow:hidden;
  z-index:50;
}
.ms-search{border:0!important;border-bottom:1px solid var(--border)!important;border-radius:0!important}
.ms-option{padding:10px 12px}
.ms-option:hover,.ms-option.selected{
  background:rgba(12,70,231,.12);
}
.ms-chip{
  background:rgba(12,70,231,.14);
  border:1px solid rgba(12,70,231,.28);
  border-radius:8px;
  padding:4px 8px;
  color:#dce6ff;
}
.ms-arrow{color:#697182}

.logs-config-card{padding:22px}
.logs-intro{
  padding:14px 16px;
  border-radius:13px;
  background:linear-gradient(90deg,rgba(12,70,231,.10),rgba(255,255,255,.02));
  border:1px solid rgba(12,70,231,.14);
}
.log-setting{
  background:rgba(255,255,255,.018);
  border:1px solid rgba(255,255,255,.05);
  border-radius:13px;
  padding:13px;
  transition:.15s;
}
.log-setting:hover{
  border-color:rgba(12,70,231,.25);
  background:rgba(12,70,231,.035);
}
.log-setting-title label{margin:0 0 8px}
.log-dot{
  width:7px;height:7px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 12px rgba(12,70,231,.7);
}

.login-wrap{
  background:
    radial-gradient(600px 300px at 50% 25%,rgba(12,70,231,.20),transparent 70%);
}
.login-box{
  width:min(430px,calc(100% - 32px));
  padding:40px;
  background:rgba(16,18,24,.76);
  border:1px solid var(--border-strong);
  border-radius:22px;
  box-shadow:0 30px 80px rgba(0,0,0,.45);
  backdrop-filter:blur(20px);
}
.login-box h1{
  font-size:38px;
  margin-top:0;
}
.login-box p{line-height:1.55}

.pill{
  background:rgba(255,255,255,.035);
  border-color:var(--border);
}

@media (max-width:1100px){
  .guild-card,.guild-card:nth-child(4),.guild-card:nth-child(5){grid-column:span 6}
}
@media (max-width:900px){
  .app-sidebar{width:100%;padding:14px}
  .app-main{padding:22px 18px 80px}
  .guild-card,.guild-card:nth-child(4),.guild-card:nth-child(5){grid-column:auto}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:560px){
  .topbar{height:auto;min-height:64px;padding:10px 14px;gap:10px;flex-wrap:wrap}
  .topbar .user{width:100%;justify-content:flex-end;flex-wrap:wrap}
  .grid{grid-template-columns:1fr}
  .card{padding:18px}
  .login-box{padding:28px 22px}
}

.dashboard-hero{
  background:
    radial-gradient(500px 220px at 85% 20%,rgba(12,70,231,.18),transparent 70%),
    linear-gradient(145deg,rgba(18,22,31,.96),rgba(10,12,17,.96));
}
.dashboard-hero:after{
  content:"";
  position:absolute;
  width:260px;height:260px;
  right:-90px;top:-110px;
  border-radius:50%;
  border:1px solid rgba(12,70,231,.16);
  box-shadow:0 0 0 40px rgba(12,70,231,.025),0 0 0 80px rgba(12,70,231,.015);
}

/* Editor de embeds personalizados */
.embed-builder-note { margin-top: 4px; }
#fields .field-row { margin-bottom: 10px; }

/* ===================== COMMERCIAL / PREMIUM ===================== */
.commercial-container { max-width: 1180px; }
.narrow-container { max-width: 900px; }
.center-heading { text-align: center; }
.empty-card, .panel-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.guild-card { display:flex; gap:14px; align-items:flex-start; }
.commercial-guild-card { min-height: 145px; }
.guild-card-main { display:flex; flex-direction:column; gap:7px; min-width:0; }
.guild-card-main strong { font-size:18px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.license-days { color:var(--text-muted); }
.stats-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin:22px 0; }
.stat-card { background:var(--bg-card); border:1px solid var(--border); border-radius:12px; padding:18px; }
.stat-card span { color:var(--text-muted); display:block; font-size:13px; }
.stat-card strong { display:block; margin-top:8px; font-size:25px; }
.admin-heading, .section-title-row, .admin-actions, .form-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.admin-actions { justify-content:flex-start; margin:0 0 20px; }
.admin-bot-row, .payment-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:16px; padding:15px 0; border-bottom:1px solid var(--border); }
.admin-bot-row:last-child, .payment-row:last-child { border-bottom:0; }
.admin-bot-row > div:first-child, .payment-row > div { min-width:0; display:flex; flex-direction:column; gap:4px; }
.admin-bot-row span, .payment-row span { color:var(--text-muted); font-size:13px; }
.admin-row-center { display:flex; align-items:center; gap:10px; }
.admin-row-actions { display:flex; gap:7px; align-items:center; justify-content:flex-end; }
.btn.small { padding:7px 10px; font-size:12px; }
.plans-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; max-width:950px; margin:0 auto; }
.plan-card { position:relative; border:1px solid var(--border); border-radius:14px; padding:28px; background:var(--bg-card); text-align:center; }
.plan-card.popular { border-color:var(--accent); }
.plan-popular { position:absolute; top:0; left:0; right:0; padding:8px; border-radius:13px 13px 0 0; background:var(--accent); font-weight:700; font-size:12px; }
.plan-card.popular h3 { margin-top:28px; }
.plan-price { font-size:32px; font-weight:800; margin:15px 0 6px; }
.commercial-form { display:grid; gap:16px; }
.commercial-form label { display:grid; gap:7px; font-weight:600; }
.commercial-form input, .commercial-form select, .inline-form input { width:100%; padding:12px 13px; background:#101010; color:#fff; border:1px solid #2a2a2a; border-radius:8px; outline:none; }
.commercial-form input:focus, .commercial-form select:focus, .inline-form input:focus { border-color:var(--accent); }
.form-note { color:var(--text-muted); font-size:13px; }
.inline-form { display:grid; grid-template-columns:1.5fr .8fr 1fr auto; gap:10px; }
.finance-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.bot-summary { display:flex; align-items:center; gap:13px; margin-top:16px; }
.bot-summary > div:last-child { display:flex; flex-direction:column; gap:4px; }
.bot-summary span { color:var(--text-muted); }
.avatar-placeholder { width:48px; height:48px; display:grid; place-items:center; border-radius:50%; background:#222; }
.finance-status { display:inline-block; margin-top:18px; padding:8px 12px; border-radius:7px; }
.finance-status.ok { background:rgba(22,150,49,.15); color:#54d77a; }
.finance-status.no { background:rgba(220,50,50,.15); color:#ff7777; }
.info-row { display:flex; justify-content:space-between; gap:20px; padding:13px 0; border-bottom:1px solid var(--border); }
.info-row span { color:var(--text-muted); }
.payment-row { grid-template-columns:minmax(0,1fr) auto auto; }
.payment-method { text-transform:capitalize; }
.payment-days { color:#48d66b; }
@media (max-width: 900px) { .stats-grid { grid-template-columns:repeat(2,1fr); } .plans-grid, .finance-grid { grid-template-columns:1fr; } .admin-bot-row { grid-template-columns:1fr; } .admin-row-actions { justify-content:flex-start; flex-wrap:wrap; } .inline-form { grid-template-columns:1fr; } }


/* ===================== SERVIDORES / CARDS COMERCIAIS ===================== */
.servers-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.servers-grid .commercial-guild-card {
  grid-column: auto !important;
  width: 100%;
  min-height: 362px;
  box-sizing: border-box;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}
.guild-card-top {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 82px;
}
.servers-grid .commercial-guild-card img,
.servers-grid .commercial-guild-card .icon-fallback {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  margin: 0;
}
.servers-grid .guild-card-main {
  width: 100%;
  flex: 1;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.servers-grid .guild-name {
  width: 100%;
  font-size: 18px;
  line-height: 1.25;
}
.servers-grid .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  box-sizing: border-box;
}
.servers-grid .license-days {
  margin-top: 0;
  font-size: 13px;
}
.guild-card-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}
.guild-card-actions .btn {
  width: 106px;
  min-width: 106px;
  box-sizing: border-box;
  text-align: center;
  justify-content: center;
  margin: 0 !important;
}
@media (max-width: 980px) {
  .servers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .servers-grid { grid-template-columns: 1fr; }
  .servers-grid .commercial-guild-card { min-height: 340px; }
}

/* ===================== BANCO INTER / DADOS DE PAGAMENTO ===================== */
.bank-info-card {
  margin-top: 20px;
}
.bank-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.bank-info-item {
  background: #101010;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bank-info-item span { color: var(--text-muted); font-size: 12px; }
.bank-info-item strong { overflow-wrap: anywhere; }
@media (max-width: 700px) { .bank-info-grid { grid-template-columns: 1fr; } }

/* ===================== VENDAS / TICKETS DE COMPRA ===================== */
.plan-card .btn { margin-top: 12px; min-width: 130px; }
.purchase-history-card { margin-top: 22px; }
.ticket-link-row { text-decoration: none; color: inherit; cursor: pointer; }
.ticket-link-row:hover { border-color: var(--accent); }
.purchase-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:4px 0 8px; }
.purchase-summary > div { background:#101010; border:1px solid var(--border); border-radius:10px; padding:12px; display:flex; flex-direction:column; gap:4px; }
.purchase-summary span { color:var(--text-muted); font-size:12px; }
.ticket-purchase-layout { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.pix-card { text-align:center; }
.pix-help { color:var(--text-muted); line-height:1.5; }
.pix-qr { width:220px; min-height:220px; margin:18px auto; padding:8px; background:#fff; border-radius:12px; display:flex; align-items:center; justify-content:center; }
.pix-qr img { display:block; }
.pix-label { display:block; text-align:left; color:var(--text-muted); font-size:12px; margin:10px 0 6px; }
.pix-copy-row { display:flex; gap:8px; }
.pix-copy-row input { flex:1; min-width:0; padding:12px; background:#101010; color:#fff; border:1px solid var(--border); border-radius:8px; }
.pix-key { background:#101010; border:1px solid var(--border); border-radius:8px; padding:12px; overflow-wrap:anywhere; text-align:left; }
.success-box, .error-box { margin-top:18px; padding:13px 15px; border-radius:10px; line-height:1.5; }
.success-box { background:rgba(22,150,49,.12); border:1px solid rgba(22,150,49,.3); color:#72e39a; }
.error-box { background:rgba(220,50,50,.12); border:1px solid rgba(220,50,50,.3); color:#ff8888; }
.ticket-instance-select { min-width:190px; padding:9px 10px; background:#101010; color:#fff; border:1px solid var(--border); border-radius:8px; }
.purchase-admin-row { align-items:center; }
@media(max-width:900px){ .ticket-purchase-layout{grid-template-columns:1fr}.purchase-summary{grid-template-columns:1fr}.purchase-admin-row{grid-template-columns:1fr}.ticket-instance-select{width:100%}.pix-copy-row{flex-direction:column} }


/* ===================== CHAT DOS TICKETS DE COMPRA ===================== */
.purchase-ticket-page { max-width: 980px; }
.ticket-page-heading { align-items: flex-start; }
.purchase-chat-shell { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 10px 35px rgba(0,0,0,.16); }
.purchase-chat-head { min-height: 68px; padding: 12px 18px; display:flex; align-items:center; gap:12px; border-bottom:1px solid var(--border); background:#15171c; }
.purchase-chat-head > div:last-child { display:flex; flex-direction:column; gap:3px; }
.purchase-chat-head span { color:var(--text-muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.purchase-chat-bot-avatar, .chat-avatar { width:40px; height:40px; flex:0 0 40px; border-radius:50%; display:grid; place-items:center; font-weight:800; background:var(--accent); color:#fff; }
.purchase-chat { height:620px; overflow-y:auto; padding:22px 18px; background:linear-gradient(180deg,#0d0f13,#101217); }
.chat-message { display:flex; gap:10px; margin-bottom:18px; max-width:86%; }
.chat-message.customer-message { margin-left:auto; flex-direction:row-reverse; }
.chat-message.admin-message { max-width:86%; }
.chat-message.customer-message .chat-avatar { background:#30343d; }
.chat-message.admin-message .chat-avatar { background:#3b82f6; }
.chat-bubble-wrap { min-width:0; display:flex; flex-direction:column; align-items:flex-start; }
.customer-message .chat-bubble-wrap { align-items:flex-end; }
.chat-sender { color:var(--text-muted); font-size:11px; font-weight:700; margin:0 7px 5px; }
.chat-bubble { background:#191c22; border:1px solid #282d36; border-radius:12px; padding:10px 13px; color:var(--text); line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.customer-message .chat-bubble { background:var(--accent); border-color:var(--accent); color:#fff; }
.chat-attachment { display:block; margin-top:8px; color:inherit; text-decoration:none; background:#191c22; border:1px solid #282d36; border-radius:10px; padding:8px; max-width:360px; }
.chat-attachment img { display:block; max-width:340px; max-height:360px; border-radius:7px; }
.bot-pix-card { width:min(390px,100%); margin-top:10px; background:#12151a; border:1px solid #303641; border-radius:13px; padding:15px; box-sizing:border-box; }
.bot-pix-title { font-weight:800; font-size:16px; }
.bot-pix-subtitle { margin-top:5px; color:var(--text-muted); font-size:12px; line-height:1.45; }
.chat-pix-qr { width:220px; min-height:220px; margin:14px auto; }
.bot-pix-amount { text-align:center; font-size:24px; font-weight:900; margin:4px 0 12px; }
.bot-pix-label, .bot-pix-receiver { color:var(--text-muted); font-size:11px; margin:8px 0 5px; }
.bot-pix-receiver { margin-top:10px; }
.purchase-chat-composer { display:flex; align-items:flex-end; gap:9px; padding:12px; border-top:1px solid var(--border); background:#15171c; }
.chat-attach-btn { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border:1px solid var(--border); border-radius:10px; cursor:pointer; background:#101216; font-size:19px; }
.chat-attach-btn:hover { border-color:var(--accent); }
.chat-compose-main { flex:1; min-width:0; }
.chat-compose-main textarea { width:100%; box-sizing:border-box; min-height:42px; max-height:130px; resize:vertical; padding:11px 13px; background:#101216; color:#fff; border:1px solid var(--border); border-radius:10px; outline:none; font:inherit; }
.chat-compose-main textarea:focus { border-color:var(--accent); }
.attachment-preview { margin-bottom:6px; color:var(--text-muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-hint { padding:8px 14px 12px; color:var(--text-muted); font-size:11px; background:#15171c; }
.purchase-admin-actions-card { margin-top:18px; display:flex; align-items:center; justify-content:space-between; gap:18px; }
@media(max-width:700px){ .purchase-chat { height:68vh; padding:16px 10px; } .chat-message{max-width:94%}.purchase-chat-composer{gap:6px}.purchase-admin-actions-card{flex-direction:column;align-items:stretch}.purchase-admin-actions-card .admin-row-actions{justify-content:flex-start} }

/* Server cards: consistent component sizing and aligned actions */
.servers-grid { align-items: stretch; }
.commercial-guild-card { min-height: 320px; display:flex; flex-direction:column; }
.commercial-guild-card .guild-card-main { display:flex; flex-direction:column; flex:1; }
.commercial-guild-card .guild-card-actions { margin-top:auto; }
.guild-card-top img, .guild-card-top .icon-fallback { width:72px; height:72px; border-radius:50%; object-fit:cover; }


/* Campos de texto: padrão arredondado consistente em todo o painel */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]),
textarea,
select {
  border-radius: 11px !important;
}


/* ===== Campos de escrever = mesmo visual dos seletores (.ms-box) =====
   Cobre inputs com e sem atributo type (ex.: Nome do painel, Prefixo), textareas e selects nativos. */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not(.ms-search),
textarea,
select {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--border) !important;
  border-radius: 11px !important;
  background: rgba(5,7,10,.58) !important;
  color: #f4f6fa;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 6px 20px rgba(0,0,0,.13) !important;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not(.ms-search)::placeholder,
textarea::placeholder { color: #858b97; opacity: 1; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not(.ms-search):hover,
textarea:hover,
select:hover { border-color: rgba(12,70,231,.5) !important; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not(.ms-search):focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(12,70,231,.10), 0 9px 24px rgba(0,0,0,.17) !important;
}
textarea { min-height: 92px; padding: 11px 12px; }
