:root[data-theme="light"]{
  --bg:#edf2fb;
  --panel:#f5f1e8;
  --card:#fffdf8;
  --graph-bg:#f3f7ff;
  --surface-soft:#fff8ef;
  --surface-strong:#eef4ff;
  --surface-elevated:#fffdf9;
  --muted:#6c728f;
  --text:#162033;
  --line:#d7ddec;
  --accent:#246bff;
  --accent2:#ff8b3d;
  --focus-ring:rgba(36,107,255,.16);
  --danger:#cc5a5a;
}

:root[data-theme="light"] body{
  background:
    radial-gradient(1200px 600px at 85% 0%, rgba(36,107,255,.14), transparent 58%),
    radial-gradient(900px 520px at 0% 30%, rgba(255,139,61,.13), transparent 60%),
    radial-gradient(700px 420px at 30% 100%, rgba(24,166,145,.10), transparent 65%),
    var(--bg);
  color:var(--text);
}

:root[data-theme="light"] .logo{
  background:
    radial-gradient(circle at 30% 30%, rgba(36,107,255,.42), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(255,139,61,.30), transparent 55%),
    #fff6eb;
  border-color:#d8d4e9;
  color:#183155;
}

:root[data-theme="light"] #sidebar{
  background:linear-gradient(180deg, rgba(255,249,240,.90), rgba(244,248,255,.86));
  backdrop-filter:blur(14px);
  scrollbar-color:rgba(108,114,143,.20) transparent;
}

:root[data-theme="light"] .sidebar-scroll-indicator{
  background:linear-gradient(180deg, rgba(255,248,239,.94), rgba(255,248,239,.12));
  color:#6c728f;
}

:root[data-theme="light"] .sidebar-scroll-down{
  background:linear-gradient(0deg, rgba(255,248,239,.94), rgba(255,248,239,.12));
}

:root[data-theme="light"] .sidebar-scroll-indicator:hover{
  color:var(--text);
}

:root[data-theme="light"] body,
:root[data-theme="light"] #sidebar,
:root[data-theme="light"] #view,
:root[data-theme="light"] .list,
:root[data-theme="light"] .out,
:root[data-theme="light"] #debug-drawer,
:root[data-theme="light"] .eventList,
:root[data-theme="light"] .edgeInspector,
:root[data-theme="light"] textarea{
  scrollbar-color:rgba(108,114,143,.20) transparent;
}

:root[data-theme="light"] .table{
  background:linear-gradient(180deg, rgba(255,251,244,.98), rgba(245,248,255,.98));
  border-color:#d8deea;
}

:root[data-theme="light"] .table thead th{
  background:rgba(22,32,51,.03);
  color:#6c728f;
}

:root[data-theme="light"] .table th,
:root[data-theme="light"] .table td{
  border-bottom-color:rgba(108,114,143,.14);
  color:var(--text);
}

:root[data-theme="light"] .table tbody tr:hover{
  background:linear-gradient(90deg, rgba(36,107,255,.05), rgba(255,139,61,.07));
}

:root[data-theme="light"] body::-webkit-scrollbar-thumb,
:root[data-theme="light"] #sidebar::-webkit-scrollbar-thumb,
:root[data-theme="light"] #view::-webkit-scrollbar-thumb,
:root[data-theme="light"] .list::-webkit-scrollbar-thumb,
:root[data-theme="light"] .out::-webkit-scrollbar-thumb,
:root[data-theme="light"] #debug-drawer::-webkit-scrollbar-thumb,
:root[data-theme="light"] .eventList::-webkit-scrollbar-thumb,
:root[data-theme="light"] .edgeInspector::-webkit-scrollbar-thumb,
:root[data-theme="light"] textarea::-webkit-scrollbar-thumb{
  background:rgba(108,114,143,.18);
  background-clip:padding-box;
}

:root[data-theme="light"] body::-webkit-scrollbar-thumb:hover,
:root[data-theme="light"] #sidebar::-webkit-scrollbar-thumb:hover,
:root[data-theme="light"] #view::-webkit-scrollbar-thumb:hover,
:root[data-theme="light"] .list::-webkit-scrollbar-thumb:hover,
:root[data-theme="light"] .out::-webkit-scrollbar-thumb:hover,
:root[data-theme="light"] #debug-drawer::-webkit-scrollbar-thumb:hover,
:root[data-theme="light"] .eventList::-webkit-scrollbar-thumb:hover,
:root[data-theme="light"] .edgeInspector::-webkit-scrollbar-thumb:hover,
:root[data-theme="light"] textarea::-webkit-scrollbar-thumb:hover{
  background:rgba(108,114,143,.26);
  background-clip:padding-box;
}

:root[data-theme="light"] #sidebar a:hover{
  background:linear-gradient(90deg, rgba(36,107,255,.09), rgba(255,139,61,.10));
}

:root[data-theme="light"] #sidebar a.is-active{
  background:linear-gradient(90deg, rgba(36,107,255,.14), rgba(255,139,61,.12));
  border-color:rgba(36,107,255,.18);
}

:root[data-theme="light"] #topbar,
:root[data-theme="light"] .eventsToolbar{
  background:linear-gradient(180deg, rgba(255,250,242,.86), rgba(245,248,255,.80));
}

:root[data-theme="light"] .card{
  background:
    linear-gradient(180deg, rgba(255,253,247,.98), rgba(246,249,255,.96)),
    linear-gradient(135deg, rgba(36,107,255,.04), rgba(255,139,61,.05));
  border-color:#d7deed;
  box-shadow:0 16px 40px rgba(31,43,71,.10), inset 0 1px 0 rgba(255,255,255,.65);
}

:root[data-theme="light"] .nx-modal-backdrop{
  background:rgba(236, 241, 249, .70);
}

:root[data-theme="light"] .nx-modal{
  background:
    linear-gradient(180deg, rgba(255,253,247,.99), rgba(246,249,255,.97)),
    linear-gradient(135deg, rgba(36,107,255,.04), rgba(255,139,61,.05));
  border-color:#d7deed;
  box-shadow:0 20px 44px rgba(31,43,71,.16), inset 0 1px 0 rgba(255,255,255,.72);
}

:root[data-theme="light"] input,
:root[data-theme="light"] textarea,
:root[data-theme="light"] select{
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,255,.96));
  border-color:#cad5e6;
  color:var(--text);
}

:root[data-theme="light"] .gui-multi-select-summary,
:root[data-theme="light"] .gui-multi-select-options{
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,255,.96));
  border-color:#cad5e6;
  color:var(--text);
}

:root[data-theme="light"] .gui-multi-select-caret{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' fill='none' stroke='%236c728f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder{
  color:#8391a6;
}

:root[data-theme="light"] select option{
  background:#ffffff;
  color:var(--text);
}

:root[data-theme="light"] button,
:root[data-theme="light"] .debugLink,
:root[data-theme="light"] .user-menu-link,
:root[data-theme="light"] .topbar-icon-button,
:root[data-theme="light"] input[type="file"]::file-selector-button,
:root[data-theme="light"] input[type="file"]::-webkit-file-upload-button{
  background:linear-gradient(180deg, #fff8ef, #edf3ff);
  border-color:#c7d3e6;
  color:var(--text);
}

:root[data-theme="light"] .mm-kind-count{
  background:rgba(22,32,51,.08);
}

:root[data-theme="light"] .mm-kind-filter-btn.mm-kind-entity_def{
  border-color:rgba(24,166,145,.28);
  background:linear-gradient(180deg, rgba(228,251,246,.98), rgba(239,252,248,.98));
  color:#14554c;
}

:root[data-theme="light"] .mm-kind-filter-btn.mm-kind-relation_def{
  border-color:rgba(230,160,38,.30);
  background:linear-gradient(180deg, rgba(255,247,222,.98), rgba(255,250,237,.98));
  color:#815511;
}

:root[data-theme="light"] .mm-kind-filter-btn.mm-kind-process_def{
  border-color:rgba(36,107,255,.28);
  background:linear-gradient(180deg, rgba(231,240,255,.98), rgba(240,246,255,.98));
  color:#214f9f;
}

:root[data-theme="light"] .mm-kind-filter-btn.mm-kind-action_def{
  border-color:rgba(214,84,134,.28);
  background:linear-gradient(180deg, rgba(255,234,242,.98), rgba(255,242,247,.98));
  color:#9c315f;
}

:root[data-theme="light"] .mm-kind-filter-btn.mm-kind-gui_template{
  border-color:rgba(126,92,214,.28);
  background:linear-gradient(180deg, rgba(241,235,255,.98), rgba(247,243,255,.98));
  color:#6847af;
}

:root[data-theme="light"] .mm-kind-filter-btn.mm-kind-presentation_def{
  border-color:rgba(126,92,214,.28);
  background:linear-gradient(180deg, rgba(241,235,255,.98), rgba(247,243,255,.98));
  color:#6847af;
}

:root[data-theme="light"] .mm-kind-filter-btn.mm-kind-capability_def{
  border-color:rgba(138,108,64,.28);
  background:linear-gradient(180deg, rgba(252,246,230,.98), rgba(255,250,239,.98));
  color:#7a5d26;
}

:root[data-theme="light"] .mm-kind-all{
  border-color:#c7d3e6;
  background:linear-gradient(180deg, #fff8ef, #edf3ff);
  color:var(--text);
}

:root[data-theme="light"] .out.mm-def-card.mm-kind-entity_def{
  border-color:rgba(24,166,145,.78);
}

:root[data-theme="light"] .out.mm-def-card.mm-kind-relation_def{
  border-color:rgba(230,160,38,.78);
}

:root[data-theme="light"] .out.mm-def-card.mm-kind-process_def{
  border-color:rgba(36,107,255,.78);
}

:root[data-theme="light"] .out.mm-def-card.mm-kind-action_def{
  border-color:rgba(214,84,134,.8);
}

:root[data-theme="light"] .out.mm-def-card.mm-kind-gui_template{
  border-color:rgba(126,92,214,.8);
}

:root[data-theme="light"] .out.mm-def-card.mm-kind-presentation_def{
  border-color:rgba(126,92,214,.8);
}

:root[data-theme="light"] .out.mm-def-card.mm-kind-capability_def{
  border-color:rgba(138,108,64,.8);
}

:root[data-theme="light"] .mm-graph-panel{
  background:rgba(244,248,255,.98);
  border-color:#d8deea;
  box-shadow:0 18px 40px rgba(31,43,71,.16);
}

:root[data-theme="light"] .out.mm-def-card.is-selected{
  background:linear-gradient(180deg, rgba(242,246,255,.98), rgba(237,243,255,.98));
}

:root[data-theme="light"] .out.mm-def-card.is-active{
  background:linear-gradient(180deg, rgba(236,242,255,.98), rgba(231,238,255,.98));
}

:root[data-theme="light"] .graphWrap{
  background:linear-gradient(180deg, rgba(243,248,255,.98), rgba(238,244,255,.98));
}

:root[data-theme="light"] button:hover,
:root[data-theme="light"] .debugLink:hover,
:root[data-theme="light"] .user-menu-link:hover,
:root[data-theme="light"] .topbar-icon-button:hover,
:root[data-theme="light"] input[type="file"]::file-selector-button:hover,
:root[data-theme="light"] input[type="file"]::-webkit-file-upload-button:hover{
  border-color:#8fa8d2;
  background:linear-gradient(180deg, #fff3e4, #e7efff);
}

:root[data-theme="light"] .out,
:root[data-theme="light"] .list,
:root[data-theme="light"] #debug-drawer,
:root[data-theme="light"] .eventList,
:root[data-theme="light"] .edgeInspector,
:root[data-theme="light"] .graphWrap,
:root[data-theme="light"] .filters,
:root[data-theme="light"] .toolCard{
  background:linear-gradient(180deg, rgba(255,251,244,.96), rgba(245,248,255,.96));
  border-color:#d8deea;
  color:var(--text);
}

:root[data-theme="light"] .toggle,
:root[data-theme="light"] .pill{
  background:linear-gradient(180deg, #fff8ef, #edf4ff);
  border-color:#c9d4e8;
  color:#4d5d76;
}

:root[data-theme="light"] .pill .t,
:root[data-theme="light"] .toolTitle,
:root[data-theme="light"] .eiTitle,
:root[data-theme="light"] #edgeInspectorBody,
:root[data-theme="light"] .event .type{
  color:var(--text);
}

:root[data-theme="light"] .item:hover,
:root[data-theme="light"] .toolCard:hover,
:root[data-theme="light"] .event:hover{
  background:linear-gradient(90deg, rgba(36,107,255,.05), rgba(255,139,61,.08));
  border-color:#97add1;
}

:root[data-theme="light"] .user-menu{
  background:linear-gradient(180deg, rgba(255,251,244,.99), rgba(244,248,255,.98));
  border-color:#d8deea;
  box-shadow:0 18px 40px rgba(31,43,71,.16);
}

:root[data-theme="light"] .user-menu-info{
  border-bottom-color:rgba(22,32,51,.08);
}

:root[data-theme="light"] .badge{
  background:rgba(22,32,51,.04);
  border-color:rgba(22,32,51,.10);
}

:root[data-theme="light"] .badge-online{
  background:rgba(0, 170, 110, 0.10);
  border-color:rgba(0, 170, 110, 0.22);
}

:root[data-theme="light"] .badge-degraded{
  background:rgba(255, 166, 0, 0.12);
  border-color:rgba(255, 166, 0, 0.24);
}

:root[data-theme="light"] .badge-offline{
  background:rgba(225, 80, 80, 0.10);
  border-color:rgba(225, 80, 80, 0.20);
}

:root[data-theme="light"] .kanCol{
  background:linear-gradient(180deg, rgba(255,251,244,.92), rgba(245,248,255,.88));
}

:root[data-theme="light"] .kanCard{
  background:linear-gradient(180deg, #fff9f0, #f1f6ff);
}

:root[data-theme="light"] .kanCard:hover{
  background:linear-gradient(180deg, #fff2e0, #e8f1ff);
}

:root[data-theme="light"] .kanDropMarker{
  border-color:#4c86d6;
}

:root[data-theme="light"] select{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' fill='none' stroke='%236c728f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position:calc(100% - 14px) 50% !important;
  background-size:18px 18px !important;
  background-repeat:no-repeat !important;
}
