
/* OERadio Premium UI
   UI-only stylesheet refresh.
   No PHP, JavaScript, form names, IDs, URLs, actions, or functionality changed.
*/

:root{
  --bg:#eef2f7;
  --surface:#ffffff;
  --surface-soft:#f7f9fc;
  --surface-deep:#f1f5f9;
  --ink:#172033;
  --muted:#667085;
  --line:#d9e1ec;
  --line-strong:#c7d2e0;
  --navy:#0b1730;
  --navy-2:#14284b;
  --blue:#2563eb;
  --blue-dark:#1d4ed8;
  --cyan:#0891b2;
  --green:#059669;
  --red:#dc2626;
  --amber:#d97706;
  --shadow-sm:0 3px 12px rgba(15,23,42,.06);
  --shadow:0 10px 30px rgba(15,23,42,.08);
  --shadow-lg:0 18px 50px rgba(15,23,42,.12);
  --radius:14px;
}

*{box-sizing:border-box}

html{background:var(--bg)}

body{
  margin:0;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  background:
    radial-gradient(circle at 15% -10%,rgba(37,99,235,.08),transparent 32rem),
    radial-gradient(circle at 90% 0%,rgba(8,145,178,.06),transparent 28rem),
    var(--bg);
  color:var(--ink);
  line-height:1.55;
  min-height:100vh;
}

body.center{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px 16px;
}

/* Premium top bar */
header{
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(115deg,var(--navy) 0%,#102347 52%,#0b3150 100%);
  color:#fff;
  min-height:78px;
  padding:0 5%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid rgba(255,255,255,.10);
  box-shadow:0 8px 26px rgba(8,23,48,.18);
}

header::before{
  content:"";
  position:absolute;
  width:320px;
  height:320px;
  right:10%;
  top:-270px;
  border-radius:50%;
  background:rgba(37,99,235,.24);
  filter:blur(8px);
  pointer-events:none;
}

header::after{
  content:"";
  position:absolute;
  left:5%;
  bottom:0;
  width:110px;
  height:3px;
  border-radius:3px 3px 0 0;
  background:linear-gradient(90deg,#38bdf8,#2563eb);
  box-shadow:0 0 18px rgba(56,189,248,.5);
}

header strong{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:11px;
  font-size:21px;
  font-weight:800;
  letter-spacing:.2px;
}

header strong::before{
  content:"◉";
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:10px;
  color:#fff;
  font-size:16px;
  background:linear-gradient(145deg,#2563eb,#0891b2);
  box-shadow:0 6px 18px rgba(37,99,235,.35);
}

header nav{
  position:relative;
  z-index:1;
  display:flex;
  gap:18px;
  align-items:center;
  color:#dbe7f5;
  font-size:14px;
}

header nav a{
  color:#fff;
  text-decoration:none;
  padding:8px 12px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:9px;
  background:rgba(255,255,255,.06);
  transition:.18s ease;
}

header nav a:hover{
  background:rgba(255,255,255,.13);
  border-color:rgba(255,255,255,.28);
  transform:translateY(-1px);
}

/* Admin header server-stats bar */
header .server-stats{
  position:relative;
  z-index:1;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  flex:1;
  margin:0 18px;
  font-size:12px;
  color:#dbe7f5;
}

header .server-stats .stat{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 11px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:8px;
  background:rgba(255,255,255,.05);
  white-space:nowrap;
}

header .server-stats .stat b{
  font-weight:800;
  color:#fff;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.5px;
}

/* Main layout */
.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:38px 22px 60px;
}

h1{
  margin:0 0 24px;
  color:var(--navy);
  font-size:30px;
  line-height:1.2;
  letter-spacing:-.5px;
}

h2{
  color:var(--navy);
  line-height:1.25;
}

.stream-heading{
  margin:0 0 10px;
  padding:0 2px;
  font-size:18px;
  font-weight:800;
  color:#263653;
  letter-spacing:-.15px;
}

.stream-heading small{
  font-size:12px;
  font-weight:600;
  color:#7b8798;
  background:#e8edf5;
  border:1px solid #d8e0eb;
  padding:3px 7px;
  border-radius:6px;
  margin-left:5px;
}

/* Cards / defined boxes */
.card,
details.collapsible{
  background:rgba(255,255,255,.97);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
}

.card{
  padding:23px;
  margin-bottom:20px;
  position:relative;
}

.card h2{
  margin:0 0 15px;
  font-size:16px;
  font-weight:800;
  display:flex;
  align-items:center;
  gap:9px;
}

.card h2::before{
  content:"";
  width:4px;
  height:18px;
  border-radius:5px;
  background:linear-gradient(180deg,#2563eb,#0891b2);
  flex:0 0 auto;
}

.narrow{
  width:min(440px,94vw);
  padding:34px;
  box-shadow:var(--shadow-lg);
  border-color:#d5deea;
}

.narrow h1{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:5px;
}

.narrow h1::before{
  content:"◉";
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:13px;
  color:#fff;
  font-size:18px;
  background:linear-gradient(145deg,#2563eb,#0891b2);
  box-shadow:0 8px 22px rgba(37,99,235,.25);
}

.narrow>p{
  color:var(--muted);
  margin:0 0 25px;
  font-size:14px;
}

/* Stream grouping */
.streams-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  align-items:start;
}

.stream-column{
  min-width:0;
  background:rgba(255,255,255,.35);
  border:1px solid rgba(203,213,225,.85);
  border-radius:16px;
  padding:16px;
  box-shadow:0 5px 20px rgba(15,23,42,.035);
}

.stream-column .stream-heading{
  margin-top:0;
}

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

/* Forms */
label{
  display:block;
  margin:17px 0;
  color:#344054;
  font-size:13px;
  font-weight:750;
}

input,select{
  display:block;
  width:100%;
  padding:11px 13px;
  margin-top:7px;
  border:1px solid var(--line-strong);
  border-radius:9px;
  font:inherit;
  font-size:14px;
  color:var(--ink);
  background:#fff;
  outline:none;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.025);
  transition:border-color .16s ease,box-shadow .16s ease;
}

input:hover,select:hover{border-color:#aebdce}

input:focus,select:focus{
  border-color:#4f83ee;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

input[type="file"]{
  padding:8px;
  background:var(--surface-soft);
}

input[type="file"]::file-selector-button{
  border:1px solid #cbd5e1;
  border-radius:7px;
  padding:7px 10px;
  margin-right:9px;
  background:#fff;
  color:#344054;
  cursor:pointer;
}

/* Buttons */
button{
  border:1px solid transparent;
  border-radius:9px;
  padding:10px 15px;
  background:linear-gradient(135deg,var(--blue),var(--blue-dark));
  color:#fff;
  cursor:pointer;
  font:inherit;
  font-size:13px;
  font-weight:750;
  letter-spacing:.05px;
  box-shadow:0 4px 10px rgba(37,99,235,.18);
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;
}

button:hover{
  transform:translateY(-1px);
  box-shadow:0 7px 16px rgba(37,99,235,.23);
  filter:brightness(1.03);
}

button:active{
  transform:translateY(0);
}

button.danger,.danger{
  background:linear-gradient(135deg,#ef4444,var(--red));
  box-shadow:0 4px 10px rgba(220,38,38,.15);
}

button.danger:hover,.danger:hover{
  box-shadow:0 7px 16px rgba(220,38,38,.20);
}

.link{
  background:none;
  border:0;
  color:var(--blue);
  padding:3px 2px;
  text-decoration:none;
  align-self:center;
  box-shadow:none;
  font-weight:700;
}

.link:hover{
  background:none;
  box-shadow:none;
  transform:none;
  text-decoration:underline;
}

.link.danger{
  background:none;
  color:var(--red);
  box-shadow:none;
}

.inline,.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

/* Status / alerts */
.alert{
  padding:13px 15px;
  border-radius:10px;
  margin:0 0 16px;
  border:1px solid transparent;
  font-size:13px;
  font-weight:600;
  box-shadow:0 3px 10px rgba(15,23,42,.035);
}

.alert.success{
  background:#ecfdf5;
  color:#065f46;
  border-color:#a7f3d0;
}

.alert.error{
  background:#fff1f2;
  color:#991b1b;
  border-color:#fecdd3;
}

/* Metadata */
code{
  word-break:break-all;
  color:#344054;
  background:#f3f6fa;
  border:1px solid #e1e7ef;
  padding:3px 6px;
  border-radius:6px;
  font-size:12px;
}

.hint{
  display:block;
  color:var(--muted);
  font-weight:400;
  font-size:12px;
  margin-top:5px;
}

/* Lists */
ul{
  padding-left:0;
  list-style:none;
  margin:10px 0 0;
}

li{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:11px 2px;
  border-bottom:1px solid #e8edf3;
}

li:last-child{border-bottom:0}

/* Admin collapsible sections */
details.collapsible{
  margin-bottom:18px;
  overflow:hidden;
}

details.collapsible summary{
  cursor:pointer;
  list-style:none;
  padding:19px 21px;
  font-size:17px;
  color:var(--navy);
  font-weight:800;
  display:flex;
  align-items:center;
  gap:12px;
  background:linear-gradient(180deg,#fff,#fbfcfe);
}

details.collapsible summary::-webkit-details-marker{display:none}

details.collapsible summary::before{
  content:"+";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:8px;
  background:linear-gradient(135deg,var(--blue),var(--cyan));
  color:#fff;
  font-size:19px;
  line-height:1;
  flex-shrink:0;
  box-shadow:0 4px 10px rgba(37,99,235,.18);
}

details.collapsible[open] summary{
  border-bottom:1px solid var(--line);
}

details.collapsible[open] summary::before{content:"\2212"}

details.collapsible .collapsible-body{
  padding:4px 22px 23px;
}

/* Tables */
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:13px;
}

th,td{
  text-align:left;
  padding:13px 12px;
  border-bottom:1px solid #e6ebf2;
  vertical-align:middle;
}

th{
  color:#475467;
  background:#f6f8fb;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.65px;
  font-weight:800;
  white-space:nowrap;
}

thead tr th:first-child{border-top-left-radius:9px}
thead tr th:last-child{border-top-right-radius:9px}

tbody tr{
  transition:background .14s ease;
}

tbody tr:hover{background:#f8fbff}

tbody tr:last-child td{border-bottom:0}

.actions form{margin:0}

/* Playlist / modal */
.playlist-view{
  background:#f7f9fc;
  border:1px solid var(--line);
  border-radius:9px;
  padding:13px;
  max-height:320px;
  overflow:auto;
  font-size:12px;
  white-space:pre-wrap;
  word-break:break-all;
}

.oeradio-modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(7,18,38,.70);
  backdrop-filter:blur(4px);
  z-index:100;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.oeradio-modal{
  background:#fff;
  border:1px solid rgba(255,255,255,.65);
  border-radius:16px;
  max-width:640px;
  width:100%;
  max-height:80vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  box-shadow:var(--shadow-lg);
}

.oeradio-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  padding:16px 19px;
  color:var(--navy);
  border-bottom:1px solid var(--line);
  background:#f9fbfd;
}

.oeradio-modal-body{
  padding:19px;
  overflow:auto;
}

/* Responsive */
@media(max-width:900px){
  .streams-grid{grid-template-columns:1fr}
}

@media(max-width:1150px){
  header .server-stats{display:none}
}

@media(max-width:750px){
  header{
    min-height:72px;
    padding:0 18px;
  }

  header nav{
    gap:8px;
  }

  header nav span{
    display:none;
  }

  .wrap{
    padding:28px 14px 45px;
  }

  h1{font-size:26px}

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

  .stream-column{
    padding:12px;
  }

  table{
    font-size:12px;
    display:block;
    overflow:auto;
    white-space:nowrap;
  }

  .narrow{
    padding:27px 22px;
  }
}

@media(max-width:480px){
  header strong{font-size:18px}
  header strong::before{width:30px;height:30px;border-radius:9px}
  header nav a{padding:7px 9px}
  .card{padding:18px}
  .stream-column{border-radius:13px}
  button{padding:9px 12px}
}
