:root{
  --bg0:#070614;
  --bg1:#0b0820;
  --border: rgba(255,255,255,.10);

  --text:#f6f4ff;
  --muted:#bdb6e6;
  --muted2: rgba(246,244,255,.72);

  --shadow: 0 18px 45px rgba(0,0,0,.45);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 10% -10%, rgba(168,85,247,.22), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(34,211,238,.14), transparent 55%),
    radial-gradient(1100px 700px at 50% 120%, rgba(109,40,217,.22), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.wrap{
  width:min(1100px, calc(100% - 32px));
  margin: 22px auto 42px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.05));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand{ display:flex; align-items:center; gap:12px; min-width: 220px; }
.logoMark{
  width:42px;height:42px;
  border-radius: 14px;
  background:
    radial-gradient(12px 12px at 30% 30%, rgba(255,255,255,.9), rgba(255,255,255,0) 60%),
    linear-gradient(135deg, rgba(168,85,247,.95), rgba(34,211,238,.75));
  box-shadow: 0 14px 35px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.16);
}
.brandText h1{ margin:0; font-size: 18px; letter-spacing: .2px; line-height: 1.1; }
.brandText p{ margin:2px 0 0; color:var(--muted); font-size: 12.5px; }

.actions{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

.btn{
  appearance:none;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 700;
  font-size: 13px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  display:inline-flex;
  align-items:center;
  gap:8px;
  user-select:none;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.18);
}
.btn:active{ transform: translateY(0px) }
.btnPrimary{
  background: linear-gradient(135deg, rgba(168,85,247,.28), rgba(34,211,238,.14));
  border-color: rgba(168,85,247,.35);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}

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

.card{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.cardHead{
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.cardHead h2{ margin:0; font-size: 14.5px; letter-spacing: .2px; }
.sub{ color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cardBody{ padding: 14px 16px; }

.formRow{
  display:grid;
  grid-template-columns: 1.3fr .8fr .8fr;
  gap: 10px;
}
@media (max-width: 860px){
  .formRow{ grid-template-columns: 1fr; }
  .brand{ min-width: 0; }
}

label{ display:block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

input, textarea{
  width:100%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: var(--text);
  border-radius: 14px;
  padding: 11px 12px;
  outline:none;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
  font-size: 14px;
}
textarea{ min-height: 110px; resize: vertical; line-height: 1.4; }
input:focus, textarea:focus{
  border-color: rgba(168,85,247,.45);
  box-shadow: 0 0 0 6px rgba(168,85,247,.12);
  background: rgba(0,0,0,.28);
}

.hint{ margin-top: 8px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.muted{ color: var(--muted); }
.small{ font-size: 12.5px; }

.split{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
}
@media (max-width: 980px){
  .split{ grid-template-columns: 1fr; }
}

.rowBtns{ display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }

.divider{
  height: 1px;
  background: rgba(255,255,255,.10);
  margin: 12px 0;
}

.tracksTools{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

.pill{
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(0,0,0,.18);
}

.tableWrap{ overflow:auto; }
.table{ width:100%; border-collapse: separate; border-spacing: 0; }
.table thead th{
  text-align:left;
  font-size: 11.5px;
  letter-spacing: .3px;
  color: rgba(246,244,255,.70);
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

.colCover{ width:84px; }
.colTime{ width:120px; }
.colActions{ width:240px; text-align:right; }

.row{ border-bottom: 1px solid rgba(255,255,255,.08); }
.cell{ padding: 12px 16px; vertical-align: middle; }

.cover{
  width:52px;height:52px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(12px 12px at 30% 30%, rgba(255,255,255,.35), rgba(255,255,255,0) 60%),
    linear-gradient(135deg, rgba(168,85,247,.22), rgba(34,211,238,.12));
  overflow:hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,.28);
}
.cover img{ width:100%; height:100%; object-fit: cover; display:block; }

.timeInput{
  width: 92px;
  font-variant-numeric: tabular-nums;
  text-align:center;
  padding: 10px 10px;
}

.trackMeta{ display:flex; align-items:center; gap:12px; min-width: 260px; }
.artist{ font-weight: 850; font-size: 14px; line-height: 1.25; }
.title{ color: var(--muted2); font-size: 13.5px; line-height: 1.25; margin-top: 2px; }

.miniBtns{ display:flex; gap:8px; justify-content:flex-end; }
.miniBtns .btn{ padding: 9px 10px; border-radius: 12px; font-weight: 800; font-size: 12.5px; }

.footerNote{ padding: 12px 16px 14px; color: var(--muted); font-size: 12.5px; }

/* =========================
   PRINT SHEET
   ========================= */
#printSheet{
  display:none;
}

body.print-mode #app{
  display:none;
}
body.print-mode #printSheet{
  display:block;
  padding: 0;
  margin: 0;
  color:#111;
  background:#fff;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Print sheet layout */
.ps-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12mm;
  margin-bottom: 6mm;
}
.ps-title{
  font-size: 20pt;
  font-weight: 900;
  letter-spacing: .2px;
}
.ps-sub{
  font-size: 10.5pt;
  color:#444;
  margin-top: 2mm;
  text-align:right;
}

.ps-meta{
  margin-bottom: 7mm;
}
.ps-show{
  font-size: 16pt;
  font-weight: 850;
  margin-bottom: 2mm;
}
.ps-line{
  font-size: 11pt;
  color:#444;
}

/* Print table */
.ps-table{
  width:100%;
  border-collapse: collapse;
}
.ps-table thead th{
  text-align:left;
  font-size: 10pt;
  border-bottom: 2px solid #111;
  padding: 3mm 0;
}
.ps-table tbody td{
  border-bottom: 1px solid #e5e5e5;
  padding: 3mm 0;
  vertical-align: middle;
}
.ps-col-cover{ width: 18mm; }
.ps-col-time{ width: 26mm; }

.ps-cover{
  width: 16mm;
  height: 16mm;
  border: 1px solid #ddd;
  border-radius: 3mm;
  overflow:hidden;
  background:#f3f3f3;
}
.ps-cover img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.ps-artist{
  font-weight: 850;
  font-size: 11pt;
  line-height: 1.25;
}
.ps-title2{
  font-size: 10pt;
  color:#555;
  line-height: 1.25;
  margin-top: 1mm;
}

.ps-time{
  font-variant-numeric: tabular-nums;
  font-size: 10.5pt;
}

/* Actual printing rules */
@media print{
  @page { size: A4; margin: 14mm; }

  /* Only the print sheet prints */
  #app{ display:none !important; }
  #printSheet{ display:block !important; }

  /* IMPORTANT: Browser URL/page numbers are controlled by print dialog:
     turn off "Headers and footers" to remove them. */
}
