.app-header {
	/* Depth 2, Frame 0 */
	box-sizing: border-box;

	/* Auto layout */
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	padding: 12px 40px;
	background-color: #f8f8f8;

	/* width: 1280px; */
	height: 65px;
	border-bottom: 1px solid #e6e8eb;

	/* Inside auto layout */
	flex: none;
	order: 0;
	align-self: stretch;
	flex-grow: 0;

	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
}

.app-header h1 {
	font-family: "Zain", sans-serif;
}

html,
body {
	background-color: #f8f8f8;
	margin: 0;
	position: relative;
	padding-top: 65px;
	width: 100%;
	max-width: 100%;
}

.telegram-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;

	background-color: #0088cc;
	color: white;
	border: 2px solid #0088cc;
	border-radius: 8px;
	padding: 6px 8px;

	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
}

.telegram-btn:hover {
	background-color: white;
	color: #0088cc;
}

.telegram-btn:hover svg path {
	stroke: #0088cc;
}

.telegram-btn svg {
	transition: stroke 0.3s ease;
}

/* Tombol kembali */
.back-btn {
	position: absolute;
	left: 20px;
	display: flex;
	align-items: center;
	gap: 8px;
	background-color: #ffffff;
	border: 1.5px solid #ccc;
	border-radius: 8px;
	cursor: pointer;
	font-family: "Work Sans", sans-serif;
	font-size: 15px;
	color: #333;
	transition: all 0.2s ease;
}

.back-btn p {
	padding: 5px 12px;
}

.back-btn:hover {
	background-color: #f2f2f2;
	border-color: #999;
}

.back-btn svg {
	width: 20px;
	height: 20px;
}

.location {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	justify-content: center;
	margin-top: 2%;
}

/* Header bagian atas yang memuat tombol & judul */
.location-header {
	position: relative;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Judul di tengah */
.location-header h1 {
	margin: 0;
	text-align: center;
	font-family: "Zain", sans-serif;
	font-size: 1.8rem;
	color: #2b2b2b;
}

/* Teks waktu terakhir di bawah judul */
#last-update {
	margin-top: 10px;
	font-size: 0.95rem;
	color: #555;
}

.risk-factor,
.landslide-risk,
.landslide-history {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	justify-content: center;
	align-items: center;
}

.risk {
	display: flex;
	gap: 20px;
	width: 100%;
	align-items: center;
	justify-content: center;
}

.risk-factor h2,
.history h2,
.landslide-risk h2,
.landslide-history h2 {
	font-family: "Zain", sans-serif;
}

.landslide-value {
	display: flex;
	flex-direction: row;
	gap: 60px;
	width: fit-content;
}

.risk-low,
.risk-medium,
.risk-high {
	display: flex;
	flex-direction: row;
	gap: 20px;
	width: fit-content;
	align-items: center;
	font-size: 16px;
	font-family: "Work Sans";
}

.slope-icon,
.vibration-icon,
.moisture-icon {
	display: flex;
	align-items: center;
}

.slope,
.vibration,
.moisture {
	min-width: 15%;
	height: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background-color: white;
	border: 1.5px solid #ddd;
	border-radius: 12px;
	transition: all 0.25s ease;
	padding: 2%;
}

.slope:hover,
.vibration:hover,
.moisture:hover {
	border-color: #0088cc;
	box-shadow: 0 3px 6px rgba(0, 136, 204, 0.2);
	transform: translateY(-3px);
}

.risk-text {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
}

.risk-title {
	display: flex;
	font-weight: bold;
	margin: 0;
	min-width: 140px;
	align-items: center;
	font-family: "Zain", sans-serif;
	justify-content: center;
	border-bottom: 1px solid #e6e8eb;
}

.risk-value {
	margin: 0;
	font-size: 0.95rem;
	color: #444;
	line-height: 1.3;
	text-align: center;
}

.risk-value #kemiringan,
.risk-value #kemiringan-unit,
.risk-value #getaran,
.risk-value #getaran-unit,
.risk-value #kelembapan,
.risk-value #kelembapan-unit {
	font-size: 40px;
}

.history {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.history-btn {
	display: flex;
	align-items: center;
	gap: 16px;

	width: 100%;
	max-width: 360px;
	background: #ffffff;
	border: 1.5px solid #ddd;
	border-radius: 12px;
	padding: 12px 16px;

	cursor: pointer;
	transition: all 0.25s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.history-btn:hover {
	border-color: #0088cc;
	box-shadow: 0 3px 6px rgba(0, 136, 204, 0.2);
	transform: translateY(-2px);
}

.history-btn svg {
	flex-shrink: 0;
}

.history-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

.history-text .title {
	font-weight: 600;
	font-size: 15px;
	text-align: center;
	margin: 0;
}

.history-text .subtitle {
	font-size: 13px;
	color: #444;
	text-align: center;
	margin: 4px 0 0 0;
}

.history-entry {
	width: 100%;
	display: flex;
	justify-content: center;
}

.chart-wrapper {
	display: flex;
	gap: 0;
	margin: 30px 0;
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	border-radius: 14px;
	overflow: hidden;
	background: #f7f7f7; /* sangat soft */
}

/* Sidebar */
.chart-sidebar {
	display: flex;
	flex-direction: column;
	width: 220px;
	background: #ffffff; /* bersih dan lembut */
}

/* Tombol */
.chart-btn {
	width: 100%;
	height: 100%;
	padding: 14px;
	font-size: 16px;
	font-family: "Zain", sans-serif;
	cursor: pointer;
	background: #f0f0f0;
	border: 1px solid #e2e2e2;
	color: #444;
	font-weight: 500;
	text-align: left;
	transition: 0.25s ease;
	text-align: center;
}

/* Hover effect */
.chart-btn:hover {
	background: #f0f0f0;
}

/* Tombol aktif */
.chart-btn.active {
	background: #ffffff;
	font-weight: 600;
	font-family: "Zain", sans-serif;
	border: none;
	box-shadow: none;
	border-right: 0;
	border-left: 0;
	border-top: 0;
	border-bottom: 0;
}

/* Area chart */
.chart-display {
	flex-grow: 1;
	padding: 20px;
	background: #ffffff;
	height: 350px;
}

/* Untuk tabel riwayat longsor */
.history-table {
	width: 100%;
	min-width: 750px;
	margin: 0 auto;
	border-collapse: collapse;
	border-radius: 10px;
	overflow: hidden;
	font-family: sans-serif;
	font-size: 0.95rem;
	background-color: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.table-scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.dataTables_wrapper {
	width: 100%;
	padding: 0 16px;
	box-sizing: border-box;
}

.history-table thead {
	background-color: #f5f2f0;
}

.history-table th,
.history-table td {
	text-align: left;
	padding: 12px 16px;
	border-bottom: 1px solid #e0e0e0;
}

.history-table th {
	color: #6b4c3b;
	font-weight: bold;
}

.history-table td {
	color: #3e2c23;
}

.history-table tbody tr:last-child td {
	border-bottom: none;
}

#history-table tbody tr:hover {
	background-color: #f5f5f5 !important; /* warna abu lembut */
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.app-footer {
	background-color: #5e5e5e; /* abu-abu seperti wireframe */
	color: whitesmoke; /* teks hitam agar kontras */
	text-align: center;
	padding: 10px 0;
	font-size: 14px;
	border-top: 2px solid #bbb;
	margin-top: 30px; /* beri jarak dengan konten atas */
	width: 100%;
}

.app-footer .footer-content p {
	margin: 3px 0; /* rapat antar baris */
	line-height: 1.3; /* tinggi baris lebih padat */
}

@media (max-width: 500px) {
	.landslide-value {
		flex-direction: column;
		gap: 5px;
	}
}

@media (max-width: 520px) {
	.app-header {
		padding: 8px 16px;
		font-size: 10px;
	}

	.risk-value span {
		font-size: 28px;
	}

	.chart-wrapper .chart-sidebar .chart-btn {
		font-size: 14px;
		padding: 10px;
	}

	body {
		padding-top: 220px;
		width: 100%;
	}

	.back-btn {
		position: static;
		align-self: flex-start;
		margin-left: 16px;
		font-size: 10px;
		padding: 2px 4px;
		border-radius: 6px;
		gap: 4px;
	}

	.location-header {
		flex-direction: column;
		gap: 6px;
		padding: 0 12px;
	}

	.location-header h1 {
		padding-top: 4px;
	}
}

@media (max-width: 700px) {
	.app-header {
		font-size: 10px;
		flex-direction: column;
		height: auto;
		padding: 0% 20px;
	}

	.risk {
		flex-direction: column;
		gap: 30px;
	}

	.app-footer {
		font-size: 12px;
		width: 100%;
		padding-left: 8px;
		padding-right: 8px;
	}

	.slope,
	.vibration,
	.moisture {
		min-width: unset;
	}

	.location-header {
		flex-direction: column;
		gap: 8px;
		padding: 0 16px;
	}

	.back-btn {
		position: static;
		align-self: flex-start;
		margin-left: 20px;
		font-size: 12px;
		padding: 4px 8px;
		border-radius: 6px;
		gap: 4px;
	}

	.back-btn svg {
		width: 14px;
		height: 14px;
	}
}

@media (min-width: 768px) {
	.dataTables_wrapper {
		padding: 0 24px;
	}
}

@media (max-width: 875px) {
	.app-header {
		font-size: 10px;
		padding: 0% 20px;
		display: flex;
		flex-direction: column;
		height: auto;
		gap: 8px;
		border-bottom: 1px solid #e6e8eb;
	}

	.telegram-btn {
		margin-bottom: 20px;
	}

	body {
		padding-top: 150px;
	}

	.location h1 {
		font-size: 25px;
	}

	.slope,
	.vibration,
	.moisture {
		width: 100%;
		max-width: 280px;
	}

	.history {
		display: flex;
		flex-direction: column;
		width: 100%;
	}
}

@media (max-width: 1150px) {
	.chart-wrapper {
		flex-direction: column;
		max-width: 80%;
	}

	.chart-wrapper .chart-sidebar {
		width: 100%;
		flex-direction: row;
		overflow-x: auto;
	}
}

@media (max-width: 1227px) {
	.history-entry {
		width: 100%;
	}

	.history-table {
		max-width: 100%;
		display: table;
		margin: 0 auto;
	}

	.dataTables_wrapper {
		width: 90%;
		margin: 0 auto;
	}
}
