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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #1a1a2e;
  color: #eee;
  margin: 0;
}

h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #a29bfe;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

/* ─── App shell ────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-content {
  flex: 1;
  padding: 32px 36px;
  background: #1a1a2e;
  color: #eee;
  overflow-y: auto;
}

/* ─── Sidebar ──────────────────────────────────────────── */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: #0d0d1f;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1a2a4a;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid #1a2a4a;
  margin-bottom: 8px;
}

.sidebar-brand-icon {
  font-size: 1.2rem;
}

.sidebar-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: #eee;
  letter-spacing: -0.02em;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.sidebar ul li a {
  display: block;
  padding: 10px 20px;
  color: #7a7a9a;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border-left: 3px solid transparent;
}

.sidebar ul li a:hover {
  background: rgba(162, 155, 254, 0.06);
  color: #ccc;
  border-left-color: rgba(162, 155, 254, 0.3);
}

.sidebar ul li.active a {
  background: rgba(162, 155, 254, 0.12);
  color: #a29bfe;
  border-left-color: #a29bfe;
}

.sidebar-divider {
  padding: 16px 20px 4px;
}

.sidebar-divider span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #333a5c;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid #1a2a4a;
}

.sidebar-footer a {
  color: #444;
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.sidebar-footer a:hover {
  color: #e17055;
}

/* ─── Buttons ──────────────────────────────────────────── */
.btn-primary {
  background: #a29bfe;
  color: #0d0d1f;
  padding: 7px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
  display: inline-block;
}

.btn-primary:hover {
  background: #b8b3ff;
  transform: translateY(-1px);
}

/* ─── Flash ────────────────────────────────────────────── */
.flash-notice {
  background: rgba(0, 184, 148, 0.08);
  border: 1px solid rgba(0, 184, 148, 0.25);
  color: #00b894;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ─── Admin index ──────────────────────────────────────── */
.admin-index {
  max-width: 1100px;
}

.admin-index-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-index-header h1 {
  margin-bottom: 0;
}

/* ─── Admin table ──────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table thead tr {
  border-bottom: 1px solid #1a2a4a;
}

.admin-table th {
  text-align: left;
  padding: 10px 16px;
  color: #3d4a6e;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(26, 42, 74, 0.6);
  color: #aaa;
  vertical-align: middle;
  transition: background 0.12s;
}

.admin-table tbody tr {
  border-left: 3px solid transparent;
  transition: border-color 0.15s;
}

.admin-table tbody tr:hover {
  border-left-color: #a29bfe;
}

.admin-table tbody tr:hover td {
  background: rgba(162, 155, 254, 0.04);
}

.admin-table .font-medium {
  color: #eee;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-table .muted {
  color: #3d4a6e;
  font-weight: 600;
  font-size: 0.82rem;
}

.admin-table .truncate {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table .actions {
  text-align: right;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
}

.admin-table tbody tr:hover .actions {
  opacity: 1;
}

.admin-table .actions a {
  color: #5a6a9a;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 14px;
  transition: color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table .actions a:hover {
  color: #a29bfe;
}

.admin-table .actions a.danger:hover {
  color: #e17055;
}

/* ─── Users table ──────────────────────────────────────── */
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.users-table th {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid #1a2a4a;
  color: #3d4a6e;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.users-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(26, 42, 74, 0.6);
  color: #aaa;
}

.users-table tbody tr:hover td {
  background: rgba(162, 155, 254, 0.04);
}

/* ─── Genre badges ─────────────────────────────────────── */
.badge {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: inline-block;
}

.badge-rock       { background: rgba(162, 155, 254, 0.15); color: #a29bfe; }
.badge-folk       { background: rgba(85, 239, 196, 0.12);  color: #55efc4; }
.badge-pop        { background: rgba(253, 121, 168, 0.15); color: #fd79a8; }
.badge-indie-pop  { background: rgba(253, 203, 110, 0.15); color: #fdcb6e; }
.badge-synth-pop  { background: rgba(116, 185, 255, 0.15); color: #74b9ff; }
.badge-folk-rock  { background: rgba(0, 206, 201, 0.12);   color: #00cec9; }
.badge-reggae     { background: rgba(85, 239, 196, 0.12);  color: #00b894; }
.badge-cumbia     { background: rgba(255, 165, 2, 0.15);   color: #ffa502; }
.badge-pop-rock   { background: rgba(253, 121, 168, 0.12); color: #e84393; }
.badge-hip-hop    { background: rgba(255, 234, 167, 0.15); color: #ffeaa7; }

/* ─── Prompt page ──────────────────────────────────────── */
.prompt-page {
  max-width: 760px;
}

.prompt-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.prompt-input {
  width: 100%;
  background: #0d0d1f;
  border: 1px solid #1a2a4a;
  border-radius: 8px;
  color: #eee;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.15s;
}

.prompt-input:focus {
  outline: none;
  border-color: #a29bfe;
}

.prompt-form .btn-primary {
  align-self: flex-end;
  padding: 8px 24px;
  font-size: 0.9rem;
}

.prompt-response {
  background: #0d0d1f;
  border: 1px solid #1a2a4a;
  border-radius: 10px;
  padding: 20px 24px;
}

.prompt-response-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a29bfe;
  margin-bottom: 14px;
  font-weight: 700;
}

.prompt-response-body {
  color: #ccc;
  font-size: 0.93rem;
  line-height: 1.75;
}

.prompt-response-body p { margin: 0 0 10px; }
.prompt-response-body p:last-child { margin-bottom: 0; }

/* ─── Batch upload ─────────────────────────────────────── */
.batch-page {
  max-width: 1100px;
}

.batch-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.batch-card {
  background: #0d0d1f;
  border: 1px solid #1a2a4a;
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.batch-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #eee;
}

.batch-card-desc {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
}

.file-drop-area {
  position: relative;
  border: 1px dashed #1a2a4a;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  transition: border-color 0.15s;
}

.file-drop-area:hover {
  border-color: #a29bfe;
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-drop-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.file-drop-icon { font-size: 1.8rem; }

.file-drop-text {
  color: #aaa;
  font-size: 0.88rem;
  font-weight: 500;
}

.file-drop-hint {
  color: #3d4a6e;
  font-size: 0.75rem;
}

.file-selected {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #a29bfe;
  font-weight: 500;
}

/* Preview page */
.preview-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #0d0d1f;
  border: 1px solid #1a2a4a;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: #aaa;
}

.preview-conflict-count {
  color: #fdcb6e;
}

.preview-section {
  margin-bottom: 28px;
}

.preview-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #a29bfe;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.preview-conflict-row td {
  background: rgba(253, 203, 110, 0.04) !important;
  border-bottom-color: rgba(253, 203, 110, 0.1) !important;
}

.preview-empty {
  color: #3d4a6e;
  font-size: 0.9rem;
  padding: 40px 0;
  text-align: center;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #1a2a4a;
}

.btn-large {
  padding: 10px 28px;
  font-size: 0.95rem;
}

.btn-secondary {
  color: #555;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.btn-secondary:hover {
  color: #aaa;
}

/* ─── Preview editable table ───────────────────────────── */
.preview-editable-table td {
  padding: 6px 8px;
}

.preview-input {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #eee;
  font-size: 0.85rem;
  font-family: inherit;
  padding: 5px 8px;
  transition: border-color 0.15s, background 0.15s;
  min-width: 100px;
}

.preview-input:hover {
  border-color: #1a2a4a;
}

.preview-input:focus {
  outline: none;
  border-color: #a29bfe;
  background: rgba(162, 155, 254, 0.06);
}

.preview-input::placeholder {
  color: #2a3a5a;
}

.preview-input-sm {
  min-width: 70px;
  max-width: 90px;
}

.conflict-flag {
  width: 28px;
  text-align: center;
  font-size: 0.85rem;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: sans-serif;
  background: #1a1a2e;
  color: #eee;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 20px;
}

.card {
  background: #16213e;
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

h1 { font-size: 1.3rem; margin-bottom: 20px; color: #a29bfe; }

.center-wrap {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.drop-zone {
  border: 2px dashed #a29bfe;
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
  color: #aaa;
}
.drop-zone:hover, .drop-zone.dragover { background: rgba(162,155,254,0.1); }
.drop-zone input[type="file"] { display: none; }
.drop-zone .icon { font-size: 2rem; margin-bottom: 6px; }
.drop-zone .hint { font-size: 0.75rem; margin-top: 6px; color: #555; }

#player-section { display: none; margin-top: 20px; }

#file-name {
  font-size: 0.85rem;
  color: #a29bfe;
  margin-bottom: 10px;
  word-break: break-all;
}

/* Waveform */
.waveform-wrap {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: 6px;
  overflow: hidden;
  cursor: crosshair;
  background: #0f3460;
}
#waveform { display: block; }

/* Zoom / pan bar */
.zoom-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  margin-bottom: 4px;
  font-size: 0.7rem;
}
.zoom-hint { color: #444; flex: 1; }
#zoom-label { color: #4dd0e1; font-weight: 700; min-width: 28px; text-align: right; }
#zoom-reset-btn {
  background: transparent;
  border: 1px solid #2a2a5a;
  color: #555;
  padding: 2px 10px;
  font-size: 0.7rem;
  border-radius: 4px;
  cursor: pointer;
}
#zoom-reset-btn:hover { border-color: #4dd0e1; color: #4dd0e1; }

/* Pan slider */
#pan-wrap { display: none; margin-bottom: 8px; }
#panSlider {
  width: 100%;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: #1a2a4a;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
#panSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #4dd0e1;
  cursor: pointer;
}
#panSlider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #4dd0e1;
  border: none;
  cursor: pointer;
}

/* Time bar */
.time-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #777;
  margin-bottom: 14px;
}
#region-display { color: #a29bfe; }

/* Region inputs */
.region-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.region-row label { font-size: 0.8rem; color: #999; white-space: nowrap; }
.region-row input[type="number"] {
  background: #0f3460;
  border: 1px solid #2a2a5a;
  border-radius: 6px;
  color: #eee;
  padding: 5px 10px;
  font-size: 0.85rem;
  width: 90px;
}
.region-row input:focus { outline: none; border-color: #a29bfe; }

/* Volume */
.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.vol-icon { font-size: 1rem; user-select: none; width: 20px; text-align: center; }
#vol-label { font-size: 0.75rem; color: #4dd0e1; min-width: 36px; text-align: right; }
#volumeSlider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: #1a2a4a;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #a29bfe;
  cursor: pointer;
}
#volumeSlider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #a29bfe;
  border: none;
  cursor: pointer;
}

/* Speed */
.speed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.speed-label { font-size: 0.75rem; color: #777; white-space: nowrap; }
.speed-btns  { display: flex; gap: 4px; flex: 1; }
.speed-btn {
  flex: 1;
  padding: 5px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #0f1e3a;
  border: 1px solid #2a3a5a;
  color: #6a8aaa;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.speed-btn:hover { border-color: #a29bfe; color: #a29bfe; }
.speed-btn.speed-active {
  background: #2a2060;
  border-color: #a29bfe;
  color: #a29bfe;
}

/* Controls */
.controls { display: flex; gap: 8px; flex-wrap: wrap; }

button {
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.15s;
}
button:hover { opacity: 0.85; }
button:active { opacity: 0.65; }

#play-btn  { background: #a29bfe; color: #1a1a2e; }
#stop-btn  { background: #2a2a5a; color: #eee; }
#loop-btn  { background: #2a2a5a; color: #eee; }
#loop-btn.active { background: #00b894; color: #fff; }
#clear-btn { background: transparent; border: 1px solid #333; color: #666; margin-left: auto; }
#clear-btn:hover { border-color: #a29bfe; color: #a29bfe; }

/* Notes section */
#notes-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #1a2a4a;
}
.notes-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}
#noteInput {
  background: #0f3460;
  border: 1px solid #2a2a5a;
  border-radius: 6px;
  color: #eee;
  padding: 5px 10px;
  font-size: 0.85rem;
  flex: 1;
}
#noteInput::placeholder { color: #445; }
#noteInput:focus { outline: none; border-color: #f9ca24; }
#add-note-btn {
  background: #1e1a00;
  border: 1px solid #f9ca24;
  color: #f9ca24;
  padding: 5px 14px;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
}
#add-note-btn:hover { background: #2e2800; }

#notes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
  align-items: center;
}
.notes-empty { font-size: 0.75rem; color: #333; }

.note-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #110f00;
  border: 1px solid #4a3d00;
  border-radius: 20px;
  padding: 3px 6px 3px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s;
  user-select: none;
}
.note-chip:hover { border-color: #f9ca24; }
.note-time { color: #f9ca24; font-family: monospace; font-size: 0.72rem; }
.note-lbl  { color: #bbb; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-del  {
  background: none; border: none; color: #443; cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0 2px; flex-shrink: 0;
}
.note-del:hover { color: #e17055; }

audio { display: none; }
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
