/* =========================================================
   modern-erp-3-luxury.css
   Almost Black → Deep Purple (Premium / Luxury)
   ========================================================= */
:root {
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-light: rgba(124, 58, 237, 0.12);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --text: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg-body: #f9f6f0;
    --bg-card: #ffffff;
    --radius: 10px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: var(--text) !important;
    background-color: var(--bg-body) !important;
    font-size: 14px;
}
.page-wrapper {
    background-color: var(--bg-body) !important;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.container-fluid { padding: 20px 25px !important; }
.topbar {
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    border-bottom: 1px solid var(--border) !important;
    z-index: 50;
}
.topbar .navbar { background: transparent !important; }
.topbar .nav-link { color: var(--text) !important; }
.topbar .profile-pic { border: 2px solid #e2e8f0 !important; }

/* ===== SIDEBAR - LUXURY ===== */
.left-sidebar {
    background: linear-gradient(165deg, #020617 0%, #1e1b4b 40%, #4c1d95 100%) !important;
    border-right: none !important;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3) !important;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.sidebar-nav ul li a {
    color: #ffffff !important;
    font-weight: 500;
    border-radius: 10px;
    margin: 4px 12px;
    padding: 11px 15px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.sidebar-nav ul li a i {
    color: #ffffff !important;
    margin-right: 12px;
    width: 20px;
    text-align: center;
    transition: all 0.25s ease !important;
}
.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active,
.sidebar-nav ul li.active > a {
    background: linear-gradient(135deg, #7c3aed, #a855f7, #ec4899) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
    transform: translateX(3px);
}
.sidebar-nav ul li a:hover i,
.sidebar-nav ul li a.active i,
.sidebar-nav ul li.active > a i {
    color: #ffffff !important;
    transform: scale(1.1);
}
.sidebar-nav ul li ul { background: transparent !important; }
.sidebar-nav ul li ul li a {
    padding-left: 32px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    margin: 2px 10px !important;
    color: #ddd6fe !important;
    font-size: 13.5px;
    border-radius: 8px;
    transition: all 0.25s ease !important;
}
.sidebar-nav ul li ul li a:hover,
.sidebar-nav ul li ul li a.active {
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.45);
}
.sidebar-nav ul li ul li a i { color: #ddd6fe !important; }
.sidebar-nav .has-arrow::after { color: #c4b5fd !important; }
.sidebar-nav ul li a:hover.has-arrow::after,
.sidebar-nav ul li a.active.has-arrow::after { color: #ffffff !important; }

/* Collapsed */
body.mini-sidebar .left-sidebar {
    background: linear-gradient(165deg, #020617 0%, #1e1b4b 40%, #4c1d95 100%) !important;
    width: 70px !important;
}
body.mini-sidebar .sidebar-nav > ul > li > a {
    padding: 12px 0 !important;
    text-align: center !important;
    margin: 5px 8px !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    background: transparent !important;
}
body.mini-sidebar .sidebar-nav > ul > li > a i {
    margin-right: 0 !important;
    font-size: 18px !important;
    color: #ffffff !important;
}
body.mini-sidebar .sidebar-nav > ul > li > a .hide-menu { display: none !important; }
body.mini-sidebar .sidebar-nav > ul > li > a:hover,
body.mini-sidebar .sidebar-nav > ul > li.active > a,
body.mini-sidebar .sidebar-nav > ul > li > a.active {
    background: linear-gradient(135deg, #7c3aed, #a855f7, #ec4899) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.55);
}
body.mini-sidebar .sidebar-nav > ul > li > a:hover i,
body.mini-sidebar .sidebar-nav > ul > li.active > a i { color: #ffffff !important; }
body.mini-sidebar .sidebar-nav ul li ul {
    position: absolute !important;
    left: 70px !important;
    top: 0 !important;
    width: 220px !important;
    background: linear-gradient(165deg, #020617, #1e1b4b) !important;
    border-radius: 0 14px 14px 0 !important;
    box-shadow: 10px 5px 30px rgba(0, 0, 0, 0.4) !important;
    padding: 10px 0 !important;
    z-index: 999 !important;
    display: none;
}
body.mini-sidebar .sidebar-nav ul li:hover > ul,
body.mini-sidebar .sidebar-nav ul li.active > ul,
body.mini-sidebar .sidebar-nav ul li.selected > ul { display: block !important; }
body.mini-sidebar .sidebar-nav ul li ul li a {
    display: block !important;
    padding: 10px 18px !important;
    margin: 2px 10px !important;
    border-radius: 8px !important;
    color: #e9d5ff !important;
    background: transparent !important;
    text-align: left !important;
    font-size: 13.5px !important;
    white-space: nowrap;
}
body.mini-sidebar .sidebar-nav ul li ul li a:hover,
body.mini-sidebar .sidebar-nav ul li ul li a.active {
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
    color: #ffffff !important;
}
body.mini-sidebar .sidebar-nav ul li:hover > a,
body.mini-sidebar .sidebar-nav ul li.active > a {
    background: linear-gradient(135deg, #7c3aed, #a855f7, #ec4899) !important;
    color: #ffffff !important;
}

/* Rest same */
.card {
    background: var(--bg-card) !important;
    border: none !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    margin-bottom: 24px !important;
    transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}
.card:hover { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important; }
.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 1rem 1.35rem !important;
    font-weight: 600;
    color: var(--dark);
    border-radius: var(--radius) var(--radius) 0 0 !important;
}
.card-body { padding: 1.35rem !important; }
.btn {
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
    padding: 0.48rem 1.15rem !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    box-shadow: none !important;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 0.32rem 0.85rem !important; font-size: 13px !important; }
.btn-primary { background-color: var(--primary) !important; color: #fff !important; }
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover) !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4) !important;
    color: #fff !important;
}
.btn-success { background-color: var(--success) !important; }
.btn-success:hover { background-color: #059669 !important; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important; }
.btn-danger { background-color: var(--danger) !important; }
.btn-danger:hover { background-color: #dc2626 !important; box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important; }
.btn-warning { background-color: var(--warning) !important; color: #fff !important; }
.btn-info { background-color: var(--info) !important; }
.btn-secondary, .btn-default { background-color: #e2e8f0 !important; color: var(--text) !important; }
.btn-secondary:hover, .btn-default:hover { background-color: #cbd5e1 !important; }
.btn-outline-primary {
    background: transparent !important;
    border: 1.5px solid var(--primary) !important;
    color: var(--primary) !important;
}
.btn-outline-primary:hover { background: var(--primary) !important; color: #fff !important; }
.form-control, .form-control-sm,
.select2-container--default .select2-selection--single,
.bootstrap-select .dropdown-toggle {
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border) !important;
    background-color: #fff !important;
    color: var(--text) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.form-control { height: calc(2.1rem + 2px); padding: 0.45rem 0.9rem; }
.form-control-sm { height: calc(1.8rem + 2px) !important; padding: 0.3rem 0.7rem !important; font-size: 13px !important; }
.form-control:focus, .form-control-sm:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
    outline: none !important;
}
label { font-weight: 500 !important; color: var(--text) !important; margin-bottom: 0.35rem !important; }
.form-group { margin-bottom: 1.1rem !important; }
.select2-container--default .select2-selection--single { height: 38px !important; padding: 4px 8px !important; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 28px !important; color: var(--text) !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px !important; }
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
}
.alert {
    border-radius: var(--radius-sm) !important;
    border: none !important;
    border-left: 4px solid !important;
    padding: 0.9rem 1.15rem !important;
    font-weight: 500;
}
.alert-success { background: #ecfdf5 !important; color: #065f46 !important; border-left-color: var(--success) !important; }
.alert-danger, .alert-error { background: #fef2f2 !important; color: #991b1b !important; border-left-color: var(--danger) !important; }
.alert-warning { background: #fffbeb !important; color: #92400e !important; border-left-color: var(--warning) !important; }
.alert-info { background: #eff6ff !important; color: #1e40af !important; border-left-color: var(--info) !important; }
.alert-primary { background: #f3e8ff !important; color: #6b21a8 !important; border-left-color: var(--primary) !important; }
.table { background: #fff; border-radius: var(--radius); overflow: hidden; }
.table thead th {
    background: #f8fafc !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.85rem 1rem !important;
    vertical-align: middle !important;
}
.table td {
    padding: 0.85rem 1rem !important;
    vertical-align: middle !important;
    border-top: 1px solid #f1f5f9 !important;
    color: var(--text);
}
.table-hover tbody tr:hover { background-color: #f8fafc !important; }
.table-striped tbody tr:nth-of-type(odd) { background-color: #fafbfc !important; }
.dataTables_wrapper .dataTables_filter input {
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border) !important;
    padding: 0.35rem 0.75rem !important;
}
.dataTables_wrapper .dataTables_length select {
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border) !important;
}
.modal-content {
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
}
.modal-header {
    border-bottom: 1px solid var(--border) !important;
    padding: 1.1rem 1.4rem !important;
    border-radius: 14px 14px 0 0 !important;
}
.modal-title { font-weight: 600; color: var(--dark); }
.modal-body { padding: 1.4rem !important; }
.modal-footer {
    border-top: 1px solid var(--border) !important;
    padding: 1rem 1.4rem !important;
    border-radius: 0 0 14px 14px !important;
}
.badge { border-radius: 6px !important; font-weight: 500 !important; padding: 0.35em 0.65em !important; }
.badge-primary { background: var(--primary) !important; }
.badge-success { background: var(--success) !important; }
.badge-danger  { background: var(--danger) !important; }
.badge-warning { background: var(--warning) !important; color: #fff !important; }
.badge-info    { background: var(--info) !important; }
.page-item.active .page-link { background-color: var(--primary) !important; border-color: var(--primary) !important; }
.page-link { color: var(--primary) !important; border-radius: 6px !important; margin: 0 2px; transition: background-color 0.2s ease !important; }
.page-link:hover { background-color: var(--primary-light) !important; }
.dropdown-menu {
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}
.dropdown-item {
    padding: 0.55rem 1.1rem !important;
    font-weight: 500;
    color: var(--text) !important;
    transition: background-color 0.2s ease !important;
}
.dropdown-item:hover { background: var(--primary-light) !important; color: var(--primary) !important; }
.footer {
    background: transparent !important;
    color: var(--text-muted) !important;
    font-size: 13px;
    border-top: 1px solid var(--border);
    padding: 15px 25px !important;
}
.preloader { background: rgba(255,255,255,0.85) !important; }
.shadow-soft { box-shadow: var(--shadow) !important; }
.rounded-modern { border-radius: var(--radius) !important; }


/* =========================================================
   CARD HEADER - Luxury Gradient (matching sidebar)
   ========================================================= */

.card-header,
.card-header.bg-white,
.card .card-header {
    background: linear-gradient(135deg, #7c3aed, #a855f7, #ec4899) !important;
    color: #ffffff !important;
    border-bottom: none !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.35rem !important;
}

/* Make sure text and icons inside header are white */
.card-header h4,
.card-header h5,
.card-header h6,
.card-header .card-title,
.card-header span,
.card-header a,
.card-header i,
.card-header .text-themecolor {
    color: #ffffff !important;
}

/* Optional: soft shadow under header */
.card-header {
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
}

.select2-container {
    border: none !important;
    padding: 0px !important;
}
