/* ─── PRINT BAR ────────────────────────────────── */
.print-bar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 12px 16px 4px;
}

.btn-print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  background: var(--submain);
  border: 1px solid var(--submain);
  border-radius: 12px;
  color: var(--main);
  font-family: 'Vazirmatn', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 4px 18px rgba(21, 125, 164, .28);
  touch-action: manipulation;
}

.btn-print:hover {
  background: var(--text);
  transform: translateY(-2px);
  color: var(--main);
}

.btn-print:active {
  transform: translateY(0);
}

/* ─── PRINT STYLES ─────────────────────────────── */
@media print {
  @page {
    size: A4;
    margin: 11mm 13mm;
  }

  body {
    background: #fff !important;
    color: #111 !important;
    font-size: 10.5pt;
  }

  .bg-grid,
  .print-bar,
  .btn,
  .btn-geo,
  .btn-add-device,
  .btn-remove,
  .device-add-row {
    display: none !important;
  }

  * {
    animation: none !important;
    transition: none !important;
  }

  .company-bar {
    background: #EEF4FF !important;
    border: none !important;
    border-bottom: 2px solid #FFB800 !important;
    padding: 8px 12px !important;
  }

  .logo-pursa {
    -webkit-text-fill-color: #B8860B !important;
    color: #B8860B !important;
  }

  .company-name {
    color: #111 !important;
  }

  .company-sub,
  .company-tel {
    color: #1565C0 !important;
  }

  .company-badge {
    background: #FFF8E1 !important;
    color: #B8860B !important;
    border-color: #FFB800 !important;
  }

  .header {
    background: none !important;
    padding: 8px 0 10px;
  }

  h1 {
    font-size: 17pt !important;
    -webkit-text-fill-color: #B8860B !important;
  }

  .subtitle {
    color: #555 !important;
  }

  .sun-icon {
    display: none;
  }

  .container {
    display: block !important;
    padding: 0 !important;
  }

  .card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 7px !important;
    padding: 11px 13px !important;
    margin-bottom: 10px !important;
    page-break-inside: avoid;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }

  .card-title {
    color: #B8860B !important;
    border-bottom: 1px solid #e5e5e5 !important;
  }

  label {
    color: #444 !important;
  }

  input,
  select {
    background: #f5f5f5 !important;
    border: 1px solid #ccc !important;
    color: #111 !important;
  }

  .results-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 7px !important;
  }

  .result-item {
    background: #fafafa !important;
    border: 1px solid #ddd !important;
  }

  .result-item.highlight {
    background: #FFF8E1 !important;
    border-color: #FFB800 !important;
  }

  .result-item.green-hl {
    background: #E8F5E9 !important;
    border-color: #4CAF50 !important;
  }

  .result-value {
    color: #B8860B !important;
    font-size: 13pt !important;
  }

  .result-item.green-hl .result-value {
    color: #2E7D32 !important;
  }

  .result-label {
    color: #555 !important;
  }

  .energy-bar {
    background: #eee !important;
  }

  .energy-fill {
    background: #FFB800 !important;
  }

  .badge-sun {
    background: #FFF8E1 !important;
    color: #B8860B !important;
    border: 1px solid #FFB800;
  }

  .badge-green {
    background: #E8F5E9 !important;
    color: #2E7D32 !important;
    border: 1px solid #4CAF50;
  }

  .tip {
    background: #E3F2FD !important;
    color: #1565C0 !important;
    border-right: 3px solid #2196F3 !important;
  }

  .roof-stats {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .roof-item {
    background: #fafafa !important;
    border: 1px solid #ddd !important;
  }

  .roof-item.purple {
    background: #F3E5F5 !important;
    border-color: #9C27B0 !important;
  }

  .roof-item.gold {
    background: #FFF8E1 !important;
    border-color: #FFB800 !important;
  }

  .roof-val {
    color: #B8860B !important;
  }

  .roof-item.purple .roof-val {
    color: #6A1B9A !important;
  }

  .roof-lbl {
    color: #555 !important;
  }

  .geo-status.ok {
    background: #E8F5E9 !important;
    color: #2E7D32 !important;
    border: 1px solid #4CAF50 !important;
  }

  .loc-pill {
    background: #E3F2FD !important;
    color: #1565C0 !important;
    border: 1px solid #90CAF9 !important;
  }

  .m-label {
    color: #555 !important;
  }

  .m-val {
    color: #B8860B !important;
  }

  .diagram-wrap {
    overflow: visible !important;
  }

  svg.diagram {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* device list print styles */
  .device-row {
    background: #fafafa !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
  }

  .device-total {
    background: #FFF8E1 !important;
    border-color: #FFB800 !important;
  }

  .device-total-label {
    color: #555 !important;
  }

  .device-total-value {
    color: #B8860B !important;
  }

  .dev-kwh {
    background: #FFF8E1 !important;
    border-color: #FFB800 !important;
    color: #B8860B !important;
  }

  .dev-kwh small {
    color: #555 !important;
  }

  .device-header span {
    color: #555 !important;
  }

  .dev-name {
    color: #111 !important;
  }

  .print-footer {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #FFB800;
    padding-top: 8px;
    margin-top: 14px;
    font-size: 8pt;
    color: #444;
    flex-wrap: wrap;
    gap: 4px;
  }
}

.print-footer {
  display: none;
}