:root {
  --bg-dark: #0a0e17;
  --card-bg: rgba(17, 24, 39, 0.85);
  --card-border: rgba(255, 255, 255, 0.08);
  --primary: #00d4ff;
  --accent-green: #00ff88;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Ambient Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-green) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--card-border);
}

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

.logo-badge {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(0, 212, 255, 0.4);
  color: var(--primary);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1px;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.brand-text h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand-text p {
  font-size: 14px;
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* User Profile Pill */
.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 212, 255, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), #0088ff);
  color: #000;
  font-weight: 800;
  font-size: 11px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.user-email {
  font-size: 10px;
  color: var(--accent-green);
  font-family: var(--font-mono);
}

.btn-logout {
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-logout:hover {
  opacity: 1;
}

/* Language Toggle Slider */
.lang-slider-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--card-border);
  padding: 4px 8px;
  border-radius: 20px;
}

.lang-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 4px;
}

.lang-switch {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  padding: 2px;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-indicator {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-radius: 14px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.lang-switch.es-active .lang-indicator {
  transform: translateX(100%);
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 2px 8px rgba(0, 255, 136, 0.3);
}

.lang-opt {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: var(--font-sans);
}

.lang-opt.active {
  color: #ffffff;
}

/* System Status */
.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--accent-green);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 2s infinite;
}

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

/* Grid Layout */
.main-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

.card-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

/* Badges */
.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-info {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.badge-success {
  background: rgba(0, 255, 136, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

/* Search Form */
.search-form {
  margin-bottom: 24px;
}

.input-group {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 4px;
  transition: all 0.2s ease;
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.3);
}

.input-prefix {
  padding: 0 12px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 16px;
  font-family: var(--font-mono);
  padding: 10px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #00d4ff, #0088ff);
  color: #000000;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.btn-action {
  background: linear-gradient(135deg, var(--accent-green), #059669);
  color: #000000;
  font-weight: 700;
  padding: 12px 24px;
  font-size: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 255, 136, 0.5);
}

/* Safety Guarantee Box */
.safety-box {
  background: rgba(0, 255, 136, 0.04);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 14px;
  padding: 18px;
}

.safety-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent-green);
  font-size: 14px;
}

.safety-box p {
  font-size: 13px;
  color: #d1d5db;
  line-height: 1.6;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  color: #ffffff;
  margin-bottom: 8px;
}

.empty-state p {
  max-width: 360px;
  font-size: 14px;
  line-height: 1.5;
}

/* Cloud Banner */
.cloud-path-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #38bdf8;
  word-break: break-all;
}

/* Data Sections */
.data-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-box {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
}

.section-box h3 {
  font-size: 14px;
  color: #e2e8f0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-list li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.existing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sub-col strong {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.sub-list {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-list li {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

/* Deliverables & Downloads Grid */
.deliverables-panel {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 16px 20px;
  border-radius: 14px;
  margin-bottom: 24px;
}

.check-icon {
  font-size: 32px;
}

.success-banner h3 {
  font-size: 16px;
  color: var(--accent-green);
  margin-bottom: 4px;
}

.success-banner p {
  font-size: 13px;
  color: #cbd5e1;
}

.downloads-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.dl-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.dl-card:hover {
  border-color: var(--primary);
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.dl-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.docx-icon {
  background: #1e3a8a;
  color: #60a5fa;
  border: 1px solid #3b82f6;
}

.pdf-icon {
  background: #7f1d1d;
  color: #f87171;
  border: 1px solid #ef4444;
}

.dl-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dl-info strong {
  font-size: 14px;
  color: #ffffff;
}

.dl-info span {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

.dl-btn {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

/* Stats Row */
.audit-summary-box {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: 14px;
}

.audit-summary-box h4 {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.stats-row {
  display: flex;
  gap: 12px;
}

.stat-pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  color: #cbd5e1;
}

.stat-num {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

/* Spinner */
.processing-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  text-align: center;
}

.spinner-large {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 212, 255, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

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

/* Footer */
.footer {
  margin-top: 48px;
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
  border-top: 1px solid var(--card-border);
  padding-top: 24px;
}

/* ================= AUTH MODAL STYLES ================= */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(25px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 24px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 212, 255, 0.15);
}

.auth-lock-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.auth-card h2 {
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 6px;
}

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

.whitelist-badge-banner {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--accent-green);
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.auth-input-group {
  background: rgba(15, 23, 42, 0.9);
}

.btn-auth {
  background: linear-gradient(135deg, var(--primary), #0088ff);
  color: #000;
  font-weight: 700;
  font-size: 15px;
  padding: 12px;
  border-radius: 12px;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

.google-oauth-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.google-oauth-divider::before,
.google-oauth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--card-border);
}

.google-oauth-divider span {
  padding: 0 12px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: #ffffff;
  color: #1f2937;
  font-weight: 600;
  font-size: 13.5px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.btn-google:hover {
  background: #f9fafb;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.auth-security-note p {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.5;
}
