* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #1a1a1a;
  background: #f5f4f0;
}

/* ── Header ─────────────────────────────────────────────────── */

.pageHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8e0d8;
  background: linear-gradient(to bottom, #fffaf5, #ffffff);
}

.pageTitle h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #c76b2f;
}

.pageTitle p {
  margin: 4px 0 0;
  font-size: 13px;
}

.muted {
  color: #6b7280;
}


/* ── Nav dropdown ────────────────────────────────────────────── */

.pageNav {
  position: relative;
  flex-shrink: 0;
}

.navDropdown {
  position: relative;
}

.navBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid #e5e5e3;
  background: #ffffff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.navBtn:hover {
  border-color: #c76b2f;
  color: #7c3d12;
  box-shadow: 0 2px 8px rgba(199, 107, 47, 0.1);
}

.navChevron {
  font-size: 11px;
  opacity: 0.7;
  transition: transform 0.18s;
}

.navDropdown.open .navChevron {
  transform: rotate(180deg);
}

.navMenu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid #e5e5e3;
  border-radius: 11px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
  min-width: 170px;
  overflow: hidden;
  z-index: 200;
}

.navDropdown.open .navMenu {
  display: block;
}

.navItem {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}

.navItem:hover {
  background: #fef6ee;
  color: #c76b2f;
}

.navItemActive {
  font-weight: 700;
  color: #c76b2f;
  background: rgba(199, 107, 47, 0.06);
}

/* ── Title link (h1 → home) ──────────────────────────────────── */

.titleLink {
  color: inherit;
  text-decoration: none;
}

.titleLink:hover {
  color: #c76b2f;
  text-decoration: none;
}

/* ── Home page ───────────────────────────────────────────────── */

.homePage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
  padding: 40px 24px;
}

.homeSubtitle {
  margin: 0 0 36px;
  font-size: 15px;
  color: #9ca3af;
  font-weight: 500;
}

.homeGrid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 520px;
}

.homeCard {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: #ffffff;
  border: 1px solid #e5e5e3;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.homeCard:hover {
  border-color: #c76b2f;
  box-shadow: 0 4px 20px rgba(199, 107, 47, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.homeCardIcon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  width: 44px;
  text-align: center;
}

.homeCardBody {
  flex: 1;
  min-width: 0;
}

.homeCardTitle {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 3px;
}

.homeCard:hover .homeCardTitle {
  color: #c76b2f;
}

.homeCardDesc {
  font-size: 13px;
  color: #9ca3af;
}

.homeCardArrow {
  font-size: 18px;
  color: #d1d5db;
  flex-shrink: 0;
  transition: color 0.18s, transform 0.18s;
}

.homeCard:hover .homeCardArrow {
  color: #c76b2f;
  transform: translateX(3px);
}

/* ── Placeholder pages ───────────────────────────────────────── */

.placeholderMain {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
}

.placeholderCard {
  text-align: center;
  padding: 48px 56px;
  background: #ffffff;
  border: 1px solid #e5e5e3;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.06);
}

.placeholderIcon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.placeholderCard h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}

.placeholderCard p {
  margin: 0;
  color: #9ca3af;
  font-size: 15px;
}

/* ── Layout ─────────────────────────────────────────────────── */

.layout {
  padding: 18px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
}

.controlsPanel,
.chartsPanel,
.tablePanel {
  background: #ffffff;
  border: 1px solid #e5e5e3;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.04);
}

.controlsPanel h2,
.chartsPanel h2,
.tablePanel h2 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #c76b2f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-left: 3px solid #c76b2f;
  padding-left: 8px;
  margin-left: -2px;
}

.sectionHeader {
  margin-top: 20px;
}

.controlRow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 14px;
}

/* ── Checklist ───────────────────────────────────────────────── */

.checkGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid #e5e5e3;
  border-radius: 10px;
  background: #fafaf9;
}

.checkItem {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  font-size: 13px;
  color: #374151;
  padding: 2px 0;
}

.checkItem input {
  width: 15px;
  height: 15px;
  padding: 0;
  accent-color: #c76b2f;
  cursor: pointer;
}

/* ── Set grouping dropdown ───────────────────────────────────── */

.dropdown {
  border: 1px solid #e5e5e3;
  border-radius: 10px;
  background: #ffffff;
}

.dropdown > summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
  font-size: 13px;
  border-radius: 10px;
  user-select: none;
}

.dropdown > summary::-webkit-details-marker {
  display: none;
}

.dropdownTitle {
  color: #374151;
}

.dropdownSummary {
  font-weight: 500;
  font-size: 12px;
  color: #9ca3af;
}

.dropdown[open] > summary {
  border-bottom: 1px solid #e5e5e3;
  border-radius: 10px 10px 0 0;
}

.dropdown .checkGrid {
  border: none;
  border-radius: 0 0 10px 10px;
  background: #ffffff;
  max-height: 260px;
  overflow-y: auto;
}

.checklistActions {
  display: flex;
  gap: 6px;
  padding: 4px 0 6px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 4px;
}

.checklistActionBtn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #e5e5e3;
  background: #fafaf9;
  color: #6b7280;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}

.checklistActionBtn:hover {
  border-color: #c76b2f;
  color: #7c3d12;
  background: rgba(199, 107, 47, 0.05);
  box-shadow: none;
}

/* ── Labels & inputs ─────────────────────────────────────────── */

label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

select,
input {
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid #e5e5e3;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

select:focus,
input:focus {
  outline: none;
  border-color: #c76b2f;
  box-shadow: 0 0 0 3px rgba(199, 107, 47, 0.12);
}

/* ── Stat boxes ──────────────────────────────────────────────── */

.statGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 10px;
}

.statBox {
  padding: 11px 12px;
  border-radius: 11px;
  background: linear-gradient(140deg, rgba(199, 107, 47, 0.07), rgba(147, 51, 234, 0.05));
  border: 1px solid rgba(199, 107, 47, 0.14);
}

.statLabel {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.statValue {
  font-size: 17px;
  font-weight: 800;
  margin-top: 5px;
  color: #c76b2f;
}

.note {
  font-size: 12px;
  line-height: 1.45;
}

/* ── Content area (tab wrapper, column 2) ────────────────────── */

.contentArea {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ── View tab bar ─────────────────────────────────────────────── */

.viewTabBar {
  display: flex;
  gap: 2px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
  width: fit-content;
}

.viewTabBtn {
  padding: 7px 22px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.viewTabBtn.active {
  background: #ffffff;
  color: #c76b2f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

.viewTabBtn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6);
  color: #374151;
  box-shadow: none;
}

/* ── Charts panel ────────────────────────────────────────────── */

.chartsPanel {
  /* no longer needs grid-column; it is a flex child of .contentArea */
}

.chartGrid {
  display: grid;
  grid-template-columns: repeat(2, 560px);
  justify-content: start;
  align-items: start;
  gap: 14px;
}

.chartCard {
  width: 560px;
  height: 360px;
  padding: 14px 14px 10px;
  border: 1px solid #e5e5e3;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.04);
  background: #ffffff;
}

.chartCard h3 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: #c76b2f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

canvas {
  display: block;
  width: 520px;
  height: 280px;
}

.timeBrush {
  cursor: crosshair;
}

.hidden {
  display: none !important;
}

/* ── Table panel ─────────────────────────────────────────────── */

.tablePanel {
  /* no longer needs grid-column; it is a flex child of .contentArea */
  width: fit-content;
  min-width: 0;
}

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

.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}

button {
  cursor: pointer;
  border: 1px solid #e5e5e3;
  background: #ffffff;
  border-radius: 8px;
  padding: 7px 14px;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}

button:hover {
  border-color: #c76b2f;
  color: #7c3d12;
  background: rgba(199, 107, 47, 0.05);
  box-shadow: 0 2px 8px rgba(199, 107, 47, 0.1);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.tableWrap {
  overflow: auto;
  border-radius: 11px;
  border: 1px solid #e5e5e3;
}

table {
  width: auto;
  border-collapse: collapse;
  min-width: 700px;
}

thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  padding: 11px 13px;
  background: #fafaf9;
  color: #9ca3af;
  border-bottom: 1px solid #e5e5e3;
  position: sticky;
  top: 0;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.thBtn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  transition: color 0.12s;
}

.thBtn:hover {
  color: #c76b2f;
}

.sortIndicator {
  display: inline-block;
  min-width: 12px;
  color: #c76b2f;
  font-weight: 900;
}

/* ── Date range ──────────────────────────────────────────────── */

.dateRange {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dateRangeSep {
  font-weight: 600;
  color: #d1d5db;
}

/* ── Table body ──────────────────────────────────────────────── */

tbody tr {
  transition: background 0.1s;
}

tbody tr:hover {
  background: #fef6ee;
}

tbody td {
  padding: 11px 13px;
  border-top: 1px solid #f3f4f6;
  font-size: 13px;
  vertical-align: top;
  color: #374151;
}

.colSets   { min-width: 180px; }
.colNum    { min-width: 80px; text-align: right; }
.colCard   { min-width: 220px; }
.colPrice  { min-width: 90px; text-align: right; }
.colDate   { min-width: 120px; }
.colOwned  { min-width: 70px; text-align: center; }

/* Unowned (not acquired) rows are visually muted */
tr.unownedRow td {
  color: #b0b7c3;
}

tr.unownedRow:hover {
  background: #f7f7f6;
}

/* ── Ownership segmented filter ──────────────────────────────── */

.radioGroup {
  display: flex;
  border: 1px solid #e5e5e3;
  border-radius: 9px;
  overflow: hidden;
  background: #ffffff;
}

.radioBtn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: background 0.12s, color 0.12s;
  user-select: none;
  border-right: 1px solid #e5e5e3;
}

.radioBtn:last-child {
  border-right: none;
}

.radioBtn input[type="radio"] {
  display: none;
}

.radioBtn.active {
  background: #c76b2f;
  color: #ffffff;
}

.radioBtn:not(.active):hover {
  background: rgba(199, 107, 47, 0.07);
  color: #7c3d12;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .chartsPanel {
    grid-column: auto;
  }
  .chartCard {
    width: 640px;
  }
  table {
    min-width: 760px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MUSIC PAGE
   ═══════════════════════════════════════════════════════════════ */

.musicMain {
  padding: 20px;
}

.musicTopBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.musicStats {
  font-size: 14px;
  color: #6b7280;
}

.musicStatVal {
  font-weight: 700;
  color: #1a1a1a;
  font-size: 16px;
}

.addAlbumBtn {
  padding: 9px 18px;
  background: #c76b2f;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.addAlbumBtn:hover {
  background: #a85a24;
  box-shadow: 0 4px 16px rgba(199, 107, 47, 0.3);
}

/* ── Music layout ────────────────────────────────────────────── */

.musicLayout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: start;
}

/* ── Filter sidebar ──────────────────────────────────────────── */

.musicFilters {
  background: #ffffff;
  border: 1px solid #e5e5e3;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 20px;
}

.filterSection {
  margin-bottom: 16px;
}

.filterLabel {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.scoreRangeRow {
  display: flex;
  align-items: center;
  gap: 7px;
}

.scoreRangeRow input {
  width: 64px;
  padding: 7px 8px;
  font-size: 13px;
}

.rangeSep {
  color: #d1d5db;
  font-weight: 600;
}

.filterTagList {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filterTagChip {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #e5e5e3;
  background: #fafaf9;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}

.filterTagChip:hover {
  border-color: #c76b2f;
  color: #7c3d12;
  background: rgba(199, 107, 47, 0.05);
  box-shadow: none;
}

.filterTagChip.active {
  background: rgba(199, 107, 47, 0.1);
  border-color: #c76b2f;
  color: #7c3d12;
  font-weight: 600;
}

.clearFiltersBtn {
  width: 100%;
  padding: 7px;
  font-size: 12px;
  color: #9ca3af;
  background: none;
  border: 1px solid #e5e5e3;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}

.clearFiltersBtn:hover {
  color: #c76b2f;
  border-color: #c76b2f;
  background: none;
  box-shadow: none;
}

/* ── Album grid ──────────────────────────────────────────────── */

.albumGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 16px;
}

.albumGridEmpty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
  font-size: 15px;
}

/* ── Album card ──────────────────────────────────────────────── */

.albumCard {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e5e3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.18s, transform 0.18s;
}

.albumCard:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.albumCoverWrap {
  position: relative;
  aspect-ratio: 1;
  background: #f3f4f6;
  overflow: hidden;
}

.albumCoverWrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.18s;
}

.albumCard:hover .albumCoverWrap img {
  filter: brightness(0.82);
}

.albumCoverPlaceholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  color: #d1d5db;
}

.albumOverlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s;
}

.albumCard:hover .albumOverlay {
  opacity: 1;
}

.albumEditBtn {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.albumEditBtn:hover {
  background: #ffffff;
  color: #c76b2f;
  box-shadow: none;
  border-color: transparent;
}

.albumScoreBadge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.albumInfo {
  padding: 10px 12px 12px;
}

.albumName {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.albumArtist {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.albumTagList {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.albumTag {
  padding: 2px 7px;
  background: rgba(199, 107, 47, 0.08);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  color: #92400e;
}

.albumAdded {
  font-size: 10px;
  color: #b0b7c3;
  margin-top: 4px;
  letter-spacing: 0.1px;
}

/* ── Modal overlay ───────────────────────────────────────────── */

.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.modalBox {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #f3f4f6;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
  border-radius: 16px 16px 0 0;
}

.modalHeading {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.modalCloseBtn {
  padding: 4px 9px;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.12s, background 0.12s;
}

.modalCloseBtn:hover {
  background: #f3f4f6;
  color: #374151;
  box-shadow: none;
}

.modalBody {
  padding: 18px 22px;
  flex: 1;
}

.modalSection {
  margin-bottom: 18px;
}

.modalLabel {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.modalSearchInput {
  width: 100%;
}

/* Search results dropdown */
.searchResults {
  margin-top: 6px;
  border: 1px solid #e5e5e3;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
}

.searchResult {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid #f3f4f6;
}

.searchResult:last-child { border-bottom: none; }

.searchResult:hover { background: #fef6ee; }

.searchResultThumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f4f6;
}

.searchResultInfo {
  flex: 1;
  min-width: 0;
}

.searchResultAlbum {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchResultArtist {
  font-size: 12px;
  color: #6b7280;
}

.searchResultYear {
  font-size: 11px;
  color: #9ca3af;
  flex-shrink: 0;
}

.searchSpinner {
  padding: 14px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

/* Cover preview + fields row */
.modalPreview {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.previewCover {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 9px;
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid #e5e5e3;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.previewFields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.fieldGroup input {
  padding: 7px 10px;
  font-size: 13px;
}

/* Score label row (label + unrated toggle) */
.scoreLabelRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.scoreLabelRow .modalLabel {
  margin-bottom: 0;
}

.unratedLabel {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

.unratedLabel input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
  accent-color: #c76b2f;
}

/* Score row */
.scoreRow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scoreRow input[type="range"] {
  flex: 1;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  accent-color: #c76b2f;
  cursor: pointer;
}

.scoreRow input[type="range"]:focus {
  box-shadow: none;
}

.scoreNumberInput {
  width: 70px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
}

.scoreUnit {
  color: #9ca3af;
  font-size: 14px;
  white-space: nowrap;
}

/* Tag input */
.tagInput {
  border: 1px solid #e5e5e3;
  border-radius: 9px;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  background: #ffffff;
  min-height: 42px;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tagInput:focus-within {
  border-color: #c76b2f;
  box-shadow: 0 0 0 3px rgba(199, 107, 47, 0.12);
}

.tagInputChip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(199, 107, 47, 0.1);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #7c3d12;
}

.tagRemoveBtn {
  background: none;
  border: none;
  color: #92400e;
  font-size: 12px;
  cursor: pointer;
  padding: 0 0 0 2px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.tagRemoveBtn:hover {
  color: #7c3d12;
  box-shadow: none;
}

#tagInputField {
  border: none;
  outline: none;
  background: none;
  padding: 2px 4px;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  min-width: 120px;
  flex: 1;
  box-shadow: none;
}

#tagInputField:focus {
  box-shadow: none;
  border: none;
}

/* Modal footer */
.modalFooter {
  padding: 14px 22px 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid #f3f4f6;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-radius: 0 0 16px 16px;
  z-index: 1;
}

.deleteAlbumBtn {
  margin-right: auto;
  background: none;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.deleteAlbumBtn:hover {
  background: rgba(220, 38, 38, 0.06);
  border-color: #ef4444;
  color: #dc2626;
  box-shadow: none;
}

.modalCancelBtn {
  background: none;
  border: 1px solid #e5e5e3;
  color: #6b7280;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}

.modalCancelBtn:hover {
  border-color: #9ca3af;
  color: #374151;
  background: #f9fafb;
  box-shadow: none;
}

.saveAlbumBtn {
  background: #c76b2f;
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.saveAlbumBtn:hover {
  background: #a85a24;
  box-shadow: 0 4px 12px rgba(199, 107, 47, 0.28);
  border-color: transparent;
}

.saveAlbumBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 900px) {
  .musicLayout {
    grid-template-columns: 1fr;
  }
  .musicFilters {
    position: static;
  }
}
