body{font:16px system-ui;background:#eef4f4;color:#173337;margin:0}main{max-width:650px;margin:30px auto;padding:24px;background:white;border-radius:16px;box-shadow:0 3px 20px #0001}h1{font-size:25px}label{display:block;margin:15px 0 5px;font-weight:600}input,select,textarea,button{box-sizing:border-box;width:100%;padding:12px;border:1px solid #aab;border-radius:8px;font:inherit}button{background:#17645c;color:white;border:0;margin-top:18px;cursor:pointer}button:disabled{opacity:.5}.note{background:#f0f5f4;padding:12px;border-radius:8px}.error{color:#a12}.ok{color:#17645c}table{width:100%;border-collapse:collapse;font-size:13px}td,th{border-bottom:1px solid #ddd;padding:8px;text-align:left}small{color:#566} .hide{display:none}
body{line-height:1.45}main{box-sizing:border-box;margin:20px auto}input[type=checkbox]{width:auto}button.secondary{background:#e3efed;color:#173337}fieldset{border:0;padding:0;margin:0}a{color:#17645c}.muted{color:#566}.status{min-height:1.5em}.check{display:flex;gap:10px;align-items:flex-start;font-weight:400}h2{font-size:20px}.toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between}.toolbar button{width:auto;margin:0}.review{background:#fff4da}.time-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:600px){main{margin:0;padding:18px;border-radius:0}h1{font-size:23px}.time-row{display:block}.toolbar{align-items:flex-start}}

.status.error{background:#fff0f0;border:2px solid #a12;padding:12px;border-radius:8px;font-weight:600;scroll-margin:30px}.status:empty{display:none}#passwordSettings{margin:24px 0}

.record-correction{min-width:240px;max-width:420px;padding:12px;background:#f4f7f7}.record-correction label{display:block;margin:10px 0}.record-correction input[type=checkbox]{width:auto;margin-left:8px}.record-version{padding:10px 0;border-bottom:1px solid #b9cccc}.excluded-record{background:#f1f1f1}.record-correction summary,td summary{cursor:pointer;font-weight:600}td details{margin-top:12px}

/* EcoKai readable history layout v1 */
main{max-width:1120px}#login,#form,#changePasswordForm,#addUser{max-width:650px}#signedIn>h2{margin-top:26px}
.history-table{font-size:14px;table-layout:fixed;width:100%}.history-table th,.history-table td{vertical-align:top;padding:14px 10px;overflow-wrap:anywhere}.history-table th{background:#f1f6f5;font-size:12px;color:#46615d}.history-table th:nth-child(1){width:90px}.history-table th:nth-child(2){width:135px}.history-table th:nth-child(3){width:175px}.history-table th:nth-child(4){width:55px}.history-table th:last-child{width:115px}.history-table td small{display:block;margin-top:4px}.record-identity strong{display:block}.record-badge{display:inline-block;border-radius:4px;background:#e6f2ec;color:#24513b;padding:2px 7px;font-size:12px;margin-top:5px}.excluded-badge{background:#eee8d8;color:#69501f}.record-observer{word-break:normal;overflow-wrap:anywhere}.record-amount{font-variant-numeric:tabular-nums;font-size:17px}.record-details p{margin:6px 0;white-space:pre-wrap}.compact-button{width:auto;margin:0;padding:8px 10px;font-size:13px;min-height:40px}.record-tools button{display:block;width:100%;margin:0 0 8px}.history-panel{border:1px solid #b6cfca;border-radius:10px;padding:20px;margin:20px 0;background:#f5f9f8;scroll-margin-top:20px}.history-panel-bar{display:flex;align-items:center;justify-content:space-between;gap:12px}.history-panel h3{margin:0}.history-panel .record-correction{background:transparent;min-width:0;max-width:650px;padding:0}.history-panel .record-version{overflow-wrap:anywhere}.history-help{margin:8px 0 20px}.history-help summary{cursor:pointer;color:#17645c}.history-help p{max-width:750px}.history-table td:before{display:none}
@media(max-width:850px){.history-table,.history-table tbody,.history-table tr,.history-table td{display:block;width:auto}.history-table thead{display:none}.history-table tr{border:1px solid #cbdad7;border-radius:10px;margin:12px 0;padding:14px}.history-table td{border:0;padding:5px 0;overflow-wrap:anywhere}.history-table td:before{display:block;content:attr(data-label);font-size:11px;font-weight:600;color:#566;margin-bottom:2px}.history-table .record-identity{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.history-table .record-identity:before{display:none}.history-table .record-identity small{margin:0}.record-badge{margin:0}.history-table .record-tools{display:flex;gap:8px;padding-top:12px}.history-table .record-tools:before{display:none}.record-tools button{width:auto;flex:1;margin:0}.record-date span,.record-date small{display:inline!important;margin-right:8px}.history-panel{padding:14px}.history-panel-bar{align-items:flex-start}}

/* Keep record controls usable in standalone phone windows. */
.record-tools{min-width:0}.record-tools label{min-width:0;max-width:100%;margin:0 0 8px}.record-tools input[type=file]{max-width:100%;min-width:0}
@media(max-width:850px){.history-table .record-tools{display:flex;flex-direction:column;align-items:stretch;gap:10px}.history-table .record-tools button,.history-table .record-tools a{flex:none;width:100%;min-height:44px;white-space:normal;overflow-wrap:normal;word-break:normal;margin:0}.record-tools label{width:100%;box-sizing:border-box}}
.photo-viewer{box-sizing:border-box;width:100%;max-width:100vw;height:100%;height:100dvh;max-height:100%;margin:0;padding:16px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom));border:0;background:#eef4f4;color:#173337;overflow:auto}
.photo-viewer::backdrop{background:#173337}.photo-viewer-toolbar{position:sticky;top:0;z-index:1;background:#eef4f4;padding:0 0 12px;display:flex;flex-wrap:wrap;align-items:center;gap:12px}.photo-viewer-toolbar button{width:auto;min-height:48px;margin:0}.photo-viewer img{display:block;max-width:100%;height:auto;margin:0 auto}.photo-viewer p:empty{display:none}

#activityPanel{margin:24px 0;border:1px solid #b6cfca;border-radius:10px;padding:16px}#activityPanel summary{cursor:pointer;font-weight:600}.activity-entry{border-bottom:1px solid #cbdad7;padding:12px 0;overflow-wrap:anywhere}.activity-entry p{margin:4px 0}
