body {
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: white;
    text-align: center;
    margin: 0;
}

.box {
    background: #1e293b;
    padding: 30px;
    border-radius: 10px;
    max-width: 350px;
    margin: 80px auto;
}

input, select {
    width: 90%;
    padding: 10px;
    margin: 8px;
    border-radius: 5px;
    border: none;
    box-sizing: border-box;
}

button {
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    border: none;
    background: #22c55e;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

button:hover { opacity: 0.9; }

.cardUser {
    background:#1e293b;
    margin:10px;
    padding:10px;
    border-radius:8px;
}

#player { padding: 20px; }

.topFaixas {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px 0;
    text-align: left;
}

.btnBack { background: #22c55e; }

.subFaixas {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 14px;
}

.containerFaixasNetflix {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 24px;
    padding: 20px 24px 30px;
    align-items: start;
}

.playerWrap {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.08);
}

.playerWrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.sidebarNetflix {
    background: #111827;
    border-radius: 18px;
    padding: 16px;
    max-height: 80vh;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

#buscaVideo {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #fff;
    outline: none;
    margin: 0 0 14px 0;
}

#buscaVideo::placeholder { color: #94a3b8; }

.statusPlaylist {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 12px;
    text-align: left;
}

.listaNetflix {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: calc(80vh - 90px);
    padding-right: 4px;
}

.cardVideo {
    display: flex;
    gap: 12px;
    background: #1f2937;
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
    transition: all .2s ease;
    text-align: left;
    border: 1px solid transparent;
}

.cardVideo:hover {
    transform: translateY(-2px);
    background: #273449;
}

.cardVideo.ativo {
    border-color: #22c55e;
    background: #1b2b22;
}

.thumbVideo {
    width: 150px;
    min-width: 150px;
    aspect-ratio: 16/9;
    border-radius: 10px;
    object-fit: cover;
    background: #000;
}

.infoVideo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.tituloVideo {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.metaVideo {
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
}

.vazioLista {
    background: #1e293b;
    padding: 18px;
    border-radius: 12px;
    color: #94a3b8;
    text-align: center;
}

hr {
    border: none;
    border-top: 1px solid #334155;
    margin: 20px 0;
}

.menu-page { padding: 30px; }
.loading { padding: 40px; color: #94a3b8; }
.error { color: #fca5a5; margin-top: 10px; }

@media (max-width: 980px) {
    .containerFaixasNetflix { grid-template-columns: 1fr; }
    .sidebarNetflix { max-height: none; }
    .listaNetflix { max-height: 500px; }
    .thumbVideo { width: 120px; min-width: 120px; }
}

.admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
  text-align: left;
}

.admin-header {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.admin-header h1 {
  margin: 0;
  font-size: 32px;
}

.admin-header p,
.members-top p {
  color: #94a3b8;
  margin: 6px 0 0;
}

.admin-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.admin-card h2 {
  margin-top: 0;
}

.admin-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}

.admin-form input,
.admin-form select,
.members-top input {
  width: 100%;
  margin: 0;
  height: 44px;
}

.admin-status {
  margin-top: 14px;
  font-weight: bold;
}

.admin-status.sucesso {
  color: #22c55e;
}

.admin-status.erro {
  color: #ef4444;
}

.admin-status.info {
  color: #38bdf8;
}

.members-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.members-top input {
  max-width: 320px;
}

.table-wrap {
  overflow-x: auto;
}

.members-table {
  width: 100%;
  border-collapse: collapse;
}

.members-table th,
.members-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #334155;
}

.members-table th {
  color: #94a3b8;
  font-size: 13px;
  text-transform: uppercase;
}

.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
}

.badge-admin {
  background: #7c3aed;
  color: #fff;
}

.badge-user {
  background: #2563eb;
  color: #fff;
}

.badge-active {
  background: #16a34a;
  color: #fff;
}

.badge-inactive {
  background: #64748b;
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions button {
  margin: 0;
}

.btn-secondary {
  background: #334155;
}

.btn-danger {
  background: #dc2626;
}

.empty-table {
  text-align: center;
  color: #94a3b8;
  padding: 30px;
}

@media (max-width: 900px) {
  .admin-form {
    grid-template-columns: 1fr;
  }

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

  .members-top input {
    max-width: none;
  }
}

.actions button {
  font-size: 12px;
  padding: 6px 10px;
}

.login-logo {
  width: 120px;
  max-width: 70%;
  margin-bottom: 18px;
}

:root {
  --cor-fundo: #0b1220;
  --cor-card: #141f33;
  --cor-card-2: #1e2a42;
  --cor-texto: #ffffff;
  --cor-muted: #94a3b8;
  --cor-principal: #22c55e;
  --cor-principal-hover: #16a34a;
  --cor-borda: rgba(255,255,255,0.08);
}

/* Layout geral após login */
.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: var(--cor-fundo);
  color: var(--cor-texto);
  text-align: left;
}

.sidebar-app {
  background: linear-gradient(180deg, #101827, #0b1220);
  border-right: 1px solid var(--cor-borda);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 34px;
}

.sidebar-logo img {
  width: 70px;
  max-width: 70%;
  object-fit: contain;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item,
.submenu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cor-texto);
  background: transparent;
  border: none;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 16px;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}

.nav-item:hover,
.submenu-item:hover {
  background: var(--cor-card-2);
}

.nav-toggle {
  font-family: inherit;
}

.submenu {
  display: none;
  margin-left: 28px;
  padding-left: 12px;
  border-left: 1px solid var(--cor-borda);
}

.submenu.open {
  display: block;
}

.submenu-item {
  color: var(--cor-muted);
  font-size: 15px;
  padding: 10px 12px;
}

.submenu-item:hover {
  color: var(--cor-texto);
}

.logout-sidebar {
  margin-top: auto;
  width: 100%;
  background: #334155;
}

.logout-sidebar:hover {
  background: #475569;
}

.home-content {
  min-height: 100vh;
  padding: 40px 36px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.home-hero {
  width: min(900px, 100%);
  background: var(--cor-card);
  border: 1px solid var(--cor-borda);
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.home-hero img {
  width: 100%;
  display: block;
  border-radius: 22px;
  object-fit: cover;
}

/* Responsivo */
@media (max-width: 800px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-app {
    border-right: none;
    border-bottom: 1px solid var(--cor-borda);
  }

  .home-content {
    padding: 20px;
  }
}

.sidebar-app {
  background: linear-gradient(180deg, #101827, #0b1220);
  border-right: 1px solid var(--cor-borda);
  padding: 24px 18px;

  display: flex;
  flex-direction: column;

  height: 100vh;
  overflow: hidden;
}

html,
body {
  height: 100%;
  margin: 0;
}

body:has(.app-shell) {
  overflow: hidden;
}

.app-shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar-app {
  height: 100vh;
  max-height: 100vh;
  box-sizing: border-box;
  overflow: hidden;

  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.logout-sidebar {
  margin-top: 16px;
  width: 100%;
  flex-shrink: 0;
}

.sidebar-app {
  overflow-x: hidden;
}

.sidebar-nav {
  overflow-x: hidden;
}

.nav-item,
.submenu-item,
.logout-sidebar {
  max-width: 100%;
  box-sizing: border-box;
}

.nav-item,
.submenu-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-app button {
  max-width: 100%;
}

.sidebar-app {
  width: 280px;
  transition: width 0.25s ease, padding 0.25s ease;
}

.sidebar-app.collapsed {
  width: 88px;
  padding-left: 14px;
  padding-right: 14px;
}

.sidebar-logo {
  cursor: pointer;
}

.sidebar-app.collapsed .sidebar-nav,
.sidebar-app.collapsed .logout-sidebar {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.app-shell {
  grid-template-columns: auto 1fr;
}

.midia-page {
  min-height: 100vh;
  padding: 32px 24px;
  text-align: left;
  background: var(--cor-fundo);
  color: var(--cor-texto);
}

.midia-header {
  max-width: 1100px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.midia-header h1 {
  margin: 0;
  font-size: 34px;
}

.midia-header p {
  margin: 6px 0 0;
  color: var(--cor-muted);
}

.midia-card {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--cor-card);
  border: 1px solid var(--cor-borda);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.midia-card h2 {
  margin-top: 0;
  font-size: 28px;
}

.drive-actions {
  margin: 22px 0;
}

.drive-button {
  display: inline-block;
  background: var(--cor-principal);
  color: #fff;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: bold;
  font-size: 16px;
}

.drive-button:hover {
  background: var(--cor-principal-hover);
}

.drive-placeholder {
  margin-top: 24px;
  padding: 28px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed var(--cor-borda);
  color: var(--cor-muted);
  text-align: center;
}

.drive-placeholder p {
  margin: 8px 0;
}

/* GOOGLE DRIVE EMBED - MÍDIA */

.drive-embed {
  width: 100%;
  height: 70vh;
  min-height: 600px;
  border: none;
  border-radius: 18px;
  background: #0f172a;
  display: block;
}

.drive-placeholder {
  overflow: hidden;
  padding: 0;
}

.midia-card {
  overflow: hidden;
}

.grid-midia {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card-midia {
  background: #1e293b;
  border-radius: 12px;
  overflow: hidden;
  padding: 10px;
  text-align: center;
}

.card-midia img {
  width: 100%;
  border-radius: 8px;
}

.info-midia {
  margin-top: 8px;
}

.info-midia p {
  font-size: 13px;
  margin-bottom: 6px;
}

.viewer-midia {
  margin-top: 20px;
}

.viewer-midia iframe {
  width: 100%;
  height: 500px;
  border: none;
}
