:root {
  --blue-600: #2563EB;
  --blue-500: #3B82F6;
  --blue-400: #60A5FA;
  --blue-100: #DBEAFE;
  --blue-50: #EFF6FF;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --green: #10B981;
  --yellow: #F59E0B;
  --red: #EF4444;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.06), 0 4px 6px rgba(0,0,0,0.04);
  --bg: var(--gray-50);
  --card-bg: var(--white);
  --card-border: var(--gray-200);
  --text-primary: var(--gray-800);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-400);
  --input-bg: var(--white);
  --input-border: var(--gray-300);
  --table-header-bg: var(--blue-50);
  --table-hover: var(--blue-50);
  --table-border: var(--gray-100);
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --card-border: #334155;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --input-bg: #1e293b;
  --input-border: #334155;
  --table-header-bg: #1e293b;
  --table-hover: #334155;
  --table-border: #334155;
  --blue-50: #1e293b;
  --blue-100: #1e3a5f;
  --white: #1e293b;
  --gray-50: #0f172a;
  --gray-100: #1e293b;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-800: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.4);
}

[data-theme="dark"] .header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

[data-theme="dark"] .film-strip {
  background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%);
  border-color: rgba(255,255,255,0.03);
}

[data-theme="dark"] .stat-card {
  background: var(--card-bg);
  border-color: var(--card-border);
}

[data-theme="dark"] .card {
  background: var(--card-bg);
  border-color: var(--card-border);
}

[data-theme="dark"] .sub-card {
  background: var(--card-bg);
  border-color: var(--card-border);
}

[data-theme="dark"] .modal {
  background: var(--card-bg);
}

[data-theme="dark"] .quick-btn {
  background: var(--card-bg);
  border-color: var(--card-border);
  color: var(--text-secondary);
}

[data-theme="dark"] .quick-btn:hover {
  border-color: var(--blue-400);
  color: var(--blue-400);
  background: rgba(37,99,235,0.1);
}

[data-theme="dark"] .toolbar input,
[data-theme="dark"] .toolbar select,
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-primary);
}

[data-theme="dark"] .sub-cover-placeholder {
  background: linear-gradient(135deg, #1e293b, #334155);
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #334155 25%, #1e293b 50%, #334155 75%);
  background-size: 200% 100%;
}

[data-theme="dark"] .toast {
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

[data-theme="dark"] .log-panel {
  background: var(--card-bg);
  border-color: var(--card-border);
}

[data-theme="dark"] .theme-toggle {
  background: rgba(255,255,255,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Source Han Sans SC', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
  background: linear-gradient(135deg, #1a3a8a 0%, #2563EB 40%, #60A5FA 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(37,99,235,0.3);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 14px;
}
.header h1 {
  font-size: 2.6em;
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1.2;
}
.header h1 .year {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 2px 12px;
  border-radius: 6px;
  font-size: 0.4em;
  font-weight: 600;
  letter-spacing: 1px;
  margin-left: 12px;
  vertical-align: middle;
}
.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9em;
  opacity: 0.8;
  margin-top: 6px;
}
.header-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Tabs */
.tabs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 2px;
  position: relative;
}
.tabs::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: rgba(255,255,255,0.15);
}
.tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab:hover { color: white; background: rgba(255,255,255,0.1); }
.tab.active {
  background: var(--gray-50);
  color: var(--blue-600);
  font-weight: 600;
}
.tab .badge {
  background: rgba(255,255,255,0.2);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.75em;
}
.tab.active .badge {
  background: var(--blue-100);
  color: var(--blue-600);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 600;
  font-size: 0.95em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: 20px; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  border-radius: var(--radius) var(--radius) 0 0;
}
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
.stat-card .icon { font-size: 1.8em; margin-bottom: 8px; }
.stat-card .label { font-size: 0.8em; color: var(--gray-500); margin-bottom: 4px; }
.stat-card .value { font-size: 1.8em; font-weight: 700; }
.stat-card .value.blue { color: var(--blue-600); }
.stat-card .value.green { color: var(--green); }
.stat-card .value.yellow { color: var(--yellow); }
.stat-card .value.gold { color: #D97706; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 0.88em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--blue-600);
  color: white;
}
.btn-primary:hover { background: var(--blue-500); }
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
}
.btn-ghost:hover { background: var(--gray-100); }
.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid #FCA5A5;
}
.btn-danger:hover { background: #FEF2F2; }
.btn-sm { padding: 5px 10px; font-size: 0.8em; }

/* Form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.82em;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.9em;
  color: var(--gray-800);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-group textarea { resize: vertical; min-height: 60px; }

/* Status Badge */
.status {
  display: inline-block;
  text-align: center;
  padding: 3px 0;
  border-radius: 20px;
  font-size: 0.72em;
  font-weight: 500;
  white-space: nowrap;
  width: 90px;
}
.status-pending { background: #FEF3C7; color: #92400E; }
.status-scored { background: #E0E7FF; color: #3730A3; }
.status-passed { background: #D1FAE5; color: #065F46; }
.status-failed { background: #FEE2E2; color: #991B1B; }
.status-final-pending { background: #DBEAFE; color: #1E40AF; }
.status-final-scored { background: #E0E7FF; color: #3730A3; }

/* Submission Cards */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.sub-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.sub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #60A5FA, #2563EB, #60A5FA);
  z-index: 1;
}
.sub-card:hover {
  box-shadow: 0 12px 24px rgba(37,99,235,0.12);
  transform: translateY(-3px);
}
.sub-cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--gray-100);
  display: block;
}
.sub-cover-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5em;
  color: var(--blue-400);
}
.sub-info { padding: 14px 16px; }
.sub-title {
  font-weight: 600;
  font-size: 0.95em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-title a { color: var(--gray-800); }
.sub-title a:hover { color: var(--blue-600); }
.sub-meta {
  font-size: 0.8em;
  color: var(--gray-500);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.sub-meta span { display: flex; align-items: center; gap: 4px; }
.sub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.sub-score {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--blue-600);
}

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88em; }
th {
  background: var(--blue-50);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 2px solid var(--blue-100);
  white-space: nowrap;
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}
tr:hover td { background: var(--blue-50); }

/* Search & Filter Bar */
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar input, .toolbar select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.88em;
  outline: none;
  background: var(--white);
}
.toolbar input:focus, .toolbar select:focus {
  border-color: var(--blue-500);
}
.toolbar input { flex: 1; min-width: 200px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.88em;
  font-weight: 500;
  color: white;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.info { background: var(--blue-600); }

/* Loading bar */
.loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  z-index: 9999;
  transition: width 0.3s;
  display: none;
}
.loading-bar.active {
  display: block;
  animation: loading-progress 1.5s ease-in-out infinite;
}
@keyframes loading-progress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 95%; }
}

/* Button loading state */
.btn.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}
.btn.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 6px;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}
.modal-header button {
  background: none;
  border: none;
  font-size: 1.3em;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
}
.modal-body { padding: 20px; }
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Empty */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}
.empty .icon { font-size: 3em; margin-bottom: 12px; }
.empty p { font-size: 0.9em; }

/* Actions */
.actions { display: flex; gap: 6px; }

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.quick-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--white);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  color: var(--gray-600);
  font-size: 0.92em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.quick-btn:hover {
  border-color: var(--blue-400);
  color: var(--blue-600);
  background: var(--blue-50);
}
.quick-btn .q-icon { font-size: 1.5em; }

/* Highlight card */
.sub-card.highlight {
  box-shadow: 0 0 0 3px var(--blue-400), 0 12px 24px rgba(37,99,235,0.15);
  transform: translateY(-3px);
}

/* Recent item clickable */
.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}
.recent-item:hover { background: var(--blue-50); }
.recent-item:last-child { border-bottom: none; }

/* Image upload */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-500);
  font-size: 0.85em;
  position: relative;
  overflow: hidden;
}
.upload-area:hover {
  border-color: var(--blue-400);
  background: var(--blue-50);
}
.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-preview {
  max-width: 100%;
  max-height: 120px;
  border-radius: 6px;
  margin-top: 8px;
  display: none;
}

/* Overview Cards */
.overview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 700px) {
  .overview-row { grid-template-columns: 1fr; }
}

/* Film Strip Decoration */
.film-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 24px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}
.film-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(37,99,235,0.1) 20%,
    rgba(96,165,250,0.15) 50%,
    rgba(37,99,235,0.1) 80%,
    transparent 100%
  );
  animation: film-glow 3s ease-in-out infinite;
}
@keyframes film-glow {
  0%, 100% { opacity: 0.5; transform: translateX(-10%); }
  50% { opacity: 1; transform: translateX(10%); }
}

.film-strip .holes-left,
.film-strip .holes-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}
.film-strip .hole {
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  animation: hole-pulse 2s ease-in-out infinite;
}
.film-strip .hole:nth-child(2) { animation-delay: 0.3s; }
.film-strip .hole:nth-child(3) { animation-delay: 0.6s; }
@keyframes hole-pulse {
  0%, 100% { background: rgba(255,255,255,0.08); }
  50% { background: rgba(255,255,255,0.18); }
}

.film-strip .frame {
  flex: 1;
  height: 48px;
  background: linear-gradient(90deg,
    rgba(37,99,235,0.3) 0%,
    rgba(59,130,246,0.5) 30%,
    rgba(96,165,250,0.6) 50%,
    rgba(59,130,246,0.5) 70%,
    rgba(37,99,235,0.3) 100%
  );
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05em;
  color: white;
  font-weight: 700;
  letter-spacing: 3px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 1;
}
.film-strip .frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.15),
    transparent
  );
  animation: frame-shine 4s ease-in-out infinite;
}
@keyframes frame-shine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}
.film-strip .frame span {
  position: relative;
  z-index: 1;
  text-shadow: 0 0 20px rgba(96,165,250,0.5);
  animation: text-glow 2s ease-in-out infinite alternate;
}
@keyframes text-glow {
  0% { text-shadow: 0 0 10px rgba(96,165,250,0.3); }
  100% { text-shadow: 0 0 25px rgba(96,165,250,0.6), 0 0 50px rgba(37,99,235,0.2); }
}

/* Film sprocket holes - top/bottom edge */
.film-strip::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 28px, rgba(255,255,255,0.04) 28px, rgba(255,255,255,0.04) 32px);
  pointer-events: none;
}

/* MAD Badge */
.mad-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--blue-600), #7C3AED);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.mad-badge::before {
  content: '✦';
  font-size: 0.9em;
}

/* Dark mode toggle */
.theme-toggle {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 1.2em;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.1);
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  height: 100px;
  border-radius: var(--radius);
}
.skeleton-row {
  height: 48px;
  margin-bottom: 8px;
}
.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}
.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }

/* Empty state illustration */
.empty-illust {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-illust .illust-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  opacity: 0.6;
}
.empty-illust .illust-icon svg {
  width: 100%;
  height: 100%;
}
.empty-illust .illust-title {
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.empty-illust .illust-desc {
  font-size: 0.85em;
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
}

/* Operation log */
.log-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 360px;
  max-height: 400px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.log-panel.open { display: flex; }
.log-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  font-weight: 600;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
}
.log-header button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1em;
}
.log-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.log-item {
  padding: 8px 16px;
  font-size: 0.8em;
  border-bottom: 1px solid var(--table-border);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.log-item .log-time {
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 0.9em;
  min-width: 50px;
}
.log-item .log-msg {
  flex: 1;
  color: var(--text-secondary);
}
.log-toggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 299;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}
.log-toggle:hover {
  border-color: var(--blue-400);
  color: var(--blue-600);
}
