/* VOR Design System v1.1 — versioned copy for independently deployed services.
   Dense, readable workspaces; restrained chrome; meaningful primary actions.
   Existing application marks, semantics and all VOR behaviors remain authoritative. */
html[data-vor-service="gjallar"] { --vor-ui-accent:#729afa; --vor-ui-accent-ink:#2e59bb; }
html[data-vor-service="huginn"] { --vor-ui-accent:#ed8651; --vor-ui-accent-ink:#a84921; }
html[data-vor-service="muninn"] { --vor-ui-accent:#568fdd; --vor-ui-accent-ink:#285fa9; }
html[data-vor-service="gjallar"],html[data-vor-service="huginn"],html[data-vor-service="muninn"] {
    --vor-ui-graphite:#272b32; --vor-ui-graphite-2:#313740;
    --vor-ui-sidebar-text:#dce0e5; --vor-ui-sidebar-muted:#a5adb9;
    --vor-ui-stroke:color-mix(in srgb,var(--vor-border,var(--border-color,#dde2e8)) 88%,transparent);
    --vor-ui-soft:color-mix(in srgb,var(--vor-ui-accent) 11%,var(--vor-surface-raised,var(--bg-card,white)));
    --vor-ui-shadow:0 5px 24px rgba(20,28,40,.045);
    --vor-ui-radius:9px;
    --vor-ui-action:#325cbe;
    --vor-ui-action-hover:#284eaa;
    --vor-ui-action-text:#fff;
    --vor-ui-gap:10px;
}
html[data-vor-service="huginn"] { --vor-ui-action:#ae4c1d; --vor-ui-action-hover:#923f18; }
html[data-vor-service="muninn"] { --vor-ui-action:#2868bd; --vor-ui-action-hover:#1c539f; }
html[data-theme="dark"][data-vor-service] { --vor-ui-graphite:#1c2026; --vor-ui-graphite-2:#242930; --vor-ui-shadow:0 5px 24px rgba(0,0,0,.13); }
html[data-theme="dark"][data-vor-service="gjallar"] { --vor-ui-accent-ink:#c6d8ff; }
html[data-theme="dark"][data-vor-service="huginn"] { --vor-ui-accent-ink:#ffd0b0; }
html[data-theme="dark"][data-vor-service="muninn"] { --vor-ui-accent-ink:#afcfff; }
html[data-theme="dark"] .vor-ui-chip--green {color:#9de6c8;}
html[data-theme="dark"] .vor-ui-chip--red {color:#ffafb4;}
html[data-theme="dark"] .vor-ui-chip--amber {color:#f2c985;}
html[data-theme="dark"] .vor-ui-chip--blue {color:#a7cdfd;}

/* Shell: all services share the graphite surface and exact same navigation scale. */
html[data-vor-service="gjallar"] .gjallar-sidebar,
html[data-vor-service="huginn"] .huginn-sidebar,
html[data-vor-service="muninn"] .vor-app-sidebar,
html[data-vor-service="gjallar"] .gj-mobile-nav,
html[data-vor-service="huginn"] .hu-mobile-navigation,
html[data-vor-service="muninn"] .vor-app-mobile-navigation {
    background:var(--vor-ui-graphite) !important; background-image:none !important;
    border-color:rgba(255,255,255,.095); box-shadow:none; color:var(--vor-ui-sidebar-text);
}
html[data-vor-service] .vor-app-sidebar .vor-app-nav,
html[data-vor-service] .vor-app-mobile-navigation .vor-app-nav { gap:3px; }
html[data-vor-service] .vor-app-sidebar .vor-app-nav-item,
html[data-vor-service] .vor-app-sidebar .vor-app-nav-group-label,
html[data-vor-service] .vor-app-mobile-navigation .vor-app-nav-item,
html[data-vor-service] .vor-app-mobile-navigation .vor-app-nav-group-label {
    font-size:12.5px !important; letter-spacing:0 !important; text-transform:none !important;
    font-weight:550 !important; line-height:1.35 !important; color:var(--vor-ui-sidebar-text) !important;
    min-height:34px; border-radius:8px; transition:background-color .16s ease,color .16s ease,box-shadow .16s ease;
}
html[data-vor-service] .vor-app-sidebar .vor-app-nav-group-label {font-weight:650 !important;}
html[data-vor-service] .vor-app-sidebar .vor-app-nav-item:hover,
html[data-vor-service] .vor-app-sidebar .vor-app-nav-group-label:hover {
    background:rgba(255,255,255,.075) !important;color:#fff !important;transform:none !important;
}
html[data-vor-service] .vor-app-sidebar .vor-app-nav-item.is-active {
    background:color-mix(in srgb,var(--vor-ui-accent) 18%,var(--vor-ui-graphite)) !important;
    color:color-mix(in srgb,var(--vor-ui-accent) 45%,white) !important;
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--vor-ui-accent) 22%,transparent);
    font-weight:710 !important;
}
html[data-vor-service] .vor-app-sidebar .vor-app-nav-item.is-active::before {background:var(--vor-ui-accent) !important;}
html[data-vor-service] .vor-app-sidebar .vor-app-nav-dot {color:var(--vor-ui-sidebar-muted) !important;}
html[data-vor-service] .vor-app-sidebar .vor-app-brand-copy strong,
html[data-vor-service] .vor-app-sidebar .vor-app-user-compact strong {color:#fafbfd !important;}
html[data-vor-service] .vor-app-sidebar .vor-app-brand-copy small,
html[data-vor-service] .vor-app-sidebar .vor-app-user-compact small {color:var(--vor-ui-sidebar-muted) !important;}
html[data-vor-service] .vor-app-sidebar .vor-app-brand-mark { color:var(--vor-ui-accent) !important; border-color:color-mix(in srgb,var(--vor-ui-accent) 35%,transparent) !important; background:color-mix(in srgb,var(--vor-ui-accent) 12%,transparent) !important; }
html[data-vor-service="gjallar"] .gj-shell-workspace,
html[data-vor-service="huginn"] .hu-workspace-identity {
    background:rgba(255,255,255,.04) !important;border-color:rgba(255,255,255,.1) !important;
    box-shadow:none !important;
}
html[data-vor-service] .vor-app-topbar {backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);}
html[data-vor-service] .vor-app-user-trigger {border-radius:11px;}
html[data-vor-service] .vor-app-user-trigger-copy {display:flex;flex-direction:column;gap:2px;align-items:flex-start;min-width:0;}
html[data-vor-service] .vor-app-user-trigger-copy strong {font-size:12px;font-weight:700;line-height:1.2;}
html[data-vor-service] .vor-app-user-trigger-copy small {font-size:10.5px;line-height:1.25;opacity:.8;}
/* Cards, buttons, filters, table identities and chips are the same across modules. */
html[data-vor-service] .vor-ui-card,
html[data-vor-service] .hu-record-detail-card,
html[data-vor-service] .crm-record-section,
html[data-vor-service] .mun-work-section,
html[data-vor-service] .mun-work-aside,
html[data-vor-service] .mun-panel {border-radius:var(--vor-ui-radius);box-shadow:var(--vor-ui-shadow);}
html[data-vor-service] .crm-page,
html[data-vor-service] .mun-page {gap:var(--vor-ui-gap);}
html[data-vor-service] .btn-gray-light,
html[data-vor-service] .btn-red-light,
html[data-vor-service] .crm-workbar-tools button,
html[data-vor-service] .mun-workbar-tools button {border-radius:9px !important;font-weight:680;transition:background-color .15s,border-color .15s,transform .15s,box-shadow .15s;}
html[data-vor-service] .btn-gray-light:hover:not(:disabled),
html[data-vor-service] .btn-red-light:hover:not(:disabled) {transform:translateY(-1px);}
html[data-vor-service] .btn-gray-light.is-primary-light {box-shadow:0 2px 9px color-mix(in srgb,var(--vor-ui-accent) 12%,transparent);}
html[data-vor-service] :is(input,select,textarea,button,a):focus-visible {outline:2px solid var(--vor-ui-accent);outline-offset:2px;}
html[data-vor-service] .crm-workbar,
html[data-vor-service] .mun-workbar {gap:10px;flex-wrap:wrap;}
html[data-vor-service] .crm-workbar-tools,
html[data-vor-service] .mun-workbar-tools {gap:7px;flex-wrap:wrap;}
html[data-vor-service] :is(.table,.crm-table-surface table,.vor-ui-table) th {font-size:11px;letter-spacing:.01em;font-weight:720;white-space:nowrap;}
html[data-vor-service] :is(.table,.crm-table-surface table,.vor-ui-table) td {vertical-align:middle;padding-top:7px;padding-bottom:7px;font-size:12px;line-height:1.35;}
html[data-vor-service] :is(.table,.crm-table-surface table,.vor-ui-table) tbody tr {transition:background-color .14s ease,box-shadow .14s ease;}
html[data-vor-service] :is(.table,.crm-table-surface table,.vor-ui-table) tbody tr:hover {background:color-mix(in srgb,var(--vor-ui-accent) 5%,var(--vor-surface-raised,var(--bg-card,white)));}
.vor-ui-identity {display:inline-flex;align-items:center;gap:7px;min-width:0;text-align:left;color:inherit;text-decoration:none;}
.vor-ui-identity__mark {width:29px;height:29px;flex:0 0 29px;display:inline-grid;place-items:center;border-radius:10px;background:var(--vor-ui-soft);color:var(--vor-ui-accent-ink);font-size:11px;font-weight:780;overflow:hidden;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--vor-ui-accent) 13%,transparent);}
.vor-ui-identity__mark img {width:100%;height:100%;object-fit:cover;}
.vor-ui-identity__copy {display:flex;flex-direction:column;min-width:0;gap:2px;}
.vor-ui-identity__copy strong {font-size:12.5px;font-weight:710;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.vor-ui-identity__copy small {font-size:10.5px;opacity:.72;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.vor-ui-identity:is(a,button):hover .vor-ui-identity__copy strong {color:var(--vor-ui-accent-ink);}
.vor-ui-chip {display:inline-flex;align-items:center;gap:5px;min-height:20px;padding:3px 8px;border-radius:99px;font-size:10.5px;font-weight:720;line-height:1.2;white-space:nowrap;background:var(--vor-ui-soft);color:var(--vor-ui-accent-ink);}
.vor-ui-chip--green {background:color-mix(in srgb,#42b98c 14%,transparent);color:#238460;}
.vor-ui-chip--red {background:color-mix(in srgb,#ef6d72 13%,transparent);color:#c44850;}
.vor-ui-chip--amber {background:color-mix(in srgb,#e7a74c 15%,transparent);color:#9d6822;}
.vor-ui-chip--blue {background:color-mix(in srgb,#659de6 14%,transparent);color:#3a75bd;}
.vor-ui-tabs {display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:5px;border:1px solid var(--vor-ui-stroke);border-radius:12px;background:color-mix(in srgb,var(--vor-surface-raised,var(--bg-card,white)) 88%,transparent);margin:6px 0;}
.vor-ui-tabs [role="tab"] {background:transparent;border:0;border-radius:8px;color:var(--vor-text-soft,var(--text-muted));min-height:30px;padding:6px 11px;font-size:12px;font-weight:650;cursor:pointer;}
.vor-ui-tabs [role="tab"]:hover {background:var(--vor-ui-soft);}
.vor-ui-tabs [role="tab"][aria-selected="true"] {background:var(--vor-ui-soft);color:var(--vor-ui-accent-ink);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--vor-ui-accent) 16%,transparent);}
.vor-ui-tab-panel[hidden] {display:none !important;}

/* VOR core density + CTA hierarchy. Shared by Gjallar, Huginn and Muninn.
   Record types differ, not their visual rhythm or focus treatment. */
html[data-vor-service] :is(.vor-ui-card,.hu-record-detail-card,.crm-record-section,.mun-panel,.mun-work-section,.mun-work-aside) {
    border-radius:var(--vor-ui-radius);
}
html[data-vor-service] :is(.vor-app-topbar,.vor-app-nav,.vor-ui-tabs,.crm-page,.mun-page) {
    font-synthesis:none;
}
html[data-vor-service] :is(.crm-workbar-title,.mun-workbar-title,.gj-page-title h1,.crm-record-identity h1,.mun-detail-head h1) {
    letter-spacing:-.025em;
}
html[data-vor-service] :is(.crm-panel-head,.mun-panel-head,.gj-section-head,.crm-section-title) strong,
html[data-vor-service] :is(.crm-panel-head,.mun-panel-head,.gj-section-head,.crm-section-title) h2 {
    font-weight:740;
}
html[data-vor-service] :is(.crm-workbar-tools,.mun-workbar-tools,.gj-section-tools,.crm-record-toolbar-actions,.mun-action-row) {
    gap:6px;
}
html[data-vor-service] :is(.crm-workbar-tools,.mun-workbar-tools,.gj-section-tools) :is(input,select) {
    min-height:31px;border-radius:8px;font-size:12px;
}
html[data-vor-service] :is(.crm-workbar-tools,.mun-workbar-tools,.gj-section-tools) :is(input,select):focus-visible {
    border-color:var(--vor-ui-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--vor-ui-accent) 13%,transparent);
}
html[data-vor-service] :is(.btn-gray-light,.btn-red-light,.btn-blue-light,.btn-cyan-light,.btn-indigo-light,.btn-purple-light) {
    border-radius:9px !important;
    font-size:12px;font-weight:650;
}
/* Only intentionally primary controls receive the solid service accent. */
html[data-vor-service="huginn"] .crm-page .btn-gray-light.is-primary-light,
html[data-vor-service="huginn"] .crm-home .btn-gray-light.is-primary-light,
html[data-vor-service="muninn"] .mun-page .btn-gray-light.vor-ui-cta,
html[data-vor-service="gjallar"] .gj-page .btn-blue-light,
html[data-vor-service="gjallar"] .gj-user-modal .gj-modal-actions .btn-blue-light {
    background:var(--vor-ui-action) !important;
    border:1px solid var(--vor-ui-action) !important;
    color:var(--vor-ui-action-text) !important;
    box-shadow:0 2px 6px color-mix(in srgb,var(--vor-ui-action) 17%,transparent);
    font-weight:740;
}
html[data-vor-service="huginn"] .crm-page .btn-gray-light.is-primary-light:hover:not(:disabled),
html[data-vor-service="huginn"] .crm-home .btn-gray-light.is-primary-light:hover:not(:disabled),
html[data-vor-service="muninn"] .mun-page .btn-gray-light.vor-ui-cta:hover:not(:disabled),
html[data-vor-service="gjallar"] .gj-page .btn-blue-light:hover:not(:disabled),
html[data-vor-service="gjallar"] .gj-user-modal .gj-modal-actions .btn-blue-light:hover:not(:disabled) {
    background:var(--vor-ui-action-hover) !important;
    border-color:var(--vor-ui-action-hover) !important;
    color:#fff !important;
}
html[data-vor-service] :is(.btn-gray-light,.btn-red-light,.btn-blue-light,.btn-cyan-light,.btn-indigo-light,.btn-purple-light):disabled {
    opacity:.55;cursor:not-allowed;box-shadow:none;
}
/* Tables and related record lists: compact height without sacrificing tap targets. */
html[data-vor-service] :is(.table,.crm-table-surface table,.vor-ui-table) th {
    padding-top:8px;padding-bottom:8px;font-size:11px;line-height:1.25;
}
html[data-vor-service] :is(.table,.crm-table-surface table,.vor-ui-table) td {
    padding-top:7px;padding-bottom:7px;
}
html[data-vor-service] :is(.table,.crm-table-surface table,.vor-ui-table) td :is(button,a) {
    max-width:100%;
}
html[data-vor-service] .vor-ui-identity__copy strong {font-size:12px;}
html[data-vor-service] .vor-ui-identity__copy small {font-size:10.5px;}
html[data-vor-service] .vor-ui-identity__mark {border-radius:8px;}
html[data-vor-service] :is(.vor-ui-chip,.crm-status-chip,.mun-status-chip) {
    font-weight:700;letter-spacing:0;
}
html[data-vor-service] .vor-app-nav-group-label {font-size:12.5px !important;}
html[data-vor-service] .vor-app-nav-item.is-child {font-size:12.5px !important;}
html[data-vor-service] .vor-app-user-trigger-copy strong {font-size:12px;}
html[data-vor-service] .vor-app-user-trigger-copy small {font-size:10.5px;}
@media(max-width:680px) {
    html[data-vor-service] :is(.crm-workbar-tools,.mun-workbar-tools,.gj-section-tools) {gap:6px;}
    html[data-vor-service] :is(.vor-ui-tabs,.crm-record-toolbar-actions,.mun-action-row) {max-width:100%;}
}

/* Shared modal and validation aesthetics. */
html[data-vor-service] .drawer-panel,
html[data-vor-service] .hu-popover,
html[data-vor-service] .gj-menu-popover {border-radius:13px;box-shadow:0 15px 45px rgba(17,24,39,.14);}
html[data-vor-service] .drawer-panel-body {padding:14px 16px;}
html[data-vor-service] .form-actions {gap:8px;}
@media (max-width:680px) {
    html[data-vor-service] .vor-ui-tabs {overflow-x:auto;flex-wrap:nowrap;}
    html[data-vor-service] .vor-ui-tabs [role="tab"] {white-space:nowrap;}
    html[data-vor-service] .vor-app-user-trigger-copy {display:none;}
    .vor-ui-identity__mark{width:30px;height:30px;flex-basis:30px;}
}
@media(prefers-reduced-motion:reduce) {
    html[data-vor-service] .vor-app-nav-item,html[data-vor-service] .btn-gray-light,html[data-vor-service] .vor-ui-identity {transition:none !important;transform:none !important;}
}
