﻿html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body, html {
    margin: 0;
    min-height: 100%;
    height: 100%;
}

#app-side-nav-outer-toolbar {
    flex-direction: column;
    display: flex; 
    height: 100%;
    width: 100%;
}

.layout-header {
    flex: 0 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    position: relative;
    z-index: 1505;
}

.dx-toolbar .dx-toolbar-item.menu-button {
    width: 60px;
    text-align: center;
    padding: 0;
}

.dx-card {
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);
    border-radius: 4px;
    background-color: #fff;
    margin: 2px 2px 3px;
}

.dx-card.wide-card {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    border-right: 0;
    border-left: 0;
}

.with-footer > .dx-scrollable-wrapper > .dx-scrollable-container > .dx-scrollable-content {
    height: 100%;
}

    .with-footer > .dx-scrollable-wrapper > .dx-scrollable-container > .dx-scrollable-content > .dx-scrollview-content {
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }

.layout-body {
    background-color: #f2f2f2;
    flex: 1;
    height: 100%;
    min-height: 0;
}

.layout-body .menu-container {
    height: 100%;
    width: 250px;
    background-color: #fff;
}

.layout-body .content {
    flex-grow: 1;
    height: 100%;
    line-height: 1.5;
    margin: 20px 40px;
}

.layout-body .content h2 {
    font-size: 32px;
    line-height: 40px;
}

.layout-body .content-block {
    margin: 0 0 20px;
}

.layout-body .content-footer {
    display: block;
    color: rgba(0,0,0,.609);
    border-top: 1px solid rgba(0,0,0,.1);
    padding-top: 20px;
    padding-bottom: 24px;
    margin: 0 40px;
}

.layout-body .responsive-paddings {
    padding: 20px;
}

.layout-body-hidden {
    visibility: hidden;
}

#layout-drawer.dx-drawer-shrink .dx-drawer-panel-content {
    box-shadow: rgba(0, 0, 0, 0.06) 0px 4px 4px 0px, rgba(0, 0, 0, 0.12) 0px 1px 2px 0px;
}

@media screen and (max-width: 600px) {
    .layout-body .content {
        margin: 20px;
    }
}

@media screen and (min-width: 1280px) {
    .layout-body .responsive-paddings {
        padding: 40px;
    }
}

.menu-container .dx-widget {
    font-weight: 700;
    font-size: 14px;
    font-family: Roboto,RobotoFallback,Helvetica,Arial,sans-serif;
    line-height: 24px;
}

.menu-container .dx-treeview {
    white-space: nowrap;
}

.menu-container .dx-treeview .dx-treeview-item {
    padding-left: 0;
    flex-direction: row-reverse;
    border-radius: 0;
}

.menu-container .dx-treeview .dx-treeview-item .dx-icon {
    width: 60px !important;
    margin: 0 !important;
}

.menu-container .dx-treeview .dx-treeview-node {
    padding: 0 0 !important;
}

.menu-container .dx-treeview .dx-treeview-toggle-item-visibility {
    right: 10px;
    left: auto;
}

.menu-container .dx-treeview .dx-rtl .dx-treeview-toggle-item-visibility {
    left: 10px;
    right: auto;
}

.menu-container .dx-treeview .dx-treeview-node[aria-level="1"] {
    font-weight: bold;
}

.menu-container .dx-treeview .dx-treeview-node[aria-level="2"] .dx-treeview-item-content {
    font-weight: normal;
    /*padding: 0 60px;*/
}


/* Base styles for sidebar list */
.sidebar .item {
    list-style: none;
    padding: 8px 16px;
    cursor: pointer;
}

/* Make main items bold */
.sidebar > .item > a.nav_link {
    font-weight: 600;
}

/* Submenu container */
.submenu {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
    margin-top: 5px;
}

    /* Indent submenu items */
    .submenu .item {
        padding-left: 30px; /* ← Indentation to the right */
        transition: padding-left 0.3s ease;
    }

        /* Optional: show vertical bar to the left of submenu */
        .submenu .item::before {
            content: '';
            display: inline-block;
            width: 6px;
            height: 6px;
            background-color: #ccc;
            border-radius: 50%;
            margin-right: 10px;
            vertical-align: middle;
        }

/* Optional hover styles */
.sidebar .item a.nav_link:hover {
    background-color: #f1f1f1;
    border-radius: 4px;
}

/* Padding based on nesting level */
.dx-treeview-node[aria-level="1"] .dx-treeview-item-content {
    padding-left: 10px;
}

.dx-treeview-node[aria-level="2"] .dx-treeview-item-content {
    padding-left: 25px;
}

.dx-treeview-node[aria-level="3"] .dx-treeview-item-content {
    padding-left: 40px;
}

.dx-treeview-node[aria-level="4"] .dx-treeview-item-content {
    padding-left: 55px;
}

/* Ensure text inside items is left-aligned */
.dx-treeview-item-content {
    display: flex;
    align-items: center;
}

    .dx-treeview-item-content span,
    .dx-treeview-item-content div {
        text-align: left;
        width: 100%;
        padding-left: 5px;
    }

.detail-grid-mini .dx-datagrid .dx-row,
.detail-grid-mini .dx-datagrid .dx-header-row,
.detail-grid-mini .dx-datagrid .dx-data-row {
    font-size: 14px;
    padding-top: 0px;
    padding-bottom: 0px;
    height: 5px;
}


/* ---- THEME OVERRIDES: DevExpress ile birebir uyumlu ---- */

/* Light */
body.theme-light .layout-header,
body.theme-light .menu-container,
body.theme-light .menu-logo-container,
body.theme-light .layout-body {
    background: #fff !important;
    color: #333 !important;
}

/* Dark */
body.theme-dark .layout-header,
body.theme-dark .menu-container,
body.theme-dark .menu-logo-container,
body.theme-dark .layout-body {
    background: #2a2a2a !important;
    color: #dedede !important;
}

/* Contrast */
body.theme-contrast .layout-header,
body.theme-contrast .menu-container,
body.theme-contrast .menu-logo-container,
body.theme-contrast .layout-body {
    background: #000 !important;
    color: #fff !important;
}

/* Darkmoon */
body.theme-darkmoon .layout-header,
body.theme-darkmoon .menu-container,
body.theme-darkmoon .menu-logo-container,
body.theme-darkmoon .layout-body {
    background: #465672 !important;
    color: #dedede !important;
}

/* Darkviolet */
body.theme-darkviolet .layout-header,
body.theme-darkviolet .menu-container,
body.theme-darkviolet .menu-logo-container,
body.theme-darkviolet .layout-body{
    background: #17171f !important;
    color: #dedede !important;
}

/* Greenmist */
body.theme-greenmist .layout-header,
body.theme-greenmist .menu-container,
body.theme-greenmist .menu-logo-container,
body.theme-greenmist .layout-body
{
    background: white !important;
    color: #dedede !important;
}

/* Material Blue Light */
body.theme-material-blue-light .layout-header,
body.theme-material-blue-light .menu-container,
body.theme-material-blue-light .menu-logo-container,
body.theme-material-blue-light .layout-body {
    background: #fff !important;
    color: rgba(0,0,0,.87) !important;
}

/* Material Blue Dark */
body.theme-material-blue-dark .layout-header,
body.theme-material-blue-dark .menu-container,
body.theme-material-blue-dark .menu-logo-container,
body.theme-material-blue-dark .layout-body {
    background: #363640 !important;
    color: #e0e6ed !important;
}

/* Material Orange Light */
body.theme-material-orange-light .layout-header,
body.theme-material-orange-light .menu-container,
body.theme-material-orange-light .menu-logo-container,
body.theme-material-orange-light .layout-body {
    background: #fff !important;
    color: rgba(0,0,0,.87) !important;
}

/* Material Orange Dark */
body.theme-material-orange-dark .layout-header,
body.theme-material-orange-dark .menu-container,
body.theme-material-orange-dark .menu-logo-container,
body.theme-material-orange-dark .layout-body {
    background: #2b2118 !important;
    color: #e0e6ed !important;
}

/* Material Lime Light */
body.theme-material-lime-light .layout-header,
body.theme-material-lime-light .menu-container,
body.theme-material-lime-light .menu-logo-container,
body.theme-material-lime-light .layout-body {
    background: #fff !important;
    color: rgba(0,0,0,.87) !important;
}

/* Material Lime Dark */
body.theme-material-lime-dark .layout-header,
body.theme-material-lime-dark .menu-container,
body.theme-material-lime-dark .menu-logo-container,
body.theme-material-lime-dark .layout-body {
    background: #363640 !important;
    color: #e0e6ed !important;
}

/* Material Purple Light */
body.theme-material-purple-light .layout-header,
body.theme-material-purple-light .menu-container,
body.theme-material-purple-light .menu-logo-container,
body.theme-material-purple-light .layout-body {
    background: #fff !important;
    color: rgba(0,0,0,.87) !important;
}

/* Material Purple Dark */
body.theme-material-purple-dark .layout-header,
body.theme-material-purple-dark .menu-container,
body.theme-material-purple-dark .menu-logo-container,
body.theme-material-purple-dark .layout-body {
    background: #363640 !important;
    color: #e0e6ed !important;
}

/* Material Teal Light */
body.theme-material-teal-light .layout-header,
body.theme-material-teal-light .menu-container,
body.theme-material-teal-light .menu-logo-container,
body.theme-material-teal-light .layout-body {
    background: #fff !important;
    color: rgba(0,0,0,.87) !important;
}

/* Material Teal Dark */
body.theme-material-teal-dark .layout-header,
body.theme-material-teal-dark .menu-container,
body.theme-material-teal-dark .menu-logo-container,
body.theme-material-teal-dark .layout-body {
    background: #363640 !important;
    color: #e0e6ed !important;
}

/* Tüm dark temalarda profil ismi ve kullanıcı adı beyaz */
body[class*="theme-"][class*="dark"] .profile-name,
body[class*="theme-"][class*="dark"] .dropdown-username {
    color: #fff !important;
}
body[class*="theme-"][class*="contrast"] .profile-name,
body[class*="theme-"][class*="contrast"] .dropdown-username {
    color: #fff !important;
}

h2 {
    margin-top: 0;
    margin-bottom: 1%;
}

/* Workflow Component Styles */
.workflow-component {
    height: 100%;
    width: 100%;
}

.workflow-component .dx-tabpanel {
    height: 100%;
}

.workflow-component .dx-tabpanel .dx-tabs {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

.workflow-component .dx-tabpanel .dx-tab {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    transition: all 0.2s ease;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.workflow-component .dx-tabpanel .dx-tab:hover {
    background-color: #e9ecef;
}

.workflow-component .dx-tabpanel .dx-tab.dx-tab-selected {
    background-color: #007bff;
    color: white;
}

.workflow-component .dx-tabpanel .dx-tab.dx-tab-selected .dx-icon {
    color: white !important;
}

/* Tab Badge Styles - Make numbers more prominent */
.tab-badge {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.workflow-component .dx-tabpanel .dx-tab.dx-tab-selected .tab-badge {
    background-color: #fff;
    color: #007bff;
}

/* Tab content layout for proper badge alignment */
.workflow-component .dx-tabpanel .dx-tab .dx-tab-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex: 1;
}

.workflow-component .dx-tabpanel .dx-tab .dx-tab-content .dx-tab-text {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

/* Icon Colors for different tab types */
.workflow-component .dx-icon-clock {
    color: #ffc107 !important;
}

.workflow-component .dx-icon-play {
    color: #17a2b8 !important;
}

.workflow-component .dx-icon-chevronright {
    color: #007bff !important;
}

.workflow-component .dx-icon-refresh {
    color: #17a2b8 !important;
}

.workflow-component .dx-icon-check {
    color: #28a745 !important;
}

.workflow-component .dx-icon-close {
    color: #dc3545 !important;
}

.workflow-component .dx-icon-edit {
    color: #6f42c1 !important;
}

.workflow-component .dx-icon-info {
    color: #17a2b8 !important;
}

.workflow-component .dx-icon-search {
    color: #6c757d !important;
}

.workflow-component .dx-icon-settings {
    color: #6c757d !important;
}

.workflow-component .dx-icon-flow {
    color: #6f42c1 !important;
}

.workflow-component .dx-icon-workflow {
    color: #6f42c1 !important;
}

.workflow-component .dx-icon-grid {
    color: #007bff !important;
}

/* Grid Container Styles */
.workflow-grid-container {
    height: 100%;
    padding: 20px;
    background-color: #fff;
}

.workflow-grid {
    height: calc(100% - 40px);
}

/* Character Counter Styles */
.char-counter {
    font-size: 12px;
    color: #6c757d;
    text-align: right;
    margin-top: 5px;
}

.char-counter.warning {
    color: #ffc107;
}

.char-counter.error {
    color: #dc3545;
    font-weight: bold;
}

/* Main Tab Panel Styles */
.dx-tabpanel .dx-tab .dx-icon {
    margin-right: 8px;
}

.dx-tabpanel .dx-icon-grid {
    color: #007bff !important;
}

.dx-tabpanel .dx-icon-workflow {
    color: #6f42c1 !important;
}

/* Ensure tab badges are visible in main tabs too */
.dx-tabpanel .tab-badge {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

/* Master-Detail Grid Styles */
.workflow-detail-container {
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    margin: 10px 0;
}

.workflow-detail-container .dx-datagrid {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.workflow-detail-container .dx-datagrid-headers {
    background-color: #e9ecef;
    font-weight: 600;
}

.workflow-detail-container .dx-datagrid-rowsview .dx-row {
    border-bottom: 1px solid #dee2e6;
}

.workflow-detail-container .dx-datagrid-rowsview .dx-row:hover {
    background-color: #f8f9fa;
}

/* Master grid expand/collapse button styling */
.dx-datagrid .dx-master-detail-cell {
    padding: 0;
}

.dx-datagrid .dx-master-detail-cell .dx-datagrid-table {
    margin: 0;
}

/* Detail grid title */
.workflow-detail-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}