

/* =========================================================
   MAIN.CSS
   Merged from:
   - material-ui.css
   - style.css
   - event-material.css

   Principles:
   - NO RULE REMOVED
   - NO RULE MODIFIED
   - CONFLICTS ARE KEPT SIDE-BY-SIDE
   ========================================================= */

/* =========================================================
   SECTION 1: material-ui.css
   SOURCE: material-ui.css
   PURPOSE: Material look & feel (buttons, inputs, shadows)
   ========================================================= */

/* material-ui.css - Option B (global styles for all modules) */

/* Base colors / tokens */
:root{
    --mui-surface:#ffffff;
    --mui-elev-1: 0 6px 20px rgba(0,0,0,0.08);
    --accent:#0d6efd;
    --success:#198754;
    --danger:#dc3545;
    --muted:#6c757d;
    --card-radius:12px;
    --control-height:42px;
    --control-radius:8px;
    --font-sans: "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
  }
  
/* Reset body */
body { font-family: var(--font-sans); background:#f5f7fa; color:#222; }
  

/* Card material */
.card-material, .card { 
background:var(--mui-surface); 
border-radius:var(--card-radius); 
box-shadow: var(--mui-elev-1);
}

.card-default {
border-radius: 20px !important;
}

/* Buttons */
.btn-sm {
border-radius:10px;
transition: transform .06s ease, box-shadow .12s ease;
}
.btn:active{ transform: translateY(1px); }

/* Form controls uniform */
.form-control, .form-select, input[type="search"], textarea {
height: var(--control-height);
border-radius: var(--control-radius);
border: 1px solid #d6dbe0;
padding: 8px 12px;
box-shadow: none;
font-size: 14px;
}
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 6px 18px rgba(13,110,253,0.08); }



/* Table header (sticky) */
.table thead th {
background: linear-gradient(180deg,#375a8aff,#375a8aff);
color: #fff;
z-index: 30;
font-weight:600;
}

/* Modal style */
.modal-material .modal-content {
border-radius: 14px;
box-shadow: 0 14px 40px rgba(2,6,23,0.16);
}

/* Small badges */
.badge-kind { font-size: 12px; padding: 4px 8px; border-radius: 8px; }

/* Utility */
.text-muted-sm { color: #6c757d; font-size: 13px; }

/* Responsive table container: ensure horizontal overflow hidden on small devices */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* DataTables optimization: compact */
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { margin-bottom: .5rem; }
/* table.dataTable th, table.dataTable td { white-space: nowrap; } */

/* Floating action small */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 1200; border-radius: 50%; box-shadow: 0 10px 30px rgba(13,110,253,0.12); }

/* Material input floating label helpers (applied in templates) */
.material-group { position: relative; margin-bottom: 14px; }
.material-input { width:100%; padding:12px 14px; border-radius: var(--control-radius); border:1px solid #d6dbe0; }
.material-label { position: absolute; left: 14px; top: 8px; font-size: 13px; color: var(--muted); pointer-events:none; transition: all .18s; }
.material-input:focus + .material-label, .material-input:not(:placeholder-shown) + .material-label { top: -8px; left: 12px; font-size: 11px; color: var(--accent); }

/* ===== Pivot soft style ===== */
.pivot-soft-wrapper {
    max-height: 320px;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
}

.pivot-soft-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.pivot-soft-table thead th {
    position: sticky;
    top: 0;
    background: #6894d5;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
    z-index: 2;
}

.pivot-soft-table td,
.pivot-soft-table th {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.pivot-soft-table tbody tr:hover {
    background-color: #f1f5ff;
}

.sticky-col {
    position: sticky;
    left: 0;
    background: #ffffff;
    z-index: 1;
}

/* ---------- Material Cards ---------- */
.mui-card {
background: #fff;
border-radius: 14px;
box-shadow: 0 8px 24px rgba(0,0,0,.06);
overflow: hidden;
}

.mui-card-soft {
border: 1px solid #e6e9ef;
}

.mui-card-flat {
box-shadow: none;
border: 1px solid #e6e9ef;
}

.mui-card-header {
padding: 14px 18px;
border-bottom: 1px solid #eef1f6;
background: #fafbfc;
}

.mui-card-body {
padding: 18px;
}

.mui-card-footer {
padding: 12px 18px;
background: #fafbfc;
border-top: 1px solid #eef1f6;
}

/* ---------- Buttons ---------- */
.mui-btn {
border-radius: 10px;
padding: 6px 14px;
font-size: 14px;
border: 1px solid transparent;
}

.mui-btn-sm {
padding: 4px 10px;
font-size: 13px;
}

.mui-btn-secondary {
background: #f1f3f6;
color: #333;
}

.mui-btn-success {
background: #e8f5e9;
color: #2e7d32;
}

/* ---------- Table ---------- */
.mui-table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
}

.mui-table thead th {
background: #f6f8fb;
font-weight: 500;
padding: 10px;
border-bottom: 1px solid #e6e9ef;
}

.mui-table td {
padding: 10px;
border-bottom: 1px solid #eef1f6;
}

.mui-table tbody tr:hover {
background: #fafcff;
}

/* ---------- Badge ---------- */
.mui-badge {
padding: 4px 8px;
border-radius: 8px;
font-size: 12px;
}

.mui-badge-info {
background: #e3f2fd;
color: #1565c0;
}

.mui-badge-light {
background: #f1f3f6;
color: #555;
}

/* ---------- Alerts ---------- */
.mui-alert {
border-radius: 10px;
padding: 14px;
}

.mui-alert-warning {
background: #fff8e1;
color: #8d6e00;
}

/* ---------- Misc ---------- */
.mui-stat {
display: flex;
justify-content: space-between;
font-size: 15px;
}

.mui-error-list {
padding-left: 18px;
margin: 0;
}

/* Small screen adjustments */
@media (max-width:480px){
.summary-count { font-size: 1.2rem; }
.chart-card { height: 260px; }
#inventory-table { min-width: 480px; } /* allows horizontal scroll */
}


/* =========================
    MATERIAL TRACKER UI
========================= */

.tracker-table {
font-size: .85rem;
padding: 1rem;
}
.accordion-header {
padding: 1rem;
margin-right: 1rem;
}

.tracker-table th {
background: #f8f9fa;
font-weight: 600;
/* white-space: nowrap; */
}

.tracker-table td {
vertical-align: middle;
/* white-space: nowrap; */
}

.tracker-table tbody tr:hover {
background: #f1f3f5;
}

.tracker-search {
min-width: 180px;
}

.tracker-column-toggle {
display: flex;
gap: 1rem;
flex-wrap: wrap;
font-size: .8rem;
}
.material-form .form-section {
margin-bottom: 1.5rem;
}

.material-form h6 {
font-weight: 600;
margin-bottom: .5rem;
border-left: 4px solid #0d6efd;
padding-left: .5rem;
} 

/*Modal UI material*/
/* CARD */
.mui-card {
background: #fff;
border-radius: 14px;
box-shadow: 0 6px 20px rgba(0,0,0,.06);
margin-bottom: 20px;
}

.mui-card-header {
padding: 16px 20px;
border-bottom: 1px solid #eee;
}

/* TABLE */
.mui-table {
width: 100%;
border-collapse: collapse;
}
.mui-table th {
background: #f7f9fc;
font-weight: 600;
}
.mui-table th, .mui-table td {
padding: 12px 14px;
/* white-space: nowrap; */
}

/* EXPAND ROW */
.mui-expand-row {
display: none;
background: #fafafa;
}
.mui-expand-row.show {
display: table-row;
}
.mui-expand-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
gap: 12px;
}
.mui-expand-grid label {
font-size: 12px;
color: #777;
display: block;
}
.mui-expand-grid span {
font-weight: 500;
}

/* FORM */
.mui-form-section {
margin-bottom: 24px;
}
.mui-form-section h6 {
margin-bottom: 12px;
font-weight: 600;
}
.mui-grid-2 {
display: grid;
grid-template-columns: repeat(2,1fr);
gap: 16px;
}
.mui-field {
position: relative;
}
.mui-field input,
.mui-field select,
.mui-field textarea {
width: 100%;
padding: 14px;
border-radius: 10px;
border: 1px solid #ddd;
}
.mui-field label {
position: absolute;
top: -8px;
left: 12px;
background: #fff;
padding: 0 6px;
font-size: 12px;
color: #666;
}

/* BUTTON */
.mui-btn {
border-radius: 10px;
padding: 8px 16px;
border: none;
}
.mui-btn-primary {
background: #1976d2;
color: #fff;
}
.mui-btn-outline {
border: 1px solid #ccc;
background: transparent;
}



/* =========================================================
   SECTION 2: style.css
   SOURCE: style.css
   PURPOSE: Core layout, navbar, typography, spinner, tables
   ========================================================= */

html,
body {
    height: 100%;
    width: 100%;
    max-height: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

body>header {
    flex-shrink: auto;
}

body>main {
    flex-shrink: auto;
    flex-grow: auto;
    overflow: auto;
}

body>footer {
    flex-shrink: auto;
    position: absolute;
    bottom: 0;
    left: 0;
    width: calc(100%);
}

#user-avatar {
    width: 1.8rem;
    height: 1.8rem;
    object-fit: scale-down;
    object-position: center center;
}

#user-img-profile {
    width: 100%;
    height: auto;
    max-height: 20vh;
    object-fit: scale-down;
    object-position: center center;
}

.body-wrapper .main-wrapper .page-wrapper .content-wrapper {
    min-height: calc(100vh - 84px - 62px) !important;
}

.bg-secondary {
    background-color: var(--bs-gray-500)!important;
}

.navbar-brand>img {
    height: 2em;
}

.fc-button-group {
    background-color: aquamarine;
}


/* loader */

body.loading {
    overflow: hidden;
}

#pre-loader {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    backdrop-filter: brightness(.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.lds-default {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-default div {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: lds-default 1.2s linear infinite;
}

.lds-default div:nth-child(1) {
    animation-delay: 0s;
    top: 37px;
    left: 66px;
}

.lds-default div:nth-child(2) {
    animation-delay: -0.1s;
    top: 22px;
    left: 62px;
}

.lds-default div:nth-child(3) {
    animation-delay: -0.2s;
    top: 11px;
    left: 52px;
}

.lds-default div:nth-child(4) {
    animation-delay: -0.3s;
    top: 7px;
    left: 37px;
}

.lds-default div:nth-child(5) {
    animation-delay: -0.4s;
    top: 11px;
    left: 22px;
}

.lds-default div:nth-child(6) {
    animation-delay: -0.5s;
    top: 22px;
    left: 11px;
}

.lds-default div:nth-child(7) {
    animation-delay: -0.6s;
    top: 37px;
    left: 7px;
}

.lds-default div:nth-child(8) {
    animation-delay: -0.7s;
    top: 52px;
    left: 11px;
}

.lds-default div:nth-child(9) {
    animation-delay: -0.8s;
    top: 62px;
    left: 22px;
}

.lds-default div:nth-child(10) {
    animation-delay: -0.9s;
    top: 66px;
    left: 37px;
}

.lds-default div:nth-child(11) {
    animation-delay: -1s;
    top: 62px;
    left: 52px;
}

.lds-default div:nth-child(12) {
    animation-delay: -1.1s;
    top: 52px;
    left: 62px;
}

@keyframes lds-default {
    0%,
    20%,
    80%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
}


img#post-banner-mgt {
    width: 100%;
    max-height: 40vh;
    object-fit: scale-down;
    object-position: center center;
}

img.post-banner {
    height: 21vh;
    width: 100%;
    object-fit: scale-down;
    object-position: center center;
}

.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


#user-avatar-modal {
    width: 100%;
    height: 15vh;
    object-fit: scale-down;
    object-position: center center;
}

.nav-item.active a.nav-link {
    font-weight: bolder !important;
    color: #050505;
}

.summary-card {
    border-left-width: 5px !important;
    border-left-style: solid;
}

.clip-text {
    position: fixed;
    top: 0;
}

.tools {
    margin-top: 10px;
    margin-left: 13px;
    margin-right: 13px;
}

/* Pagination */
#event-list_filter, #employee-list_filter, #post-list_filter,#item-list_filter {
    display: none;
}

#event-list_length, #employee-list_length, #post-list_length, #item-list_length {
    display: none;
}
#event-list_paginate, #employee-list_paginate, #post-list_paginate,#item-list_paginate {
    margin-top: 10px;
}


/* .dt-buttons {
    float: right !important;
} */


.dataTables_paginate {
    font-size:  13px !important;
}

#inout {
    font-size: 18px !important; 
    vertical-align: middle !important;
    text-align: center !important;
    margin-right: 20px;
}
#logo {
    margin-left: 20px;
}


#card-login {
    width: 450px;
}
.login-border {
    border-top: .5rem solid grey;
    border-bottom: .5rem solid grey;
    border-radius: 20px;
}
#footer {
    z-index: 999;
}
/* Material UI */

.md-group {
    position:relative;
    margin-bottom:22px;
}
.md-input, .md-select {
    width:100%;
    height:48px;
    padding:14px 12px 6px 12px;
    border:none;
    border-bottom:2px solid #bbb;
    background:transparent;
    outline:none;
    font-size:15px;
    transition:.25s;
}
.md-input:focus, .md-select:focus {
    border-color:#1976d2;
}
.md-label {
    position:absolute;
    top:14px;
    left:12px;
    color:#777;
    font-size:15px;
    pointer-events:none;
    transition:.25s;
}
.md-input:focus + .md-label,
.md-select:focus + .md-label,
.md-input:not(:placeholder-shown) + .md-label {
    top:-8px;
    font-size:12px;
    color:#1976d2;
}
.md-select + .md-label {
    top:-8px;
    font-size:12px;
    color:#777;
}
.md-input[type="date"] {
    color:#444 !important;
}
.md-input[type=date]:focus + .md-label {
    color:#1976d2 !important;
}
.inline-add-btn {
    font-size:12px;
    color:#1976d2;
    cursor:pointer;
    margin-top:4px;
    display:block;
}

/* Responsive (1199) */

@media(max-width: 1199px) {
    .table thead {
        display: none;
    }
    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
    }
    /* .table tr {
        margin-bottom: 15px;
        border: 1px solid #111;
        border-radius: 3px;
        align-items: center !important;
    }
    .table td {
        text-align: right !important;
        padding-left: 35% !important;
        position: relative;
        border: 1px solid transparent;
    }
    
    .table td::before {
        content: attr(label);
        position: absolute;
        left: 0;
        width: 40%;
        padding-left: 15px;
        font-size: 13px;
        font-weight: bold;
        text-align: left;
        align-items: center !important;
    } */
    .table>thead>tr:first-child {
        display: none;
        margin-top: 5px;
    }

    .dataTables_empty.px-2.py-1 {
        text-align: center !important;
    }
   
    #responsive-border {
        border: 1px solid #a9a9a9
    }
    #top-table {
        background-color: #fff;
        color: black;
    }
    #number {
        display: none;
    }
    .container-fluid {
        margin-left: 0px !important;
    }
    #filter-event {
        display: none;
    }
    /* #filter-item {
        display: none;
    } */
    #btn-export {
    display: none;
    }
    .navbar-brand>img {
        height: 1.5em;
    }
    .nav-item.active a.nav-link {
        font-size: 13px;
    }
    .nav-item {
        font-size: 13px;
    }
    .pagination > li > a {
        background-color: #fff !important;
        color: #111;
        font-size: 13px;
    } 
    .page-item.active .page-link {
        columns: #fff;
        background-color: #6c757d !important;
        color: #fff;
        z-index: auto !important;
        /* padding: 2px 10px;
        border-radius: 5px; */
    }
    #inout {
        font-size: 16px !important; 
        vertical-align: middle !important;
        float: right !important;
        margin-top: .3rem;
        margin-right: 1.5rem;
    }
    #navbarNav {
        margin-left: 1.5rem;
    }
    #msg {
        font-size: 13px;
    }
    #menu {
        font-size: 15px;
    }
}

/* Responsive (575) */

@media(max-width: 575px) {
    .redirect-msg {
        padding: 6px;
    }

    .txt-sm {
        font-size: 12px !important;
    }
    #btn-add, 
    #btn-add-ccr,
    #btn-add-newroute,
    #btn-add-survey {
        margin-right: 24px !important;
    }
    .btn-success,
    .btn-primary {
        margin-right: 14px;
    }
    
    #card-login {
        width: 100%;
    }
    #title {
        font-size: 15px;
    }
    #username {
        font-size: 13px;
        height: 2rem;
    }
    #password {
        font-size: 13px;
        height: 2rem;
    }
    #btn-login {
        width: 60px !important;
        font-size: 9px !important;
        align-items: center;
    }
    #water-logo {
        font-size: 10px;
    }
    
    .dt-buttons {
        margin-bottom: 10px !important;
        font-size: 12px !important;
        justify-content: center !important;
        text-align: center !important;
        align-items: center !important;
        align-content: center !important;
        display: none;
    }
    
    #inventory_paginate {
        margin-top: -10px !important;
        font-size:  12px !important;
    }
    #stock_paginate {
        margin-top: -10px !important;
        font-size:  12px !important;
    }
    .dataTables_paginate {
        margin-top: -10px !important;
        font-size:  12px !important;
    }
    .dataTables_filter {
        font-size:  12px !important;
    }
    
    #tab_title {
        font-size: 15px !important;
        font-weight: bold !important;
    }
    .dropdown-item {
        font-size: 11px;
    }
    .dataTables_info {
        display: none !important;
    }
    .dataTables_length {
        display: none !important;
    }
    .form-select {
        font-size: 11px;
    }
    .form-control {
        font-size: 11px;
    }
    .select2-selection, .select2-selection--single {
        font-size: 11px;
    }
    .form-label {
        font-size: 12px;
    }
    .control-label {
        font-size: 12px;
    }
    .card-title {
        font-size: 14px;
    }
    .btn {
        font-size: 11px !important;
    }
    .tools {
        font-size: 14px !important;
    }
    #modal-title {
        font-size: 13px !important;
    }
    #modal-body {
        font-size: 13px !important;
    }
    #add_new {
        font-size: 11px !important;
    }
    #individual_product {
        font-size: 13px;
    }
    #submit, #confirm, #cancel {
        font-size: 10px !important;
    }
    #footer {
        font-size: 13px;
    }
    
    .navbar-brand>img {
        height: 1em;
    }
    .nav-item.active a.nav-link {
        font-size: 12px;
    }
    .nav-item {
        font-size: 12px;
    }
    .pagination > li > a {
        background-color: #fff !important;
        color: #111;
        font-size: 12px;
    } 
    .page-item.active .page-link {
        columns: #fff;
        background-color: #6c757d !important;
        color: #fff;
        /* padding: 2px 10px; */
        /* border-radius: 50%; */
    }
    #inout {
        font-size: 14px !important; 
        vertical-align: middle !important;
        float: right !important;
        margin-top: .3rem;
    }
    #msg {
        font-size: 12px;
    }
    .btn-close {
        font-size: 9px;
    }
    .dataTables_empty.px-2.py-1 {
        font-size: 12px;
        text-align: center !important;
    }
    #menu {
        font-size: 14px;
    }
    
}

/* =========================================================
   SECTION 3: event-material.css
   SOURCE: event-material.css
   PURPOSE: Event pages, modal styling, responsive (tablet/phone)
   ========================================================= */


/* =====================================================
   EVENT ROOT VARIABLES
===================================================== */
.app-event {
    --primary: #4caf50;
    --border: #dcdcdc;
    --bg: #f8f9fb;
    --radius: 10px;
    font-family: system-ui;
}

/* =====================================================
   TABLE
===================================================== */
.app-event table td,
.app-event table th {
    vertical-align: middle !important;
    text-align: center;
}

/* Description dễ đọc */
.app-event table td[label="Description"] {
    text-align: left;
}

/* =====================================================
   DATATABLE MINIMAL UI
===================================================== */
.dataTables_length,
.dataTables_filter,
.dataTables_info {
    display: none !important;
}

.app-event .dataTables_wrapper {
    padding-bottom: .5rem;
}

/* =====================================================
   TOOLBAR LAYOUT
===================================================== */
.event-toolbar {
    display: flex !important;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    flex-wrap: wrap;
}

/* LEFT */
.event-toolbar__left {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 15px;
}

/* CENTER */
.event-toolbar__center {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

/* FILTER CONTENT WRAPPER */
.filter-card .event-toolbar__center {
    width: 100%;
    max-width: 1100px;     /* 👈 quan trọng */
    margin: 0 auto;        /* 👈 canh giữa */
}
.filter-card .event-toolbar__center {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}
@media (max-width: 991px) {
    .filter-card .event-toolbar__center {
        grid-template-columns: 1fr 1fr;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .filter-card .event-toolbar__center {
        grid-template-columns: 1fr;
    }
}
/* center Filter end */


/* Filter row layout */
.filter-card .event-toolbar__center {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

/* Tablet */
@media (max-width: 991px) {
    .filter-card .event-toolbar__center {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .filter-card .event-toolbar__center {
        grid-template-columns: 1fr;
    }
}





/* RIGHT */
.event-toolbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    margin-right: 15px;
}

/* Title */
.event-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    white-space: nowrap;
}

/* =====================================================
   FILTER
===================================================== */
.event-filter {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
}

.event-filter select,
.event-filter input,
.event-filter button {
    height: 40px !important;
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 0 10px;
    font-size: 14px;
}

/* =====================================================
   SEARCH
===================================================== */
.event-search {
    position: relative;
}

.event-search input {
    height: 40px;
    padding-left: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.event-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .6;
}

/* =====================================================
   BUTTONS – COMMON SIZE
===================================================== */
.event-toolbar .btn,
.material-export .btn {
    height: 40px;
    min-width: 40px;
    padding: 0 12px;
    border-radius: 10px !important;
    background: #eeeeee !important;
    color: #444 !important;
    border: 1px solid #d6d6d6 !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}

/* .event-toolbar__center {
    margin-left: 100px;
} */


/* ===============================
   FILTER CARD (ITEM_MGT)
================================ */

.filter-card {
    width: 100%;
    margin: 0 auto; /* căn giữa */
    border-radius: 16px;
    background: #fff;
}

.filter-card__inner {
    padding: 20px 24px;
    display: flex;
    justify-content: center;   /* canh ngang */
}

/* responsive */
@media (max-width: 991px) {
    .filter-card {
        max-width: 100%;
        margin: 0 12px;
    }

    .filter-card__inner {
        padding: 16px;
    }
}

/* Select2 base */
.select2-container--default .select2-selection--multiple {
    min-height: 42px;
    padding: 4px 6px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.select2-container--default 
.select2-selection--multiple 
.select2-selection__choice {
    background: #eef2f7;
    border: 1px solid #d0d7e2;
    border-radius: 20px;
    padding: 4px 28px 4px 10px;
    margin: 4px 6px 4px 0;
    font-size: 13px;
    line-height: 1.4;
    position: relative;
}
/* Close button (FIX TỤT THẤP) */
.select2-container--default 
.select2-selection--multiple 
.select2-selection__choice__remove {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.select2-container--default 
.select2-selection--multiple 
.select2-selection__choice__remove:hover {
    color: #e74c3c;
}
.select2-container--default 
.select2-selection--multiple 
.select2-search__field {
    margin-top: 4px;
    font-size: 14px;
}
.filter-card input[type="text"],
.filter-card input[type="date"],
.filter-card .btn {
    height: 42px;
    border-radius: 10px;
}
 /* end filter */


.event-toolbar .btn i,
.material-export .btn i {
    font-size: 16px;
}

.event-toolbar .btn:hover,
.material-export .btn:hover {
    background: #e0e0e0 !important;
    border-color: #c8c8c8 !important;
    transform: translateY(-1px);
}

/* ADD giữ màu xanh */
.event-toolbar .btn-success {
    background: #66bb6a !important;
    color: #fff !important;
    border: none !important;
}

.event-toolbar .btn-success:hover {
    background: #5aaa5e !important;
}

/* Reset */
.btn-reset {
    background: #eeeeee !important;
    color: #444 !important;
}

/* =====================================================
   EXPORT BUTTONS (EXCEL / PDF)
===================================================== */
.material-export {
    display: flex;
    gap: 8px;
    background: transparent !important;
}

/* Xóa nền trắng + shadow thừa sinh bởi JS */
.material-export,
.material-export .btn-group,
.dt-buttons,
.dt-buttons .btn-group {
    background: transparent !important;
    box-shadow: none !important;
}

.dt-buttons::before,
.dt-buttons::after {
    display: none !important;
}

/* =====================================================
   ACTION BUTTONS (TABLE)
===================================================== */
.event-action {
    display: flex;
    justify-content: center;
    gap: .4rem;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
}

.btn-view { color: #2196f3; }
.btn-delete { color: #f44336; }


/* =====================================================
   PAGINATION – WHITE STYLE
===================================================== */
.dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 14px;
}

.dataTables_paginate .paginate_button {
    background: #ffffff !important;
    color: #333 !important;
    border-radius: 10px !important;
    border: 1px solid #d6d6d6 !important;
    /* padding: 8px 16px !important; */
    font-size: 14px;
}

.dataTables_paginate .paginate_button:hover {
    background: #f2f2f2 !important;
}

/* .dataTables_paginate .paginate_button.current {
    background: #ffffff !important;
    color: #000 !important;
    border: 2px solid #9e9e9e !important;
    font-weight: 600;
} */
.page-item.active .page-link {
    background-color: #afb6c3;
    border-radius: 6px;}




/* =========================================================
    EVENT MODAL – MATERIAL STYLE (ISOLATED)
    Scope: ONLY #uni_modal
    ========================================================= */

    /* ---------- MODAL CONTAINER ---------- */
    #uni_modal .modal-dialog {
        max-width: 720px;
    }

    #uni_modal .modal-content {
        border-radius: 16px;
        border: none;
        overflow: hidden;
    }

    /* ---------- MODAL HEADER ---------- */
    #uni_modal .modal-header {
        background: linear-gradient(135deg, #f5f7ff, #ffffff);
        border-bottom: 1px solid #e0e0e0;
        padding: 14px 22px;
    }

    #uni_modal .modal-title {
        font-size: 18px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #202124;
    }

    #uni_modal .modal-title i {
        color: #3f51b5;
        font-size: 20px;
    }

    /* ---------- MODAL BODY ---------- */
    #uni_modal .modal-body {
        padding: 22px 26px;
    }

    /* ---------- FORM GROUP ---------- */
    #uni_modal .form-group {
        margin-bottom: 18px;
    }

    /* ---------- LABEL ---------- */
    #uni_modal label {
        font-size: 13px;
        color: #5f6368;
        margin-bottom: 6px;
    }

    /* required star */
    #uni_modal label .asteriskField {
        color: #e53935;
        margin-left: 3px;
    }

    /* ---------- INPUT – BOTTOM BORDER STYLE ---------- */
    #uni_modal input.form-control,
    #uni_modal textarea.form-control {
        border: none;
        border-bottom: 1px solid #cfd8dc;
        border-radius: 0;
        padding: 6px 2px;
        font-size: 14px;
        background: transparent;
        box-shadow: none;
    }

    #uni_modal input.form-control:focus,
    #uni_modal textarea.form-control:focus {
        outline: none;
        border-bottom: 2px solid #3f51b5;
        box-shadow: none;
    }

    /* ---------- TEXTAREA (NOT TOO BIG) ---------- */
    #uni_modal textarea.form-control {
        min-height: 72px;
        resize: vertical;
    }

    /* ---------- SELECT2 – MATERIAL (MODAL ONLY) ---------- */
    #uni_modal .select2-container {
        width: 100% !important;
    }

    #uni_modal .select2-selection--single,
    #uni_modal .select2-selection--multiple {
        border: none !important;
        border-bottom: 1px solid #cfd8dc !important;
        border-radius: 0 !important;
        background: transparent !important;
        min-height: 34px;
    }

    #uni_modal .form-select {
        border: none !important;
        border-bottom: 1px solid #cfd8dc !important;
        border-radius: 0 !important;
        background: transparent !important;
        min-height: 34px;
    }


    /* remove crispy double underline */
    #uni_modal .form-group .select2-container {
        border-bottom: none !important;
    }

    /* focus */
    #uni_modal .select2-container--focus .select2-selection {
        border-bottom: 2px solid #3f51b5 !important;
    }

    /* placeholder */
    #uni_modal .select2-selection__placeholder {
        color: #9aa0a6;
    }

    /* multiple tags */
    #uni_modal .select2-selection__choice {
        background: #e8eaf6;
        border: none;
        color: #3f51b5;
        border-radius: 12px;
        padding: 2px 8px;
        font-size: 12px;
    }

    /* search input size */
    #uni_modal .select2-search__field {
        height: 24px !important;
        font-size: 14px;
    }

    /* dropdown layer */
    #uni_modal .select2-dropdown {
        z-index: 1060 !important;
        border-radius: 8px;
    }

    /* ---------- DATETIME INPUT ---------- */
    #uni_modal input[type="datetime-local"] {
        font-size: 14px;
        padding-right: 6px;
    }

    /* ---------- MODAL FOOTER ---------- */
    #uni_modal .modal-footer {
        border-top: 1px solid #e0e0e0;
        padding: 14px 22px;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
    }

    /* ---------- BUTTONS ---------- */
    #uni_modal .btn-primary {
        background: linear-gradient(135deg, #3f51b5, #5c6bc0);
        border: none;
        border-radius: 18px;
        padding: 6px 22px;
        box-shadow: 0 4px 10px rgba(63,81,181,.25);
    }

    #uni_modal .btn-primary:hover {
        background: linear-gradient(135deg, #303f9f, #3949ab);
    }

    #uni_modal .btn-secondary {
        background: #f1f3f4;
        color: #3c4043;
        border-radius: 18px;
        padding: 6px 18px;
        border: none;
    }

    /* ---------- ERROR MESSAGE ---------- */
    #uni_modal .err-msg {
        font-size: 14px;
        margin-bottom: 10px;
    }

    /* =========================================================
    END EVENT MODAL
    ========================================================= */



/* ===============================
   EVENT_MGT RESPONSIVE
================================ */

@media (max-width: 1199px) {

    /* TOOLBAR */
    .event-toolbar {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .event-toolbar__left {
        width: 100%;
    }

    .event-toolbar__center,
    .event-toolbar__right {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    /* FILTER */
    .event-toolbar__center > * {
        flex: 1 1 48%;
        min-width: 180px;
    }

    /* SEARCH */
    .event-search {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .event-search input {
        width: 100%;
    }

    /* BUTTONS */
    .btn-add,
    .btn-reset {
        flex: 1 1 auto;
        font-size: 11px;
        padding: 6px 10px;
    }

    /* EXPORT */
    .event-export {
        display: flex;
        gap: 8px;
    }

    /* TABLE STACK */
    .stack-table {
        width: 100%;
    }
}

@media (max-width: 576px) {

    /* CARD BODY */
    .card-body {
        padding: 12px;
    }

    /* TITLE */
    .event-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    /* TOOLBAR */
    .event-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .event-toolbar__center,
    .event-toolbar__right {
        flex-direction: column;
        align-items: stretch;
    }

    /* FILTER FULL WIDTH */
    .event-toolbar__center > * {
        width: 100%;
    }

    /* SEARCH */
    .event-search {
        width: 100%;
    }

    .event-search input {
        width: 100%;
        font-size: 14px;
    }

    .filter-item label {
        display: none;
    }

    /* BUTTONS STACK */
    .btn-add,
    .btn-reset {
        width: 100%;
        font-size: 14px;
        justify-content: center;
    }

    /* EXPORT BUTTONS */
    .event-export {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .event-export .btn {
        width: 48%;
        font-size: 13px;
        padding: 6px;
    }

    /* STACK TABLE FIX */
    .table,
    .table tbody,
    .table tr,
    .table td {
        width: 100% !important;
        display: block;
    }

    .table tr {
        margin-bottom: 16px;
        padding: 12px;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        background: #fff;
    }

    .table td {
        text-align: right !important;
        padding: 6px 0;
        font-size: 13px;
    }

    .table td::before {
        content: attr(label);
        font-weight: 600;
        text-align: left !important;
        display: block;
        margin-bottom: 2px;
        color: #555;
    }

    /* ACTION */
    .event-action {
        display: flex;
        gap: 12px;
        justify-content: flex-end;
        margin-top: 8px;
    }

     /* CARD CONTAINER */
    .card,
    .card-body {
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* TOOLBAR RESET */
    .event-toolbar {
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        align-items: stretch;
    }

    .event-toolbar__left,
    .event-toolbar__center,
    .event-toolbar__right {
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* CHỐNG TRÀN NGANG */
    body,
    .container,
    .container-fluid {
        overflow-x: hidden;
    }
     table colgroup {
        display: none !important;
    }

    table thead {
        display: none !important;
    }

    table,
    tbody,
    tr,
    td {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        
    }

    /* Card padding đều  bổ sung*/
  .card-header,
  .card-body {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* FILTER */
  .event-filter,
  .event-filter-material {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .event-filter .filter-item,
  .event-filter-material .filter-item {
    width: 100%;
  }

  .event-filter select,
  .event-filter input {
    width: 100%;
    height: 40px;
    font-size: 13px;
  }

  .material-export {display: none;}

    /* Ẩn chiếm chỗ của label nhưng không display:none */
    .event-toolbar label {
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 0 !important;
        line-height: 0 !important;
    }

    /* Input sát nhau hơn */
    .event-toolbar .form-group,
    .event-toolbar .mb-3 {
        margin-bottom: 10px !important;
    }

    /* Nút FILTER (icon kính lúp) */
    .btn-filter,
    .event-filter-btn {
        margin-top: 0 !important;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Card làm chuẩn chiều ngang */
    .card,
    .card-body {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .container-fluid {
        padding: 0;
    }

     /* BỎ TOÀN BỘ BORDER DỌC */
    table.stack-table td,
    table td {
        border-left: none !important;
        border-right: none !important;
    }

    /* Nếu vẫn còn do th */
    table.stack-table th,
    table th {
        border-left: none !important;
        border-right: none !important;
    }

    /* CHỈ GIỮ BORDER NGANG NHẸ */
    table.stack-table td,
    table td {
        border-top: none !important;
        border-bottom: 1px solid #eee !important;
    }

    /* DÒNG CUỐI KHÔNG CẦN GẠCH */
    table.stack-table tr td:last-child,
    table tr td:last-child {
        border-bottom: none !important;
    }

}


@media (max-width: 992px) {

    .modal-dialog {
        max-width: 90%;
        margin: 20px auto;
    }

    .modal-content {
        border-radius: 18px;
    }

    .modal-header h5 {
        font-size: 18px;
    }

    .modal-body {
        padding: 16px;
    }

    /* Form spacing */
    .modal-body .row {
        margin-bottom: 14px;
    }

    .modal-body .col-6 {
        width: 100%;
    }
}

@media (max-width: 576px) {

    .modal-dialog {
        max-width: 95%;
        margin: 12px auto;
    }

    .modal-content {
        border-radius: 20px;
    }

    .modal-header {
        padding: 14px;
    }

    .modal-header h5 {
        font-size: 16px;
    }

    .modal-body {
        padding: 14px;
    }

    /* Inputs */
    .modal-body input,
    .modal-body textarea,
    .modal-body select,
    .modal-body .select2-container {
        font-size: 14px;
    }

    /* Buttons */
    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer .btn {
        width: 100%;
        font-size: 14px;
        padding: 10px;
    }

    /* Description textarea */
    textarea {
        min-height:180px;
        resize: vertical;
    }
}


/* =========================================================
   
========================================================= */
