/* Statement → MYOB Converter — styles (ported from the prototype's inline look) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: #eef0f3; color: #1a1d23; -webkit-font-smoothing: antialiased;
}
@keyframes mc-spin { to { transform: rotate(360deg); } }
input:focus, select:focus, button:focus { outline: none; }
.mc-cellinput:focus { border-color: #2f6fed !important; background: #fff !important; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #cfd3da; border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* header */
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 22px; background: #fff; border-bottom: 1px solid #e3e5e9; flex-shrink: 0;
  position: sticky; top: 0; z-index: 30; }
.hdr-left { display: flex; align-items: center; gap: 12px; }
.logo { width: 34px; height: 34px; border-radius: 8px; background: #2f6fed; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.title { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; line-height: 1.2; }
.subtitle { font-size: 12px; color: #6b7280; line-height: 1.3; }
.hdr-right { display: flex; align-items: center; gap: 10px; }
.lbl-muted { font-size: 12px; color: #6b7280; font-weight: 500; }

select.profile { font-size: 13px; font-weight: 600; padding: 7px 28px 7px 11px; border: 1px solid #d7dae0;
  border-radius: 7px; background: #fff; color: #1a1d23; cursor: pointer; appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%236b7280%22 stroke-width=%223%22><path d=%22M6 9l6 6 6-6%22/></svg>');
  background-repeat: no-repeat; background-position: right 9px center; }
input.profile-filter { font-size: 13px; padding: 7px 10px; border: 1px solid #d7dae0; border-radius: 7px;
  background: #fff; color: #1a1d23; width: 130px; }
input.profile-filter::placeholder { color: #9aa0aa; }
input.profile-filter:focus { outline: none; border-color: #6b7280; }

.btn { font-size: 13px; font-weight: 600; padding: 7px 13px; border: 1px solid #d7dae0; border-radius: 7px;
  background: #fff; color: #1a1d23; cursor: pointer; }
.btn:hover { background: #f4f5f7; }
.btn-sm { font-size: 12.5px; padding: 6px 11px; }
.btn-primary { border: none; background: #2f6fed; color: #fff; font-weight: 700; padding: 9px 18px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 7px; }
.btn-primary:hover { background: #2560d6; }
.btn-primary:disabled { background: #aebfe6; cursor: not-allowed; }
.btn-danger { border: 1px solid #f6cccc; background: #fff; color: #dc2626; }

main { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* empty / dropzone */
.empty-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.dropzone { width: 100%; max-width: 560px; border: 2px dashed #c2c7d0; border-radius: 14px; background: #fff;
  padding: 48px 40px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: #2f6fed; background: #f5f8ff; }
.drop-icon { width: 60px; height: 60px; border-radius: 14px; background: #eaf0fe; color: #2f6fed;
  display: flex; align-items: center; justify-content: center; font-size: 28px; }
.drop-h { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.drop-p { font-size: 13.5px; color: #6b7280; max-width: 360px; line-height: 1.5; }
.browse { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  padding: 11px 20px; background: #2f6fed; color: #fff; border-radius: 9px; cursor: pointer; }
.browse:hover { background: #2560d6; }
.active-meta { margin-top: 14px; font-size: 12px; color: #9aa1ad; display: flex; align-items: center; gap: 7px;
  flex-wrap: wrap; justify-content: center; }
.active-meta b { font-weight: 600; color: #6b7280; }
.sep { color: #cfd3da; }
.err { margin-top: 8px; font-size: 13px; color: #dc2626; background: #fdeaea; border: 1px solid #f6cccc;
  padding: 9px 13px; border-radius: 8px; max-width: 420px; }

/* loaded */
.loaded { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 18px 22px 0; }
.strip { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card { background: #fff; border: 1px solid #e3e5e9; border-radius: 10px; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.card .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #9aa1ad; font-weight: 600; }
.card .v { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.card .v.green { color: #15803d; }
.card .v.grey { color: #6b7280; }
.card .s { font-size: 12px; color: #6b7280; font-variant-numeric: tabular-nums; }

/* reconcile banner — the load-bearing safety check */
.recon { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-radius: 10px; margin-bottom: 14px;
  font-size: 14px; border: 1px solid; flex-wrap: wrap; }
.recon .ico { font-size: 20px; line-height: 1; }
.recon .msg { flex: 1; min-width: 220px; }
.recon .msg b { font-weight: 700; }
.recon .nums { font-variant-numeric: tabular-nums; font-size: 13px; }
.recon.ok { background: #e9f7ef; border-color: #aedcc0; color: #15803d; }
.recon.bad { background: #fdeaea; border-color: #f0b4b4; color: #b91c1c; }
.recon.warn { background: #fef6e7; border-color: #f3d99b; color: #92600a; }
.recon.batch { background: #eef4ff; border-color: #bcd2f5; color: #1d4ed8; }
.recon .ack { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.recon .ack input { width: 16px; height: 16px; cursor: pointer; }

/* toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar .left { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; }
.toolbar .right { display: flex; align-items: center; gap: 9px; }

/* table */
.tablewrap { flex: 1; min-height: 0; overflow: auto; background: #fff; border: 1px solid #e3e5e9; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { position: sticky; top: 0; z-index: 5; background: #f6f7f9; box-shadow: inset 0 -1px 0 #e3e5e9; }
th { padding: 9px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; font-weight: 650; text-align: left; }
th.c { text-align: center; } th.r { text-align: right; }
td { padding: 3px 10px; border-bottom: 1px solid #f0f1f4; }
td.c { text-align: center; } td.r { text-align: right; }
tr.excluded { opacity: 0.4; }
tr.offmonth { background: #fdf8ee; }
.idx { color: #b8bdc7; font-size: 12px; font-variant-numeric: tabular-nums; }
.mc-cellinput { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px;
  border: 1px solid #e7e9ee; background: #fff; padding: 5px 7px; border-radius: 5px; color: #1a1d23; }
.mc-cellinput.date { width: 96px; } .mc-cellinput.inv { width: 120px; } .mc-cellinput.amt { width: 96px; text-align: right; }
.amt.neg { color: #dc2626; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; color: #6b7280; font-variant-numeric: tabular-nums; }
.taxbtn { font-family: inherit; cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; padding: 3px 9px; border-radius: 5px; border: 1px solid; }
.taxbtn.gst { border-color: #cfe0fb; background: #eaf0fe; color: #2560d6; }
.taxbtn.nt { border-color: #e3e5e9; background: #f1f2f4; color: #6b7280; }
.note { font-size: 12px; color: #6b7280; }
input[type=checkbox] { accent-color: #2f6fed; }

/* loading overlay */
.overlay { position: fixed; inset: 0; background: rgba(238,240,243,0.7); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 50; }
.spinbox { background: #fff; border: 1px solid #e3e5e9; border-radius: 12px; padding: 26px 34px; display: flex;
  flex-direction: column; align-items: center; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,0.12); }
.spinner { width: 30px; height: 30px; border: 3px solid #e3e5e9; border-top-color: #2f6fed; border-radius: 50%; animation: mc-spin 0.8s linear infinite; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(20,23,30,0.42); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 24px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 460px; box-shadow: 0 18px 60px rgba(0,0,0,0.25); overflow: hidden; }
.modal-h { padding: 18px 22px; border-bottom: 1px solid #eef0f3; display: flex; align-items: center; justify-content: space-between; }
.modal-h .t { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.modal-x { border: none; background: transparent; font-size: 20px; color: #9aa1ad; cursor: pointer; line-height: 1; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: #6b7280; }
.field label .hint { color: #9aa1ad; font-weight: 400; }
.field input, .field select { font-size: 14px; padding: 9px 11px; border: 1px solid #d7dae0; border-radius: 8px; }
.field input.up { text-transform: uppercase; }
.field input.mono { font-family: ui-monospace, Menlo, monospace; color: #1a1d23; }
.row2 { display: flex; gap: 12px; }
.checkrow { display: flex; align-items: center; gap: 9px; padding: 9px 0; cursor: pointer; font-size: 13px; }
.parsernote { font-size: 12px; color: #9aa1ad; line-height: 1.5; background: #f6f7f9; border-radius: 8px; padding: 10px 12px; }
.modal-f { padding: 15px 22px; border-top: 1px solid #eef0f3; display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
