/*
 * PDF Redact — Forensic In-Memory Document Sanitizer Styles
 * Location: /home/mjones/agy/gemini_integrated_website/pdf_redact/style.css
 */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --border-color: rgba(56, 189, 248, 0.2);
  --border-focus: #38bdf8;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --cyan-accent: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.25);
  --amber-accent: #fbbf24;
  --emerald-accent: #10b981;
  --rose-accent: #f43f5e;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', monospace;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.15);
}

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

body.redact-body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Ambient Orbs */
.background-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: #0ea5e9;
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: #059669;
  bottom: -150px;
  right: -100px;
}

.glow-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Top Navigation */
.top-nav {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan-accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-back-link:hover {
  color: #fff;
  transform: translateX(-3px);
}

.nav-icon {
  width: 18px;
  height: 18px;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #34d399;
  letter-spacing: 0.04em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Main Layout */
.main-container {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 24px;
  flex: 1;
  width: 100%;
}

.hero-section {
  text-align: center;
  margin-bottom: 32px;
}

.app-tag-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.app-tag {
  background: rgba(0, 240, 255, 0.12);
  color: var(--cyan-accent);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.engine-tag {
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber-accent);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
}

.page-title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #00f0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.page-tagline {
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Workspace Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
}

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

/* Card Styling */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #fff;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cyan-accent);
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 24px 0;
}

/* Dropzone */
.dropzone {
  position: relative;
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  background: rgba(14, 165, 233, 0.03);
  transition: all 0.25s ease;
  cursor: pointer;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--cyan-accent);
  background: rgba(0, 240, 255, 0.08);
  box-shadow: 0 0 20px var(--cyan-glow);
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  width: 44px;
  height: 44px;
  color: var(--cyan-accent);
  margin-bottom: 12px;
}

.drop-text-primary {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.drop-text-secondary {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.browse-btn {
  color: var(--cyan-accent);
  text-decoration: underline;
  cursor: pointer;
}

.drop-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #34d399;
}

/* File Info Box */
.file-info-box {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
}

.file-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.file-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

.file-size-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

.file-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meta-item {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan-accent);
}

.btn-text-danger {
  background: none;
  border: none;
  color: var(--rose-accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
}

/* Fields & Chips */
.field-help-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.preset-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.preset-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-micro {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-micro:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.preset-chip:hover {
  border-color: rgba(0, 240, 255, 0.4);
  color: #fff;
}

.preset-chip.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--cyan-accent);
  color: var(--cyan-accent);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.chip-check {
  font-weight: bold;
}

/* Custom Textarea */
.custom-field-group {
  margin-top: 10px;
}

.input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.custom-textarea {
  width: 100%;
  background: rgba(10, 14, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 12px;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.custom-textarea:focus {
  outline: none;
  border-color: var(--cyan-accent);
  box-shadow: 0 0 8px var(--cyan-glow);
}

/* Mode Selector Grid (Option A vs Option B) */
.mode-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .mode-selector-grid {
    grid-template-columns: 1fr;
  }
}

.mode-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
}

.mode-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(56, 189, 248, 0.3);
}

.mode-card.active {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--cyan-accent);
  box-shadow: 0 0 15px var(--cyan-glow);
}

.mode-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-content {
  display: flex;
  flex-direction: column;
}

.mode-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.mode-badge {
  background: rgba(0, 240, 255, 0.2);
  color: var(--cyan-accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.mode-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.mode-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Toggles */
.toggles-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.styled-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan-accent);
  cursor: pointer;
}

.toggle-label {
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* Action Buttons */
.action-buttons-row {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

@media (max-width: 600px) {
  .action-buttons-row {
    flex-direction: column;
  }
}

.btn-primary, .btn-secondary {
  flex: 1;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  color: #000;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.25);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 22px rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary:disabled, .btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Right Column: Audit & Status */
.status-panel {
  background: rgba(10, 14, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

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

.status-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.status-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan-accent);
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00f0ff, #10b981);
  transition: width 0.25s ease;
}

/* Scan Results Breakdown */
.scan-results-box {
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

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

.scan-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber-accent);
  letter-spacing: 0.04em;
}

.matches-count-badge {
  background: rgba(251, 191, 36, 0.2);
  color: var(--amber-accent);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.scan-breakdown-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.scan-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  color: #e2e8f0;
  display: flex;
  gap: 8px;
}

.scan-item-badge {
  color: var(--amber-accent);
  font-weight: 600;
}

/* Completion Box */
.completion-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.completion-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.banner-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--emerald-accent);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.banner-text h3 {
  font-size: 1.05rem;
  color: #fff;
  font-weight: 700;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

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

.stat-cell {
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.highlight-stat {
  color: var(--emerald-accent);
}

.stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.verification-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.verification-badge.passed {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.download-action-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-download {
  width: 100%;
  background: #10b981;
  color: #000;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-download:hover {
  background: #059669;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.dl-icon {
  width: 18px;
  height: 18px;
}

.btn-reset {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 6px;
  text-decoration: underline;
}

.btn-reset:hover {
  color: #fff;
}

/* Explainer List */
.forensic-explainer {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: auto;
}

.explainer-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.explainer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.explainer-list li {
  position: relative;
  padding-left: 14px;
}

.explainer-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--cyan-accent);
}

.explainer-list code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
  color: #fff;
}

/* Footer */
.app-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  z-index: 10;
  background: rgba(10, 14, 23, 0.9);
}

.footer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-bullet {
  color: rgba(255, 255, 255, 0.2);
}

.footer-link {
  color: var(--cyan-accent);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}
