/* ==========================================================================
   TenderFlow - Professional Design System & UI Styling
   Theme: Modern Enterprise FinTech / GovTech with Glassmorphism & Micro-animations
   Fonts: Inter & Hind Siliguri
   ========================================================================== */

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

:root {
  /* Dark Theme Palette (Default) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f293d;
  --bg-card: rgba(26, 34, 52, 0.82);
  --bg-card-hover: rgba(34, 45, 68, 0.95);
  --bg-input: #0f172a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-focus: #6366f1;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #0b0f19;

  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #06b6d4 100%);
  --accent-glow: rgba(99, 102, 241, 0.25);

  /* Semantic Status Colors */
  --color-ok: #10b981;
  --color-ok-bg: rgba(16, 185, 129, 0.12);
  --color-ok-border: rgba(16, 185, 129, 0.35);

  --color-missing: #ef4444;
  --color-missing-bg: rgba(239, 68, 68, 0.12);
  --color-missing-border: rgba(239, 68, 68, 0.35);

  --color-expiry: #f59e0b;
  --color-expiry-bg: rgba(245, 158, 11, 0.14);
  --color-expiry-border: rgba(245, 158, 11, 0.35);

  --color-not-provided: #64748b;
  --color-not-provided-bg: rgba(100, 116, 139, 0.12);
  --color-not-provided-border: rgba(100, 116, 139, 0.3);

  /* Shadows & Glass */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);
  --backdrop-blur: blur(14px);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.12);
  --border-focus: #4f46e5;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-inverse: #f8fafc;

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-glow: rgba(79, 70, 229, 0.18);

  --color-ok: #059669;
  --color-ok-bg: #ecfdf5;
  --color-ok-border: #a7f3d0;

  --color-missing: #dc2626;
  --color-missing-bg: #fef2f2;
  --color-missing-border: #fecaca;

  --color-expiry: #d97706;
  --color-expiry-bg: #fffbeb;
  --color-expiry-border: #fde68a;

  --color-not-provided: #475569;
  --color-not-provided-bg: #f1f5f9;
  --color-not-provided-border: #cbd5e1;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 15px rgba(79, 70, 229, 0.15);
}

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

body {
  font-family: 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* LineWaves Animated Background (React Bits) */
.line-waves-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.line-waves-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Layout Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1540px;
  margin: 0 auto;
  padding: 1.25rem 1.75rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.brand-titles h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-theme="light"] .brand-titles h1 {
  background: linear-gradient(135deg, #0f172a 30%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  -webkit-text-fill-color: #a5b4fc;
}

.brand-titles p,
.app-subtitle-animated {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #94a3b8 0%, #38bdf8 25%, #a78bfa 50%, #38bdf8 75%, #94a3b8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 4s linear infinite;
  display: inline-block;
}

@keyframes textShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero-tagline-animated {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  border-left: 2.5px solid var(--accent-primary);
  padding-left: 0.75rem;
  line-height: 1.4;
}

.hero-tagline-animated .highlight {
  color: #38bdf8;
  font-weight: 600;
  animation: pulseHighlight 3s infinite ease-in-out;
}

@keyframes pulseHighlight {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5)); }
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Language Toggle Switch */
.lang-switch-group {
  display: flex;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.theme-toggle-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-card);
  color: var(--text-main);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-primary);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

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

.btn-icon {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}

.btn-danger {
  color: var(--color-missing);
}
.btn-danger:hover {
  background: var(--color-missing-bg);
  border-color: var(--color-missing-border);
}

/* ==========================================================================
   Tender Overview Hero Card
   ========================================================================== */
.tender-hero-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .tender-hero-card {
    grid-template-columns: 1fr;
  }
}

.tender-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

.meta-value.accent-id {
  color: #818cf8;
  font-family: monospace;
  font-size: 1.1rem;
}

.meta-value.highlight-deadline {
  color: #f87171;
  font-weight: 700;
}

/* Readiness Meter Card */
.readiness-meter-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meter-header span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.meter-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.meter-track {
  width: 100%;
  height: 9px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.4s ease-out;
}

.meter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   Main Grid Layout (Left: Checklist | Right: Files & Package)
   ========================================================================== */
.workspace-grid {
  display: grid;
  grid-template-columns: 1.7fr 1.3fr;
  gap: 1.5rem;
  align-items: start;
}

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

.panel-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Filter Pills */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-pill {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* Search input */
.search-box {
  width: 100%;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.875rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Requirements Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.req-table th {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-card);
  vertical-align: middle;
}

.req-table th:first-child,
.req-table td:first-child {
  text-align: center;
  width: 65px;
}

.req-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

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

.req-row.row-blocked {
  background: rgba(239, 68, 68, 0.03);
}

.order-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  line-height: 1;
}

.req-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  justify-content: center;
}

.req-title-primary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
}

.req-id-tag {
  font-size: 0.72rem;
  font-family: monospace;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-radius: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.req-title-alt {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.req-meta-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill-mandatory {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.pill-optional {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.pill-expiry-check {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* File Match Selector */
.match-file-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 220px;
}

.match-file-group .form-select {
  height: 36px;
  flex: 1;
}

.match-file-group .btn-icon {
  height: 36px;
  width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.65rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.form-select:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Expiry Date Input */
.expiry-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 145px;
  justify-content: center;
}

.expiry-input-container .expiry-input {
  height: 36px;
}

.expiry-input {
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
}

.expiry-hint {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.hint-expired {
  color: var(--color-missing);
}

.hint-ok {
  color: var(--color-ok);
}

.hint-needed {
  color: var(--color-expiry);
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1;
}

.badge-ok {
  background: var(--color-ok-bg);
  color: var(--color-ok);
  border: 1px solid var(--color-ok-border);
}

.badge-missing {
  background: var(--color-missing-bg);
  color: var(--color-missing);
  border: 1px solid var(--color-missing-border);
}

.badge-expiry-needed {
  background: var(--color-expiry-bg);
  color: var(--color-expiry);
  border: 1px solid var(--color-expiry-border);
}

.badge-expired {
  background: var(--color-missing-bg);
  color: var(--color-missing);
  border: 1px solid var(--color-missing-border);
}

.badge-not-provided {
  background: var(--color-not-provided-bg);
  color: var(--color-not-provided);
  border: 1px solid var(--color-not-provided-border);
}

/* ==========================================================================
   Right Panel: Uploads & Package Generator
   ========================================================================== */

/* File Drop Zone */
.drop-zone {
  border: 2px dashed rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.04);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.drop-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 8px var(--accent-glow));
}

.drop-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

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

/* Quick Tools Bar */
.quick-tools-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

/* Uploaded Files List */
.uploaded-files-scroll {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-right: 4px;
}

.file-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.file-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card);
}

.file-card.file-card-duplicate {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.05);
}

.file-card-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.file-icon-box {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.file-meta {
  min-width: 0;
}

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

.file-sub-info {
  display: flex;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.file-dup-alert {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f87171;
  margin-top: 0.15rem;
}

.file-matched-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #a5b4fc;
}

.file-unmatched-badge {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.file-card-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Package Options */
.options-group {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.checkbox-label-text {
  display: flex;
  flex-direction: column;
}

.checkbox-subtext {
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* Seal Config */
.seal-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.seal-thumb-img {
  max-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: rgba(255, 255, 255, 0.05);
}

/* Blocking Issues Alert */
.alert-box {
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alert-danger {
  background: var(--color-missing-bg);
  border: 1px solid var(--color-missing-border);
}

.alert-success {
  background: var(--color-ok-bg);
  border: 1px solid var(--color-ok-border);
}

.blocking-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.blocking-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-main);
}

.blocking-icon {
  flex-shrink: 0;
}

/* Generator Action Box */
.generator-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-generate {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.generator-results-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Modals & Drawers
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* PDF Preview Canvas Container */
.pdf-viewer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-tertiary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.canvas-viewport {
  background: #262626;
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  min-height: 480px;
}

#pdfPreviewCanvas {
  max-width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
}

/* AI Modal Styling */
.ai-actions-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.ai-report-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.ai-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.75rem 0;
  font-size: 0.85rem;
}

.ai-report-card ul {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.finding-success {
  color: var(--color-ok);
}

.finding-error {
  color: var(--color-missing);
}

.ai-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.ai-table th, .ai-table td {
  padding: 0.5rem;
  border: 1px solid var(--border-subtle);
}

/* Toast Notifications */
#toastContainer {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 10000;
  max-width: 420px;
}

.toast-msg {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff;
  backdrop-filter: var(--backdrop-blur);
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.4s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-fadeout {
  opacity: 0;
}

.toast-info {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.toast-success {
  background: rgba(6, 78, 59, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.toast-error {
  background: rgba(127, 29, 29, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.toast-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  margin-left: auto;
  font-size: 0.9rem;
}

/* Utilities */
.hidden {
  display: none !important;
}

.text-muted {
  color: var(--text-dim);
}

.text-success {
  color: var(--color-ok);
}

.text-danger {
  color: var(--color-missing);
}
