/* ============================================================
   JOVEM RIO MIDIA INDOOR - ESTILO COMPARTILHADO
   (Manager + Landing)
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0b5cab;
  --primary-dark: #062a55;
  --accent: #25c2ff;
  --bg: #f2f6fb;
  --text: #14263c;
  --muted: #5b7189;
  --white: #ffffff;
  --danger: #d64545;
  --ok: #1f9d55;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(6, 42, 85, 0.10);
}

body {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer;
  padding: 11px 20px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  background: var(--primary); color: #fff;
  transition: filter .15s ease, transform .1s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn.ghost:hover { background: rgba(11,92,171,0.06); }
.btn.light { background: #fff; color: var(--primary); border: 1.5px solid rgba(11,92,171,0.25); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.input, select.input, textarea.input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #ccd8e6;
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease;
  font-family: inherit;
}
.input:focus { border-color: var(--accent); }
label.field { display: block; margin: 14px 0 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }

.muted { color: var(--muted); }
.right { float: right; }

/* ---------- NAV TOP (manager) ---------- */
.topbar {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 14px 26px;
  position: sticky; top: 0; z-index: 30;
  box-shadow: 0 4px 18px rgba(6,42,85,0.25);
}
.topbar .logoDot {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #0b5cab);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.topbar h1 { font-size: 18px; font-weight: 700; letter-spacing: .3px; }
.topbar .spacer { flex: 1; }
.topbar .userBox { font-size: 14px; opacity: .9; }
.topbar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.5); padding: 7px 14px; }

/* ---------- TABS ---------- */
.tabs {
  display: flex; gap: 6px;
  padding: 14px 26px 0;
}
.tabs button {
  border: none; cursor: pointer;
  padding: 12px 22px; font-size: 15px; font-weight: 600;
  background: transparent; color: var(--muted);
  border-bottom: 3px solid transparent;
}
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- CONTEUDO ---------- */
.tab { padding: 22px 26px 40px; max-width: 1200px; margin: 0 auto; }
.tab.hidden { display: none; }
.tabHead { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.tabHead h2 { font-size: 20px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid #e3ebf5;
  display: flex; flex-direction: column;
}
.card .thumb {
  height: 130px; background: #0b2c50;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.card .thumb img, .card .thumb video { width: 100%; height: 100%; object-fit: cover; }
.card .thumb .tIcon { font-size: 42px; color: #7fb3e8; }
.card .thumb .typeTag {
  position: absolute; top: 8px; left: 8px;
  background: rgba(6,42,85,.78); color: #cfe8ff;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  padding: 4px 9px; border-radius: 20px; text-transform: uppercase;
}
.card .body { padding: 12px 14px; flex: 1; }
.card .body .t { font-weight: 600; font-size: 15px; margin-bottom: 5px; word-break: break-word; }
.card .body .d { font-size: 12.5px; color: var(--muted); line-height: 1.5; word-break: break-word; }
.card .actions { display: flex; gap: 8px; padding: 0 14px 14px; }
.card .actions .btn { flex: 1; }

.empty {
  text-align: center; padding: 70px 20px; color: var(--muted);
}
.empty .big { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.empty p { margin-bottom: 18px; }

/* intervalos de agendamento */
.scheduleTags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.scheduleTags span {
  font-size: 11px; padding: 3px 8px; border-radius: 12px;
  background: #e5f2ff; color: var(--primary); font-weight: 600;
}

/* ---------- MODAL ---------- */
.modalOverlay {
  position: fixed; inset: 0; background: rgba(6,20,38,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 60; padding: 20px;
}
.modalOverlay.hidden { display: none; }
.modal {
  background: #fff; border-radius: 14px;
  width: 100%; max-width: 540px; max-height: 92vh; overflow: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  animation: pop .18s ease both;
}
.modal.wide { max-width: 680px; }
@keyframes pop { from { transform: scale(.96); opacity: .6; } to { transform: scale(1); opacity: 1; } }
.modalHead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid #e6edf5;
}
.modalHead h3 { font-size: 17px; }
.modalHead .x { border: none; background: none; font-size: 22px; color: var(--muted); cursor: pointer; }
.modalBody { padding: 20px 22px 8px; }
.modalFoot { padding: 14px 22px 22px; display: flex; gap: 10px; justify-content: flex-end; }

.formRow { display: flex; gap: 12px; }
.formRow > div { flex: 1; }

/* ---------- PLAYLISTS ---------- */
.playlistList { display: flex; flex-direction: column; gap: 12px; }
.plCard {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid #e3ebf5; border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.plCard .plName { font-weight: 700; font-size: 16px; }
.plCard .plMeta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.plCard .spacer { flex: 1; }
.plCard .btn { white-space: nowrap; }
.plCard.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37,194,255,.35); }

/* itens da playlist */
.itemLines { display: flex; flex-direction: column; gap: 8px; }
.itemLine {
  display: flex; align-items: center; gap: 12px;
  background: #f7fafd; border: 1px solid #e3ebf5; border-radius: 10px;
  padding: 10px 12px;
}
.itemLine .pos { width: 34px; text-align: center; color: var(--muted); font-weight: 700; }
.itemLine .ititle { flex: 1; font-weight: 600; font-size: 14px; }
.itemLine .itype { font-size: 11px; color: var(--primary); text-transform: uppercase; font-weight: 700; }
.itemLine .moveUp, .itemLine .moveDown {
  border: none; background: #e5f2ff; color: var(--primary);
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 15px;
}
.itemLine .del { border: none; background: #fdeaea; color: var(--danger); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-weight: 700; }

.pickItems { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 300px; overflow: auto; }
.pickItem {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid #dbe5f0; border-radius: 10px; padding: 8px 10px; cursor: pointer;
  transition: border-color .12s ease;
}
.pickItem:hover { border-color: var(--accent); }
.pickItem.picked { border-color: var(--ok); background: #f0fbf3; }
.pickThumb { width: 52px; height: 40px; border-radius: 6px; background: #0b2c50; overflow: hidden; flex: none; display:flex;align-items:center;justify-content:center; color:#7fb3e8; }
.pickThumb img { width: 100%; height: 100%; object-fit: cover; }
.pickInfo .t { font-size: 13px; font-weight: 600; }
.pickInfo .d { font-size: 11px; color: var(--muted); }

/* ---------- PLAYERS ---------- */
.playerGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; }
.playerCard {
  background: #fff; border: 1px solid #e3ebf5; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.statusDot { display:inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.statusDot.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(31,157,85,.18); }
.statusDot.off { background: #b9c6d4; }
.statusDot.dis { background: var(--danger); }
.playerCard h4 { font-size: 16px; }
.playerCard .meta { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 8px 0 12px; }
.playerCard .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ordemSel {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted); font-weight: 600;
  padding: 6px 4px;
}
.ordemSel select {
  border: 1.5px solid #ccd8e6; border-radius: 8px;
  padding: 5px 8px; font-size: 12.5px; font-family: inherit;
  background: #fff; color: var(--text); outline: none; cursor: pointer;
}
.ordemSel select:focus { border-color: var(--accent); }

/* ---------- AUTH ---------- */
.authWrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 15% 15%, rgba(37,194,255,.20), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(11,92,171,.28), transparent 45%),
    linear-gradient(135deg, #f2f6fb 0%, #e3eefb 100%);
  padding: 20px;
}
.authCard {
  background: #fff; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(6,42,85,.18);
  padding: 40px; width: 100%; max-width: 420px;
  text-align: center;
}
.authCard .logoMark {
  width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff; font-weight: 800; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
}
.authCard h2 { font-size: 20px; margin-bottom: 4px; }
.authCard .sub { font-size: 13.5px; color: var(--muted); margin-bottom: 24px; }
.authSwitch { margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.authSwitch a { cursor: pointer; font-weight: 700; }
.alert {
  border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-top: 12px; text-align: left;
}
.alert.error { background: #fdeaea; color: var(--danger); }
.alert.ok { background: #effaf1; color: var(--ok); }

/* toasts */
#toastBox { position: fixed; bottom: 24px; right: 24px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--primary-dark); color: #fff; padding: 12px 18px;
  border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: slideIn .2s ease both;
}
.toast.err { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 640px) {
  .topbar h1 { font-size: 15px; }
  .tab { padding: 16px; }
  .formRow { flex-direction: column; gap: 0; }
  .pickItems { grid-template-columns: 1fr; }
  .plCard { flex-wrap: wrap; }
}