/* ==========================================================================
   MyPassInvoice - Modern, Clean & High-Conversion Stylesheet
   ========================================================================== */

:root {
  --theme-color: #2563eb;
  --theme-light: rgba(37, 99, 235, 0.08);
  --theme-hover: #1d4ed8;

  --bg-dark: #0a0e17;
  --bg-surface: #111827;
  --bg-card: #1f2937;
  
  --text-main: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --paper-bg: #ffffff;
  --paper-text: #111827;
  --paper-muted: #4b5563;
  --paper-border: #e5e7eb;
  --paper-row-alt: #f9fafb;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --shadow-paper: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-elevated: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Top Navigation Bar */
.app-header {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.back-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--theme-color), #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.brand-text .badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}

/* Header Actions Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-select {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.btn-select:hover, .btn-select:focus {
  border-color: var(--theme-color);
}

/* Segmented Control (Invoice vs Receipt) */
.segmented-control {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  padding: 3px;
  gap: 2px;
}

.segment-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.segment-btn.active {
  background: var(--theme-color);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Color Accent Dots */
.color-picker-dropdown {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.active {
  border-color: #ffffff;
  transform: scale(1.1);
}

/* Action Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--theme-color), var(--theme-hover));
  color: #fff;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

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

/* Privacy Ribbon */
.privacy-ribbon {
  background: rgba(16, 185, 129, 0.08);
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
  padding: 8px 16px;
  font-size: 0.85rem;
  color: #34d399;
}

.ribbon-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ribbon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.ribbon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Main Workspace */
.workspace-container {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 28px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 24px;
  align-items: start;
}

/* Sidebar Ads */
.sidebar-ad {
  position: sticky;
  top: 90px;
}

.ad-card {
  background: var(--bg-surface);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.ad-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}

.ad-slot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Center Paper Viewport */
.paper-viewport {
  display: flex;
  justify-content: center;
}

/* Realistic Invoice Paper Sheet (A4 aspect) */
.invoice-sheet {
  background: var(--paper-bg);
  color: var(--paper-text);
  width: 100%;
  max-width: 820px;
  min-height: 1050px;
  padding: 48px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-paper);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

/* Watermark Stamp (PAID / DUE) */
.stamp-badge {
  position: absolute;
  top: 130px;
  right: 50px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #10b981;
  border: 4px solid #10b981;
  padding: 4px 20px;
  border-radius: 8px;
  transform: rotate(-12deg);
  opacity: 0.85;
  user-select: none;
  pointer-events: none;
  transition: all 0.3s ease;
}

.stamp-badge.due {
  color: #ef4444;
  border-color: #ef4444;
}

.stamp-badge.hidden {
  display: none;
}

/* Editable Field Focus & Hover Feedback */
.editable-field {
  outline: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -3px -5px;
  transition: all 0.15s ease;
  white-space: pre-wrap;
  word-break: break-word;
}

.editable-field:hover {
  background: rgba(37, 99, 235, 0.04);
  border-color: rgba(37, 99, 235, 0.2);
}

.editable-field:focus {
  background: #ffffff;
  border-color: var(--theme-color);
  box-shadow: 0 0 0 2px var(--theme-light);
}

.editable-field:empty::before {
  content: attr(placeholder);
  color: #9ca3af;
  pointer-events: none;
}

/* Sheet Top Header Layout */
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 24px;
}

.header-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Logo Uploader */
.logo-uploader {
  position: relative;
  display: inline-block;
  max-width: 180px;
  cursor: pointer;
}

.logo-placeholder {
  border: 2px dashed #d1d5db;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 0.825rem;
  font-weight: 600;
  background: #f9fafb;
  transition: all 0.2s;
}

.logo-placeholder:hover {
  border-color: var(--theme-color);
  color: var(--theme-color);
  background: #eff6ff;
}

.logo-image {
  max-height: 64px;
  max-width: 180px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.btn-remove-logo {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.business-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.seller-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--paper-text);
  letter-spacing: -0.02em;
}

.seller-details {
  font-size: 0.875rem;
  color: var(--paper-muted);
  line-height: 1.5;
}

/* Header Right (Title & Meta) */
.header-right {
  width: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.doc-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--theme-color);
  letter-spacing: -0.03em;
  text-align: right;
  line-height: 1;
}

.meta-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 100px 1fr;
  row-gap: 8px;
  column-gap: 8px;
  font-size: 0.85rem;
}

.meta-item {
  display: contents;
}

.meta-item label {
  color: #6b7280;
  font-weight: 600;
  align-self: center;
  text-align: right;
  padding-right: 6px;
}

.meta-value {
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: var(--paper-text);
}

.meta-date-input {
  border: 1px solid transparent;
  background: transparent;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--paper-text);
  border-radius: 4px;
  padding: 2px 4px;
  cursor: pointer;
  outline: none;
  width: 100%;
}

.meta-date-input:hover {
  background: rgba(37, 99, 235, 0.04);
  border-color: rgba(37, 99, 235, 0.2);
}

.meta-date-input:focus {
  border-color: var(--theme-color);
  background: #ffffff;
}

.sheet-divider {
  height: 2px;
  background: linear-gradient(90deg, var(--theme-color) 0%, rgba(37, 99, 235, 0.1) 100%);
  margin: 16px 0 28px;
  border-radius: 2px;
}

/* Parties (Client & Payment terms) */
.parties-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.party-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.party-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--theme-color);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.client-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--paper-text);
}

.client-details {
  font-size: 0.85rem;
  color: var(--paper-muted);
  line-height: 1.5;
}

#payment-terms {
  font-size: 0.85rem;
  color: var(--paper-muted);
  line-height: 1.5;
}

/* Line Items Table */
.table-container {
  margin-bottom: 28px;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.items-table thead th {
  background: var(--paper-row-alt);
  color: #374151;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  text-align: left;
  border-top: 1px solid var(--paper-border);
  border-bottom: 1px solid var(--paper-border);
}

.items-table th.col-qty,
.items-table th.col-rate,
.items-table th.col-amount {
  text-align: right;
}

.items-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--paper-border);
  vertical-align: top;
}

.col-desc { width: 50%; }
.col-qty { width: 12%; text-align: right; }
.col-rate { width: 18%; text-align: right; }
.col-amount { width: 16%; text-align: right; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.col-action { width: 4%; text-align: center; vertical-align: middle !important; }

.item-name {
  font-weight: 600;
  color: var(--paper-text);
  margin-bottom: 3px;
}

.item-subtext {
  font-size: 0.8rem;
  color: var(--paper-muted);
  line-height: 1.4;
}

.item-input {
  width: 100%;
  text-align: right;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--paper-text);
  outline: none;
  transition: all 0.15s;
}

.item-input:hover {
  background: rgba(37, 99, 235, 0.04);
  border-color: rgba(37, 99, 235, 0.2);
}

.item-input:focus {
  background: #ffffff;
  border-color: var(--theme-color);
  box-shadow: 0 0 0 2px var(--theme-light);
}

.btn-delete-row {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-delete-row:hover {
  background: #fee2e2;
  color: #ef4444;
}

.table-actions {
  margin-top: 10px;
}

.btn-add-line {
  background: transparent;
  border: 1px dashed #d1d5db;
  color: var(--theme-color);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-add-line:hover {
  border-color: var(--theme-color);
  background: #eff6ff;
}

/* Calculations & Notes Summary Section */
.summary-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  margin-top: auto;
  padding-top: 16px;
}

.summary-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.notes-box label,
.signature-box label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.notes-content {
  font-size: 0.8rem;
  color: var(--paper-muted);
  line-height: 1.5;
}

.signature-line {
  border-top: 1px solid #d1d5db;
  padding-top: 8px;
  margin-top: 36px;
  width: 80%;
}

.signature-text {
  font-size: 0.825rem;
  font-weight: 600;
  color: #374151;
}

/* Totals on Right */
.summary-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.875rem;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.calc-row-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-label {
  color: #4b5563;
  font-weight: 500;
}

.calc-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--paper-text);
}

.input-with-addon {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.calc-input {
  width: 50px;
  border: none;
  padding: 3px 6px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  outline: none;
}

.calc-input-wide {
  width: 70px;
}

.addon {
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 6px;
}

.calc-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 6px 0;
}

.grand-total-row {
  padding: 8px 0;
  border-top: 2px solid var(--theme-color);
  border-bottom: 2px solid var(--theme-color);
  margin: 4px 0;
}

.total-label {
  font-weight: 800;
  font-size: 1rem;
  color: var(--theme-color);
}

.total-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--theme-color);
}

.balance-due-row {
  background: #fef2f2;
  padding: 6px 10px;
  border-radius: 4px;
}

.balance-label {
  color: #b91c1c;
  font-weight: 700;
}

.balance-val {
  color: #b91c1c;
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
}

/* Sheet Footer */
.sheet-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
  text-align: center;
  font-size: 0.72rem;
  color: #9ca3af;
}

/* Info Section (Below Workspace) */
.info-section {
  background: var(--bg-surface);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 60px 20px;
  margin-top: 60px;
}

.info-container {
  max-width: 1100px;
  margin: 0 auto;
}

.info-container h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  color: #fff;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Site Footer */
.main-footer {
  background: #060910;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-container a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-container a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   PRINT STYLESHEET (Clean 100% Vector PDF Output)
   ========================================================================== */
@media print {
  @page {
    size: letter portrait;
    margin: 12mm 15mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-header,
  .privacy-ribbon,
  .sidebar-ad,
  .table-actions,
  .info-section,
  .main-footer,
  .print-hide,
  .btn-remove-logo {
    display: none !important;
  }

  .workspace-container {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .paper-viewport {
    display: block !important;
  }

  .invoice-sheet {
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    min-height: auto !important;
    border-radius: 0 !important;
  }

  .editable-field {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }

  .item-input {
    border: none !important;
    padding: 0 !important;
  }

  .meta-date-input {
    border: none !important;
    padding: 0 !important;
  }

  .logo-placeholder {
    display: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE LAYOUT (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 1200px) {
  .workspace-container {
    grid-template-columns: 1fr;
  }
  .sidebar-ad {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  .header-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .invoice-sheet {
    padding: 24px 16px;
  }
  .sheet-header {
    flex-direction: column;
    gap: 20px;
  }
  .header-right {
    width: 100%;
    align-items: flex-start;
  }
  .doc-title {
    text-align: left;
  }
  .meta-grid {
    grid-template-columns: 90px 1fr;
  }
  .parties-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .summary-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }
/* Sheet Watermark */
.sheet-watermark {
  margin-top: 12px;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: #9ca3af;
  border-top: 1px dashed #e5e7eb;
  padding-top: 8px;
  letter-spacing: 0.02em;
}

.sheet-watermark.hidden {
  display: none !important;
}

/* Modal Backdrop & Card */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.btn-close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--theme-color);
  background: rgba(37, 99, 235, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 8px;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.modal-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.export-options-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}

.export-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pro-card {
  border-color: #f59e0b;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, var(--bg-card) 100%);
}

.pro-ribbon {
  position: absolute;
  top: -10px;
  right: 16px;
  background: #f59e0b;
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
}

.export-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.export-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.price-pill.free {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.price-wrap {
  text-align: right;
}

.price-wrap .price-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #f59e0b;
  font-family: 'JetBrains Mono', monospace;
}

.price-wrap .price-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

.export-features {
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  flex: 1;
}

.export-features li {
  line-height: 1.4;
}

.btn-modal-action {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.paypal-wrap {
  min-height: 45px;
  margin-top: auto;
}

.paypal-trust-badges {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

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

