/* ==========================================================================
   ADMIN DASHBOARD STRUCTURE
   ========================================================================== */
.admin-dashboard-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  min-height: calc(100vh - 150px);
}

.admin-sidebar {
  background-color: #ffffff;
  border: 1px solid var(--border-color-main);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color-main);
}

.admin-view-switcher {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.admin-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 4px;
  font-size: 14px;
  text-decoration: none;
}

.admin-tab.active {
  background: var(--bg-button);
  color: white;
  font-weight: bold;
}

.admin-tab.inactive {
  background: #eee;
  color: #333;
}

.create-new-btn {
  width: 100%;
  text-decoration: none;
  text-align: center;
  display: block;
  padding: 0.8rem;
  background-color: var(--bg-button);
  color: var(--bg-main);
  border: none !important;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: background-color 0.2s;
}

.create-new-btn:hover {
  background-color: var(--bg-button-hover);
  text-decoration: none;
}

.search-form {
  margin: 0;
}

.admin-search-input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border-color-main);
  border-radius: 4px;
  font-family: var(--font-sans);
}

.empty-msg {
  padding: 15px;
  color: #666;
}

.admin-item-list {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.admin-list-item {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color-main);
  gap: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.admin-list-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
  text-decoration: none;
}

.admin-list-item.active {
  background-color: var(--bg-main);
  border-left: 4px solid var(--bg-button);
}

.item-thumb {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.item-thumb-placeholder {
  width: 60px;
  height: 40px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #666;
  border-radius: 2px;
}

.item-details {
  flex-grow: 1;
  overflow: hidden;
}

.item-details h4 {
  margin: 0;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

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

.artist-thumb-placeholder {
  width: 40px;
  height: 40px;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.artist-thumb-placeholder i {
  color: #666;
  font-size: 12px;
}

/* ==========================================================================
   EDIT VIEW & IMAGE PREVIEW
   ========================================================================== */
.edit-view {
  background-color: #ffffff;
  border: 1px solid var(--border-color-main);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color-main);
}

.edit-form {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.edit-content-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 2rem;
  align-items: start;
}

.edit-form-column.wide {
  flex: 2;
}

.edit-preview-column.faded {
  flex: 1;
  opacity: 0.5;
}

.edit-input-box {
  border: 1px solid var(--border-color-main);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}

.edit-input-box:focus-within {
  border-color: #f0f0f0;
}

.edit-input-box label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.edit-input-box input,
.edit-input-box textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-main);
  outline: none;
  resize: vertical;
}

.edit-select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-color-main);
  border-radius: 4px;
  background: transparent;
}

.edit-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.edit-preview-card {
  background-color: var(--bg-main);
  border: none !important;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.edit-preview-image {
  width: 100%;
  flex-grow: 1;
  min-height: 250px;
  background: #eaeaea;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.edit-preview-image img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: contain;
  display: block;
}

.preview-placeholder {
  width: 100%;
  height: 100%;
  min-height: 250px;
  background: #eaeaea;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
  text-align: center;
  padding: 20px;
}

.preview-placeholder i {
  font-size: 40px;
  margin-bottom: 10px;
  color: #999;
}

.artist-preview-card {
  border: 2px dashed var(--border-color-main);
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 250px;
  border-radius: 8px;
}

.artist-preview-card i {
  font-size: 48px;
  margin-bottom: 10px;
  color: #aaa;
}

.artist-preview-card p {
  font-size: 12px;
  color: #777;
  text-align: center;
  padding: 0 10px;
}

.edit-preview-meta {
  padding: 1.2rem;
  background-color: var(--bg-main);
}

.edit-file-upload-btn {
  display: block;
  text-align: center;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.edit-footer-actions {
  padding: 1rem 2rem;
  border-top: 1px solid var(--border-color-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  border-radius: 0 0 8px 8px;
}

.edit-footer-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.edit-footer-actions button,
.edit-footer-actions a {
  padding: 0.6rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.edit-btn-delete {
  background: transparent;
  border: none !important;
  color: #c24a4a;
  text-decoration: none;
}
.edit-btn-delete:hover {
  background-color: rgba(194, 74, 74, 0.1);
  text-decoration: none;
}

.edit-btn-cancel {
  background: transparent;
  border: none !important;
  color: var(--text-main);
  text-decoration: none;
  padding-right: 15px;
}
.edit-btn-cancel:hover {
  background-color: var(--bg-main);
  text-decoration: none;
}

.edit-btn-save {
  background-color: var(--bg-button);
  color: var(--bg-main);
  border: none !important;
}
