:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.navbar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

main {
  flex: 1;
  padding: 2rem 0;
}

.footer {
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.upload-section {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.upload-section h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.subtitle {
  color: var(--gray-500);
  margin-bottom: 2rem;
}

.upload-form {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.drop-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1.5rem;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: #f5f3ff;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--gray-400);
}

.drop-zone p {
  color: var(--gray-500);
}

.browse-link {
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

.hint {
  color: var(--gray-400);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* Upload Tabs */
.upload-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.upload-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.2s;
}

.upload-tab:hover {
  border-color: var(--gray-300);
}

.upload-tab.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #f5f3ff;
}

.upload-panel {
  min-height: 200px;
}

/* Google Drive */
/* When picker is shown, never show connect card */
#gdrive-panel:has(#gdrive-picker:not([hidden])) #gdrive-connect {
  display: none !important;
}

/* When connect or picker is shown (Google Drive configured), never show "not configured" card */
#gdrive-panel:has(#gdrive-connect:not([hidden])) #gdrive-not-configured,
#gdrive-panel:has(#gdrive-picker:not([hidden])) #gdrive-not-configured {
  display: none !important;
}

.gdrive-connect,
.gdrive-not-configured {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  min-height: 200px;
}

.gdrive-connect p,
.gdrive-not-configured p {
  color: var(--gray-600);
  margin: 1rem 0;
}

.gdrive-not-configured small {
  color: var(--gray-400);
}

.btn-gdrive {
  background: #4285F4;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-gdrive:hover {
  background: #3367D6;
}

.gdrive-picker {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.gdrive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-weight: 500;
}

.gdrive-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gdrive-account {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--gray-500);
}

.gdrive-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.875rem;
}

.breadcrumb-item {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0.25rem 0;
  font-size: inherit;
}

.breadcrumb-item:hover {
  text-decoration: underline;
}

.breadcrumb-item:not(:last-child)::after {
  content: ' › ';
  color: var(--gray-400);
  pointer-events: none;
  margin-left: 0.25rem;
}

.breadcrumb-item.current {
  color: var(--gray-700);
  cursor: default;
  font-weight: 500;
}

.breadcrumb-item.current::after {
  display: none;
}

.gdrive-toolbar {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--gray-100);
}

.btn-default-folder {
  font-size: 0.8125rem;
  color: var(--gray-600);
  background: transparent;
}

.btn-default-folder:hover {
  color: var(--primary);
}

.btn-default-folder.is-default {
  color: var(--success);
}

.btn-disconnect {
  color: var(--danger);
  font-size: 0.8125rem;
  text-decoration: none;
}

.btn-disconnect:hover {
  text-decoration: underline;
}

.gdrive-files {
  max-height: 250px;
  overflow-y: auto;
}

.gdrive-loading {
  padding: 2rem;
  text-align: center;
  color: var(--gray-400);
}

.gdrive-file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.15s;
}

.gdrive-file:hover {
  background: var(--gray-50);
}

.gdrive-file.selected {
  background: #f5f3ff;
}

.gdrive-file-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.gdrive-file-icon {
  color: #EA4335;
}

.gdrive-file-info {
  flex: 1;
  min-width: 0;
}

.gdrive-file-name {
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gdrive-file-meta {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.gdrive-folder {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.15s;
}

.gdrive-folder:hover {
  background: var(--gray-50);
}

.gdrive-folder-icon {
  color: #FFBA00;
}

.gdrive-folder-name {
  font-weight: 500;
  color: var(--gray-800);
}

.gdrive-list-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--gray-50);
}

.gdrive-list-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  padding: 0.5rem 1rem;
}

.gdrive-list-section-header .gdrive-list-section-title {
  padding: 0;
}

.gdrive-select-all.btn-link {
  background: none;
  border: none;
  font-size: 0.8125rem;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
}

.gdrive-select-all.btn-link:hover {
  text-decoration: underline;
}

.gdrive-selected {
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  font-weight: 500;
  color: var(--primary);
}

.gdrive-empty {
  padding: 2rem;
  text-align: center;
  color: var(--gray-400);
}

.gdrive-error {
  color: var(--gray-700);
}

.gdrive-error p {
  margin: 0.5rem 0;
}

.gdrive-error a {
  color: var(--primary);
}

.file-list {
  text-align: left;
}

.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.file-list-header span {
  font-weight: 500;
  color: var(--gray-700);
}

.btn-clear {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-clear:hover {
  text-decoration: underline;
}

.file-items {
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

.file-item-name {
  flex: 1;
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size {
  color: var(--gray-400);
  font-size: 0.8125rem;
}

.btn-remove-item {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--gray-400);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.btn-remove-item:hover {
  color: var(--danger);
}

.mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mode-option {
  cursor: pointer;
}

.mode-option input {
  display: none;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all 0.2s;
  gap: 0.375rem;
}

.mode-card svg {
  width: 32px;
  height: 32px;
  color: var(--gray-400);
  margin-bottom: 0.25rem;
}

.mode-card strong {
  color: var(--gray-800);
  font-size: 1rem;
}

.mode-card span {
  color: var(--gray-600);
  font-size: 0.8125rem;
}

.mode-card small {
  color: var(--gray-400);
  font-size: 0.75rem;
}

.mode-option input:checked + .mode-card {
  border-color: var(--primary);
  background: #f5f3ff;
}

.mode-option input:checked + .mode-card svg {
  color: var(--primary);
}

.mode-card:hover {
  border-color: var(--gray-300);
}

.mode-option input:checked + .mode-card:hover {
  border-color: var(--primary);
}

.options {
  text-align: left;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.split-options {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: var(--radius);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  color: var(--gray-700);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.progress-section {
  margin-top: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.progress-section h3 {
  margin-bottom: 1rem;
  color: var(--gray-700);
}

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.progress-item {
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border-left: 3px solid var(--gray-300);
}

.progress-item.success {
  border-left-color: var(--success);
}

.progress-item.error {
  border-left-color: var(--danger);
}

.progress-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-item-name {
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-item-status {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.progress-item.success .progress-item-status {
  color: var(--success);
}

.progress-item.error .progress-item-status {
  color: var(--danger);
}

.progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s;
}

.progress-item.success .progress-fill {
  background: var(--success);
}

.progress-item.error .progress-fill {
  background: var(--danger);
}

.progress-text {
  margin-top: 0.75rem;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.result-section {
  margin-top: 2rem;
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.result-success, .result-error {
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  color: var(--success);
  margin-bottom: 1rem;
}

.error-icon {
  width: 64px;
  height: 64px;
  color: var(--danger);
  margin-bottom: 1rem;
}

.result-section h2 {
  margin-bottom: 0.5rem;
}

.result-section p {
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.result-section > div > .btn {
  margin: 0 0.5rem;
}

.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.download-links .btn {
  font-size: 0.8125rem;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.download-section {
  max-width: 1100px;
  margin: 0 auto;
}

.download-section h1 {
  margin-bottom: 0.5rem;
}

.download-section .subtitle {
  margin-bottom: 2rem;
}

.file-list-preview {
  color: var(--gray-500);
  font-weight: normal;
}

.folder-section {
  margin-bottom: 2.5rem;
}

.folder-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-200);
}

.folder-icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.folder-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.folder-count {
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.btn-zip {
  margin-left: auto;
  background: var(--success);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.btn-zip:hover {
  background: #059669;
}

.btn-zip-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.image-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.image-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.image-card-footer {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.image-name {
  font-weight: 500;
  color: var(--gray-700);
  font-size: 0.875rem;
}

.actions {
  text-align: center;
}

/* Admin */
.admin-section {
  max-width: 1000px;
  margin: 0 auto;
}

.admin-section h1 {
  margin-bottom: 1.5rem;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin-bottom: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  border-left: 4px solid var(--gray-300);
}

.stat-card.stat-success {
  border-left-color: var(--success);
}

.stat-card.stat-warning {
  border-left-color: var(--warning);
}

.stat-card.stat-error {
  border-left-color: var(--danger);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.stat-label {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2 {
  font-size: 1.125rem;
}

.card-body {
  padding: 1.5rem;
}

.card-body.no-padding {
  padding: 0;
}

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

.table th, .table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.table th {
  font-weight: 600;
  color: var(--gray-600);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--gray-50);
}

.table td.filename {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table td.actions {
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

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

.badge-processing {
  background: #dbeafe;
  color: #1e40af;
}

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

.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

.tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 4px;
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

.empty-state {
  text-align: center;
  color: var(--gray-400);
  padding: 2rem;
}

.inline-form {
  display: inline;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.page-info {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-item.full-width {
  grid-column: span 2;
}

.detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  font-weight: 600;
}

.detail-value {
  color: var(--gray-800);
}

.detail-value.mono {
  font-family: monospace;
  font-size: 0.875rem;
  word-break: break-all;
}

.error-text {
  color: var(--danger);
}

.image-grid-small {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.image-card-small {
  background: var(--gray-50);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}

.image-card-small img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.image-card-small .image-name {
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-600);
}

.actions-bar {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
}

.login-card {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

.login-card h1 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group small {
  display: block;
  margin-top: 0.375rem;
  color: var(--gray-500);
  font-size: 0.8125rem;
}

.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-actions {
  margin-top: 2rem;
}

.settings-info {
  background: var(--gray-50);
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.settings-info a {
  color: var(--primary);
}

.settings-info code {
  background: var(--gray-200);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.8125rem;
}

.env-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.env-label {
  font-weight: 500;
  color: var(--gray-600);
}

.env-value {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.env-configured {
  background: #d1fae5;
  color: #065f46;
}

.env-not-configured {
  background: #fee2e2;
  color: #991b1b;
}

.setup-instructions {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.setup-instructions h4 {
  margin: 0 0 1rem 0;
  color: var(--gray-800);
  font-size: 1rem;
}

.setup-instructions ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--gray-700);
  line-height: 1.8;
}

.setup-instructions li {
  margin-bottom: 0.5rem;
}

.setup-instructions ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.setup-instructions ul li {
  margin-bottom: 0.25rem;
}

.setup-instructions a {
  color: var(--primary);
}

.setup-instructions code {
  background: var(--gray-200);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.8125rem;
}

.setup-instructions pre {
  background: var(--gray-800);
  color: #e5e7eb;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.troubleshooting {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
}

.troubleshooting h4 {
  margin: 0 0 0.5rem 0;
  color: var(--danger);
  font-size: 0.9375rem;
}

.troubleshooting p {
  margin: 0 0 0.75rem 0;
  color: var(--gray-600);
  font-size: 0.875rem;
}

.troubleshooting ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.error-page {
  text-align: center;
  padding: 4rem 2rem;
}

.error-page h1 {
  margin-bottom: 1rem;
  color: var(--danger);
}

.error-page p {
  color: var(--gray-500);
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-item.full-width {
    grid-column: span 1;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.875rem;
  }

  .table {
    font-size: 0.875rem;
  }
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
  line-height: 1;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.image-card img,
.image-card-small img {
  cursor: pointer;
}
