/* ARMED VENG EAST KOHHRAN - TREASURER REPORT
   EXACT BLACK & WHITE CHURCH FORMAT STYLING (NO COLOR)
*/

:root {
  --font-family: "Times New Roman", Times, "Liberation Serif", serif;
  --border-color: #000000;
  --text-color: #000000;
  --bg-color: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: #e5e5e5;
  color: var(--text-color);
  line-height: 1.25;
  padding: 0;
  margin: 0;
}

/* TOP MINIMALIST CONTROL BAR (Hidden on Print) */
.no-print-toolbar {
  background-color: #ffffff;
  border-bottom: 2px solid #000000;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.toolbar-title {
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.toolbar-subtitle {
  font-size: 11px;
  color: #444444;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Black & White Buttons */
.btn-bw {
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: bold;
  padding: 6px 12px;
  border: 1.5px solid #000000;
  background-color: #ffffff;
  color: #000000;
  cursor: pointer;
  transition: all 0.1s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-bw:hover {
  background-color: #000000;
  color: #ffffff;
}

.btn-bw-dark {
  background-color: #000000;
  color: #ffffff;
  border: 1.5px solid #000000;
}

.btn-bw-dark:hover {
  background-color: #333333;
}

/* Header Sections */
.header-church-name {
  font-size: 13.5pt;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-family);
}

.header-report-title {
  font-size: 12pt;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.5px;
  margin-top: 1px;
  font-family: var(--font-family);
}

.header-date-period {
  font-size: 10pt;
  text-align: center;
  margin-top: 2px;
  font-style: italic;
  font-family: var(--font-family);
}

.header-section-name {
  font-size: 11pt;
  font-weight: bold;
  text-align: center;
  margin: 4px 0 4px 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-family);
}

/* Controls inside document */
.date-input-field {
  font-family: var(--font-family);
  font-size: 10pt;
  font-style: italic;
  border: 1px dashed #999;
  padding: 1px 4px;
  text-align: center;
  background: transparent;
  color: #000;
}
.date-input-field:focus {
  outline: none;
  border-color: #000;
  background: #fdfdfd;
}

/* TWO PAGE CONTAINER */
.document-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
  padding: 16px 10px 40px 10px;
  max-width: 100%;
  overflow-x: auto;
  transition: transform 0.2s ease;
}

/* ZOOM LEVELS FOR SCREEN READING (OLD PEOPLE FRIENDLY) */
.zoom-normal {
  zoom: 100%;
}

.zoom-large {
  zoom: 115%;
}

.zoom-xlarge {
  zoom: 130%;
}

/* A4 Sheet Dimensions */
.sheet-page {
  width: 210mm;
  min-height: 297mm;
  background-color: #ffffff;
  border: 1.5px solid #000000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.18);
  padding: 10mm 12mm 10mm 12mm;
  box-sizing: border-box;
  position: relative;
  flex-shrink: 0;
  font-family: var(--font-family);
}

/* Page 1 Specific Styling (Larger readable fonts) */
.page-left .report-table {
  font-size: 10.5pt;
}

.page-left .report-table th, .page-left .report-table td {
  padding: 3.5px 5px;
}

.page-left .cell-input {
  font-size: 10.5pt;
  font-weight: 500;
}

.page-left .vertical-tag {
  font-size: 10.5pt;
}

/* Page 2 Specific Styling (Optimized large font to fill A4) */
.page-right .report-table {
  font-size: 9.8pt;
}

.page-right .report-table th, .page-right .report-table td {
  padding: 2.5px 4px;
}

.page-right .cell-input {
  font-size: 9.8pt;
  font-weight: 500;
}

.page-right .vertical-tag {
  font-size: 9.5pt;
}

/* EXACT REPORT TABLES (STRICT BLACK & WHITE, HIGH CONTRAST) */
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10pt;
  border: 1.5px solid #000000;
  color: #000000;
  background-color: #ffffff;
  font-family: var(--font-family);
}

.report-table th, .report-table td {
  border: 1px solid #000000;
  padding: 3px 4px;
  color: #000000;
  background-color: #ffffff;
  vertical-align: middle;
  line-height: 1.18;
}

.report-table th {
  font-weight: bold;
  text-align: center;
  background-color: #ffffff;
}

.report-table td.text-left {
  text-align: left;
}
.report-table td.text-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.report-table td.text-center {
  text-align: center;
}
.report-table td.bold, .report-table th.bold {
  font-weight: bold;
}

/* Vertical Rotated Labels */
.vertical-tag {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  text-align: center;
  font-weight: bold;
  font-size: 10pt;
  letter-spacing: 0.5px;
  padding: 2px 1px;
  white-space: nowrap;
}

/* Subtotal & GrandTotal Rows */
.row-bold {
  font-weight: bold;
}

/* Editable Number Cells in Document */
.cell-input {
  font-family: var(--font-family);
  font-size: 10pt;
  text-align: right;
  width: 100%;
  border: none;
  background: transparent;
  color: #000000;
  padding: 0;
  margin: 0;
  font-weight: 500;
}

.cell-input:focus {
  outline: 1.5px solid #000000;
  background-color: #efefef;
}

.cell-input.bold {
  font-weight: bold;
}

/* SECTION B & C CONTAINER (LEFT PAGE LOWER HALF - LARGE & CLEAR) */
.sec-bc-outer {
  margin-top: 12px;
}

.sec-bc-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.tag-box {
  width: 22px;
  font-weight: bold;
  font-size: 11pt;
  text-align: center;
  padding-top: 2px;
}

.table-b {
  width: 68%;
  border-collapse: collapse;
  font-size: 10.5pt;
  border: 1.5px solid #000000;
  font-family: var(--font-family);
}

.table-b th, .table-b td {
  border: 1px solid #000000;
  padding: 3.5px 6px;
  color: #000000;
  font-weight: bold;
  background-color: #ffffff;
}

.table-b td.amt {
  text-align: right;
  width: 32%;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* SIGNATURE BLOCK */
.signature-wrapper {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
  padding-right: 35px;
}

.signature-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: auto;
}

.sig-name {
  font-weight: bold;
  font-size: 11pt;
  text-align: center;
}

.sig-title {
  font-size: 10pt;
  text-align: center;
  margin-top: 2px;
}

.sig-place {
  font-size: 10pt;
  text-align: center;
  margin-top: 1px;
}

/* MODAL STYLES (PURE BLACK & WHITE) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-box {
  background: #ffffff;
  border: 2px solid #000000;
  width: 90%;
  max-width: 500px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  font-family: var(--font-family);
  color: #000000;
}

.modal-header {
  font-size: 15px;
  font-weight: bold;
  border-bottom: 1.5px solid #000000;
  padding-bottom: 6px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.modal-footer {
  border-top: 1px solid #000000;
  padding-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.input-bw {
  font-family: var(--font-family);
  border: 1px solid #000000;
  padding: 5px 8px;
  font-size: 12px;
  width: 100%;
}

/* TOAST MESSAGE (BLACK & WHITE) */
.toast-bw {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #000000;
  color: #ffffff;
  padding: 8px 16px;
  font-family: var(--font-family);
  font-size: 12px;
  border: 1px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 3000;
  transition: opacity 0.3s;
}

/* ========================================================================= */
/* CALENDAR EXPENSE MODAL (LARGE, CLEAR, OLD PEOPLE FRIENDLY, PURE B&W)     */
/* ========================================================================= */
.calendar-modal-box {
  background: #ffffff;
  border: 2.5px solid #000000;
  width: 95%;
  max-width: 860px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 36px rgba(0,0,0,0.4);
  font-family: var(--font-family);
  color: #000000;
  overflow: hidden;
  box-sizing: border-box;
}

.calendar-modal-header {
  padding: 12px 20px;
  border-bottom: 2px solid #000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}

.calendar-modal-title {
  font-size: 13.5pt;
  font-weight: bold;
}

.calendar-modal-sub {
  font-size: 10.5pt;
  color: #222222;
  margin-top: 2px;
}

.calendar-modal-body {
  padding: 14px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Quick Add Form */
.cal-add-form {
  border: 1.5px solid #000000;
  padding: 10px 14px;
  background: #fafafa;
  display: grid;
  grid-template-columns: 145px 1fr 140px auto;
  gap: 10px;
  align-items: flex-end;
}

@media (max-width: 700px) {
  .cal-add-form {
    grid-template-columns: 1fr;
  }
}

.cal-add-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cal-add-field label {
  font-size: 10pt;
  font-weight: bold;
}

.cal-add-field input {
  font-family: var(--font-family);
  font-size: 11pt;
  padding: 5px 8px;
  border: 1.5px solid #000000;
  background: #ffffff;
  color: #000000;
}

.cal-add-field input:focus {
  outline: 2px solid #000000;
}

/* Calendar Month Grid */
.cal-grid-wrapper {
  border: 1.5px solid #000000;
  padding: 10px 12px;
  background: #ffffff;
}

.cal-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: bold;
  font-size: 11.5pt;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
}

.cal-day-name {
  font-weight: bold;
  font-size: 9.5pt;
  padding: 4px 0;
  border-bottom: 1.5px solid #000000;
}

.cal-day-cell {
  border: 1px solid #bbbbbb;
  min-height: 46px;
  padding: 3px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.cal-day-cell:hover {
  background: #f0f0f0;
  border-color: #000000;
}

.cal-day-cell.selected {
  outline: 2px solid #000000;
  background: #e8e8e8;
  font-weight: bold;
}

.cal-day-cell.has-expense {
  border: 1.5px solid #000000;
  background: #f7f7f7;
}

.cal-day-cell.other-month {
  color: #999999;
  background: #fafafa;
}

.cal-day-number {
  font-size: 9.5pt;
  font-weight: bold;
  text-align: left;
  padding-left: 3px;
}

.cal-day-total {
  font-size: 8.5pt;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Entries List Table */
.cal-entries-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5pt;
  border: 1.5px solid #000000;
}

.cal-entries-table th, .cal-entries-table td {
  border: 1px solid #000000;
  padding: 5px 8px;
  vertical-align: middle;
}

.cal-entries-table th {
  font-weight: bold;
  background: #eeeeee;
  text-align: center;
}

.cal-entries-table td.amt {
  text-align: right;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Modal Footer */
.calendar-modal-footer {
  padding: 12px 20px;
  border-top: 2px solid #000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
  flex-wrap: wrap;
  gap: 10px;
}

.cal-total-display {
  font-size: 13pt;
  font-weight: bold;
}

/* Subtle cue on double-clickable inputs */
.cell-input.clickable-cal {
  cursor: pointer;
}
.cell-input.clickable-cal:hover {
  background-color: #f0f0f0;
}

.btn-cal-del {
  background: #ffffff;
  color: #000000;
  border: 1.5px solid #000000;
  padding: 2px 8px;
  font-size: 9.5pt;
  cursor: pointer;
  font-weight: bold;
}
.btn-cal-del:hover {
  background: #000000;
  color: #ffffff;
}

.cal-filter-btn {
  background: #ffffff;
  color: #000000;
  border: 1.5px solid #000000;
  padding: 4px 10px;
  font-size: 9.5pt;
  cursor: pointer;
  font-weight: bold;
}
.cal-filter-btn.active {
  background: #000000;
  color: #ffffff;
}

.cal-nav-btn {
  background: #ffffff;
  color: #000000;
  border: 1.5px solid #000000;
  padding: 2px 10px;
  font-size: 11pt;
  font-weight: bold;
  cursor: pointer;
}
.cal-nav-btn:hover {
  background: #000000;
  color: #ffffff;
}

/* ========================================================= */
/* STRICT PRINT RULES (NO COLOR, EXACT A4 PAPER SIZE, 2 PAGES) */
/* ========================================================= */
@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  html, body {
    width: 210mm !important;
    height: auto !important;
    background-color: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print-toolbar, .toast-bw, .modal-overlay {
    display: none !important;
  }

  .document-container {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 210mm !important;
  }

  .sheet-page {
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    box-sizing: border-box !important;
    padding: 10mm 12mm 10mm 12mm !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    page-break-after: always !important;
    break-after: page !important;
    overflow: hidden !important;
  }

  .sheet-page:last-child {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .cell-input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
  }

  .date-input-field {
    border: none !important;
    outline: none !important;
  }
}
