/* ============================================
   AudioVault — Premium Design System
   Netflix Backlot-inspired Dark Theme
   ============================================ */

/* === CSS Variables (Design Tokens) === */
:root {
  /* Colors */
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1629;
  --bg-tertiary: #161d35;
  --bg-card: rgba(22, 29, 53, 0.7);
  --bg-card-hover: rgba(30, 39, 68, 0.8);
  --bg-glass: rgba(22, 29, 53, 0.5);

  --text-primary: #e8ecf4;
  --text-secondary: #94a3c4;
  --text-muted: #5a6788;
  --text-inverse: #0a0e1a;

  --accent-primary: #818cf8;
  --accent-primary-hover: #6366f1;
  --accent-secondary: #c084fc;
  --accent-gradient: linear-gradient(135deg, #818cf8, #c084fc);
  --accent-gradient-hover: linear-gradient(135deg, #6366f1, #a855f7);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.12);

  --border: rgba(99, 115, 155, 0.15);
  --border-hover: rgba(129, 140, 248, 0.3);
  --border-accent: rgba(129, 140, 248, 0.5);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(129, 140, 248, 0.15);
  --shadow-glow-strong: 0 0 60px rgba(129, 140, 248, 0.25);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* === Reset & Base === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 0.925rem;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* === Utility Classes === */
.hidden {
  display: none !important;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.glass-card:hover {
  border-color: var(--border-hover);
}

/* === Loading Overlay === */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  color: white;
}

.overlay-content {
  text-align: center;
  width: 90%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.05);
  padding: 48px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.overlay-content h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.overlay-content p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.overlay-progress-container {
  width: 100%;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

#overlay-progress-percent {
  font-weight: 800;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 1rem;
}

#overlay-progress-name {
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   AUTH PAGE
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-background {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.auth-gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #818cf8, transparent);
  top: 10%;
  left: 15%;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #c084fc, transparent);
  top: 50%;
  right: 10%;
  animation-delay: -3s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #818cf8, transparent);
  bottom: 10%;
  left: 40%;
  animation-delay: -5s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(20px, -30px) scale(1.05);
  }

  50% {
    transform: translate(-15px, 20px) scale(0.95);
  }

  75% {
    transform: translate(10px, 15px) scale(1.02);
  }
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 24px;
}

.auth-branding {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  display: inline-block;
  margin-bottom: 16px;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.3));
  }

  50% {
    filter: drop-shadow(0 0 25px rgba(129, 140, 248, 0.6));
  }
}

.auth-title {
  font-size: 2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.925rem;
  margin-top: 4px;
}

.auth-card {
  padding: 32px;
}

.auth-tabs {
  display: flex;
  position: relative;
  margin-bottom: 28px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  position: relative;
  z-index: 2;
}

.auth-tab.active {
  color: var(--text-primary);
}

.auth-tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  transition: transform var(--transition-base);
  z-index: 1;
}

.auth-tab-indicator.register {
  transform: translateX(100%);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.required {
  color: var(--error);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.input-wrapper input:focus~.input-icon,
.input-wrapper input:focus+.input-icon {
  color: var(--accent-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrapper input {
  padding-left: 44px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6788' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.auth-demo {
  margin-top: 20px;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.auth-demo p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-demo code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(129, 140, 248, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-primary);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 2px 12px rgba(129, 140, 248, 0.3);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.5);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--border-accent);
  color: var(--accent-primary);
  background: rgba(129, 140, 248, 0.05);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.btn-secondary {
  background: rgba(148, 163, 196, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 196, 0.2);
}

.btn-secondary:hover {
  background: rgba(148, 163, 196, 0.15);
  border-color: rgba(148, 163, 196, 0.4);
  color: var(--text-primary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-full {
  width: 100%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.btn-text:hover {
  opacity: 0.8;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* ============================================
   APP SHELL LAYOUT
   ============================================ */
#app-shell {
  display: flex;
  min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-base);
  overflow: hidden;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  min-height: 65px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand {
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.sidebar-toggle {
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.sidebar-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-gradient);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transform: scaleY(0);
  transition: transform var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: var(--accent-primary);
  background: rgba(129, 140, 248, 0.08);
}

.nav-link.active::before {
  transform: scaleY(1);
}

.nav-link svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  flex-shrink: 0;
  background: var(--accent-gradient);
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.btn-logout {
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  color: var(--error);
  background: var(--error-bg);
}

/* === Main Content === */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-base);
}

/* === Top Bar === */
.topbar {
  height: var(--topbar-height);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 26, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  color: var(--text-secondary);
  padding: 6px;
}

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.notification-btn {
  position: relative;
  padding: 8px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.notification-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  background: var(--error);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badge-pop {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

/* === Notification Panel === */
.notification-panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 380px;
  max-height: 480px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 200;
  animation: slide-down 0.2s ease-out;
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-panel-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.notification-panel-header h3 {
  font-size: 0.925rem;
  font-weight: 700;
}

.notification-list {
  max-height: 400px;
  overflow-y: auto;
}

.notification-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notification-item.unread {
  background: rgba(129, 140, 248, 0.04);
  border-left: 3px solid var(--accent-primary);
}

.notification-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.notification-dot.info {
  background: var(--info);
}

.notification-dot.success {
  background: var(--success);
}

.notification-dot.warning {
  background: var(--warning);
}

.notification-dot.error {
  background: var(--error);
}

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

.notification-title {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.notification-message {
  font-size: 0.775rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notification-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.notification-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* === Page Content === */
.page-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

.content-page {
  animation: page-fade-in 0.3s ease-out;
}

@keyframes page-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.dashboard-section {
  margin-bottom: 28px;
}

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

.section-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

/* === Quick Actions === */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.action-card {
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-accent);
}

.action-icon {
  color: var(--accent-primary);
  margin-bottom: 14px;
}

.action-card h4 {
  font-size: 0.925rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.action-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ============================================
   DATA TABLE
   ============================================ */
.submissions-table-container {
  overflow-x: auto;
  padding: 0;
}

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

.data-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.data-table td {
  padding: 14px 18px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.empty-row td {
  text-align: center;
  padding: 40px 18px;
  color: var(--text-muted);
}

/* === Status Badges === */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.draft {
  background: rgba(148, 163, 196, 0.12);
  color: #94a3c4;
}

.status-badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-badge.validating {
  background: var(--info-bg);
  color: var(--info);
}

.status-badge.accepted {
  background: var(--success-bg);
  color: var(--success);
}

.status-badge.rejected {
  background: var(--error-bg);
  color: var(--error);
}

.status-badge.revision_needed {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================
   UPLOAD PAGE
   ============================================ */
.upload-container {
  max-width: 800px;
  margin: 0 auto;
}

.step-header {
  text-align: center;
  margin-bottom: 28px;
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
}

.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-secondary);
  transition: all var(--transition-base);
}

.step-dot.active {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(129, 140, 248, 0.1);
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.3);
}

.step-dot.completed {
  border-color: var(--success);
  color: white;
  background: var(--success);
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  transition: background var(--transition-base);
}

.step-line.active {
  background: var(--accent-gradient);
}

.step-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.submission-form {
  padding: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* === Upload Zone === */
.upload-zone {
  padding: 48px 24px;
  text-align: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.upload-zone:hover::before,
.upload-zone.drag-over::before {
  opacity: 0.04;
}

.upload-zone-content {
  position: relative;
  z-index: 1;
}

.upload-icon-animated {
  color: var(--accent-primary);
  margin-bottom: 16px;
  animation: upload-bounce 2s ease-in-out infinite;
}

@keyframes upload-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.upload-zone h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.upload-zone p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.upload-formats {
  margin-top: 12px;
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
}

/* === Upload Progress === */
.upload-progress {
  margin: 20px 0;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

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

.progress-header h4 {
  font-size: 0.85rem;
  font-weight: 600;
}

.progress-percent {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

.progress-bar-container {
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.3s ease-out;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

/* === File List === */
.uploaded-files {
  margin-top: 20px;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.file-item:hover {
  border-color: var(--border-hover);
}

.file-item.valid {
  border-left: 3px solid var(--success);
}

.file-item.invalid {
  border-left: 3px solid var(--error);
}

.file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
  background: rgba(129, 140, 248, 0.1);
  color: var(--accent-primary);
}

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

.file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  margin-top: 2px;
}

.file-errors {
  font-size: 0.75rem;
  color: var(--error);
  margin-top: 4px;
}

.file-status {
  flex-shrink: 0;
}

.file-status svg {
  width: 20px;
  height: 20px;
}

.file-delete-btn {
  padding: 6px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.file-delete-btn:hover {
  color: var(--error);
  background: var(--error-bg);
}

.upload-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ============================================
   SUBMISSIONS LIST
   ============================================ */
.submissions-header {
  margin-bottom: 20px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-select,
.filter-input {
  padding: 8px 12px;
  font-size: 0.8rem;
  min-width: 140px;
}

.submissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.submission-card {
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.submission-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  border-color: var(--border-accent);
}

.submission-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.submission-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.submission-card-author {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.submission-card-meta {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.submission-card-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.775rem;
  color: var(--text-muted);
}

.submission-card-meta svg {
  width: 14px;
  height: 14px;
}

/* === Empty State === */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.875rem;
  margin-bottom: 20px;
}

/* ============================================
   SUBMISSION DETAIL
   ============================================ */
.detail-header {
  margin-bottom: 20px;
}

.detail-info {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.detail-main {
  padding: 28px;
}

.detail-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.detail-author {
  color: var(--text-secondary);
  font-size: 0.925rem;
  margin-bottom: 20px;
}

.detail-metadata {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-field-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.detail-field-value {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-status-card {
  padding: 24px;
  text-align: center;
}

.detail-status-card h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.detail-actions {
  padding: 20px;
}

.detail-actions h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.detail-actions-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-actions-btns .btn {
  width: 100%;
}

.detail-files-section {
  margin-top: 8px;
}

.detail-files-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ============================================
   ADMIN PAGE
   ============================================ */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  width: fit-content;
}

.admin-tab {
  padding: 10px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.admin-tab.active {
  background: var(--accent-gradient);
  color: white;
}

.admin-tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.admin-panel {
  animation: page-fade-in 0.2s ease-out;
}

/* === Admin Row Actions === */
.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions .btn {
  padding: 6px 10px;
  font-size: 0.75rem;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modal-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-pop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  font-size: 1.5rem;
  color: var(--text-muted);
  padding: 4px 8px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
}

.modal-body .form-group {
  margin-bottom: 16px;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.toast {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toast-in 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.toast.success::before {
  background: var(--success);
}

.toast.error::before {
  background: var(--error);
}

.toast.warning::before {
  background: var(--warning);
}

.toast.info::before {
  background: var(--info);
}

@keyframes toast-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-exit {
  animation: toast-out 0.2s ease-in forwards;
}

@keyframes toast-out {
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 0.825rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.775rem;
  color: var(--text-secondary);
}

.toast-close {
  color: var(--text-muted);
  padding: 2px;
  font-size: 1rem;
  line-height: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .detail-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .page-content {
    padding: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .notification-panel {
    width: calc(100vw - 32px);
    right: -60px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-actions {
    flex-direction: column;
    gap: 12px;
  }

  .upload-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0 16px;
  }

  .auth-container {
    padding: 16px;
  }

  .auth-card {
    padding: 24px;
  }
}

/* ============================================
   NAMING CONVENTIONS PANEL
   ============================================ */
.naming-conventions {
  padding: 20px;
  margin-top: 16px;
  border: 1px dashed var(--border-hover);
}

.conventions-header {
  margin-bottom: 16px;
}

.conventions-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.conventions-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.conventions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.convention-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.convention-ext {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.ext-pdf {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.ext-docx {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.ext-xlsx {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.ext-audio {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.25);
}

.convention-info {
  min-width: 0;
}

.convention-info code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-primary);
  margin-bottom: 4px;
  word-break: break-all;
}

.convention-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.convention-info p code {
  display: inline;
  font-size: 0.72rem;
  background: rgba(129, 140, 248, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
}

/* === File List Enhancements === */
.file-group-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 14px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.group-rejected {
  color: #ef4444 !important;
  border-bottom: 2px solid rgba(239, 68, 68, 0.3) !important;
  background: rgba(239, 68, 68, 0.05);
  padding: 10px 12px !important;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-top: 16px;
}

.file-group-header:first-child {
  padding-top: 0;
}

.file-item .file-icon {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 48px;
  text-align: center;
}

.file-item .file-icon.ext-pdf {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.file-item .file-icon.ext-docx {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.file-item .file-icon.ext-xlsx {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.file-item .file-icon.ext-audio {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
}

.file-category-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(129, 140, 248, 0.1);
  color: var(--accent-primary);
}

.file-convention {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.file-error-line {
  font-size: 0.75rem;
  color: var(--error);
  padding: 2px 0;
  line-height: 1.4;
}

/* Role badges for naming conventions */
.role-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin: 4px 0;
}

.role-badge.required {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.role-badge.optional {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.ext-zip {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.conv-optional {
  opacity: 0.7;
  border-style: dashed;
}

.convention-sub {
  font-size: 0.68rem !important;
  color: var(--text-muted) !important;
  margin-top: 2px;
}

.convention-sub code {
  font-size: 0.68rem !important;
}

/* ============================================
   DRIVE IMPORT STYLES
   ============================================ */
.drive-import-container {
  padding: 32px;
  margin-bottom: 32px;
  background: rgba(129, 140, 248, 0.03);
  border: 1px dashed rgba(129, 140, 248, 0.3);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drive-import-header {
  display: flex;
  gap: 20px;
  align-items: center;
}

.drive-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 16px rgba(129, 140, 248, 0.2);
  flex-shrink: 0;
}

.drive-import-header h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.drive-import-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

#upload-step-2 a,
#upload-step-2 u {
  color: var(--text-secondary);
  text-decoration: underline;
  cursor: pointer;
}

.drive-input-group {
  display: flex;
  gap: 12px;
}

.drive-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(129, 140, 248, 0.2) !important;
}

.drive-input:focus {
  border-color: var(--accent-primary) !important;
  background: rgba(0, 0, 0, 0.6) !important;
}

.upload-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  opacity: 0.6;
}

.upload-divider::before,
.upload-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  min-width: 160px;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(129, 140, 248, 0.1);
}

/* ============================================
   UPLOAD PROGRESS STYLES
   ============================================ */
.upload-progress {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 32px;
  animation: slideIn var(--transition-base);
}

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

#progress-status {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

#progress-percent {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

.progress-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.3s ease-out;
  box-shadow: 0 0 15px rgba(129, 140, 248, 0.4);
}

/* === File Sub-progress === */
.file-progress-container {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}

.file-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

#file-progress-name {
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

#file-progress-percent {
  font-weight: 700;
  color: var(--accent-primary);
}

.file-progress-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.file-progress-bar {
  height: 100%;
  background: var(--accent-primary);
  opacity: 0.8;
  border-radius: var(--radius-full);
  transition: width 0.2s ease-out;
}

/* === Error Summary Display === */
.error-summary-container {
  margin-bottom: 24px;
  animation: slideIn 0.3s ease-out;
}

.error-summary-card {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 16px;
}

.error-summary-icon {
  width: 40px;
  height: 40px;
  background: var(--error-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--error);
}

.error-summary-content {
  flex: 1;
}

.error-summary-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.error-summary-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.error-summary-item {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.error-summary-item svg {
  margin-top: 3px;
  flex-shrink: 0;
}

/* Submission Card Error Badge */
.submission-card-error-count {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--error);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.submission-card-missing-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--warning);
  background: var(--warning-bg);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 8px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   ACTIVITY LOG PANEL
   ============================================ */

/* Activity Stats Grid */
.activity-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.activity-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.activity-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-stat-info {
  display: flex;
  flex-direction: column;
}

.activity-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  font-family: var(--font-mono);
}

.activity-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Activity Log Table Rows */
.activity-log-row {
  border-left: 3px solid transparent;
  transition: background var(--transition-fast);
}

.activity-log-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.activity-log-row.severity-info {
  border-left-color: var(--info);
}

.activity-log-row.severity-success {
  border-left-color: var(--success);
}

.activity-log-row.severity-warning {
  border-left-color: var(--warning);
}

.activity-log-row.severity-error {
  border-left-color: var(--error);
}

/* Severity Dots */
.severity-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.severity-info {
  background: var(--info-bg);
  color: var(--info);
}

.severity-success {
  background: var(--success-bg);
  color: var(--success);
}

.severity-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.severity-error {
  background: var(--error-bg);
  color: var(--error);
}

/* Action Badges */
.action-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.action-approve {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.action-reject {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.action-revision {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.action-submit {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.action-upload {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.action-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.action-info {
  background: rgba(148, 163, 196, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 196, 0.2);
}

/* Log Summary */
.log-summary {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Log Submission Link */
.log-submission-link {
  cursor: pointer;
  color: var(--accent-primary);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  transition: color var(--transition-fast);
}

.log-submission-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* Log Actor */
.log-actor {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.actor-system {
  background: rgba(129, 140, 248, 0.1);
  color: var(--accent-primary);
}

.actor-human {
  background: rgba(148, 163, 196, 0.1);
  color: var(--text-secondary);
}

/* Log Detail Button */
.log-detail-btn {
  padding: 4px 8px !important;
  font-size: 0.7rem !important;
  border-radius: var(--radius-sm) !important;
}

/* Log Detail Content */
.log-detail-content {
  max-height: 400px;
  overflow-y: auto;
}

.log-detail-json {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Auto-Processed Badge */
.auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.15), rgba(192, 132, 252, 0.15));
  color: var(--accent-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(192, 132, 252, 0.2);
  margin-left: 6px;
  vertical-align: middle;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
}

.pagination-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.activity-log-pagination {
  margin-top: 8px;
}

/* Responsive for activity stats */
@media (max-width: 768px) {
  .activity-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .activity-stat-card {
    padding: 14px;
    gap: 10px;
  }

  .activity-stat-value {
    font-size: 1.1rem;
  }

  .activity-stat-icon {
    width: 36px;
    height: 36px;
  }

  .log-summary {
    max-width: 200px;
  }
}

/* ============================================
   REJECTION FIX BANNER
   ============================================ */

.rejection-fix-banner {
  padding: 24px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(245, 158, 11, 0.06));
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  animation: bannerSlideIn 0.4s ease-out;
}

@keyframes bannerSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rejection-fix-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.rejection-fix-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--warning-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warning);
  flex-shrink: 0;
}

.rejection-fix-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.rejection-fix-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rejection-fix-reason {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.rejection-fix-reason strong {
  color: var(--error);
}

.rejection-fix-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.fix-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
}

.fix-item-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.fix-item-error strong {
  color: #f87171;
}

.fix-item-ok {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.fix-item-ok strong {
  color: #34d399;
}

.fix-resubmit-btn {
  width: 100%;
  padding: 14px 24px !important;
  font-size: 0.95rem !important;
  gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .rejection-fix-banner {
    padding: 16px;
  }

  .rejection-fix-header {
    gap: 12px;
  }

  .rejection-fix-icon {
    width: 40px;
    height: 40px;
  }
}