/* ============================================================
   HOST LÍDER STREAM — Portal de Rádios
   assets/css/portal.css
   ============================================================ */

:root {
  --accent:       #7c3aed;
  --accent-hover: #6931c9;
  --accent-light: rgba(124,58,237,.12);
  --bg:           #ffffff;
  --bg-subtle:    #f4f5f8;
  --card:         #ffffff;
  --border:       rgba(15,23,42,.10);
  --text:         #1e293b;
  --muted:        #64748b;
  --heading:      #0f172a;
  --success:      #16a34a;
  --danger:       #dc2626;
  --warning:      #d97706;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --radius:       14px;
  --radius-sm:    8px;
  --radius-lg:    20px;
}

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

html {
  height: 100%;
  overflow-x: clip;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

body.modal-open { padding-right: env(safe-area-inset-right,0px) !important; }

main { flex: 1 0 auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* ── Container max-width ─────────────────────────── */
@media (min-width: 992px) {
  .container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
    max-width: 1320px !important;
  }
}

/* ── Header ─────────────────────────────────────── */
.site-header {
  background: rgba(255,255,255,.93);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: .5rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.site-logo-img { max-height: 46px; max-width: 200px; object-fit: contain; }

.nav-link { color: var(--muted) !important; font-weight: 500; font-size: .9rem; border-radius: 100px; }
.nav-link:hover, .nav-link.active { color: var(--accent) !important; background: var(--accent-light); }

.btn-primary-site {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 100px;
  padding: .45rem 1.25rem;
  font-size: .875rem;
  transition: background .2s, box-shadow .2s;
}
.btn-primary-site:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(124,58,237,.35); color: #fff; }

.btn-ghost-site {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--heading);
  font-weight: 600;
  border-radius: 100px;
  padding: .45rem 1.25rem;
  font-size: .875rem;
}
.btn-ghost-site:hover { background: var(--bg-subtle); }

/* ── Hero ────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1e0a40 0%, #3b0f8c 50%, #7c3aed 100%);
  padding: 5rem 0 4rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; }
.hero p   { font-size: 1.1rem; opacity: .85; }

.hero-search .form-control {
  border-radius: 100px 0 0 100px !important;
  border: none;
  padding: .75rem 1.25rem;
  font-size: 1rem;
  min-height: 52px;
}
.hero-search .btn {
  border-radius: 0 100px 100px 0 !important;
  background: var(--accent);
  border: none;
  color: #fff;
  padding: .75rem 1.5rem;
  font-size: 1rem;
  min-height: 52px;
}
.hero-search .btn:hover { background: var(--accent-hover); }

/* ── Cards de Rádio ──────────────────────────────── */
.radio-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  cursor: pointer;
  height: 100%;
}
.radio-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.radio-card-logo-wrap {
  aspect-ratio: 1;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  max-height: 160px;
}
.radio-card-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.radio-card-logo-wrap .no-logo {
  font-size: 2.5rem;
  color: var(--accent);
  opacity: .6;
}

.radio-card-body { padding: .85rem 1rem 1rem; }
.radio-card-name { font-weight: 700; font-size: .95rem; color: var(--heading); line-height: 1.3; margin-bottom: .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-card-meta { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.radio-card-badge { font-size: .7rem; background: var(--accent-light); color: var(--accent); border-radius: 100px; padding: .1rem .5rem; font-weight: 600; }

.radio-card-actions { padding: 0 1rem .85rem; display: flex; gap: .5rem; }
.btn-play {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 600;
  padding: .45rem .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  transition: background .2s;
}
.btn-play:hover { background: var(--accent-hover); color: #fff; }

.btn-fav {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 100px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  transition: background .2s, color .2s;
}
.btn-fav:hover, .btn-fav.favoritado { background: #fef2f2; border-color: #fca5a5; color: var(--danger); }

/* Badge destaque */
.badge-destaque {
  position: absolute;
  top: .5rem; left: .5rem;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  border-radius: 100px;
  padding: .15rem .55rem;
  letter-spacing: .03em;
  z-index: 1;
}

/* ── Player Fixo ─────────────────────────────────── */
#playerBar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(15,23,42,.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.08);
  z-index: 2000;
  padding: .6rem 1rem;
  display: none;
}
#playerBar.ativo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.player-logo {
  width: 42px; height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.player-info { flex: 1; min-width: 0; }
.player-name { font-weight: 700; font-size: .9rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-status { font-size: .75rem; color: rgba(255,255,255,.55); }

.player-controls { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.btn-player {
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background .2s;
}
.btn-player:hover { background: rgba(255,255,255,.2); }
.btn-player.btn-play-pause {
  background: var(--accent);
  width: 44px; height: 44px;
  font-size: 1.15rem;
}
.btn-player.btn-play-pause:hover { background: var(--accent-hover); }

.player-vol { width: 80px; }
@media (max-width: 576px) { .player-vol { display: none; } }

/* ── Seções ──────────────────────────────────────── */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.section-title .icon { color: var(--accent); }

/* ── Filtros ─────────────────────────────────────── */
.filter-bar {
  background: var(--bg-subtle);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
}
.filter-bar .form-select, .filter-bar .form-control {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: .875rem;
}

/* Categorias pills */
.cats-scroll {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .25rem;
  scrollbar-width: none;
}
.cats-scroll::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .35rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.cat-pill:hover, .cat-pill.ativa {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Modal Rádio ─────────────────────────────────── */
.modal-radio .modal-content { border-radius: var(--radius-lg); border: none; }
.modal-radio .radio-modal-logo {
  width: 100px; height: 100px;
  border-radius: var(--radius);
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
}
.modal-radio .social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--muted);
  font-size: 1.1rem;
  transition: background .2s, color .2s;
}
.modal-radio .social-links a:hover { background: var(--accent); color: #fff; }

/* ── Forms ───────────────────────────────────────── */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.form-label { font-weight: 600; font-size: .875rem; color: var(--heading); margin-bottom: .35rem; }
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: .6rem .9rem;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.btn-accent {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: .65rem 1.5rem;
  font-size: .95rem;
  transition: background .2s, box-shadow .2s;
}
.btn-accent:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 4px 12px rgba(124,58,237,.3); }
.btn-accent:disabled { opacity: .6; cursor: not-allowed; }

/* ── Paginação ───────────────────────────────────── */
.pagination .page-link {
  border-radius: var(--radius-sm) !important;
  margin: 0 2px;
  color: var(--accent);
  border-color: var(--border);
  font-weight: 500;
}
.pagination .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Footer ──────────────────────────────────────── */
.site-footer {
  background: var(--heading);
  color: rgba(255,255,255,.7);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.site-footer h5 { color: #fff; font-weight: 700; }
.site-footer a { color: rgba(255,255,255,.65); }
.site-footer a:hover { color: #fff; }
.footer-brand { color: var(--accent) !important; font-weight: 800; }

/* ── Admin Layout ────────────────────────────────── */
.admin-sidebar {
  background: var(--heading);
  min-height: 100vh;
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1000;
  overflow-y: auto;
}
.admin-sidebar .brand { padding: .5rem 1.5rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-sidebar .brand-name { font-size: 1.1rem; font-weight: 800; color: #fff; }
.admin-sidebar .brand-sub { font-size: .72rem; color: rgba(255,255,255,.45); font-weight: 500; }

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem 1.5rem;
  color: rgba(255,255,255,.65) !important;
  font-size: .875rem;
  font-weight: 500;
  border-radius: 0;
  transition: background .2s, color .2s;
  text-decoration: none;
  border-left: 3px solid transparent;
}
.admin-nav-link:hover, .admin-nav-link.active {
  background: rgba(255,255,255,.06);
  color: #fff !important;
  border-left-color: var(--accent);
}
.admin-nav-link i { font-size: 1rem; width: 20px; flex-shrink: 0; }

.admin-nav-group { padding: 1rem 1.5rem .4rem; font-size: .68rem; font-weight: 700; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: .08em; }

.admin-main {
  margin-left: 260px;
  min-height: 100vh;
  background: #f8f9fc;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-topbar .page-title { font-size: 1.1rem; font-weight: 700; color: var(--heading); }

.admin-content { padding: 1.5rem; flex: 1; }

/* Admin cards estatísticos */
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-icon {
  width: 50px; height: 50px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card .stat-number { font-size: 1.6rem; font-weight: 800; color: var(--heading); line-height: 1; }
.stat-card .stat-label { font-size: .78rem; color: var(--muted); font-weight: 500; }

/* Admin table */
.admin-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--border); }
.admin-table td { vertical-align: middle; font-size: .875rem; }
.admin-table .radio-mini-logo { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }

/* Status badges */
.badge-pendente  { background: #fef9c3; color: #854d0e; }
.badge-aprovado  { background: #dcfce7; color: #166534; }
.badge-reprovado { background: #fee2e2; color: #991b1b; }
.badge-inativo   { background: #f1f5f9; color: #475569; }
.status-badge { font-size: .72rem; font-weight: 700; border-radius: 100px; padding: .2rem .7rem; }

/* ── Responsivo Admin ─────────────────────────────── */
@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform .3s;
  }
  .admin-sidebar.aberta { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}

/* ── Utilitários extras ───────────────────────────── */
.gap-sm { gap: .5rem !important; }
.rounded-xl { border-radius: var(--radius) !important; }
.text-accent { color: var(--accent) !important; }
.bg-accent-light { background: var(--accent-light) !important; }
.fw-800 { font-weight: 800 !important; }

/* ── Player padding body ──────────────────────────── */
body.player-ativo { padding-bottom: 76px; }

/* ── Ondas animadas hero ──────────────────────────── */
.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  position: relative;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(74,222,128,.4);
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.7);opacity:0} }
