/* ==========================================================================
   ClientForge AI OS - Elite High-End Cyber Glassmorphism UI
   ========================================================================== */

:root {
  --bg-main: #07090e;
  --bg-card: rgba(16, 21, 33, 0.75);
  --bg-card-hover: rgba(22, 29, 46, 0.85);
  --bg-sidebar: #0b0f19;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
}

/* ==========================================================================
   App Layout: Sidebar & Main Workspace
   ========================================================================== */

.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 24px 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 24px;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}

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

.nav-btn.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.08));
  border-color: rgba(99, 102, 241, 0.3);
  color: #fff;
  font-weight: 600;
}

.nav-btn .icon {
  font-size: 1.1rem;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
}

.license-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ==========================================================================
   Main Content Workspace
   ========================================================================== */

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 32px 40px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.view-heading h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.view-heading p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}

.tab-panel.active {
  display: block;
}

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

/* ==========================================================================
   Cards, Glass Panels & Grids
   ========================================================================== */

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 6px 0;
  background: linear-gradient(135deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-subtext {
  font-size: 0.75rem;
  color: var(--accent-emerald);
}

/* ==========================================================================
   Forms, Inputs & Buttons
   ========================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

input, select, textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 12px 16px;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition-smooth);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.6;
  font-family: inherit;
  min-height: 120px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Leads Table
   ========================================================================== */

.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  margin-top: 16px;
}

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

th {
  background: rgba(11, 15, 25, 0.95);
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-main);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-new { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.badge-pitched { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.badge-clean { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-danger { background: rgba(244, 63, 94, 0.15); color: #fb7185; }

.btn-action {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  margin-right: 4px;
}

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

/* ==========================================================================
   Kanban Board
   ========================================================================== */

.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-column {
  min-width: 270px;
  width: 270px;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(16, 21, 33, 0.5);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.col-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.stage-count {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kanban-cards-container {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 380px;
}

.deal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: var(--transition-smooth);
}

.deal-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.deal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.deal-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.deal-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.deal-client-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.deal-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-deal-step {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
}

.btn-deal-del {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-deal-del:hover {
  color: var(--accent-rose);
}

/* ==========================================================================
   Spam & Deliverability Auditor Visuals
   ========================================================================== */

.score-meter-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(11, 15, 25, 0.7);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  margin-bottom: 20px;
}

.score-circle {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.spam-pill {
  display: inline-block;
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin: 2px 4px;
}

.dns-record-card {
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
}

.dns-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

pre {
  background: #000;
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.8rem;
  color: var(--accent-cyan);
}

/* ==========================================================================
   Modal & Toasts
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow-y: auto;
  padding: 24px 16px;
  box-sizing: border-box;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
  box-sizing: border-box;
  margin: auto;
}

.modal-dialog::-webkit-scrollbar {
  width: 6px;
}

.modal-dialog::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

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

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background: #111827;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease-out;
}

.toast-success { border-left: 4px solid var(--accent-emerald); }
.toast-warning { border-left: 4px solid var(--accent-amber); }
.toast-error { border-left: 4px solid var(--accent-rose); }
.toast-info { border-left: 4px solid var(--primary); }

.fade-out {
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s ease-out;
}

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

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.72rem; }
.text-danger { color: var(--accent-rose); }
.text-success { color: var(--accent-emerald); }
.text-link { color: var(--accent-cyan); text-decoration: none; }
.text-center { text-align: center; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

/* Quick Step Guidance Banners */
.quick-step-banner {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.quick-step-banner strong {
  color: #fff;
}

.step-num {
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.modal-dialog.modal-large {
  max-width: 780px;
  max-height: 85vh;
  overflow-y: auto;
}

.guide-step-card {
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 14px;
}

.guide-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.guide-step-header h4 {
  font-size: 1rem;
  color: #fff;
}

.guide-step-card p, .guide-step-card ul {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.guide-step-card ul {
  margin-left: 20px;
  margin-top: 6px;
}

.guide-step-card li {
  margin-bottom: 4px;
}

/* Active Filter Button */
.btn-action.active-filter {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 700;
}

/* 50+ Swipe Cards Grid */
.swipe-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.swipe-card {
  background: rgba(11, 15, 25, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.swipe-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.swipe-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.swipe-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.swipe-card-subject {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  margin-bottom: 10px;
  background: rgba(6, 182, 212, 0.08);
  padding: 6px 10px;
  border-radius: 4px;
}

.swipe-card-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  flex-grow: 1;
}

.swipe-card-actions {
  display: flex;
  gap: 8px;
}

/* Legal Contract Document Styling */
.contract-paper {
  background: #ffffff;
  color: #1a1a1a;
  padding: 30px;
  border-radius: var(--radius-sm);
  font-family: "Georgia", serif;
  font-size: 0.88rem;
  line-height: 1.6;
  max-height: 520px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid #e2e8f0;
}

.contract-paper h1 {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: #0f172a;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contract-paper h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 14px 0 6px;
  color: #0f172a;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 4px;
}

.contract-paper p, .contract-paper ul {
  margin-bottom: 10px;
  color: #334155;
}

.contract-paper ul {
  padding-left: 20px;
}

/* 2026 SOP Masterclass Steps */
.sop-step-card {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--border-glass);
}

.sop-step-card:last-child {
  border-bottom: none;
}

.sop-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  opacity: 0.8;
  line-height: 1;
}

.sop-step-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: #fff;
}

.sop-step-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.code-tag {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--accent-cyan);
}



/* ==========================================================================
   Mobile & Responsive Adaptations (Smartphones & Tablets)
   ========================================================================== */

@media (max-width: 868px) {
  body {
    overflow-y: auto;
  }

  .app-container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
    padding: 16px;
  }

  .brand-wrapper {
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }

  .nav-btn {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .sidebar-footer {
    display: none;
  }

  .main-content {
    padding: 20px 16px;
    overflow-y: visible;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions .btn-primary {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .score-meter-box {
    flex-direction: column;
    text-align: center;
  }

  .kanban-board {
    -webkit-overflow-scrolling: touch;
  }

  .kanban-column {
    min-width: 260px;
    width: 260px;
  }

  .table-responsive {
    border-radius: var(--radius-sm);
  }
}

/* ==========================================================================
   Print Stylesheet: Print ONLY the Legal Agreement Document (Clean PDF)
   ========================================================================== */
@media print {
  /* 1. Hide all application UI, sidebar, navigation, buttons, and form cards */
  .sidebar,
  .top-bar,
  .quick-step-banner,
  .tab-panel:not(#tab-contracts),
  #tab-contracts .form-grid > .glass-card:first-child,
  #tab-contracts .glass-card > div:first-child,
  .modal-backdrop,
  .toast-container,
  nav,
  header,
  button {
    display: none !important;
  }

  /* 2. Reset page background and typography for formal legal printing */
  html, body {
    background: #ffffff !important;
    color: #111827 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11pt !important;
    font-family: "Georgia", "Times New Roman", serif !important;
  }

  .app-container,
  .main-content,
  #tab-contracts,
  #tab-contracts .form-grid,
  #tab-contracts .glass-card {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* 3. Expand the contract paper to full printable sheet */
  .contract-paper {
    display: block !important;
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    font-family: "Georgia", "Times New Roman", serif !important;
    font-size: 11pt !important;
    line-height: 1.6 !important;
  }

  .contract-paper h1 {
    font-size: 17pt !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin-bottom: 20pt !important;
    color: #0f172a !important;
    letter-spacing: 0.05em !important;
  }

  .contract-paper h3 {
    font-size: 12pt !important;
    font-weight: 700 !important;
    margin-top: 16pt !important;
    margin-bottom: 6pt !important;
    color: #0f172a !important;
    border-bottom: 1px solid #94a3b8 !important;
    padding-bottom: 3pt !important;
    page-break-after: avoid;
  }

  .contract-paper p,
  .contract-paper ul {
    color: #1e293b !important;
    margin-bottom: 8pt !important;
  }

  .contract-paper li {
    margin-bottom: 4pt !important;
  }

  .contract-paper strong {
    color: #000000 !important;
    font-weight: 700 !important;
  }

  @page {
    margin: 20mm 20mm;
    size: letter portrait;
  }
}

/* ==========================================================================
   SOVEREIGN LICENSE KEY GATEKEEPER & ANTI-PIRACY SHIELD (RULE 6)
   ========================================================================== */

body.license-locked .app-container {
  filter: blur(14px) brightness(0.4);
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.5s ease;
}

.license-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(3, 7, 18, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.license-gate-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(3, 7, 18, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 60px rgba(6, 182, 212, 0.25), 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  padding: 36px 32px;
  text-align: center;
  position: relative;
  animation: gateAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gateAppear {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.license-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.license-gate-card h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.license-gate-card p {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 24px;
}

.license-input-wrapper {
  margin-bottom: 16px;
  text-align: left;
}

.license-input-wrapper label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.license-key-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(3, 7, 18, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 10px;
  color: #38bdf8;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.license-key-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  background: rgba(3, 7, 18, 0.95);
}

.input-shake {
  animation: inputShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: #ef4444 !important;
}

@keyframes inputShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

.license-error-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 16px;
  display: none;
  text-align: left;
}

.license-success-banner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.license-whop-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  color: #38bdf8;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.license-whop-link:hover {
  color: #67e8f9;
  text-decoration: underline;
}



