:root{
  --bg:#090013;
  --bg-2:#160829;
  --panel:#1a0c30;
  --panel-2:#22103f;
  --line:rgba(181,133,255,.18);
  --text:#f6f0ff;
  --muted:#c8b6e6;
  --purple:#9d5cff;
  --purple-2:#c18cff;
  --danger:#ff5b7f;
  --success:#5be5a5;
  --warning:#ffc76b;
  --shadow:0 25px 60px rgba(0,0,0,.45);
  --radius:24px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}

body{
  font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(157,92,255,.32), transparent 18%),
    radial-gradient(circle at 85% 20%, rgba(193,140,255,.22), transparent 15%),
    radial-gradient(circle at 25% 70%, rgba(157,92,255,.18), transparent 20%),
    linear-gradient(180deg,#120021 0%, #090013 100%);
  min-height:100vh;
}

a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
.container{width:min(1180px, calc(100% - 32px)); margin:0 auto}

.topbar{
  position:sticky;
  top:0;
  z-index:40;
  backdrop-filter:blur(18px);
  background:rgba(8,0,18,.92);
  border-bottom:1px solid rgba(157,92,255,.22);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 0;
}

.brand{display:flex; align-items:center; gap:14px; min-width:0}

.brand-logo{
  width:56px;
  height:56px;
  border-radius:18px;
  position:relative;
  background:
    radial-gradient(circle at 35% 30%, #cc9cff 0 18%, transparent 19%),
    linear-gradient(180deg, #6f34d2, #31105f);
  box-shadow:0 0 0 1px rgba(255,255,255,.08), 0 0 24px rgba(157,92,255,.45);
  overflow:hidden;
}

.brand-logo::before,
.brand-logo::after{
  content:"?";
  position:absolute;
  font-weight:900;
  color:white;
  opacity:.9;
  text-shadow:0 3px 10px rgba(0,0,0,.25);
}

.brand-logo::before{font-size:34px; left:17px; top:6px}
.brand-logo::after{font-size:24px; right:10px; bottom:4px; opacity:.65}

.brand-copy h1{font-size:clamp(20px,2.5vw,34px); margin:0; letter-spacing:.02em}
.brand-copy p{margin:4px 0 0; color:var(--muted); font-size:14px}

.nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.nav a,
.nav button{
  padding:11px 16px;
  border-radius:16px;
  border:1px solid rgba(157,92,255,.22);
  background:linear-gradient(180deg, rgba(35,14,62,.95), rgba(21,8,39,.98));
  color:var(--text);
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.22);
}

.nav a:hover,
.nav button:hover,
.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 30px rgba(0,0,0,.22);
  border-color:rgba(193,140,255,.42);
}

.hero{padding:40px 0 12px}

.hero-panel,.card,.glass,.admin-shell,.empty-state{
  background:linear-gradient(180deg, rgba(41,16,79,.95), rgba(23,9,46,.96));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.hero-panel{
  padding:30px;
  position:relative;
  overflow:hidden;
}

.hero-panel::after{
  content:"";
  position:absolute;
  inset:auto -50px -50px auto;
  width:260px;
  height:260px;
  background:radial-gradient(circle, rgba(193,140,255,.28), transparent 60%);
  pointer-events:none;
}

.badge{
  display:inline-flex;
  padding:9px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.04);
  color:#f3ddff;
  font-size:14px;
  margin-bottom:12px;
}

.hero h2{font-size:clamp(38px,6vw,72px); line-height:.96; letter-spacing:-.04em; margin:0 0 14px}
.hero p{font-size:clamp(16px,2vw,23px); margin:0; color:#f0e5ff}

.section{padding:18px 0 40px}

.filter-bar,.form-grid,.stats-grid,.dashboard-grid{
  display:grid;
  gap:16px;
}

.filter-bar{grid-template-columns:2fr 1fr 1fr auto auto}
.panel{padding:22px}

label{
  display:block;
  font-size:14px;
  color:var(--muted);
  margin-bottom:8px;
}

input,select,textarea{
  width:100%;
  border-radius:16px;
  padding:14px 16px;
  color:var(--text);
  border:1px solid rgba(157,92,255,.18);
  background:linear-gradient(180deg, rgba(32,14,56,.95), rgba(20,8,35,.98));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

input::placeholder,
textarea::placeholder{
  color:#bba9d8;
}

input:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:rgba(193,140,255,.5);
  box-shadow:0 0 0 3px rgba(157,92,255,.15);
}

select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
}

select option{
  background:#160829;
  color:#f6f0ff;
}

textarea{min-height:130px; resize:vertical}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:none;
  border-radius:16px;
  padding:13px 18px;
  cursor:pointer;
  background:linear-gradient(180deg,var(--purple-2),var(--purple));
  color:white;
  font-weight:700;
}

.btn.secondary{
  background:linear-gradient(180deg, rgba(37,15,66,.96), rgba(22,9,39,.98));
  border:1px solid rgba(157,92,255,.18);
}

.btn.danger{background:linear-gradient(180deg,#ff7d9a,#ff4e77)}
.btn.success{background:linear-gradient(180deg,#7ef0ba,#39cb86); color:#082214}
.btn.small{padding:9px 12px; border-radius:12px; font-size:14px}

.grid{
  display:grid;
  gap:18px;
  grid-template-columns:repeat(auto-fit,minmax(270px,1fr));
}

.card{
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.cover{
  height:280px;
  border-radius:20px;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.15), transparent 18%),
    linear-gradient(180deg, #7f43e8 0%, #2b1052 100%);
  border:1px solid rgba(255,255,255,.08);
}

.cover img{width:100%; height:100%; object-fit:cover}
.cover span{font-size:58px; font-weight:900; opacity:.9}

.meta{color:var(--muted); font-size:14px}
.card h3{margin:0; font-size:19px}
.card p{margin:0; color:#e2d6f8}

.row{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.spread{display:flex; justify-content:space-between; gap:12px; align-items:center}

.tag{
  display:inline-flex;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  font-size:13px;
}

.page-header{padding:28px 0 10px}
.page-header h2{font-size:42px; margin:0 0 10px}
.page-header p{margin:0; color:var(--muted)}

.song-layout{display:grid; grid-template-columns:340px 1fr; gap:22px}
.song-side{position:sticky; top:95px; align-self:start}

.list{display:grid; gap:12px}

.list-item{
  padding:14px 16px;
  border-radius:18px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08)
}

.kpis{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(4,1fr)
}

.kpi{
  padding:18px;
  border-radius:22px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}

.kpi strong{display:block; font-size:30px}

.notice,.empty-state{
  padding:18px 20px;
  color:#f3d6dd;
  border:1px solid rgba(255,91,127,.28);
  background:rgba(120,8,36,.18);
}

.empty-state{
  color:var(--muted);
  border-color:var(--line);
  background:rgba(255,255,255,.03);
}

.admin-shell{
  display:grid;
  grid-template-columns:260px 1fr;
  min-height:68vh;
  overflow:hidden;
}

.admin-sidebar{
  border-right:1px solid rgba(157,92,255,.16);
  padding:24px;
  background:linear-gradient(180deg, rgba(18,7,32,.98), rgba(11,3,22,.98));
}

.admin-content{
  padding:24px;
  background:linear-gradient(180deg, rgba(24,9,44,.58), rgba(14,5,28,.35));
}

.tablist{display:grid; gap:10px}

.tab-btn{
  padding:12px 14px;
  border-radius:14px;
  cursor:pointer;
  text-align:left;
  background:linear-gradient(180deg, rgba(31,12,55,.96), rgba(19,8,35,.98));
  border:1px solid rgba(157,92,255,.14);
  color:var(--text);
}

.tab-btn:hover{
  border-color:rgba(193,140,255,.34);
  background:linear-gradient(180deg, rgba(47,18,82,.96), rgba(25,10,46,.98));
}

.tab-btn.active{
  background:linear-gradient(180deg, rgba(193,140,255,.24), rgba(157,92,255,.16));
  border-color:rgba(193,140,255,.35);
  box-shadow:0 8px 24px rgba(0,0,0,.22);
}

.table-wrap{
  overflow:auto;
  border:1px solid rgba(157,92,255,.14);
  border-radius:20px;
  background:rgba(14,5,28,.78);
}

table{
  width:100%;
  border-collapse:collapse;
  background:transparent;
}

th,td{
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:left;
  vertical-align:top;
}

th{
  color:var(--muted);
  font-size:14px;
  background:rgba(20,8,37,.96);
}

td{
  background:rgba(14,5,28,.55);
}

tr:hover td{
  background:rgba(28,11,50,.72);
}

tfoot td{border-bottom:none}

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

.footer{padding:28px 0 50px; color:var(--muted)}
.helper{font-size:13px; color:var(--muted)}
.hidden{display:none !important}
.right{justify-content:flex-end}

hr.sep{
  border:none;
  height:1px;
  background:rgba(255,255,255,.08);
  margin:22px 0;
}

@media (max-width:960px){
  .filter-bar,.auth-grid,.song-layout,.admin-shell,.kpis{grid-template-columns:1fr}
  .song-side{position:static}
}

@media (max-width:640px){
  .topbar-inner{align-items:flex-start; flex-direction:column}
  .nav{width:100%}
  .nav a,.nav button{flex:1}
  .hero-panel{padding:22px}
  .hero h2{font-size:46px}
}
@media (max-width: 768px) {
  .container {
    width: min(100% - 20px, 100%);
  }

  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .brand {
    align-items: center;
  }

  .brand-copy h1 {
    font-size: 22px;
  }

  .brand-copy p {
    font-size: 12px;
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .nav a,
  .nav button {
    width: 100%;
    text-align: center;
    justify-content: center;
    min-height: 46px;
  }

  .hero {
    padding: 20px 0 8px;
  }

  .hero-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .hero h2 {
    font-size: 34px;
    line-height: 1.02;
  }

  .hero p {
    font-size: 15px;
  }

  .page-header h2 {
    font-size: 28px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    padding: 14px;
    border-radius: 18px;
  }

  .cover {
    height: 190px;
    border-radius: 16px;
  }

  .spread {
    flex-direction: column;
    align-items: stretch;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .btn.small {
    width: 100%;
    min-height: 46px;
  }

  .song-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .song-side {
    position: static;
  }

  .filter-bar,
  .form-grid,
  .auth-grid,
  .kpis,
  .admin-shell {
    grid-template-columns: 1fr !important;
  }

  .admin-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(157,92,255,.16);
    padding: 16px;
  }

  .admin-content {
    padding: 16px;
  }

  .tablist {
    grid-template-columns: 1fr 1fr;
  }

  .table-wrap {
    overflow: visible;
    border: none;
    background: transparent;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tr {
    background: linear-gradient(180deg, rgba(41,16,79,.95), rgba(23,9,46,.96));
    border: 1px solid rgba(157,92,255,.16);
    border-radius: 16px;
    padding: 12px;
  }

  td {
    border-bottom: none;
    padding: 6px 0;
    background: transparent;
  }

  input,
  select,
  textarea {
    min-height: 46px;
  }

  textarea {
    min-height: 110px;
  }
}
