/* Jelppa 1.0-EU — vaalea / tumma -teemavalinta sivupalkissa. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.sidebar-theme-control{padding:10px 10px 9px;border-bottom:1px solid #e5e8ee}
.sidebar-theme-label{display:block;margin:0 2px 7px;color:#8a94a5;font-size:10px;font-weight:900;letter-spacing:.10em;text-transform:uppercase}
.theme-choice{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:0;padding:3px;border:1px solid #d8dee8;border-radius:10px;background:#f4f6f9}
.theme-choice label{display:flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:0 8px;border-radius:7px;color:#667085;font-size:12px;font-weight:800;cursor:pointer;user-select:none;transition:background .15s ease,color .15s ease,box-shadow .15s ease}
.theme-choice input:checked+label{background:#fff;color:#172033;box-shadow:0 1px 4px rgba(23,32,51,.12)}
.theme-choice input:focus-visible+label{outline:3px solid color-mix(in srgb,var(--primary,#3157d5) 40%,transparent);outline-offset:1px}
html[data-theme-effective="dark"] .sidebar-theme-control{border-color:#293442}
html[data-theme-effective="dark"] .sidebar-theme-label{color:#7f8da0}
html[data-theme-effective="dark"] .theme-choice{background:#0f151e;border-color:#344052}
html[data-theme-effective="dark"] .theme-choice label{color:#9eabba}
html[data-theme-effective="dark"] .theme-choice input:checked+label{background:#263140;color:#edf2f7;box-shadow:0 1px 5px rgba(0,0,0,.3)}

html[data-theme-effective="dark"]{
  color-scheme:dark;
  /* Design-system 2.0 dark semantic tokens. Legacy aliases resolve through these. */
  --jelppa-bg:#0f141c;
  --jelppa-surface:#171e28;
  --jelppa-surface-subtle:#1b2430;
  --jelppa-surface-muted:#1b2430;
  --jelppa-surface-hover:#202b38;
  --jelppa-neutral-bg:#263140;
  --jelppa-on-solid:#ffffff;
  --jelppa-text:#edf2f7;
  --jelppa-text-strong:#f8fafc;
  --jelppa-text-secondary:#dce5ef;
  --jelppa-text-tertiary:#b8c3d1;
  --jelppa-muted:#9ca8b8;
  --jelppa-text-subtle:#7f8da0;
  --jelppa-border:#2b3543;
  --jelppa-border-soft:#252f3c;
  --jelppa-border-strong:#394657;
  --jelppa-primary-soft:color-mix(in srgb,var(--jelppa-primary) 20%,#171e28);
  --jelppa-focus:color-mix(in srgb,var(--jelppa-primary) 72%,#fff);
  --jelppa-info-bg:#1a2a45;
  --jelppa-info-text:#b6ceff;
  --jelppa-shadow-xs:0 1px 2px rgba(0,0,0,.25);
  --jelppa-shadow-sm:0 1px 2px rgba(0,0,0,.25),0 8px 24px rgba(0,0,0,.20);
  --jelppa-shadow-md:0 10px 30px rgba(0,0,0,.28);
}
html[data-theme-effective="dark"] body.jelppa-modern{
  --un-bg:var(--jelppa-bg);
  --un-surface:var(--jelppa-surface);
  --un-surface-2:var(--jelppa-surface-muted);
  --un-surface-subtle:var(--jelppa-surface-subtle);
  --un-text:var(--jelppa-text);
  --un-muted:var(--jelppa-muted);
  --un-line:var(--jelppa-border);
  --un-nav:#0b1017;
  --un-nav-muted:var(--jelppa-text-subtle);
  --un-shadow:var(--jelppa-shadow-sm);
  background:var(--un-bg);
  color:var(--un-text);
}
html[data-theme-effective="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme-effective="dark"] a{color:#82a7ff}
html[data-theme-effective="dark"] .muted,
html[data-theme-effective="dark"] .page-head p,
html[data-theme-effective="dark"] .metric span,
html[data-theme-effective="dark"] .message-head,
html[data-theme-effective="dark"] .meta dd,
html[data-theme-effective="dark"] .article dd{color:var(--muted)}
html[data-theme-effective="dark"] .eyebrow,
html[data-theme-effective="dark"] .stats-kicker{color:#8fa0b5}

/* Yläpalkki ja teeman valitsin */
html[data-theme-effective="dark"] .jelppa-modern .top,
html[data-theme-effective="dark"] .systemadmin-top,
html[data-theme-effective="dark"] .platform-mode.systemadmin-mode .systemadmin-top{background:rgba(17,24,39,.97);color:#edf2f7;border-bottom-color:#2b3543}
html[data-theme-effective="dark"] .jelppa-modern .brand,
html[data-theme-effective="dark"] .systemadmin-top .brand,
html[data-theme-effective="dark"] .jelppa-modern .top nav a,
html[data-theme-effective="dark"] .jelppa-modern .user a,
html[data-theme-effective="dark"] .jelppa-modern .logout-link,
html[data-theme-effective="dark"] .systemadmin-top .user .logout-link{color:#dbe5f4}
html[data-theme-effective="dark"] .jelppa-modern .user,
html[data-theme-effective="dark"] .jelppa-modern .user-identifier,
html[data-theme-effective="dark"] .jelppa-modern .org-pill,
html[data-theme-effective="dark"] .systemadmin-top .user>span{color:#c5d0df}
html[data-theme-effective="dark"] .jelppa-top-brand img,
html[data-theme-effective="dark"] .public-login-brand img{filter:brightness(0) invert(1)}
html[data-theme-effective="dark"] .systemadmin-top .role-switch select,
html[data-theme-effective="dark"] .role-switch select{background:#1a2230;color:#e9eef5;border-color:#3a4657}

html[data-theme-effective="dark"] .jelppa-modern .system-menu-toggle,
html[data-theme-effective="dark"] .system-menu-toggle{background:#171e28;color:#dbe5f4;border-color:#364253}

/* Sivupalkki */
html[data-theme-effective="dark"] .jelppa-modern .system-sidebar,
html[data-theme-effective="dark"] .system-sidebar,
html[data-theme-effective="dark"] .jelppa-modern .platform-shell .system-sidebar{background:#121923;border-right-color:#293442}
html[data-theme-effective="dark"] .jelppa-modern .system-sidebar-org,
html[data-theme-effective="dark"] .system-sidebar-org,
html[data-theme-effective="dark"] .jelppa-modern .platform-shell .system-sidebar-org,
html[data-theme-effective="dark"] .jelppa-modern .system-sidebar-footer{background:#121923;border-color:#293442}
html[data-theme-effective="dark"] .jelppa-modern .system-sidebar-org strong,
html[data-theme-effective="dark"] .system-sidebar-org--tenant strong{color:#e7edf5}
html[data-theme-effective="dark"] .jelppa-modern .system-sidebar-org small,
html[data-theme-effective="dark"] .jelppa-modern .system-nav-section{color:#7f8da0}
html[data-theme-effective="dark"] .jelppa-modern .system-nav-item,
html[data-theme-effective="dark"] .jelppa-modern .platform-shell .system-side-nav a{color:#aeb9c8}
html[data-theme-effective="dark"] .jelppa-modern .system-nav-icon{color:#7f8da0}
html[data-theme-effective="dark"] .jelppa-modern .system-nav-item:hover,
html[data-theme-effective="dark"] .system-logout-form .system-nav-item:hover{background:#1b2532;color:#f1f5f9}
html[data-theme-effective="dark"] .jelppa-modern .system-nav-item.active{background:color-mix(in srgb,var(--un-brand) 24%,#151d27);color:#eef4ff;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--un-brand) 48%,#1b2532)}
html[data-theme-effective="dark"] .system-nav-group{border-color:#26313e}
html[data-theme-effective="dark"] .jelppa-modern .system-nav-submenu,
html[data-theme-effective="dark"] .system-nav-submenu{background:#121923}
html[data-theme-effective="dark"] .jelppa-modern .system-nav-subitem{color:#96a5b7}
html[data-theme-effective="dark"] .jelppa-modern .system-nav-subitem:hover{background:#1b2532;color:#e7edf5}
html[data-theme-effective="dark"] .jelppa-modern .system-nav-subitem.active{background:#1b2a40;color:#dce8ff}
html[data-theme-effective="dark"] .system-sidebar-tenant-logo,
html[data-theme-effective="dark"] .jelppa-modern .system-sidebar-tenant-logo{background:#202a37;border-color:#344052}

/* Pääsisältö, kortit ja otsikot */
html[data-theme-effective="dark"] .jelppa-modern .system-main{background:var(--un-bg)}
html[data-theme-effective="dark"] .jelppa-modern .page-head{border-bottom-color:#293442}
html[data-theme-effective="dark"] .jelppa-modern .page-head h1,
html[data-theme-effective="dark"] .jelppa-modern .card h1,
html[data-theme-effective="dark"] .jelppa-modern .card h2,
html[data-theme-effective="dark"] .jelppa-modern .card h3,
html[data-theme-effective="dark"] .jelppa-modern .card h4,
html[data-theme-effective="dark"] .jelppa-modern .metric strong{color:#edf2f7}
html[data-theme-effective="dark"] .card,
html[data-theme-effective="dark"] .jelppa-modern .card,
html[data-theme-effective="dark"] .login-card,
html[data-theme-effective="dark"] .role-choice,
html[data-theme-effective="dark"] .platform-metric,
html[data-theme-effective="dark"] .platform-org-panel,
html[data-theme-effective="dark"] .platform-local-admin-list{background:#171e28;border-color:#2b3543;color:#edf2f7;box-shadow:0 4px 18px rgba(0,0,0,.16)}
html[data-theme-effective="dark"] .action,
html[data-theme-effective="dark"] .kb-card{color:#edf2f7}
html[data-theme-effective="dark"] .service-donut-card{background:linear-gradient(180deg,#171e28,#141b24);border-color:#2b3543}
html[data-theme-effective="dark"] .stats-donut-center{background:#171e28;box-shadow:0 0 0 1px #2b3543}
html[data-theme-effective="dark"] .stats-detail-item.cost,
html[data-theme-effective="dark"] .stats-summary-card{background:#171e28}
html[data-theme-effective="dark"] .stats-detail-card,
html[data-theme-effective="dark"] .stats-card-head,
html[data-theme-effective="dark"] .stats-chart-head,
html[data-theme-effective="dark"] .stats-footnote{border-color:#2b3543}

/* Lomakkeet ja painikkeet */
html[data-theme-effective="dark"] .field input,
html[data-theme-effective="dark"] .field textarea,
html[data-theme-effective="dark"] .field select,
html[data-theme-effective="dark"] .chat-input textarea,
html[data-theme-effective="dark"] .ai-clarification textarea,
html[data-theme-effective="dark"] .kb-search input,
html[data-theme-effective="dark"] .jelppa-modern .field input,
html[data-theme-effective="dark"] .jelppa-modern .field textarea,
html[data-theme-effective="dark"] .jelppa-modern .field select,
html[data-theme-effective="dark"] .jelppa-modern .chat-input textarea{background:#111823;color:#edf2f7;border-color:#394657;box-shadow:none}
html[data-theme-effective="dark"] input::placeholder,
html[data-theme-effective="dark"] textarea::placeholder{color:#748397}
html[data-theme-effective="dark"] .jelppa-modern .field>span,
html[data-theme-effective="dark"] .field>span{color:#cbd5e1}
html[data-theme-effective="dark"] .btn,
html[data-theme-effective="dark"] .jelppa-modern .btn,
html[data-theme-effective="dark"] .microsoft,
html[data-theme-effective="dark"] .jelppa-modern .queue-tabs a.btn{background:#1b2430;color:#dce5f1;border-color:#3a4657}
html[data-theme-effective="dark"] .btn:hover,
html[data-theme-effective="dark"] .jelppa-modern .btn:hover,
html[data-theme-effective="dark"] .jelppa-modern .queue-tabs a.btn:hover{background:#222d3a;border-color:#4b5a6d}
html[data-theme-effective="dark"] .btn.ghost{background:#1b2430}
html[data-theme-effective="dark"] .jelppa-modern .btn.primary,
html[data-theme-effective="dark"] .jelppa-modern .queue-tabs a.btn.primary{background:var(--un-brand);border-color:var(--un-brand);color:var(--primary-contrast,#fff)}
html[data-theme-effective="dark"] .jelppa-modern .btn.danger{background:#24191c;color:#ffaaa5;border-color:#6f3435}
html[data-theme-effective="dark"] .jelppa-modern .btn.danger:hover{background:#321d21}
html[data-theme-effective="dark"] .btn.ai-escalate{background:#251d17;border-color:#805333;color:#f2ad7d}

/* Taulukot ja listat */
html[data-theme-effective="dark"] .table-wrap,
html[data-theme-effective="dark"] .jelppa-modern .table-wrap{background:#171e28;border-color:#2b3543}
html[data-theme-effective="dark"] .jelppa-modern th,
html[data-theme-effective="dark"] th{background:#121923;color:#92a1b3;border-color:#2b3543}
html[data-theme-effective="dark"] .jelppa-modern td,
html[data-theme-effective="dark"] td{color:#dce5ef;border-color:#252f3c}
html[data-theme-effective="dark"] .jelppa-modern tbody tr:hover,
html[data-theme-effective="dark"] .platform-org-row:hover{background:#1b2430}
html[data-theme-effective="dark"] .bar-row{border-color:#2b3543}
html[data-theme-effective="dark"] .kb-suggestions-table .kb-suggestions-action,
html[data-theme-effective="dark"] .kb-suggestions-table thead .kb-suggestions-action{background:#171e28}

/* Keskustelu, tiketit ja muut sisältöelementit */
html[data-theme-effective="dark"] .bubble,
html[data-theme-effective="dark"] .jelppa-modern .bubble{background:#1b2430;border-color:#2f3a49}
html[data-theme-effective="dark"] .bubble.user,
html[data-theme-effective="dark"] .jelppa-modern .bubble.user{background:#172743;border-color:#29456e}
html[data-theme-effective="dark"] .bubble.assistant,
html[data-theme-effective="dark"] .jelppa-modern .bubble.assistant{background:#173127;border-color:#2f6b4f}
html[data-theme-effective="dark"] .ticket-message,
html[data-theme-effective="dark"] .jelppa-modern .ticket-message{background:#171e28;border-color:#2b3543}
html[data-theme-effective="dark"] .ticket-message.agent,
html[data-theme-effective="dark"] .jelppa-modern .ticket-message.agent,
html[data-theme-effective="dark"] .ticket-customer-response,
html[data-theme-effective="dark"] .jelppa-modern .ticket-customer-response{background:#162338;border-color:#29456e}
html[data-theme-effective="dark"] .ticket-message.requester,
html[data-theme-effective="dark"] .jelppa-modern .ticket-message.requester,
html[data-theme-effective="dark"] .ticket-requester-response,
html[data-theme-effective="dark"] .jelppa-modern .ticket-requester-response{background:#2a2016;border-color:#7a4a22}
html[data-theme-effective="dark"] .ticket-original-message,
html[data-theme-effective="dark"] .jelppa-modern .ticket-original-message{background:#2a2016;border-color:#7a4a22}
html[data-theme-effective="dark"] .ticket-message.internal,
html[data-theme-effective="dark"] .jelppa-modern .ticket-message.internal,
html[data-theme-effective="dark"] .ticket-customer-info-request,
html[data-theme-effective="dark"] .jelppa-modern .ticket-customer-info-request,
html[data-theme-effective="dark"] .ticket-handler-state.lost,
html[data-theme-effective="dark"] .ticket-live-transfer-alert{background:#2b2417;border-color:#6f5a2a;color:#f0d58d}
html[data-theme-effective="dark"] .ticket-handler-card,
html[data-theme-effective="dark"] .jelppa-modern .ticket-handler-card,
html[data-theme-effective="dark"] .jelppa-modern .ticket-grid .meta,
html[data-theme-effective="dark"] .ticket-handler-state{background:#141b24;border-color:#2b3543}
html[data-theme-effective="dark"] .summary,
html[data-theme-effective="dark"] .demo{background:#111823;color:#b8c4d3}
html[data-theme-effective="dark"] .sources{border-color:#2b3543}

/* Hints, valinnat ja asetuspaneelit */
html[data-theme-effective="dark"] .hint,
html[data-theme-effective="dark"] .jelppa-modern .hint{background:#182232;border-color:#2d4058;color:#b7c9e7}
html[data-theme-effective="dark"] .local-login-details,
html[data-theme-effective="dark"] .platform-toggle,
html[data-theme-effective="dark"] .preference-option,
html[data-theme-effective="dark"] .db-status-banner,
html[data-theme-effective="dark"] .db-scope-grid>div,
html[data-theme-effective="dark"] .db-copy-summary,
html[data-theme-effective="dark"] .db-action-panel,
html[data-theme-effective="dark"] .ticket-handler-state,
html[data-theme-effective="dark"] .db-fact-grid>div,
html[data-theme-effective="dark"] .db-password-panel,
html[data-theme-effective="dark"] .db-advanced-settings,
html[data-theme-effective="dark"] .db-recovery-status>div,
html[data-theme-effective="dark"] .private-config-files,
html[data-theme-effective="dark"] .system-value-list,
html[data-theme-effective="dark"] .system-settings-body .system-value-list,
html[data-theme-effective="dark"] .system-settings-body .system-value-row,
html[data-theme-effective="dark"] .org-settings-media-card,
html[data-theme-effective="dark"] .org-settings-toggle-list>.check{background:#141b24;border-color:#2b3543;color:#dce5ef}
html[data-theme-effective="dark"] .platform-toggle:hover,
html[data-theme-effective="dark"] .preference-option:hover{background:#1b2430;border-color:#40516a}
html[data-theme-effective="dark"] .ai-service-selection .preference-option>span{background:#141b24;border-color:#2b3543;color:#dce5ef}
html[data-theme-effective="dark"] .ai-service-selection .preference-option:hover>span{background:#241d18;border-color:#8a5a3b}
html[data-theme-effective="dark"] .ai-service-selection .preference-option input:checked+span{background:#8e4e28;border-color:#bd6d3d;color:#fff}
html[data-theme-effective="dark"] .ai-service-selection .preference-option input:checked+span::after{background:#171e28;color:#f0a06c}
html[data-theme-effective="dark"] .system-settings-row[open]>summary{background:#171e28}
html[data-theme-effective="dark"] .org-settings-savebar{background:#141b24}

/* Dialogit */
html[data-theme-effective="dark"] .jelppa-modal{background:#171e28;color:#edf2f7;border-color:#2b3543}
html[data-theme-effective="dark"] .jelppa-modal p{color:#dce5ef}
html[data-theme-effective="dark"] .ai-scope-dialog{background:#171e28;border-color:#2b3543;color:#edf2f7}
html[data-theme-effective="dark"] .ai-scope-dialog:after{background:#171e28;border-color:#2b3543}
html[data-theme-effective="dark"] .audit-clear-panel{background:#25191d;border-color:#65323b}

/* Julkinen kirjautuminen */
html[data-theme-effective="dark"] body.public-login-mode,
html[data-theme-effective="dark"] body.org-login-mode{background:#0f141c;color:#edf2f7}
html[data-theme-effective="dark"] body.public-login-mode .public-login-top,
html[data-theme-effective="dark"] body.public-login-mode .public-login-footer,
html[data-theme-effective="dark"] body.org-login-mode .public-login-top,
html[data-theme-effective="dark"] body.org-login-mode .public-login-footer{background:#121923;border-color:#2b3543;color:#9ca8b8}
html[data-theme-effective="dark"] body.platform-auth-mode{background:#0f141c!important;color:#edf2f7!important}
html[data-theme-effective="dark"] .platform-auth-mode .platform-login-card,
html[data-theme-effective="dark"] .platform-auth-mode .platform-bootstrap-setup{background:#171e28!important;border-color:#2b3543!important;color:#edf2f7!important;box-shadow:0 18px 55px rgba(0,0,0,.35)!important}
html[data-theme-effective="dark"] .platform-auth-mode .field input,
html[data-theme-effective="dark"] .platform-auth-mode .field textarea,
html[data-theme-effective="dark"] .platform-auth-mode .field select{background:#111823!important;color:#edf2f7!important;border-color:#394657!important}
html[data-theme-effective="dark"] .platform-auth-mode .muted{color:#9ca8b8!important}
html[data-theme-effective="dark"] .platform-auth-mode .btn{background:#1b2430!important;color:#dce5f1!important;border-color:#3a4657!important}
html[data-theme-effective="dark"] .platform-auth-mode .btn.primary{background:#3157d5!important;color:#fff!important;border-color:#3157d5!important}
html[data-theme-effective="dark"] .platform-auth-mode .hint{background:#182232!important;border-color:#2d4058!important;color:#b7c9e7!important}
html[data-theme-effective="dark"] .platform-auth-mode .platform-login-separator{background:#2b3543!important}

/* Logot ja esikatselut tarvitsevat vaalean alustan, jotta asiakkaan oma logo ei katoa. */
html[data-theme-effective="dark"] .organization-logo-preview{background:#fff;border-color:#4a5565}

/* Semanttiset tilat säilytetään selkeinä myös tummassa tilassa. */
html[data-theme-effective="dark"] .jelppa-modern .state-neutral{background:#273142!important;color:#dce5ef!important;border-color:#3b485b!important}
html[data-theme-effective="dark"] .jelppa-modern .badge{background:#273142;color:#c7d2df}
html[data-theme-effective="dark"] .jelppa-modern .badge.ai,
html[data-theme-effective="dark"] .jelppa-modern .status-in_progress{background:#1a3156;color:#9fc0ff}
html[data-theme-effective="dark"] .queue-count,
html[data-theme-effective="dark"] .jelppa-modern .queue-count{background:#273142;color:#dce5ef}

/* FJ/FK: AI-ratkaisun tarkennuskenttä dark modessa. */
html[data-theme-effective="dark"] .jelppa-modern .ai-outcome-form .ai-clarification textarea.ai-clarification-textarea,
html[data-theme-effective="dark"] .ai-outcome-form .ai-clarification textarea.ai-clarification-textarea{
  background:#111823!important;
  color:#edf2f7!important;
  border-color:#394657!important;
  box-shadow:none!important;
  color-scheme:dark;
}
html[data-theme-effective="dark"] .jelppa-modern .ai-outcome-form .ai-clarification textarea.ai-clarification-textarea:focus,
html[data-theme-effective="dark"] .ai-outcome-form .ai-clarification textarea.ai-clarification-textarea:focus{
  border-color:var(--un-brand,var(--primary))!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--un-brand,var(--primary)) 18%,transparent)!important;
}

/* 1.0-FU: Uusi palvelupyyntö – tumma teema uudelle vaiheistetulle näkymälle. */
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-page-head p{color:#9eacbd}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form{background:#111821;border-color:#293442;box-shadow:0 12px 30px rgba(0,0,0,.2)}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-section-title,
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form .ai-service-selection legend{color:#edf2f7}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-step{background:color-mix(in srgb,var(--primary) 24%,#171e28);color:#f0a06c}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form .ai-service-selection .service-choice-card{background:#141b24;border-color:#334052;color:#e6edf5}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form .ai-service-selection .preference-option:hover .service-choice-card{background:#19222e;border-color:#53647b}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form .ai-service-selection input:checked+.service-choice-card{background:color-mix(in srgb,var(--primary) 18%,#171e28);border-color:var(--primary);box-shadow:0 0 0 1px color-mix(in srgb,var(--primary) 25%,transparent)}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form .ai-service-selection .service-choice-card::after{background:#141b24;border-color:#75849a}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form .ai-service-selection input:checked+.service-choice-card::after{background:var(--primary);border-color:#171e28;box-shadow:0 0 0 1.5px var(--primary)}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form .service-choice-copy strong{color:#edf2f7}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form .service-choice-copy small{color:#aab7c7}
html[data-theme-effective="dark"] .jelppa-modern .service-choice-icon{background:#1b2b40;color:#71a8ef}
html[data-theme-effective="dark"] .jelppa-modern .service-choice-property .service-choice-icon{background:#173128;color:#50c58a}
html[data-theme-effective="dark"] .jelppa-modern .service-choice-hr .service-choice-icon{background:#28233b;color:#a08dea}
html[data-theme-effective="dark"] .jelppa-modern .service-choice-facility .service-choice-icon{background:#37212a;color:#ed7d9d}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-service-note{background:#142235;border-color:#29466b;color:#dbe7f5}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-service-note small{color:#aab7c7}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form .new-ticket-problem-field textarea{background:#0f1620;border-color:#334052;color:#edf2f7}
html[data-theme-effective="dark"] .jelppa-modern .voice-record-button{background:#141b24;border-color:#334052;color:#e6edf5}
html[data-theme-effective="dark"] .jelppa-modern .voice-status{border-color:#334052}
html[data-theme-effective="dark"] .jelppa-modern .ticket-image-dropzone{background:#101923;border-color:#40516a;color:#dce5ef}
html[data-theme-effective="dark"] .jelppa-modern .ticket-image-dropzone:hover,
html[data-theme-effective="dark"] .jelppa-modern .ticket-image-dropzone.is-dragover{background:#172334;border-color:var(--primary)}
html[data-theme-effective="dark"] .jelppa-modern .ticket-image-dropzone>strong{color:#e6edf5}
html[data-theme-effective="dark"] .jelppa-modern .ticket-image-dropzone>small{color:#9eacbd}
html[data-theme-effective="dark"] .jelppa-modern .ticket-image-select-faux{background:#171e28;border-color:#40516a;color:#dce5ef}
html[data-theme-effective="dark"] .jelppa-modern .new-ticket-form .request-progress-hint{background:#251d17;border-color:#5b4530;color:#d9c9b7}
html[data-theme-effective="dark"] .jelppa-modern .request-actions{border-color:#293442}
html[data-theme-effective="dark"] .jelppa-modern .request-actions .request-direct-button{background:#202a36;border-color:#293442;color:#dce5ef}
html[data-theme-effective="dark"] .jelppa-modern .request-actions .request-direct-button:hover{background:#273341}

html[data-theme-effective="dark"] .jelppa-modern .requester-year-filter label{color:#b8c4d3}
html[data-theme-effective="dark"] .jelppa-modern .requester-year-filter select{background:#141b24;border-color:#354153;color:#e7edf5}

/* 1.0-AO: Palvelu- ja asetussivujen valintarivit dark modessa. */
html[data-theme-effective="dark"] .check.important,
html[data-theme-effective="dark"] .jelppa-modern .check.important{
  background:#141b24;
  color:#dce5ef;
  border:1px solid #2b3543;
}
html[data-theme-effective="dark"] .check,
html[data-theme-effective="dark"] .jelppa-modern .check{color:#dce5ef}
html[data-theme-effective="dark"] .check input[type="checkbox"],
html[data-theme-effective="dark"] .jelppa-modern .check input[type="checkbox"]{accent-color:var(--un-brand,var(--primary,#3157d5))}

/* Desktop sidebar collapse control */
html[data-theme-effective="dark"] .jelppa-modern .system-sidebar-collapse{
  background:#171e28;color:#aeb9c8;border-color:#364253
}
html[data-theme-effective="dark"] .jelppa-modern .system-sidebar-collapse:hover{
  background:#1b2532;color:#f1f5f9;border-color:#465468
}

/* 1.0-UIH: yhtenäinen sivuotsikko tummassa teemassa. */
html[data-theme-effective="dark"] .jelppa-modern .page-head{
  background:color-mix(in srgb,#171e28 96%,var(--primary,#3157d5) 4%);
  border-color:#2b3543;
  box-shadow:0 2px 10px rgba(0,0,0,.14);
}
html[data-theme-effective="dark"] .jelppa-modern .page-head h1{color:#edf2f7}
html[data-theme-effective="dark"] .jelppa-modern .page-head .eyebrow,
html[data-theme-effective="dark"] .jelppa-modern .page-head p{color:#9eacbd}

/* 1.0-UIC: Kevyempi kortti-ilme myös tummassa tilassa. */
html[data-theme-effective="dark"] .jelppa-modern .card,
html[data-theme-effective="dark"] .jelppa-modern .platform-metric,
html[data-theme-effective="dark"] .jelppa-modern .platform-org-panel,
html[data-theme-effective="dark"] .jelppa-modern .platform-local-admin-list{
  background:#171e28;
  border-color:#2a3441;
  box-shadow:0 1px 2px rgba(0,0,0,.12);
}
html[data-theme-effective="dark"] .jelppa-modern .action:hover{
  background:#1a2330;
  border-color:#3a4657;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
}
html[data-theme-effective="dark"] .jelppa-modern .service-donut-card{
  background:#171e28;
  border-color:#2a3441;
  box-shadow:none;
}
html[data-theme-effective="dark"] .jelppa-modern .stats-donut{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.05),0 2px 8px rgba(0,0,0,.12);
}

/* 1.0-UIS: Yhtenäinen palvelupyyntöjen statusjärjestelmä. */
.jelppa-modern .badge.status-open,
.jelppa-modern .badge.status-in_progress,
.jelppa-modern .badge.status-waiting,
.jelppa-modern .badge.status-resolved,
.jelppa-modern .badge.status-closed{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:22px;
  padding:3px 9px;
  margin-left:0;
  border:1px solid transparent;
  border-radius:999px;
  font-size:10.5px;
  line-height:1.2;
  font-weight:750;
  letter-spacing:.01em;
  white-space:nowrap;
  vertical-align:middle;
  box-shadow:none;
}
.jelppa-modern .badge.status-open::before,
.jelppa-modern .badge.status-in_progress::before,
.jelppa-modern .badge.status-waiting::before,
.jelppa-modern .badge.status-resolved::before,
.jelppa-modern .badge.status-closed::before{
  content:"";
  width:6px;
  height:6px;
  flex:0 0 6px;
  border-radius:50%;
  background:currentColor;
  opacity:.88;
}

/* Avoin: neutraali siniharmaa – odottaa käsittelyn alkamista. */
.jelppa-modern .badge.status-open{
  background:#f2f4f7;
  border-color:#e4e7ec;
  color:#475467;
}
/* Käsittelyssä: sininen – aktiivinen työ. */
.jelppa-modern .badge.status-in_progress{
  background:#eff8ff;
  border-color:#b2ddff;
  color:#175cd3;
}
/* Odottaa käyttäjää: keltainen/oranssi – käyttäjältä tarvitaan toimintaa. */
.jelppa-modern .badge.status-waiting{
  background:#fffaeb;
  border-color:#fedf89;
  color:#b54708;
}
/* Ratkaistu: vihreä – ratkaisu on saavutettu. */
.jelppa-modern .badge.status-resolved{
  background:#ecfdf3;
  border-color:#abefc6;
  color:#067647;
}
/* Suljettu: hillitty harmaa – prosessi on päättynyt. */
.jelppa-modern .badge.status-closed{
  background:#f5f5f6;
  border-color:#e4e4e7;
  color:#52525b;
}

/* Otsikkoalueessa status ei peri leipätekstin himmennystä. */
.jelppa-modern .page-head p .badge.status-open,
.jelppa-modern .page-head p .badge.status-in_progress,
.jelppa-modern .page-head p .badge.status-waiting,
.jelppa-modern .page-head p .badge.status-resolved,
.jelppa-modern .page-head p .badge.status-closed{
  position:relative;
  top:-1px;
}

/* Tumma teema: samat semanttiset värit ilman liian kirkkaita pintoja. */
html[data-theme-effective="dark"] .jelppa-modern .badge.status-open{
  background:#252d38;
  border-color:#394454;
  color:#c3cedb;
}
html[data-theme-effective="dark"] .jelppa-modern .badge.status-in_progress{
  background:#162d4d;
  border-color:#285486;
  color:#9ec5ff;
}
html[data-theme-effective="dark"] .jelppa-modern .badge.status-waiting{
  background:#362a15;
  border-color:#624a1f;
  color:#f4c96b;
}
html[data-theme-effective="dark"] .jelppa-modern .badge.status-resolved{
  background:#153328;
  border-color:#245842;
  color:#73d6a5;
}
html[data-theme-effective="dark"] .jelppa-modern .badge.status-closed{
  background:#25282e;
  border-color:#3a3e46;
  color:#b9bec8;
}

/* 1.0-UIT: taulukot tummassa teemassa. */
html[data-theme-effective="dark"] .jelppa-modern .table-wrap{
  border-color:#2a3441;
  background:#171e28;
}
html[data-theme-effective="dark"] .jelppa-modern .table-wrap>table>thead>tr>th{
  background:#141b25;
  border-bottom-color:#303b49;
  color:#9aa8ba;
}
html[data-theme-effective="dark"] .jelppa-modern .table-wrap>table>tbody>tr>td{
  border-bottom-color:#252f3c;
}
html[data-theme-effective="dark"] .jelppa-modern .table-wrap>table>tbody>tr:hover,
html[data-theme-effective="dark"] .jelppa-modern .table-wrap>table>tbody>tr:focus-within{
  background:#1a2431;
}
html[data-theme-effective="dark"] .jelppa-modern .table-wrap td>a:not(.btn){
  color:#dce5ef;
}
html[data-theme-effective="dark"] .jelppa-modern .table-wrap td>a:not(.btn):hover,
html[data-theme-effective="dark"] .jelppa-modern .table-wrap td>a:not(.btn):focus-visible,
html[data-theme-effective="dark"] .jelppa-modern .tickets-table td:first-child>a{
  color:#9ec5ff;
}
html[data-theme-effective="dark"] .jelppa-modern .tickets-table td:nth-child(2)>a{
  color:#e5edf6;
}
html[data-theme-effective="dark"] .jelppa-modern .tickets-table.staff td:nth-child(7),
html[data-theme-effective="dark"] .jelppa-modern .tickets-table.requester td:nth-child(5){
  color:#9aa8ba;
}
html[data-theme-effective="dark"] .jelppa-modern .tickets-table th[aria-sort="ascending"],
html[data-theme-effective="dark"] .jelppa-modern .tickets-table th[aria-sort="descending"]{
  background:#19283b;
}
html[data-theme-effective="dark"] .jelppa-modern .table-wrap .empty{
  color:#92a1b3;
}

/* Tikettityötilan tumma tila */
html[data-theme-effective="dark"] .jelppa-modern .ticket-workspace-bar,
html[data-theme-effective="dark"] .jelppa-modern .ticket-workspace-meta{
  background:#141b24;
  border-color:#2b3543;
}
html[data-theme-effective="dark"] .jelppa-modern .ticket-workspace-meta-head,
html[data-theme-effective="dark"] .jelppa-modern .ticket-workspace-meta dl>div{
  border-color:#2b3543;
}
