/* =========================================
   1. GLOBAL STYLES
   ========================================= */
body {
    background-color: #f8f9fa;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.85rem;
}

/* =========================================
   2. NAVBAR & NAVIGATION
   ========================================= */
/* Navbar Modernization */
.navbar {
    background: linear-gradient(135deg, #1a8a34 0%, #28a745 100%) !important;
    padding: 0.8rem 1rem;
    border-bottom: 3px solid #146c29;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease;
    border-radius: 5px;
    margin: 0 2px;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.15);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255,255,255,0.2) !important;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

/* Multi-level Dropdown Fix */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.6rem 1rem;
    border-radius: 5px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #e9f7ef;
    color: #1a8a34;
    transform: translateX(5px);
}

/* Multi-level nested menus */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
    border-radius: 0 6px 6px 6px;
    display: none;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

/* =========================================
   3. BREADCRUMBS
   ========================================= */
.breadcrumb-container {
    background: white;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
/*    border-left: 5px solid #28a745;*/
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: #28a745;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* =========================================
   4. CARDS
   ========================================= */
/* Global Card Enhancements */
.card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: bold;
}

/* =========================================
   5. MODALS
   ========================================= */
/* Modal tweaks */
#main-modal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#main-modal .modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

/* =========================================
   6. GRIDVIEW & TABLES
   ========================================= */
.btn-group.grid-export-menu { 
    opacity: 0.3; /* ทำให้จางลง */
    transition: 0.3s;
}

.btn-group.grid-export-menu:hover { 
    opacity: 1; /* ชัดขึ้นเมื่อเอาเมาส์ชี้ */
}

/* 0.85rem จะเท่ากับประมาณ 13.6px */
.detail-view th {
    font-size: 0.85rem !important;
    vertical-align: middle;
}

.detail-view td {
    font-size: 0.85rem;
}

.t_total {
    font-weight: bold;
    font-size: 1.5rem;
  /*  text-align: right;*/
    color: #d00262;
}

/* =========================================
   7. ALERTS & MESSAGES
   ========================================= */
.help-block {
    font-size: 0.9rem;
    color: #ff0000; 
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem !important;
    border: 1px solid transparent;
    border-radius: 0.50rem;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #d9534f; /* Modern accent */
}

/* =========================================
   8. TOOLTIPS
   ========================================= */
/* Custom Tooltip Style - Pale Chartreuse */
/* =========================================
   8. TOOLTIPS
   ========================================= */
/* Custom Tooltip Style - Pale Chartreuse (Bootstrap 4 & 5 Compatible) */
.tooltip-inner {
    background-color: #a1f039 !important;
    color: #000 !important;
    border: 1px solid #5a8523;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-family: 'Sarabun', sans-serif;
    font-size: 0.85rem;
}

/* Bootstrap 4 Arrow */
.tooltip.bs-tooltip-top .arrow::before, .tooltip.bs-tooltip-auto[x-placement^="top"] .arrow::before {
    border-top-color: #a1f039 !important;
}
.tooltip.bs-tooltip-right .arrow::before, .tooltip.bs-tooltip-auto[x-placement^="right"] .arrow::before {
    border-right-color: #a1f039 !important;
}
.tooltip.bs-tooltip-bottom .arrow::before, .tooltip.bs-tooltip-auto[x-placement^="bottom"] .arrow::before {
    border-bottom-color: #a1f039 !important;
}
.tooltip.bs-tooltip-left .arrow::before, .tooltip.bs-tooltip-auto[x-placement^="left"] .arrow::before {
    border-left-color: #a1f039 !important;
}

/* Bootstrap 5 Arrow (keeping for future proofing) */
.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #a1f039 !important;
}
.tooltip.bs-tooltip-right .tooltip-arrow::before {
    border-right-color: #a1f039 !important;
}
.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #a1f039 !important;
}
.tooltip.bs-tooltip-left .tooltip-arrow::before {
    border-left-color: #a1f039 !important;
}

/* =========================================
   9. UTILITY & MISC
   ========================================= */
.t06 {
    font-size: 0.6rem;
}

.btn:hover {
   transform: scale(1.05);
   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-xs {
    padding: 0.125rem 0.25rem !important;
    font-size: 0.75rem !important;
    line-height: 1.5;
    border-radius: 0.15rem;
}

.bg-gradient-success {
    background: linear-gradient(45deg, #198754, #28a745);
}
.rounded-3 { border-radius: 0.75rem !important; }
.rounded-top-3 { border-top-left-radius: 0.75rem !important; border-top-right-radius: 0.75rem !important; }
.btn-hover-scale { transition: transform 0.2s; }
.btn-hover-scale:hover { transform: scale(1.1); }


 
/* =========================================
   10. PROGRESSBAR
   ========================================= */
#progressbar {
    margin-bottom: 30px;
    overflow: hidden;
    padding-left: 0;
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
#progressbar li {
    list-style-type: none;
    width: 33.33%;
    position: relative;
    text-align: center;
}
/* Icons */
.step-icon {
    width: 45px;
    height: 45px;
    line-height: 45px;
    border-radius: 50%;
    background: #e9ecef; /* Inactive background */
    color: #6c757d; /* Inactive icon color */
    font-size: 18px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; /* Keep above connector */
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.step-text {
    color: #6c757d;
    font-weight: bold;
    font-size: 14px;
}

/* Connector Line */
#progressbar li:after {
    content: '';
    width: 100%;
    height: 4px;
    background: #e9ecef;
    position: absolute;
    left: -50%;
    top: 22.5px; /* Center of 45px circle */
    z-index: -1;
    transform: translateY(-50%);
}
#progressbar li:first-child:after {
    content: none;
}

/* Active State */
#progressbar li.active .step-icon {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    color: white;
    /*transform: scale(1.2); /* Slight pop effect */
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.2); /* Beautiful outer ring */
    border: 3px solid #fff; /* Clean separation */
}
#progressbar li.active .step-text {
    color: #198754;
    font-weight: bold;
}
/* Active Connector (Completed steps lead to active) */
/* Note: Since we want the line leading TO the active step to be green, we target the active li's after */
#progressbar li.active:after {
    background: #198754;
}



.hover-effect {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    top: 0;
}
.hover-effect:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important;
}
.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}
.bg-primary-light { background-color: rgba(13, 110, 253, 0.1); }
.bg-success-light { background-color: rgba(25, 135, 84, 0.1); }
.bg-warning-light { background-color: rgba(255, 193, 7, 0.1); }
.bg-info-light { background-color: rgba(13, 202, 240, 0.1); }

/* Custom Button Styles */
.btn-gradient-success {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%) !important;
    border: none;
    color: white !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn-gradient-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #20c997 0%, #198754 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}
.btn-gradient-success:hover::before {
    opacity: 1;
}
.btn-gradient-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(25, 135, 84, 0.3) !important;
}

.hover-scale {
    transition: all 0.3s ease;
}
.hover-scale:hover {
    transform: translateY(-3px);
    background-color: #fff !important;
    color: #198754 !important;
    border-color: #198754 !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

 