:root {
  --binder-bg: #0d0d20;
  --binder-bg-soft: #12122b;
  --binder-surface: #171733;
  --binder-surface-raised: #1d1d40;
  --binder-border: #302d5b;
  --binder-text: #f1efff;
  --binder-muted: #9b9ab6;
  --binder-purple: #a995f4;
  --binder-purple-strong: #7026df;
  --binder-purple-dark: #4e1c9e;
  --binder-green: #08b981;
  --binder-green-dark: #078262;
}

html,
body {
  min-height: 100%;
  background: var(--binder-bg);
}

body {
  color: var(--binder-text);
}

a {
  color: var(--binder-purple);
}

a:hover {
  color: #c4b8ff;
}

.navbar {
  background: #090917;
  border-bottom: 1px solid #171633;
  min-height: 3.1rem;
}

.navbar-item,
.navbar-link {
  color: var(--binder-muted);
}

.navbar-item:hover,
.navbar-link:hover {
  background: var(--binder-surface);
  color: var(--binder-purple);
}

.navbar-brand .navbar-item {
  color: var(--binder-purple);
}

.section {
  background:
    radial-gradient(circle at 75% 5%, #28214f44 0, transparent 32rem),
    var(--binder-bg);
}

.title,
.label,
strong,
dt {
  color: var(--binder-purple);
}

.subtitle,
.help,
.has-text-grey,
.has-text-grey-light {
  color: var(--binder-muted) !important;
}

.box,
.card,
.notification {
  background: var(--binder-surface);
  border: 1px solid var(--binder-border);
  color: var(--binder-text);
  box-shadow: 0 14px 30px #05050f66;
}

.card-tile {
  display: block;
  height: 100%;
  color: var(--binder-text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.card-tile:hover {
  border-color: var(--binder-purple-strong);
  box-shadow: 0 10px 24px #05050f99;
  transform: translateY(-3px);
}

.card-content {
  background: var(--binder-surface);
}

.input,
.textarea,
.select select {
  background: var(--binder-bg-soft);
  border-color: var(--binder-border);
  color: var(--binder-text);
}

.input::placeholder,
.textarea::placeholder {
  color: #777694;
}

.input:focus,
.textarea:focus,
.select select:focus {
  border-color: var(--binder-purple);
  box-shadow: 0 0 0 .125em #a995f433;
}

.button.is-primary {
  background: linear-gradient(90deg, #0bbd8a, var(--binder-green-dark));
  border-color: transparent;
  color: #f5fffb;
}

.button.is-primary:hover {
  background: linear-gradient(90deg, #12d29b, #099d78);
}

.button.is-link {
  background: linear-gradient(90deg, var(--binder-purple-strong), var(--binder-purple-dark));
  border-color: transparent;
  color: #fff;
}

.button.is-link:hover {
  background: linear-gradient(90deg, #8237f2, #6020ba);
}

.button.is-light {
  background: #27254c;
  border-color: var(--binder-border);
  color: var(--binder-purple);
}

.button.is-light:hover {
  background: #322e61;
}

.image-placeholder {
  display: grid;
  place-items: center;
  min-height: 180px;
  background: var(--binder-bg-soft);
  color: var(--binder-muted);
  padding: 1rem;
  text-align: center;
}

.card-detail-image {
  max-width: 380px;
  margin: auto;
}

.detail-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
}

@media (min-width: 700px) {
  .detail-list {
    grid-template-columns: minmax(10rem, 16rem) 1fr;
    gap: .55rem 1rem;
  }
}

.detail-list dd {
  color: #d2d0e6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.binder-card {
  border-left: 5px solid var(--binder-green);
}

.book {
  position: relative;
  max-width: 1080px;
  margin: 1rem auto;
  padding: 0 2.1rem;
  perspective: 1400px;
}

@media (min-width: 700px) {
  .book { margin: 2rem auto; padding: 0 3.5rem; }
}

.book-page {
  background: #14142d;
  border: 1px solid var(--binder-border);
  border-radius: .5rem;
  min-height: 320px;
  padding: .8rem;
  box-shadow: 0 18px 36px #05050f99;
  transform-origin: left center;
  animation: turn-in .4s ease;
}

@media (min-width: 700px) {
  .book-page { min-height: 480px; padding: 1.5rem; }
}

.book-page.is-hidden {
  display: none;
}

@keyframes turn-in {
  from { opacity: .2; transform: rotateY(-12deg); }
  to { opacity: 1; transform: rotateY(0); }
}

.book-nav {
  position: absolute;
  top: 48%;
  z-index: 2;
  border-radius: 50%;
  font-size: 1.4rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

@media (min-width: 700px) {
  .book-nav { font-size: 2rem; width: 2.8rem; height: 2.8rem; }
}

.book-nav.previous { left: 0; }
.book-nav.next { right: 0; }

/* Mobile first: poucas colunas em telas estreitas, crescendo com a largura. */
.card-grid {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 420px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: .7rem; }
}

@media (min-width: 700px) {
  .slots-6,
  .slots-9 { grid-template-columns: repeat(3, 1fr); }
  .slots-12 { grid-template-columns: repeat(4, 1fr); }
}

.slot {
  min-height: 105px;
  border: 2px dashed #46436e;
  border-radius: .35rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: .3rem;
  text-align: center;
}

@media (min-width: 700px) {
  .slot { min-height: 135px; }
}

.slot:hover {
  border-color: var(--binder-purple);
  background: #201e42;
}

.slot img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.slot-name {
  font-size: .75rem;
  margin: .2rem 0;
}

.slot small {
  color: var(--binder-muted);
}

.slot-editable {
  cursor: pointer;
  position: relative;
}

.slot-edit-hint {
  color: var(--binder-purple);
  display: block;
  font-size: .65rem;
  opacity: .8;
}

@media (hover: hover) and (pointer: fine) {
  .slot-edit-hint {
    display: none;
  }

  .slot-editable:hover .slot-edit-hint {
    display: block;
  }
}

.slot-card-link {
  color: inherit;
  width: 100%;
}

.slot-remove-button {
  position: absolute;
  top: .2rem;
  right: .2rem;
  z-index: 2;
  display: inline-flex;
  min-width: 1.6rem;
  min-height: 1.6rem;
}

@media (hover: hover) and (pointer: fine) {
  .slot-remove-button {
    display: none;
  }

  .slot-editable:hover .slot-remove-button {
    display: inline-flex;
  }
}

.modal-card {
  background: var(--binder-surface);
  border: 1px solid var(--binder-border);
}

.modal-card-head,
.modal-card-foot {
  background: var(--binder-surface-raised);
  border-color: var(--binder-border);
}

.modal-card-title {
  color: var(--binder-purple);
}

.slot-search-results {
  display: grid;
  gap: .5rem;
  grid-template-columns: 1fr;
  margin: 1rem 0;
  max-height: 260px;
  overflow-y: auto;
}

@media (min-width: 480px) {
  .slot-search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.slot-result {
  align-items: center;
  background: var(--binder-bg-soft);
  border: 1px solid var(--binder-border);
  border-radius: .35rem;
  color: var(--binder-text);
  cursor: pointer;
  display: flex;
  gap: .6rem;
  min-height: 2.6rem;
  padding: .6rem;
  text-align: left;
}

.slot-result:hover,
.slot-result.is-selected {
  border-color: var(--binder-purple);
  background: #27234d;
}

.slot-result img {
  height: 58px;
  object-fit: contain;
  width: 42px;
}

.pagination-link,
.pagination-previous,
.pagination-next {
  background: var(--binder-surface);
  border-color: var(--binder-border);
  color: var(--binder-purple);
  min-height: 2.5rem;
}

.pagination-link.is-current {
  background: var(--binder-purple-strong);
  border-color: var(--binder-purple-strong);
  color: #fff;
}

