/* ============================================================
   TTK LIVE GAMES — DASHBOARD
   ============================================================ */

/* ---------- RESET ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
  background: #0a0f1c;
  color: #e6edf5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body > .app { display: flex; height: 100vh; overflow: hidden; }

/* ✅ CORREÇÃO: garante que qualquer elemento com [hidden] fique oculto */
[hidden] { display: none !important; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-screen {
  position: fixed; inset: 0;
  background: radial-gradient(circle at 20% 20%, #12203a 0%, #0a0f1c 60%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 200;
}
.login-screen[hidden] { display: none; }

.login-card {
  width: 100%; max-width: 400px;
  background: #0d1729;
  border: 1px solid #1a2740;
  border-radius: 22px;
  padding: 32px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: fadeIn 0.4s ease;
}

.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .logo-mark.big {
  width: 64px; height: 64px; margin: 0 auto 14px;
  font-size: 22px; border-radius: 16px;
}
.login-brand h1 { font-size: 22px; color: #fff; font-weight: 700; margin-bottom: 6px; }
.login-brand p { font-size: 13px; color: #7b8ba6; }

.login-form .form-group { margin-bottom: 16px; }
.login-form .btn-full { margin-top: 20px; }

.login-error {
  font-size: 13px;
  color: #ef4444;
  min-height: 18px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.login-error.show { opacity: 1; }

.login-hint {
  font-size: 11.5px;
  text-align: center;
  color: #5a6b85;
  margin-top: 18px;
}
.login-hint strong { color: #60a5fa; font-weight: 600; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: 260px; min-width: 260px; height: 100vh;
  background: #0c1424;
  border-right: 1px solid #1a2740;
  display: flex; flex-direction: column;
  padding: 24px 16px 16px;
  z-index: 10;
}

.logo {
  display: flex; align-items: center; gap: 12px;
  padding: 0 8px 20px 8px;
  border-bottom: 1px solid #1a2740;
  margin-bottom: 20px;
}
.logo-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; letter-spacing: 0.5px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}
.logo-name { font-size: 18px; font-weight: 700; line-height: 1.15; color: #fff; }
.logo-name span { display: block; font-size: 12px; font-weight: 400; color: #7b8ba6; letter-spacing: 0.4px; }

.menu { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.menu::-webkit-scrollbar { width: 6px; }
.menu::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 6px; }

.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; border-radius: 10px;
  background: transparent; border: none;
  color: #8fa3c0; font-size: 14.5px; font-weight: 500;
  cursor: pointer; transition: all 0.2s ease;
  font-family: inherit; text-align: left; width: 100%;
  text-decoration: none;
}
.menu-item svg { width: 19px; height: 19px; flex-shrink: 0; transition: color 0.2s ease; }
.menu-item:hover { background: #15223b; color: #c7d6ee; }
.menu-item:hover svg { color: #60a5fa; }
.menu-item.active {
  background: linear-gradient(90deg, #1e3a8a 0%, #1e40af 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(30, 64, 175, 0.4);
}
.menu-item.active svg { color: #fff; }

.sidebar-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px;
  border-top: 1px solid #1a2740;
  margin-top: 12px;
}
.current-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sidebar-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid #1e3a8a; flex-shrink: 0; background: #12203a; }
.current-user-info { min-width: 0; flex: 1; }
.current-user-info p { font-size: 12.5px; font-weight: 600; color: #e6edf5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.current-user-info span { font-size: 10.5px; color: #7b8ba6; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.btn-logout {
  width: 32px; height: 32px; border-radius: 8px;
  background: transparent; border: 1px solid #1a2740;
  color: #7b8ba6; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; flex-shrink: 0;
}
.btn-logout:hover { color: #ef4444; border-color: #ef4444; background: rgba(239,68,68,0.1); }
.btn-logout svg { width: 15px; height: 15px; }

/* ============================================================
   CONTEÚDO PRINCIPAL
   ============================================================ */
.content {
  flex: 1; height: 100vh; overflow-y: auto;
  padding: 28px 36px;
  background: #0a0f1c;
  position: relative;
}

.topbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; padding-bottom: 18px;
  border-bottom: 1px solid #131f36;
}
.topbar-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: #7b8ba6; font-weight: 500; }
.crumb-link { color: #60a5fa; text-decoration: none; transition: color 0.2s; }
.crumb-link:hover { color: #93c5fd; text-decoration: underline; }
.crumb-sep { color: #3a4964; }
.crumb-current { color: #e6edf5; font-weight: 600; }

#page-title { font-size: 24px; font-weight: 700; color: #fff; letter-spacing: -0.3px; line-height: 1.15; }

.save-indicator {
  font-size: 13px; color: #22c55e;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  padding: 6px 14px; border-radius: 20px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none; flex-shrink: 0; margin-bottom: 4px;
}
.save-indicator.show { opacity: 1; transform: translateY(0); }

/* ============================================================
   VIEWS
   ============================================================ */
.view { display: none; animation: fadeIn 0.25s ease; }
.view.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HOME
   ============================================================ */
.hero-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 22px 26px;
  background: linear-gradient(135deg, #12203a 0%, #0d1729 60%, #0a1628 100%);
  border: 1px solid #1a2740; border-radius: 20px;
  margin-bottom: 22px; position: relative; overflow: hidden;
}
.hero-card::before {
  content: ''; position: absolute; top: -40%; right: -10%;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(37,99,235,0.25), transparent 70%);
  pointer-events: none;
}
.hero-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.hero-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  object-fit: cover; border: 3px solid #1e3a8a;
  background: #12203a; flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(37,99,235,0.3);
}
.hero-greeting { font-size: 13px; color: #7b8ba6; font-weight: 500; margin-bottom: 2px; }
.hero-name { font-size: 21px; font-weight: 700; color: #fff; line-height: 1.15; margin-bottom: 2px; }
.hero-user { font-size: 13px; color: #60a5fa; font-weight: 500; }
.hero-right { text-align: right; flex-shrink: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(34,197,94,0.12); color: #22c55e;
  border: 1px solid rgba(34,197,94,0.35);
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; margin-bottom: 8px;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero-date { font-size: 13px; color: #7b8ba6; text-transform: capitalize; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; background: #0d1729;
  border: 1px solid #1a2740; border-radius: 16px;
  transition: transform 0.2s, border-color 0.2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: #2563eb; }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 22px; height: 22px; color: #fff; }
.stat-icon-blue   { background: linear-gradient(135deg, #1e40af, #2563eb); }
.stat-icon-green  { background: linear-gradient(135deg, #15803d, #22c55e); }
.stat-icon-purple { background: linear-gradient(135deg, #6b21a8, #a855f7); }
.stat-icon-amber  { background: linear-gradient(135deg, #b45309, #f59e0b); }
.stat-label { font-size: 12px; color: #7b8ba6; font-weight: 500; margin-bottom: 2px; }
.stat-value { font-size: 22px; font-weight: 700; color: #fff; line-height: 1; margin-bottom: 4px; }
.stat-extra { font-size: 11.5px; color: #5a6b85; }

.row-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }

.panel { background: #0d1729; border: 1px solid #1a2740; border-radius: 18px; padding: 20px 22px; margin-bottom: 18px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.panel-header h3 { font-size: 15px; font-weight: 700; color: #fff; }
.panel-hint { font-size: 12px; color: #7b8ba6; font-weight: 500; }
.panel-link { font-size: 12.5px; color: #60a5fa; text-decoration: none; font-weight: 600; }
.panel-link:hover { color: #93c5fd; text-decoration: underline; }

.plan-tag { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; padding: 5px 11px; border-radius: 999px; background: linear-gradient(135deg,#2563eb,#1e40af); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,0.35); }
.plan-name { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.plan-desc { font-size: 13px; color: #7b8ba6; margin-bottom: 14px; line-height: 1.5; }
.plan-features { list-style: none; margin-bottom: 16px; display: flex; flex-direction: column; gap: 7px; }
.plan-features li { font-size: 13.5px; color: #c7d6ee; padding-left: 22px; position: relative; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #22c55e; font-weight: 700; font-size: 14px; }
.plan-progress { margin-bottom: 16px; }
.plan-progress-info { display: flex; justify-content: space-between; font-size: 12.5px; color: #7b8ba6; margin-bottom: 8px; }
.plan-progress-info strong { color: #e6edf5; }
.progress-bar { height: 6px; background: #1a2740; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg,#2563eb,#60a5fa); border-radius: 999px; transition: width 0.5s ease; }
.btn-full { width: 100%; margin-top: 0 !important; }

.level-badge { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(37,99,235,0.15); color: #60a5fa; border: 1px solid rgba(37,99,235,0.35); }
.level-body { display: flex; align-items: center; gap: 22px; }
.level-circle { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.level-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #1a2740; stroke-width: 8; }
.ring-fill { fill: none; stroke: #2563eb; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.level-circle-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.level-number { font-size: 28px; font-weight: 800; color: #fff; line-height: 1; }
.level-label { font-size: 10.5px; color: #7b8ba6; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.level-details { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.level-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #7b8ba6; gap: 10px; }
.level-row strong { color: #e6edf5; font-size: 13.5px; font-weight: 600; text-align: right; }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.summary-item { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: #0a0f1c; border: 1px solid #1a2740; border-radius: 12px; }
.summary-label { font-size: 11.5px; color: #7b8ba6; font-weight: 500; }
.summary-item strong { font-size: 14.5px; color: #e6edf5; font-weight: 700; }
.summary-status { color: #22c55e !important; }

/* ============================================================
   JOGOS
   ============================================================ */
.games-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.games-toolbar .search-wrapper { flex: 1; }
.btn-add-game {
  display: inline-flex; align-items: center; gap: 8px;
  flex-shrink: 0; padding: 14px 22px; margin-top: 0 !important;
  border-radius: 14px; font-size: 14.5px;
}
.btn-add-game svg { width: 16px; height: 16px; }

.search-wrapper { position: relative; width: 100%; }
.search-bar {
  display: flex; align-items: center; gap: 14px;
  width: 100%; background: #0d1729;
  border: 1.5px solid #1a2740; border-radius: 14px;
  padding: 15px 22px; transition: all 0.2s ease;
}
.search-bar:focus-within { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,0.18); background: #0f1a2e; }
.search-bar > svg { width: 20px; height: 20px; color: #5a6b85; flex-shrink: 0; transition: color 0.2s; }
.search-bar:focus-within > svg { color: #60a5fa; }
.search-bar input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #e6edf5; font-size: 16px; font-family: inherit; font-weight: 500; min-width: 0;
}
.search-bar input::placeholder { color: #4b5b74; font-weight: 400; }

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #0d1729; border: 1px solid #1a2740;
  border-radius: 14px; padding: 6px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.65);
  z-index: 60; max-height: 400px; overflow-y: auto;
  animation: dropIn 0.18s ease;
}
.search-results[hidden] { display: none; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background 0.15s; }
.search-item:hover { background: #15223b; }
.search-thumb { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.06); }
.search-item-info { flex: 1; min-width: 0; }
.search-item-name { font-size: 14px; font-weight: 600; color: #e6edf5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-cat { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; color: #60a5fa; background: rgba(37,99,235,0.15); padding: 2px 8px; border-radius: 6px; }
.no-results { padding: 26px 20px; text-align: center; color: #7b8ba6; font-size: 14px; }
.no-results strong { color: #a9bcd8; }

.categories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-btn {
  padding: 8px 16px; background: #0d1729;
  border: 1.5px solid #1a2740; border-radius: 999px;
  color: #a9bcd8; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.18s ease;
  text-decoration: none; white-space: nowrap;
}
.cat-btn:hover { border-color: #2563eb; color: #60a5fa; background: #12203a; }
.cat-btn.active {
  background: linear-gradient(135deg,#2563eb,#1e40af);
  border-color: #2563eb; color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.game-card {
  background: #0d1729; border: 1px solid #1a2740;
  border-radius: 16px; overflow: hidden;
  transition: all 0.25s ease;
  display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-4px); border-color: #2563eb; box-shadow: 0 12px 30px rgba(37,99,235,0.25); }
.card-cover {
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.card-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-cover-initial { font-size: 44px; font-weight: 800; color: rgba(255,255,255,0.9); text-shadow: 0 3px 12px rgba(0,0,0,0.4); }
.card-info { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.25; }
.card-cat { font-size: 11.5px; font-weight: 600; color: #60a5fa; background: rgba(37,99,235,0.15); padding: 3px 9px; border-radius: 6px; align-self: flex-start; }
.card-actions { display: flex; gap: 8px; margin-top: 8px; }

.btn-play {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff; border: none; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.2s ease;
}
.btn-play:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,0.5); }
.btn-play svg { width: 13px; height: 13px; }

.btn-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: transparent; border: 1.5px solid #1a2740;
  color: #7b8ba6; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; padding: 0;
}
.btn-icon svg { width: 15px; height: 15px; }
.btn-icon:hover { border-color: #2563eb; color: #60a5fa; background: rgba(37,99,235,0.1); }
.btn-icon.danger:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.1); }

.empty-state {
  padding: 60px 24px;
  text-align: center;
  border: 2px dashed #1a2740;
  border-radius: 18px;
  background: #0d1729;
}
.empty-state p { font-size: 16px; color: #7b8ba6; font-weight: 500; }
.empty-state .empty-hint { font-size: 13px; margin-top: 6px; color: #5a6b85; }

/* ============================================================
   PÁGINA DE DETALHES DO JOGO
   ============================================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.back-link:hover {
  color: #93c5fd;
  background: rgba(37,99,235,0.1);
}
.back-link svg { width: 15px; height: 15px; }

.game-detail-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 26px;
  margin-bottom: 24px;
  background: #0d1729;
  border: 1px solid #1a2740;
  border-radius: 20px;
  padding: 22px;
  align-items: center;
}

.game-detail-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #12203a;
  border: 1px solid #1a2740;
}

.game-detail-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-detail-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.game-detail-title {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.5px;
  word-break: break-word;
}

.game-detail-short {
  font-size: 14.5px;
  color: #a9bcd8;
  line-height: 1.55;
}

.btn-play-large {
  padding: 14px 26px !important;
  font-size: 15.5px !important;
  border-radius: 12px !important;
  align-self: flex-start;
}
.btn-play-large svg { width: 16px; height: 16px; }

.game-detail-panel { margin-bottom: 24px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: #0a0f1c;
  border: 1px solid #1a2740;
  border-radius: 12px;
}

.detail-label {
  font-size: 11.5px;
  color: #7b8ba6;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.detail-item strong {
  font-size: 14.5px;
  color: #e6edf5;
  font-weight: 700;
  word-break: break-word;
}

.detail-description {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  background: #0a0f1c;
  border: 1px solid #1a2740;
  border-radius: 12px;
}

.detail-desc-content {
  font-size: 14px;
  color: #c7d6ee;
  line-height: 1.7;
  word-break: break-word;
}

.auto-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed rgba(96,165,250,0.5);
  transition: all 0.2s ease;
  word-break: break-all;
}
.auto-link:hover {
  color: #93c5fd;
  border-bottom-color: #93c5fd;
  border-bottom-style: solid;
}
.auto-link::after {
  content: ' ↗';
  font-size: 11px;
  opacity: 0.7;
}

/* ============================================================
   ASSINATURA DO USUÁRIO
   ============================================================ */
.sub-container { max-width: 900px; }
.sub-hero { margin-bottom: 26px; }
.sub-hero h2 { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.sub-hero p { font-size: 14px; color: #7b8ba6; }

.sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.sub-card {
  background: #0d1729; border: 1px solid #1a2740;
  border-radius: 20px; padding: 26px;
  position: relative; display: flex; flex-direction: column;
}
.sub-card.current { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); max-width: 560px; }
.sub-card.premium { background: linear-gradient(160deg, #0f1a2e, #0a0f1c); }

.sub-badge {
  position: absolute; top: 20px; right: 20px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 1px;
  padding: 5px 11px; border-radius: 999px;
  background: linear-gradient(135deg,#2563eb,#1e40af); color: #fff;
}
.sub-badge.gold { background: linear-gradient(135deg,#d97706,#f59e0b); box-shadow: 0 4px 14px rgba(245,158,11,0.4); }

.sub-card h3 { font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.sub-price { font-size: 30px; font-weight: 800; color: #fff; margin-bottom: 18px; line-height: 1; }
.sub-price span { font-size: 14px; font-weight: 500; color: #7b8ba6; }
.sub-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; flex: 1; }
.sub-features li { font-size: 13.5px; color: #c7d6ee; padding-left: 22px; position: relative; }
.sub-features li::before { content: '✓'; position: absolute; left: 0; color: #22c55e; font-weight: 700; }
.sub-renew { font-size: 12.5px; color: #7b8ba6; margin-bottom: 14px; }

.btn-premium {
  background: linear-gradient(135deg,#d97706,#f59e0b);
  color: #fff; border: none;
  padding: 13px 22px; border-radius: 10px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.2s ease;
}
.btn-premium:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(245,158,11,0.4); }

/* ============================================================
   PLANOS (gerenciador — admin)
   ============================================================ */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.plan-card {
  background: #0a0f1c;
  border: 1.5px solid #1a2740;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}
.plan-card:hover { border-color: #2563eb; transform: translateY(-2px); }

.plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.plan-card-head h4 { font-size: 15px; font-weight: 700; color: #fff; }

.plan-type {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(37,99,235,0.15);
  color: #60a5fa;
  white-space: nowrap;
}
.plan-type.lifetime {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}

.plan-card-desc {
  font-size: 12.5px;
  color: #7b8ba6;
  line-height: 1.5;
  flex: 1;
}

.plan-card-price {
  font-size: 17px;
  font-weight: 800;
  color: #22c55e;
}

.plan-card-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid #1a2740;
}

/* ============================================================
   TABELAS (admin)
   ============================================================ */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead th {
  text-align: left; font-size: 11.5px; font-weight: 700;
  color: #7b8ba6; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 10px 14px; border-bottom: 1px solid #1a2740;
}
.data-table tbody td {
  padding: 14px; color: #c7d6ee;
  border-bottom: 1px solid #131f36;
}
.data-table tbody tr:hover { background: #0f1a2e; }
.data-table strong { color: #e6edf5; }

.tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(37,99,235,0.15);
  color: #60a5fa;
}
.tag-admin   { background: rgba(245,158,11,0.15); color: #f59e0b; }
.tag-premium { background: rgba(245,158,11,0.15); color: #f59e0b; }

.status-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 6px;
}
.status-dot.active   { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.status-dot.inactive { background: #ef4444; }

.row-actions { display: flex; gap: 6px; }
.btn-mini {
  padding: 6px 12px; border-radius: 8px;
  background: linear-gradient(135deg,#2563eb,#1e40af);
  color: #fff; border: none; font-size: 12px;
  font-weight: 600; font-family: inherit; cursor: pointer;
  transition: all 0.15s;
}
.btn-mini:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.4); }
.btn-mini.ghost {
  background: transparent; border: 1px solid #1a2740; color: #a9bcd8;
}
.btn-mini.ghost:hover { border-color: #2563eb; color: #60a5fa; background: #15223b; }

.btn-inline { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; margin-top: 0 !important; font-size: 13px; }
.btn-inline svg { width: 14px; height: 14px; }

.muted { color: #7b8ba6; font-size: 12.5px; }

/* ============================================================
   PERFIL
   ============================================================ */
.profile-container { max-width: 720px; }
.profile-header {
  display: flex; align-items: center; gap: 22px;
  padding: 22px; background: #0d1729;
  border: 1px solid #1a2740; border-radius: 20px;
  margin-bottom: 28px;
}
.avatar-wrapper { position: relative; flex-shrink: 0; }
.avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; background: #12203a; border: 3px solid #1e3a8a; display: block; }
.avatar-edit {
  position: absolute; bottom: 2px; right: 2px;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg,#2563eb,#1e40af);
  border: 3px solid #0d1729; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s ease;
}
.avatar-edit svg { width: 14px; height: 14px; }
.avatar-edit:hover { transform: scale(1.1); box-shadow: 0 4px 14px rgba(37,99,235,0.5); }
.profile-header-text h2 { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.profile-header-text p { font-size: 13.5px; color: #7b8ba6; }

.profile-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 7px; position: relative; }
.form-group-full { grid-column: 1 / -1; }
.form-group label { font-size: 12.5px; font-weight: 600; color: #a9bcd8; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 14px;
  background: #0d1729; border: 1.5px solid #1a2740;
  border-radius: 10px; color: #e6edf5;
  font-size: 14.5px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group textarea { resize: vertical; min-height: 78px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: #4b5b74; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.form-group input:disabled { opacity: 0.6; cursor: not-allowed; }

.form-group.valid input { border-color: #22c55e; }
.form-group.invalid input { border-color: #ef4444; }

.form-msg { font-size: 12px; min-height: 14px; color: #7b8ba6; }
.form-msg-full { text-align: center; margin-top: 10px; }
.form-msg.show { color: #ef4444; }
.form-hint { font-size: 11.5px; color: #5a6b85; }

.form-group.valid .form-msg { color: #22c55e; }
.form-group.invalid .form-msg { color: #ef4444; }

.input-with-prefix {
  display: flex; align-items: center;
  background: #0d1729; border: 1.5px solid #1a2740;
  border-radius: 10px; transition: all 0.2s;
  overflow: hidden;
}
.input-with-prefix .prefix { padding: 0 4px 0 14px; color: #4b5b74; font-size: 14.5px; font-weight: 600; user-select: none; }
.input-with-prefix input { border: none; background: transparent; padding-left: 2px; box-shadow: none !important; }
.input-with-prefix:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }

.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #c7d6ee; cursor: pointer; }
.checkbox-label input { width: auto; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .form-group-full { grid-column: 1 / -1; }

.file-preview { margin-top: 8px; border-radius: 10px; overflow: hidden; border: 1px solid #1a2740; }
.file-preview img { width: 100%; display: block; max-height: 160px; object-fit: cover; }

/* ---------- Chips de permissões ---------- */
.menu-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.btn-toggle-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(37,99,235,0.1);
  border: 1.5px solid rgba(37,99,235,0.35);
  border-radius: 8px;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-toggle-all:hover {
  background: rgba(37,99,235,0.2);
  border-color: #2563eb;
  color: #93c5fd;
}
.btn-toggle-all svg { width: 14px; height: 14px; }

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.checkbox-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #0a0f1c;
  border: 1.5px solid #1a2740;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  color: #c7d6ee;
  user-select: none;
}
.checkbox-chip:hover { border-color: #2563eb; background: #12203a; }
.checkbox-chip input { display: none; }
.checkbox-chip input:checked + span { color: #fff; font-weight: 600; }
.checkbox-chip:has(input:checked) {
  border-color: #2563eb;
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(37,99,235,0.05));
}

/* ============================================================
   SEGURANÇA
   ============================================================ */
.security-container { max-width: 520px; }
.security-card { background: #0d1729; border: 1px solid #1a2740; border-radius: 20px; padding: 26px; }
.security-card h2 { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.security-desc { font-size: 13px; color: #7b8ba6; margin-bottom: 18px; line-height: 1.5; }

.password-field { position: relative; display: flex; align-items: center; }
.password-field input {
  width: 100%; padding: 12px 46px 12px 14px;
  background: #0a0f1c; border: 1.5px solid #1a2740;
  border-radius: 10px; color: #e6edf5;
  font-size: 14.5px; font-family: inherit;
  letter-spacing: 0.5px; outline: none;
  transition: all 0.2s;
}
.password-field input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.password-field input[readonly] { cursor: default; color: #a9bcd8; }

.eye-btn {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  background: transparent; border: none;
  color: #5a6b85; cursor: pointer;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; padding: 0;
}
.eye-btn:hover { color: #60a5fa; background: rgba(96,165,250,0.1); }
.eye-btn svg { width: 17px; height: 17px; }
.eye-btn .eye-closed { display: none; }
.eye-btn.visible .eye-open { display: none; }
.eye-btn.visible .eye-closed { display: block; }

/* ============================================================
   BOTÕES GENÉRICOS
   ============================================================ */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg,#2563eb,#1e40af);
  color: #fff; border: none;
  padding: 12px 20px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(37,99,235,0.4); }

.btn-ghost {
  background: transparent; color: #a9bcd8;
  border: 1.5px solid #1a2740;
  padding: 11px 18px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { background: #15223b; color: #e6edf5; border-color: #2563eb; }

/* ============================================================
   MODAIS
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(4,8,18,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay[hidden] { display: none; }

.modal {
  width: 100%; max-width: 460px;
  background: #0d1729; border: 1px solid #1a2740;
  border-radius: 20px; padding: 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.25s ease;
}
.modal.modal-lg { max-width: 620px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal h3 { font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 18px; }

.modal-warning {
  display: flex; align-items: center; gap: 10px;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.35);
  color: #fbbf24; padding: 10px 14px;
  border-radius: 10px; font-size: 12.5px; font-weight: 600;
  margin-bottom: 18px; line-height: 1.4;
}
.modal-warning svg { width: 16px; height: 16px; flex-shrink: 0; }

.modal .form-group { margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.modal-actions .btn-primary { margin-top: 0; }

.strength { display: flex; gap: 5px; margin-top: 4px; }
.strength span { flex: 1; height: 4px; border-radius: 4px; background: #1a2740; transition: background 0.25s; }
.strength[data-level="1"] span:nth-child(1) { background: #ef4444; }
.strength[data-level="2"] span:nth-child(-n+2) { background: #f59e0b; }
.strength[data-level="3"] span:nth-child(-n+3) { background: #eab308; }
.strength[data-level="4"] span:nth-child(-n+4) { background: #22c55e; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
.content::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.menu::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 8px; }
.content::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover { background: #2563eb; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 900px) {
  .sidebar { width: 220px; min-width: 220px; }
  .content { padding: 22px; }
  .profile-form { grid-template-columns: 1fr; }
  .row-two { grid-template-columns: 1fr; }
  .sub-grid { grid-template-columns: 1fr; }
  .games-toolbar { flex-direction: column; align-items: stretch; }
  .form-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }

  .game-detail-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .game-detail-cover-wrap { max-width: 340px; margin: 0 auto; }
  .game-detail-title { font-size: 24px; }
}

@media (max-width: 640px) {
  body > .app { flex-direction: column; height: auto; }
  .sidebar {
    width: 100%; min-width: 100%; height: auto;
    flex-direction: row; align-items: center;
    padding: 12px 16px;
    border-right: none; border-bottom: 1px solid #1a2740;
    overflow-x: auto;
  }
  .logo { padding: 0 16px 0 0; border-bottom: none; margin-bottom: 0; border-right: 1px solid #1a2740; margin-right: 16px; }
  .logo-name span { display: none; }
  .menu { flex-direction: row; gap: 4px; flex: none; }
  .menu-item { padding: 10px 12px; }
  .menu-item span { display: none; }
  .menu-item svg { width: 21px; height: 21px; }
  .sidebar-footer { display: none; }

  .content { height: auto; overflow: visible; padding: 20px 14px; }
  #page-title { font-size: 21px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 12px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .stat-value { font-size: 17px; }

  .hero-card { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-avatar { width: 56px; height: 56px; }
  .hero-name { font-size: 18px; }

  .games-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-title { font-size: 13.5px; }
  .btn-play { font-size: 12.5px; padding: 8px 10px; }

  .level-body { flex-direction: column; align-items: flex-start; }
  .sub-grid { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }

  .game-detail-hero { padding: 16px; border-radius: 16px; }
  .game-detail-title { font-size: 20px; }
  .btn-play-large { width: 100%; justify-content: center; align-self: stretch; }
  .detail-grid { grid-template-columns: 1fr; }
  .menu-group-header { flex-direction: column; align-items: stretch; }
  .btn-toggle-all { justify-content: center; }
}

/* ============================================================
   ADIÇÕES: EDIÇÃO DE JOGO E INTEGRAÇÕES DINÂMICAS
   ============================================================ */
.integration-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.integration-row .form-group {
  flex: 1;
  margin-bottom: 0;
}
.integration-row .btn-icon {
  flex-shrink: 0;
  margin-top: 24px;
}