/* Hemma 0.1 – warm family theme layered over existing Budgetly styles. */
:root[data-theme="light"] { --background:#fff8f3; --sidebar:#fffaf6; --card:#ffffff; --primary:#c66d50; --primary-hover:#a9533b; --text-primary:#342b29; --text-secondary:#806f69; --border:#f0dfd5; --hover-surface:#faeee6; --input-surface:#fff9f5; --ring-track:#f4e6dc; }
:root[data-theme="dark"] { --primary:#e7a080; --primary-hover:#f0b597; }
.logo h2 {color:var(--text-primary);letter-spacing:-1px}.logo h2 span{color:var(--primary)}
.sidebar {border-right-color:var(--border)}.sidebar .nav-heading {letter-spacing:1.5px}
.hemma-page {max-width:1280px}.hemma-page h2,.hemma-page h3 {letter-spacing:-.025em}
.hemma-hero {display:flex;align-items:center;justify-content:space-between;gap:20px;padding:30px 32px;border-radius:22px;background:linear-gradient(110deg,#fff0e5,#f9e3d3);margin-bottom:20px;color:#613c31}
.hemma-hero h2{font-size:clamp(23px,3vw,34px);margin:7px 0}.hemma-hero p{color:#936e5d}.hemma-eyebrow{font-size:11px;letter-spacing:2px;font-weight:800;color:#b76547}.hemma-hero-art{font-size:65px;color:#d9a57b;line-height:1}
.hemma-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:18px}.hemma-tile,.hemma-panel{background:var(--card);border:1px solid var(--border);border-radius:18px;padding:22px;box-shadow:0 6px 24px rgba(98,57,36,.035)}.hemma-tile{display:flex;flex-direction:column;gap:12px}.hemma-tile span{font-size:13px;color:var(--text-secondary)}.hemma-tile strong{font-size:32px;color:var(--primary)}
.hemma-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.hemma-panel{margin-bottom:18px;min-width:0}.hemma-columns .hemma-panel{margin-bottom:0}.hemma-panel-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.hemma-panel-title h2,.hemma-panel-title h3{margin:0}.hemma-panel h3{font-size:19px}.hemma-text-btn{border:0;background:none;color:var(--primary);cursor:pointer;font-weight:700}.hemma-action{border:0;border-radius:11px;background:var(--primary);color:#fff;padding:11px 16px;font-weight:700;cursor:pointer}.hemma-action:hover{background:var(--primary-hover)}.hemma-budget-teaser p{line-height:1.6;color:var(--text-secondary);margin:14px 0 18px}.hemma-muted{color:var(--text-secondary);margin-bottom:18px;font-size:14px}.hemma-empty{padding:16px 0;color:var(--text-secondary);font-size:14px}
.hemma-list-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--border);padding:12px 0}.hemma-row-text{display:flex;align-items:center;gap:12px;min-width:0}.hemma-row-text>div{min-width:0}.hemma-row-text strong{font-size:14px;display:block;overflow-wrap:anywhere}.hemma-row-text small{display:block;color:var(--text-secondary);margin-top:4px}.hemma-row-text input{accent-color:var(--primary);width:17px;height:17px}.hemma-done{text-decoration:line-through;opacity:.55}.hemma-dot{width:9px;height:9px;border-radius:50%;background:var(--primary);flex-shrink:0}.hemma-delete{border:0;background:transparent;color:var(--text-secondary);font-size:22px;cursor:pointer;padding:4px 9px}
.hemma-calendar-controls{display:flex;align-items:center;justify-content:center;gap:25px;margin:22px 0}.hemma-icon-btn{background:var(--hover-surface);border:1px solid var(--border);border-radius:9px;color:var(--text-primary);padding:7px 13px;cursor:pointer;font-size:19px}.hemma-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.hemma-calendar-label{text-align:center;font-size:12px;color:var(--text-secondary);font-weight:700;padding:8px 0}.hemma-calendar-day{min-height:85px;border:1px solid var(--border);border-radius:9px;padding:7px;min-width:0}.hemma-calendar-day strong{font-size:12px}.hemma-calendar-event{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#f7dfd1;color:#854a36;border-radius:5px;padding:4px;margin-top:4px;font-size:10px}.hemma-subtitle{margin-top:28px}
.hemma-dialog{border:1px solid var(--border);border-radius:20px;padding:26px;width:min(440px,calc(100% - 24px));margin:auto;background:var(--card);color:var(--text-primary);box-shadow:0 20px 70px #0003}.hemma-dialog::backdrop{background:#26130e80}.hemma-field{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:13px;margin:14px 0}.hemma-field input,.hemma-field select{padding:11px;border:1px solid var(--border);border-radius:9px;background:var(--input-surface);color:var(--text-primary);font:inherit}.hemma-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.hemma-secondary{border:1px solid var(--border);background:var(--card);color:var(--text-primary);padding:10px 15px;border-radius:9px;cursor:pointer}
.hemma-bottom-nav{display:none}.hemma-family-view #addTransactionBtn,.hemma-family-view #mobileQuickAdd{display:none!important}
@media(max-width:768px){.hemma-columns{grid-template-columns:1fr}.hemma-hero{padding:23px}.hemma-hero-art{font-size:42px}.hemma-stats{gap:8px}.hemma-tile{padding:13px}.hemma-tile span{font-size:11px}.hemma-tile strong{font-size:25px}.hemma-panel{padding:16px}.hemma-page{padding-bottom:78px}.hemma-calendar-day{min-height:58px;padding:4px}.hemma-calendar-event{font-size:8px}.hemma-bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:100;display:grid;grid-template-columns:repeat(5,1fr);background:var(--sidebar);border-top:1px solid var(--border);padding:7px 3px calc(7px + env(safe-area-inset-bottom,0px));box-shadow:0 -8px 25px #0001}.hemma-bottom-nav a{text-decoration:none;color:var(--text-secondary);display:flex;flex-direction:column;align-items:center;gap:2px;font-size:22px}.hemma-bottom-nav a span{font-size:10px}.hemma-bottom-nav a.active{color:var(--primary);font-weight:700}.main-content{padding-bottom:calc(105px + env(safe-area-inset-bottom,0px))!important}}
@media(max-width:380px){.hemma-stats{grid-template-columns:1fr}.hemma-tile{flex-direction:row;justify-content:space-between;align-items:center}.hemma-hero-art{display:none}}

.hemma-sync-status { font-size: .85rem; padding: .65rem 1rem; border-radius: 12px; background: #f9e5d9; color: #754a37; margin: .8rem 0; }

/* Hemma 0.3.11 – visual weekly meals, overview on Home, controls in Matplanering */
.hemma-home-meal-grid,.hemma-saved-meal-grid{display:grid;gap:12px}
.hemma-home-meal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.hemma-saved-meal-grid{grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:16px}
.hemma-home-meal-card,.hemma-saved-meal-card{overflow:hidden;min-width:0;border:1px solid var(--border);border-radius:15px;background:var(--card)}
.hemma-meal-image{aspect-ratio:16/10;overflow:hidden;background:var(--hover-surface)}
.hemma-meal-image img{width:100%;height:100%;object-fit:cover;display:block}
.hemma-meal-placeholder{height:100%;display:grid;place-items:center;font-size:36px}
.hemma-meal-info{padding:12px}
.hemma-meal-day{font-size:11px;text-transform:uppercase;letter-spacing:.07em;font-weight:800;color:var(--primary)}
.hemma-meal-info h4{margin:5px 0 0;color:var(--text-primary);font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.hemma-meal-card-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px}
.hemma-meal-card-actions .hemma-secondary{flex:1;min-width:95px;font-size:12px}
.hemma-meal-remove{background:transparent;color:var(--text-secondary);border:1px solid var(--border);border-radius:9px;padding:10px 12px;cursor:pointer;font-size:12px}
.hemma-meal-remove:hover{color:var(--primary)}
@media(max-width:480px){.hemma-home-meal-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.hemma-home-meal-card .hemma-meal-info{padding:9px}.hemma-home-meal-card .hemma-meal-info h4{font-size:12px}.hemma-saved-meal-grid{grid-template-columns:1fr 1fr;gap:10px}.hemma-saved-meal-card .hemma-meal-info{padding:10px}.hemma-meal-card-actions{flex-direction:column;align-items:stretch}}
@media(max-width:350px){.hemma-home-meal-grid,.hemma-saved-meal-grid{grid-template-columns:1fr}}

/* 0.3.12 – favorite stores */
.price-compare{margin-top:18px}
.price-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.price-fields label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:600}
.price-fields input,.price-fields select{width:100%;min-width:0;padding:11px;border:1px solid var(--border);border-radius:10px;background:var(--card);color:var(--text-primary)}
.price-store-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:15px 0}
.price-store-item{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--border);border-radius:12px;padding:12px}
.price-store-item strong,.price-store-item small{display:block}
.price-store-item small{color:var(--text-secondary);font-size:12px;margin-top:4px}
.price-status{padding:13px;border:1px solid var(--border);border-radius:12px;background:var(--hover-surface);font-size:13px}
@media(max-width:700px){.price-fields,.price-store-list{grid-template-columns:1fr}}

/* 0.3.13 – verified stores and product prices */
.price-field-button{display:flex;align-items:end;padding-bottom:1px}
.price-store-item{justify-content:flex-start;cursor:pointer}
.price-store-item input{width:17px;height:17px;flex:none;accent-color:var(--primary)}
.price-store-item span{min-width:0}
.price-products{display:grid;gap:9px;margin:14px 0}
.price-product{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border:1px solid var(--border);border-radius:11px}
.price-product small{display:block;color:var(--text-secondary);font-size:12px;margin-top:4px}
.price-product span{font-weight:700;text-align:right;flex-shrink:0;font-size:13px}
@media(max-width:650px){.price-product{align-items:flex-start;flex-direction:column}.price-product span{text-align:left}}

/* 0.3.19: mobile-friendly shared grocery checklist */
#groceryList .hemma-list-row{padding:10px 12px;min-height:49px}
#groceryList input[type="checkbox"]{width:21px;height:21px;accent-color:#b96145;cursor:pointer;flex-shrink:0}
#groceryList .hemma-row-text{gap:11px;align-items:center}
#groceryList .hemma-row-text strong{font-size:13px}
#groceryList .hemma-row-text small{font-size:11px}
#groceryProgress{margin:5px 0 12px;font-size:12px}

/* Hemma 0.3.20: practical shared shopping list */
#groceryList .grocery-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0 10px;font-size:13px;font-weight:650}
#groceryList .grocery-toolbar button{font-size:12px;padding:7px 10px}
#groceryList .grocery-purchased{margin-top:10px;border-top:1px solid var(--border)}
#groceryList .grocery-purchased summary{padding:13px 6px;cursor:pointer;font-size:13px;font-weight:650;color:var(--text-secondary)}
#groceryList .grocery-purchased .hemma-list-row{opacity:.75}
#groceryList .hemma-row-text input{min-width:20px;min-height:20px;cursor:pointer}
#groceryList .hemma-list-row{padding:8px 9px;min-height:46px}
@media(max-width:600px){#groceryList .hemma-list-row{gap:5px}#groceryList .hemma-delete{padding:8px;font-size:19px}}

/* 0.3.21: compact price comparison for the household shopping list */
.grocery-price-panel{border:1px solid var(--border);border-radius:14px;padding:14px;margin:14px 0}
.grocery-price-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.grocery-price-panel .hemma-muted{font-size:12px;margin:7px 0}
.grocery-price-total{display:flex;flex-direction:column;gap:4px;padding:12px 0}
.grocery-price-total strong{font-size:24px}.grocery-price-total span{font-size:12px}
.grocery-price-details summary{cursor:pointer;padding:9px 0;font-weight:600}
.grocery-price-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--border);font-size:12px}
.grocery-price-row small{display:block;opacity:.7;margin-top:4px}.grocery-price-row>span{white-space:nowrap;font-weight:600}

/* Hemma 0.3.22 – brand consistency on login, profile and installable app */
#authGate {
  --auth-ink:#352b26;
  --auth-muted:#806d62;
  --auth-accent:#b96043;
  background:radial-gradient(circle at 13% 20%,rgba(222,156,112,.19),transparent 44%),#fff8f3;
}
#authGate .auth-layout {max-width:1100px}
#authGate .auth-brand {display:flex;align-items:center;gap:14px;letter-spacing:-.045em;font-size:2rem;margin-bottom:52px}
#authGate .auth-brand img {border-radius:13px;box-shadow:0 8px 22px #a75b3725}
#authGate .auth-brand span {color:#352b26}
#authGate .auth-brand .auth-brand-dot,#authGate .auth-intro h1 em {color:#b96043}
#authGate .auth-gate-card {background:#fffdfb;border:1px solid #f0dfd5;box-shadow:0 22px 65px #87583b16}
#authGate .auth-tabs {background:#f7ece5}
#authGate .auth-tabs button {color:#705a50}
#authGate .auth-tabs button.selected {background:#fff;color:#4c3228}
#authGate .auth-gate-card input {background:#fffaf7;border-color:#e5d3c7;color:#352b26;-webkit-text-fill-color:#352b26}
#authGate .auth-gate-card input:focus {outline:2px solid #c66d50;outline-offset:1px}
#authGate .auth-submit {background:#bd694d;color:white;-webkit-text-fill-color:white}
#authGate .auth-submit:hover {background:#a9533b}
#authGate .auth-link {color:#a9533b}
#authGate .auth-gate-card input:-webkit-autofill {-webkit-box-shadow:0 0 0 1000px #fffaf7 inset;-webkit-text-fill-color:#352b26}
#authGate .auth-mobile-brand {align-items:center;gap:10px;color:#352b26}
#authGate .auth-mobile-brand img {border-radius:10px}
#authGate .auth-mobile-brand span {color:#b96043}
#accountProfileDialog.profile-dialog {--primary:#bd694d;--border:#e9d8cc;--input-surface:#fffaf7;color:#352b26;background:#fffdfb;border-color:#ebd7c9}
#accountProfileDialog.profile-dialog .primary-btn {background:#bd694d}
#accountProfileDialog.profile-dialog .cloud-secondary {color:#96523d;background:#fff1e8;border-color:#e7c9b6}
@media(max-width:750px) {
  #authGate .auth-mobile-brand {display:flex}
  #authGate .auth-gate-card {padding:27px 24px}
}

/* Hemma 0.4.0 – calendar week/month improvements */
.hemma-calendar-view-switch{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0 4px}
.hemma-calendar-view-switch button{background:#fffaf6;border:1px solid #e9d4c5;color:#745747;border-radius:11px;padding:9px 15px;font:inherit;font-weight:650;cursor:pointer}
.hemma-calendar-view-switch button.active{background:#bd694d;color:white;border-color:#bd694d}
.hemma-calendar-today{outline:2px solid #bd694d;outline-offset:-2px;background:#fff1e8}
.hemma-calendar-day[data-date]{cursor:pointer}
.hemma-calendar-day[data-date]:hover{background:#fff1e8}
.hemma-week-grid .hemma-calendar-day{min-height:130px}
@media(max-width:650px){.hemma-week-grid .hemma-calendar-day{min-height:95px;padding:5px 2px}.hemma-week-grid .hemma-calendar-event{font-size:10px;overflow-wrap:anywhere}.hemma-calendar-view-switch button{padding:8px 12px}}

/* Hemma 0.4.0 beta 2 – household membership */
.household-members-section{margin:24px 0;padding:20px;border:1px solid #e8d8cc;border-radius:18px;background:#fffaf6}
.household-members-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.household-members-header h3{margin:0}
.household-members-list{display:grid;gap:10px;margin-top:14px}
.household-member-row{display:flex;align-items:center;gap:13px;background:#fff;border:1px solid #f0e3db;padding:12px;border-radius:14px}
.household-member-avatar{display:grid;place-items:center;width:42px;height:42px;flex-shrink:0;border-radius:50%;background:#e7b79c;color:#593627;font-weight:750}
.household-member-row strong,.household-member-row small{display:block}
.household-member-row small{color:#876c5b;margin-top:3px}

.household-management-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px;padding-top:15px;border-top:1px solid #eadbd1}
.household-danger-action{color:#a53f32!important;border-color:#d9a69d!important;background:#fff8f6!important}
.household-danger-action:hover{background:#ffe9e5!important}
.household-member-row>div{flex:1;min-width:0}
.household-member-row button{flex-shrink:0}

/* Hemma 0.4.0 Beta 4 – event invitations and in-app notifications */
.hemma-notifications{margin:16px 0}
#hemmaNotificationsPanel{background:#fffaf6;border:1px solid #ead8cb;border-radius:15px;padding:16px;margin-top:10px}
.hemma-notification-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #f0e4dc;padding:11px 0}
.hemma-notification-item:last-child{border-bottom:0}
.hemma-notification-item.read{opacity:.65}
.hemma-notification-item button,.hemma-rsvp-actions button{border:1px solid #e4c4b3;background:#fff;color:#98543f;border-radius:9px;padding:7px 10px;cursor:pointer}
.hemma-rsvp-actions button[aria-pressed=true]{background:#bd694d;color:white;border-color:#bd694d}
.hemma-invite-list{display:grid;gap:10px}
.hemma-invite-item{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;background:#fffaf6;border:1px solid #ecd9cb;border-radius:13px;padding:12px}
.hemma-invite-item small{display:block;color:#806c60;margin-top:5px}
.hemma-rsvp-actions{display:flex;gap:6px}
.hemma-invite-choices{display:grid;gap:8px;margin:10px 0}
.hemma-invite-choices label{display:flex;gap:9px;align-items:center}

/* Beta 8: notiscenter och personliga inbjudningar */
.hemma-settings-notifications{margin-bottom:1.5rem}.hemma-invite-message{white-space:pre-wrap;overflow-wrap:anywhere;margin:.6rem 0 0;font-size:.95rem}.hemma-settings-notifications .hemma-notifications{margin-top:1rem}

/* Beta 8: öppningsbara kalenderaktiviteter och notisåtgärder */
.hemma-event-open {cursor:pointer; width:100%; text-align:left; border:0; font:inherit;}
.hemma-event-open:focus-visible {outline:2px solid currentColor;outline-offset:2px;}
.hemma-notification-actions {display:flex;gap:.5rem;flex-wrap:wrap;}
#hemmaEventDetails {max-width:min(94vw,560px);}
#hemmaEventDetailsGuests {padding-left:1.5rem;line-height:1.9;}
