/* Blivo Books — TallyPrime-style theme */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", Tahoma, Verdana, Arial, sans-serif;
  font-size: 14px; color: #1a1a1a; background: #e8eef2;
  overflow: hidden; user-select: none;
}
#app { height: 100vh; display: flex; flex-direction: column; }

/* ---- top bar ---- */
.topbar { background: linear-gradient(#2b5964, #234b54); color: #fff; display: flex;
  align-items: center; height: 40px; padding: 0 10px; flex: 0 0 auto; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: .3px; margin-right: 6px; }
.brand small { font-size: 10px; opacity: .8; font-weight: 400; vertical-align: super; }
.topmenu { display: flex; gap: 2px; margin-left: auto; }
.topmenu .mi { padding: 4px 9px; border-radius: 3px; font-size: 12.5px; white-space: nowrap; }
.topmenu .mi b { color: #ffd24a; font-weight: 700; }
.searchbar { flex: 1; margin: 0 12px; background: #eef3f5; color: #555; height: 26px; border-radius: 4px;
  display: flex; align-items: center; padding: 0 10px; font-size: 12.5px; max-width: 520px; }

/* ---- body layout ---- */
.main { flex: 1; display: flex; min-height: 0; }
.content { flex: 1; overflow: auto; position: relative; background: #f4f7f9; }
.rightpanel { width: 150px; flex: 0 0 150px; background: #d7e6f2; border-left: 1px solid #b9cee0;
  overflow: auto; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.rbtn { background: #eaf3fb; border: 1px solid #c4d8ea; border-radius: 3px; padding: 4px 6px;
  font-size: 11.5px; line-height: 1.25; cursor: pointer; }
.rbtn b { color: #16619e; }
.rbtn:hover { background: #dcebf8; }
.rbtn .k { color: #b23; font-weight: 700; }

/* ---- header strip (report title + period) ---- */
.strip { background: #1e6b8c; color: #fff; padding: 5px 12px; display: flex; justify-content: space-between;
  align-items: center; font-size: 13px; }
.strip .co { font-weight: 700; }
.strip .period { font-size: 12px; opacity: .95; }

/* ---- gateway menu ---- */
.gw-wrap { display: flex; justify-content: center; padding-top: 26px; }
.gw { background: #fff; border: 1px solid #9fb6c4; width: 430px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.gw-title { background: #d9e7f1; text-align: center; font-weight: 700; padding: 6px; border-bottom: 1px solid #b9cee0;
  color: #1c4b5e; }
.gw-sec { font-size: 11px; color: #7a8a95; padding: 8px 16px 2px; text-transform: uppercase; letter-spacing: .5px; }
.menu-item { padding: 4px 16px; cursor: pointer; display: flex; }
.menu-item .hot { color: #b52020; font-weight: 700; }
.menu-item.sel { background: #fbe58a; }
.menu-item.sel .hot { color: #7a1414; }

/* ---- forms ---- */
.form-wrap { padding: 16px 22px; max-width: 860px; }
.form-title { font-weight: 700; color: #1c4b5e; margin-bottom: 10px; font-size: 15px; }
.frow { display: flex; align-items: center; margin-bottom: 4px; }
.frow label { width: 200px; color: #333; }
.frow .fin { flex: 1; max-width: 380px; }
.fin { border: 1px solid #c3ccd2; background: #fff; padding: 4px 7px; font-size: 14px; font-family: inherit;
  color: #10314a; border-radius: 2px; }
.fin:focus { outline: none; border-color: #e0a400; background: #fffdf2; box-shadow: 0 0 0 2px #ffe9a6; }
select.fin { min-width: 200px; }
.hint { color: #7a8a95; font-size: 11.5px; margin-top: 2px; }

/* ---- voucher ---- */
.vhead { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 14px;
  border-bottom: 1px solid #cdd9e1; background: #eef4f8; }
.vtype-name { font-size: 20px; font-weight: 700; color: #1c4b5e; }
.vno { text-align: right; font-size: 12.5px; color: #333; }
.vlines { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.vlines th { background: #dceaf3; text-align: left; padding: 5px 8px; border-bottom: 1px solid #b9cee0; font-size: 12px; }
.vlines td { padding: 2px 6px; border-bottom: 1px dotted #dce4ea; }
.vlines td.amt, .vlines th.amt { text-align: right; }
.vlines input { border: none; background: transparent; width: 100%; font-size: 13.5px; font-family: inherit;
  padding: 3px 4px; color: #10314a; }
.vlines input:focus { outline: none; background: #fffdf2; box-shadow: inset 0 0 0 1px #e0a400; }
.vtot { font-weight: 700; background: #f0f5f8; }
.dc { width: 30px; color: #b52020; font-weight: 700; text-align: center; }

/* ---- report tables ---- */
.rpt { width: 100%; border-collapse: collapse; font-size: 13px; }
.rpt th { background: #dceaf3; text-align: left; padding: 5px 10px; border-bottom: 1px solid #b9cee0; }
.rpt td { padding: 3px 10px; border-bottom: 1px solid #eef2f5; }
.rpt td.num, .rpt th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rpt tr.grp td { font-weight: 700; background: #f2f7fa; color: #1c4b5e; }
.rpt tr.total td { font-weight: 700; border-top: 2px solid #9fb6c4; background: #eef4f8; }
.rpt tr.click:hover { background: #fbe58a; cursor: pointer; }
.two-col { display: flex; gap: 0; }
.two-col > div { flex: 1; }
.two-col .side-title { text-align: center; font-weight: 700; background: #d9e7f1; padding: 4px; color: #1c4b5e;
  border: 1px solid #b9cee0; }

/* ---- bottom bar ---- */
.bottombar { background: #234b54; color: #cfe6ec; flex: 0 0 auto; display: flex; align-items: center;
  height: 30px; font-size: 11.5px; padding: 0 10px; gap: 14px; }
.bottombar .keyhint b { color: #ffd24a; }
.bottombar .right { margin-left: auto; }

/* ---- login / center card ---- */
.center-screen { flex: 1; display: flex; align-items: center; justify-content: center; background: #dbe5ec; }
.card { background: #fff; border: 1px solid #9fb6c4; width: 380px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.card h2 { background: linear-gradient(#2b5964,#234b54); color: #fff; padding: 12px 16px; font-size: 16px; }
.card .body { padding: 18px; }
.card .frow label { width: 120px; }
.msg { color: #b52020; font-size: 12.5px; min-height: 16px; margin-top: 4px; }
.btnrow { margin-top: 14px; display: flex; gap: 8px; }
.btn { background: #1e6b8c; color: #fff; border: none; padding: 7px 16px; border-radius: 3px; cursor: pointer;
  font-size: 13px; font-family: inherit; }
.btn.sec { background: #8aa3b2; }
.btn:hover { filter: brightness(1.08); }

/* popups (list picker) */
.overlay { position: absolute; inset: 0; background: rgba(20,40,55,.25); display: flex;
  align-items: flex-start; justify-content: center; padding-top: 60px; z-index: 50; }
.picker { background: #fff; border: 1px solid #7a97a8; width: 360px; max-height: 70vh; overflow: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.picker .ph { background: #d9e7f1; padding: 6px 10px; font-weight: 700; color: #1c4b5e; position: sticky; top: 0; }
.picker .pi { padding: 5px 10px; cursor: pointer; }
.picker .pi.sel { background: #fbe58a; }
.picker .pi.create { color: #16619e; font-style: italic; }

.toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); background: #1c4b5e;
  color: #fff; padding: 8px 18px; border-radius: 4px; font-size: 13px; z-index: 100; opacity: .97; }
.empty { padding: 30px; text-align: center; color: #7a8a95; }
