/* Production accounts sample - accounting-app styles on top of the File kit.
   Palette follows the user's reference: navy header/summary, yellow balance,
   green received, blue active controls, gray inactive. Print doc stays boxed navy. */

.pa-app { display: flex; flex-direction: column; gap: 14px; }

/* navy app bar */
.pa-appbar {
  background: #111c52; color: #fff; border-radius: 12px; padding: 14px 16px;
  margin-bottom: 14px;
}
.pa-appbar .t { font-size: 20px; font-weight: 800; letter-spacing: 0.01em; }
.pa-appbar .f { font-size: 12px; color: #b9c4f2; margin-top: 3px; }

/* navy summary card with yellow balance */
.pa-summary {
  background: #1e3a8a; color: #fff; border-radius: 12px; padding: 14px 16px;
  font-size: 16px; line-height: 1.55; font-weight: 500;
}
.pa-summary .bal { color: #fbbf24; font-weight: 800; font-size: 19px; }

/* notes */
.pa-note {
  background: #eef1f6; border: 1px solid #dfe4ec; border-radius: 10px;
  padding: 10px 14px; color: #4b5563; font-size: 12px; line-height: 18px;
}

.pa-sync {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #dfe4ec; border-radius: 999px; background: #fff;
  padding: 4px 10px; font-size: 11px; color: #4b5563;
}
.pa-sync .dot { width: 7px; height: 7px; border-radius: 50%; background: #1e9e4a; }

/* entry/house lists as white cards */
.pa-list {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #e4e7ee; border-radius: 12px; padding: 0 12px;
}
.pa-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 2px; border-bottom: 1px solid #eceef3;
  cursor: pointer; background: none; border-top: none; border-left: none; border-right: none;
  text-align: left; width: 100%; font: inherit; color: inherit;
}
.pa-item:last-child { border-bottom: none; }
.pa-item .t { font-weight: 700; font-size: 14px; color: #14255a; }
.pa-item .d { color: #5f6368; font-size: 12px; margin-top: 2px; }
.pa-item .v { font-weight: 700; font-size: 14px; white-space: nowrap; }
.pa-item .v.pos { color: #1e9e4a; }
.pa-item .v.neg { color: #b91c1c; }
.pa-item .chev { color: #9aa0a6; font-size: 16px; }

.pa-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px; border-radius: 12px; color: #fff; font-weight: 800; font-size: 16px;
}
.pa-avatar.g0 { background: linear-gradient(135deg, #1e3a8a, #1e4fd8); }
.pa-avatar.g1 { background: linear-gradient(135deg, #0f766e, #1e9e4a); }
.pa-avatar.g2 { background: linear-gradient(135deg, #1e4fd8, #0891b2); }

/* compact white cards */
.pa-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pa-card {
  background: #fff; border: 1px solid #e4e7ee; border-radius: 10px; padding: 10px 12px;
}
.pa-card .l { font-size: 11px; color: #5f6368; font-weight: 600; }
.pa-card .n { font-size: 16px; font-weight: 700; margin-top: 2px; color: #14255a; }
.pa-card .n.small { font-size: 13px; }

/* chips */
.pa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pa-chip {
  font-size: 10px; border-radius: 999px; padding: 2px 8px; font-weight: 600;
  border: 1px solid #dfe4ec; color: #4b5563; background: #fff;
}
.pa-chip.ok { color: #166534; border-color: #a9dcc0; background: #e6f7ec; }
.pa-chip.warn { color: #92400e; border-color: #f0d59a; background: #fdf3d7; }
.pa-chip.bad { color: #b91c1c; border-color: #f3b4ba; background: #fdeaeb; }
.pa-chip.info { color: #1e3a8a; border-color: #c6d5f6; background: #eaf0fd; }

/* big accounting buttons */
.pa-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pa-btn {
  border: none; border-radius: 10px; padding: 12px 18px; min-height: 44px;
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; color: #fff;
}
.pa-btn.block { width: 100%; }
.pa-btn:disabled { background: #9aa0a6 !important; cursor: default; }
.pa-btn.b-blue { background: #1e4fd8; }
.pa-btn.b-green { background: #1e9e4a; }
.pa-btn.b-navy { background: #14255a; }
.pa-btn.b-gray { background: #9aa0a6; }
.pa-btn.b-outline { background: #fff; color: #1e3a8a; border: 1.5px solid #c7d2f0; }

/* big tab toggles: coloured active, gray inactive */
.pa-tabs-w { margin-bottom: 4px; }
.pa-tabs-l { font-size: 12px; color: #5f6368; font-weight: 600; margin-bottom: 6px; }
.pa-tabs { display: flex; gap: 8px; }
.pa-tab {
  flex: 1; border: none; border-radius: 10px; padding: 12px 8px; min-height: 44px;
  font: inherit; font-weight: 700; font-size: 14px; color: #fff; cursor: pointer;
}
.pa-tab.off { background: #9aa0a6; }
.pa-tab.blue { background: #1e4fd8; }
.pa-tab.green { background: #1e9e4a; }
.pa-tab.navy { background: #14255a; }

/* underline form fields */
.pa-field { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.pa-field label { font-size: 12px; color: #5f6368; font-weight: 600; }
.pa-field input, .pa-field select, .pa-field textarea {
  font: inherit; font-size: 15px; padding: 9px 2px; border: none; border-bottom: 2px solid #d4d7dd;
  border-radius: 0; background: transparent; color: var(--ds-ink); width: 100%; box-sizing: border-box;
}
.pa-field input:focus, .pa-field select:focus, .pa-field textarea:focus {
  outline: none; border-bottom-color: #1e4fd8;
}
.pa-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* navy total line */
.pa-total-line {
  display: flex; justify-content: space-between; padding: 12px 14px; margin-bottom: 12px;
  border-radius: 10px; font-weight: 700; font-size: 14px;
  background: #14255a; color: #fff; gap: 10px;
}

.pa-back {
  background: none; border: none; color: #1e4fd8; font: inherit; font-size: 13px; font-weight: 700;
  padding: 0; cursor: pointer; align-self: flex-start;
}

.pa-back-float {
  display: block; width: 100%; margin-top: 18px; margin-bottom: 6px;
  background: #1e4fd8; border: none; border-radius: 10px;
  padding: 13px 16px; min-height: 46px; font: inherit; font-size: 14px; font-weight: 700;
  color: #fff; text-align: center; cursor: pointer;
}

.pa-section-t {
  font-size: 12px; font-weight: 700; color: #14255a; text-transform: uppercase;
  letter-spacing: 0.05em; margin-top: 4px;
}

.pa-hist { display: flex; flex-direction: column; gap: 6px; }
.pa-hist .h { font-size: 12px; color: #5f6368; border-left: 2px solid #dfe4ec; padding-left: 8px; }

.pa-rc {
  position: fixed; right: 10px; bottom: 8px; font-size: 10px; color: var(--ds-ink-2);
  opacity: 0.85; background: rgba(255,255,255,0.85); padding: 2px 6px; border-radius: 6px;
  z-index: 50; pointer-events: none;
}

.pa-empty { color: #5f6368; font-size: 13px; padding: 18px 0; text-align: center; }

/* ---------- printable statement (boxed navy, unchanged for PDF readability) ---------- */
.st-doc { background: #fff; }
.st-head { text-align: center; border-bottom: 2px solid #1f3a6e; padding-bottom: 10px; margin-bottom: 14px; }
.st-head .h1 { font-size: 18px; font-weight: 700; color: #1f3a6e; }
.st-head .h2 { font-size: 14px; font-weight: 600; color: #1f3a6e; margin-top: 2px; }
.st-head .h3 { font-size: 11px; color: var(--ds-ink-2); margin-top: 4px; }
.st-sec { font-size: 13px; font-weight: 700; color: #fff; background: #1f3a6e; padding: 5px 10px; border-radius: 4px; margin: 14px 0 8px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.st-table th { background: #e8eef9; color: #1f3a6e; border: 1px solid #b9c8e4; padding: 6px 8px; text-align: left; font-weight: 700; }
.st-table td { border: 1px solid #ccd6ea; padding: 6px 8px; }
.st-table td.r, .st-table th.r { text-align: right; }
.st-box { border: 2px solid #1f3a6e; border-radius: 6px; padding: 10px 12px; margin-top: 14px; }
.st-box .row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.st-box .row.total { font-weight: 700; font-size: 14px; border-top: 1px solid #b9c8e4; margin-top: 6px; padding-top: 8px; color: #1f3a6e; }
.st-foot { margin-top: 16px; font-size: 10px; color: var(--ds-ink-2); text-align: center; border-top: 1px solid var(--ds-hairline); padding-top: 8px; }

.st-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.st-table.wide { min-width: 660px; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; }
  .st-doc { padding: 0 !important; }
  .st-sec { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .st-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .st-box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pa-rc { display: none !important; }
  .st-scroll { overflow-x: visible; }
  .st-table.wide { min-width: 0; }
}

/* bill photo: camera or gallery */
.pa-billrow { display: flex; gap: 8px; margin-bottom: 10px; }
.pa-filebtn { flex: 1; text-align: center; display: block; cursor: pointer; }
.pa-filebtn input[type="file"] { display: none; }
.pa-billthumb { max-width: 140px; border-radius: 10px; border: 1px solid #e4e7ee; display: block; margin-bottom: 10px; }

/* ---- production app frame (replaces File kit wrapper) ---- */
html, body { margin: 0; padding: 0; background: #e8ebf2; }
body { font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
.pa-page { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f4f6fa; padding: 14px 14px 90px; box-sizing: border-box; }
.pa-rc { position: fixed; right: 8px; bottom: 6px; font-size: 10px; color: #9aa0a6; z-index: 30; }
.pa-back { background: none; border: none; color: #1e4fd8; font: inherit; font-weight: 700; font-size: 14px; padding: 4px 0; cursor: pointer; }
.pa-back-float { position: fixed; left: 12px; bottom: 12px; z-index: 31; background: #14255a; color: #fff; border: none; border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 700; font-size: 13px; box-shadow: 0 4px 14px rgba(20,37,90,.35); cursor: pointer; }
.pa-field label { display: block; font-size: 12px; color: #5f6368; font-weight: 600; margin-bottom: 4px; }
.pa-field input, .pa-field select { width: 100%; box-sizing: border-box; border: none; border-bottom: 2px solid #c7d2f0; background: transparent; padding: 8px 2px; font: inherit; font-size: 15px; color: #14255a; }
.pa-field input:focus, .pa-field select:focus { outline: none; border-bottom-color: #1e4fd8; }
.pa-field { margin-bottom: 12px; }
.pa-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pa-callout { border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 19px; }
.pa-callout.note { background: #eaf0fd; border: 1px solid #c6d5f6; color: #1e3a8a; }
.pa-callout.warning { background: #fdf3d7; border: 1px solid #f0d59a; color: #92400e; }
.pa-callout .t { font-weight: 800; margin-bottom: 2px; }
.pa-billrow { display: flex; gap: 8px; margin: 6px 0; }
.pa-filebtn { position: relative; overflow: hidden; text-align: center; flex: 1; }
.pa-filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pa-billthumb { max-width: 140px; border-radius: 10px; border: 1px solid #dfe4ec; margin-top: 6px; }
.pa-hist .h { font-size: 12px; color: #4b5563; padding: 6px 0; border-bottom: 1px dashed #e4e7ee; }
.pa-hist .h:last-child { border-bottom: none; }
.pa-section-t { font-size: 13px; font-weight: 800; color: #14255a; margin: 6px 0 -4px; }
.pa-empty { padding: 14px; color: #5f6368; font-size: 13px; }
.pa-total-line { display: flex; justify-content: space-between; background: #fff; border: 1px solid #e4e7ee; border-radius: 10px; padding: 12px 14px; font-weight: 800; color: #14255a; }
.pa-total-line.grad { background: #1e3a8a; color: #fff; border: none; }
.pa-billimg { max-width: 100%; border-radius: 10px; border: 1px solid #dfe4ec; }
.pa-error { background: #fdeaeb; border: 1px solid #f3b4ba; color: #b91c1c; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.pa-linkbtn { background: none; border: none; color: #1e4fd8; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 0; }
.pa-logout { color: #b91c1c; }

/* statement print doc */
.st-doc { background: #fff; border: 1.5px solid #14255a; border-radius: 12px; padding: 16px; }
.st-head { border-bottom: 2px solid #14255a; padding-bottom: 8px; margin-bottom: 10px; }
.st-head .h1 { font-size: 18px; font-weight: 800; color: #14255a; }
.st-head .h2 { font-size: 14px; font-weight: 700; color: #1e3a8a; margin-top: 2px; }
.st-head .h3 { font-size: 11px; color: #5f6368; margin-top: 4px; }
.st-sec { font-size: 13px; font-weight: 800; color: #fff; background: #1f3a6e; padding: 5px 10px; border-radius: 4px; margin: 14px 0 8px; }
.st-scroll { overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.st-table th, .st-table td { border: 1px solid #c7d2f0; padding: 6px 8px; text-align: left; vertical-align: top; }
.st-table th { background: #eaf0fd; color: #14255a; font-weight: 700; }
.st-table .r, .st-table td.r { text-align: right; white-space: nowrap; }
.st-box { border: 1.5px solid #14255a; border-radius: 10px; padding: 10px 14px; margin-top: 14px; }
.st-box .row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: #14255a; }
.st-box .row.total { border-top: 1.5px solid #14255a; margin-top: 6px; padding-top: 8px; font-weight: 800; font-size: 15px; }
.st-foot { margin-top: 12px; font-size: 10px; color: #5f6368; border-top: 1px dashed #c7d2f0; padding-top: 8px; }
@media print { .no-print { display: none !important; } body { background: #fff; } .pa-page { max-width: none; padding: 0; } .pa-rc { position: static; } }
.pa-btn.b-red { background: #b91c1c; color: #fff; }
.pa-passw { position: relative; }
.pa-passw input { width: 100%; padding-right: 58px; box-sizing: border-box; }
.pa-eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #1d4ed8; font-weight: 700; font-size: 13px; padding: 6px 8px; cursor: pointer; }
