.mybooks-title {
  margin: 10px 0;
  padding: 16px;
}

.mybooks-title h1 {
  margin: 0 0 0 16px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.mybooks-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.profile-area {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2px 16px 4px;
  color: var(--text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.picon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.picon-blue {
  background: #eaf1ff;
}

.picon-yellow {
  background: #fff2d6;
}

.picon-green {
  background: #e7fbf1;
}

.stat-number {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.tabs {
  display: flex;
  gap: 10px;
  padding: 14px 14px 0;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 75%, var(--bg) 25%);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab.active {
  background: var(--card);
}

.content {
  padding: 18px 14px 14px;
}

.list {
  display: grid;
  gap: 12px;
}

.book-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

.cover {
  width: 64px;
  height: 88px;
  border-radius: 10px;
  object-fit: cover;
  background: color-mix(in srgb, var(--card) 70%, var(--bg) 30%);
  border: 1px solid var(--border);
}

.book-title {
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text);
}

.book-meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 8px;
}

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

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 80%, var(--bg) 20%);
  color: var(--text);
}

.badge.overdue {
  background: #fff2f2;
  border-color: #ffd6d6;
  color: #a40000;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.small-btn {
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 800;
  width: 100%;
  text-align: center;
}

.btn-return {
  background: var(--blue2);
  color: #fff;
  box-shadow: 0 10px 22px rgba(228, 106, 16, 0.35);
}

.btn-return:hover {
  filter: brightness(0.95);
}

.btn-return:active {
  transform: translateY(1px);
}

.btn-details {
  background: color-mix(in srgb, var(--card) 75%, var(--bg) 25%);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-details:hover {
  filter: brightness(0.98);
}

.empty {
  text-align: center;
  padding: 46px 18px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--card);
}

.empty-icon {
  font-size: 34px;
  opacity: 0.7;
  margin-bottom: 10px;
}

.empty h3 {
  margin: 8px 0 6px;
  font-size: 20px;
  color: var(--text);
}

.empty p {
  margin: 0 0 16px;
  color: var(--muted);
}

.btn {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  padding: 12px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.hidden {
  display: none;
}

.profile-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  max-width: 1100px;
  margin: 0 auto 24px;
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f6a000, #e07b00);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}

.user-info h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
}

.user-info p {
  margin: 4px 0 6px;
  color: var(--muted);
  font-size: 14px;
}

.joined {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.edit-btn {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.edit-btn:hover {
  background: color-mix(in srgb, var(--card) 75%, var(--bg) 25%);
}

@media (max-width: 1024px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card {
    padding: 18px 18px;
    border-radius: 22px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .book-card {
    grid-template-columns: 64px 1fr;
  }

  .actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }

  .actions .small-btn {
    width: auto;
  }

  .profile-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .mybooks-title h1 {
    font-size: 30px;
    margin-left: 0;
  }

  .profile-area {
    padding: 2px 14px 4px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .profile-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    font-size: 28px;
  }

  .user-info h2 {
    font-size: 22px;
  }

  .book-card {
    grid-template-columns: 56px 1fr;
    gap: 10px;
  }

  .cover {
    width: 56px;
    height: 78px;
  }

  .book-meta {
    font-size: 13px;
  }

  .actions {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
  }

  .actions .small-btn {
    width: 100%;
  }
}