:root{--content-width:720px;--page-pad:18px}*{box-sizing:border-box}body{margin:0;background:#F3F8F7;color:#193C43;font:16px system-ui,-apple-system,Segoe UI,sans-serif}header{background:#fff;border-bottom:1px solid #d7eee9;padding:20px 0}.header-inner,main{max-width:calc(var(--content-width) + (var(--page-pad) * 2));margin:0 auto;padding:0 var(--page-pad)}header small{display:block;color:#617d80}.brand{font-size:30px;font-weight:800;letter-spacing:-1.2px}.brand span{color:#198F87}main{margin:22px auto}.card{background:white;padding:24px;border-radius:20px;box-shadow:0 6px 25px #193c4310;margin:14px 0}h2{margin:0 0 20px}h3{margin-bottom:10px;font-size:17px}label{display:block;margin:16px 0;font-weight:650}input,textarea{display:block;width:100%;border:1px solid #b9d6d3;border-radius:12px;padding:13px;font:inherit;margin-top:7px;color:#193C43;background:#fff}textarea{min-height:95px;resize:vertical}button,.btn,nav a{border:0;border-radius:12px;background:#198F87;color:white;font:inherit;font-weight:650;padding:11px 16px;cursor:pointer;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #E8A38C;outline-offset:2px}.secondary{background:#D7EEE9;color:#193C43}.danger{background:#9d3449}.buttons{display:flex;gap:10px;flex-wrap:wrap}.moods{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.moods button{background:#F3F8F7;color:#193C43;border:2px solid transparent;font-size:27px;padding:12px 0}.moods button.selected{border-color:#198F87;background:#D7EEE9}.moods span{display:block;font-size:10px;font-weight:500}nav{display:flex;gap:6px;justify-content:space-between;flex-wrap:wrap}nav button,nav a{font-size:13px;padding:11px}.msg{color:#14766f;min-height:20px}.hint{font-size:13px;color:#617d80}.entry{border-bottom:1px solid #e7efed;padding:12px 0;cursor:pointer}.entry b{font-size:20px;margin-right:12px}hr{border:0;border-top:1px solid #d7eee9;margin:24px 0}[hidden]{display:none!important}@media(max-width:450px){:root{--page-pad:14px}.card{padding:17px}nav{gap:4px}nav button,nav a{padding:9px 8px}.moods button{font-size:23px}}
/* Sentia corporate identity */
header .brand{display:flex;align-items:center;gap:14px;min-height:66px;flex-wrap:wrap}header .brand-logo{display:block;width:auto;height:64px;max-width:min(100%,340px);object-fit:contain;object-position:left center}header .brand-section{font-size:21px;font-weight:650;letter-spacing:0;color:#198F87;border-left:1px solid #d7eee9;padding-left:14px}@media(max-width:450px){header .brand-logo{height:52px;max-width:240px}header .brand-section{font-size:17px;padding-left:10px}header .brand{gap:10px}}
/* Reliable wordmark fallback for both main and admin header. */
header .brand-fallback{display:none;color:#193C43;font-size:clamp(26px,5vw,38px);font-weight:800;letter-spacing:-1.7px;line-height:1}header .brand-logo[hidden]+.brand-fallback{display:inline-block}header .brand-dot{color:#198F87}header .brand-logo{min-width:0;max-height:64px}.header-tagline{margin-top:4px}

/* V6: no navigation toolbar; compact date picker */
.header-inner{position:relative}
.header-settings{position:absolute;right:var(--page-pad);top:50%;transform:translateY(-50%);width:40px;height:40px;padding:0;border-radius:12px;background:#D7EEE9;color:#193C43;font-size:23px;line-height:1}
header .brand{padding-right:48px}
.date-group{margin:16px 0}.date-group label{margin:0 0 8px}.date-control{display:flex;align-items:stretch;position:relative}
.date-control input{margin:0;flex:1;min-width:0;padding-right:50px}
.date-control input::-webkit-calendar-picker-indicator{opacity:0;width:1px}
.calendar-trigger{position:absolute;right:7px;top:50%;transform:translateY(-50%);height:36px;width:40px;padding:0;background:#D7EEE9;color:#193C43;font-size:24px}
.settings-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.settings-heading h2{margin:0}.settings-heading button{font-size:14px}
.insights-link{display:inline-flex;align-items:center;padding:10px 14px;border-radius:12px;background:#198F87;color:white;font-weight:650;text-decoration:none}

/* Header: show current user on the right */
.header-actions{position:absolute;right:var(--page-pad);top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:9px;max-width:55%}
.header-actions .header-settings{position:static;transform:none;flex:0 0 40px}
.header-username{display:inline-block;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#193C43;background:#D7EEE9;padding:8px 12px;border-radius:12px;font-size:14px;font-weight:700}
.header-username[hidden]{display:none!important}
header .brand{padding-right:0}header .header-inner{padding-right:var(--page-pad)}
@media(max-width:650px){header .brand-logo{max-width:200px;height:48px}header .header-tagline{font-size:11px}.header-actions{max-width:47%;gap:5px}.header-username{max-width:110px;font-size:12px;padding:7px 8px}}
@media(max-width:380px){header .brand-logo{max-width:155px;height:42px}.header-username{max-width:80px}.header-actions .header-settings{flex-basis:36px;width:36px;height:36px}}

/* V9: login name visible, tagline starts exactly beneath wordmark */
.header-tagline{padding-left:62px}
.header-username{min-width:0}
@media(max-width:650px){.header-tagline{padding-left:48px}}
@media(max-width:380px){.header-tagline{padding-left:43px}}

/* Sentia v10: no settings page; username and logout at right */
.header-actions{max-width:48%}.header-logout{font-size:12px;background:#D7EEE9;color:#193C43;padding:10px 12px;flex:0 0 auto}
.backup-unlock{margin-top:22px;padding:13px 16px;background:#F3F8F7;border:1px solid #D7EEE9;border-radius:14px}.backup-unlock label{margin:0}.backup-unlock .hint{font-weight:400}.backup-unlock p{margin-bottom:0}
@media(max-width:650px){.header-actions{max-width:50%}.header-logout{font-size:11px;padding:8px 9px}.header-username{max-width:90px}}

/* V11: responsive login layout */
.login-row{display:flex;align-items:stretch;gap:12px}
.login-row input{flex:1;min-width:0;margin-top:0}
.login-row #login{flex:0 0 auto;min-width:130px}
@media(max-width:600px){.login-row{flex-direction:column;gap:14px}.login-row #login{width:100%;min-height:44px}}

/* V12: compact logout icon only */
.header-logout{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;padding:0;flex-shrink:0}
.header-logout svg{display:block;width:21px;height:21px}
@media(max-width:650px){.header-logout{width:38px;height:38px;padding:0}}

/* V13: manual save button; password removed */
.save-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:22px}.save-button{min-width:140px}.save-hint{font-size:13px;color:#617d80}
@media(max-width:600px){.save-actions{flex-direction:column;align-items:stretch}.save-button{width:100%}}
.header-logout{background:transparent!important;border:none!important;box-shadow:none!important}
