/* DELAD UR style.css (KAN-388 CSS-3): rad 3502-4538, byte-exakt; Hem-rutor. Laddas direkt efter föregående del i index.html. */

/* =============================================================================
HEM-VY DASHBOARD WIDGETS
============================================================================= */

/* Grundkort */
.hw-card {
background: rgba(15, 15, 25, 0.65);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
border: 1px solid rgba(255,255,255,0.08);
border-radius: 12px;
padding: 16px 18px;
box-sizing: border-box;
}

/* PRIVAT-kort: fast bredd, krymper/växer aldrig */
.hw-private-card {
flex: 0 0 auto;
width: 280px;
}

/* Standard saknar privat AI på Hem. Dölj fail-closed även före tenantprofilen
   är löst så den gamla Trafik-ytan aldrig hinner blinka till. */
html.atlas-edition-standard .hw-private-card,
html.atlas-edition-unresolved .hw-private-card {
display: none !important;
}

.hw-bottom-row {
display: flex;
align-items: flex-start;
gap: 14px;
}

/* Todo-kort: fyller resterande bredd i sin flex-rad */
.hw-todo-card {
display: flex;
flex-direction: column;
gap: 8px;
flex: 1;
min-width: 0;
min-height: 130px;
max-height: min(390px, calc(100vh - 440px));
}

/* Kontor-kort: fast bredd, matchar hw-stats-card (200px) */
.hw-offices-card {
flex: 0 0 auto;
width: 200px;
display: flex;
flex-direction: column;
gap: 0;
min-height: 130px;
align-self: flex-start;
position: relative;
}

/* Offices-lista: scrollbar om många kontor */
.hw-offices-list {
display: flex;
flex-direction: column;
gap: 5px;
overflow-y: auto;
flex: 1;
max-height: min(240px, 34vh);
padding-right: 4px;
}

.hw-offices-card .scroll-hint-arrow {
background: linear-gradient(transparent, color-mix(in srgb, var(--bg-dark-secondary) 92%, transparent) 85%);
border-radius: 0 0 10px 10px;
pointer-events: none;
}

.hw-offices-card .scroll-hint-btn {
pointer-events: auto;
}

/* Enskilt kontors-chip */
.hw-office-chip {
display: flex;
align-items: center;
gap: 7px;
border-radius: 8px;
padding: 8px 10px;
cursor: default;
border: 1px solid;
box-sizing: border-box;
min-height: 34px;
transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

/* Färgad punktmarkör */
.hw-office-dot,
.hw-office-chip-icon {
width: 14px;
height: 14px;
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
opacity: 0.9;
filter: drop-shadow(0 0 5px currentColor);
}

.hw-office-chip.is-clickable:hover {
transform: translateY(-1px);
box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18), 0 0 14px color-mix(in srgb, currentColor 16%, transparent);
}

/* Kontorsnamn inuti chip */
.hw-office-chip-name {
font-size: 11px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
min-width: 0;
font-weight: 700;
letter-spacing: 0.04em;
}

/* Kort label-pill (t.ex. ULLEVI) */
.hw-office-chip-label {
font-size: 10px;
font-weight: 700;
padding: 2px 5px;
border-radius: 4px;
flex-shrink: 0;
letter-spacing: 0.3px;
}

/* Välkomst-kort: fyller resterande bredd */
.hw-welcome-card {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
justify-content: center;
}

/* Ärenderäknare-kort */
.hw-stats-card {
flex: 0 0 auto;
width: 200px;
}

/* Kortets rubrikrad */
.hw-card-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
color: var(--text-secondary);
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.6px;
}
.hw-card-icon {
color: var(--accent-primary);
display: flex;
align-items: center;
}
.hw-card-title {
flex: 1;
}
.hw-card-count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 22px;
height: 22px;
margin-left: auto;
padding: 0 7px;
border: 1px solid var(--border-color);
border-radius: 999px;
background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
/* 🔴 `#404`/`KAN-161`: färgen var `var(--accent-primary)`, alltså accent ovanpå samma accent i
   12 % — samma kulör i för- och bakgrund. Att det ändå såg bra ut berodde på en slump i
   kaskaden: `#view-chat .hw-card *` i temafilen har högre specificitet och tvingar `inherit`.
   Bara 4 av 10 teman har den regeln. I `atlas-minimal` mättes badgen live till 2.48–2.83:1,
   under WCAG AA. `--text-primary` är samma färg som de fyra "räddade" temana redan renderar,
   och gör kontrasten oberoende av om temaregeln finns. Ändra inte tillbaka utan att mäta
   kontrasten live i ALLA teman i `Renderer/assets/themes/`. */
color: var(--text-primary);
font-size: 11px;
font-weight: 800;
line-height: 1;
}
.hw-todo-count {
background: rgba(255,255,255,0.1);
border-radius: 10px;
padding: 1px 7px;
font-size: 10px;
font-weight: 600;
}
.hw-todo-feedback {
display: flex;
align-items: center;
min-height: 22px;
margin: -2px 0 4px;
padding: 4px 8px;
border: 1px solid color-mix(in srgb, var(--accent-primary) 38%, rgba(255,255,255,0.10));
border-radius: 6px;
background: color-mix(in srgb, var(--accent-primary) 15%, rgba(255,255,255,0.05));
color: var(--text-primary);
font-size: 11px;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.hw-todo-section {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
}
.hw-todo-section + .hw-todo-section {
margin-top: 7px;
}
.hw-todo-section-head,
.hw-todo-archive-toggle {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
width: 100%;
min-height: 28px;
box-sizing: border-box;
}
.hw-todo-section-head {
padding: 2px 0 3px;
}
.hw-todo-section-title {
display: flex;
align-items: center;
gap: 7px;
min-width: 0;
color: var(--text-secondary);
font-size: 10px;
font-weight: 800;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.hw-todo-section-title span {
white-space: nowrap;
}
.hw-todo-section-title small,
.hw-todo-archive-toggle small {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 18px;
height: 18px;
padding: 0 5px;
border-radius: 999px;
background: color-mix(in srgb, var(--text-primary) 9%, transparent);
border: 1px solid color-mix(in srgb, var(--text-secondary) 20%, transparent);
color: var(--text-secondary);
font-size: 10px;
font-weight: 800;
line-height: 1;
}
.hw-todo-section-title em {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-style: normal;
font-size: 10px;
font-weight: 650;
letter-spacing: 0;
text-transform: none;
color: var(--text-primary);
opacity: 0.8;
}
.hw-todo-section-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 5px;
flex: 0 0 auto;
}
.hw-todo-head-icon-btn,
.hw-todo-head-action-btn {
appearance: none;
display: inline-flex;
align-items: center;
justify-content: center;
height: 32px;
min-width: 32px;
border-radius: 6px;
border: 1px solid rgba(255,255,255,0.14);
background: rgba(255,255,255,0.05);
color: var(--text-secondary);
cursor: pointer;
transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s, transform 0.15s;
}
.hw-todo-head-icon-btn {
width: 32px;
padding: 0;
}
.hw-todo-head-action-btn {
gap: 5px;
padding: 0 9px;
font-size: 10.5px;
font-weight: 800;
white-space: nowrap;
}
.hw-todo-head-action-btn.is-icon-only {
width: 32px;
padding: 0;
}
.hw-todo-head-icon-btn svg,
.hw-todo-head-action-btn svg {
width: 16px;
height: 16px;
stroke: currentColor;
}
.hw-todo-head-icon-btn.danger svg {
fill: currentColor !important;
stroke: none !important;
}
.hw-todo-head-icon-btn:hover,
.hw-todo-head-action-btn:hover {
background: rgba(255,255,255,0.10);
border-color: rgba(255,255,255,0.24);
color: var(--text-primary);
transform: translateY(-1px);
}
.hw-todo-head-icon-btn.is-active,
.hw-todo-head-action-btn.primary:not(:disabled) {
border-color: color-mix(in srgb, var(--accent-primary) 45%, rgba(255,255,255,0.14));
background: color-mix(in srgb, var(--accent-primary) 13%, rgba(255,255,255,0.04));
color: var(--accent-primary);
}
.hw-todo-head-icon-btn.danger:not(:disabled):hover {
border-color: color-mix(in srgb, #ff453a 50%, rgba(255,255,255,0.18));
color: #ff453a;
}
.hw-todo-head-icon-btn:disabled,
.hw-todo-head-action-btn:disabled {
cursor: not-allowed;
opacity: 0.42;
transform: none;
}
.hw-todo-bulk-row {
display: flex;
align-items: center;
gap: 6px;
margin: -1px 0 5px;
min-width: 0;
flex-wrap: wrap;
}
.hw-todo-bulk-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 5px;
height: 26px;
min-width: 0;
padding: 0 8px;
border-radius: 6px;
border: 1px solid rgba(255,255,255,0.14);
background: rgba(255,255,255,0.05);
color: var(--text-secondary);
font-size: 11px;
font-weight: 700;
cursor: pointer;
transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.hw-todo-bulk-btn svg {
width: 12px;
height: 12px;
flex: 0 0 auto;
stroke: currentColor;
}
.hw-todo-bulk-btn span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hw-todo-bulk-btn:hover {
background: rgba(255,255,255,0.10);
border-color: rgba(255,255,255,0.24);
color: var(--text-primary);
transform: translateY(-1px);
}
.hw-todo-bulk-btn.primary {
border-color: color-mix(in srgb, var(--accent-primary) 45%, rgba(255,255,255,0.14));
background: color-mix(in srgb, var(--accent-primary) 13%, rgba(255,255,255,0.04));
color: var(--accent-primary);
}
.hw-todo-bulk-icon-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
padding: 0;
border-radius: 6px;
border: 1px solid rgba(255,255,255,0.14);
background: rgba(255,255,255,0.05);
color: var(--text-secondary);
cursor: pointer;
transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.hw-todo-bulk-icon-btn svg {
width: 14px;
height: 14px;
stroke: currentColor;
}
.hw-todo-bulk-icon-btn.danger svg {
fill: currentColor !important;
stroke: none !important;
}
.hw-todo-bulk-icon-btn:hover {
background: rgba(255,255,255,0.10);
border-color: rgba(255,255,255,0.24);
color: var(--text-primary);
transform: translateY(-1px);
}
.hw-todo-bulk-icon-btn.danger:hover {
border-color: color-mix(in srgb, #ff453a 50%, rgba(255,255,255,0.18));
color: #ff453a;
}

/* Todo-lista */
.hw-todo-list {
display: flex;
flex-direction: column;
gap: 0;
max-height: clamp(158px, calc(100vh - 520px), 300px);
overflow-y: auto;
flex: 0 1 auto;
scrollbar-width: none !important;
}
.hw-todo-list::-webkit-scrollbar {
width: 4px !important;
height: 4px !important;
background: transparent !important;
}
.hw-todo-list::-webkit-scrollbar-track,
.hw-todo-list::-webkit-scrollbar-track-piece {
background: transparent !important;
box-shadow: none !important;
border: none !important;
}
.hw-todo-list::-webkit-scrollbar-thumb {
background: color-mix(in srgb, var(--accent-primary) 72%, transparent) !important;
border-radius: 999px !important;
box-shadow: none !important;
border: none !important;
}
.hw-todo-list::-webkit-scrollbar-thumb:hover {
background: var(--accent-primary) !important;
box-shadow: none !important;
}
.hw-todo-list::-webkit-scrollbar-button {
display: none !important;
width: 0 !important;
height: 0 !important;
background: transparent !important;
}
.hw-todo-empty {
font-size: 12px;
color: color-mix(in srgb, var(--text-secondary) 72%, transparent);
font-style: italic;
padding: 6px 0;
}
.hw-todo-item {
display: flex;
align-items: center;
gap: 7px;
min-height: 28px;
padding: 4px 5px 4px 7px;
border-radius: 6px;
border: 1px solid color-mix(in srgb, var(--text-secondary) 22%, transparent);
background: color-mix(in srgb, var(--text-primary) 7%, transparent);
box-sizing: border-box;
transition: background 0.15s, border-color 0.15s;
}
.hw-todo-item:hover {
background: color-mix(in srgb, var(--text-primary) 11%, transparent);
border-color: color-mix(in srgb, var(--text-secondary) 34%, transparent);
}
.hw-todo-item.is-selected {
background: color-mix(in srgb, var(--accent-primary) 14%, rgba(255,255,255,0.04));
border-color: color-mix(in srgb, var(--accent-primary) 52%, transparent);
}
.hw-todo-item.is-sla {
border-left: 2px solid color-mix(in srgb, var(--hw-todo-accent, var(--accent-primary, #ffc107)) 62%, transparent);
padding-left: 6px;
}
.hw-todo-item.done .hw-todo-text {
text-decoration: line-through;
opacity: 0.4;
}
.hw-todo-check {
width: 17px;
height: 17px;
min-width: 17px;
border-radius: 4px;
border: 1.5px solid color-mix(in srgb, var(--text-secondary) 42%, transparent);
background: transparent;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
color: var(--text-primary);
transition: background 0.15s, border-color 0.15s;
}
.hw-todo-item.done .hw-todo-check {
background: var(--accent-primary);
border-color: var(--accent-primary);
}
.hw-todo-restore {
width: 17px;
height: 17px;
min-width: 17px;
border-radius: 4px;
border: 1.5px solid color-mix(in srgb, var(--text-secondary) 32%, transparent);
background: transparent;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
color: var(--text-secondary);
opacity: 0.58;
transition: opacity 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
}
.hw-todo-restore:hover {
opacity: 0.95;
color: var(--accent-primary);
border-color: color-mix(in srgb, var(--accent-primary) 48%, transparent);
background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
}
.hw-todo-bell {
width: 17px;
height: 17px;
min-width: 17px;
border-radius: 4px;
border: 1.5px solid color-mix(in srgb, var(--text-secondary) 32%, transparent);
background: transparent;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
color: var(--text-secondary);
opacity: 0.45;
transition: opacity 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
}
.hw-todo-bell:hover {
opacity: 0.9;
border-color: color-mix(in srgb, var(--text-secondary) 48%, transparent);
background: color-mix(in srgb, var(--text-primary) 7%, transparent);
}
.hw-todo-bell.has-remind {
width: auto;
min-width: 48px;
gap: 4px;
padding: 0 5px;
color: var(--accent-primary);
border-color: color-mix(in srgb, var(--accent-primary) 55%, transparent);
background: color-mix(in srgb, var(--accent-primary) 14%, transparent);
opacity: 1;
}
.hw-todo-bell.has-remind::after {
content: attr(data-time);
font-size: 10px;
font-weight: 600;
line-height: 1;
color: var(--accent-primary);
}
.hw-todo-text {
flex: 1;
font-size: 13px;
color: var(--text-primary);
min-width: 0;
white-space: normal;
overflow-wrap: anywhere;
}
.hw-todo-sla-link {
cursor: pointer;
}
.hw-todo-sla-link:hover {
text-decoration: underline;
opacity: 0.85;
}

/* Tidsstämpel-pill till vänster om texten */
.hw-todo-ts {
font-size: 10px;
color: color-mix(in srgb, var(--text-secondary) 82%, transparent);
white-space: nowrap;
flex-shrink: 0;
background: color-mix(in srgb, var(--text-primary) 10%, transparent);
border: 1px solid color-mix(in srgb, var(--text-secondary) 26%, transparent);
border-radius: 4px;
padding: 1px 5px;
margin-right: 6px;
}
.hw-todo-del {
opacity: 0;
width: 17px;
height: 17px;
min-width: 17px;
border-radius: 4px;
border: none;
background: transparent;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
color: color-mix(in srgb, var(--text-secondary) 70%, transparent);
transition: opacity 0.15s, color 0.15s;
}
.hw-todo-item:hover .hw-todo-del {
opacity: 1;
}
.hw-todo-del:hover {
color: #e74c3c !important;
}
.hw-todo-del svg {
fill: currentColor !important;
stroke: none !important;
}
.hw-todo-section-archived .hw-todo-item {
opacity: 0.82;
}
.hw-todo-section-archived .hw-todo-del {
opacity: 0.7;
}
.hw-todo-archive-toggle {
margin: 1px 0 0;
padding: 5px 7px;
border-radius: 6px;
border: 1px dashed color-mix(in srgb, var(--text-secondary) 26%, transparent);
background: color-mix(in srgb, var(--text-primary) 5%, transparent);
color: var(--text-secondary);
font-size: 11px;
font-weight: 800;
letter-spacing: 0.04em;
text-transform: uppercase;
cursor: pointer;
text-align: left;
transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hw-todo-archive-toggle:hover {
background: rgba(255,255,255,0.08);
border-color: color-mix(in srgb, var(--accent-primary) 35%, rgba(255,255,255,0.18));
color: var(--text-primary);
}
.hw-todo-archive-toggle span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hw-todo-archive-toggle b {
flex: 0 0 auto;
color: var(--accent-primary);
font-size: 10px;
font-weight: 800;
}
.atlas-light-theme #view-chat .hw-todo-card {
color: var(--text-primary) !important;
}
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-section-title {
color: color-mix(in srgb, var(--accent-primary) 72%, var(--text-secondary) 28%) !important;
}
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-section-title span,
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-archive-toggle span,
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-archive-toggle b {
color: color-mix(in srgb, var(--accent-primary) 82%, var(--text-primary) 18%) !important;
}
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-section-title small,
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-archive-toggle small {
background: color-mix(in srgb, var(--accent-primary) 12%, var(--bg-dark-secondary) 88%) !important;
border-color: color-mix(in srgb, var(--accent-primary) 26%, var(--border-color) 74%) !important;
color: color-mix(in srgb, var(--accent-primary) 70%, var(--text-primary) 30%) !important;
}
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-head-icon-btn,
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-head-action-btn,
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-del,
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-bell,
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-check {
color: color-mix(in srgb, var(--accent-primary) 58%, var(--text-secondary) 42%) !important;
}
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-head-action-btn.primary:not(:disabled),
.atlas-light-theme #view-chat .hw-todo-card .hw-todo-head-icon-btn.is-active {
color: var(--accent-primary) !important;
}
.hw-todo-group-toggle {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
width: 100%;
min-height: 28px;
padding: 5px 8px;
border-radius: 6px;
border: 1px dashed color-mix(in srgb, var(--text-secondary) 26%, transparent);
background: color-mix(in srgb, var(--text-primary) 5%, transparent);
color: var(--text-secondary);
font-size: 11px;
font-weight: 700;
cursor: pointer;
text-align: left;
transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hw-todo-group-toggle:hover {
background: rgba(255,255,255,0.08);
border-color: color-mix(in srgb, var(--accent-primary) 35%, rgba(255,255,255,0.18));
color: var(--text-primary);
}
.hw-todo-group-toggle span:last-child {
flex: 0 0 auto;
color: var(--accent-primary);
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.hw-todo-reminder-popover {
position: absolute;
z-index: 10050;
display: grid;
grid-template-columns: 124px 86px;
gap: 7px;
padding: 8px;
border-radius: 8px;
border: 1px solid rgba(255,255,255,0.14);
background: rgba(20,22,30,0.88);
backdrop-filter: blur(18px);
box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}
.hw-todo-reminder-fields {
display: contents;
}
.hw-todo-reminder-actions {
grid-column: 1 / -1;
display: flex;
gap: 6px;
align-items: center;
}
.hw-todo-reminder-date,
.hw-todo-reminder-time {
height: 28px;
border-radius: 6px;
border: 1px solid rgba(255,255,255,0.16);
background: rgba(255,255,255,0.08);
color: var(--text-primary);
font-size: 12px;
padding: 0 7px;
outline: none;
color-scheme: dark;
}
.hw-todo-reminder-date {
width: 124px;
}
.hw-todo-reminder-time {
width: 86px;
}
.hw-todo-reminder-date:focus,
.hw-todo-reminder-time:focus {
border-color: var(--accent-primary);
}
.hw-todo-reminder-save,
.hw-todo-reminder-clear {
width: 28px;
height: 28px;
border-radius: 6px;
border: 1px solid rgba(255,255,255,0.14);
background: rgba(255,255,255,0.08);
color: var(--text-primary);
padding: 0;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, filter 0.15s;
}
.hw-todo-reminder-save svg,
.hw-todo-reminder-clear svg {
width: 14px;
height: 14px;
stroke: currentColor;
}
.hw-todo-reminder-save {
color: var(--accent-primary);
border-color: color-mix(in srgb, var(--accent-primary) 40%, rgba(255,255,255,0.14));
}
.hw-todo-reminder-clear {
color: #ff6b6b;
border-color: rgba(255,69,58,0.28);
}
.hw-todo-reminder-save:hover,
.hw-todo-reminder-clear:hover {
background: rgba(255,255,255,0.14);
transform: scale(1.04);
filter: drop-shadow(0 0 5px color-mix(in srgb, currentColor 45%, transparent));
}
.hw-todo-input-row {
display: flex;
gap: 6px;
align-items: center;
margin-top: 4px;
}
.hw-todo-input {
flex: 1;
background: rgba(255,255,255,0.06);
border: 1px solid rgba(255,255,255,0.12);
border-radius: 6px;
color: var(--text-primary);
font-size: 12px;
padding: 5px 10px;
outline: none;
transition: border-color 0.15s;
}
.hw-todo-input:focus {
border-color: var(--accent-primary);
}
.hw-todo-add-btn {
width: 32px;
height: 32px;
min-width: 32px;
border-radius: 6px;
border: 1px solid rgba(255,255,255,0.12);
background: rgba(255,255,255,0.06);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
color: var(--accent-primary);
transition: background 0.15s;
}
.hw-todo-add-btn svg {
width: 16px;
height: 16px;
stroke: currentColor;
}
.hw-todo-add-btn:hover {
background: rgba(255,255,255,0.12);
}

/* Välkomst-vänster (hälsning + klocka) */
.hw-welcome-left {
flex: 0 0 auto;
text-align: center;
}
.hw-welcome-greeting {
font-size: 14px;
color: var(--text-secondary);
margin-bottom: 4px;
}
.hw-welcome-name {
color: var(--accent-primary);
font-weight: 600;
}
.hw-welcome-time {
font-size: 30px;
font-weight: 700;
color: var(--text-primary);
letter-spacing: 1px;
font-variant-numeric: tabular-nums;
line-height: 1.1;
}
.hw-welcome-date {
font-size: 11px;
color: var(--text-secondary);
margin-top: 4px;
text-transform: capitalize;
}

/* Hem mellanläge: mobil-CSS börjar vid 768px, men sidomenyn lämnar redan före
   dess för lite plats åt klockkortet om grannkorten behåller 280/200px.
   Låt alla tre kort dela krympningen och skala klockan inom sitt eget kort. */
@media screen and (min-width: 769px) and (max-width: 1100px) {
#home-widgets-area > div:first-child .hw-private-card {
flex: 1.25 1 280px;
width: auto;
min-width: 150px;
max-width: 280px;
}

#home-widgets-area > div:first-child .hw-welcome-card {
flex: 0.75 1 180px;
min-width: 100px;
padding-inline: 10px;
overflow: hidden;
}

#home-widgets-area > div:first-child .hw-stats-card {
flex: 1 1 200px;
width: auto;
min-width: 150px;
max-width: 200px;
}

#home-widgets-area .hw-welcome-left {
width: 100%;
min-width: 0;
overflow: hidden;
}

#home-widgets-area .hw-welcome-time {
font-size: clamp(16px, 2.2vw, 24px);
letter-spacing: 0.5px;
white-space: nowrap;
}

#home-widgets-area .hw-welcome-greeting,
#home-widgets-area .hw-welcome-date {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}

/* I det smalaste desktopmellanläget är tre kort på samma rad inte användbart
   ens med flex-krympning. Fortsätt Hem-kortens mobilmönster utan att aktivera
   resten av mobile.css: privatkortet överst, klocka och ärenden under. */
@media screen and (min-width: 769px) and (max-width: 900px) {
#home-widgets-area > div:first-child {
display: grid !important;
grid-template-columns: minmax(0, 1fr) minmax(150px, 200px);
gap: 14px;
align-items: stretch;
}

#home-widgets-area > div:first-child .hw-private-card {
grid-column: 1 / -1;
width: auto;
max-width: none;
}

#home-widgets-area > div:first-child .hw-welcome-card {
min-width: 0;
}

#home-widgets-area > div:first-child .hw-stats-card {
width: auto;
max-width: none;
}
}

/* Statistik-pills (nu i eget kort) */
#hw-stats {
display: flex;
flex-direction: column;
gap: 8px;
align-items: stretch;
width: 100%;
}
.hw-stat-item {
display: flex;
align-items: center;
gap: 6px;
background: rgba(255,255,255,0.06);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 8px;
padding: 7px 12px;
font-size: 13px;
color: var(--text-secondary);
}
.hw-stat-item.hw-stat-link {
cursor: pointer;
transition: all 0.2s ease;
}
.hw-stat-item.hw-stat-link:hover {
background: rgba(255,255,255,0.12);
border-color: var(--accent-primary);
color: var(--accent-primary);
}
.hw-stat-item.hw-stat-warn {
border-color: rgba(241,196,15,0.35);
background: rgba(241,196,15,0.07);
color: #f1c40f;
}
/* Home-widget rad för interna ärenden — gul accent, subtilare border än hw-stat-warn */
.hw-stat-item.hw-stat-internal {
border-color: rgba(241,196,15,0.22);
color: #f1c40f;
}
.hw-sla-badge {
font-size: 11px;
font-weight: 600;
color: #f1c40f;
}
.hw-stat-skeleton {
opacity: 0.35;
}
.hw-skeleton-bar {
height: 13px;
background: rgba(255,255,255,0.18);
border-radius: 4px;
animation: hw-pulse 1.5s ease-in-out infinite;
}
@keyframes hw-pulse {
0%, 100% { opacity: 0.3; }
50%       { opacity: 0.7; }
}

/* Skeleton-kort — visas kort vid första vybesök tills listdata laddas (F-UX-4) */
.atlas-skeleton-card {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 16px;
border-bottom: 1px solid rgba(255,255,255,0.06);
pointer-events: none;
}
.atlas-sk-avatar {
width: 36px; height: 36px;
border-radius: 50%;
background: rgba(255,255,255,0.12);
flex-shrink: 0;
animation: hw-pulse 1.5s ease-in-out infinite;
}
.atlas-sk-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.atlas-sk-line {
background: rgba(255,255,255,0.12);
border-radius: 4px;
animation: hw-pulse 1.5s ease-in-out infinite;
}
.atlas-sk-line--title { height: 13px; width: 60%; }
.atlas-sk-line--sub   { height: 11px; width: 40%; animation-delay: 0.2s; }
.atlas-minimal .atlas-sk-avatar,
.atlas-minimal .atlas-sk-line  { animation: none; }
