/* cfbe: the look of the original Cash Frenzy back office (header #242f42, menu #324157, tables #3398cc). */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font: 14px/1.5 "Helvetica Neue", Helvetica, "PingFang SC", Tahoma, Arial, sans-serif; color: #333; background: #fff; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }

/* ---------- shell ---------- */
.hd { position: fixed; left: 0; right: 0; top: 0; height: 70px; background: #242f42; color: #fff; display: flex; align-items: center; z-index: 10; }
.hd .burger { width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.hd .logo { font-size: 22px; width: 250px; padding-left: 10px; }
.hd .welcome { background: #2f506a; border-radius: 18px; padding: 4px 10px; font-size: 16px; white-space: nowrap; }
.hd .welcome .r { color: #ffc107; font-size: 15px; }
.hd .out { margin-left: auto; margin-right: 40px; color: #409eff; font-size: 16px; cursor: pointer; }
.side { position: fixed; top: 70px; bottom: 0; left: 0; width: 250px; background: #324157; overflow-y: auto; transition: width .2s; z-index: 9; }
.side a { display: flex; align-items: center; height: 56px; padding-left: 20px; color: #bfcbd9; font-size: 14px; white-space: nowrap; }
.side a svg { width: 17px; height: 17px; margin-right: 12px; flex: none; }
.side a:hover { background: #28354a; }
.side a.on { color: #409eff; }
body.mini .side { width: 60px; }
body.mini .side a span { display: none; }
body.mini .main, body.mini .tabs { left: 60px; }
.tabs { position: fixed; top: 70px; left: 250px; right: 0; height: 32px; background: #fff; border-bottom: 1px solid #f0f0f0;
        box-shadow: 0 1px 2px rgba(0,0,0,.06); display: flex; align-items: center; z-index: 8; transition: left .2s; }
.tabs .strip { flex: 1; display: flex; overflow: hidden; height: 100%; align-items: center; padding-left: 3px; }
.tab { display: flex; align-items: center; height: 26px; margin-right: 8px; padding: 0 8px; border: 1px solid #e6e6e6; font-size: 12px; color: #495060; cursor: pointer; white-space: nowrap; background: #fff; }
.tab.on { background: #409eff; border-color: #409eff; color: #fff; }
.tab .x { margin-left: 10px; font-size: 14px; line-height: 1; color: #ff5722; }
.tab.on .x { color: #fff; }
.tabs .opts { position: relative; height: 100%; }
.tabs .opts > button { height: 100%; border: 0; background: #409eff; color: #fff; padding: 0 30px 0 12px; font-family: "Times New Roman", serif; font-size: 13px; cursor: pointer; position: relative; }
.tabs .opts > button::after { content: ""; position: absolute; right: 12px; top: 11px; width: 6px; height: 6px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.tabs .opts ul { display: none; position: absolute; right: 0; top: 100%; margin: 0; padding: 5px 0; list-style: none; background: #fff; border: 1px solid #d2d2d2; box-shadow: 0 2px 4px rgba(0,0,0,.12); min-width: 120px; }
.tabs .opts.open ul { display: block; }
.tabs .opts li { padding: 0 20px; line-height: 36px; cursor: pointer; white-space: nowrap; }
.tabs .opts li:hover { background: #f2f2f2; color: #409eff; }
.main { position: fixed; top: 102px; left: 250px; right: 0; bottom: 0; transition: left .2s; }
.main iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: none; background: #fff; }
.main iframe.on { display: block; }

/* ---------- pages (inside the tab iframes) ---------- */
.page { padding: 30px 20px 30px 20px; }
.btn { display: inline-block; height: 38px; line-height: 38px; padding: 0 18px; border: 1px solid transparent; border-radius: 2px; background: #1e9fff; color: #fff; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { opacity: .85; }
.btn.prim { background: #1e9fff; }
.btn.warm { background: #ffb800; }
.btn.danger { background: #ff5722; }
.btn.green { background: #5fb878; }
.btn.gray { background: #909399; }
.btn.plain { background: #fff; color: #555; border-color: #c9c9c9; }
.btn.plain:hover { color: #1e9fff; opacity: 1; }
.btn.xs { height: 22px; line-height: 22px; padding: 0 5px; font-size: 12px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.balbox { display: inline-block; border: 1px solid #d2d2d2; color: #aaa; height: 38px; line-height: 36px; padding: 0 18px; margin-bottom: 38px; font-size: 14px; }
.balbox b { color: #ffc107; font-weight: normal; }
.card { border: 1px solid #e6e6e6; margin-bottom: 44px; }
.card table.t { margin: 0; }
.card .acts { text-align: center; padding: 10px 0; border-top: 1px solid #e6e6e6; }
.card .acts .btn { margin: 0 4px; }
.card td.nodata { color: #666; }
.search { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.search label { font-size: 14px; color: #333; }
.inp { height: 38px; border: 1px solid #e6e6e6; padding: 0 10px; width: 220px; background: #fff; outline: none; }
.inp:focus { border-color: #d2d2d2 !important; }
select.inp { width: 240px; color: #333; }
.note { color: #f00; margin: 6px 0 12px; }
.chips { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.chips span.l { margin-right: 12px; }
.chip { border: 1px solid #1e9fff; color: #1e9fff; font-size: 12px; padding: 6px 10px; border-radius: 2px; background: #fff; }

table.t { width: 100%; border-collapse: collapse; border: 1px solid #e6e6e6; table-layout: auto; }
table.t th { background: #3398cc; color: #fff; font-weight: bold; height: 46px; padding: 6px 12px; text-align: center; font-size: 14px; }
table.t td { height: 51px; padding: 6px 12px; text-align: center; border-top: 1px solid #e6e6e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
table.t tbody tr:nth-child(even) td { background: #f2f2f2; }
table.t tbody tr:hover td { background: #f7f7f7; }
table.t td.nodata { height: 60px; color: #666; }
.tw { overflow-x: auto; }
.pager { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #e6e6e6; border-top: 0; font-size: 12px; color: #666; }
.pager a { display: inline-block; min-width: 30px; height: 28px; line-height: 28px; text-align: center; padding: 0 8px; border: 1px solid #e2e2e2; background: #fff; color: #333; cursor: pointer; }
.pager a.on { background: #1e9fff; border-color: #1e9fff; color: #fff; }
.pager a.dis { color: #d2d2d2; cursor: not-allowed; }
.pager input { width: 40px; height: 28px; border: 1px solid #e2e2e2; text-align: center; }
.pager button { height: 28px; border: 1px solid #e2e2e2; background: #fff; padding: 0 10px; cursor: pointer; }
.pager select { height: 28px; background: #000; color: #fff; border: 0; padding: 0 4px; }
.neg { color: #ff5722; }

/* switch */
.sw { position: relative; display: inline-block; width: 52px; height: 26px; border-radius: 20px; background: #fff; border: 1px solid #d2d2d2; cursor: pointer; vertical-align: middle; transition: .1s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: #d2d2d2; transition: .1s; }
.sw.on { background: #5fb878; border-color: #5fb878; }
.sw.blue.on { background: #1e9fff; border-color: #1e9fff; }
.sw.on::after { left: 28px; background: #fff; }
.sw.dis { opacity: .5; cursor: not-allowed; }

/* forms (setting page and dialogs) */
.form .row { display: flex; align-items: stretch; margin-bottom: 22px; }
.form .row > label { width: 150px; flex: none; background: #fbfbfb; display: flex; align-items: center; justify-content: flex-end; padding-right: 12px; }
.form .row > .v { flex: 1; display: flex; align-items: center; }
.form .row > .v .inp { width: 100%; }
.form .inp[readonly] { background: #f7f7f7; color: #b2b2b2; }
.form .tip { border-left: 5px solid #009688; background: #f2f2f2; color: #f00; padding: 15px 15px; margin: 10px 0 20px; }
.form .btns { text-align: center; }
.form .btns .btn { margin: 0 6px; }

/* dialog (layer look: centred title in the body, min / max / close at the top right) */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 100; }
.dlg { position: fixed; z-index: 101; background: #fff; box-shadow: 1px 1px 50px rgba(0,0,0,.3); border-radius: 2px; display: flex; flex-direction: column; left: 5%; top: 5%; width: 90%; height: 90%; }
.dlg.max { left: 0; top: 0; width: 100%; height: 100%; }
.dlg.small { left: 50%; top: 50%; width: 520px; height: auto; max-width: 92%; transform: translate(-50%, -50%); }
.dlg .ttl { flex: none; text-align: center; font-size: 20px; color: #333; padding: 22px 90px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg.small .ttl { font-size: 16px; padding-top: 16px; }
.dlg .wbtn { position: absolute; top: 16px; right: 14px; display: flex; gap: 12px; }
.dlg .wbtn span { width: 16px; height: 16px; cursor: pointer; position: relative; display: block; }
.dlg .wbtn .mn::before { content: ""; position: absolute; left: 1px; right: 1px; top: 8px; height: 2px; background: #333; }
.dlg .wbtn .mx::before { content: ""; position: absolute; inset: 1px; border: 2px solid #333; }
.dlg .wbtn .mx::after { content: ""; position: absolute; left: 5px; top: 5px; width: 6px; height: 2px; background: #333; transform: rotate(-45deg); }
.dlg .wbtn .cls::before, .dlg .wbtn .cls::after { content: ""; position: absolute; left: 7px; top: -1px; width: 2px; height: 18px; background: #333; transform: rotate(45deg); }
.dlg .wbtn .cls::after { transform: rotate(-45deg); }
.dlg .bd { flex: 1; overflow: auto; padding: 30px 30px 20px 20px; }
.dlg.small .bd { padding: 14px 24px 20px; }
.dlg .form .row > label { background: none; width: 170px; }
.dlg .form .row { margin-bottom: 20px; }
.dlg .form .hint { margin: -10px 0 18px 170px; color: #333; font-size: 15px; }
.dlg .form .req { color: #f00; }
.radios { display: flex; gap: 38px; align-items: center; min-height: 38px; }
.radios label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.radios input { width: 20px; height: 20px; accent-color: #1e9fff; margin: 0; }
.radios input:checked + span { color: #1e9fff; }
.receipt { text-align: center; padding: 10px 0 0; }
.receipt .big { font-size: 22px; color: #009688; margin: 10px 0 16px; }
.receipt .line { margin: 6px 0; color: #555; }

/* level badges (Transaction Record) and legend icons (Reports) */
.badge { display: inline-block; color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 2px; line-height: 18px; }
.lv0 { --lv: #07a9fb; } .lv1 { --lv: #5fb878; } .lv2 { --lv: #cc8c2c; } .lv3 { --lv: #c8283f; } .lv4 { --lv: #ad1bbe; }
.badge.lv0, .badge.lv1, .badge.lv2, .badge.lv3, .badge.lv4 { background: var(--lv); }
.who { display: inline-flex; align-items: center; gap: 4px; color: var(--lv); }
.who svg { width: 16px; height: 16px; fill: var(--lv); }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 22px 0 22px 20px; }
.legend .who { border: 1px solid #d2d2d2; padding: 6px 10px; border-radius: 2px; font-size: 14px; }
.tree { width: 100%; max-width: 800px; border: 1px solid #e6e6e6; }
.tree .tsearch { background: #3398cc; padding: 12px 20px; }
.tree .tsearch input { width: 100%; height: 34px; border: 0; padding: 0 12px; outline: none; }
.tree table.t td { text-align: left; }
.tree table.t td:nth-child(2), .tree table.t td:nth-child(3) { text-align: center; }
.tree .arrow { display: inline-block; width: 16px; cursor: pointer; color: #333; user-select: none; }
.tree .arrow.none { visibility: hidden; }
.tree .btn.check { height: 24px; line-height: 22px; padding: 0 6px; font-size: 13px; background: #fff; color: #333; border-color: #c9c9c9; }
.card .btn[disabled] { opacity: .55; }

/* toast (layer msg) */
.toast { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); background: rgba(0,0,0,.65); color: #fff; padding: 12px 25px; border-radius: 2px; z-index: 200; font-size: 14px; max-width: 80%; text-align: center; }

/* login */
body.login { background: #2d3a4b; min-height: 100%; display: flex; align-items: center; justify-content: center; }
.lbox { width: 380px; max-width: calc(100% - 32px); background: #fff; border-radius: 4px; padding: 30px 30px 26px; box-shadow: 0 4px 30px rgba(0,0,0,.3); }
.lbox h1 { margin: 0 0 24px; font-size: 22px; font-weight: normal; text-align: center; color: #333; }
.lbox .f { margin-bottom: 18px; display: flex; gap: 10px; }
.lbox .f .inp { width: 100%; }
.lbox .cap img { height: 38px; width: 110px; cursor: pointer; border: 1px solid #e6e6e6; flex: none; }
.lbox .rem { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; color: #666; font-size: 13px; }
.lbox .btn { width: 100%; height: 42px; line-height: 42px; font-size: 15px; }
.lbox .err { color: #ff5722; min-height: 20px; font-size: 13px; margin-top: 10px; text-align: center; }

@media (max-width: 800px) {
  .hd .logo { width: auto; padding-right: 14px; font-size: 18px; }
  .hd .welcome { font-size: 13px; overflow: hidden; text-overflow: ellipsis; max-width: 55vw; }
  .hd .out { margin-right: 16px; font-size: 14px; }
  .side { width: 0; }
  body.mini .side { width: 200px; }
  body.mini .side a span { display: inline; }
  .tabs, .main, body.mini .main, body.mini .tabs { left: 0; }
  .page { padding: 16px; }
  .form .row { flex-direction: column; }
  .form .row > label { width: auto; justify-content: flex-start; background: none; padding: 0 0 4px; }
  .inp, select.inp { width: 100%; }
}
