:root {
  color-scheme: dark;
  --bg: #0c0b11;
  --panel: #18151f;
  --text: #f7f4ff;
  --muted: #ada5bb;
  --accent: #9b70ff;
  --line: #302a3b;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse 700px 450px at 80% -180px, #321c5e70, transparent),
    var(--bg);
  color: var(--text);
  font:
    15px/1.6 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
a {
  color: #c9afff;
  text-decoration: none;
}
a:hover {
  color: #fff;
}
.container {
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
}
.site-header {
  height: 78px;
  border-bottom: 1px solid #25212f;
  background: #0e0c13e6;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}
.logo {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1.8px;
  color: white;
}
.logo span {
  color: #b089ff;
}
.header-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}
.header-links form {
  margin: 0;
}
.text-link {
  border: 0;
  background: transparent;
  color: #ba9fff;
  font: inherit;
  cursor: pointer;
}
.text-link:hover {
  text-decoration: underline;
}
.site-footer {
  padding: 35px 0 45px;
  color: #7f748f;
  font-size: 12px;
  margin-top: 65px;
}
.eyebrow {
  color: #a98cff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.auth-layout {
  width: min(1040px, calc(100% - 40px));
  min-height: calc(100vh - 210px);
  margin: 55px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #30283c;
  border-radius: 26px;
  overflow: hidden;
  background: #15121c;
  box-shadow: 0 24px 100px #0005;
}
.auth-card {
  padding: clamp(26px, 5vw, 66px);
}
.auth-card h1,
.library-intro h1 {
  font-size: clamp(33px, 4vw, 50px);
  letter-spacing: -0.06em;
  line-height: 1.14;
  margin: 19px 0;
}
.auth-card p,
.library-intro p {
  max-width: 530px;
  color: #aca3bb;
  margin-bottom: 30px;
}
.auth-card form {
  display: grid;
  gap: 9px;
}
.auth-card label {
  font-weight: 600;
  font-size: 13px;
}
.auth-card input:not([type="checkbox"]),
.library-toolbar input {
  width: 100%;
  border: 1px solid #453951;
  border-radius: 12px;
  padding: 14px 15px;
  background: #241d30;
  color: white;
  font: inherit;
  outline: 0;
  margin-bottom: 12px;
}
.auth-card input:focus,
.library-toolbar input:focus {
  border-color: #ad86ff;
  box-shadow: 0 0 0 3px #9262f322;
}
.primary-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  padding: 15px;
  border-radius: 12px;
  background: linear-gradient(115deg, #8550eb, #623dc5);
  color: white;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  margin-top: 10px;
}
.primary-btn:hover {
  filter: brightness(1.13);
}
.as-link {
  display: flex;
}
.form-between {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 1px 0 6px;
  font-size: 12px;
}
.form-between a {
  white-space: nowrap;
}
.check {
  font-weight: 400 !important;
  color: #bdb2cd;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.check input {
  accent-color: #9f7aff;
}
.spaced {
  margin-top: 8px;
}
.auth-bottom {
  border-top: 1px solid #342d3e;
  margin-top: 28px;
  padding-top: 19px;
  color: #b4a9c2;
  font-size: 13px;
}
.alert {
  margin: 18px 0;
  border: 1px solid #70465a;
  border-radius: 10px;
  background: #351e2a;
  padding: 13px;
  color: #ffb4bb;
  font-size: 13px;
}
.auth-aside {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 70%, #6d3ad258, transparent 55%),
    linear-gradient(145deg, #211330, #0e0b1b);
  padding: 72px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-aside h2 {
  font-size: clamp(33px, 4vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.06em;
  max-width: 390px;
  z-index: 1;
}
.auth-aside p {
  color: #c0b3d6;
  max-width: 340px;
  z-index: 1;
}
.glow-circle {
  position: absolute;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  border: 2px solid #8f6ac92b;
  bottom: -210px;
  right: -180px;
  box-shadow:
    0 0 0 50px #6b36c918,
    0 0 0 100px #6b36c90f,
    0 0 100px #8f4fff30;
}
.library-main {
  padding-top: 60px;
}
.library-intro h1 {
  font-size: clamp(42px, 6vw, 66px);
  margin: 12px 0;
}
.library-intro h1 span {
  background: linear-gradient(90deg, #fff, #a581ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.library-toolbar {
  margin: 36px 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.library-toolbar input {
  max-width: 530px;
  margin: 0;
}
.library-toolbar span {
  font-size: 12px;
  color: #a59ab4;
  white-space: nowrap;
}
.shelf {
  margin: 42px 0 65px;
}
.shelf-title {
  margin-bottom: 24px;
}
.shelf-title h2 {
  font-size: 24px;
  letter-spacing: -0.04em;
  margin: 0;
}
.shelf-title p {
  color: #a99db7;
  margin: 4px 0;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 19px;
}
.book-card {
  min-width: 0;
}
.book-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 3/4;
  overflow: hidden;
  padding: 17px;
  border: 1px solid #ffffff15;
  border-radius: 13px;
  color: white;
  isolation: isolate;
  box-shadow: 0 16px 40px #0005;
  transition:
    transform 0.2s ease,
    border-color 0.2s;
}
.book-cover:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -15%;
  border-radius: 50%;
  background: radial-gradient(circle at 70% 58%, #ffffff38, transparent 50%);
  transform: rotate(-23deg);
}
.book-cover:after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 38% -25% -30% 20%;
  border: 2px solid #ffffff35;
  border-radius: 50%;
  transform: rotate(-28deg);
}
.book-cover:hover {
  transform: translateY(-5px);
  border-color: #b795ff77;
}
.cover-top {
  font-size: 8px;
  letter-spacing: 0.17em;
  color: #e5dfff;
}
.cover-center {
  font-size: clamp(18px, 1.8vw, 27px);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.12;
  max-width: 100%;
  overflow-wrap: break-word;
  text-shadow: 0 2px 15px #0009;
}
.cover-bottom {
  font-size: 10px;
  opacity: 0.85;
  max-width: 100%;
}
.theme-1 {
  background: linear-gradient(145deg, #192a4b, #475e97 60%, #11243c);
}
.theme-2 {
  background: linear-gradient(145deg, #1c1955, #8155b9 65%, #2a114a);
}
.theme-3 {
  background: linear-gradient(145deg, #134345, #208c85 65%, #0d282f);
}
.theme-4 {
  background: linear-gradient(145deg, #5e2533, #cf8558 65%, #6d252b);
}
.theme-5 {
  background: linear-gradient(145deg, #344048, #798593 65%, #1c2738);
}
.theme-6 {
  background: linear-gradient(145deg, #483155, #9573ab 65%, #291c39);
}
.owned-pill,
.locked-pill {
  position: absolute;
  right: 9px;
  top: 9px;
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.01em;
  background: #141421d9;
  color: #fff;
}
.locked-pill {
  background: #0b0a10d9;
}
.book-card h3 {
  font-size: 15px;
  margin: 15px 0 2px;
  line-height: 1.4;
}
.book-card p {
  font-size: 12px;
  color: #a8a0b1;
  margin: 0;
}
.card-link {
  display: inline-block;
  margin-top: 11px;
  font-size: 12px;
  font-weight: 700;
}
.locked .book-cover {
  filter: grayscale(0.75) brightness(0.53);
}
.locked .book-cover:hover {
  filter: grayscale(0.45) brightness(0.68);
}
.book-buy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
}
.book-buy strong {
  font-size: 13px;
}
.buy-wait {
  border-radius: 8px;
  padding: 5px 8px;
  background: #282034;
  color: #b8acc9;
  font-size: 10px;
  white-space: nowrap;
  cursor: not-allowed;
}
.empty-state {
  padding: 32px;
  border: 1px solid #3a3049;
  border-radius: 16px;
  background: #17121f;
  color: #b6a8c6;
}
.product-page h1 {
  font-size: clamp(32px, 4vw, 55px);
  letter-spacing: -0.05em;
}
.product-description {
  max-width: 700px;
  color: #bdb0cd;
}
.breadcrumb {
  display: inline-block;
  margin-bottom: 38px;
  font-size: 13px;
}
.material-list {
  display: grid;
  gap: 14px;
}
.material-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  background: #17131e;
  border: 1px solid #32283e;
  border-radius: 15px;
}
.material-icon {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border-radius: 12px;
  background: #33234c;
  color: #be9cff;
  font-size: 26px;
}
.material-item > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.material-item h3 {
  font-size: 16px;
  margin: 0;
}
.material-item p {
  color: #b5a9c5;
  font-size: 12px;
  margin: 3px 0;
}
.body-text {
  margin-top: 12px;
  color: #ddd6e8;
  font-size: 13px;
}
.small-btn {
  background: #7744de;
  color: white;
  border-radius: 9px;
  padding: 9px 12px;
  white-space: nowrap;
}
.unavailable {
  color: #9d91ad;
  font-size: 12px;
}
.purchase-list {
  display: grid;
  gap: 14px;
}
.purchase-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  background: #18141f;
  border: 1px solid #30293c;
  border-radius: 15px;
  padding: 24px;
}
.purchase-card h3 {
  font-size: 16px;
  margin: 0;
}
.purchase-card p,
.purchase-card small {
  font-size: 12px;
  color: #aaa0b8;
}
.purchase-card > div:last-child {
  text-align: right;
  min-width: 90px;
}
.purchase-card strong,
.purchase-card .status {
  display: block;
}
.status {
  color: #bea5e7;
  font-size: 12px;
}
.status-paid {
  color: #61d9ad;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1020px) {
  .book-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 790px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-aside {
    display: none;
  }
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .library-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .library-toolbar input {
    max-width: 100%;
  }
}
@media (max-width: 550px) {
  .container {
    width: min(100% - 28px, 1180px);
  }
  .site-header {
    height: 68px;
  }
  .header-links {
    gap: 10px;
    font-size: 12px;
  }
  .header-links a {
    white-space: nowrap;
  }
  .auth-layout {
    width: calc(100% - 26px);
    margin: 26px auto;
  }
  .auth-card {
    padding: 26px 21px;
  }
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .cover-center {
    font-size: 20px;
  }
  .book-cover {
    padding: 12px;
  }
  .library-main {
    padding-top: 38px;
  }
  .shelf {
    margin-bottom: 45px;
  }
  .purchase-card {
    padding: 16px;
    flex-wrap: wrap;
  }
  .material-item {
    padding: 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
}

/* BoxBA v0.4.2 — layout estável do checkbox nos formulários de autenticação */
.auth-card form {
  grid-template-columns: minmax(0, 1fr);
}
.auth-card .check {
  display: inline-flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  width: 100%;
  line-height: 1.4;
  margin: 10px 0 2px;
  cursor: pointer;
}
.auth-card .check input[type="checkbox"] {
  display: block;
  position: static;
  appearance: auto;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  accent-color: #9b70ff;
  box-shadow: none;
}
.auth-card .check span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}
.auth-card .form-between {
  flex-wrap: wrap;
}
.auth-card .form-between .check {
  width: auto;
  margin: 0;
}
@media (max-width: 370px) {
  .auth-card .check span {
    white-space: normal;
  }
}

/* Ajuste pontual: tamanho original e rótulo em linha única. */
.auth-card .boxba-remember {
  display: inline-flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: auto;
  min-width: 0;
  white-space: nowrap;
  margin: 8px 0 4px;
}
.auth-card .boxba-remember input[type="checkbox"] {
  display: block;
  appearance: auto;
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  accent-color: #9b70ff;
}
.auth-card .boxba-remember span { white-space: nowrap; font-size: 13px; font-weight: 500; }
@media (max-width: 370px) { .auth-card .boxba-remember span { white-space: normal; } }

.auth-ok { margin: 18px 0; border: 1px solid #245943; border-radius: 10px; background: #103627; color: #91e8c4; padding: 13px; font-size: 13px; }
