/* =========================================================
   SYSTEMPLAY STATUS — PREMIUM UI
   Base oficial do projeto
   Inspirado no Club de Indicações
   Compatível:
   - index.php
   - server.php
   - admin/*
   - mobile
========================================================= */

:root{

  --bg:#040816;
  --bg-2:#060b18;

  --panel:#0f1729;
  --panel-2:#121c31;

  --line:rgba(255,255,255,.06);

  --text:#f3f4f6;
  --muted:#8fa2b7;

  --green:#22c55e;
  --green-2:#16a34a;

  --yellow:#facc15;
  --red:#ef4444;

  --radius:26px;

  --shadow:
  0 10px 40px rgba(0,0,0,.35);
}

/* =========================================================
   RESET
========================================================= */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html,
body{
  min-height:100%;
}

body{
  font-family:
  Inter,
  ui-sans-serif,
  system-ui,
  sans-serif;

  color:var(--text);

  background:

  radial-gradient(
  circle at top left,
  rgba(34,197,94,.12),
  transparent 30%),

  radial-gradient(
  circle at top right,
  rgba(59,130,246,.10),
  transparent 35%),

  linear-gradient(
  180deg,
  #020617 0%,
  #040816 100%);

  overflow-x:hidden;
}

/* =========================================================
   GLOBAL
========================================================= */

a{
  color:inherit;
  text-decoration:none;
}

img{
  max-width:100%;
}

.container{
  width:min(1180px, calc(100% - 28px));
  margin:0 auto;
}

.hidden{
  display:none !important;
}

.muted{
  color:var(--muted);
}

.small{
  font-size:12px;
}

/* =========================================================
   TOPBAR
========================================================= */

.topbar{
  position:sticky;
  top:0;
  z-index:999;

  backdrop-filter:blur(16px);

  background:
  rgba(3,7,18,.72);

  border-bottom:
  1px solid rgba(255,255,255,.05);
}

.topbar-inner{
  min-height:78px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{
  display:flex;
  flex-direction:column;
}

.brand-title{
  font-size:15px;
  font-weight:1000;
}

.brand-subtitle{
  margin-top:2px;

  color:var(--muted);
  font-size:13px;
}

.topbar-nav{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.topbar-nav a{
  height:44px;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:0 18px;

  border-radius:999px;

  background:
  rgba(255,255,255,.04);

  border:
  1px solid rgba(255,255,255,.06);

  font-size:14px;
  font-weight:900;

  transition:.2s ease;
}

.topbar-nav a:hover{
  transform:translateY(-2px);

  background:
  rgba(34,197,94,.12);

  border-color:
  rgba(34,197,94,.22);
}

/* =========================================================
   MAIN
========================================================= */

main.container{
  padding-top:20px;
  padding-bottom:30px;
}

/* =========================================================
   CARD
========================================================= */

.card{
  position:relative;
  overflow:hidden;

  background:

  linear-gradient(
  135deg,
  rgba(15,23,42,.90),
  rgba(10,15,28,.95));

  border:
  1px solid rgba(255,255,255,.05);

  border-radius:var(--radius);

  padding:28px;

  backdrop-filter:blur(14px);

  box-shadow:var(--shadow);

  margin-bottom:22px;
}

.card::before{
  content:'';

  position:absolute;
  inset:0;

  background:
  radial-gradient(
  circle at left,
  rgba(34,197,94,.08),
  transparent 40%);

  pointer-events:none;
}

.card-header{
  position:relative;
  z-index:2;

  margin-bottom:20px;
}

.card-header h2{
  font-size:28px;
  font-weight:1000;
}

.card-header p{
  margin-top:6px;

  color:var(--muted);

  font-size:14px;
}

.card-footer{
  margin-top:20px;
}

/* =========================================================
   BUTTONS
========================================================= */

.btn{
  height:50px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  gap:8px;

  padding:0 20px;

  border:none;
  outline:none;

  border-radius:18px;

  color:#fff;

  font-size:14px;
  font-weight:900;

  cursor:pointer;

  transition:.2s ease;
}

.btn:hover{
  transform:translateY(-2px);
}

.btn-primary{
  background:

  linear-gradient(
  180deg,
  var(--green),
  var(--green-2));

  box-shadow:
  0 10px 24px rgba(34,197,94,.20);
}

.btn-light{
  background:
  rgba(255,255,255,.04);

  border:
  1px solid rgba(255,255,255,.06);
}

/* =========================================================
   INPUT
========================================================= */

.input{
  width:100%;
  height:60px;

  background:
  rgba(255,255,255,.03);

  border:
  1px solid rgba(255,255,255,.06);

  border-radius:20px;

  padding:0 20px;

  color:#fff;

  font-size:15px;
  font-weight:700;

  transition:.2s ease;
}

.input::placeholder{
  color:rgba(255,255,255,.35);
}

.input:focus{
  outline:none;

  border-color:
  rgba(34,197,94,.40);

  box-shadow:
  0 0 0 4px rgba(34,197,94,.10);
}

/* =========================================================
   BADGES
========================================================= */

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-height:38px;

  padding:0 14px;

  border-radius:999px;

  font-size:13px;
  font-weight:900;

  border:
  1px solid rgba(255,255,255,.08);
}

.badge-online{
  background:
  rgba(34,197,94,.14);

  color:var(--green);

  border-color:
  rgba(34,197,94,.24);
}

.badge-offline{
  background:
  rgba(239,68,68,.12);

  color:var(--red);

  border-color:
  rgba(239,68,68,.22);
}

.badge-unstable{
  background:
  rgba(250,204,21,.12);

  color:var(--yellow);

  border-color:
  rgba(250,204,21,.22);
}

.badge-soft{
  background:
  rgba(255,255,255,.04);
}

/* =========================================================
   ALERT
========================================================= */

.alert{
  position:relative;

  padding:18px;

  border-radius:22px;

  border:
  1px solid rgba(255,255,255,.06);

  margin-bottom:18px;

  overflow:hidden;
}

.alert-warning{
  background:
  rgba(250,204,21,.08);

  border-color:
  rgba(250,204,21,.20);
}

.alert-title{
  font-weight:1000;
  margin-bottom:8px;
}

.alert-body{
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* =========================================================
   TABLE
========================================================= */

.table-wrap{
  width:100%;
  overflow:auto;
}

.table{
  width:100%;
  min-width:760px;

  border-collapse:collapse;

  border-radius:20px;
  overflow:hidden;
}

.table th{
  background:
  rgba(255,255,255,.03);

  color:
  rgba(255,255,255,.65);

  font-size:13px;
  font-weight:1000;

  padding:16px;
  text-align:left;
}

.table td{
  padding:16px;

  border-top:
  1px solid rgba(255,255,255,.05);

  font-size:14px;
}

.table tr:hover td{
  background:
  rgba(255,255,255,.02);
}

/* =========================================================
   SEARCH RESULTS
========================================================= */

.search-wrap{
  position:relative;
}

.search-results{
  margin-top:14px;

  border-radius:22px;

  border:
  1px solid rgba(255,255,255,.06);

  background:
  rgba(6,10,20,.96);

  overflow:hidden;

  max-height:360px;
  overflow-y:auto;

  backdrop-filter:blur(14px);

  position:relative;
  z-index:20;
}

.search-results:empty{
  display:none;
}

.search-item{
  display:flex;
  align-items:center;
  gap:14px;

  padding:16px;

  cursor:pointer;

  transition:.15s ease;

  border-bottom:
  1px solid rgba(255,255,255,.04);
}

.search-item:last-child{
  border-bottom:none;
}

.search-item:hover{
  background:
  rgba(255,255,255,.04);
}

.search-logo{
  width:42px;
  height:42px;

  border-radius:14px;

  object-fit:cover;

  background:
  rgba(255,255,255,.05);
}

/* =========================================================
   SELECTED ITEM
========================================================= */

.selected-item{
  margin-top:18px;

  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;

  padding:18px;

  border-radius:24px;

  background:
  rgba(255,255,255,.03);

  border:
  1px solid rgba(255,255,255,.05);
}

.selected-left{
  display:flex;
  align-items:center;
  gap:14px;
}

.selected-logo{
  width:58px;
  height:58px;

  border-radius:18px;

  object-fit:cover;
}

.selected-name{
  font-size:17px;
  font-weight:1000;
}

.selected-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* =========================================================
   TABS
========================================================= */

.tabs{
  display:flex;
  gap:14px;
  flex-wrap:wrap;

  margin-top:20px;
  margin-bottom:20px;
}

.tab-btn{
  height:52px;

  padding:0 22px;

  border-radius:18px;

  background:
  rgba(255,255,255,.03);

  border:
  1px solid rgba(255,255,255,.06);

  color:#fff;

  font-size:14px;
  font-weight:900;

  cursor:pointer;

  transition:.2s ease;
}

.tab-btn:hover{
  transform:translateY(-2px);
}

.tab-btn.active{
  background:

  linear-gradient(
  135deg,
  rgba(34,197,94,.22),
  rgba(34,197,94,.10));

  border-color:
  rgba(34,197,94,.45);

  box-shadow:
  0 0 24px rgba(34,197,94,.15);
}

/* =========================================================
   TEST OUTPUT
========================================================= */

.test-output{
  margin-top:18px;

  padding:18px;

  border-radius:24px;

  background:
  rgba(255,255,255,.03);

  border:
  1px solid rgba(255,255,255,.05);
}

.test-output:empty{
  display:none;
}

.test-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}

.test-line{
  display:flex;
  align-items:center;
  justify-content:space-between;

  padding:14px;

  border-radius:18px;

  background:
  rgba(255,255,255,.03);

  border:
  1px solid rgba(255,255,255,.04);
}

.test-k{
  color:var(--muted);

  font-size:13px;
  font-weight:800;
}

.test-v{
  font-size:14px;
  font-weight:1000;
}

/* =========================================================
   EPISODES
========================================================= */

.episodes-box{
  margin-top:18px;

  display:flex;
  flex-direction:column;
  gap:10px;
}

.episode-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;

  padding:16px;

  border-radius:20px;

  background:
  rgba(255,255,255,.03);

  border:
  1px solid rgba(255,255,255,.05);
}

.episode-title{
  font-size:14px;
  font-weight:1000;
}

/* =========================================================
   FOOTER
========================================================= */

.footer{
  margin-top:26px;

  padding:26px 0;

  border-top:
  1px solid rgba(255,255,255,.05);

  color:var(--muted);
}

/* =========================================================
   MOBILE
========================================================= */

@media(max-width:720px){

  .container{
    width:calc(100% - 20px);
  }

  .topbar-inner{
    min-height:auto;

    padding:14px 0;

    flex-direction:column;
    align-items:flex-start;
  }

  .topbar-nav{
    width:100%;
  }

  .topbar-nav a{
    flex:1;
  }

  .card{
    padding:20px;
    border-radius:24px;
  }

  .card-header h2{
    font-size:24px;
  }

  .tabs{
    flex-direction:column;
  }

  .tab-btn{
    width:100%;
  }

  .selected-item{
    flex-direction:column;
    align-items:flex-start;
  }

  .selected-left{
    width:100%;
  }

  .selected-actions{
    width:100%;
  }

  .selected-actions .btn{
    width:100%;
  }

  .test-grid{
    grid-template-columns:1fr;
  }

  .episode-item{
    flex-direction:column;
    align-items:flex-start;
  }

  .btn{
    width:100%;
  }

}