/* SongsForge Backoffice Custom Styles */

/* ========================================
   GLASSMORPHISM & LAYOUT SYSTEM
   ======================================== */

/* Gradient Background */
.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* Glass Panel Effect */
.glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
}

.glass-solid {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
}

.glass-dark {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
}

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */

.sidebar {
  width: 240px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  transition: width 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.sidebar-collapsed {
  width: 64px;
}

.sidebar-header {
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.sidebar-collapsed .sidebar-brand {
  opacity: 0;
  width: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 500;
}

.nav-item svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.nav-item span {
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.sidebar-collapsed .nav-item span {
  opacity: 0;
  width: 0;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-avatar svg {
  width: 1rem;
  height: 1rem;
  color: white;
}

.user-email-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}

.sidebar-collapsed .user-email-text {
  opacity: 0;
  width: 0;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

.logout-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.logout-btn span {
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.sidebar-collapsed .logout-btn span {
  opacity: 0;
  width: 0;
}

.sidebar-toggle {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sidebar-toggle:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.sidebar-toggle svg {
  width: 14px;
  height: 14px;
  color: #667eea;
  transition: transform 0.3s ease;
}

.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

.main-content {
  margin-left: 240px;
  min-height: 100vh;
  padding: 2rem;
  transition: margin-left 0.3s ease;
}

.sidebar-collapsed ~ .main-content {
  margin-left: 64px;
}

.content-panel {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  color: white;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========================================
   GLASS TABLE STYLES
   ======================================== */

.glass-table {
  width: 100%;
  border-collapse: collapse;
}

.glass-table thead {
  background: rgba(255, 255, 255, 0.1);
}

.glass-table th {
  padding: 0.875rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.glass-table tbody tr {
  transition: background 0.15s ease;
}

.glass-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.1);
}

.glass-table tbody tr:last-child td {
  border-bottom: none;
}

#users-table-body {
  color: white;
}

#users-table-body td {
  color: white;
}

#users-table-body a {
  color: #a5b4fc;
}

#users-table-body a:hover {
  color: #c7d2fe;
}

#user-info {
  color: white;
}

#user-info label {
  color: rgba(255, 255, 255, 0.6);
}

#user-info p {
  color: white;
}

#user-info h2 {
  color: white;
}

#songs-section {
  color: white;
}

#songs-section h2 {
  color: white;
}

#songs-section .song-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#songs-section .song-card-header {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

#songs-section .song-card-header:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#songs-section .song-card-header h3 {
  color: white;
}

#songs-section .song-card-header p {
  color: rgba(255, 255, 255, 0.7);
}

#songs-section .song-card-body {
  color: white;
}

#songs-section .lyrics-content {
  background-color: rgba(0, 0, 0, 0.2);
  color: white;
}

#songs-section .lyrics-tab {
  color: rgba(255, 255, 255, 0.7);
  border-color: transparent;
}

#songs-section .lyrics-tab:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#songs-section .lyrics-tab.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

#songs-section .chevron {
  color: rgba(255, 255, 255, 0.5);
}

#no-songs {
  color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   GLASS FORM INPUTS
   ======================================== */

.glass-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: white;
  transition: all 0.15s ease;
}

.glass-input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.glass-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.glass-btn {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 0.5rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.glass-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.glass-btn:active {
  transform: translateY(0);
}

.glass-btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: #667eea;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: none;
}

.glass-btn-secondary:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.glass-btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.glass-btn-sm svg {
  flex-shrink: 0;
}

/* ========================================
   GLASS CARDS
   ======================================== */

.glass-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  color: white;
}

.glass-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s ease;
}

.glass-card-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   LOGIN PAGE SPECIFIC
   ======================================== */

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.5rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.login-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.5rem;
}

.login-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  color: white;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.login-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.login-btn {
  width: 100%;
  padding: 0.875rem;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 0.5rem;
  color: #667eea;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.login-btn:hover {
  background: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #fca5a5;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .sidebar {
    width: 64px;
  }

  .sidebar .sidebar-brand,
  .sidebar .nav-item span,
  .sidebar .user-email-text,
  .sidebar .logout-btn span {
    opacity: 0;
    width: 0;
  }

  .main-content {
    margin-left: 64px;
    padding: 1rem;
  }

  .sidebar-toggle {
    display: none;
  }
}

/* ========================================
   ORIGINAL COMPONENT STYLES
   ======================================== */

/* Song Card */
.song-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.song-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.song-card-header:hover {
  background-color: #f9fafb;
}

.song-card-body {
  padding: 1.5rem;
  display: none;
}

.song-card-body.expanded {
  display: block;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.status-generating {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.status-failed {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Lyrics Version Tabs */
.lyrics-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.lyrics-tab {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  color: #6b7280;
}

.lyrics-tab:hover {
  background-color: #f3f4f6;
}

.lyrics-tab.active {
  background-color: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
}

/* Lyrics Content */
.lyrics-content {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  background-color: #f9fafb;
  padding: 1rem;
  border-radius: 0.375rem;
  max-height: 300px;
  overflow-y: auto;
}

/* Action Buttons */
.action-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-button-primary {
  background-color: #4f46e5;
  color: white;
  border: none;
}

.action-button-primary:hover {
  background-color: #4338ca;
}

.action-button-secondary {
  background-color: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  text-decoration: none;
}

.action-button-secondary:hover {
  background-color: rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

.action-button-warning {
  background-color: #f59e0b;
  color: white;
  border: none;
}

.action-button-warning:hover {
  background-color: #d97706;
}

.action-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Table Row Hover */
.user-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.user-row:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Chevron Icon Animation */
.chevron {
  transition: transform 0.2s ease;
}

.chevron.expanded {
  transform: rotate(180deg);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 100;
  animation: slideIn 0.3s ease;
}

.toast-success {
  background-color: #10b981;
  color: white;
}

.toast-error {
  background-color: #ef4444;
  color: white;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Audio Player */
.audio-player {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0.5rem;
  padding: 1rem;
  color: white;
}

.audio-player-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

.audio-player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.audio-play-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.audio-play-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.audio-play-btn.playing {
  background-color: rgba(255, 255, 255, 0.35);
}

.audio-progress-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.audio-progress-bar {
  height: 0.375rem;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  cursor: pointer;
  overflow: hidden;
}

.audio-progress-fill {
  height: 100%;
  background-color: white;
  border-radius: 9999px;
  width: 0%;
  transition: width 0.1s linear;
}

.audio-time {
  display: flex;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  opacity: 0.9;
}

.play-icon.hidden,
.pause-icon.hidden {
  display: none;
}
