/* Life OS – gemensamma färgroller inspirerade av Material 3. */
:root {
 --life-bg: #1b1b1f; --life-surface: #242429; --life-raised: #303037;
 --life-outline: #494952; --life-text: #e6e1e9; --life-muted: #c4c1cc;
 --life-primary: #d0bcff; --life-on-primary: #381e72;
 --life-blue: #a8c7fa; --life-pink: #f3b6d0; --life-peach: #ffcead;
 --life-mint: #b5d9c3; --life-yellow: #efdb9f;
}
body.life-shell { background: var(--life-bg); color: var(--life-text); font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
body.life-shell .life-nav { background: #16161a; border-color: #33333b; }
body.life-shell a { color: var(--life-primary); }
body.life-shell .life-nav a { color: var(--life-muted); border-radius: 999px; }
body.life-shell .life-nav a[aria-current=page] { background: #463b5b; color: #ebddff; }
body.life-shell .life-nav a:hover { background: #303037; }
body.life-shell .brand { color: var(--life-text); }
body.life-shell .brand-dot { color: var(--life-primary); }
body.life-shell .panel, body.life-shell .overview .search-panel,
body.life-shell .overview .workplace-row, body.life-shell .overview .workplace-row:nth-child(even),
body.life-shell .customer-card .card-status { background: var(--life-surface); border-color: var(--life-outline); border-radius: 24px; }
body.life-shell .overview .workplace-row { border-radius: 18px; }
body.life-shell .overview .workplace-row:hover { background: #2d2d34; }
body.life-shell :is(.customer-card,.overview) button,
body.life-shell button { background: var(--life-raised); color: var(--life-text); border-color: var(--life-outline); border-radius: 999px; }
body.life-shell :is(input,select,textarea) { background: var(--life-raised); color: var(--life-text); border-color: var(--life-outline); border-radius: 12px; }
body.life-shell :is(.customer-card,.overview,.module-dashboard,.contact-form,.activity-editor) .primary-link,
body.life-shell .primary-link, body.life-shell .primary-button { background: var(--life-primary); border-color: var(--life-primary); color: var(--life-on-primary); border-radius: 999px; }
body.life-shell .primary-link:hover { background: #deceff; }
body.life-shell .booking-dialog { background: var(--life-surface); color: var(--life-text); border-color: var(--life-outline); border-radius: 28px; }
body.life-shell .overview .booking-dialog :is(input,select,textarea),
body.life-shell .customer-card .card-dialog :is(input,select,textarea) { background: var(--life-raised); color: var(--life-text); border-color: var(--life-outline); }
body.life-shell .dashboard-metrics > * { border-radius: 24px; background: #353044; }
body.life-shell .dashboard-metrics > :nth-child(2) { background: #293a45; }
body.life-shell .dashboard-metrics > :nth-child(3) { background: #453238; }
body.life-shell .dashboard-metrics > :nth-child(4) { background: #3c392b; }
body.life-shell .dashboard-metrics strong { color: var(--life-text); }
body.life-shell .dashboard-muted, body.life-shell .dashboard-metrics span, body.life-shell .dashboard-metrics strong small { color: var(--life-muted); }
body.life-shell .dashboard-eyebrow { color: var(--life-primary); }
body.life-shell .customer-card .contact-group { background: #353044; }
body.life-shell .customer-card .representative-group { background: #293a45; }
body.life-shell .activity-note .activity-bubble { background: #403650; }
body.life-shell .activity-phone .activity-bubble { background: #2d4057; }
body.life-shell .activity-email .activity-bubble { background: #294348; }
body.life-shell .activity-visit .activity-bubble { background: #4b3c31; }
body.life-shell .activity-followup .activity-bubble { background: #4b3444; }
body.life-shell .activity-document .activity-bubble { background: #383e49; }
body.life-shell .customer-card .status-red, body.life-shell .overview .status-red { background: #513437; color: #ffb4ab; }
body.life-shell .customer-card .status-yellow, body.life-shell .overview .status-yellow { background: #48412b; color: var(--life-yellow); }
body.life-shell .customer-card .status-green, body.life-shell .overview .status-green { background: #2d4437; color: var(--life-mint); }
body.life-shell :is(a,button,input,select,textarea,summary):focus-visible { outline: 2px solid var(--life-primary); outline-offset: 3px; }
body.life-shell .overview .booking-types label:has(input:checked) { background: #403650; border-color: var(--life-primary); }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto !important; } }

/* Företagskort: låg höjd, mjuka skuggor och färgat glas. */
body.life-shell:has(.customer-card) { background: #1c1e23; color: #e5e7eb; }
body.life-shell .customer-card {
 --card-shadow: 0 2px 4px rgb(8 10 15 / 22%), 0 10px 24px -10px rgb(8 10 15 / 48%);
 --bubble-shadow: 0 2px 3px rgb(8 10 15 / 24%), 0 7px 16px -7px rgb(8 10 15 / 55%);
}
body.life-shell .customer-card :is(.panel,.card-status) {
 background: #25282e;
 border: 1px solid rgb(210 220 240 / 6%);
 box-shadow: var(--card-shadow), inset 0 1px 0 rgb(220 230 245 / 3%);
}
body.life-shell .customer-card .card-timeline {
 background:
  radial-gradient(ellipse at 95% 18%, rgb(91 139 169 / 15%), transparent 48%),
  radial-gradient(ellipse at 5% 65%, rgb(85 135 149 / 12%), transparent 50%),
  #25282e;
}
body.life-shell .customer-card .compact-timeline-entry { margin-bottom: .75rem; }
body.life-shell .customer-card .card-timeline-entries {
 background:
  radial-gradient(ellipse 150px 105px at 92% 180px, rgb(108 163 188 / 6%), transparent 75%),
  radial-gradient(ellipse 170px 130px at 8% 440px, rgb(99 161 170 / 5%), transparent 75%),
  radial-gradient(ellipse 140px 110px at 80% 720px, rgb(101 157 130 / 5%), transparent 75%);
}
body.life-shell .customer-card .activity-bubble {
 --bubble-rgb: 65 70 82;
 background: rgb(var(--bubble-rgb));
 border: 1px solid rgb(216 226 245 / 14%);
 border-top-color: rgb(230 236 248 / 29%);
 border-left-color: rgb(230 236 248 / 20%);
 box-shadow: var(--bubble-shadow), inset 0 1px 0 rgb(225 232 245 / 9%), inset 0 -1px 0 rgb(8 10 15 / 14%);
 color: #e5e7eb;
}
body.life-shell .customer-card .activity-note .activity-bubble { --bubble-rgb: 73 61 94; }
body.life-shell .customer-card .activity-phone .activity-bubble { --bubble-rgb: 49 72 99; }
body.life-shell .customer-card .activity-email .activity-bubble { --bubble-rgb: 43 78 80; }
body.life-shell .customer-card .activity-visit .activity-bubble { --bubble-rgb: 87 67 49; }
body.life-shell .customer-card .activity-followup .activity-bubble { --bubble-rgb: 85 54 77; }
body.life-shell .customer-card .activity-document .activity-bubble { --bubble-rgb: 61 69 84; }
body.life-shell .customer-card .activity-training .activity-bubble { --bubble-rgb: 48 76 65; }
body.life-shell .customer-card .activity-safety_stop .activity-bubble { --bubble-rgb: 91 49 56; }
@supports (backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px)) {
 body.life-shell .customer-card .activity-bubble {
  background:
   linear-gradient(115deg, rgb(225 232 245 / 10%), rgb(225 232 245 / 2%) 38%, transparent 58%),
   linear-gradient(180deg, rgb(225 232 245 / 3%), transparent 35%, rgb(8 10 15 / 5%)),
   rgb(var(--bubble-rgb) / 30%);
  -webkit-backdrop-filter: blur(3px) saturate(115%);
  backdrop-filter: blur(3px) saturate(115%);
 }
}
body.life-shell .customer-card .contact-group {
 background: #304350;
 border: 1px solid rgb(206 226 240 / 9%);
 box-shadow: var(--bubble-shadow), inset 0 1px 0 rgb(225 232 245 / 3%);
}
body.life-shell .customer-card .representative-group { background: #2f4439; }
body.life-shell .customer-card :is(.timeline-meta,.timeline-event-date) { color: #c8ccd5; }
body.life-shell .customer-card :is(.card-heading p,.card-heading h1 span,.count,.compact-facts dt,.compact-list-item p,.compact-list-item > span,.empty-compact,.card-fact-note) { color: #b6bdc9; }
body.life-shell .customer-card .card-dialog {
 background: #2c3038;
 box-shadow: 0 8px 16px rgb(8 10 15 / 30%), 0 24px 64px rgb(8 10 15 / 48%);
}
@media (prefers-reduced-transparency: reduce) {
 body.life-shell .customer-card .activity-bubble {
  background: rgb(var(--bubble-rgb));
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
 }
}

/* Samma glasmaterial genom hela kortet; utbildningar visas som signalprickar. */
body.life-shell:has(.customer-card) {
 background:
  radial-gradient(ellipse at 35% 25%, rgb(84 137 163 / 12%), transparent 48%),
  radial-gradient(ellipse at 85% 75%, rgb(74 125 139 / 10%), transparent 48%), #1c1e23;
}
body.life-shell .customer-card .contact-group { --group-rgb: 52 79 99; }
body.life-shell .customer-card .representative-group { --group-rgb: 48 82 65; }
@supports (backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px)) {
 body.life-shell .customer-card :is(.panel,.card-status,.card-dialog) {
  background: linear-gradient(120deg, rgb(225 232 245 / 5%), transparent 55%), rgb(37 40 46 / 65%);
  border-color: rgb(216 226 245 / 10%);
  border-top-color: rgb(230 236 248 / 19%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
 }
 body.life-shell .customer-card .contact-group {
  background: linear-gradient(115deg, rgb(225 232 245 / 9%), transparent 58%), rgb(var(--group-rgb) / 30%);
  border-top-color: rgb(230 236 248 / 24%);
  -webkit-backdrop-filter: blur(6px) saturate(115%);
  backdrop-filter: blur(6px) saturate(115%);
 }
}
body.life-shell .customer-card .card-line-icon { width: 1.1rem; height: 1.1rem; flex: none; vertical-align: -.2em; }
body.life-shell .customer-card .activity-icon:has(.card-line-icon) {
 display: grid; place-items: center; width: 1.65rem; height: 1.65rem;
 color: #c8ccd5; background: rgb(210 220 240 / 5%); border: 1px solid rgb(210 220 240 / 10%); border-radius: 50%;
}
body.life-shell .customer-card .training-table :is(td,thead th):not(:first-child) { text-align: center; }
body.life-shell .customer-card .training-dot {
 --dot-color: #dc929c;
 display: inline-block; position: relative; width: .85rem; height: .85rem; border-radius: 50%;
 background: var(--dot-color); border: 1px solid rgb(230 236 248 / 23%);
 box-shadow: 0 2px 5px rgb(8 10 15 / 30%), inset 0 1px 2px rgb(230 236 248 / 30%);
}
body.life-shell .customer-card .training-dot.booked { --dot-color: #ddc47e; }
body.life-shell .customer-card .training-dot.completed { --dot-color: #94c7ae; }
body.life-shell .customer-card .training-dot:focus-visible { outline: 2px solid var(--life-primary); outline-offset: 4px; }
body.life-shell .customer-card .training-dot:is(:hover,:focus)::after {
 content: attr(data-status-label); position: absolute; z-index: 2; bottom: calc(100% + .5rem); left: 50%; transform: translateX(-50%);
 background: #30343d; color: #e5e7eb; border: 1px solid rgb(216 226 245 / 18%); border-radius: .5rem;
 padding: .35rem .55rem; white-space: nowrap; font-size: .72rem; box-shadow: var(--bubble-shadow);
}
@media (prefers-reduced-transparency: reduce) {
 body.life-shell .customer-card :is(.panel,.card-status,.card-dialog) { background: #25282e; -webkit-backdrop-filter: none; backdrop-filter: none; }
 body.life-shell .customer-card .contact-group { background: rgb(var(--group-rgb)); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Blå/grön accent på företagskortet. */
body.life-shell:has(.customer-card) { --life-primary: #add2e6; --life-on-primary: #193746; }
body.life-shell .customer-card a { color: var(--life-primary); }
body.life-shell .customer-card .activity-details summary { color: #b9d5e1; }
body.life-shell .customer-card .primary-link { color: var(--life-on-primary); }
body.life-shell .customer-card .primary-link:hover { background: #c1dfed; }
body.life-shell .customer-card :is(.contact-group > h3,.safety-role) { color: #b5d8e4; }
body.life-shell .customer-card :is(button,a,summary,input,select,textarea):focus-visible { outline-color: var(--life-primary); }
body.life-shell:has(.customer-card) .life-nav a[aria-current=page] { background: #2d4551; color: #d5e7ef; }

body.life-shell .customer-card .representative-group > h3 { color: #b4d8c3; }

/* Företagslistan och ekonomin delar kortets glasytor och blå accent. */
body.life-shell:has(:is(.overview,.economy-workspace)) {
 --life-primary: #add2e6; --life-on-primary: #193746;
 background: radial-gradient(ellipse at 35% 25%, rgb(84 137 163 / 12%), transparent 48%),
  radial-gradient(ellipse at 85% 75%, rgb(74 125 139 / 10%), transparent 48%), #1c1e23;
 color: #e5e7eb;
}
body.life-shell :is(.overview,.economy-workspace) :is(.search-panel,.workplace-row,.workplace-row:nth-child(even),.panel,.booking-dialog) {
 background: #25282e;
 border: 1px solid rgb(216 226 245 / 10%);
 border-top-color: rgb(230 236 248 / 19%);
 box-shadow: 0 2px 4px rgb(8 10 15 / 22%), 0 10px 24px -10px rgb(8 10 15 / 48%), inset 0 1px 0 rgb(220 230 245 / 3%);
}
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
 body.life-shell :is(.overview,.economy-workspace) :is(.search-panel,.workplace-row,.workplace-row:nth-child(even),.panel,.booking-dialog) {
  background: linear-gradient(120deg, rgb(225 232 245 / 5%), transparent 55%), rgb(37 40 46 / 65%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
 }
}
body.life-shell :is(.overview,.economy-workspace) .workplace-row:hover { background: linear-gradient(120deg, rgb(225 232 245 / 7%), transparent 55%), rgb(43 50 59 / 80%); }
body.life-shell :is(.overview,.economy-workspace) a { color: var(--life-primary); }
body.life-shell :is(.overview,.economy-workspace) .workplace-title { color: #d8e5ed; }
body.life-shell :is(.overview,.economy-workspace) .primary-link { color: var(--life-on-primary); }
body.life-shell :is(.overview,.economy-workspace) .primary-link:hover { background: #c1dfed; }
body.life-shell :is(.overview,.economy-workspace) :is(a,button,input,select,textarea,summary):focus-visible { outline-color: var(--life-primary); }
body.life-shell :is(.overview,.economy-workspace) .field input:focus { outline-color: var(--life-primary); border-color: var(--life-primary); }
body.life-shell :is(.overview,.economy-workspace) .maps-link { color: var(--life-primary); border-color: rgb(216 226 245 / 15%); }
body.life-shell :is(.overview,.economy-workspace) .maps-link:hover { background: #304350; }
body.life-shell :is(.overview,.economy-workspace) .booking-types label:has(input:checked) { background: #304350; border-color: var(--life-primary); }
body.life-shell :is(.overview,.economy-workspace) .booking-dialog { background-color: #2c3038; box-shadow: 0 8px 16px rgb(8 10 15 / 30%), 0 24px 64px rgb(8 10 15 / 48%); }
body.life-shell :is(.overview,.economy-workspace) .booking-dialog :is(input,select,textarea) { max-width: 100%; box-sizing: border-box; }
body.life-shell :is(.overview,.economy-workspace) .booking-dialog textarea { width: 100%; }
body.life-shell :is(.overview,.economy-workspace) .booking-dialog form { min-width: 0; grid-template-columns: minmax(0,1fr); }
body.life-shell :is(.overview,.economy-workspace) .booking-dialog form > * { min-width: 0; }
body.life-shell:has(:is(.overview,.economy-workspace)) .life-nav a[aria-current=page] { background: #2d4551; color: #d5e7ef; }
@media (prefers-reduced-transparency: reduce) {
 body.life-shell :is(.overview,.economy-workspace) :is(.search-panel,.workplace-row,.workplace-row:nth-child(even),.panel,.booking-dialog) {
  background: #25282e; -webkit-backdrop-filter: none; backdrop-filter: none;
 }
}

body.life-shell .customer-card .activity-case .activity-bubble { --bubble-rgb: 47 79 90; }
.case-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.case-tags a { display: inline-block; padding: .15rem .5rem; border: 1px solid rgb(210 225 240 / 18%); border-radius: 999px; font-size: .7rem; background: rgb(22 30 40 / 24%); }
.customer-card.case-page { max-width: 62rem; margin: auto; }
.case-form { display: grid; gap: 1rem; min-width: 0; }
.case-form > p { display: grid; gap: .4rem; margin: 0; }
.case-form :is(input[type=text],textarea) { width: 100%; box-sizing: border-box; }
.case-form fieldset { min-width: 0; border: 1px solid rgb(210 225 240 / 15%); border-radius: 1rem; padding: .75rem; }
.case-choice-list { max-height: 20rem; overflow-y: auto; }
.case-form label:has(input[type=checkbox]) { display: flex; align-items: start; gap: .5rem; padding: .35rem 0; overflow-wrap: anywhere; }
