/* ----------------------------------------
   STYLE.CSS — Template Dashboard Kewirausahaan
   INTER EDITION (UI Modern & Clean)
   ---------------------------------------- */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

body {
	font-family: "Inter", sans-serif;
	background-color: #f8f9fa;
	font-size: 13.5px;
	color: #212529;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	letter-spacing: 0.1px;
}

/* SIDEBAR */
.sidebar {
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	width: 240px;
	overflow-y: auto;
	overflow-x: hidden;
	background-color: #0d6efd;
	color: #fff;
	transition: all 0.3s ease;
	scrollbar-width: thin; /*tambah*/
	scrollbar-color: #888 #1e1e1e; /*tambah*/
	z-index: 1000;
}
/* --- */
.sidebar::-webkit-scrollbar {
	width: 6px;
}
.sidebar::-webkit-scrollbar-track {
	background: #1e1e1e;
}
.sidebar::-webkit-scrollbar-thumb {
	background-color: #666;
	border-radius: 10px;
}
/*  */
.sidebar .nav {
	padding-left: 0;
	margin-top: 0.25rem;
}

.sidebar .nav-item {
	margin-bottom: 2px; /* jarak antar menu, bisa disesuaikan (default 12px) */
}
/* --- */

.sidebar .brand {
	font-size: 1rem;
	font-weight: 600;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	text-align: center;
	letter-spacing: 0.2px;
}

.sidebar .nav-link {
	color: rgba(255, 255, 255, 0.85);
	display: flex;
	align-items: center;
	/* padding: 8px 18px; */
	padding: 6px 12px; /* tinggi menu lebih ramping */
	/* font-size: 13px; */
	font-size: 0.9rem; /* teks sedikit lebih kecil */
	border-radius: 8px;
	font-weight: 400;
	letter-spacing: 0.2px;
	transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
	background-color: rgba(255, 255, 255, 0.15);
	color: #fff;
}

.sidebar .nav-link i {
	margin-right: 8px;
	/* font-size: 15px; */
	font-size: 1rem;
	opacity: 0.9;
}

/* Huruf mini di depan teks (D, S, A, S) */
.sidenav-mini-icon {
	font-size: 12px;
	font-weight: 500;
	opacity: 0.85;
	margin-right: 6px;
	letter-spacing: 0.4px;
}

/* NAVBAR */
.navbar {
	margin-left: 240px;
	background-color: #fff;
	border-bottom: 1px solid #dee2e6;
	transition: all 0.3s;
}

.navbar .navbar-brand {
	font-size: 14px;
	font-weight: 500;
	color: #0d6efd;
	letter-spacing: 0.2px;
}

.navbar .form-control {
	border-radius: 20px;
	font-size: 12.5px;
	padding: 5px 12px;
}

.dropdown-menu {
	font-size: 13px;
}

/* MAIN CONTENT */
.main-content {
	margin-left: 240px;
	padding: 1.5rem;
	transition: all 0.3s;
}

/* TOGGLE BUTTON */
.toggle-btn {
	border: none;
	background: none;
	font-size: 1.3rem;
	color: #0d6efd;
}

/* CARD */
.card {
	border: none;
	border-radius: 10px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card h6 {
	font-size: 13px;
	font-weight: 500;
	color: #6c757d;
}

.card h4,
.card h3 {
	font-size: 1.35rem;
	font-weight: 600;
}

/* BADGES */
.badge {
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 6px;
}

/* TABLE STYLE */
.table th {
	font-weight: 500;
	font-size: 13px;
	color: #495057;
	border-bottom: 1px solid #dee2e6;
}

.table td {
	font-size: 13px;
	color: #555;
}

/* RESPONSIVE */
@media (max-width: 992px) {
	.sidebar {
		left: -240px;
	}

	.sidebar.show {
		left: 0;
	}

	.navbar,
	.main-content {
		margin-left: 0;
	}
}

/* ANIMASI HALUS */
.sidebar,
.main-content,
.navbar {
	transition: all 0.3s ease-in-out;
}

/* DETAIL VISUAL */
a {
	text-decoration: none;
}

.btn {
	border-radius: 6px;
	font-weight: 500;
	letter-spacing: 0.2px;
}

.btn-primary {
	background-color: #0d6efd;
	border-color: #0d6efd;
}

.btn-primary:hover {
	background-color: #0b5ed7;
	border-color: #0a58ca;
}
/* ----------------------------------------
      DARK MODE THEME — Versi Soft & Elegan
      ---------------------------------------- */

body.dark-mode {
	background-color: #181a1b; /* lembut, bukan hitam pekat */
	color: #e3e3e3;
}

/* Navbar */
body.dark-mode .navbar {
	background-color: #1f2123;
	border-bottom: 1px solid #2c2c2c;
}

body.dark-mode .navbar .navbar-brand {
	color: #e3e3e3;
}

/* Sidebar */
body.dark-mode .sidebar {
	background-color: #202225;
}

body.dark-mode .sidebar .nav-link {
	color: rgba(255, 255, 255, 0.75);
}

body.dark-mode .sidebar .nav-link:hover,
body.dark-mode .sidebar .nav-link.active {
	background-color: rgba(255, 255, 255, 0.12);
	color: #fff;
}

/* Main Card Area */
body.dark-mode .card {
	background-color: #1e1f22; /* abu gelap lembut */
	color: #e5e5e5;
	box-shadow: none;
	border: 1px solid #2b2d30;
}

body.dark-mode .main-content {
	background-color: #181a1b; /* sama lembut dengan body */
}

/* Table */
body.dark-mode .table {
	color: #ccc;
}

body.dark-mode .table thead {
	background-color: #25272a;
	color: #ddd;
}

body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
	background-color: rgba(255, 255, 255, 0.03);
}

/* Form & Input */
body.dark-mode .form-control {
	background-color: #26282b;
	color: #e0e0e0;
	border-color: #34373a;
}

body.dark-mode .form-control:focus {
	background-color: #2b2e31;
	border-color: #4c8bf5;
	color: #fff;
}

/* Tombol & Dropdown */
body.dark-mode .btn-outline-secondary {
	color: #e0e0e0;
	border-color: #555;
}

body.dark-mode .btn-outline-secondary:hover {
	background-color: #2b2e31;
}

body.dark-mode .dropdown-menu {
	background-color: #202225;
	border-color: #2b2d30;
}

body.dark-mode .dropdown-item {
	color: #e0e0e0;
}

body.dark-mode .dropdown-item:hover {
	background-color: rgba(255, 255, 255, 0.08);
}

/* Badge */
body.dark-mode .badge {
	opacity: 0.9;
}

/* Smooth transition effect */
body,
.navbar,
.sidebar,
.card,
.main-content {
	transition: background-color 0.3s ease, color 0.3s ease;
}

/* STATISTIC CARD */
.stat-card {
	background: #ffffff;
	border: none;
	border-radius: 16px;
	padding: 1.2rem 1rem;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 1rem;
	transition: all 0.3s ease;
}

.stat-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.icon-box {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: linear-gradient(145deg, #2b2b2b, #1e1e1e);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 20px;
	box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.05),
		0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-card .content small {
	font-size: 12.5px;
	color: #6c757d;
}

.stat-card .content h4 {
	font-size: 1.35rem;
	margin: 4px 0;
}

/* Dark Mode Support */
body.dark-mode .stat-card {
	background: #1e1f22;
	color: #e0e0e0;
	box-shadow: none;
	border: 1px solid #2b2d30;
}

body.dark-mode .icon-box {
	background: linear-gradient(145deg, #2a2c2e, #1c1d1f);
	color: #eaeaea;
}

body.dark-mode .stat-card .content small {
	color: #aaa;
}

/* ===========================
      SIDEBAR MINI COLLAPSIBLE
      =========================== */
.sidebar {
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	width: 240px;
	background: linear-gradient(180deg, #2c2c2c, #1f1f1f);
	color: #fff;
	transition: all 0.3s ease;
	z-index: 1000;
	border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .brand {
	font-weight: 600;
	font-size: 1.1rem;
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar .profile img {
	border: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar .nav-link {
	color: rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 10px 18px;
	border-radius: 8px;
	margin: 5px 10px;
	transition: all 0.3s ease;
}

.sidebar .nav-link i {
	font-size: 1.2rem;
	margin-right: 12px;
}

.sidebar .nav-link span {
	font-size: 13px;
	transition: opacity 0.2s ease, margin 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
	background-color: #e91e63;
	color: #fff;
}

/* ===== Mini Mode ===== */
.sidebar.mini {
	width: 80px;
}

.sidebar.mini .nav-link {
	justify-content: center;
}

.sidebar.mini .nav-link i {
	margin-right: 0;
}

.sidebar.mini .nav-link span {
	opacity: 0;
	margin-left: -20px;
	pointer-events: none;
}

.sidebar.mini .brand,
.sidebar.mini .profile {
	transition: all 0.3s ease;
}

.sidebar.mini .brand {
	font-size: 0;
}

.sidebar.mini .profile img {
	width: 36px;
	height: 36px;
}

.sidebar.mini .nav-link:hover span {
	opacity: 1;
	margin-left: 8px;
	background-color: transparent;
}

/* Toggle Button */
/* .toggle-sidebar-btn {
     position: fixed;
     top: 15px;
     left: 260px;
     z-index: 1100;
     transition: left 0.3s ease;
   } */

.sidebar.mini ~ .toggle-sidebar-btn {
	left: 100px;
}

/* Main Content */
.main-content {
	margin-left: 240px;
	transition: margin-left 0.3s ease;
}

.sidebar.mini ~ .main-content {
	margin-left: 80px;
}
/* Tooltip styling adjustment for dark sidebar */
.tooltip {
	font-size: 12px;
	font-family: "Inter", sans-serif;
	letter-spacing: 0.2px;
	opacity: 0.95;
}

.tooltip-inner {
	background-color: #0d6efd;
	color: #fff;
	border-radius: 6px;
	padding: 4px 8px;
}

.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before,
.bs-tooltip-end .tooltip-arrow::before {
	border-right-color: #0d6efd !important;
}

/* Hide tooltips in full mode */
.sidebar:not(.mini) [data-bs-toggle="tooltip"]::after {
	display: none;
}

/* ==========================================
      RESPONSIVE SIDEBAR UNTUK MOBILE
      ========================================== */

@media (max-width: 992px) {
	.sidebar {
		position: fixed;
		top: 0;
		left: -260px; /* disembunyikan default */
		height: 100vh;
		width: 240px;
		background: linear-gradient(180deg, #2c2c2c, #1f1f1f);
		transition: all 0.35s ease;
		z-index: 1050;
	}

	.sidebar.show {
		left: 0; /* muncul dari kiri */
		box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
	}

	/* Backdrop saat sidebar aktif */
	.sidebar-backdrop {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background: rgba(0, 0, 0, 0.45);
		z-index: 1040;
		display: none;
	}

	.sidebar-backdrop.show {
		display: block;
	}

	/* Pastikan konten utama tidak ketindihan */
	.main-content {
		margin-left: 0 !important;
		padding-top: 80px;
	}

	.toggle-btn {
		font-size: 1.4rem;
		color: #0d6efd;
	}
}

/* back up css */
/* ====== SUBMENU STYLE ====== */
.submenu {
	transition: all 0.35s ease;
}

.sidebar .submenu .nav-link {
	font-size: 13px;
	padding: 8px 16px 8px 32px;
	color: rgba(255, 255, 255, 0.8);
}

.sidebar .submenu .nav-link i {
	font-size: 0.95rem;
	margin-right: 8px;
}

.sidebar .submenu .nav-link:hover {
	background-color: rgba(255, 255, 255, 0.12);
	color: #fff;
}

/* Icon panah (chevron) */
.sidebar .nav-link .toggle-icon {
	font-size: 0.9rem;
	transition: transform 0.3s ease;
}

.sidebar .nav-link.collapsed .toggle-icon {
	transform: rotate(0deg);
}

.sidebar .nav-link[aria-expanded="true"] .toggle-icon {
	transform: rotate(180deg);
}
