﻿/*:root {*/
    /* Định nghĩa màu sắc thương hiệu tại đây */
    /*--brand-primary: #06479C;
    --brand-primary-hover: #053a80;
    --brand-bg: #f5f5f9;
    --brand-text: #435971;
    --brand-shadow: rgba(67, 89, 113, 0.1);
}*/
:root {
    /* Primary CRM Blue */
    --brand-primary: rgba(51, 122, 183, 1);
    --brand-primary-hover: #1d4ed8;
    /* Background */
    --brand-bg: #f5f7fb;
    --brand-surface: #ffffff;
    /* Text */
    --brand-text: #1f2937;
    --brand-text-muted: #6b7280;
    /* Border */
    --brand-border: #e5e7eb;
    /* Status colors */
    --brand-success: #16a34a;
    --brand-warning: #f59e0b;
    --brand-danger: #ef4444;
    /* Shadow */
    --brand-shadow: rgba(0,0,0,0.05);
}

/* Các lớp tiện ích dùng chung dựa trên biến màu */
.btn-primary-custom {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

.btn-primary-custom:hover {
    background-color: var(--brand-primary-hover) !important;
    border-color: var(--brand-primary-hover) !important;
}

.text-brand {
    color: var(--brand-primary) !important;
}

.auth-card {
    box-shadow: 0 2px 10px 0 var(--brand-shadow);
    border: none;
}

.dx-datagrid-search-panel {
    margin-left: 0px;
}

.dx-texteditor-input {
    padding-bottom: 2px;
    padding-top: 2px;
    font-size: 12px;
    height: calc(0.75rem + 2px) !important;
}

.btn-outline-light {
    border-color: lightgray;
}

.dx-tab-text {
    font-weight: bold;
}
.dx-tab-selected {
    background-color: var(--brand-primary) !important;

    .dx-tab-text {
        color: white !important;
    }
}
/* ===== DEVEXTREME SMALL STYLE ===== */
.dx-texteditor {
    min-height: 30px !important;
    font-size: 0.875rem;
}

.dx-texteditor-input {
    padding: 5px;
    min-height: 30px;
}

.dx-toolbar {
    margin-bottom: 5px !important;
}
/* Dropdown button */
.dx-dropdowneditor-button {
    width: 28px;
}

/* DateBox / SelectBox icon */
.dx-dropdowneditor-icon {
    font-size: 14px;
}

/* CheckBox & Switch */
.dx-checkbox-icon,
.dx-switch-container {
    transform: scale(0.85);
}

/* Button */
.dx-button {
    height: 30px !important;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.dx-sm.dx-texteditor {
    min-height: 30px;
    font-size: 0.875rem;
}

.dx-sm .dx-texteditor-input {
    padding: 0.25rem 0.5rem;
}

.dx-sm .dx-dropdowneditor-button {
    width: 28px;
}

.sb-topnav {
    border-bottom: 1px solid rgba(200, 200, 200, 0.4);
}

.sb-sidenav-menu {
    height: 100%;
    background: #f5f5f5;
    border-right: 1px solid rgba(200, 200, 200, 0.4);
}

.dx-datagrid-filter-panel .dx-datagrid-filter-panel-clear-filter,
.dx-datagrid-filter-panel .dx-datagrid-filter-panel-text, .dx-datagrid-filter-panel .dx-icon-filter {
    color: var(--brand-primary) !important;
}


.dx-datagrid-search-panel {
    margin-left: 0px !important;
    margin-bottom: 0px;
}

.custom-grid-header[role="columnheader"] {
    font-size: 14px;
    font-weight: 400;
    color: white;
    background: var(--brand-primary) !important;
}

.custom-grid-header[role="gridcell"] {
    font-size: 12px;
    vertical-align: central
}

.dx-datagrid .dx-header-filter:before {
    content: "\f050 ";
    color: white;
}

.btn-outline-light {
    border: 1px solid rgba(200, 200, 200, 0.6) !important; /* viền đáy nhẹ nhàng */
    border-radius: 2px;
}

.strike-through td {
    text-decoration: line-through !important;
    color: #888;
}

.nav-link-active {
    color: var(--brand-primary);
    background-color: white;
}

.CustomDataGridButton {
    margin: 5px;
}

.dx-datagrid-rowsview tr > td {
    vertical-align: middle !important;
}


.dx-texteditor-input-container .dx-texteditor-input {
    margin:auto
}

/* Switch xanh lá */
.form-switch .form-check-input {
    width: 2.8em; /* mặc định ~2em → tăng nhẹ */
    height: 1.4em;
    cursor: pointer;
    background-color: #e9ecef;
    border-color: #ced4da;
    transition: all 0.2s ease-in-out;
}

/* Khi bật */
.form-switch .form-check-input:checked {
    background-color: #28a745; /* xanh lá bootstrap */
    border-color: #28a745;
}

/* Nút tròn bên trong */
.form-switch .form-check-input::before {
    width: 1.2em;
    height: 1.2em;
}

/* Focus cho đẹp */
.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}
/* ===== FIX TOOLBAR DEVEXTREME DATAGRID ===== */

.dx-datagrid .dx-toolbar-items-container {
    align-items: center;
    flex-wrap: nowrap;
}

.dx-datagrid .dx-toolbar-item {
    margin-right: 6px;
}

/* button bootstrap trong toolbar */
.dx-datagrid .dx-toolbar .btn {
    white-space: nowrap;
    height: 32px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* datebox */
.dx-datagrid .dx-toolbar .dx-datebox {
    min-width: 130px;
}

    .dx-datagrid .dx-toolbar .dx-datebox .dx-texteditor-input {
        height: 32px;
        font-size: 13px;
        padding: 4px 8px;
    }

.dx-datagrid .dx-toolbar .dx-texteditor-buttons-container {
    height: 32px;
}

/* search panel */
.dx-datagrid .dx-searchbox {
    height: 32px;
}

/* responsive */
@media (max-width: 768px) {
    .dx-datagrid .dx-toolbar-items-container {
        flex-wrap: wrap;
    }

    .dx-datagrid .dx-toolbar-item {
        margin-bottom: 6px;
    }

    .dx-datagrid .dx-toolbar .dx-datebox {
        min-width: 100%;
    }
}

