/* ==========================================================================
   PHONK MUSIC ADMIN STUDIO — DESIGN SYSTEM & STYLES
   Aesthetics: Deep Obsidian, Cyber Neon (#BD00FF, #FF007A, #00F0FF), Glassmorphism
   ========================================================================== */

:root {
  --bg-primary: #07070B;
  --bg-surface: #0E0E16;
  --bg-elevated: #161622;
  --bg-card: rgba(22, 22, 34, 0.7);
  --bg-glass: rgba(14, 14, 22, 0.75);
  
  --neon-purple: #BD00FF;
  --neon-pink: #FF007A;
  --neon-cyan: #00F0FF;
  --neon-green: #00FFA3;
  --neon-purple-glow: rgba(189, 0, 255, 0.35);
  --neon-pink-glow: rgba(255, 0, 122, 0.35);
  --neon-cyan-glow: rgba(0, 240, 255, 0.25);

  --text-primary: #FFFFFF;
  --text-secondary: #A0A0B8;
  --text-muted: #64647C;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(189, 0, 255, 0.5);
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(189, 0, 255, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(0, 240, 255, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==========================================================================
   TOP NAVIGATION
   ========================================================================== */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(189, 0, 255, 0.2), rgba(0, 240, 255, 0.1));
  border: 1px solid var(--neon-purple);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--neon-purple-glow);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #FFFFFF;
  display: block;
  line-height: 1.1;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1.5px;
}

.r2-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.status-indicator.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 163, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 255, 163, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 163, 0); }
}

.status-info {
  display: flex;
  flex-direction: column;
}

.status-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.status-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
  font-family: var(--font-mono);
}

.badge-edge {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0, 240, 255, 0.15);
  color: var(--neon-cyan);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-purple) 0%, #9000C8 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 20px var(--neon-purple-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(189, 0, 255, 0.5);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--neon-pink);
}

.btn-submit {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  background: linear-gradient(90deg, var(--neon-purple) 0%, #FF007A 100%);
  color: white;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px var(--neon-purple-glow);
  justify-content: center;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 0, 122, 0.6);
}

/* ==========================================================================
   DASHBOARD GRID LAYOUT
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(460px, 540px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.column-left, .column-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  width: 100%;
}

/* Panels */
.panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease;
}

.panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
}

.panel-subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.step-chip {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Metrics Row */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 16px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1;
}

.metric-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.metric-tag.highlight {
  color: var(--neon-purple);
  font-weight: 700;
}

/* ==========================================================================
   MULTI-STEP TABBED WORKFLOW
   ========================================================================== */
.form-steps-nav {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.step-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.step-nav-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.step-nav-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.04);
}

.step-nav-btn.active {
  background: linear-gradient(135deg, rgba(189, 0, 255, 0.2) 0%, rgba(255, 0, 122, 0.15) 100%);
  color: #FFFFFF;
  border: 1px solid rgba(189, 0, 255, 0.4);
  box-shadow: 0 0 16px rgba(189, 0, 255, 0.25);
}

.step-nav-btn.active .step-nav-num {
  background: var(--neon-purple);
  color: #FFFFFF;
  box-shadow: 0 0 8px var(--neon-purple-glow);
}

.step-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 12px;
}

/* ==========================================================================
   FORM SECTION CARDS & GLOWING SUBMIT BUTTON
   ========================================================================== */
.form-section-card {
  background: rgba(12, 10, 22, 0.55);
  border: 1px solid rgba(189, 0, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  min-width: 0;
  width: 100%;
}

.form-section-card:hover {
  border-color: rgba(189, 0, 255, 0.45);
  box-shadow: 0 6px 28px rgba(189, 0, 255, 0.1);
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 2px;
}

.section-tag-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.section-tag-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-submit-container {
  margin-top: 12px;
  padding-top: 8px;
  width: 100%;
}

.btn-add-track-primary {
  width: 100%;
  min-height: 54px;
  padding: 16px 28px;
  background: linear-gradient(135deg, #FF007A 0%, #BD00FF 50%, #00F0FF 100%);
  background-size: 200% 200%;
  color: #FFFFFF;
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 0 25px rgba(255, 0, 122, 0.5), 0 0 45px rgba(189, 0, 255, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.btn-add-track-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 0 35px rgba(255, 0, 122, 0.7), 0 0 60px rgba(0, 240, 255, 0.5);
  background-position: right center;
}

.btn-add-track-primary:active {
  transform: translateY(1px) scale(0.99);
}

.btn-add-track-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  background: #1c1b29;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.form-validation-hint {
  font-size: 0.775rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.form-validation-hint.valid {
  color: var(--neon-green);
}

.form-validation-hint.duplicate-error {
  color: #FF5252;
  font-weight: 600;
}

/* ==========================================================================
   DUPLICATE TRACK TITLE WARNING UI
   ========================================================================== */
.label-with-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  width: 100%;
}

.title-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.title-status-badge.duplicate {
  background: rgba(255, 68, 68, 0.15);
  color: #FF5252;
  border: 1px solid rgba(255, 82, 82, 0.5);
  box-shadow: 0 0 10px rgba(255, 82, 82, 0.2);
}

.title-status-badge.unique {
  background: rgba(0, 240, 255, 0.12);
  color: #00F0FF;
  border: 1px solid rgba(0, 240, 255, 0.4);
}

.form-input.input-duplicate-warning {
  border-color: #FF5252 !important;
  background: rgba(255, 82, 82, 0.07) !important;
  box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.22), 0 0 16px rgba(255, 82, 82, 0.25) !important;
}

.form-input.input-unique-success {
  border-color: rgba(0, 240, 255, 0.5);
}

.track-title-warning {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.08) 100%);
  border: 1px solid rgba(255, 82, 82, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 12px rgba(255, 68, 68, 0.15);
  color: #FF8B8B;
  font-size: 0.82rem;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slideDownWarning 0.22s ease-out;
}

.track-title-warning svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #FF5252;
}

.track-title-warning .warning-text-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-title-warning .warning-title {
  color: #FF5252;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.track-title-warning #track-title-warning-msg {
  color: #FEE2E2;
  font-size: 0.8rem;
}

.track-title-warning #track-title-warning-msg strong {
  color: #FFFFFF;
}

.track-title-warning #track-title-warning-msg em {
  color: #FFD166;
  font-style: normal;
  font-weight: 600;
}

@keyframes slideDownWarning {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.upload-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
}

.flex-1 {
  flex: 1 1 140px;
  min-width: 0;
}

.flex-2 {
  flex: 2 1 230px;
  min-width: 0;
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 16px;
  }
  .flex-1, .flex-2 {
    width: 100%;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  width: 100%;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
}

.form-group .req {
  color: var(--neon-pink);
  font-weight: 700;
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: #FFFFFF;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
}

.form-input-sm {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.825rem;
}

input[type="date"].form-input {
  color-scheme: dark;
}

.form-textarea {
  resize: vertical;
  min-height: 95px;
  line-height: 1.5;
  font-size: 0.85rem;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px var(--neon-purple-glow);
}

.form-select {
  cursor: pointer;
}

.input-with-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.input-with-action-btn .form-input {
  flex: 1;
  min-width: 0;
}

.input-with-action-btn .btn {
  flex-shrink: 0;
  min-height: 44px;
  height: 44px;
  padding: 0 16px;
  white-space: nowrap;
}

.input-with-prefix {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.input-with-prefix:focus-within {
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px var(--neon-purple-glow);
}

.input-prefix {
  padding: 11px 12px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-right: 1px solid var(--border-subtle);
  white-space: nowrap;
  flex-shrink: 0;
}

.input-with-prefix .form-input {
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: unset;
  padding: 11px 12px;
}

.input-with-prefix .form-input:focus {
  box-shadow: none !important;
  border: none !important;
}

.duration-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 10px 0 0;
  transition: all 0.2s ease;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
}

.duration-input-wrap:focus-within {
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px var(--neon-purple-glow);
}

.duration-input-wrap .form-input {
  border: none !important;
  background: transparent !important;
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: unset;
  padding: 11px 12px;
  box-shadow: none !important;
  outline: none !important;
}

/* Hide native number spinner arrows so they never collide or overlap */
.duration-input-wrap input[type="number"]::-webkit-inner-spin-button,
.duration-input-wrap input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.duration-input-wrap input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.duration-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.25);
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  pointer-events: none;
  margin-left: 6px;
}

.field-hint {
  font-size: 0.725rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.field-hint code {
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  background: rgba(0, 240, 255, 0.08);
  padding: 1px 4px;
  border-radius: 4px;
}

.field-hint-mini {
  font-size: 0.725rem;
  color: var(--text-muted);
}

/* ==========================================================================
   AUDIO DROPZONE (LOCAL FILE UPLOAD)
   ========================================================================== */
.audio-dropzone {
  border: 2px dashed rgba(189, 0, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: rgba(189, 0, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.audio-dropzone:hover, .audio-dropzone.dragover {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.05);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.dropzone-icon {
  color: var(--neon-purple);
  filter: drop-shadow(0 0 8px var(--neon-purple-glow));
}

.audio-dropzone.dragover .dropzone-icon {
  color: var(--neon-cyan);
  transform: scale(1.1);
}

.dropzone-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #FFFFFF;
}

.dropzone-subtitle {
  display: block;
  font-size: 0.775rem;
  color: var(--text-muted);
}

.dropzone-browse-btn {
  background: none;
  border: none;
  color: var(--neon-cyan);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0 2px;
}

.dropzone-browse-btn:hover {
  color: #FFFFFF;
}

.dropzone-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  margin-top: 6px;
  font-size: 0.775rem;
}

.file-name {
  color: #FFFFFF;
  font-weight: 600;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  color: var(--text-muted);
}

.file-duration {
  color: var(--neon-green);
  font-weight: 700;
  font-family: var(--font-mono);
}

/* ==========================================================================
   SONG BANNER IMAGE (16:9 RATIO & SIZING GUIDELINES)
   ========================================================================== */
.banner-section-group {
  margin-top: 6px;
}

.label-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.label-with-action label {
  margin-bottom: 0;
}

.banner-guideline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--neon-pink);
  background: rgba(255, 0, 122, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 0, 122, 0.25);
  white-space: nowrap;
}

.banner-preview-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050409;
  border: 1.5px dashed rgba(189, 0, 255, 0.4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-preview-container:hover {
  border-color: var(--neon-purple);
  box-shadow: 0 0 16px rgba(189, 0, 255, 0.25);
}

.banner-preview-container.has-banner {
  border-style: solid;
  border-color: rgba(189, 0, 255, 0.6);
  cursor: default;
}

.banner-preview-container.dragover {
  border-color: var(--neon-pink);
  box-shadow: 0 0 24px rgba(255, 0, 122, 0.4);
  background: rgba(189, 0, 255, 0.08);
}

#banner-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 2px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

.banner-placeholder .ph-main {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.banner-placeholder .ph-sub {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.banner-presets {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.banner-pill-thumb {
  width: 90px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  object-fit: cover;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.banner-pill-thumb:hover {
  transform: scale(1.04);
}

.banner-pill-thumb.active {
  border-color: var(--neon-pink);
  box-shadow: 0 0 12px var(--neon-pink-glow);
}

.artwork-preview-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-top: 6px;
}

.artwork-preview-container img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid rgba(189, 0, 255, 0.3);
}

.artwork-preview-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  gap: 8px;
}

.artwork-preview-name {
  font-size: 0.775rem;
  font-family: var(--font-mono);
  color: #FFFFFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-clear-preview {
  background: rgba(255, 0, 122, 0.15);
  border: 1px solid rgba(255, 0, 122, 0.3);
  color: var(--neon-pink);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-clear-preview:hover {
  background: var(--neon-pink);
  color: #FFFFFF;
}

.banner-clear-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.presets-empty-hint {
  font-size: 0.725rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
}

/* Artwork Preset Gallery */
.artwork-presets {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.artwork-pill-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  object-fit: cover;
  transition: all 0.2s ease;
}

.artwork-pill-thumb:hover {
  transform: scale(1.05);
}

.artwork-pill-thumb.active {
  border-color: var(--neon-purple);
  box-shadow: 0 0 12px var(--neon-purple-glow);
}

/* Feature Toggle Card */
.feature-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(189, 0, 255, 0.06);
  border: 1px solid rgba(189, 0, 255, 0.25);
  border-radius: var(--radius-md);
  margin-top: 4px;
}

.toggle-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
}

.toggle-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--neon-purple);
  border-color: var(--neon-purple);
  box-shadow: 0 0 12px var(--neon-purple-glow);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ==========================================================================
   TAG CLOUD & MULTI-PILL SELECTOR
   ========================================================================== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  min-height: 48px;
  align-items: center;
}

.empty-category-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px;
  user-select: none;
}

.tag-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-pill:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.tag-pill.active {
  background: linear-gradient(135deg, #FF007A 0%, #BD00FF 100%);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 0 14px var(--neon-pink-glow);
  transform: scale(1.02);
}

.tag-pill .pill-remove-btn {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  opacity: 0.6;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tag-pill .pill-remove-btn:hover {
  opacity: 1;
  color: #FF5252;
  transform: scale(1.2);
}

.add-custom-tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
  min-width: 0;
}

.add-custom-tag-row .form-input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  padding: 8px 12px;
}

.add-custom-tag-row .btn {
  flex-shrink: 0;
  min-height: 38px;
  height: 38px;
  white-space: nowrap;
}

/* ==========================================================================
   CATEGORY DIRECTORY PANEL
   ========================================================================== */
.category-panel {
  background: linear-gradient(180deg, rgba(20, 14, 36, 0.7) 0%, rgba(14, 10, 24, 0.8) 100%);
}

.category-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  width: 100%;
  min-width: 0;
}

.category-add-row .form-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
}

.category-add-row .btn {
  flex-shrink: 0;
  min-height: 44px;
  height: 44px;
  white-space: nowrap;
}

.category-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 48px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  align-items: center;
}

.category-chip-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(189, 0, 255, 0.12) 0%, rgba(0, 240, 255, 0.08) 100%);
  border: 1px solid rgba(189, 0, 255, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #FFFFFF;
  transition: all 0.2s ease;
}

.category-chip-item:hover {
  border-color: var(--neon-purple);
  box-shadow: 0 0 12px var(--neon-purple-glow);
  transform: translateY(-1px);
}

.chip-track-count {
  font-size: 0.7rem;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.12);
  padding: 1px 6px;
  border-radius: 10px;
}

.btn-chip-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.btn-chip-remove:hover {
  color: var(--neon-pink);
  transform: scale(1.2);
}

.category-empty-msg {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  padding: 4px 8px;
}

.category-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-x {
  color: var(--neon-pink);
  font-weight: bold;
  font-size: 0.9rem;
}

/* ==========================================================================
   AUDIO PLAYER PANEL & SHOWCASE
   ========================================================================== */
.player-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(26, 20, 44, 0.85) 0%, rgba(14, 12, 22, 0.95) 100%);
  border: 1px solid rgba(189, 0, 255, 0.3);
}

.player-banner-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  border: 1.5px dashed rgba(189, 0, 255, 0.3);
  background: #050409;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.player-banner-wrapper.has-banner {
  border-style: solid;
  border-color: rgba(189, 0, 255, 0.5);
}

.player-banner-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fadeIn 0.3s ease;
}

.player-banner-overlay {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.banner-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

.player-ownership-pill {
  font-size: 0.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 0, 122, 0.8), rgba(189, 0, 255, 0.8));
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(255, 0, 122, 0.4);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-artwork-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-artwork-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-art-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(189, 0, 255, 0.08);
  color: var(--neon-purple);
}

.player-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
}

.player-artist {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.player-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.player-tag-chip {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 2px 7px;
  border-radius: 6px;
}

/* ==========================================================================
   MORE INFO CARD (Matching audio.com / track specs UI)
   ========================================================================== */
.more-info-card {
  background: rgba(18, 14, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.more-info-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  font-family: var(--font-main);
}

.more-info-paragraph {
  font-size: 0.835rem;
  line-height: 1.6;
  color: #D1CCDC;
  margin: 0 0 14px 0;
  font-weight: 400;
  white-space: pre-line;
}

.more-info-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
  width: 100%;
  margin-bottom: 4px;
}

.more-info-table {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.more-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.835rem;
  min-height: 38px;
  box-sizing: border-box;
}

.more-info-row:last-child {
  border-bottom: none;
}

.more-info-key {
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.825rem;
  min-width: 90px;
}

.more-info-val {
  color: #E2DEEB;
  font-weight: 400;
  text-align: right;
  word-break: break-word;
  max-width: 70%;
}

.more-info-val.accent-link {
  color: #38BDF8;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}

.more-info-val.accent-link:hover {
  color: #7DD3FC;
  text-decoration: underline;
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--neon-cyan);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-text-action:hover {
  color: #FFFFFF;
  background: rgba(0, 240, 255, 0.12);
}

#html-audio-player {
  width: 100%;
  height: 40px;
  filter: invert(0.9) hue-rotate(180deg);
  border-radius: 20px;
}

/* ==========================================================================
   TABLE DESIGN
   ========================================================================== */
.table-container {
  overflow-x: auto;
}

.tracks-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.tracks-table th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.tracks-table td {
  padding: 12px 14px;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.tracks-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.track-row-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.row-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(189, 0, 255, 0.1);
  color: var(--neon-purple);
  border: 1px solid rgba(189, 0, 255, 0.2);
}

.row-title {
  font-weight: 700;
  color: #FFFFFF;
}

.row-artist {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.genre-pill {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  margin: 2px;
}

.badge-featured {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(189, 0, 255, 0.15);
  color: var(--neon-purple);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(189, 0, 255, 0.3);
}

.badge-standard {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 4px 8px;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  color: #FFFFFF;
  border-color: var(--neon-purple);
  transform: translateY(-1px);
}

.btn-icon.delete:hover {
  color: #FF4757;
  border-color: #FF4757;
}

.btn-icon.playing {
  background: linear-gradient(135deg, rgba(189, 0, 255, 0.4), rgba(0, 240, 255, 0.4));
  border-color: var(--neon-cyan);
  color: #00F0FF;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
  animation: pulseNeon 1.5s infinite alternate;
}

@keyframes pulseNeon {
  0% { box-shadow: 0 0 6px rgba(189, 0, 255, 0.4); }
  100% { box-shadow: 0 0 16px rgba(0, 240, 255, 0.6); }
}

.empty-table-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 8px;
  text-align: center;
}

.empty-table-state h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 8px;
}

.empty-table-state p {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 320px;
}

/* ==========================================================================
   R2 SYNC SECTION
   ========================================================================== */
.sync-instructions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.step-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--neon-purple);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.json-preview-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: #050508;
  overflow: hidden;
}

.json-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.json-endpoint {
  font-family: var(--font-mono);
  color: var(--neon-cyan);
}

.json-code {
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  color: #A9B1D6;
  overflow-x: auto;
  max-height: 220px;
  line-height: 1.6;
}

/* Cloudflare R2 Credentials Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.modal-card {
  width: 100%;
  max-width: 580px;
  background: #0D0D18;
  border: 1px solid rgba(189, 0, 255, 0.35);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(189, 0, 255, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from {
    transform: scale(0.94) translateY(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 26px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.modal-subtitle {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 0, 122, 0.2);
  color: #FF007A;
  border-color: rgba(255, 0, 122, 0.4);
}

.modal-body {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 26px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.2);
}

.r2-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--neon-cyan);
}

/* =============================================================================
   ADMIN AUTHENTICATION & SESSION UI
   ============================================================================= */

.user-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(189, 0, 255, 0.08);
  border: 1px solid rgba(189, 0, 255, 0.25);
  border-radius: 999px;
  padding: 4px 6px 4px 12px;
}

.admin-badge-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--neon-cyan);
  text-transform: lowercase;
}

.btn-danger-soft {
  background: rgba(255, 45, 85, 0.15);
  border: 1px solid rgba(255, 45, 85, 0.35);
  color: #FF375F;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-danger-soft:hover {
  background: rgba(255, 45, 85, 0.3);
  border-color: #FF375F;
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(255, 45, 85, 0.4);
}

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 12, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.auth-modal-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(145deg, rgba(22, 20, 36, 0.95), rgba(12, 10, 20, 0.98));
  border: 1px solid rgba(189, 0, 255, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(189, 0, 255, 0.2);
  border-radius: 20px;
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  overflow: hidden;
}

.auth-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #BD00FF, #00F0FF, #BD00FF);
  background-size: 200% 100%;
  animation: shimmerBorder 4s linear infinite;
}

@keyframes shimmerBorder {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.auth-modal-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brand-logo.large {
  width: 58px;
  height: 58px;
  background: radial-gradient(circle, rgba(189, 0, 255, 0.2) 0%, rgba(0, 240, 255, 0.05) 70%, transparent 100%);
  border: 1px solid rgba(189, 0, 255, 0.4);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(189, 0, 255, 0.3);
  margin-bottom: 4px;
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #FFFFFF;
  margin: 0;
  text-shadow: 0 0 20px rgba(189, 0, 255, 0.5);
}

.auth-subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-error-alert {
  background: rgba(255, 45, 85, 0.15);
  border: 1px solid rgba(255, 45, 85, 0.4);
  color: #FF5A7A;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: shake 0.35s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s;
}

.input-icon-wrapper .input-text {
  padding-left: 42px;
  padding-right: 42px;
  width: 100%;
}

.input-icon-wrapper .input-text:focus + .btn-toggle-password,
.input-icon-wrapper:focus-within .input-icon {
  color: var(--neon-cyan);
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.btn-toggle-password:hover {
  color: #FFFFFF;
}

.auth-submit-btn {
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 6px;
  border-radius: 12px;
}

.auth-modal-footer {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  font-family: 'JetBrains Mono', monospace;
}
