:root { color-scheme: light; --ink: #173f39; --muted: #70817c; --green: #136e63; --border: #dfe9e3; --background: #f2f6f3; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--background); font: 15px/1.65 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: var(--green); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 32px; letter-spacing: -1px; line-height: 1.3; }
h2 { margin: 8px 0 12px; font-size: 21px; line-height: 1.4; }
input { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid #cbdcd2; border-radius: 10px; color: var(--ink); background: #fff; }
input:focus { outline: 2px solid #81b8a1; outline-offset: 2px; }
label { display: block; margin-bottom: 7px; color: #526b61; font-size: 13px; }
.resident-shell { max-width: 500px; margin: auto; padding: 32px 22px calc(28px + env(safe-area-inset-bottom)); }
.resident-shell.minimal { padding-top: 72px; }
.minimal #loginPanel { background: none; border: none; padding: 0; }
.minimal .room-label { margin-bottom: 0; font-size: 14px; color: #d0e7db; }
.minimal .amount { padding: 22px 0 30px; }
.minimal footer { text-align: left; margin-top: 14px; }
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 36px; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 15px 15px 15px 4px; background: var(--green); color: #fff; font-size: 25px; font-weight: 800; }
.brand strong { font-size: 16px; letter-spacing: 1px; }
.brand small { display: block; font-size: 11px; color: var(--muted); }
.eyebrow, .section-number { color: #6d8a7c; font-size: 11px; letter-spacing: 1.8px; font-weight: 650; }
.intro { margin-bottom: 24px; }
.intro p { color: var(--muted); font-size: 14px; margin-bottom: 0; }
.eyebrow { display: inline-block; margin-bottom: 11px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 23px; margin-bottom: 18px; }
.subtle { color: var(--muted); font-size: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 47px; padding: 11px 18px; border: 1px solid #cbdcd2; border-radius: 10px; color: var(--ink); text-decoration: none; background: #fff; font-weight: 600; }
.button.primary { color: #fff; background: var(--green); border-color: var(--green); }
.button:hover { filter: brightness(.97); }
.button.full { width: 100%; margin-top: 15px; }
.text-button { padding: 6px 0; background: none; border: none; color: var(--green); font-size: 13px; }
.footnote { margin: 13px 0 0; text-align: center; color: #89968e; font-size: 11px; }
.status { margin: 0 0 16px; color: var(--muted); font-size: 13px; min-height: 21px; }
.status.error { background: #fff0e9; color: #ac4a2c; padding: 11px 13px; border-radius: 10px; }
.balance-card { background: #124d43; color: #fff; border-radius: 20px; padding: 26px 24px 18px; margin-bottom: 18px; box-shadow: 0 12px 28px #164d4315; }
.balance-top, .balance-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.balance-top { color: #c4e2d5; }
.live-dot { border: 1px solid #79b49b66; border-radius: 20px; padding: 3px 8px; font-size: 10px; white-space: nowrap; }
.live-dot::before { content: '●'; color: #b9e4be; padding-right: 5px; }
.amount { display: flex; align-items: baseline; gap: 9px; padding: 22px 0 8px; }
.currency { font-size: 25px; font-weight: 400; color: #c8e5d7; }
.amount strong { font-size: clamp(39px, 11vw, 58px); font-weight: 650; letter-spacing: -2px; line-height: 1.3; overflow-wrap: anywhere; }
.balance-card p { color: #afcfc0; font-size: 12px; margin-bottom: 24px; }
.balance-bottom { padding-top: 14px; border-top: 1px solid #ffffff20; color: #bedbcd; font-size: 10px; }
.light-button { background: #ffffff12; border: 1px solid #ffffff25; color: #fff; border-radius: 7px; padding: 7px 10px; font-size: 11px; white-space: nowrap; }
dl { margin: 17px 0 10px; }
dl > div { display: flex; justify-content: space-between; gap: 15px; padding: 9px 0; border-bottom: 1px solid #edf2ee; font-size: 13px; }
dt { color: var(--muted); flex-shrink: 0; }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.code-input { font-family: Consolas, monospace; letter-spacing: 1px; font-size: 17px; }
footer { margin: 27px 0 0; text-align: center; color: #8b9991; font-size: 10px; }
footer p { margin: 3px 0; }
footer .icp-registration { text-align: center; }
.admin-shell { max-width: 1400px; margin: auto; padding: 28px 22px 50px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.admin-header .brand { margin-bottom: 26px; }
.admin-title { margin-bottom: 23px; }
.admin-title h1 { font-size: 28px; }
.admin-title p { color: var(--muted); font-size: 13px; }
.login-card { max-width: 440px; margin: 30px auto; }
.admin-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.admin-grid .card { min-width: 0; }
.search-row { display: flex; gap: 9px; align-items: center; margin: 15px 0; }
.search-row input { min-width: 0; }
.search-row button { flex-shrink: 0; }
.search-row select { min-height: 48px; padding: 8px; border: 1px solid #cbdcd2; border-radius: 10px; background: white; color: var(--ink); }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 11px 9px; border-bottom: 1px solid #e8efea; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 11px; font-weight: 500; background: #f7faf7; white-space: nowrap; }
td button { background: #edf5ef; border: none; color: var(--green); border-radius: 6px; padding: 5px 9px; font-size: 12px; white-space: nowrap; }
.table-note { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.code-result { background: #edf7f0; border: 1px solid #b9d8c5; border-radius: 12px; padding: 18px; margin-top: 20px; }
.code-result strong { display: block; font: 600 21px/1.6 Consolas, monospace; letter-spacing: 1px; overflow-wrap: anywhere; margin: 6px 0; }
.code-result p { font-size: 12px; color: #526b61; margin: 6px 0; }
.small { color: var(--muted); font-size: 12px; }
.card-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-title-row h2 { margin: 0; }
.empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.residents-table { min-width: 1040px; }
.residents-table td { overflow-wrap: anywhere; }
.resident-pagination, .page-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.page-controls label { margin: 0; }
.page-controls select { padding: 7px; border: 1px solid #cbdcd2; border-radius: 7px; background: white; color: var(--ink); }
.page-controls .button { min-height: 36px; padding: 6px 12px; font-size: 12px; }
.page-controls span { font-size: 12px; }
.detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.detail-fields > div { min-width: 0; }
.detail-fields dd { word-break: break-word; }
.detail-close { margin-left: 20px; }
.meter-detail { border: 1px solid var(--border); border-radius: 10px; padding: 12px 15px; margin-bottom: 12px; }
.meter-detail summary, .raw-details summary { cursor: pointer; }
.raw-details { margin-top: 20px; }
.raw-details pre { background: #f5f8f5; padding: 15px; border-radius: 10px; overflow: auto; max-height: 420px; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.7 Consolas, monospace; }
@media (max-width: 760px) { .detail-fields { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .admin-grid { grid-template-columns: 1fr; gap: 0; } .admin-shell { padding: 23px 14px; } .card { padding: 20px; } .admin-header { align-items: flex-start; } .admin-header > a { font-size: 12px; } }
@media (max-width: 360px) { .resident-shell { padding-left: 16px; padding-right: 16px; } .card, .balance-card { padding: 19px; } .code-input { font-size: 15px; } }
