/**
 * Modern Admin Style
 * Custom CSS for AdminLTE Modern Theme
 * Version: 1.0.0
 */

/* ===== CSS Variables ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --info-gradient: linear-gradient(135deg, #17a2b8 0%, #0dcaf0 100%);
    --warning-gradient: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
    --success-gradient: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    --danger-gradient: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 10px;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 25px rgba(0,0,0,0.12);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
    --transition-default: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Main Wrapper - Max width 1200px ===== */
.main-wrapper {
    width: 100%;
    margin: 0 auto;
}

.main-wrapper-full {
    max-width: 100%;
    width: 100%;
}

/* ===== Modern Card Styles ===== */
.card-modern {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    transition: var(--transition-default);
    box-shadow: var(--shadow-sm);
    
}

.card-modern:hover {
    box-shadow: var(--shadow-lg) !important;
}

.card-modern .card-header {
    border-bottom: none;
    padding: 18px 24px;
    font-weight: 600;
}

.card-modern .card-header .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.card-modern .card-body {
    padding: 24px;
}

.card-modern .card-footer {
    background: transparent;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 16px 24px;
}

/* ===== Card with subtle border ===== */
.card-subtle {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-default);
}

.card-subtle:hover {
    box-shadow: var(--shadow-md);
}

/* ===== Gradient Headers ===== */
.bg-gradient-primary-modern {
    background: var(--primary-gradient) !important;
}

.bg-gradient-info-modern {
    background: var(--info-gradient) !important;
}

.bg-gradient-warning-modern {
    background: var(--warning-gradient) !important;
}

.bg-gradient-success-modern {
    background: var(--success-gradient) !important;
}

.bg-gradient-danger-modern {
    background: var(--danger-gradient) !important;
}

.bg-gradient-dark-modern {
    background: var(--dark-gradient) !important;
}

/* ===== Modern Form Controls ===== */
.form-control-modern {
    border-radius: var(--border-radius-sm);
    border: 2px solid #e9ecef;
    padding: 6px 16px;
    transition: var(--transition-default);
    font-size: 0.95rem;
}

.form-control-modern:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.form-group-modern label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Apply modern style to all form-controls in modern cards */
#discount_type{border-top-right-radius: 0!important;border-bottom-right-radius: 0!important;}
#btnApplyBulk{height: 38px;border-radius:10px!important;}
.card-modern .form-control,
.modern-form .form-control {
    border-radius: var(--border-radius-sm);
    transition: var(--transition-default);
}
.card-modern input.form-control[type ='file']{
    height: 46px;
}
.card-modern .form-control:not(textarea),.modern-form .form-control:not(textarea){
    height: 38px;
}
.card-modern .form-control:focus,   
.modern-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* ===== Modern Buttons ===== */
.btn-modern {
    border-radius: var(--border-radius-sm);
    padding: 7px 20px;
    font-weight: 600;
    transition: var(--transition-default);
    border: 2px solid transparent;
    background: #e9ecef;
}

.btn-modern:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-primary-modern {
    background: var(--primary-gradient);
    border: none;
    color: white;
}

.btn-primary-modern:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    color: white;
}

.btn-success-modern {
    background: var(--success-gradient);
    border: none;
    color: white;
}

.btn-danger-modern {
    background: var(--danger-gradient);
    border: none;
    color: white !important;
}

.btn-info-modern {
    background: var(--info-gradient);
    border: none;
    color: white !important;
}

/* ===== Status Group Modern ===== */
.status-group-modern {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-group-modern .btn {
    flex: 1;
    min-width: 100px;
    border-radius: var(--border-radius-sm);
    padding: 12px 8px;
    font-weight: 500;
    transition: var(--transition-default);
    margin: 0;
}

.status-group-modern .btn.active {
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: scale(1.02);
}

/* ===== Type Cards Modern ===== */
.type-card {
    transition: var(--transition-default);
    border: 3px solid #e9ecef;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: pointer;
}

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

.type-card.selected {
    border-width: 3px;
}

.type-card.selected.border-primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-color: #667eea;
}

.type-card.selected.border-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.08) 0%, rgba(13, 202, 240, 0.08) 100%);
    border-color: #17a2b8;
}

.type-card .card-body {
    padding: 30px 20px;
}

.type-card h4 {
    font-weight: 700;
    margin-bottom: 8px;
}

.type-card i {
    transition: transform 0.3s ease;
}

.type-card:hover i {
    transform: scale(1.2);
}

/* ===== Info Box Modern ===== */
.info-box-modern {
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: none;
    overflow: hidden;
}

.info-box-modern .info-box-icon {
    border-radius: var(--border-radius-md);
}

/* ===== Small Box Modern ===== */
.small-box-modern {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-default);
}

.small-box-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.small-box-modern .inner h3 {
    font-weight: 700;
}

.small-box-modern .icon {
    opacity: 0.3;
}

/* ===== Callout Modern ===== */
.callout-modern {
    border-radius: var(--border-radius-md);
    border-left-width: 5px;
    background: #f8f9fa;
    padding: 16px 20px;
    margin-bottom: 1rem;
}

.callout-modern.callout-secondary { border-left-color: #6c757d; }
.callout-modern.callout-info { border-left-color: #17a2b8; }
.callout-modern.callout-warning { border-left-color: #ffc107; }
.callout-modern.callout-success { border-left-color: #28a745; }
.callout-modern.callout-danger { border-left-color: #dc3545; }
.callout-modern.callout-dark { border-left-color: #343a40; }

/* ===== Sticky Actions ===== */
.sticky-actions {
    position: sticky;
    bottom: 20px;
    z-index: 100;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

/* ===== Sticky Top Modern ===== */
.sticky-top-modern {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

/* ===== Table Modern ===== */
.table-modern {
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.table-modern thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.table-modern thead th {
    border: none;
    font-weight: 600;
    color: #495057;
    padding: 14px 12px;
}

.table-modern tbody tr {
    transition: var(--transition-default);
}

.table-modern tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.table-modern tbody td {
    padding: 12px;
    vertical-align: middle;
    border-color: #f1f3f4;
}

/* ===== DataTable Modern ===== */
.datatable-modern {
    border-collapse: separate;
    border-spacing: 0;
}


.datatable-modern thead th:first-child {
    border-radius: var(--border-radius-sm) 0 0 0;
}

.datatable-modern thead th:last-child {
    border-radius: 0 var(--border-radius-sm) 0 0;
}

/* ===== Badge Modern ===== */
.badge-modern {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.badge-primary-modern {
    background: var(--primary-gradient);
    color: white;
}

.badge-success-modern {
    background: var(--success-gradient);
    color: white;
}

.badge-warning-modern {
    background: var(--warning-gradient);
    color: white;
}

.badge-danger-modern {
    background: var(--danger-gradient);
    color: white;
}

.badge-info-modern {
    background: var(--info-gradient);
    color: white;
}

/* ===== Custom Radio Hidden ===== */
.custom-radio-modern .custom-control-input { display: none; }
.custom-radio-modern .custom-control-label { padding-left: 0; }
.custom-radio-modern .custom-control-label::before,
.custom-radio-modern .custom-control-label::after { display: none; }

/* ===== Gap utilities ===== */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

/* ===== Select2 Modern ===== */
.select2-modern .select2-container--bootstrap4 .select2-selection--single {
    border-radius: var(--border-radius-sm) !important;
    border: 2px solid #e9ecef !important;
    height: auto !important;
    padding: 8px 12px !important;
}

.select2-modern .select2-container--bootstrap4 .select2-selection--single:focus {
    border-color: #667eea !important;
}

/* ===== Content Header Modern ===== */
.content-header-modern {
    background: white;
    padding: 20px 24px;
    margin: -15px -15px 20px -15px;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.content-header-modern h1 {
    font-weight: 700;
    font-size: 1.5rem;
    color: #2c3e50;
}

.content-header-modern .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.content-header-modern .breadcrumb-item a {
    color: #667eea;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out;
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.4s ease-out;
}


/* ===== Action Buttons in Table ===== */
.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-default);
    border: none;
    background: transparent;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn-edit {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.action-btn-edit:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.action-btn-delete {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.action-btn-delete:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.action-btn-view {
    color: #00b894;
    background: rgba(0, 184, 148, 0.1);
}

.action-btn-view:hover {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
}

/* ===== Stats Cards ===== */
.stat-card {
    border-radius: var(--border-radius-lg);
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    transition: var(--transition-default);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.3;
}

.stat-card .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.stat-card-primary { background: var(--primary-gradient); }
.stat-card-info { background: var(--info-gradient); }
.stat-card-success { background: var(--success-gradient); }
.stat-card-warning { background: var(--warning-gradient); }
.stat-card-danger { background: var(--danger-gradient); }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #e9ecef;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #6c757d;
    font-weight: 600;
}

.empty-state p {
    color: #adb5bd;
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: var(--border-radius-lg);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .status-group-modern {
        flex-wrap: wrap;
    }
    
    .status-group-modern .btn {
        min-width: calc(50% - 8px);
    }
    
    .sticky-actions .d-flex {
        flex-direction: column;
    }
    
    .sticky-actions .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .card-modern .card-body {
        padding: 16px;
    }
    
    .main-wrapper {
        padding: 0 10px;
    }

    .stat-card {
        margin-bottom: 15px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .sticky-top-modern,
    .sticky-actions,
    .card-tools {
        display: none !important;
    }
    
    .card-modern {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}




.stat-mini-label{display: block;}
.stat-mini-value{font-weight: bold;}
.nav-tabs .nav-link{
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

/* ===== Type Card Modern (Radio Selection) ===== */
.type-card-modern {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-default);
    background: #fff;
    margin-bottom: 15px;
}

.type-card-modern:hover {
    border-color: #667eea;
    box-shadow: var(--shadow-sm);
}

.type-card-modern.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.type-card-modern .type-card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    margin-right: 15px;
}

.type-card-modern .type-card-icon i {
    font-size: 1.8rem;
    color: #667eea;
}

.type-card-modern .type-card-icon.text-info i {
    color: #17a2b8;
}

.type-card-modern .type-card-content {
    flex: 1;
}

.type-card-modern .type-card-content h5 {
    margin: 0 0 5px;
    font-weight: 600;
    color: #343a40;
}

.type-card-modern .type-card-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
}

.type-card-modern .type-card-check {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-default);
}

.type-card-modern .type-card-check i {
    font-size: 1.5rem;
    color: #667eea;
}

.type-card-modern.active .type-card-check {
    opacity: 1;
}

/* ===== Status Selector Modern ===== */
.status-selector-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-option-modern {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-default);
    background: #fff;
}

.status-option-modern:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.status-option-modern.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-color: #667eea;
}

.status-option-modern .status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
}

.status-option-modern i {
    font-size: 1rem;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.status-option-modern .status-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

/* ===== Callout Modern Variants ===== */
.callout-secondary-modern {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.08) 0%, rgba(108, 117, 125, 0.12) 100%);
    border-left-color: #6c757d !important;
}

.callout-dark-modern {
    background: linear-gradient(135deg, rgba(52, 58, 64, 0.08) 0%, rgba(52, 58, 64, 0.12) 100%);
    border-left-color: #343a40 !important;
}

/* ===== Input Group Modern ===== */
.input-group-modern {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.input-group-modern .form-control-modern {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-modern .input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--border-radius-sm);
    border-bottom-right-radius: var(--border-radius-sm);
}

/* ===== Badge Modern Variants ===== */
.badge-secondary-modern {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

.badge-dark-modern {
    background: linear-gradient(135deg, #343a40 0%, #1d2124 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

/* ===== Gradient Secondary Modern ===== */
.bg-gradient-secondary-modern {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
}

/* ===== Status Timeline Modern ===== */
.status-timeline {
    position: relative;
    padding-left: 0;
}

.status-timeline::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 25px;
    bottom: 25px;
    width: 3px;
    background: linear-gradient(to bottom, #e9ecef 0%, #dee2e6 100%);
    border-radius: 3px;
}

.timeline-item {
    display: flex;
    align-items: center;
    position: relative;
    padding: 12px 12px 12px 50px;
    margin-bottom: 4px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-default);
    background: transparent;
}

.timeline-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: var(--transition-default);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.timeline-marker i {
    font-size: 10px;
    color: #fff;
}

.timeline-item:not(.current):not(.completed) .timeline-marker {
    background: #e9ecef !important;
    box-shadow: none;
}

.timeline-item:not(.current):not(.completed) .timeline-marker i {
    color: #adb5bd;
}

.timeline-item.completed .timeline-marker {
    transform: scale(0.85);
}

.timeline-item.current .timeline-marker {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.timeline-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.timeline-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    transition: var(--transition-default);
}

.timeline-item.current .timeline-title {
    color: #343a40;
    font-weight: 600;
}

.timeline-item.completed .timeline-title {
    color: #adb5bd;
    text-decoration: line-through;
}

.timeline-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-badge.badge-secondary { background: rgba(108, 117, 125, 0.15); color: #6c757d; }
.timeline-badge.badge-info { background: rgba(23, 162, 184, 0.15); color: #17a2b8; }
.timeline-badge.badge-warning { background: rgba(255, 193, 7, 0.15); color: #d39e00; }
.timeline-badge.badge-success { background: rgba(40, 167, 69, 0.15); color: #28a745; }
.timeline-badge.badge-danger { background: rgba(220, 53, 69, 0.15); color: #dc3545; }
.timeline-badge.badge-dark { background: rgba(52, 58, 64, 0.15); color: #343a40; }
.timeline-badge.badge-muted { background: rgba(173, 181, 189, 0.2); color: #adb5bd; }

/* Timeline Pulse Animation */
.timeline-pulse {
    position: absolute;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: inherit;
    animation: timelinePulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes timelinePulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.timeline-item.current .timeline-pulse {
    background: var(--info-gradient);
}

/* Timeline item active state when selected */
.timeline-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
}

.timeline-item.active .timeline-marker {
    transform: scale(1.15);
}
.datatable td{max-width: 400px;}




