/* ═══════════════════════════════════════════════════════════════
   OTServList – Dark Modern Theme
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:          #f1f5f9;
  --surface:     #ffffff;
  --surface2:    #f8fafc;
  --border:      #e2e8f0;
  --border2:     #cbd5e1;
  --accent:      #16a34a;
  --accent-dim:  #15803d;
  --accent-glow: rgba(22, 163, 74, 0.15);
  --red:         #dc2626;
  --yellow:      #ca8a04;
  --blue:        #2563eb;
  --purple:      #7c3aed;
  --orange:      #ea580c;
  --text:        #0f172a;
  --text2:       #475569;
  --text3:       #94a3b8;
  --radius:      8px;
  --shadow:      0 2px 12px rgba(0,0,0,0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #4ade80; }

img { max-width: 100%; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── Header ────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.logo .logo-icon { font-size: 22px; }
.logo span.accent { color: var(--accent); }

.nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav a {
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text2);
  font-weight: 500;
  transition: all .15s;
  font-size: 13px;
}
.nav a:hover, .nav a.active {
  background: var(--surface2);
  color: var(--text);
}

.header-actions { display: flex; gap: 8px; align-items: center; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover {
  background: var(--border);
  border-color: var(--border2);
}
.btn-danger {
  background: rgba(239,68,68,.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,.2);
}
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-vote {
  background: #f0fdf4;
  color: var(--accent);
  border: 1px solid #bbf7d0;
  min-width: 76px;
  justify-content: center;
}
.btn-vote:hover {
  background: #dcfce7;
}
.btn-vote.voted {
  background: rgba(34,197,94,.08);
  color: var(--text3);
  border-color: var(--border);
  cursor: not-allowed;
}

/* ── Main layout ───────────────────────────────────────────── */
.main { max-width: 1280px; margin: 0 auto; padding: 24px 20px; }

/* ── Stat bar ──────────────────────────────────────────────── */
.stat-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.stat-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-pill strong { color: var(--text); }
.stat-pill .dot-green { color: var(--accent); }
.stat-pill .dot-blue  { color: var(--blue); }

/* ── Filter bar ────────────────────────────────────────────── */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-box {
  flex: 1;
  min-width: 180px;
  position: relative;
}
.search-box input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  padding: 7px 12px 7px 34px;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.search-box input:focus { border-color: var(--accent); }
.search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  font-size: 14px;
  pointer-events: none;
}

select.filter-select {
  background: #fff;
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text2);
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
}
select.filter-select:focus { border-color: var(--accent); color: var(--text); }

.filter-label {
  color: var(--text3);
  font-size: 12px;
  white-space: nowrap;
}

/* ── Server table ──────────────────────────────────────────── */
.servers-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.servers-table {
  width: 100%;
  border-collapse: collapse;
}

.servers-table thead th {
  background: #f8fafc; border-bottom: 2px solid var(--border);
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.servers-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}
.servers-table thead th.sortable:hover { color: var(--text2); }
.servers-table thead th.sorted { color: var(--accent); }

.servers-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.servers-table tbody tr:last-child { border-bottom: none; }
.servers-table tbody tr:hover { background: #f8fafc; }

.servers-table td { padding: 12px 14px; vertical-align: middle; }

/* Rank */
.td-rank {
  width: 40px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
}
.rank-1 { color: #f59e0b; }
.rank-2 { color: #94a3b8; }
.rank-3 { color: #cd7c2f; }

/* Server info cell */
.td-server { min-width: 240px; }
.server-info { display: flex; align-items: center; gap: 12px; }
.server-logo {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface2);
  border: 1px solid var(--border2);
  flex-shrink: 0;
}
.server-logo-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.server-text {}
.server-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  display: block;
  line-height: 1.3;
}
.server-name:hover { color: var(--accent); }
.server-desc {
  font-size: 12px;
  color: var(--text3);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
  margin-top: 2px;
}

/* Status indicator */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.status-dot.online  { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.status-dot.offline { background: var(--text3); }

/* Badge */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}
.badge-version  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-type     { background: #faf5ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-exp      { background: #fefce8; color: #854d0e; border: 1px solid #fde68a; }
.badge-location { background: rgba(148,163,184,.1); color: var(--text3); border: 1px solid var(--border); }

/* Players / votes */
.td-players, .td-votes { text-align: center; }
.players-count {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.players-count.zero { color: var(--text3); }
.votes-count {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

/* Uptime bar */
.uptime-bar {
  width: 80px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.uptime-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
}
.uptime-fill.low  { background: var(--red); }
.uptime-fill.mid  { background: var(--yellow); }

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ── Loading skeleton ──────────────────────────────────────── */
.skeleton { animation: pulse 1.5s ease-in-out infinite; border-radius: 4px; background: var(--surface2); }
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* ── Page header ───────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.page-header h1 { font-size: 20px; font-weight: 700; }
.page-header p  { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 720px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1/-1; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text2); }
.form-label span.req { color: var(--red); margin-left: 2px; }
.form-input, .form-textarea, .form-select {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--text3); margin-top: 2px; }
.form-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 20px;
}
.form-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

/* ── Alert / toast ─────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.alert-success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.2);  color: #86efac; }
.alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.2);  color: #fca5a5; }
.alert-info    { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.2); color: #93c5fd; }
.alert-warn    { background: rgba(234,179,8,.1);  border: 1px solid rgba(234,179,8,.2);  color: #fde68a; }

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  min-width: 260px;
  box-shadow: var(--shadow);
  animation: slideIn .2s ease;
}
.toast.success { border-left: 3px solid var(--accent); }
.toast.error   { border-left: 3px solid var(--red); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } }

/* ── Detail page ───────────────────────────────────────────── */
.detail-banner {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface2);
  margin-bottom: 20px;
}
.detail-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.detail-logo {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface2);
  border: 2px solid var(--border2);
  flex-shrink: 0;
}
.detail-title { font-size: 24px; font-weight: 800; }
.detail-meta  { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
}
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.detail-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.detail-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-stat { text-align: center; padding: 12px; background: var(--bg); border-radius: 6px; }
.detail-stat .val { font-size: 22px; font-weight: 800; color: var(--text); }
.detail-stat .lbl { font-size: 11px; color: var(--text3); margin-top: 2px; }
.vote-big {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.vote-reset { font-size: 11px; color: var(--text3); text-align: center; display: block; }
.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-row .lbl { color: var(--text3); }
.info-row .val { color: var(--text); font-weight: 500; }

/* ── Admin panel ───────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 0; min-height: calc(100vh - 60px); }
.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 0;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  transition: all .1s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: var(--surface2);
  color: var(--text);
  border-right: 2px solid var(--accent);
}
.admin-content { padding: 24px; }

.admin-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px; }
.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.admin-stat-card .val { font-size: 28px; font-weight: 800; }
.admin-stat-card .lbl { font-size: 12px; color: var(--text3); margin-top: 4px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  background: var(--surface2);
  color: var(--text3);
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
.data-table tbody tr:hover { background: var(--surface2); }
.data-table td { padding: 9px 12px; vertical-align: middle; }

.badge-pending  { background: rgba(234,179,8,.12);  color: #fbbf24; }
.badge-approved { background: rgba(34,197,94,.1);   color: #86efac; }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
  color: var(--text3);
  font-size: 12px;
  margin-top: 40px;
  background: var(--surface);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-grid       { grid-template-columns: 1fr; }
  .admin-stat-grid   { grid-template-columns: repeat(2,1fr); }
  .servers-table .hide-mobile { display: none; }
}
@media (max-width: 600px) {
  .form-grid   { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .header-inner { gap: 10px; }
  .nav { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   BANNERS
   ═══════════════════════════════════════════════════════════════ */

.banner-slot {
  text-align: center;
  margin: 0 0 20px;
}
.banner-slot.middle {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.banner-slot a {
  display: inline-block;
  max-width: 728px;
  width: 100%;
}
.banner-slot img {
  width: 100%;
  max-width: 728px;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: opacity .15s;
}
.banner-slot img:hover { opacity: .9; }
.banner-label {
  font-size: 10px;
  color: var(--text3);
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   DESTAQUE (FEATURED)
   ═══════════════════════════════════════════════════════════════ */

.featured-section {
  margin-bottom: 20px;
}
.featured-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.featured-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
/* Borda colorida esquerda */
.featured-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--card-color, #f59e0b);
}
/* Brilho sutil no topo */
.featured-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--card-color, #f59e0b) 8%, transparent), transparent);
  pointer-events: none;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(245,158,11,.15);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,.25);
  margin-bottom: 10px;
}

.featured-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.featured-logo {
  width: 52px; height: 52px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.featured-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}
.featured-name:hover { color: var(--accent); }
.featured-tags { display: flex; gap: 4px; flex-wrap: wrap; }

.featured-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.featured-stat {
  text-align: center;
  background: var(--surface2);
  border-radius: 6px;
  padding: 6px 4px;
}
.featured-stat .val { font-size: 14px; font-weight: 700; color: var(--text); display: block; }
.featured-stat .lbl { font-size: 10px; color: var(--text3); }

.featured-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.featured-actions .btn { flex: 1; justify-content: center; }

.featured-expires {
  font-size: 10px;
  color: var(--text3);
  text-align: right;
  margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   COUNTDOWN
   ═══════════════════════════════════════════════════════════════ */

.countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.2);
  color: #60a5fa;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.countdown-badge.launching-soon {
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.2);
  color: #f87171;
  animation: pulse-red 1s ease-in-out infinite;
}
@keyframes pulse-red {
  0%,100% { opacity: 1; }
  50% { opacity: .6; }
}

/* Row de destaque na tabela */
.servers-table tbody tr.is-featured {
  background: color-mix(in srgb, var(--row-color, #f59e0b) 4%, transparent);
}
.servers-table tbody tr.is-featured:hover {
  background: color-mix(in srgb, var(--row-color, #f59e0b) 8%, transparent);
}
