/* Plan My Project — print & PDF export layout */
@page {
  size: A4;
  margin: 14mm 12mm 18mm 12mm;
}

.tev-print-body {
  font-family: Poppins, 'Segoe UI', system-ui, sans-serif;
  color: #0f172a;
  background: #f1f5f9;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  font-size: 11pt;
}

.tev-print-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: #1e3a8a;
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.tev-print-toolbar button {
  background: #fff;
  color: #1e3a8a;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.tev-print-toolbar button:hover {
  background: #eff6ff;
}

.tev-print-toolbar-hint {
  font-size: 0.75rem;
  opacity: 0.9;
}

.tev-print-report {
  max-width: 210mm;
  margin: 1rem auto 2rem;
  padding: 1.25rem 1.5rem 1.5rem;
  background: #fff;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  border-radius: 4px;
}

.tev-print-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 3px solid #2563eb;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.tev-print-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tev-print-header__brand h1 {
  margin: 0;
  font-size: 1.15rem;
  color: #1e3a8a;
}

.tev-print-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}

.tev-print-header__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.25rem;
  font-size: 0.78rem;
}

.tev-print-header__meta span {
  display: block;
  color: #64748b;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tev-print-ai-note {
  background: #eff6ff;
  border-left: 4px solid #2563eb;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: #334155;
  margin: 0 0 1rem;
}

.tev-print-section {
  margin: 1.1rem 0;
  page-break-inside: avoid;
}

.tev-print-section h2 {
  font-size: 0.95rem;
  color: #1e40af;
  margin: 0 0 0.6rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.35rem;
}

.tev-print-section h3 {
  font-size: 0.85rem;
  margin: 0.75rem 0 0.35rem;
  color: #334155;
}

.tev-print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.tev-print-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}

.tev-print-card span {
  display: block;
  font-size: 0.62rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
}

.tev-print-card strong {
  font-size: 0.88rem;
}

.tev-print-summary {
  font-size: 0.85rem;
  color: #334155;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin: 0.4rem 0 0.75rem;
}

th,
td {
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eff6ff;
  font-weight: 700;
  color: #1e40af;
}

.tev-print-total {
  font-size: 1rem;
  font-weight: 800;
  color: #1d4ed8;
  margin: 0.5rem 0;
}

.tev-print-muted {
  font-size: 0.72rem;
  color: #64748b;
}

.tev-print-disclaimer {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  page-break-inside: avoid;
}

.tev-print-disclaimer h2 {
  font-size: 0.82rem;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.tev-print-disclaimer__body {
  font-size: 0.68rem;
  color: #475569;
  line-height: 1.55;
}

.tev-print-footer {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 2px solid #e2e8f0;
  font-size: 0.68rem;
  color: #64748b;
  text-align: center;
}

ul {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.2rem;
}

@media print {
  .no-print,
  .tev-print-toolbar {
    display: none !important;
  }

  .tev-print-body {
    background: #fff;
    padding: 0;
  }

  .tev-print-report {
    margin: 0;
    padding: 0;
    box-shadow: none;
    max-width: none;
  }

  .tev-print-section {
    page-break-inside: avoid;
  }

  .page-break-avoid {
    break-inside: avoid;
  }

  .tev-print-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }
}

@media (max-width: 640px) {
  .tev-print-report {
    margin: 0.5rem;
    padding: 1rem;
  }

  .tev-print-header {
    flex-direction: column;
  }

  .tev-print-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
