/* Dashboard */
.ct-area {
    fill-opacity: .33 !important;
}
.ct-series-a .ct-area, .ct-series-a .ct-slice-pie {
    fill: #7a6fbe !important;
}
.ct-golden-section {
    overflow: hidden;
}
.ct-line {
    stroke-width: 3px !important;
}
.ct-point {
    stroke-width: 7px !important;
}

/* Calender */
.fc-event {
	border-radius: 2px !important;
	border: none !important;
	cursor: move !important;
	font-size: 0.8125rem !important;
	margin: 5px 7px !important;
}
.fc-day-grid-event .fc-time {
    font-weight: 500 !important;
}
.fc-event .fc-content {
	color: #fff !important;
}
tr:first-child>td>.fc-day-grid-event {
    margin-top: 2px !important;
}

/* Range Slider */
.irs--modern .irs-from:before, .irs--modern .irs-single:before, .irs--modern .irs-to:before {
    border-top-color: #626ed4 !important;
}
.irs--modern .irs-line {
    background: #dee2e6 !important;
    border-color: #dee2e6 !important;
}
.irs--modern .irs-max, .irs--modern .irs-min {
    color: #adb5bd !important;
    background: #f8f9fa !important;
    font-size: 11px !important;
}
.irs--modern .irs-handle>i:nth-child(1) {
    width: 8px !important;
    height: 8px !important;
}
.irs--modern .irs-bar, .irs--modern .irs-from, .irs--modern .irs-single, .irs--modern .irs-to {
    font-size: 11px !important;
}
.irs--modern .irs-grid-text {
    font-size: 11px !important;
    color: #ced4da !important;
}
.irs--modern .irs-handle {
    border: 1px solid #a3adc1;
    border-top-width: 0 !important;
}
.irs--square .irs-line {
    background: #f6f6f6 !important;
    border-color: #f6f6f6 !important;
}
.irs--square .irs-max, .irs--square .irs-min {
    color: #ced4da !important;
    background: #f6f6f6 !important;
    font-size: 11px !important;
}
.irs--square .irs-bar, .irs--square .irs-from, .irs--square .irs-single, .irs--square .irs-to {
    background: #556ee6!important;
    font-size: 11px !important;
}
.irs--square .irs-handle {
    border: 2px solid #556ee6 !important;
    width: 12px !important;
    height: 12px !important;
    top: 26px !important;
    background-color: #fff!important;
}
.irs--square .irs-grid-text {
    font-size: 11px;
    color: #ced4da !important;
}

/* Sweet Alert */
.swal2-styled:focus {
    box-shadow: none !important;
}

/* Form Advanced */
.select2-container .select2-selection--single {
    background-color: #fff !important;
    border: 1px solid #ced4da !important;
    height: 38px !important;
}
.select2-container .select2-selection--single:focus {
	outline: none !important;
}
.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: 12px !important;
    color: #495057 !important;
}
.select2-container .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
    width: 34px !important;
    right: 3px !important;
}
.select2-container .select2-selection--single .select2-selection__arrow b {
	border-color: #adb5bd transparent transparent transparent !important;
	border-width: 6px 6px 0 6px !important;
}
.select2-container--open .select2-selection--single .select2-selection__arrow b {
	border-color: transparent transparent #adb5bd transparent !important;
	border-width: 0 6px 6px 6px !important;
}
.select2-container--default .select2-results__option[aria-selected=true] {
	background-color: #f8f9fa !important;
	color: #16181b !important;
}
.select2-container--default .select2-results__option[aria-selected=true]:hover {
	background-color: #626ed4 !important;
	color: #fff !important;
}
.select2-results__option {
	padding: 6px 12px !important;
}
.select2-dropdown {
	border-color:rgba(0,0,0,.15) !important;
}
.select2-container .select2-selection--multiple {
	min-height: 38px !important;
	background-color: #fff !important;
	border: 1px solid #ced4da !important;
}
.select2-container .select2-selection--multiple .select2-selection__rendered {
	padding: 2px 10px !important;
}
.select2-container .select2-selection--multiple .select2-search__field {
	border: 0;
	color: #495057 !important;
}
.select2-container .select2-selection--multiple .select2-search__field::-webkit-input-placeholder {
	color: #495057 !important;
}
.select2-container .select2-selection--multiple .select2-search__field::-moz-placeholder {
	color: #495057 !important;
}
.select2-container .select2-selection--multiple .select2-search__field:-ms-input-placeholder {
	color: #495057 !important;
}
.select2-container .select2-selection--multiple .select2-search__field::-ms-input-placeholder {
	color: #495057 !important;
}
.select2-container .select2-selection--multiple .select2-search__field::placeholder {
	color: #495057 !important;
}
.select2-container .select2-selection--multiple .select2-selection__choice {
	background-color: #e9ecef !important;
	border: 1px solid #dee2e6 !important;
	border-radius: 1px !important;
	padding: 0 7px !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ced4da !important;
    background-color: #fff !important;
    color: #74788d !important;
    outline: 0 !important;
}

/* color */
.sp-hidden {
	display: none !important;
}

/* Form File Upload */
.dropzone {
	min-height: 230px !important;
    border-style: dashed !important;
	background: transparent !important;
}


/* Chart Chartlist */
.ct-grid {
    stroke: rgba(52,58,64,.09) !important;
    stroke-width: 1px;
    stroke-dasharray: 3px !important;
}
.ct-series-c .ct-area, .ct-series-c .ct-slice-pie {
    fill: #343a40 !important;
}
.ct-series-b .ct-area, .ct-series-b .ct-slice-pie {
    fill: #f8b425 !important;
}

/* C3 Chart */
.c3 path.domain, .c3-axis.c3-axis-x line, .c3-axis.c3-axis-y line {
    stroke: #ced4da !important;
}
.c3-areas-Pageview .c3-area {
    opacity: .2 !important;
}
.c3-legend-item {
    font-size: 14px !important;
}
.c3-chart-arcs-title {
    font-size: 18px !important;
}
/* Kendali primary = blue */
:root,
[data-theme-mode=default],
[data-bs-theme=light] {
    --bs-primary: #2563eb !important;
    --bs-primary-rgb: 37, 99, 235 !important;
    --bs-primary-text-emphasis: #1e3a8a !important;
    --bs-primary-bg-subtle: #dbeafe !important;
    --bs-primary-border-subtle: #93c5fd !important;
    --bs-link-color: #2563eb !important;
    --bs-link-hover-color: #1d4ed8 !important;
}
.btn-primary {
    --bs-btn-bg: #2563eb;
    --bs-btn-border-color: #2563eb;
    --bs-btn-hover-bg: #1d4ed8;
    --bs-btn-hover-border-color: #1d4ed8;
    --bs-btn-active-bg: #1e40af;
    --bs-btn-active-border-color: #1e40af;
    --bs-btn-disabled-bg: #2563eb;
    --bs-btn-disabled-border-color: #2563eb;
}
.bg-primary { background-color: #2563eb !important; }
.text-primary { color: #2563eb !important; }
.border-primary { border-color: #2563eb !important; }
.badge.bg-primary,
.page-item.active .page-link,
.nav-pills .nav-link.active,
.form-check-input:checked {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

/* Kendali layout fixes (Lexa LTR) */
#layout-wrapper{min-height:100vh;position:relative}
.vertical-menu{left:0;right:auto}
.main-content{margin-left:240px!important;margin-right:0!important;overflow:visible!important}
.footer{left:240px!important;right:0!important}
@media (max-width:992px){.main-content{margin-left:0!important}.footer{left:0!important}}
.vertical-collpsed .main-content{margin-left:70px!important;margin-right:0!important}
.vertical-collpsed .footer{left:70px!important;right:0!important}
body[data-sidebar-size=small] .main-content{margin-left:160px!important}
body[data-sidebar-size=small] .footer{left:160px!important}

/* ========== Kendali UI polish ========== */
:root {
    --kd-surface: #ffffff;
    --kd-muted: #64748b;
    --kd-border: #e2e8f0;
    --kd-soft: #f8fafc;
    --kd-ink: #0f172a;
    --kd-radius: 14px;
    --kd-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
}

body {
    background: linear-gradient(180deg, #f1f5f9 0%, #eef2f7 40%, #f8fafc 100%) !important;
    color: var(--kd-ink);
}

.page-content {
    padding: calc(70px + 1.5rem) 1rem 4rem !important;
}

.page-title-box {
    margin-bottom: 1.25rem !important;
    padding-bottom: .25rem;
}
.page-title-box h4 {
    font-weight: 700 !important;
    letter-spacing: -.02em;
    color: var(--kd-ink) !important;
    margin-bottom: .25rem !important;
}
.page-title-box .breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}
.kd-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.kd-page-header .kd-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.03em;
    margin: 0;
    color: var(--kd-ink);
}
.kd-page-header .kd-subtitle {
    color: var(--kd-muted);
    margin: .2rem 0 0;
    font-size: .925rem;
}

.card {
    border: 1px solid var(--kd-border) !important;
    border-radius: var(--kd-radius) !important;
    box-shadow: var(--kd-shadow) !important;
    background: var(--kd-surface) !important;
}
.card .card-body {
    padding: 1.25rem 1.35rem !important;
}
.card-title {
    font-weight: 650 !important;
    letter-spacing: -.01em;
    color: var(--kd-ink) !important;
}

.kd-stat {
    position: relative;
    overflow: hidden;
    border: 0 !important;
    border-radius: var(--kd-radius) !important;
    box-shadow: var(--kd-shadow) !important;
    min-height: 118px;
}
.kd-stat .card-body {
    position: relative;
    z-index: 1;
}
.kd-stat::after {
    content: "";
    position: absolute;
    right: -20px;
    top: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
}
.kd-stat .kd-stat-label {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .72rem;
    font-weight: 600;
    opacity: .85;
    margin-bottom: .55rem;
}
.kd-stat .kd-stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -.03em;
    margin: 0;
    line-height: 1.2;
}
.kd-stat .kd-stat-meta {
    margin-top: .45rem;
    font-size: .8rem;
    opacity: .8;
}
.kd-stat-primary { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important; color: #fff !important; }
.kd-stat-slate { background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important; color: #fff !important; }
.kd-stat-teal { background: linear-gradient(135deg, #0f766e 0%, #115e59 100%) !important; color: #fff !important; }
.kd-stat-amber { background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important; color: #fff !important; }

.table {
    --bs-table-bg: transparent;
}
.table > :not(caption) > * > * {
    padding: .85rem .9rem !important;
    vertical-align: middle !important;
}
.table thead th {
    font-size: .72rem !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--kd-muted) !important;
    font-weight: 650 !important;
    border-bottom-width: 1px !important;
    background: var(--kd-soft) !important;
    white-space: nowrap;
}
.table tbody tr {
    transition: background-color .15s ease;
}
.table tbody tr:hover {
    background: #f8fafc !important;
}
.table-bordered {
    border-color: var(--kd-border) !important;
}
.table-bordered th {
    background: var(--kd-soft) !important;
    width: 34%;
    color: var(--kd-muted) !important;
    font-weight: 600 !important;
}

.badge {
    font-weight: 600 !important;
    letter-spacing: .02em;
    padding: .4em .65em !important;
    border-radius: 999px !important;
}
.badge.bg-info { background: #dbeafe !important; color: #1d4ed8 !important; }
.badge.bg-secondary { background: #e2e8f0 !important; color: #334155 !important; }
.badge.bg-success { background: #dcfce7 !important; color: #15803d !important; }
.badge.bg-warning { background: #fef3c7 !important; color: #b45309 !important; }
.badge.bg-danger { background: #fee2e2 !important; color: #b91c1c !important; }
.badge.bg-primary { background: #dbeafe !important; color: #1d4ed8 !important; border-color: transparent !important; }

.btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
}
.btn-sm { border-radius: 8px !important; }
.btn-light {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}
.btn-outline-primary {
    border-width: 1.5px !important;
}
.kd-action-list .btn {
    justify-content: flex-start;
    text-align: left;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    gap: .65rem;
}
.kd-action-list .btn i {
    font-size: 1.15rem;
    width: 1.25rem;
}

.form-control, .form-select {
    border-radius: 10px !important;
    border-color: #cbd5e1 !important;
    min-height: 42px;
    box-shadow: none !important;
}
.form-control:focus, .form-select:focus {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15) !important;
}
.form-label {
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: .4rem !important;
    font-size: .875rem;
}
.form-text { color: var(--kd-muted) !important; }

.alert {
    border-radius: 12px !important;
    border: 1px solid transparent !important;
}
.alert-info {
    background: #eff6ff !important;
    color: #1e3a8a !important;
    border-color: #bfdbfe !important;
}
.alert-success {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border-color: #bbf7d0 !important;
}
.alert-warning {
    background: #fffbeb !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}
.alert-light {
    background: var(--kd-soft) !important;
    border-color: var(--kd-border) !important;
}

.item-row, .kd-item-row {
    border: 1px solid var(--kd-border) !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #fff, #f8fafc) !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.kd-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--kd-muted);
}
.kd-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: .75rem;
    opacity: .55;
}

.modal-content {
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(15,23,42,.18) !important;
}
.modal-header, .modal-footer {
    border-color: var(--kd-border) !important;
}

.navbar-header {
    box-shadow: 0 1px 0 rgba(15,23,42,.06) !important;
}
.vertical-menu {
    box-shadow: 4px 0 24px rgba(15,23,42,.06) !important;
}

.kd-money {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -.02em;
}
.kd-soft-panel {
    background: var(--kd-soft);
    border: 1px solid var(--kd-border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}

@media (max-width: 768px) {
    .kd-stat .kd-stat-value { font-size: 1.35rem; }
    .page-content { padding: calc(70px + 1rem) .85rem 3rem !important; }
    .kd-page-header .kd-title { font-size: 1.25rem; }
}
