/* theme 20261010 - "Modern" theme layer for eTravel CRM setup (XAF-like shell).
   Loaded ONLY when <html class="kh-modern"> (users.ui_theme / System > Sys Settings default); media="screen" so prints,
   ReportViewer documents and A4 outputs are never affected. Classic = this file not loaded. No layout / ID changes. */
html.kh-modern{
  --k-ink:#0f2e25;--k-g:#0f3d2e;--k-g2:#14513f;--k-pri:#146c54;--k-pri-d:#0f5743;--k-gold:#c8a44d;--k-gold-l:#ead08a;
  --k-bg:#f3f5f4;--k-card:#fff;--k-line:#e2e8e5;--k-line2:#d3dcd8;--k-muted:#5f6f69;--k-hover:#eef5f1;--k-sel:#e1efe8;
  --k-r:8px;--k-r-s:6px;--k-sh:0 1px 2px rgba(15,46,37,.06),0 4px 14px rgba(15,46,37,.06);
  --k-font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  --k-focus:0 0 0 3px rgba(20,108,84,.18)}
html.kh-modern body,html.kh-modern body table,html.kh-modern body input,html.kh-modern body button,html.kh-modern body textarea,html.kh-modern body select{font-family:var(--k-font);font-size:12px}
html.kh-modern body{background:var(--k-bg);color:#1f2a27}
html.kh-modern a{color:var(--k-pri)}
html.kh-modern #xafPage,html.kh-modern .BodyBackColor{background:var(--k-bg)}

/* ---------- top bar ---------- */
html.kh-modern .VerticalTemplateHeader{background:linear-gradient(110deg,#062319 0%,var(--k-g) 45%,var(--k-g2) 100%);border:0;border-bottom:3px solid var(--k-gold);box-shadow:0 2px 10px rgba(6,35,25,.18);position:relative;z-index:20}
html.kh-modern table.Top td.Security{padding-top:10px}
html.kh-modern .menuLinks .dxm-item a.dxm-content{border-radius:var(--k-r-s);padding:5px 8px;transition:background-color .12s}
html.kh-modern #Vertical_SAC_Menu .dxm-item a.dxm-content:hover{background:rgba(255,255,255,.1)}
html.kh-modern #Vertical_SAC_Menu .dxm-contentText,html.kh-modern #Vertical_SAC_Menu .dxm-disabled .dxm-contentText{color:#f2efe4;text-decoration:none}
html.kh-modern #Vertical_SAC_Menu .dxm-separator b{background:rgba(200,164,77,.35)}
html.kh-modern #Vertical_SAC_Menu .dxm-image{filter:brightness(0) invert(1);opacity:.85}
html.kh-modern #Vertical_SAC_Menu .khThemeSwitch a.dxm-content{border:1px solid rgba(200,164,77,.6);background:rgba(200,164,77,.12)}
html.kh-modern #Vertical_SAC_Menu .khThemeSwitch .dxm-contentText{color:var(--k-gold-l);font-weight:600}
html.kh-modern table.ACPanel{background:#fff;border-top:0;border-bottom:1px solid var(--k-line)}
html.kh-modern .TabsContainer .dxm-separator b{background:var(--k-line)}
html.kh-modern .TabsContainer .dxm-item a.dxm-content{border-radius:var(--k-r-s)}
html.kh-modern .TabsContainer .dxm-item a.dxm-content:hover{background:var(--k-hover)}
html.kh-modern .TabsContainer .dxm-contentText{color:var(--k-ink);text-decoration:none}
html.kh-modern .xafSearchBox{border:1px solid var(--k-line2);border-radius:var(--k-r-s);padding:4px 10px;height:24px;background:#fff;outline:0}
html.kh-modern .xafSearchBox:focus{border-color:var(--k-pri);box-shadow:var(--k-focus)}

/* ---------- left navigation ---------- */
html.kh-modern #LPcell,html.kh-modern .LeftPane{background:#fff}
html.kh-modern #LPcell{border-right:1px solid var(--k-line)}
html.kh-modern .LeftPane{padding:8px 6px}
html.kh-modern #separatorCell{background:var(--k-bg);border:0}
html.kh-modern .TreeViewNavControl .dxtv-nd{border-radius:var(--k-r-s);border:1px solid transparent;transition:background-color .12s}
html.kh-modern .TreeViewNavControl .dxtv-nd:hover{background:var(--k-hover);border-color:transparent}
html.kh-modern .TreeViewNavControl .dxtv-nd.dxtv-ndSel,html.kh-modern .TreeViewNavControl .dxtv-nd.dxtv-ndSel:hover{background:var(--k-sel);border-color:transparent;box-shadow:inset 3px 0 0 var(--k-gold)}
html.kh-modern .TreeViewNavControl .dxtv-ndSel .dxtv-ndTxt{color:var(--k-g);font-weight:600}
html.kh-modern .TreeViewNavControl .dxtv-ndTxt{color:#26332f}
html.kh-modern .TreeViewNavControl li::after{display:none}

/* ---------- toolbar + view header ---------- */
html.kh-modern #mainCell{background:var(--k-bg)}
html.kh-modern .MainToolbar{background:#fff;border-bottom:1px solid var(--k-line);box-shadow:0 1px 2px rgba(15,46,37,.04)}
html.kh-modern .dxmtb .dxm-item a.dxm-content{border-radius:var(--k-r-s)}
html.kh-modern .dxmtb .dxm-item:not(.dxm-disabled):hover{background:var(--k-hover);border-radius:var(--k-r-s);border-color:transparent}
html.kh-modern .dxmtb .dxm-item:not(.dxm-disabled):hover a.dxm-content{background:transparent;border-color:transparent}
html.kh-modern .dxmtb .dxm-contentText{color:#1f2a27}
html.kh-modern .dxmtb .dxm-separator b{background:var(--k-line)}
html.kh-modern table.MainContent tr.Content td.Content{padding-left:18px;padding-right:18px}
html.kh-modern table.ViewHeader h1{color:var(--k-ink);font-weight:600;font-size:19px;letter-spacing:-.2px}
html.kh-modern .NavigationHistoryLinks a{color:var(--k-muted);text-decoration:none}
html.kh-modern .NavigationHistoryLinks a:hover{color:var(--k-pri);text-decoration:underline}
html.kh-modern .NavigationHistoryLinks a.Current{color:var(--k-pri)}

/* ---------- list grids (DevExtreme) ---------- */
html.kh-modern .xafGrid.dx-datagrid,html.kh-modern .xafGrid .dx-datagrid{font-family:var(--k-font);font-size:12px;color:#1f2a27}
html.kh-modern .xafGrid .dx-datagrid{background:#fff;border:1px solid var(--k-line);border-radius:var(--k-r);box-shadow:var(--k-sh)}
html.kh-modern .xafGrid .dx-datagrid-header-panel{background:#fff;border-radius:var(--k-r) var(--k-r) 0 0;padding:8px 10px 6px}
html.kh-modern .xafGrid .dx-searchbox.dx-editor-outlined{border:1px solid var(--k-line2);border-radius:var(--k-r-s);background:#fff}
html.kh-modern .xafGrid .dx-searchbox.dx-state-focused{border-color:var(--k-pri);box-shadow:var(--k-focus)}
html.kh-modern .xafGrid .dx-datagrid-headers{position:sticky;top:0;z-index:6;background:#f6f8f7;border-bottom:2px solid var(--k-line2)}
html.kh-modern .xafGrid .dx-datagrid-headers .dx-datagrid-table .dx-row>td,html.kh-modern .xafGrid .dx-datagrid-headers .dx-header-row>td{background:#f6f8f7;color:#3c4b46;font-weight:600;border-color:var(--k-line)}
html.kh-modern .xafGrid .dx-datagrid-content .dx-datagrid-table .dx-row>td,html.kh-modern .xafGrid .dx-datagrid .dx-row-lines>td{border-color:#edf1ef}
html.kh-modern .xafGrid .dx-datagrid-rowsview .dx-data-row>td{padding-top:6px;padding-bottom:6px}
html.kh-modern .xafGrid .dx-datagrid-rowsview .dx-data-row:nth-child(even)>td{background:#f8faf9}
html.kh-modern .xafGrid .dx-datagrid-rowsview .dx-data-row:hover>td{background:var(--k-hover)}
html.kh-modern .xafGrid .dx-datagrid-rowsview .dx-data-row.dx-selection>td,html.kh-modern .xafGrid .dx-datagrid-rowsview .dx-selection.dx-row:not(.dx-row-focused):hover>td{background:var(--k-sel)}
html.kh-modern .xafGrid .dx-checkbox-icon{border-radius:4px;border-color:#9fb1aa}
html.kh-modern .xafGrid .dx-checkbox-checked .dx-checkbox-icon{background-color:var(--k-pri);border-color:var(--k-pri)}
html.kh-modern .xafGrid .dx-checkbox-checked .dx-checkbox-icon::before{color:#fff}
html.kh-modern .xafGrid .dx-pager{background:#fafbfa;border-top:1px solid var(--k-line);border-radius:0 0 var(--k-r) var(--k-r);padding:8px 10px}
html.kh-modern .xafGrid .dx-pager .dx-pages .dx-page,html.kh-modern .xafGrid .dx-pager .dx-page-size{border-radius:var(--k-r-s)}
html.kh-modern .xafGrid .dx-pager .dx-pages .dx-selection,html.kh-modern .xafGrid .dx-pager .dx-page-sizes .dx-selection{background:var(--k-pri);color:#fff;border-color:var(--k-pri)}

/* ---------- detail forms (DevExtreme dxForm + static settings layouts) ---------- */
html.kh-modern .xafDetail .dx-form,html.kh-modern .xafDetail .dx-widget,html.kh-modern .xafDetail input,html.kh-modern .xafDetail textarea,html.kh-modern .xafDetail .dx-texteditor-input{font-family:var(--k-font);font-size:12px}
html.kh-modern .xafDetail{background:#fff;border:1px solid var(--k-line);border-radius:var(--k-r);box-shadow:var(--k-sh);padding:12px 16px 16px}
html.kh-modern .xafDetail .dx-form-group-caption{color:var(--k-g);font-weight:600;border-bottom:2px solid var(--k-gold)}
html.kh-modern .xafDetail .dx-field-item-label-text{color:var(--k-muted)}
html.kh-modern .xafDetail .dx-texteditor.dx-editor-outlined{border-radius:var(--k-r-s);border-color:var(--k-line2)}
html.kh-modern .xafDetail .dx-texteditor.dx-editor-outlined.dx-state-hover{border-color:#9fb1aa}
html.kh-modern .xafDetail .dx-texteditor.dx-editor-outlined.dx-state-focused{border-color:var(--k-pri);box-shadow:var(--k-focus)}
html.kh-modern .xafDetail .dx-texteditor.dx-invalid.dx-editor-outlined{border-color:#d14343}
html.kh-modern .xafDetail .dx-checkbox-icon{border-radius:4px}
html.kh-modern .xafDetail .dx-checkbox-checked .dx-checkbox-icon{background-color:var(--k-pri);border-color:var(--k-pri);color:#fff}
html.kh-modern .xafDetail .dx-tabpanel .dx-tab{border-radius:var(--k-r-s) var(--k-r-s) 0 0}
html.kh-modern .xafDetail .dx-tabpanel .dx-tab.dx-tab-selected{background:#fff;box-shadow:inset 0 3px 0 var(--k-gold)}
html.kh-modern .xafDetail .dx-tabpanel .dx-tab-text{color:var(--k-ink)}
html.kh-modern .xafSaveBar{border-radius:var(--k-r-s)}
html.kh-modern .xafSaveLink{border-radius:var(--k-r-s);padding:3px 8px}
html.kh-modern .xafSaveLink:hover{background:var(--k-hover)}
html.kh-modern .xafErrorPanel{border-radius:var(--k-r-s)}
html.kh-modern .xafDetailCols{gap:16px}
html.kh-modern .xafDetailCol{background:#fff;border:1px solid var(--k-line);border-radius:var(--k-r);box-shadow:var(--k-sh);padding:6px 12px 10px}
html.kh-modern .GroupHeader{color:var(--k-g);font-weight:600;border-bottom:2px solid var(--k-gold);background:none}
html.kh-modern .xafItem td.Caption{color:var(--k-muted)}
html.kh-modern .xafItem td{padding-top:4px;padding-bottom:4px}
html.kh-modern .xafDashboard{background:#fff;border:1px solid var(--k-line);border-radius:var(--k-r);box-shadow:var(--k-sh);min-height:220px}

/* ---------- Reports page (list + criteria; the report document itself is untouched) ---------- */
html.kh-modern .rpPage{background:var(--k-bg);font-family:var(--k-font)}
html.kh-modern .rpPanel{border-top:0;border:1px solid var(--k-line);border-radius:var(--k-r);box-shadow:var(--k-sh);overflow:hidden}
html.kh-modern .rpPH{background:#fff;color:var(--k-g);font-weight:600;border-bottom:2px solid var(--k-gold)}
html.kh-modern .rpGrid{border:1px solid var(--k-line);border-radius:var(--k-r-s);overflow:hidden}
html.kh-modern .rpSearch{border-color:var(--k-line2);border-radius:var(--k-r-s);height:26px}
html.kh-modern .rpTbl{font-size:12px}
html.kh-modern .rpTbl th{background:#f6f8f7;border-color:var(--k-line);font-weight:600;color:#3c4b46;padding:5px 6px}
html.kh-modern .rpTbl td{padding:4px 6px;border-color:#edf1ef}
html.kh-modern .rpTbl tr:nth-child(even) td{background:#f8faf9}
html.kh-modern .rpTbl tr:hover td{background:var(--k-hover)}
html.kh-modern .rpTbl tr.sel td{background:var(--k-pri);color:#fff}
html.kh-modern .rpPage .rptIn{border-color:var(--k-line2);border-radius:var(--k-r-s);height:28px}
html.kh-modern .rpPage .rptIn:focus{border-color:var(--k-pri);box-shadow:var(--k-focus)}
html.kh-modern .rpBtn{border-radius:var(--k-r-s)}

/* ---------- security screens (roles / accounts / audit) ---------- */
html.kh-modern .sec button,html.kh-modern .secM button{border-radius:var(--k-r-s)}
html.kh-modern .sec button.pri,html.kh-modern .secM button.pri{background:var(--k-pri);border-color:var(--k-pri-d);color:#fff}
html.kh-modern .sec input[type=text],html.kh-modern .sec input[type=password],html.kh-modern .sec select,html.kh-modern .sec textarea{border-radius:var(--k-r-s);border-color:var(--k-line2)}
html.kh-modern .sec input:focus,html.kh-modern .sec select:focus,html.kh-modern .sec textarea:focus{outline:0;border-color:var(--k-pri);box-shadow:var(--k-focus)}
html.kh-modern table.secGrid th,html.kh-modern table.secTree th{background:#f6f8f7;position:sticky;top:0;z-index:1}
html.kh-modern table.secGrid tr:nth-child(even) td{background:#f8faf9}

/* ---------- footer ---------- */
html.kh-modern .Footer{background:transparent;border-top:1px solid var(--k-line);color:var(--k-muted)}

/* ---------- login ---------- */
html.kh-modern .login-page{background:radial-gradient(circle at 20% 0%,#14513f 0%,#0f3d2e 45%,#062319 100%)}
html.kh-modern .login-box{border:0;border-radius:12px;box-shadow:0 18px 50px rgba(0,0,0,.35);overflow:hidden;background:#fff}
html.kh-modern .login-header{background:#fff;color:var(--k-ink);border-bottom:3px solid var(--k-gold);font-size:16px;font-weight:600}
html.kh-modern .login-field input{border-radius:var(--k-r-s);border:1px solid var(--k-line2);padding:8px 10px;height:auto}
html.kh-modern .login-field input:focus{border-color:var(--k-pri);box-shadow:var(--k-focus);outline:0}
html.kh-modern .btn{border-radius:var(--k-r-s)}
html.kh-modern .btn-primary{background:var(--k-pri);border-color:var(--k-pri-d);color:#fff;padding:7px 18px}
html.kh-modern .btn-primary:hover{background:var(--k-pri-d)}

/* keyboard focus everywhere */
html.kh-modern a:focus-visible,html.kh-modern button:focus-visible,html.kh-modern input:focus-visible{outline:2px solid var(--k-pri);outline-offset:1px}
