* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f4f5f7;
  color: #1f2430;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #1f2430;
  color: #d1d5db;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.sidebar-logo span {
  color: #7c93ff;
}

.sidebar-link {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.9rem;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
  background: #3b5bdb;
  color: #fff;
  font-weight: 600;
}

.sidebar-link-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.app-content {
  flex: 1;
  min-width: 0;
}

.sidebar-user {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-user-name {
  font-size: 0.85rem;
  color: #d1d5db;
  word-break: break-word;
}

.sidebar-logout {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #d1d5db;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  align-self: flex-start;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.08);
}

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

.auth-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0 1rem;
}

.auth-tab {
  flex: 1;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #4b5563;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.auth-tab.active {
  background: #3b5bdb;
  border-color: #3b5bdb;
  color: #fff;
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #4b5563;
}

.auth-form input {
  padding: 0.5rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
}

.auth-error {
  color: #b91c1c;
  font-size: 0.8rem;
  margin: 0;
  min-height: 1em;
}

.auth-divider {
  margin: 1.25rem 0;
  color: #9ca3af;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.google-button {
  display: block;
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.google-button:hover {
  background: #f3f4f6;
}

.header {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
}

.logo span {
  color: #3b5bdb;
}

.tagline {
  color: #6b7280;
  margin: 0.25rem 0 0;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem;
}

.dropzone {
  border: 2px dashed #a5b4fc;
  border-radius: 12px;
  background: #fff;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.drag-over {
  border-color: #3b5bdb;
  background: #eef1ff;
}

.dropzone-text {
  margin: 0 0 1rem;
  color: #4b5563;
}

.select-button {
  border: none;
  background: #3b5bdb;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}

.select-button:hover {
  background: #2f47b0;
}

.formats {
  margin-top: 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
}

.formats-label {
  margin-right: 0.5rem;
}

.badge {
  display: inline-block;
  background: #e5e7eb;
  color: #374151;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin: 0 0.15rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.batch-bar {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.batch-count {
  color: #4b5563;
  font-size: 0.85rem;
  flex: 1;
}

.batch-status {
  color: #b91c1c;
  font-size: 0.8rem;
}

.processing-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.file-card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #d1d5db;
}

.file-card.status-uploading {
  border-left-color: #f59e0b;
}

.file-card.status-processing {
  border-left-color: #3b5bdb;
}

.file-card.status-done {
  border-left-color: #22c55e;
}

.file-card.status-error {
  border-left-color: #ef4444;
}

.file-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.file-name {
  font-weight: 600;
  word-break: break-all;
}

.file-type {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
}

.file-status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #4b5563;
}

.progress-bar {
  margin-top: 0.5rem;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #3b5bdb;
  width: 0%;
  transition: width 0.2s ease;
}

.file-error {
  margin-top: 0.5rem;
  color: #b91c1c;
  font-size: 0.85rem;
}

.result {
  margin-top: 0.75rem;
}

.result-text {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: 0.85rem;
  margin: 0;
}

.result-toggle {
  background: none;
  border: none;
  color: #3b5bdb;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.4rem 0;
}

.result-table-wrapper {
  overflow-x: auto;
  margin-top: 0.5rem;
}

.result-table {
  border-collapse: collapse;
  font-size: 0.8rem;
  width: 100%;
}

.result-table th,
.result-table td {
  border: 1px solid #e5e7eb;
  padding: 0.3rem 0.5rem;
  text-align: left;
}

.result-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.download-button {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

.download-button:hover {
  background: #f3f4f6;
}

.download-button.download-link {
  display: inline-block;
  text-decoration: none;
}

.pending-list {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pending-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.3rem 0.5rem 0.3rem 0.75rem;
  font-size: 0.8rem;
}

.pending-chip-remove {
  border: none;
  background: #e5e7eb;
  color: #374151;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0;
}

.media-options {
  margin-top: 1rem;
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.media-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #4b5563;
}

.media-field select,
.media-field input {
  padding: 0.4rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
}

.media-category-note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.5rem;
}
