/* Ride Bangla Memo Generator — internal tool. Plain CSS, no build step. */
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f2f4f2; color: #1a1a1a; }
.app-header { background: #0B3D24; color: #fff; }
.app-header-inner { max-width: 1100px; margin: 0 auto; padding: 18px 20px; }
.app-header-inner h1 { margin: 0 0 4px; font-size: 22px; }
.app-note { font-size: 13px; opacity: .75; margin: 4px 0; }
.layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; max-width: 1100px; margin: 0 auto; padding: 20px; }
.panel { background: #fff; border: 1px solid #e2e5e2; border-radius: 10px; padding: 20px; min-width: 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab { flex: 1; padding: 10px; border: 1px solid #0B5C36; background: #fff; color: #0B5C36; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
.tab.active { background: #0B5C36; color: #fff; }
.preset-note { font-size: 13px; background: #eef5f0; border: 1px solid #cfe3d6; border-radius: 8px; padding: 10px 12px; }
.field { margin-bottom: 14px; min-width: 0; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input, .field textarea, .field select { width: 100%; padding: 9px 10px; border: 1px solid #cfd4cf; border-radius: 8px; font-size: 14px; min-width: 0; }
.field textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#itemsTbl { width: 100%; border-collapse: collapse; font-size: 13px; }
#itemsTbl th { text-align: left; padding: 6px; }
#itemsTbl td { padding: 4px; }
#itemsTbl input { padding: 7px 8px; }
.btn-row { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn { background: #0B5C36; color: #fff; border: 1px solid #0B5C36; border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn.ghost { background: #fff; color: #0B5C36; }
.btn:disabled { opacity: .6; cursor: default; }
.tot-line { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.tot-line.grand { font-size: 18px; font-weight: 700; border-top: 2px solid #e5e7eb; margin-top: 6px; padding-top: 10px; }

/* The memo sheet itself: white paper, so the white-background JPEG logos sit cleanly. */
#memoSheet { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 22px; color: #1a1a1a; font-size: 13px; }
#memoSheet h2 { margin: 0 0 2px; font-size: 24px; color: #0B5C36; }
#memoSheet table { width: 100%; border-collapse: collapse; margin-top: 12px; }
#memoSheet th { background: #0B5C36; color: #fff; text-align: left; padding: 8px; font-size: 12px; }
#memoSheet td { padding: 8px; border-bottom: 1px solid #eee; font-size: 12.5px; }
#memoSheet .meta { color: #666; font-size: 12px; }
.memo-logo { height: 56px; width: auto; max-width: 180px; object-fit: contain; flex: none; }
.memo-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.memo-id { display: flex; gap: 12px; align-items: flex-start; }
.memo-foot { color: #666; font-size: 11.5px; margin-top: 14px; border-top: 1px solid #eee; padding-top: 10px; }
.memo-foot a { color: #0B5C36; }

@media (max-width: 800px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .grid3 { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .layout { display: block; padding: 0; max-width: none; }
  .preview-panel { border: none; padding: 0; }
  #memoSheet { border: none; padding: 0; border-radius: 0; }
}
