:root {
  --primary: #00897b;
  --primary-hover: #00796b;
  --primary-light: #e0f2f1;
  --success: #10b981;
  --bg-color: #f4f6f8;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --log-bg: #0f172a;
  --log-text: #e2e8f0;
  --radius-lg: 14px;
  --radius-md: 8px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace, Consolas, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Materialize Navbar */
nav {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

nav .brand-logo img {
  vertical-align: middle;
  height: 44px;
  margin-top: 10px;
}

/* Container & 3D Floating Material Cards */
.card-panel {
  border-radius: var(--radius-lg) !important;
  padding: 28px 32px !important;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.card-panel.hoverable {
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.card-panel.hoverable:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12), 0 8px 12px rgba(0, 0, 0, 0.06) !important;
}

.header {
  margin-bottom: 24px;
}

.header h4 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 0;
  letter-spacing: -0.02em;
}

.header p {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.6;
}

/* Upload Dropzone */
.upload-area {
  border: 2px dashed #b2dfdb;
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  background: #f8fafc;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

.upload-area:hover {
  border-color: #00897b;
  background: #e0f2f1;
}

.upload-area.drag-active {
  border-color: #00897b;
  background: #b2dfdb;
  transform: scale(1.01);
}

.upload-icon {
  font-size: 48px !important;
  color: #00897b;
  margin-bottom: 8px;
  display: block;
}

.upload-title {
  font-weight: 600;
  font-size: 16px;
  color: #334155;
  margin-bottom: 4px;
}

.upload-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

input[type="file"] {
  display: none;
}

/* File List */
.file-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  text-align: left;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
}

.file-item .file-name {
  font-weight: 500;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.file-item .file-size {
  color: var(--text-muted);
  font-size: 12px;
}

.no-files {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
}

/* Progress Section */
.progress-container {
  display: none;
  margin-top: 22px;
  padding: 16px 20px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13.5px;
  flex-wrap: wrap;
  gap: 8px;
}

.progress-status {
  font-weight: 600;
  color: #1e293b;
}

.progress-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.progress-file-count {
  font-size: 12px;
  color: #475569;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.progress-count {
  font-size: 12.5px;
  color: #0f766e;
  background: #ccfbf1;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.progress-percentage {
  font-weight: 700;
  font-family: var(--font-mono);
  color: #0f766e;
  background: #ccfbf1;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.3s ease;
}

.progress-percentage.complete {
  color: #047857;
  background: #d1fae5;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #00897b, #00b0ff, #10b981);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.2s ease-out;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(45deg,
      rgba(255, 255, 255, 0.25) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255, 255, 255, 0.25) 50%,
      rgba(255, 255, 255, 0.25) 75%,
      transparent 75%,
      transparent);
  background-size: 1rem 1rem;
  animation: progress-bar-stripes 1s linear infinite;
}

/* Completed State */
.progress-bar-fill.complete {
  background: linear-gradient(90deg, #10b981, #059669);
  transition: background 0.3s ease, width 0.2s ease-out;
}

.progress-bar-fill.complete::after {
  display: none !important;
  animation: none !important;
}

@keyframes progress-bar-stripes {
  0% {
    background-position: 1rem 0;
  }

  100% {
    background-position: 0 0;
  }
}

/* Middle Process Button Section (Steady shade change on hover, no floating) */
.action-section {
  margin: 28px 0;
  width: 100%;
}

.full-width-btn {
  width: 100% !important;
  height: 52px !important;
  line-height: 52px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  letter-spacing: 0.04em;
  background-color: #00bfa5 !important;
  /* Lighter teal by default */
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease !important;
  transform: none !important;
}

.full-width-btn:hover:not(:disabled) {
  background-color: #00796b !important;
  /* Darker teal shade on hover */
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12) !important;
  transform: none !important;
  /* No floating effect */
}

.full-width-btn:active:not(:disabled) {
  background-color: #004d40 !important;
  /* Deepest teal on click */
  transform: none !important;
}

.full-width-btn:disabled {
  background-color: #cbd5e1 !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Log Console Card */
.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.log-title {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.log-area {
  width: 100%;
  height: 230px;
  background: var(--log-bg);
  color: var(--log-text);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-y: auto;
  border: 1px solid #1e293b;
  resize: vertical;
}

.log-area:focus {
  outline: none;
  border-color: #00897b;
}

footer {
  position: relative;
  width: 100%;
  justify-content: center;
  text-align: center;
  margin-top: 20px;
  padding: 10px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}