:root,
[data-theme="dark"] {
  --bg: #0b1220;
  --bg-elev: #121a2b;
  --bg-card: #ffffff;
  --text: #e8eefc;
  --text-muted: #9aa8c7;
  --accent: #1f6feb;
  --accent-2: #2ea043;
  --danger: #f85149;
  --ok: #3fb950;
  --border: rgba(255, 255, 255, 0.08);
  --player: #0f1729ee;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --player-bar-offset: 0px;
  --font: "Outfit", system-ui, sans-serif;
  --surface: #121a2b;
  --surface-2: #1a2438;
  --modal-overlay: rgba(4, 8, 16, 0.72);
  --modal-bg: #161f32;
  --modal-border: rgba(255, 255, 255, 0.1);
  --input-bg: #0f1626;
  --input-border: rgba(255, 255, 255, 0.12);
  --input-focus-ring: rgba(88, 166, 255, 0.28);
}

[data-theme="light"] {
  --bg: #eef2f8;
  --bg-elev: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --player: #ffffffee;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --modal-overlay: rgba(15, 23, 42, 0.42);
  --modal-bg: #ffffff;
  --modal-border: rgba(15, 23, 42, 0.08);
  --input-bg: #f8fafc;
  --input-border: rgba(15, 23, 42, 0.12);
  --input-focus-ring: rgba(31, 111, 235, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

/* ========== AUTH ========== */
.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(31, 111, 235, 0.08) 0%, transparent 40%),
    linear-gradient(155deg, #050b11 0%, #0a1424 45%, #0e223d 100%);
  color: #fff;
  padding: 48px;
  display: flex;
  align-items: center;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 0),
    radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 0);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  pointer-events: none;
  opacity: 0.8;
  z-index: 0;
}

.auth-brand-glow {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 210, 255, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(31, 111, 235, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.15) 0%, transparent 60%);
  filter: blur(80px);
  pointer-events: none;
  animation: auroraFlow 25s ease infinite alternate;
}

@keyframes auroraFlow {
  0% {
    transform: scale(1) translate(0, 0);
  }

  50% {
    transform: scale(1.12) translate(4%, -4%);
  }

  100% {
    transform: scale(0.92) translate(-4%, 4%);
  }
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1f6feb, #58a6ff);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 8px 24px rgba(31, 111, 235, 0.45);
}

.brand-logo.small {
  width: 40px;
  height: 40px;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.brand-logo-img.small {
  width: 40px;
  height: 40px;
}

.brand-logo-img.tiny {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.brand-logo-full {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(280px, 100%);
  object-fit: contain;
}

.brand-logo-full.card {
  height: 60px;
  max-width: 280px;
  margin: 0 auto;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-brand h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #a5c7fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-brand p {
  margin: 0 0 40px;
  color: #9aa8c7;
  font-size: 1.1rem;
  line-height: 1.5;
}

.auth-devices {
  position: relative;
  height: 290px;
  margin-top: 20px;
}

.device-card {
  position: absolute;
  background: rgba(18, 26, 43, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.device-laptop {
  left: 10px;
  top: 40px;
  width: 330px;
  height: 205px;
  padding: 10px;
  border-radius: 16px 16px 0 0;
}

.device-laptop::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: -25px;
  width: 380px;
  height: 10px;
  background: #1e293b;
  border-radius: 0 0 8px 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.device-phone {
  right: 10px;
  top: 10px;
  width: 140px;
  height: 245px;
  padding: 8px;
  border-radius: 22px;
}

.device-screen {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, #0e1627, #070b13);
  padding: 8px;
  overflow: hidden;
}

.laptop-screen {
  display: flex;
  gap: 6px;
}

.laptop-sidebar {
  width: 42px;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0 0;
}

.laptop-sidebar .bar-item {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  width: 24px;
  margin: 0 auto;
}

.laptop-sidebar .bar-item.active {
  background: #00d2ff;
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
}

.laptop-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 2px;
}

.now-playing-header {
  font-size: 0.6rem;
  color: #7f8fa4;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.dot-rec {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff4757;
  display: inline-block;
  animation: blinkRec 0.8s infinite alternate;
}

@keyframes blinkRec {
  from {
    opacity: 0.3;
  }

  to {
    opacity: 1;
  }
}

.waveform {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 65px;
  justify-content: center;
  margin: 6px 0;
}

.waveform i {
  display: block;
  width: 8px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #00d2ff, #1f6feb);
  animation: pulseBar 1.2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.waveform i:nth-child(1) {
  height: 40%;
  animation-delay: 0.1s;
}

.waveform i:nth-child(2) {
  height: 75%;
  animation-delay: 0.3s;
}

.waveform i:nth-child(3) {
  height: 25%;
  animation-delay: 0s;
}

.waveform i:nth-child(4) {
  height: 90%;
  animation-delay: 0.5s;
}

.waveform i:nth-child(5) {
  height: 60%;
  animation-delay: 0.2s;
}

.waveform i:nth-child(6) {
  height: 35%;
  animation-delay: 0.4s;
}

.waveform i:nth-child(7) {
  height: 80%;
  animation-delay: 0.15s;
}

.waveform i:nth-child(8) {
  height: 50%;
  animation-delay: 0.35s;
}

.waveform i:nth-child(9) {
  height: 70%;
  animation-delay: 0.05s;
}

.waveform i:nth-child(10) {
  height: 30%;
  animation-delay: 0.25s;
}

@keyframes pulseBar {

  0%,
  100% {
    transform: scaleY(0.65);
    opacity: 0.7;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.player-controls-mock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}

.ctrl-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  position: relative;
}

.ctrl-bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 45%;
  background: #00d2ff;
  border-radius: 99px;
  box-shadow: 0 0 6px rgba(0, 210, 255, 0.6);
}

.ctrl-btn {
  font-size: 0.85rem;
  color: #00d2ff;
  display: flex;
}

.phone-screen {
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 6px;
}

.phone-header-bar {
  width: 42px;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  margin: 0 auto 6px;
}

.phone-album-art {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f6feb, #8a2be2);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 2.2rem;
  box-shadow: 0 8px 24px rgba(31, 111, 235, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.phone-track-info {
  text-align: center;
  margin: 4px 0;
}

.phone-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.phone-artist {
  font-size: 0.75rem;
  color: #9aa8c7;
}

.phone-progress-mock {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  width: 85%;
  margin: 0 auto;
  position: relative;
}

.phone-progress-mock .progress-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 60%;
  background: #00d2ff;
  border-radius: 99px;
}

.phone-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  color: #9aa8c7;
  font-size: 1rem;
  margin-top: 4px;
}

.phone-controls .main-play {
  font-size: 1.65rem;
  color: #00d2ff;
  filter: drop-shadow(0 0 5px rgba(0, 210, 255, 0.5));
}

.float-chip {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 1.1rem;
  font-weight: 600;
  color: #00d2ff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: floaty 5s ease-in-out infinite;
  transition: all 0.3s ease;
}

.float-chip:hover {
  transform: scale(1.1) rotate(5deg);
  background: rgba(255, 255, 255, 0.1);
  border-color: #00d2ff;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

.chip-1 {
  left: -15px;
  top: 10px;
  animation-duration: 5s;
  color: #58a6ff;
}

.chip-2 {
  right: -15px;
  bottom: 35px;
  animation-duration: 6s;
  animation-delay: 1s;
  color: #a371f7;
}

.chip-3 {
  left: 40%;
  bottom: -20px;
  animation-duration: 7s;
  animation-delay: 2s;
  color: #3fb950;
}

.device-laptop:hover {
  transform: translateY(-5px) rotate(-1deg);
}

.device-phone:hover {
  transform: translateY(-8px) rotate(2deg);
}

@keyframes floaty {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: calc(32px + env(safe-area-inset-top, 0px)) 20px calc(32px + env(safe-area-inset-bottom, 0px));
  /* Aurora Premium Background */
  background: radial-gradient(circle at 15% 50%, rgba(0, 210, 255, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(58, 123, 213, 0.08) 0%, transparent 45%),
    #070b14;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: min(480px, 100%);
  position: relative;
  /* Glassmorphism Effect */
  background: rgba(18, 26, 43, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #e8eefc;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 48px 40px 40px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  opacity: 0.3;
  z-index: 1;
}

.auth-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.auth-card-logo strong {
  color: #58a6ff;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.auth-alert-slot {
  min-height: 38px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-alert-slot:not(:has(p:not([hidden]))) {
  min-height: 0;
  margin-bottom: 0;
}

.auth-title {
  margin: 0 0 24px;
  text-align: center;
  font-size: 1.15rem;
  color: #e8eefc;
}

.field {
  display: block;
  margin-bottom: 20px;
}

.field-hint {
  display: block;
  margin: 6px 2px 0;
  font-size: 0.8rem;
  line-height: 1.3;
}

.field-hint.is-error {
  color: #ff7b72;
}

.field-hint.is-ok {
  color: #3fb950;
}

.field-hint[hidden] {
  display: none;
}

.auth-card .field>span {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #9aa8c7;
}

.field>span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid #d8e0ec;
  border-radius: 12px;
  padding: 0 8px 0 12px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}

.auth-card .input-wrap {
  border-color: rgba(255, 255, 255, 0.12);
  background: #0f1626;
}

.input-wrap:focus-within {
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.auth-card .input-wrap:focus-within {
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.22);
}

.input-wrap svg {
  color: #94a3b8;
  flex-shrink: 0;
}

.auth-card .input-wrap svg {
  color: #7d8eae;
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 0;
  color: #0f172a;
  line-height: 1.25;
}

.auth-card .input-wrap input {
  color: #e8eefc;
}

.auth-card .input-wrap input::placeholder {
  color: #6b7a99;
}

.auth-link {
  color: #8b9bb8;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-link:hover {
  color: #00d2ff;
  text-decoration: underline;
  text-decoration-color: rgba(0, 210, 255, 0.4);
  text-underline-offset: 4px;
}

/* Esconde o botão nativo do Edge/Chrome (evita “caixa” solta no canto) */
.input-wrap input[type="password"]::-ms-reveal,
.input-wrap input[type="password"]::-ms-clear,
.input-wrap input::-webkit-credentials-auto-fill-button,
.input-wrap input::-webkit-strong-password-auto-fill-button {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 99999s ease-out;
}

.auth-card .input-wrap input:-webkit-autofill,
.auth-card .input-wrap input:-webkit-autofill:hover,
.auth-card .input-wrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e8eefc;
  box-shadow: 0 0 0 1000px #0f1626 inset;
}

.toggle-pass {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 1;
  transition: color 0.15s, background 0.15s;
}

.auth-card .toggle-pass {
  color: #9aa8c7;
}

.toggle-pass:hover {
  color: #1f6feb;
  background: rgba(31, 111, 235, 0.08);
}

.auth-card .toggle-pass:hover {
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.12);
}

.toggle-pass .bi {
  font-size: 1.15rem;
  line-height: 1;
  display: block;
}

.toggle-pass[aria-pressed="true"] {
  color: #1f6feb;
}

.auth-card .toggle-pass[aria-pressed="true"] {
  color: #58a6ff;
}

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 16px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: #475569;
  cursor: pointer;
}

.auth-card .check {
  color: #9aa8c7;
}

.check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin: 0;
}

.check input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  background-color: #00d2ff;
  border-radius: 2px;
  transition: 120ms transform ease-in-out;
}

.check input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.check input[type="checkbox"]:checked {
  border-color: #00d2ff;
}

.btn-primary {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  background: #1f6feb;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: transform 0.12s, background 0.15s;
}

.btn-primary:hover {
  background: #1a5fd0;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: #94a3b8;
  font-size: 0.85rem;
}

.auth-divider.is-plain span {
  display: none;
}

.auth-divider.is-plain {
  gap: 0;
}

.auth-card .auth-divider {
  color: #6b7a99;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-card .auth-divider::before,
.auth-card .auth-divider::after {
  background: rgba(255, 255, 255, 0.1);
}

.auth-switch {
  margin: 0;
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
}

.auth-card .auth-switch {
  color: #9aa8c7;
}

.auth-switch button {
  border: 0;
  background: none;
  color: #1f6feb;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-card .auth-switch button {
  color: #58a6ff;
}

.form-erro {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(248, 81, 73, 0.28);
  background: rgba(248, 81, 73, 0.08);
  color: #b42318;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  width: 100%;
  box-sizing: border-box;
}

.auth-card .form-erro {
  color: #ff7b72;
  border-color: rgba(248, 81, 73, 0.35);
  background: rgba(248, 81, 73, 0.12);
}

.form-erro::before {
  content: "\F333";
  font-family: "bootstrap-icons" !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 1rem;
  color: #f85149;
  speak: never;
  -webkit-font-smoothing: antialiased;
}

.form-erro[hidden] {
  display: none !important;
}

.login-vencido-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(248, 81, 73, 0.35);
  background: rgba(248, 81, 73, 0.12);
  color: var(--text);
  box-sizing: border-box;
  width: 100%;
}

.login-vencido-card[hidden] {
  display: none !important;
}

.login-vencido-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff7b72;
  font-weight: 600;
  font-size: 0.92rem;
}

.login-vencido-header i {
  font-size: 1.1rem;
  color: #f85149;
  flex-shrink: 0;
}

.login-vencido-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.login-vencido-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  width: 100%;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 4px;
  box-sizing: border-box;
  text-decoration: none;
}

.senha-regras {
  margin: -4px 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid rgba(127, 127, 127, 0.12);
}

.senha-regras-titulo {
  margin: 0 0 8px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted, #8b949e);
}

.senha-regras ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.senha-regras li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #b42318;
}

.senha-regras li i {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.senha-regras li.is-ok {
  color: #1a7f37;
}

.auth-card .senha-regras li {
  color: #ff7b72;
}

.auth-card .senha-regras li.is-ok {
  color: #3fb950;
}

#modal-perfil .senha-regras {
  margin: 0 0 12px;
}

.form-ok {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(63, 185, 80, 0.28);
  background: rgba(63, 185, 80, 0.08);
  color: #157347;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  width: 100%;
  box-sizing: border-box;
}

.form-ok[hidden] {
  display: none !important;
}

.auth-card .form-ok {
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.35);
  background: rgba(63, 185, 80, 0.12);
}

.auth-screen .modal {
  background: rgba(4, 8, 16, 0.72);
}

.auth-screen .modal-card {
  background: #161f32;
  color: #e8eefc;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-screen .sessao-list li {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.auth-screen .btn-ghost {
  border-color: rgba(255, 255, 255, 0.14);
  background: #0f1626;
  color: #e8eefc;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 12, 22, 0.55);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px));
}

.modal-card {
  width: min(420px, 100%);
  background: #fff;
  color: #0f172a;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.modal-card h3 {
  margin: 0 0 8px;
}

.sessao-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.sessoes-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sessoes-actions .btn-primary {
  width: 100%;
}

.sessao-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.btn-ghost {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  color: #334155;
}

/* ========== APP ========== */
.app-screen {
  --sidebar-w: 215px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1000px 400px at 10% -10%, rgba(31, 111, 235, 0.18), transparent),
    radial-gradient(800px 300px at 90% 0%, rgba(46, 160, 67, 0.12), transparent),
    var(--bg);
  max-width: 100%;
  overflow-x: clip;
}

.app-shell {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  min-height: calc(100dvh - 64px);
  min-width: 0;
}

.app-sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px calc(24px + var(--player-bar-offset, 0px));
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 96%, transparent);
  overflow-x: hidden;
  align-self: stretch;
  min-height: 100%;
  height: auto;
  max-height: none;
  position: relative;
  z-index: 5;
  transition: width 0.22s cubic-bezier(0.2, 0, 0, 1), flex-basis 0.22s cubic-bezier(0.2, 0, 0, 1), padding 0.22s ease;
}

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

.sidebar-sep {
  height: 1px;
  margin: 10px 12px;
  background: var(--border);
}

.side-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.2;
}

.side-nav-item .bi {
  font-size: 1.28rem;
  width: 1.25em;
  text-align: center;
  flex-shrink: 0;
}

.side-nav-item:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text);
}

.side-nav-item.is-active,
.side-nav-item[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
}

.side-nav-item.is-active .bi,
.side-nav-item[aria-pressed="true"] .bi {
  color: var(--accent);
}

#btn-favoritos.side-nav-item.is-active {
  background: color-mix(in srgb, #f85149 12%, transparent);
}

#btn-favoritos.side-nav-item.is-active .bi {
  color: #f85149;
}

#btn-offline-lib.side-nav-item.is-active {
  background: color-mix(in srgb, #3fb950 12%, transparent);
}

#btn-offline-lib.side-nav-item.is-active .bi {
  color: #3fb950;
}

.sidebar-backdrop {
  display: none;
}

.icon-btn.sidebar-toggle {
  display: inline-flex;
}

/* ========== Sidebar Minimizado (Desktop) ========== */
@media (min-width: 901px) {
  .app-screen.sidebar-collapsed {
    --sidebar-w: 68px;
  }

  .app-screen.sidebar-collapsed .app-sidebar {
    padding-left: 8px;
    padding-right: 8px;
    align-items: center;
  }

  .app-screen.sidebar-collapsed .sidebar-nav {
    width: 100%;
    align-items: center;
  }

  .app-screen.sidebar-collapsed .side-nav-item {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
    width: 100%;
    border-radius: 12px;
  }

  .app-screen.sidebar-collapsed .side-nav-item span {
    display: none !important;
  }

  .app-screen.sidebar-collapsed .side-nav-item .bi {
    font-size: 1.35rem;
    width: auto;
    margin: 0;
  }

  .app-screen.sidebar-collapsed .sidebar-sep {
    width: 80%;
    margin: 10px auto;
  }
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ========== Animação: tela inicial (login) ao abrir ========== */
.auth-screen.is-auth-enter .auth-brand-content {
  animation: authBrandIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-screen.is-auth-enter .auth-card {
  animation: authCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

/* Login OK: a própria tela parte no meio (brand ← | → panel) */
.auth-screen.is-splitting {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-screen.is-splitting .auth-split {
  min-height: 100%;
  height: 100%;
}

.auth-screen.is-splitting .auth-brand {
  animation: authSplitLeft 0.72s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.auth-screen.is-splitting .auth-panel {
  animation: authSplitRight 0.72s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

/* Mobile: painel sobe, marca desce */
@media (max-width: 900px) {
  .auth-screen.is-splitting .auth-panel {
    animation: authSplitUp 0.72s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  }

  .auth-screen.is-splitting .auth-brand {
    animation: authSplitDown 0.72s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  }
}

/* Tela Início após entrar */
.lib-view.is-home-enter .lib-toolbar {
  animation: homeFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lib-view.is-home-enter .lib-alerts:not([hidden]) {
  animation: homeFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.lib-view.is-home-enter .biblioteca {
  animation: homeFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.lib-view.is-home-enter .biblioteca .item-card {
  animation: homeCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.16s + (var(--enter-i, 0) * 0.04s));
}

@keyframes authBrandIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authSplitLeft {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-105%);
  }
}

@keyframes authSplitRight {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(105%);
  }
}

@keyframes authSplitUp {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-110%);
  }
}

@keyframes authSplitDown {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(110%);
  }
}

@keyframes homeFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes homeCardIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes searchFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes searchSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {

  .auth-screen.is-auth-enter .auth-brand-content,
  .auth-screen.is-auth-enter .auth-card,
  .auth-screen.is-splitting .auth-brand,
  .auth-screen.is-splitting .auth-panel,
  .lib-view.is-home-enter .lib-toolbar,
  .lib-view.is-home-enter .lib-alerts:not([hidden]),
  .lib-view.is-home-enter .biblioteca,
  .lib-view.is-home-enter .biblioteca .item-card {
    animation: none !important;
  }
}

.topbar {
  display: grid;
  grid-template-columns: var(--sidebar-w) auto minmax(0, 1fr) auto;
  gap: 0 14px;
  align-items: stretch;
  padding: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 90%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 35;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px 14px;
  border-right: 1px solid var(--border);
  box-sizing: border-box;
}

.topbar-welcome {
  display: none;
  align-self: center;
  margin: 0;
  max-width: 280px;
  padding-left: 2px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.topbar-welcome strong {
  font-weight: 700;
  color: var(--text);
}

@media (min-width: 901px) {
  .icon-btn.sidebar-toggle {
    position: absolute;
    left: calc(var(--sidebar-w) + 14px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 35;
    transition: left 0.22s cubic-bezier(0.2, 0, 0, 1);
  }

  .topbar-welcome.desktop-only:not([hidden]) {
    display: block;
    margin-left: 48px;
  }

  .app-screen.sidebar-collapsed .topbar-logo-full {
    display: none !important;
  }

  .app-screen.sidebar-collapsed .topbar-logo-icon {
    display: block !important;
    height: 30px;
    width: 30px;
    object-fit: contain;
    margin: 0 auto;
  }
}

.topbar-brand {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.topbar-brand:hover {
  opacity: 0.92;
}

.topbar-logo {
  height: 32px;
  width: auto;
  max-width: min(150px, 36vw);
  object-fit: contain;
  display: block;
}

.topbar-logo-icon {
  display: none;
}

.search-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 12px auto;
  justify-self: center;
  align-self: center;
}

.search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 16px 11px 40px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-wrap input::placeholder {
  color: var(--text-muted);
}

.search-wrap input:focus {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.topbar-actions {
  display: flex;
  gap: 6px;
  overflow: visible;
  align-items: center;
  align-self: center;
  padding: 12px 18px 12px 0;
}

.search-toggle-btn,
.search-close-btn {
  display: none !important;
}

#btn-novidades-top.is-open {
  border-color: color-mix(in srgb, #3fb950 45%, var(--border));
  color: #3fb950;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  line-height: 0;
  font-size: 1.15rem;
  box-sizing: border-box;
}

.icon-btn[hidden],
.fav-btn[hidden],
.folder-act-btn[hidden],
#btn-offline-clear-all[hidden],
#btn-folder-remove-offline[hidden] {
  display: none !important;
}

.icon-btn .bi,
.icon-btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: 0;
  margin: 0;
  padding: 0;
}

.icon-btn .bi::before,
.icon-btn i::before {
  display: block;
  line-height: 1;
  vertical-align: 0;
  margin: 0;
  padding: 0;
}

.icon-btn .bi-heart,
.icon-btn .bi-heart-fill,
.fav-btn .bi-heart,
.fav-btn .bi-heart-fill,
#btn-fav-player .bi-heart,
#btn-fav-player .bi-heart-fill {
  transform: translateY(1.5px);
}

.icon-btn-badge {
  position: relative;
}

.icon-btn-badge.has-novidades {
  border-color: color-mix(in srgb, #3fb950 45%, var(--border));
  color: #3fb950;
}

.icon-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #3fb950;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.user-menu {
  position: relative;
  display: inline-flex;
}

.user-avatar-btn {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  overflow: hidden;
}

.user-avatar-btn:hover {
  filter: brightness(1.08);
}

.user-avatar {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, #1f6feb 28%, #0b1220);
  color: #58a6ff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  user-select: none;
}

[data-theme="light"] .user-avatar {
  background: color-mix(in srgb, #1f6feb 22%, #e8eef8);
  color: #1f6feb;
}

.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 120;
  min-width: 220px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-menu-dropdown[hidden] {
  display: none !important;
}

.user-menu-head {
  padding: 10px 10px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.user-menu-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-email {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  white-space: nowrap;
}

.user-menu-dropdown button:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.user-menu-dropdown button.is-danger {
  color: #f87171;
}

.user-menu-dropdown button.is-danger:hover {
  background: color-mix(in srgb, #f87171 12%, transparent);
}

.user-menu-dropdown .bi {
  width: 1em;
  opacity: 0.85;
}

.perfil-senha-hint {
  margin: 12px 0 4px;
  font-size: 0.82rem;
}

#modal-perfil .form-erro {
  margin-top: 8px;
}

.app-body {
  padding: 18px 18px calc(var(--player-bar-offset) + 28px);
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.app-screen.has-player {
  --player-bar-offset: 92px;
}

/* Tela "tocando agora": capa/visual no centro do espaço livre (entre topo e player) */
.app-screen.is-now-playing {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.app-screen.is-now-playing .app-shell {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  max-height: none;
}

.app-screen.is-now-playing .app-main {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-screen.is-now-playing .app-body {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding-bottom: calc(var(--player-bar-offset) + 16px);
}

.app-screen.is-now-playing .now-playing {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0 !important;
  height: 100%;
  padding-bottom: 0;
}

.app-screen.is-now-playing .np-top {
  flex-shrink: 0;
}

.app-screen.is-now-playing .np-stage {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  gap: 18px;
  padding: 12px;
  margin-block: 0;
}

.app-screen.is-now-playing .np-visual {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: unset;
}

.app-screen.is-now-playing .np-art {
  width: min(88vw, calc(100dvh - 360px), 380px);
  height: auto;
  aspect-ratio: 1;
  max-height: none;
}

.app-screen.is-now-playing .np-meta {
  flex-shrink: 0;
  margin-top: 4px;
  padding-bottom: 4px;
}

/* Desktop: garante centralização vertical na área principal */
@media (min-width: 901px) {
  .app-screen.is-now-playing .app-body {
    max-width: none;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }

  .app-screen.is-now-playing .np-stage {
    width: 100%;
    justify-content: center;
  }

  .app-screen.is-now-playing .np-visual {
    max-width: 440px;
  }

  .app-screen.is-now-playing .np-art {
    width: min(42vw, calc(100dvh - 320px), 400px);
  }
}

.lib-view[hidden],
.now-playing[hidden] {
  display: none !important;
}

.lib-view {
  min-width: 0;
  max-width: 100%;
}

.now-playing {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding: 4px 0 24px;
}

.np-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.np-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.np-back,
.np-queue-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  padding: 6px 2px;
}

.np-back:hover,
.np-queue-btn:hover {
  color: var(--text);
}

.np-queue-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--bg-elev);
}

.np-queue-btn-icon {
  font-size: 0;
  gap: 0;
  min-width: 40px;
  justify-content: center;
  padding: 6px 10px;
}

.np-queue-btn-icon .bi {
  font-size: 1.05rem;
  line-height: 1;
}

.queue-sheet[hidden] {
  display: none !important;
}

.queue-sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: calc(var(--player-bar-offset) + env(safe-area-inset-bottom, 0px));
}

.queue-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.queue-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(60vh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.queue-count {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.queue-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.queue-clear {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.queue-list {
  list-style: none;
  margin: 0;
  padding: 8px 10px 24px;
  overflow: auto;
  flex: 1;
}

.queue-item {
  display: grid;
  grid-template-columns: 28px 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
}

.queue-item:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.queue-item.is-current {
  background: color-mix(in srgb, #1f6feb 18%, transparent);
}

.queue-item.is-dragging {
  opacity: 0.45;
}

.queue-item.is-drag-over {
  outline: 1px dashed color-mix(in srgb, #1f6feb 60%, var(--border));
}

.queue-handle {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: grab;
  padding: 4px;
  font-size: 1.05rem;
  line-height: 1;
  touch-action: none;
}

.queue-handle:active {
  cursor: grabbing;
}

.queue-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(145deg, #1a2744, #122038);
  display: grid;
  place-items: center;
  font-size: 1rem;
  overflow: hidden;
}

.queue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.queue-item-body {
  min-width: 0;
}

.queue-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-sub {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.queue-item-actions button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.queue-item-actions button:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.queue-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
}

@media (min-width: 901px) {
  .queue-sheet {
    align-items: center;
    padding: 24px;
    padding-bottom: calc(var(--player-bar-offset) + 24px);
  }
}

.np-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  padding: 16px 12px;
  margin-block: 0;
  touch-action: pan-y;
}

.np-art {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #0b1220;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px color-mix(in srgb, #fff 8%, transparent);
}

.np-visual {
  position: relative;
  width: min(72vw, 340px);
  aspect-ratio: 1;
  cursor: pointer;
  /* none: evita o browser roubar o gesto (scroll) e cancelar o tap no celular */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.np-visual.np-tap-pulse {
  transform: scale(0.97);
  transition: transform 0.12s ease;
}

.np-visual.np-swipe-left {
  animation: np-swipe-left 0.28s ease;
}

.np-visual.np-swipe-right {
  animation: np-swipe-right 0.28s ease;
}

@keyframes np-swipe-left {
  0% {
    transform: translateX(0);
    opacity: 1;
  }

  100% {
    transform: translateX(-16px);
    opacity: 0.88;
  }
}

@keyframes np-swipe-right {
  0% {
    transform: translateX(0);
    opacity: 1;
  }

  100% {
    transform: translateX(16px);
    opacity: 0.88;
  }
}

.np-visual.is-viz .np-art {
  opacity: 0.35;
  filter: blur(2px) brightness(0.55) saturate(1.1);
}

.np-viz {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  z-index: 1;
  pointer-events: none;
  background: transparent;
}

.np-viz[hidden],
.np-visual.is-video .np-viz,
.np-visual.is-video #np-viz {
  display: none !important;
}

.np-visual.is-video #btn-np-viz {
  display: none !important;
}

#btn-np-viz.is-on,
#btn-eq.is-on {
  color: #58a6ff;
  border-color: color-mix(in srgb, #58a6ff 45%, var(--border));
}

[data-theme="light"] .np-art {
  background: #e8eef8;
  color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 18px 40px rgba(30, 60, 120, 0.18),
    0 0 0 1px color-mix(in srgb, #000 6%, transparent);
}

.np-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.np-art .faixa-fallback-img {
  object-fit: contain;
  background: #05080f;
}

.np-video {
  width: 100%;
  height: 100%;
  max-height: min(70vh, 560px);
  object-fit: contain;
  border-radius: 16px;
  background: #000;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px color-mix(in srgb, #fff 8%, transparent);
}

.np-video[hidden] {
  display: none !important;
}

.np-visual.is-video {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  align-self: center;
}

.app-screen.is-now-playing .np-visual.is-video {
  width: min(100%, 920px);
  max-width: min(100%, 920px);
  margin-inline: auto;
}

.app-screen.is-now-playing .np-visual.is-video .np-video {
  width: 100%;
  height: 100%;
  max-height: none;
}

/* PC: tamanho equilibrado e centralizado na área do conteúdo (não no viewport) */
@media (min-width: 901px) {
  .app-screen.is-now-playing.has-video .np-stage {
    justify-content: center;
    align-items: center;
    padding: 12px 28px 10px;
    gap: 16px;
    width: 100%;
  }

  .app-screen.is-now-playing .np-visual.is-video {
    width: min(100%, 920px);
    max-width: min(100%, 920px);
  }

  .app-screen.is-now-playing.has-video .np-meta {
    max-width: min(100%, 920px);
    margin-inline: auto;
  }
}

/* Celular: vídeo full-bleed (sem laterais do app-body) */
@media (max-width: 900px) {
  .app-screen.is-now-playing.has-video .app-body {
    padding-left: 0;
    padding-right: 0;
  }

  .app-screen.is-now-playing.has-video .np-top {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-screen.is-now-playing.has-video .np-stage {
    justify-content: flex-start;
    padding: clamp(28px, 7vh, 56px) 0 8px;
    gap: 12px;
  }

  .app-screen.is-now-playing .np-visual.is-video {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0;
    aspect-ratio: 16 / 9;
    background: #000;
  }

  .app-screen.is-now-playing.has-video .np-video {
    border-radius: 0;
    box-shadow: none;
    max-height: none;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    background: #000;
  }

  .app-screen.is-now-playing.has-video .np-meta {
    max-width: 100%;
    padding: 0 12px;
  }
}

.np-fs-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  opacity: 0.92;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.np-fs-btn[hidden] {
  display: none !important;
}

.np-fs-btn:hover {
  background: color-mix(in srgb, var(--accent) 70%, #0f172a);
  transform: scale(1.05);
}

.np-fs-btn.is-on {
  background: rgba(15, 23, 42, 0.78);
}

.np-fs-btn .bi {
  font-size: 1.05rem;
}

.np-visual.is-video:not(:hover) .np-fs-btn {
  opacity: 0.75;
}

.np-visual.is-video:fullscreen,
.np-visual.is-video:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.np-visual.is-video:fullscreen .np-video,
.np-visual.is-video:-webkit-full-screen .np-video {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  object-fit: contain;
}

.np-visual.is-video:fullscreen .np-fs-btn,
.np-visual.is-video:-webkit-full-screen .np-fs-btn {
  opacity: 1;
  right: 18px;
  bottom: 18px;
}

.np-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: min(92vw, 440px);
  margin: 0 auto;
}

.np-meta-text {
  flex: 1;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.np-side-mode-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
  position: relative;
  cursor: pointer;
}

.np-side-mode-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--bg-elev) 85%, var(--accent));
  transform: translateY(-1px);
}

.np-side-mode-btn.is-active,
.np-side-mode-btn[aria-pressed="true"] {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 45%, transparent);
}

.np-title {
  font-size: clamp(1.15rem, 3.5vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.np-artist {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.np-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.np-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--bg-elev);
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.np-action-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--bg-elev) 85%, var(--accent));
}

.np-action-btn .bi {
  font-size: 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  margin-bottom: 18px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.breadcrumb::-webkit-scrollbar {
  display: none;
}

.breadcrumb button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 2px;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.25;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb button.breadcrumb-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: none;
}

.breadcrumb button.breadcrumb-with-icon .bi {
  font-size: 1rem;
  line-height: 1;
  color: #4da3ff;
  flex-shrink: 0;
}

[data-theme="light"] .breadcrumb button.breadcrumb-with-icon .bi {
  color: #1f6feb;
}

.breadcrumb button:last-child {
  color: var(--text);
  font-weight: 600;
  flex-shrink: 1;
  min-width: 0;
  max-width: none;
}

.breadcrumb button.breadcrumb-ellipsis {
  flex: 0 0 auto;
  max-width: none;
  padding-inline: 4px;
  letter-spacing: 0.08em;
}

.breadcrumb button::after {
  content: "/";
  margin-inline: 6px;
  color: var(--text-muted);
  font-weight: 400;
}

.breadcrumb button:last-child::after {
  content: "";
  margin: 0;
}

.lib-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 14px;
  min-width: 0;
}

.lib-toolbar-start {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.btn-lib-back {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 12px;
  background: color-mix(in srgb, var(--surface-2) 88%, #000);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.btn-lib-back .bi {
  font-size: 1rem;
  line-height: 1;
}

.btn-lib-back:hover {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.btn-lib-back:active {
  transform: scale(0.97);
}

.btn-lib-back[hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .btn-lib-back span {
    display: none;
  }

  .btn-lib-back {
    width: 36px;
    height: 36px;
    padding: 0;
  }
}

.lib-toolbar-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  width: 100%;
}

.lib-toolbar-end-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.folder-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.folder-actions[hidden] {
  display: none !important;
}

.folder-act-btn.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.icon-btn.icon-btn-danger {
  color: #f87171;
  border-color: color-mix(in srgb, #f87171 35%, var(--border));
}

.icon-btn.icon-btn-danger:hover {
  background: color-mix(in srgb, #f87171 10%, transparent);
}

#btn-offline-lib.icon-btn.is-active {
  border-color: color-mix(in srgb, #3fb950 45%, var(--border));
  color: #3fb950;
}

.lib-alerts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.lib-alerts[hidden] {
  display: none !important;
}

.lib-alerts .continue-bar,
.lib-alerts .novidades-bar {
  margin-bottom: 0;
}

.continue-bar {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.continue-bar[hidden] {
  display: none !important;
}

.continue-main {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--border);
  background: color-mix(in srgb, #1f6feb 14%, var(--bg-elev));
  color: var(--text);
  border-radius: 12px;
  padding: 6px 12px;
  cursor: pointer;
}

.continue-main:hover {
  border-color: color-mix(in srgb, #1f6feb 50%, var(--border));
}

.continue-art {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1a2744, #122038);
  font-size: 1rem;
  position: relative;
  isolation: isolate;
}

.continue-art.is-video {
  width: 52px;
  aspect-ratio: 16 / 10;
  height: auto;
  background:
    radial-gradient(120% 90% at 50% 110%, rgba(14, 165, 233, 0.28), transparent 55%),
    linear-gradient(155deg, #0b1220 0%, #132337 42%, #1a3a52 100%);
}

.continue-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.continue-art.is-video .video-cover-play {
  width: 22px;
  height: 22px;
}

.continue-art.is-video .video-cover-play .bi {
  font-size: 0.8rem;
}

.continue-art.is-video .video-cover-tag {
  left: 3px;
  bottom: 3px;
  font-size: 0.45rem;
  padding: 1px 4px;
}

.continue-main:has(.continue-art.is-video) {
  grid-template-columns: 52px 1fr auto;
}

.continue-bar.is-video .continue-label {
  color: #7dd3fc;
}

.continue-text {
  min-width: 0;
}

.continue-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #58a6ff;
  font-weight: 600;
  margin-bottom: 1px;
}

.continue-title {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-sub {
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.continue-play-icon {
  font-size: 1.3rem;
  color: #58a6ff;
}

.continue-dismiss {
  flex-shrink: 0;
  align-self: center;
  width: 34px;
  height: 34px;
  font-size: 0.85rem;
}

.novidades-bar {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.novidades-bar[hidden] {
  display: none !important;
}

.novidades-main {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--border);
  background: color-mix(in srgb, #3fb950 14%, var(--bg-elev));
  color: var(--text);
  border-radius: 12px;
  padding: 6px 12px;
  cursor: pointer;
}

.novidades-main:hover {
  border-color: color-mix(in srgb, #3fb950 50%, var(--border));
}

.novidades-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1a3d2a, #12281c);
  color: #3fb950;
  font-size: 1.05rem;
}

.novidades-text {
  min-width: 0;
}

.novidades-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #3fb950;
  font-weight: 600;
  margin-bottom: 1px;
}

.novidades-title {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.novidades-cta {
  font-size: 0.75rem;
  font-weight: 700;
  color: #3fb950;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #3fb950 16%, transparent);
}

.novidades-dismiss {
  flex-shrink: 0;
  align-self: center;
  width: 34px;
  height: 34px;
  font-size: 0.85rem;
}

/* Faixa compacta quando "Continuar ouvindo" também está visível */
.novidades-bar.is-compact .novidades-main {
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
}

.novidades-bar.is-compact .novidades-icon {
  width: auto;
  height: auto;
  padding: 0;
  background: none;
  font-size: 1rem;
}

.novidades-bar.is-compact .novidades-label {
  display: none;
}

.novidades-bar.is-compact .novidades-title {
  font-size: 0.86rem;
}

.novidades-bar.is-compact .novidades-dismiss {
  width: 34px;
  height: 34px;
  font-size: 0.9rem;
}

.lib-alerts.has-both {
  gap: 6px;
}

.novidades-modal-card {
  width: min(420px, 100%);
  padding: 18px 18px 14px;
}

.novidades-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.novidades-modal-head-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.novidades-modal-head h3 {
  margin: 0;
}

.novidades-modal-close {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.novidades-popover-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #3fb950 16%, var(--bg-elev));
  color: #3fb950;
  border: 1px solid color-mix(in srgb, #3fb950 35%, var(--border));
  white-space: nowrap;
}

#modal-novidades .app-modal-sub {
  margin-bottom: 10px;
}

.novidades-popover-empty {
  margin: 8px 0 4px;
  font-size: 0.85rem;
  text-align: center;
}

#modal-novidades .novidades-list {
  max-height: min(52vh, 360px);
  margin-bottom: 4px;
}

.novidades-modal-foot {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.novidades-clear-btn {
  font-size: 0.82rem;
  padding: 8px 12px;
  color: var(--danger);
  background: transparent;
  border: 1px solid var(--danger);
}

.novidades-clear-btn:hover {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.novidades-clear-btn[hidden] {
  display: none !important;
}

.novidades-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  max-height: min(52vh, 360px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.novidades-loading {
  padding: 20px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.novidades-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

.novidades-item:hover {
  border-color: color-mix(in srgb, #3fb950 45%, var(--border));
}

.novidades-item.is-video:hover {
  border-color: color-mix(in srgb, #22d3ee 45%, var(--border));
}

.novidades-item.is-audio:hover {
  border-color: color-mix(in srgb, #22c55e 45%, var(--border));
}

.novidades-item-cover {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1a2744, #122038);
}

.novidades-item-cover .bi {
  font-size: 1.85rem;
  color: #3fb950;
}

.novidades-item.is-audio .novidades-item-cover .bi {
  color: #4ade80;
}

.novidades-item.is-video .novidades-item-cover .bi {
  color: #67e8f9;
}

.novidades-item.is-video .novidades-item-cover {
  background: linear-gradient(145deg, #123040, #0f2438);
}

.novidades-item.is-audio .novidades-item-cover {
  background: linear-gradient(145deg, #122a1c, #102038);
}

.novidades-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.novidades-item-body {
  min-width: 0;
}

.novidades-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #3fb950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.novidades-item.is-audio .novidades-item-name {
  color: #4ade80;
}

.novidades-item.is-video .novidades-item-name {
  color: #67e8f9;
}

.novidades-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 2px;
}

.novidades-item-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.3;
}

.novidades-item.is-audio .novidades-item-badge {
  color: #86efac;
  background: color-mix(in srgb, #22c55e 18%, transparent);
  border: 1px solid color-mix(in srgb, #22c55e 35%, transparent);
}

.novidades-item.is-video .novidades-item-badge {
  color: #a5f3fc;
  background: color-mix(in srgb, #22d3ee 18%, transparent);
  border: 1px solid color-mix(in srgb, #22d3ee 35%, transparent);
}

.novidades-item-sub {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.novidades-main.is-video .novidades-icon {
  color: #67e8f9;
  background: color-mix(in srgb, #22d3ee 16%, transparent);
}

.novidades-main.is-audio .novidades-icon {
  color: #4ade80;
  background: color-mix(in srgb, #22c55e 16%, transparent);
}

.novidades-item-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.lib-toolbar .breadcrumb {
  margin-bottom: 0;
  width: auto;
  max-width: 100%;
  flex: 1;
  min-width: 0;
  align-self: center;
}

.view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
  flex-shrink: 0;
}

.view-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  width: 34px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.view-btn.is-active {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text);
}

.lib-scroll-sentinel {
  grid-column: 1 / -1;
  width: 100%;
  height: 1px;
  pointer-events: none;
  visibility: hidden;
}

.destaques-section {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.destaques-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.destaques-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.destaques-title .bi {
  color: #f0b429;
}

.destaques-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.destaques-scroll .item-card.pasta {
  flex: 0 0 148px;
  width: 148px;
  max-width: 148px;
  scroll-snap-align: start;
}

.item-card.pasta.is-destaque {
  border-color: color-mix(in srgb, #f0b429 45%, var(--line));
  background: color-mix(in srgb, #f0b429 8%, var(--surface-2));
}

.item-card.pasta .badge-destaque {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #f0b429;
  font-size: 0.82rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.biblioteca.view-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.biblioteca.view-grid .item-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.biblioteca.view-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.empty-msg {
  grid-column: 1 / -1;
  color: var(--text-muted);
}

.lib-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: min(52vh, 320px);
  padding: 2.5rem 1.25rem;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(59, 130, 246, 0.1), transparent 70%);
}

.lib-empty-state.is-audio,
.lib-empty-state.is-video {
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, color-mix(in srgb, var(--accent, #3b82f6) 12%, transparent), transparent 70%);
}

.lib-empty-state-ico {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
  font-size: 1.75rem;
  color: var(--accent, #3b82f6);
  background: color-mix(in srgb, var(--accent, #3b82f6) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #3b82f6) 30%, transparent);
}

.lib-empty-state.is-audio .lib-empty-state-ico,
.lib-empty-state.is-video .lib-empty-state-ico {
  color: var(--accent, #3b82f6);
  background: color-mix(in srgb, var(--accent, #3b82f6) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent, #3b82f6) 30%, transparent);
}

.lib-empty-state-title {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.lib-empty-state-text {
  margin: 0;
  max-width: 22rem;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.lib-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 320px;
  padding: 48px 16px;
  text-align: center;
  animation: libLoadingIn 0.25s ease both;
}

.lib-loading-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent);
  animation: libLoadingSpin 0.8s linear infinite;
}

.lib-loading-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  max-width: 22rem;
  overflow-wrap: anywhere;
}

.lib-error {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 260px;
  padding: 40px 16px;
  text-align: center;
}

.lib-error .empty-msg {
  margin: 0;
  max-width: 26rem;
  overflow-wrap: anywhere;
}

.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-retry:hover {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}

.btn-retry:active {
  transform: scale(0.97);
}

@keyframes libLoadingSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes libLoadingIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lib-loading {
    animation: none;
  }

  .lib-loading-spinner {
    animation-duration: 1.6s;
  }
}

.item-card {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 90%, transparent);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s;
  text-align: left;
  color: inherit;
  width: 100%;
}

.item-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}

.item-card.faixa {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.item-icon {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  font-size: 1.15rem;
  background: linear-gradient(145deg, #1f6feb, #2ea043);
  color: rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .item-icon {
  background: linear-gradient(145deg, #1f6feb, #2ea043);
  color: rgba(255, 255, 255, 0.55);
}

.item-card.faixa .item-icon {
  aspect-ratio: auto;
  width: 40px;
  height: 40px;
  margin: 0;
  font-size: 1rem;
}

.item-cover {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 10px;
}

.item-card.pasta .item-cover {
  background: transparent;
}

.badge-novo {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 999px;
  background: #3fb950;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

/* Capa ~36px: badge grande do grid corta o texto ("NOV"). Versão compacta. */
.biblioteca.view-list .item-card.pasta .badge-novo {
  top: 1px;
  left: 1px;
  font-size: 0.5rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
  padding: 1px 4px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.item-cover-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  background: transparent;
  opacity: 0;
  transform: scale(1);
  transition:
    opacity 0.18s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.item-card.pasta .item-cover-img {
  object-fit: contain;
  background: transparent;
  border-radius: 6px;
}

.item-cover-img.is-loaded {
  opacity: 1;
}

.item-card:hover .item-cover-img.is-loaded,
.item-card:hover .faixa-fallback-img {
  transform: scale(1.04);
}

.item-cover-img.is-broken {
  display: none;
  opacity: 0;
}

.item-cover-img.is-broken+.pasta-icon-wrap,
.item-cover-img.is-broken+.item-icon {
  display: grid;
}

.item-card.faixa .item-cover-img {
  width: 40px;
  height: 40px;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 8px;
}

.biblioteca.view-grid .item-card.faixa .item-cover-img,
.biblioteca.view-grid .item-card.pasta .item-cover-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.biblioteca.view-list .item-card.pasta .item-cover,
.biblioteca.view-list .item-card.faixa .item-cover {
  width: 40px;
  height: 40px;
}

.biblioteca.view-list .item-card.pasta .item-cover-img,
.biblioteca.view-list .item-card.faixa .item-cover-img,
.biblioteca.view-list .item-card.faixa .faixa-fallback-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.biblioteca.view-list .item-card.faixa .item-icon {
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.biblioteca.view-list .item-card.faixa .faixa-fallback-img {
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.biblioteca.view-grid .item-card.pasta,
.biblioteca.view-grid .item-card.playlist {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.biblioteca.view-grid .item-card.pasta .item-cover,
.biblioteca.view-grid .item-card.playlist .item-cover {
  width: 100%;
  container-type: inline-size;
}

.item-cover .cover-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  color: #fff;
  line-height: 0;
  font-size: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.75));
}

.item-cover .cover-fav .bi {
  font-size: 18px;
  line-height: 1;
  display: block;
  margin: 0;
  padding: 0;
}

.item-cover .cover-fav.is-on,
.item-cover .cover-fav[aria-pressed="true"] {
  color: #ff6b6b;
  background: transparent;
  border: 0;
}

.biblioteca.view-list .item-cover .cover-fav {
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  min-width: 20px;
}

.biblioteca.view-list .item-cover .cover-fav .bi {
  font-size: 13px;
}

.item-card.pasta .item-body,
.item-card.faixa .item-body {
  min-width: 0;
}

.item-name {
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.3;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.item-sub {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Grid: faixa empilhada (capa + título + ações) */
.biblioteca.view-grid .item-card.faixa {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  min-width: 0;
}

.biblioteca.view-grid .item-card.faixa:has(.faixa-more.is-open) {
  position: relative;
  z-index: 40;
}

.biblioteca.view-grid .item-card.faixa .item-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.biblioteca.view-grid .item-card.faixa .item-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  font-size: 1.6rem;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

/* —— Capa de vídeo (placeholder cinematográfico) —— */
.biblioteca.view-grid .item-card.faixa.is-video .item-cover {
  border-radius: 12px;
}

.biblioteca.view-grid .item-card.faixa.is-video .item-icon.video-icon-wrap,
.biblioteca.view-grid .item-card.faixa.is-video .item-cover-img {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
}

.biblioteca.view-grid .item-card.faixa .item-icon.video-icon-wrap {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 50% 110%, rgba(14, 165, 233, 0.28), transparent 55%),
    linear-gradient(155deg, #0b1220 0%, #132337 42%, #1a3a52 100%);
  color: #f8fafc;
  overflow: hidden;
}

.video-cover-glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.22), transparent 42%),
    radial-gradient(circle at 78% 70%, rgba(34, 197, 94, 0.12), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.video-cover-sheen {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.07) 50%, transparent 60%);
  background-size: 220% 100%;
  animation: videoSheen 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes videoSheen {

  0%,
  100% {
    background-position: 120% 0;
  }

  50% {
    background-position: -20% 0;
  }
}

.video-cover-play {
  position: relative;
  z-index: 2;
  width: clamp(44px, 28%, 58px);
  height: clamp(44px, 28%, 58px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}

.video-cover-play .bi {
  font-size: clamp(1.15rem, 5vw, 1.45rem);
  margin-left: 2px;
  color: #fff;
}

.item-card.faixa.is-video:hover .video-cover-play {
  transform: scale(1.08);
  background: color-mix(in srgb, var(--accent) 75%, #0f172a);
  border-color: rgba(255, 255, 255, 0.4);
}

.video-cover-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

.biblioteca.view-list .item-card.faixa .item-icon.video-icon-wrap {
  position: relative;
  background: linear-gradient(145deg, #0f172a, #1e3a5f);
  color: #e0f2fe;
  overflow: hidden;
}

.biblioteca.view-list .item-card.faixa .video-cover-glow,
.biblioteca.view-list .item-card.faixa .video-cover-sheen,
.biblioteca.view-list .item-card.faixa .video-cover-tag {
  display: none;
}

.biblioteca.view-list .item-card.faixa .video-cover-play {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.biblioteca.view-list .item-card.faixa .video-cover-play .bi {
  font-size: 1rem;
  margin-left: 1px;
  color: #7dd3fc;
}

.queue-thumb.is-video {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0f172a, #1e3a5f);
  border-radius: inherit;
  overflow: hidden;
}

.queue-thumb.is-video .video-cover-glow,
.queue-thumb.is-video .video-cover-sheen,
.queue-thumb.is-video .video-cover-tag {
  display: none;
}

.queue-thumb.is-video .video-cover-play {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.queue-thumb.is-video .video-cover-play .bi {
  font-size: 0.95rem;
  color: #7dd3fc;
}

@media (prefers-reduced-motion: reduce) {
  .video-cover-sheen {
    animation: none;
  }
}

.biblioteca.view-grid .item-card.faixa .faixa-fallback-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  transform: scale(1);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.biblioteca.view-grid .item-card.faixa .item-cover {
  width: 100%;
}

.biblioteca.view-grid .item-card.faixa .item-name,
.biblioteca.view-grid .item-card.pasta .item-name,
.biblioteca.view-grid .item-card.playlist .item-name,
.biblioteca.view-grid .item-card.playlist-new .item-name {
  font-size: 0.84rem;
  min-height: 2.6em;
}

.biblioteca.view-grid .item-card.faixa .item-body {
  min-width: 0;
  width: 100%;
}

.biblioteca.view-grid .item-card.faixa .item-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.biblioteca.view-grid .item-card.faixa .faixa-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 4px;
  width: 100%;
  align-items: stretch;
}

.faixa-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.faixa-act-mobile-only {
  display: none;
}

.faixa-act-btn.done {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, var(--border));
}

.faixa-act-btn.is-loading {
  opacity: 0.85;
  pointer-events: none;
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.faixa-act-btn.is-loading .bi {
  animation: libLoadingSpin 0.8s linear infinite;
}

.faixa-menu-mobile-only.is-loading .bi {
  animation: libLoadingSpin 0.8s linear infinite;
}

.biblioteca.view-grid .item-card.faixa .faixa-actions>.faixa-act-btn {
  width: 100%;
  padding: 7px 2px;
  font-size: 0.65rem;
}

.biblioteca.view-grid .item-card.faixa .faixa-more .more-btn {
  width: 34px;
  min-width: 34px;
  padding: 7px 0;
}

.biblioteca.view-grid .item-card.pasta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
}

.biblioteca.view-grid .item-card.pasta .item-icon,
.biblioteca.view-grid .item-card.pasta .pasta-icon-wrap {
  background: transparent;
  margin-bottom: 0;
}

.biblioteca.view-grid .item-card.pasta .item-icon .bi,
.biblioteca.view-grid .item-card.pasta .pasta-icon-wrap .bi {
  font-size: clamp(3.75rem, 62cqi, 6.5rem);
  line-height: 1;
  color: #4da3ff;
  filter: drop-shadow(0 2px 6px rgba(77, 163, 255, 0.35));
}

[data-theme="light"] .biblioteca.view-grid .item-card.pasta .item-icon .bi,
[data-theme="light"] .biblioteca.view-grid .item-card.pasta .pasta-icon-wrap .bi {
  color: #007aff;
}

/* Lista: pastas e faixas em linha */
.biblioteca.view-list .item-card.pasta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}

.biblioteca.view-list .item-card.pasta .item-cover {
  width: 36px;
  height: 36px;
}

.biblioteca.view-list .item-card.pasta .item-icon,
.biblioteca.view-list .item-card.pasta .pasta-icon-wrap,
.biblioteca.view-list .item-card.pasta .item-cover-img {
  width: 36px;
  height: 36px;
  aspect-ratio: auto;
  margin: 0;
  flex-shrink: 0;
}

.biblioteca.view-list .item-card.pasta .item-icon,
.biblioteca.view-list .item-card.pasta .pasta-icon-wrap {
  background: transparent;
  display: grid;
  place-items: center;
}

.biblioteca.view-list .item-card.pasta .item-icon .bi,
.biblioteca.view-list .item-card.pasta .pasta-icon-wrap .bi {
  font-size: 2.15rem;
  color: #4da3ff;
}

.biblioteca.view-list .item-card.playlist,
.biblioteca.view-list .item-card.playlist-new {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  width: 100%;
}

.biblioteca.view-list .item-card.playlist-new {
  min-height: 0;
  justify-content: flex-start;
}

.biblioteca.view-list .item-card.playlist .item-cover {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.biblioteca.view-list .item-card.playlist .item-icon,
.biblioteca.view-list .item-card.playlist-new .item-icon {
  width: 36px;
  height: 36px;
  aspect-ratio: auto;
  margin: 0;
  font-size: 1rem;
  flex-shrink: 0;
}

.biblioteca.view-list .item-card.playlist .item-body,
.biblioteca.view-list .item-card.playlist-new .item-body {
  min-width: 0;
  flex: 1;
}

.biblioteca.view-list .item-card.playlist .item-name,
.biblioteca.view-list .item-card.playlist-new .item-name,
.biblioteca.view-list .item-card.pasta .item-name {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biblioteca.view-list .item-card.playlist .item-sub,
.biblioteca.view-list .item-card.playlist-new .item-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biblioteca.view-list .item-card.faixa {
  padding: 8px 10px;
}

.biblioteca.view-list .item-card.faixa .item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.biblioteca.view-list .item-card.faixa .item-name {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biblioteca.view-list .faixa-actions {
  flex-direction: row;
  flex-wrap: wrap;
}

.faixa-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.faixa-actions button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 0.72rem;
  white-space: nowrap;
}

.faixa-actions button.done {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, var(--border));
}

.faixa-more {
  position: relative;
  display: inline-flex;
}

.faixa-more .more-btn {
  min-width: 34px;
  display: grid;
  place-items: center;
}

.faixa-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 30;
  min-width: 190px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.faixa-more.is-open .faixa-menu {
  z-index: 80;
}

.faixa-more.is-floating-menu .faixa-menu,
.faixa-menu.faixa-menu--portal {
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 120;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
  /* Fora do card: não pode ser recortado nem herdar largura do grid */
  max-width: none;
  overscroll-behavior: contain;
}

.faixa-menu[hidden] {
  display: none !important;
}

.faixa-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  white-space: nowrap;
}

.faixa-menu button:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.faixa-menu-danger,
.faixa-menu button.faixa-menu-danger {
  color: #f87171;
}

.faixa-menu-danger:hover,
.faixa-menu button.faixa-menu-danger:hover {
  background: color-mix(in srgb, #f87171 12%, transparent);
}

.faixa-menu .bi {
  width: 1em;
  opacity: 0.85;
}

.faixa-menu-mobile-only {
  display: none;
}

.biblioteca.view-list .faixa-more .faixa-menu {
  bottom: auto;
  top: calc(100% + 6px);
}

.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: var(--player);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  z-index: 20;
  transition: padding 0.2s ease, gap 0.2s ease;
}

.player-compact-btn {
  position: absolute;
  top: -14px;
  left: auto;
  right: 18px;
  transform: none;
  width: 40px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--player);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.player-compact-btn:hover {
  color: var(--text);
  background: var(--bg-elev);
}

.player-compact-btn .bi {
  font-size: 0.85rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.player-bar.is-compact .player-compact-btn .bi {
  transform: rotate(180deg);
}

.app-screen.is-now-playing .player-compact-btn {
  display: none !important;
}

.app-screen.has-player.player-compact {
  --player-bar-offset: 64px;
}

.player-bar.is-compact {
  grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr);
  gap: 10px;
  padding: 8px 18px calc(8px + env(safe-area-inset-bottom));
  align-items: center;
}

.player-bar.is-compact .player-art {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1rem;
}

.player-bar.is-compact .player-artist {
  display: none;
}

.player-bar.is-compact .player-title {
  font-size: 0.9rem;
}

.player-bar.is-compact .player-controls {
  gap: 0;
}

.player-bar.is-compact .transport-side {
  display: none;
}

.player-bar.is-compact .transport {
  gap: 8px;
  max-width: none;
}

.player-bar.is-compact .transport-main {
  gap: 8px;
}

.player-bar.is-compact .play-btn {
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
}

.player-bar.is-compact .transport-main .icon-btn {
  width: 34px;
  height: 34px;
}

.player-bar.is-compact .player-extra .volume-slider {
  max-width: 88px;
}

.player-bar.is-compact .player-extra .icon-btn {
  width: 32px;
  height: 32px;
}

/* Barra de progresso fina no modo minimizado (desktop + mobile) */
.player-bar.is-compact {
  padding-top: 12px;
}

.player-bar.is-compact .seek-wrap {
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  max-width: none;
  height: 3px;
  gap: 0;
  margin: 0;
  z-index: 1;
}

.player-bar.is-compact .seek-wrap:hover,
.player-bar.is-compact .seek-wrap:active {
  height: 6px;
}

.player-bar.is-compact .seek-wrap #time-cur,
.player-bar.is-compact .seek-wrap #time-dur {
  display: none;
}

.player-bar.is-compact .wave-seek {
  height: 100%;
  flex: 1;
  min-width: 0;
}

.player-bar.is-compact .seek-wave-canvas {
  display: none !important;
}

.player-bar.is-compact .wave-seek input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 1;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  z-index: 1;
}

.player-bar.is-compact .wave-seek input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 35%, transparent);
}

.player-bar.is-compact .wave-seek input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--accent-2, #3fb950);
  border: 0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--player) 80%, transparent);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.player-bar.is-compact .seek-wrap:hover .wave-seek input[type="range"]::-webkit-slider-thumb,
.player-bar.is-compact .seek-wrap:active .wave-seek input[type="range"]::-webkit-slider-thumb {
  opacity: 1;
}

.player-bar.is-compact .wave-seek input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 35%, transparent);
}

.player-bar.is-compact .wave-seek input[type="range"]::-moz-range-progress {
  height: 3px;
  border-radius: 999px;
  background: var(--accent-2, #3fb950);
}

.player-bar.is-compact .wave-seek input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-2, #3fb950);
  opacity: 0;
}

.player-bar.is-compact .seek-wrap:hover .wave-seek input[type="range"]::-moz-range-thumb,
.player-bar.is-compact .seek-wrap:active .wave-seek input[type="range"]::-moz-range-thumb {
  opacity: 1;
}

.player-bar.is-compact .wave-seek::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 3px;
  width: var(--seek-pct, 0%);
  border-radius: 999px;
  background: var(--accent-2, #3fb950);
  pointer-events: none;
  z-index: 0;
}

/* Menu de acesso rápido — só mobile */
.mobile-dock {
  display: none;
}

.player-bar[hidden] {
  display: none !important;
}

.player-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
}

.player-meta-text {
  min-width: 0;
  flex: 1;
}

.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.fav-btn .bi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: 0;
  margin: 0;
  padding: 0;
  transform: translateY(1.5px);
}

.fav-btn .bi::before {
  display: block;
  line-height: 1;
  vertical-align: 0;
  margin: 0;
  padding: 0;
}

.fav-btn.is-on,
.fav-btn[aria-pressed="true"] {
  color: #f85149;
  border-color: color-mix(in srgb, #f85149 45%, var(--border));
}

#btn-fav-player {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  font-size: 1.15rem;
}

#btn-fav-player .bi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(1.5px);
}

.faixa-actions .fav-btn {
  min-width: 0;
}

#btn-favoritos.icon-btn.is-active {
  color: #f85149;
  border-color: color-mix(in srgb, #f85149 45%, var(--border));
}

.player-art {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #0b1220;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
}

.player-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.player-art .faixa-fallback-img,
.continue-art .faixa-fallback-img,
.queue-thumb .faixa-fallback-img {
  object-fit: contain;
  background: #05080f;
}

.player-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.player-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.player-modes-bar {
  display: none;
}

.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
}

.folder-skip-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.folder-skip-btn[hidden] {
  display: none !important;
}

.folder-skip-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.folder-skip-btn .bi {
  font-size: 1.15rem;
}

.skip-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  font-size: 1.6rem;
  box-shadow: 0 8px 24px rgba(29, 78, 216, 0.45), inset 0 1px 1.5px rgba(255, 255, 255, 0.4);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease, filter 0.18s ease;
  position: relative;
}

.play-btn:hover {
  transform: scale(1.06);
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.55), inset 0 1px 1.5px rgba(255, 255, 255, 0.6);
}

.play-btn:active {
  transform: scale(0.95);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}

.play-btn .bi {
  line-height: 1;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.play-btn .icon-play {
  transform: translateX(1.5px);
}

.play-btn .icon-pause {
  display: none !important;
}

.play-btn.is-playing .icon-play {
  display: none !important;
}

.play-btn.is-playing .icon-pause {
  display: block !important;
}

.mode-btn {
  position: relative;
  opacity: 0.55;
}

.mode-btn.is-on {
  opacity: 1;
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.mode-btn .repeat-badge {
  position: absolute;
  right: 3px;
  bottom: 3px;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 1px 3px;
  pointer-events: none;
}

.seek-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.seek-mode-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.seek-mode-btn:hover {
  color: var(--text);
}

.seek-mode-btn.is-active,
.seek-mode-btn[aria-pressed="true"] {
  color: var(--accent);
}

.wave-seek {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 26px;
  display: flex;
  align-items: center;
}

.seek-wave-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wave-seek input[type="range"] {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 26px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  accent-color: var(--accent-2);
}

.seek-wrap input,
.player-extra input {
  width: 100%;
  accent-color: var(--accent);
}

.player-extra {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.player-extra .icon-btn {
  width: 36px;
  height: 36px;
  color: var(--text);
}

.mute-btn .icon-mute {
  display: none !important;
}

.mute-btn.is-muted .icon-vol {
  display: none !important;
}

.mute-btn.is-muted .icon-mute {
  display: block !important;
}

.player-extra .volume-slider {
  width: 100%;
  max-width: 120px;
}

.eq-panel {
  position: fixed;
  right: 16px;
  bottom: calc(var(--player-bar-offset) + 8px);
  width: min(280px, calc(100% - 32px));
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  z-index: 25;
  box-shadow: var(--shadow);
}

.eq-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.eq-panel label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.eq-panel input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  max-width: min(92vw, 320px);
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
  line-height: 1.35;
  background: color-mix(in srgb, var(--modal-bg) 80%, #1f6feb 20%);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 200;
  font-size: 0.9rem;
  border: 1px solid color-mix(in srgb, #58a6ff 35%, var(--border));
  box-shadow: var(--shadow);
}

[data-theme="light"] .toast {
  background: color-mix(in srgb, #fff 92%, var(--accent));
  color: #0f172a;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}

.https-banner {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  z-index: 45;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, #f59e0b 45%, var(--border));
  background: color-mix(in srgb, var(--bg-elev) 88%, #f59e0b);
  box-shadow: var(--shadow);
}

.https-banner[hidden] {
  display: none !important;
}

.https-banner-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
  font-size: 0.86rem;
}

.https-banner-body .bi {
  color: #f59e0b;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.https-banner-body strong {
  display: block;
  margin-bottom: 2px;
}

.https-banner-body span {
  color: var(--text-muted);
  line-height: 1.35;
}

.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 92%, #1f6feb);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.install-banner[hidden] {
  display: none !important;
}

.install-banner-body {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.install-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}

.install-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.install-banner-text strong {
  font-size: 0.95rem;
}

.install-banner-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-primary-sm {
  border: 0;
  background: #1f6feb;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
}

.btn-primary-sm:hover {
  filter: brightness(1.08);
}

.install-btn:not([hidden]) {
  color: #58a6ff;
  border-color: color-mix(in srgb, #58a6ff 40%, var(--border));
}

.install-ios-card {
  width: min(380px, 100%);
}

.install-ios-steps {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: left;
  counter-reset: ios-step;
}

.install-ios-steps li {
  position: relative;
  margin-bottom: 10px;
  padding: 12px 14px 12px 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  counter-increment: ios-step;
}

.install-ios-steps li::before {
  content: counter(ios-step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
}

.install-ios-steps strong {
  color: var(--text);
}

.install-ios-steps .bi {
  color: var(--accent);
}

@media (max-width: 1200px) {
  .biblioteca.view-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

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

  /* Mobile: formulário primeiro, marca embaixo — só ordem */
  .auth-panel {
    order: 1;
  }

  .auth-brand {
    display: none;
  }

  .auth-devices {
    display: none;
  }

  .auth-brand h1 {
    font-size: 1.7rem;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 45;
    width: min(300px, 88vw);
    flex: none;
    height: 100dvh;
    min-height: 0;
    max-height: none;
    align-self: auto;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(-105%);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: none;
    border-right: 1px solid var(--border);
  }

  .app-screen.sidebar-open .app-sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }

  .app-main {
    margin-left: 0;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 44;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(4, 8, 16, 0.55);
    backdrop-filter: blur(2px);
    cursor: pointer;
  }

  .sidebar-backdrop[hidden] {
    display: none !important;
  }

  .icon-btn.sidebar-toggle {
    position: static;
    transform: none;
    display: inline-flex;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 35;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 10px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
    background: color-mix(in srgb, var(--bg-elev) 94%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
    transition: padding 0.2s ease;
  }

  .topbar-welcome {
    display: none !important;
  }

  .topbar-left {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border-right: 0;
    min-width: 0;
  }

  .topbar-actions {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    justify-self: end;
  }

  .topbar-left strong {
    display: none;
  }

  .topbar-logo {
    height: 30px;
    max-width: 130px;
  }

  .search-toggle-btn {
    display: inline-flex !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    padding: 0;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.15s ease;
  }

  .search-toggle-btn:hover,
  .topbar.search-open .search-toggle-btn {
    color: var(--accent);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .topbar:not(.search-open) .search-wrap {
    display: none !important;
  }

  .topbar.search-open .search-wrap {
    display: flex !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100%;
    max-width: none;
    margin: 4px 0 2px;
    position: relative;
    align-items: center;
    animation: searchSlideDown 0.2s ease-out;
  }

  .topbar.search-open .search-wrap input {
    width: 100%;
    padding: 10px 40px 10px 40px;
    font-size: 0.95rem;
    background: var(--bg);
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  }

  .topbar.search-open .search-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  }

  .topbar.search-open .search-close-btn {
    display: inline-flex !important;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 999px;
  }

  .topbar.search-open .search-close-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
  }

  .app-body {
    padding: 12px 12px calc(var(--player-bar-offset) + 24px);
    overflow-x: clip;
  }

  .mobile-dock {
    --mobile-dock-h: 56px;
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 21;
    height: calc(var(--mobile-dock-h) + env(safe-area-inset-bottom, 0px));
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    background: color-mix(in srgb, var(--bg-elev) 94%, transparent);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(16px);
  }

  .mobile-dock-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    padding: 6px 2px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.01em;
  }

  .mobile-dock-item .bi {
    font-size: 1.2rem;
    line-height: 1;
  }

  .mobile-dock-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-dock-item.is-active {
    color: var(--accent);
  }

  .mobile-dock-item[data-quick-nav="btn-favoritos"].is-active {
    color: #f85149;
  }

  .mobile-dock-item[data-quick-nav="btn-offline-lib"].is-active {
    color: #3fb950;
  }

  .app-screen.has-player {
    --player-bar-offset: calc(158px + 56px);
  }

  .app-screen.has-player.player-compact {
    --player-bar-offset: calc(72px + 56px);
  }

  .app-screen:not(.has-player) {
    --player-bar-offset: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .app-screen.has-player .player-bar {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: 12px;
  }

  .app-screen.is-now-playing .mobile-dock {
    display: none;
  }

  .app-screen.is-now-playing.has-player {
    --player-bar-offset: 158px;
  }

  .app-screen.is-now-playing.has-player.player-compact {
    --player-bar-offset: 72px;
  }

  .app-screen.is-now-playing.has-player .player-bar {
    bottom: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .app-screen.is-now-playing.has-player.player-compact .player-bar {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .now-playing {
    min-height: 0;
    padding: 0;
  }

  .np-top {
    gap: 8px;
    margin-bottom: 0;
  }

  .np-top-actions {
    gap: 6px;
  }

  .np-queue-btn {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .np-stage {
    gap: 16px;
    padding: 8px 0;
    justify-content: center;
  }

  .app-screen.is-now-playing .np-stage {
    justify-content: center;
  }

  .np-visual {
    width: min(86vw, 360px);
  }

  .app-screen.is-now-playing .np-visual.is-video {
    width: 100% !important;
    max-width: 100% !important;
  }

  .np-meta {
    gap: 10px;
    max-width: min(92vw, 400px);
  }

  .np-side-mode-btn {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
    border-radius: 10px;
  }

  .np-title {
    font-size: clamp(1.05rem, 4.5vw, 1.35rem);
    padding: 0 4px;
  }

  .np-artist {
    font-size: 0.9rem;
    padding: 0 4px;
  }

  /* Player mobile */
  .player-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--player) 94%, #000);
    border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  }

  .app-screen.is-now-playing .player-compact-btn {
    display: none !important;
  }

  .player-compact-btn {
    top: -12px;
    right: 12px;
    width: 36px;
    height: 20px;
  }

  .player-meta {
    width: 100%;
    gap: 10px;
    order: 1;
    display: flex;
    align-items: center;
  }

  .player-art {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 1rem;
    flex-shrink: 0;
  }

  .player-title {
    font-size: 0.9rem;
    font-weight: 700;
  }

  .player-artist {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: block;
  }

  .player-meta .fav-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    margin-left: auto;
  }

  .player-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    order: 2;
  }

  .seek-wrap {
    width: 100%;
    max-width: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
    order: 1;
  }

  .wave-seek {
    flex: 1;
    min-width: 0;
    height: 26px;
  }

  .wave-seek input[type="range"] {
    height: 26px;
  }

  .transport {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    order: 2;
    padding: 2px 0;
  }

  .transport .folder-skip-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    font-size: 1.15rem;
    flex-shrink: 0;
  }

  .transport .skip-btn,
  .transport .icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    font-size: 1.25rem;
    flex-shrink: 0;
  }

  .transport .play-btn {
    width: 60px;
    height: 60px;
    font-size: 1.85rem;
    border-radius: 999px;
    margin: 0 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.5), inset 0 1px 1.5px rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
  }

  /* Compact / Mini player */
  .player-bar.is-compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "meta transport";
    gap: 6px 10px;
    padding: 10px 12px calc(8px + env(safe-area-inset-bottom));
    align-items: center;
  }

  .player-bar.is-compact .player-meta {
    display: flex !important;
    grid-area: meta;
    width: auto;
  }

  .player-bar.is-compact .seek-wrap,
  .player-bar.is-compact .folder-skip-btn {
    display: none !important;
  }

  .player-bar.is-compact .transport {
    grid-area: transport;
    width: auto;
    max-width: none;
    gap: 6px;
    padding: 0;
    margin: 0;
  }

  .player-bar.is-compact .transport .skip-btn,
  .player-bar.is-compact .transport .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1.05rem;
  }

  .player-bar.is-compact .transport .play-btn {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
    margin: 0;
    box-shadow: none;
  }

  .player-extra {
    display: none;
  }

  .install-banner {
    left: 10px;
    right: 10px;
    bottom: calc(165px + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .install-banner-actions {
    width: 100%;
    justify-content: stretch;
  }

  .install-banner-actions .btn-ghost,
  .install-banner-actions .btn-primary-sm {
    flex: 1;
  }

  .toast {
    bottom: calc(var(--player-bar-offset) + 16px + env(safe-area-inset-bottom, 0px));
  }

  .eq-panel {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(var(--player-bar-offset) + 12px + env(safe-area-inset-bottom, 0px));
  }

  .queue-sheet {
    align-items: flex-end;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: calc(var(--player-bar-offset) + env(safe-area-inset-bottom, 0px));
  }

  .queue-panel {
    width: 100%;
    max-height: min(52vh, 460px);
    border-radius: 18px 18px 0 0;
  }

  .biblioteca.view-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  /* Modo card no celular: destaque no mesmo tamanho das outras pastas */
  .biblioteca.view-grid .destaques-scroll {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow-x: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .biblioteca.view-grid .destaques-scroll .item-card.pasta {
    flex: none;
    width: auto;
    max-width: none;
    min-width: 0;
  }

  .biblioteca.view-grid .item-card.faixa .faixa-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    width: 100%;
    min-width: 0;
  }

  .biblioteca.view-grid .item-card.faixa .faixa-act-label {
    display: none;
  }

  .biblioteca.view-grid .item-card.faixa .faixa-act-mobile-only {
    display: none;
  }

  .biblioteca.view-grid .item-card.faixa .faixa-act-btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    padding: 5px 0;
    font-size: 0;
  }

  .biblioteca.view-grid .item-card.faixa .faixa-act-btn .bi {
    font-size: 0.92rem;
    line-height: 1;
  }

  .biblioteca.view-grid .item-card.faixa .faixa-more {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .biblioteca.view-grid .item-card.faixa .faixa-more .more-btn {
    width: 100%;
    min-width: 0;
    padding: 5px 0;
  }

  .biblioteca.view-grid .faixa-menu-mobile-only {
    display: none !important;
  }

  .biblioteca.view-list .item-card.faixa .faixa-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
  }

  .biblioteca.view-list .item-card.faixa .faixa-act-label {
    display: none;
  }

  .biblioteca.view-list .item-card.faixa .faixa-act-mobile-only {
    display: inline-flex;
  }

  .biblioteca.view-list .item-card.faixa .faixa-act-btn {
    width: auto;
    min-width: 34px;
    padding: 6px;
    font-size: 0;
  }

  .biblioteca.view-list .item-card.faixa .faixa-act-btn .bi {
    font-size: 1rem;
    line-height: 1;
  }

  .biblioteca.view-list .faixa-menu-mobile-only {
    display: none !important;
  }

  .biblioteca.view-list .faixa-menu [data-act='pl-add'],
  .biblioteca.view-list .faixa-menu [data-act='pl-remove'] {
    display: none !important;
  }

  .faixa-menu {
    min-width: min(200px, 70vw);
  }
}

@media (max-width: 600px) {
  .biblioteca.view-grid .item-card.pasta {
    padding: 8px 6px;
    gap: 4px;
  }

  .biblioteca.view-grid .item-card.pasta .item-icon .bi,
  .biblioteca.view-grid .item-card.pasta .pasta-icon-wrap .bi {
    font-size: clamp(3.5rem, 64cqi, 5.5rem);
  }

  .biblioteca.view-grid .item-card.faixa {
    padding: 6px 4px;
    gap: 4px;
  }

  .biblioteca.view-grid .item-card.faixa .item-main {
    gap: 4px;
  }

  .biblioteca.view-grid .item-card.faixa .item-name,
  .biblioteca.view-grid .item-card.pasta .item-name,
  .biblioteca.view-grid .item-card.playlist .item-name,
  .biblioteca.view-grid .item-card.playlist-new .item-name {
    font-size: 0.68rem;
    min-height: 2.4em;
    line-height: 1.25;
  }

  .biblioteca.view-grid .item-card.faixa .item-sub {
    font-size: 0.6rem;
  }

  .biblioteca.view-grid .item-card.faixa .item-cover .cover-fav {
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    min-width: 22px;
  }

  .biblioteca.view-grid .item-card.faixa .item-cover .cover-fav .bi {
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .np-top-actions .np-queue-btn {
    padding: 6px 8px;
  }

  #btn-np-viz,
  #btn-queue {
    font-size: 0;
    gap: 0;
    min-width: 40px;
    justify-content: center;
  }

  #btn-np-viz .bi,
  #btn-queue .bi {
    font-size: 1.05rem;
  }

  .transport {
    gap: 6px;
  }

  .transport .folder-skip-btn {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }

  .transport .skip-btn,
  .transport .icon-btn {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .transport .play-btn {
    width: 58px;
    height: 58px;
    font-size: 1.65rem;
  }

}


.folder-dl-card {
  width: min(400px, 100%);
}

.folder-dl-progress {
  margin: 4px 0 8px;
}

.folder-dl-bar {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 70%, transparent);
  overflow: hidden;
}

.folder-dl-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3fb950, #2ea043);
  transition: width 0.2s ease;
}

.folder-dl-count {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* Cabeçalho da pasta */
.folder-header {
  margin: 4px 0 16px;
}

.folder-header[hidden] {
  display: none !important;
}

.folder-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.folder-hero-cover {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2, #1a2438);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.folder-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.folder-hero-cover img.is-broken {
  display: none;
}

.folder-hero-cover img.is-broken+.folder-hero-fallback {
  display: grid;
}

.folder-hero-cover .folder-hero-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: transparent;
}

.folder-hero-cover .folder-hero-fallback .bi {
  font-size: 2.6rem;
  color: #4da3ff;
  filter: drop-shadow(0 2px 6px rgba(77, 163, 255, 0.35));
}

.folder-hero-meta {
  min-width: 0;
  flex: 1;
}

.folder-hero-title {
  font-weight: 800;
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  line-height: 1.2;
  color: var(--text);
  word-break: break-word;
}

.folder-hero-stats {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.folder-hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.folder-hero-stat .bi {
  font-size: 0.95rem;
  opacity: 0.9;
}

@media (max-width: 600px) {
  .folder-hero-cover {
    width: 72px;
    height: 72px;
    border-radius: 12px;
  }

  .folder-hero {
    gap: 12px;
  }

  .folder-hero-stats {
    font-size: 0.8rem;
    gap: 8px 12px;
  }
}

/* Playlists */
.playlist-header {
  margin-bottom: 12px;
}

.playlist-header[hidden] {
  display: none !important;
}

.playlist-toolbar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-2) 92%, var(--accent));
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.playlist-toolbar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.playlist-toolbar-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1 22%, #8b5cf6 100%);
  color: #fff;
  font-size: 1.25rem;
}

.playlist-toolbar-meta {
  min-width: 0;
  flex: 1;
}

.playlist-toolbar-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  word-break: break-word;
}

.playlist-toolbar-count {
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.playlist-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.playlist-btn-play {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(31, 111, 235, 0.35);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.playlist-btn-play .bi {
  font-size: 1.1rem;
}

.playlist-btn-play:hover {
  filter: brightness(1.08);
}

.playlist-btn-play:active {
  transform: scale(0.97);
}

.playlist-more {
  position: relative;
}

.playlist-more-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.playlist-more-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--surface-2) 80%, var(--accent));
}

.playlist-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  min-width: 168px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.playlist-menu[hidden] {
  display: none !important;
}

.playlist-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  white-space: nowrap;
}

.playlist-menu button:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.playlist-menu-danger:hover {
  color: #ef4444;
  background: color-mix(in srgb, #ef4444 12%, transparent);
}

.biblioteca .empty-msg.search-hint,
.biblioteca .empty-msg,
.biblioteca .lib-empty-state {
  grid-column: 1 / -1;
}

@media (max-width: 519px) {
  .playlist-btn-play-label {
    display: none;
  }
}

.item-card.playlist-new {
  border-style: dashed;
  color: var(--text-muted);
  justify-content: center;
  min-height: 120px;
}

.item-card.playlist-new:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.item-card.playlist .item-icon {
  background: linear-gradient(135deg, #6366f1 22%, #8b5cf6 100%);
  color: #fff;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Modais do app — seguem tema claro/escuro */
.modal.app-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: var(--modal-overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal.app-modal[hidden] {
  display: none !important;
}

.modal.app-modal .app-modal-card {
  background: var(--modal-bg);
  color: var(--text);
  border: 1px solid var(--modal-border);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  width: min(100%, 460px);
  max-height: min(88vh, 740px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: auto;
}

.modal.app-modal .app-modal-card.modal-perfil-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.modal.app-modal .app-modal-head {
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--modal-border);
  background: var(--modal-bg);
  flex-shrink: 0;
}

.modal.app-modal .app-modal-head h3 {
  margin: 0 0 4px;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.modal.app-modal .app-modal-head .app-modal-sub {
  margin: 0;
}

.modal.app-modal .app-modal-body {
  padding: 20px 22px 16px;
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
}

.modal.app-modal .app-modal-body::-webkit-scrollbar,
.modal.app-modal .app-modal-card::-webkit-scrollbar {
  width: 6px;
}

.modal.app-modal .app-modal-body::-webkit-scrollbar-track,
.modal.app-modal .app-modal-card::-webkit-scrollbar-track {
  background: transparent;
}

.modal.app-modal .app-modal-body::-webkit-scrollbar-thumb,
.modal.app-modal .app-modal-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
}

.modal.app-modal .app-modal-body::-webkit-scrollbar-thumb:hover,
.modal.app-modal .app-modal-card::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.modal.app-modal .app-modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 0;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--modal-border);
  background: var(--modal-bg);
  flex-shrink: 0;
}

.modal.app-modal .app-modal-card h3 {
  margin: 0 0 4px;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.app-modal-sub {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.app-modal-empty {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.app-field {
  display: block;
  margin-bottom: 16px;
}

.app-field>span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.app-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 0 14px;
  background: var(--input-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.app-input-wrap:focus-within {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--input-border));
  box-shadow: 0 0 0 3px var(--input-focus-ring);
  background: color-mix(in srgb, var(--input-bg) 88%, var(--accent));
}

.app-input-wrap .bi {
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
}

.app-input-wrap:focus-within .bi {
  color: var(--accent);
}

.app-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 13px 0;
  color: var(--text);
  font-size: 1rem;
}

.app-input-wrap input::placeholder {
  color: color-mix(in srgb, var(--text-muted) 72%, transparent);
}

.app-input-wrap input[type="password"]::-ms-reveal,
.app-input-wrap input[type="password"]::-ms-clear,
.app-input-wrap input::-webkit-credentials-auto-fill-button,
.app-input-wrap input::-webkit-strong-password-auto-fill-button {
  display: none;
}

.app-input-wrap .toggle-pass {
  margin-right: -6px;
  color: var(--text-muted);
}

.app-input-wrap .toggle-pass:hover,
.app-input-wrap .toggle-pass[aria-pressed="true"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.modal.app-modal .app-modal-btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.modal.app-modal .app-modal-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--accent);
}

.playlist-pick-card {
  width: min(440px, 100%);
}

.playlist-pick-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  max-height: min(50vh, 320px);
  overflow: auto;
}

.playlist-pick-list li+li {
  margin-top: 6px;
}

.playlist-pick-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.playlist-pick-list button:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--surface-2) 80%, var(--accent));
}

.playlist-pick-list .pick-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Reordenar faixas na playlist */
.biblioteca.playlist-detail .item-card.faixa.playlist-faixa.is-dragging {
  opacity: 0.45;
}

.biblioteca.playlist-detail .item-card.faixa.playlist-faixa.is-drag-over {
  outline: 1px dashed color-mix(in srgb, #1f6feb 60%, var(--border));
}

.playlist-reorder-col {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.playlist-drag-handle {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  cursor: grab;
  padding: 4px 2px;
  font-size: 1.05rem;
  line-height: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: element;
}

.playlist-drag-handle:active {
  cursor: grabbing;
}

.playlist-reorder-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.playlist-reorder-actions button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  width: 24px;
  height: 18px;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
}

.playlist-reorder-actions button:hover:not(:disabled) {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.playlist-reorder-actions button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Playlist + modo lista */
.biblioteca.view-list.playlist-detail .item-card.faixa.playlist-faixa {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'reorder main actions';
  align-items: center;
  gap: 8px 10px;
  padding: 8px 10px;
  cursor: default;
}

.biblioteca.view-list.playlist-detail .item-card.faixa.playlist-faixa:hover {
  transform: none;
}

.biblioteca.view-list.playlist-detail .playlist-reorder-col {
  grid-area: reorder;
}

.biblioteca.view-list.playlist-detail .item-card.faixa .item-main {
  grid-area: main;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.biblioteca.view-list.playlist-detail .item-card.faixa .item-body {
  min-width: 0;
  flex: 1;
}

.biblioteca.view-list.playlist-detail .item-card.faixa .item-name,
.biblioteca.view-list.playlist-detail .item-card.faixa .item-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biblioteca.view-list.playlist-detail .item-card.faixa .faixa-actions {
  grid-area: actions;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  flex-shrink: 0;
}

/* Playlist + modo card: só arrastar, sem botões de ordem */
.biblioteca.view-grid.playlist-detail .item-card.faixa.playlist-faixa {
  cursor: grab;
}

.biblioteca.view-grid.playlist-detail .item-card.faixa.playlist-faixa:active {
  cursor: grabbing;
}

@media (max-width: 640px) {
  .faixa-menu-mobile-only.is-done {
    opacity: 0.55;
  }

  .biblioteca.view-list.playlist-detail .item-card.faixa.playlist-faixa {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: 'reorder main actions';
    gap: 6px 8px;
    padding: 8px;
  }

  .biblioteca.view-list.playlist-detail .item-card.faixa .faixa-actions {
    justify-content: flex-end;
    padding-top: 0;
    border-top: none;
  }
}

@media (max-width: 400px) {
  .biblioteca.view-list.playlist-detail .playlist-reorder-actions {
    display: none;
  }

  .biblioteca.view-list.playlist-detail .playlist-reorder-col {
    flex-direction: column;
  }
}

/* SweetAlert2 — tema Zaltplay */
.swal2-container {
  font-family: var(--font);
}

.zalt-swal {
  background: var(--modal-bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--modal-border) !important;
  border-radius: 18px !important;
  padding: 22px 20px 18px !important;
  box-shadow: var(--shadow) !important;
}

.zalt-swal-title {
  color: var(--text) !important;
  font-size: 1.12rem !important;
  font-weight: 700 !important;
}

.zalt-swal-text {
  color: var(--text-muted) !important;
  font-size: 0.92rem !important;
}

.zalt-swal-actions {
  gap: 8px !important;
  margin-top: 18px !important;
  width: 100%;
}

.zalt-swal-btn {
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font: inherit !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  margin: 0 !important;
}

.zalt-swal-btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
  border: 0 !important;
}

.zalt-swal-btn-danger {
  background: #ef4444 !important;
  color: #fff !important;
  border: 0 !important;
}

.zalt-swal-btn-ghost {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

.zalt-swal-icon.swal2-warning {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

[data-theme="dark"] .zalt-swal-icon.swal2-warning {
  border-color: rgba(245, 158, 11, 0.55) !important;
  color: #fbbf24 !important;
}

/* ========== MODAL TABS & CONTENT ========== */
.modal-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--modal-border);
  margin-bottom: 0;
  padding: 0 1.5rem;
}

.modal-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.8rem 0.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.modal-tab:hover {
  color: var(--text);
}

.modal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ========== CHECKOUT & PAGAMENTOS ========== */
.checkout-summary-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.checkout-plan-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-bottom-left-radius: 8px;
  text-transform: uppercase;
}

.checkout-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.checkout-methods-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.15);
  padding: 4px;
  border-radius: 10px;
}

.chk-tab-btn {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 9px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.chk-tab-btn:hover {
  color: var(--text);
}

.chk-tab-btn.active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chk-method-view {
  display: none;
}

.chk-method-view.active {
  display: block;
  animation: chkFadeIn 0.25s ease-out;
}

@keyframes chkFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chk-waiting-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(31, 111, 235, 0.08);
  border: 1px solid rgba(31, 111, 235, 0.2);
  border-radius: 10px;
  text-align: left;
  margin-top: 14px;
}

.chk-spinner-pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(31, 111, 235, 0.7);
  animation: chkPulse 1.6s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes chkPulse {
  to {
    box-shadow: 0 0 0 12px rgba(31, 111, 235, 0);
  }
}



/* ==========================================================================
   MINHA ASSINATURA & HISTÓRICO DE PAGAMENTOS (LAYOUT MODERNO & PREMIUM)
   ========================================================================== */
.view-assinatura {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  overflow-y: auto;
  padding: 2rem;
}

.assinatura-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.assinatura-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  display: flex;
  align-items: center;
}

.assinatura-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

/* HERO CARD */
.assinatura-hero-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  backdrop-filter: blur(10px);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-plan-badge .plan-chip {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 6px;
}

.hero-plan-badge h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 6px 14px;
  border-radius: 30px;
}

.status-pill .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

.status-pill strong {
  font-size: 0.88rem;
  color: #4ade80;
}

.hero-price-wrap {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-price-label {
  font-size: 0.9rem;
  color: #94a3b8;
  font-weight: 500;
}

.hero-price-val {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hero-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 16px;
}

.hero-detail-item .h-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.hero-detail-item .h-info {
  display: flex;
  flex-direction: column;
}

.hero-detail-item .h-info span {
  font-size: 0.78rem;
  color: #94a3b8;
}

.hero-detail-item .h-info strong {
  font-size: 1rem;
  color: #f8fafc;
  font-weight: 700;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.btn-hero-renovar {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}

.btn-hero-renovar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-hero-suporte {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-hero-suporte:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399 !important;
  transform: translateY(-2px);
}

.assinatura-footer-text {
  text-align: center;
  color: #64748b;
  font-size: 0.82rem;
  margin: 0;
}

/* TABELA HISTÓRICO CARD */
.assinatura-table-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.table-card-header {
  margin-bottom: 1.25rem;
}

.table-card-header h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-card-header p.sub {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}

.table-responsive {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.5);
}

.historico-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.historico-table th {
  padding: 12px 16px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.historico-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  vertical-align: middle;
}

.historico-table tbody tr {
  transition: background 0.15s ease;
}

.historico-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.historico-table tbody tr:last-child td {
  border-bottom: none;
}

.hist-loading,
.hist-empty {
  text-align: center;
  padding: 2.5rem 0 !important;
  color: #64748b;
  font-size: 0.9rem;
}

.chip-forma {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.hist-st-chip {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hist-st-chip.is-pago {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.15);
}

.hist-st-chip.is-pendente {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.hist-st-chip.is-cancelado {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-comp-cli {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.25) 100%);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
  transition: all 0.2s ease;
}

.btn-comp-cli:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35) 0%, rgba(5, 150, 105, 0.4) 100%);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}



.assinatura-card h3 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
  text-transform: capitalize;
}

.assinatura-subtitle {
  color: var(--text-muted);
  margin: 0 0 2rem 0;
  font-size: 1rem;
}

.assinatura-details {
  background: rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 1rem;
}

.detail-row strong {
  font-size: 1.1rem;
}

.assinatura-footer-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.btn-suporte-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #10b981;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  width: 100%;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-suporte-wa:hover {
  background: #059669;
  color: #fff !important;
  transform: translateY(-1px);
}

.btn-suporte-wa i {
  font-size: 1.2rem;
}

@media (max-width: 520px) {
  .view-assinatura {
    padding: 1rem 0.75rem 5rem 0.75rem;
  }

  .assinatura-header {
    margin-bottom: 1.25rem;
  }

  .assinatura-card {
    padding: 1.25rem 1rem;
  }

  .assinatura-card h3 {
    font-size: 1.6rem;
  }

  .assinatura-details {
    padding: 1rem;
    gap: 1rem;
  }
}

/* --- Banner de Teste Grátis --- */
.trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(227, 179, 65, 0.12) 0%, rgba(227, 179, 65, 0.04) 100%);
  border-bottom: 1px solid rgba(227, 179, 65, 0.2);
  padding: 0.75rem 1.5rem;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.trial-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fef08a;
  font-size: 0.92rem;
}

.trial-banner-content i {
  font-size: 1.15rem;
  color: #e3b341;
}

.trial-banner .btn-primary-sm {
  background: #e3b341;
  color: #0b1220;
  border: none;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.trial-banner .btn-primary-sm:hover {
  background: #f1c453;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .trial-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    text-align: center;
  }

  .trial-banner-content {
    justify-content: center;
  }

  .trial-banner .btn-primary-sm {
    width: 100%;
  }
}