/* ═══════════════════════════════════════════════
   STREAMHUB STUDIO — admin.css
   Dark/Light mode + volledig mobiel responsive
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

/* ── STUDIO DARK (standaard voor admin) ── */
:root,
[data-theme="dark"] {
  --s-bg:        #0e0f11;
  --s-surface:   #16181c;
  --s-card:      #1c1f24;
  --s-border:    rgba(255,255,255,.07);
  --s-border-md: rgba(255,255,255,.12);
  --s-text:      #f0f2f5;
  --s-muted:     #7a8290;
  --s-muted-md:  #9aa0aa;
  --s-accent:    #ff2d2d;
  --s-accent-bg: rgba(255,45,45,.12);
  --s-green:     #22c55e;
  --s-yellow:    #f59e0b;
  --s-input-bg:  #12141a;
  --s-hover:     rgba(255,255,255,.04);
  --s-active:    rgba(255,45,45,.1);
  --s-topbar:    rgba(14,15,17,.96);
}

/* ── STUDIO LIGHT MODE ── */
[data-theme="light"] {
  --s-bg:        #f6f7fb;
  --s-surface:   #ffffff;
  --s-card:      #ffffff;
  --s-border:    #e5e7eb;
  --s-border-md: #d1d5db;
  --s-text:      #0f172a;
  --s-muted:     #64748b;
  --s-muted-md:  #475569;
  --s-accent:    #ff2d2d;
  --s-accent-bg: rgba(255,45,45,.08);
  --s-green:     #16a34a;
  --s-yellow:    #b7791f;
  --s-input-bg:  #f8f9fb;
  --s-hover:     rgba(15,23,42,.04);
  --s-active:    rgba(255,45,45,.07);
  --s-topbar:    rgba(255,255,255,.96);
}

/* ── BASE ── */
.studio-body {
  font-family: 'DM Sans', Arial, sans-serif;
  background: var(--s-bg);
  color: var(--s-text);
  margin: 0; padding: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  transition: background .2s, color .2s;
}

/* ══════════════════════════════
   LOGIN
══════════════════════════════ */
.s-login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--s-bg);
}
.s-login-box {
  width: min(420px, 100%);
  background: var(--s-card);
  border: 1px solid var(--s-border-md);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.s-login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.s-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--s-accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 700; flex-shrink: 0;
}
.s-logo-icon.sm { width: 28px; height: 28px; border-radius: 8px; font-size: .78rem; }
.s-logo-text { font-size: 1.2rem; font-weight: 600; color: var(--s-text); }
.s-logo-text.sm { font-size: 1rem; }
.s-login-title { font-size: 1.6rem; font-weight: 600; margin: 0; color: var(--s-text); }
.s-login-sub { margin: -6px 0 4px; color: var(--s-muted); font-size: .9rem; }
.s-back-link { font-size: .85rem; color: var(--s-muted); text-align: center; margin-top: 4px; transition: color .15s; }
.s-back-link:hover { color: var(--s-text); }

/* ══════════════════════════════
   SHELL
══════════════════════════════ */
.s-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ── SIDEBAR ── */
.s-sidebar {
  background: var(--s-surface);
  border-right: 1px solid var(--s-border);
  display: flex; flex-direction: column;
  justify-content: space-between;
  padding: 18px 12px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; transition: background .2s;
}
.s-sidebar-top  { display: flex; flex-direction: column; gap: 24px; }
.s-sidebar-bottom { display: flex; flex-direction: column; gap: 4px; }
.s-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }

.s-nav { display: flex; flex-direction: column; gap: 2px; }
.s-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: .88rem; font-weight: 500;
  color: var(--s-muted-md); text-decoration: none;
  cursor: pointer; border: none; background: transparent;
  font-family: inherit; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.s-nav-item:hover  { background: var(--s-hover); color: var(--s-text); }
.s-nav-item.active { background: var(--s-active); color: var(--s-accent); }
.s-nav-item svg    { flex-shrink: 0; opacity: .7; }
.s-nav-item.active svg { opacity: 1; }
.s-logout { color: var(--s-muted); }
.s-logout:hover { color: var(--s-accent); background: var(--s-accent-bg); }

/* ── MOBILE TOPBAR (alleen op klein scherm) ── */
.s-mobile-topbar {
  display: none;
  position: sticky; top: 0; z-index: 30;
  background: var(--s-topbar);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--s-border);
  padding: 10px 16px;
  align-items: center; justify-content: space-between; gap: 12px;
}
.s-hamburger {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--s-border-md); background: var(--s-hover);
  color: var(--s-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.s-mobile-menu {
  display: none; flex-direction: column; gap: 2px;
  padding: 10px 12px; background: var(--s-surface);
  border-bottom: 1px solid var(--s-border);
}
.s-mobile-menu.open { display: flex; }

/* ── MAIN ── */
.s-main { padding: 28px 32px 60px; overflow-y: auto; width: 100%; }

/* ── SECTIONS ── */
.s-section { display: flex; flex-direction: column; gap: 22px; }
.s-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.s-section-title { margin: 0 0 4px; font-size: 1.35rem; font-weight: 600; color: var(--s-text); }
.s-section-sub   { margin: 0; font-size: .88rem; color: var(--s-muted); }

/* ── TWO COL ── */
.s-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* ── CARD ── */
.s-card {
  background: var(--s-card); border: 1px solid var(--s-border);
  border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: background .2s;
}
.s-card-narrow { max-width: 460px; }
.s-card-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding-bottom: 4px; border-bottom: 1px solid var(--s-border);
}
.s-card-head h3 { margin: 0; font-size: .98rem; font-weight: 600; color: var(--s-text); }

/* ── FORM ── */
.s-form  { display: flex; flex-direction: column; gap: 11px; }
.s-field { display: flex; flex-direction: column; gap: 5px; }
.s-label { font-size: .74rem; font-weight: 600; color: var(--s-muted-md); text-transform: uppercase; letter-spacing: .05em; }

.s-input {
  background: var(--s-input-bg); border: 1px solid var(--s-border-md);
  color: var(--s-text); border-radius: 10px;
  padding: 10px 12px; font-size: .9rem;
  font-family: 'DM Sans', sans-serif; outline: none;
  transition: border-color .15s; width: 100%;
}
.s-input:focus { border-color: var(--s-accent); }
.s-input::placeholder { color: var(--s-muted); }
.s-input:disabled { opacity: .5; cursor: not-allowed; }

.s-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8290' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px;
}

.s-textarea { min-height: 85px; resize: vertical; }

/* ── TOGGLE ── */
.s-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: var(--s-input-bg);
  border: 1px solid var(--s-border-md); border-radius: 10px; padding: 10px 12px;
}
.s-toggle-info  { display: flex; flex-direction: column; gap: 2px; }
.s-toggle-label { font-size: .88rem; font-weight: 500; color: var(--s-text); }
.s-toggle-sub   { font-size: .76rem; color: var(--s-muted); }
.s-toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.s-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.s-toggle-track {
  position: absolute; inset: 0; background: var(--s-border-md);
  border-radius: 999px; cursor: pointer; transition: background .2s;
}
.s-toggle-track::after {
  content: ''; position: absolute;
  top: 3px; left: 3px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.s-toggle input:checked + .s-toggle-track { background: var(--s-accent); }
.s-toggle input:checked + .s-toggle-track::after { transform: translateX(18px); }

/* ── BUTTONS ── */
.s-btn-primary {
  background: var(--s-accent); color: #fff; border: none;
  border-radius: 10px; padding: 11px 18px;
  font-size: .9rem; font-weight: 600;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  transition: opacity .15s, transform .1s; width: 100%;
}
.s-btn-primary:hover  { opacity: .88; }
.s-btn-primary:active { transform: scale(.98); }

.s-btn-secondary {
  background: var(--s-hover); color: var(--s-muted-md);
  border: 1px solid var(--s-border-md); border-radius: 10px;
  padding: 10px 18px; font-size: .9rem; font-weight: 500;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  transition: background .15s, color .15s; width: 100%;
}
.s-btn-secondary:hover { background: var(--s-border); color: var(--s-text); }

.s-pill-btn {
  background: transparent; border: 1px solid var(--s-border-md);
  color: var(--s-muted-md); border-radius: 999px;
  padding: 5px 12px; font-size: .8rem;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  white-space: nowrap; transition: background .15s, color .15s;
}
.s-pill-btn:hover { background: var(--s-hover); color: var(--s-text); }

/* ── THEME TOGGLE IN SIDEBAR ── */
.s-theme-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: .88rem; font-weight: 500;
  color: var(--s-muted-md); cursor: pointer;
  border: none; background: transparent;
  font-family: inherit; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.s-theme-btn:hover { background: var(--s-hover); color: var(--s-text); }

/* ── ERROR ── */
.s-error { color: var(--s-accent); font-size: .85rem; min-height: 1.2em; margin: 0; }

/* ── LIST ITEMS ── */
.s-list { display: flex; flex-direction: column; gap: 9px; }
.s-item {
  background: var(--s-input-bg); border: 1px solid var(--s-border);
  border-radius: 12px; padding: 12px 13px;
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 10px;
  transition: border-color .15s;
}
.s-item:hover { border-color: var(--s-border-md); }
.s-item-main  { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.s-item-title { font-size: .88rem; font-weight: 600; color: var(--s-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-item-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.s-item-actions { display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

.s-act-btn {
  background: var(--s-hover); border: 1px solid var(--s-border);
  color: var(--s-muted-md); border-radius: 8px;
  padding: 4px 9px; font-size: .76rem; font-weight: 500;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.s-act-btn:hover  { background: rgba(255,255,255,.08); color: var(--s-text); border-color: var(--s-border-md); }
.s-act-btn.danger { color: #ff6b6b; }
.s-act-btn.danger:hover { background: rgba(255,45,45,.12); border-color: rgba(255,45,45,.3); }
.s-act-btn.feature { color: var(--s-yellow); }
.s-act-btn.feature:hover { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); }

/* ── STUDIO BADGES ── */
.s-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.s-badge.live     { background: rgba(255,45,45,.18);   color: #ff6b6b; }
.s-badge.planned  { background: rgba(122,130,144,.15); color: #9aa0aa; }
.s-badge.ended    { background: rgba(122,130,144,.1);  color: #7a8290; }
.s-badge.locked   { background: rgba(245,158,11,.12);  color: #f59e0b; }
.s-badge.open     { background: rgba(34,197,94,.1);    color: #22c55e; }
.s-badge.featured { background: rgba(255,45,45,.14);   color: #ff8585; }

/* ── EMPTY ── */
.s-empty { padding: 22px 16px; text-align: center; color: var(--s-muted); font-size: .88rem; border: 1px dashed var(--s-border-md); border-radius: 12px; }

/* ── INFO BOX ── */
.s-info-box {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--s-border-md);
  border-radius: 12px; padding: 13px; font-size: .86rem;
  color: var(--s-muted-md); line-height: 1.55;
}
.s-info-box svg { flex-shrink: 0; margin-top: 2px; opacity: .6; }
.s-info-box strong { color: var(--s-text); }

/* ══════════════════════════════
   RESPONSIVE MOBILE
══════════════════════════════ */
@media (max-width: 860px) {
  .s-shell { grid-template-columns: 1fr; }
  .s-sidebar { display: none; }
  .s-mobile-topbar { display: flex; }
  .s-main { padding: 20px 16px 50px; }
  .s-two-col { grid-template-columns: 1fr; }
  .s-card-narrow { max-width: 100%; }
}

@media (max-width: 500px) {
  .s-login-box { padding: 24px 18px; }
  .s-main { padding: 16px 12px 40px; }
  .s-item { flex-direction: column; }
  .s-item-actions { width: 100%; }
  .s-act-btn { flex: 1; text-align: center; }
}

/* ══════════════════════════════
   MONITOR GRID
══════════════════════════════ */
.m-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.m-card {
  background: var(--s-card);
  border: 1px solid var(--s-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.m-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border-bottom: 1px solid var(--s-border);
  gap: 8px;
}

.m-card-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--s-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-card-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.m-player {
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}

.m-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.m-empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: var(--s-muted);
  font-size: .9rem;
  border: 1px dashed var(--s-border-md);
  border-radius: 14px;
}

@media (max-width: 1000px) {
  .m-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .m-grid { grid-template-columns: 1fr; }
}
