@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: rgba(20, 20, 30, 0.45);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --primary-accent: #6366f1; /* Indigo */
  --secondary-accent: #a855f7; /* Purple */
  --glow-color: rgba(99, 102, 241, 0.15);
  --success-color: #10b981;
  --danger-color: #ef4444;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Glassmorphism Container */
.glass-panel {
  background: var(--bg-secondary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* Header & Navigation Bar */
header, .header-container {
  position: relative;
  z-index: 1040;
}

.navbar-glass {
  position: relative;
  z-index: 1040;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.navbar .dropdown-menu {
  z-index: 1050 !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
}

.dropdown-item {
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.navbar-glass .navbar-brand {
  color: #fff !important;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-glass .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.navbar-glass .nav-link:hover, .navbar-glass .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.05);
}

/* Form Controls */
.form-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: #fff;
  padding: 12px 16px;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 4px var(--glow-color);
  outline: none;
  color: #fff;
}

select.form-input option {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

textarea.form-input {
  resize: none;
  min-height: 220px;
  line-height: 1.6;
}

/* Buttons */
.btn-premium {
  background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 12px 24px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn-premium:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.6);
  filter: brightness(1.1);
}

.btn-premium:active:not(:disabled) {
  transform: translateY(0);
}

.btn-premium:disabled {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  color: var(--text-secondary);
  cursor: not-allowed;
}

.btn-outline-premium {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 500;
  padding: 10px 20px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-outline-premium:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Badge tags */
.badge-premium {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Table styling */
.table-premium {
  width: 100%;
  color: var(--text-primary);
  border-collapse: collapse;
}

.table-premium th {
  font-family: var(--font-heading);
  font-weight: 600;
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-secondary);
}

.table-premium td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

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

/* Footer override */
.footer-glass {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 20px 0;
  width: 100%;
  margin-top: auto;
}

/* Custom Utilities */
.text-gradient {
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-text {
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Loader micro-animation */
.pulse-loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Drag and Drop Upload Zone */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 40px 24px;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary-accent);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 0 20px 0 rgba(99, 102, 241, 0.1);
}

.upload-icon {
  font-size: 3rem;
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.upload-zone:hover .upload-icon, .upload-zone.dragover .upload-icon {
  transform: translateY(-4px);
}

/* ==========================================================================
   Modern Document & Audio Processing Overlay Styles
   ========================================================================== */
.proc-container {
  background: linear-gradient(145deg, rgba(20, 20, 32, 0.95), rgba(15, 15, 24, 0.98));
  border: 1px solid rgba(129, 140, 248, 0.25);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45), 0 0 16px 0 rgba(99, 102, 241, 0.15);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.proc-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #818cf8, #c084fc, transparent);
  animation: proc-shimmer 2.5s infinite linear;
}

@keyframes proc-shimmer {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.proc-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #818cf8;
}

/* Stepper Component */
.proc-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 16px 0 20px 0;
}

.proc-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.proc-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.45);
}

.proc-step-title {
  font-size: 0.73rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 6px;
  text-align: center;
  transition: color 0.3s ease;
  white-space: nowrap;
}

/* Step States */
.proc-step-item.active .proc-step-circle {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 0 14px 2px rgba(129, 140, 248, 0.6);
  transform: scale(1.12);
  animation: proc-pulse 1.8s infinite ease-in-out;
}

.proc-step-item.active .proc-step-title {
  color: #818cf8;
  font-weight: 600;
}

.proc-step-item.completed .proc-step-circle {
  background: #10b981;
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.proc-step-item.completed .proc-step-title {
  color: #34d399;
}

.proc-step-connector {
  position: absolute;
  top: 16px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.proc-step-connector-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #6366f1);
  transition: width 0.4s ease;
  width: 0%;
}

@keyframes proc-pulse {
  0%, 100% { box-shadow: 0 0 10px 1px rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 18px 4px rgba(168, 85, 247, 0.8); }
}

/* Progress Bar */
.proc-progress-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.proc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  border-radius: 999px;
  transition: width 0.4s ease;
  position: relative;
}

.proc-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: proc-bar-shine 2s infinite linear;
}

@keyframes proc-bar-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}