.admin-nav {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}

.admin-nav-content {
  display: flex;
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
  justify-content: center;
}

.admin-nav-tab {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}

.admin-nav-tab:hover {
  color: var(--text);
}

.admin-nav-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Language Tabs (shared between frontend and admin) */
.lang-tabs {
  background: white;
  padding: 16px 0 0;
  border-bottom: none;
}

.lang-tabs-content {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  justify-content: center;
}

.lang-tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-tab:hover {
  color: var(--text);
}

.lang-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 20px;
}

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

.admin-header h1 {
  font-size: 28px;
  color: var(--text);
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.upload-section {
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
  padding: 0 30px;
  margin-bottom: 0;
}

.upload-section.expanded {
  max-height: 500px;
  opacity: 1;
  padding: 30px;
  margin-bottom: 30px;
}

.upload-section h2 {
  margin-bottom: 20px;
  font-size: 20px;
}

.status-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.status-filter-btn {
  padding: 6px 16px;
  border-radius: 20px;
  background: white;
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.status-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.status-filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.project-list {
  background: white;
  border-radius: var(--radius);
  overflow: visible;
  box-shadow: var(--shadow);
}

.project-list-header {
  padding: 15px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
}

.project-item:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.project-item:last-child {
  border-bottom: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.project-item:hover {
  background: var(--bg);
}

.project-item.dragging {
  opacity: 0.5;
  background: var(--accent-green);
}

.project-item-cover {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
  font-size: 20px;
  position: relative;
}

.project-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.project-item-info {
  flex: 1;
  min-width: 0;
}

.project-item-title {
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-item-meta {
  font-size: 12px;
  color: var(--text-light);
}

.project-item-actions {
  position: relative;
}

.card-menu {
  position: absolute !important;
  top: 15px !important;
  right: 20px !important;
}

.dropdown-menu {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  font-size: 18px !important;
  padding: 4px 8px !important;
  letter-spacing: 2px;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 120px;
  z-index: 100;
  overflow: hidden;
}

.dropdown-content.show {
  display: block;
}

.dropdown-content button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background 0.2s;
}

.dropdown-content button:hover {
  background: var(--bg);
}

.dropdown-content button.danger {
  color: var(--accent-pink);
}

.dropdown-content button.danger:hover {
  background: #fff0f0;
}

.drag-handle {
  cursor: move;
  padding: 5px;
  color: var(--text-light);
  margin-right: 10px;
}

.pin-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--primary);
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  z-index: 10;
}

.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 42px;
  cursor: text;
}

.tags-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--primary);
  color: white;
  border-radius: 12px;
  font-size: 12px;
}

.tag-item button {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 14px;
  padding: 0;
  cursor: pointer;
}

.tags-input input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 100px;
  font-size: 14px;
}

.edit-file-section {
  margin-top: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.edit-file-section label {
  font-size: 13px;
  color: var(--text-light);
  display: block;
  margin-bottom: 6px;
}

.kb-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.kb-key-row input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

.kb-key-row .kb-remove-btn {
  background: none;
  border: none;
  color: var(--accent-pink);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

.kb-key-row .kb-label {
  font-size: 12px;
  color: var(--text-light);
  min-width: 30px;
}

.kb-drag-handle {
  cursor: grab;
  color: var(--text-light);
  font-size: 14px;
  padding: 0 6px;
  user-select: none;
}

.kb-drag-handle:active {
  cursor: grabbing;
}

.kb-key-row.kb-dragging {
  opacity: 0.5;
  background: var(--accent-green);
}

.kb-key-row.kb-drag-over {
  border-top: 2px solid var(--primary);
}

.kb-key-row .kb-key-input {
  cursor: pointer;
  background: var(--bg);
}

.kb-picker-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.kb-picker-overlay.active {
  display: flex;
}

.kb-picker {
  background: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.kb-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.kb-picker-header h3 {
  margin: 0;
  font-size: 18px;
}

.kb-picker-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  padding: 0 8px;
}

.kb-picker-section {
  margin-bottom: 16px;
}

.kb-picker-section-title {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.kb-picker-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kb-picker-key {
  min-width: 40px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.kb-picker-key:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.kb-picker-key.kb-selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.kb-picker-key.kb-wide {
  min-width: 70px;
}

@media (max-width: 768px) {
  .admin-container {
    padding: 20px 14px;
  }

  .admin-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
  }

  .admin-actions {
    justify-content: flex-end;
  }

  .admin-header h1 {
    font-size: 22px;
  }

  .admin-nav-tab {
    padding: 12px 16px;
    font-size: 13px;
  }

  .project-item {
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 8px;
  }

  .project-item-cover {
    width: 48px;
    height: 36px;
    margin-right: 10px;
  }

  .project-item-actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
  }

  .drag-handle {
    padding: 2px;
    margin-right: 6px;
  }
}

@media (max-width: 480px) {
  .admin-container {
    padding: 14px 10px;
  }

  .admin-header h1 {
    font-size: 20px;
  }

  .upload-section.expanded {
    padding: 20px 14px;
  }

  .status-filter {
    gap: 6px;
  }

  .status-filter-btn {
    padding: 5px 12px;
    font-size: 12px;
  }

  .project-list-header {
    padding: 12px 14px;
    font-size: 13px;
  }

  .project-item {
    padding: 10px 12px;
  }

  .project-item-cover {
    width: 40px;
    height: 30px;
    margin-right: 8px;
    font-size: 16px;
  }

  .project-item-title {
    font-size: 13px;
  }

  .project-item-meta {
    font-size: 11px;
  }

  .tags-input {
    padding: 6px;
    min-height: 38px;
  }

  .tags-input input {
    min-width: 80px;
    font-size: 13px;
  }
}
