/* =============================================
   SIPRAJAB Frontend Modern Theme
   ============================================= */

:root {
	--primary: #1d3f8f;
	--primary-dark: #16306e;
	--primary-light: #2f5bd0;
	--accent: #ff8a00;
	--accent-dark: #e67700;
	--dark: #1b2440;
	--text: #33415c;
	--muted: #6b7a99;
	--border: #e4e9f2;
	--bg-soft: #f5f7fb;
	--white: #ffffff;
	--radius: 10px;
	--shadow: 0 6px 20px rgba(27, 36, 64, 0.08);
	--shadow-lg: 0 16px 40px rgba(27, 36, 64, 0.14);
}

html, body {
	min-height: 100vh;
}

body {
	font-family: 'Inter', 'Fira Sans', Arial, sans-serif;
	background: var(--bg-soft);
	color: var(--text);
	padding-top: 56px;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--primary);
}
a:hover, a:focus {
	color: var(--primary-dark);
}

/* ============ Top Bar ============ */
#topbar {
	background: var(--dark);
	color: #c7d0e4;
	font-size: 12px;
	line-height: 34px;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1200;
}
#topbar .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
#topbar a {
	color: #c7d0e4;
}
#topbar a:hover {
	color: #fff;
}

/* ============ Navbar ============ */
.navbar-frontend {
	background: #fff;
	border: none;
	border-bottom: 1px solid var(--border);
	box-shadow: 0 2px 12px rgba(27, 36, 64, 0.06);
	min-height: 56px;
	top: 34px;
}
.navbar-frontend .navbar-brand {
	height: 56px;
	padding: 5px 15px;
	display: flex;
	align-items: center;
}
.navbar-frontend .navbar-brand img {
	height: 42px;
}
.navbar-frontend .navbar-nav > li > a {
	color: var(--text);
	font-weight: 600;
	font-size: 13px;
	padding: 17px 14px;
}
.navbar-frontend .navbar-nav > li > a:hover,
.navbar-frontend .navbar-nav > li.open > a,
.navbar-frontend .navbar-nav > li.active > a {
	background: transparent;
	color: var(--primary);
}
.navbar-frontend .dropdown-menu {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	padding: 8px;
}
.navbar-frontend .dropdown-menu > li > a {
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 13px;
	color: var(--text);
}
.navbar-frontend .dropdown-menu > li > a:hover {
	background: var(--bg-soft);
	color: var(--primary);
}
.navbar-frontend .dropdown-menu .label {
	margin-left: 4px;
	font-weight: 600;
}
.navbar-frontend .nav-cta {
	padding-left: 8px;
}
.btn-nav-cta {
	display: inline-block;
	background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
	color: #fff !important;
	border-radius: 8px;
	padding: 9px 18px !important;
	margin: 10px 0;
	font-weight: 700 !important;
	box-shadow: 0 4px 12px rgba(29, 63, 143, 0.3);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	line-height: 1.4;
}
.btn-nav-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(29, 63, 143, 0.4);
}
@media (max-width: 767px) {
	body { padding-top: 68px; }
	#topbar { position: relative; }
	.navbar-frontend { top: 0; }
	.navbar-frontend .navbar-nav > li > a { padding: 10px 15px; }
	.btn-nav-cta { margin: 10px 15px; }
}

/* ============ Hero ============ */
.hero {
	position: relative;
	min-height: 420px;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	margin-bottom: 30px;
	border-radius: 0 0 20px 20px;
	overflow: hidden;
}
.hero--gradient {
	background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #4a74d8 100%);
}
.hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(22, 48, 110, 0.92) 0%, rgba(29, 63, 143, 0.72) 50%, rgba(29, 63, 143, 0.35) 100%);
}
.hero-content {
	position: relative;
	z-index: 2;
}
.hero-text {
	max-width: 660px;
	color: #fff;
}
.hero-text h1 {
	font-size: 44px;
	font-weight: 800;
	line-height: 1.1;
	margin: 0 0 10px;
	text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.hero-sub {
	font-size: 18px;
	font-weight: 600;
	color: rgba(255,255,255,0.9);
	margin-bottom: 16px;
}
.hero-desc {
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255,255,255,0.85);
	margin-bottom: 26px;
}
.hero-actions .btn-hero {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 14px;
	margin-right: 10px;
	margin-bottom: 8px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-hero-primary {
	background: var(--accent);
	color: #fff;
	box-shadow: 0 8px 20px rgba(255, 138, 0, 0.4);
}
.btn-hero-primary:hover {
	background: var(--accent-dark);
	color: #fff;
	transform: translateY(-2px);
}
.btn-hero-outline {
	background: rgba(255,255,255,0.12);
	border: 1px solid rgba(255,255,255,0.6);
	color: #fff;
}
.btn-hero-outline:hover {
	background: #fff;
	color: var(--primary-dark);
	transform: translateY(-2px);
}
@media (max-width: 767px) {
	.hero { min-height: 340px; }
	.hero-text h1 { font-size: 30px; }
}

/* ============ Sidebar ============ */
.aside-sidebar .card-sidebar {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	margin-bottom: 18px;
	overflow: hidden;
}
.sidebar-home {
	background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
	color: #fff;
	font-weight: 700;
	border: none;
	border-radius: 0;
	text-align: left;
	padding: 13px 16px;
}
.sidebar-home:hover {
	color: #fff;
	opacity: 0.95;
}
.card-sidebar-head {
	padding: 13px 16px;
	border-bottom: 1px solid var(--border);
	background: var(--bg-soft);
	color: var(--dark);
	font-size: 13px;
}
.card-sidebar-body {
	padding: 15px;
}
.card-sidebar .list-group {
	margin: 0;
}
.sidebar-menu .list-group-item {
	border: none;
	border-bottom: 1px solid #eef1f7;
	padding: 0;
	display: block;
}
.sidebar-menu .list-group-item:last-child { border-bottom: none; }
.sidebar-menu .list-group-item a {
	display: block;
	padding: 11px 16px;
	color: var(--text);
	font-size: 13px;
	font-weight: 500;
}
.sidebar-menu .list-group-item a:hover {
	background: var(--bg-soft);
	color: var(--primary);
	text-decoration: none;
}
.sidebar-menu .list-group-item.active-menu a {
	background: linear-gradient(90deg, rgba(29,63,143,0.08), rgba(29,63,143,0.02));
	color: var(--primary);
	font-weight: 700;
	border-left: 3px solid var(--primary);
}
.text-dev {
	color: var(--accent-dark);
	font-size: 10px;
	font-weight: 600;
	margin-left: 6px;
}
.btn-sidebar-search {
	background: var(--primary);
	color: #fff;
	font-weight: 600;
	border: none;
}
.btn-sidebar-search:hover {
	background: var(--primary-dark);
	color: #fff;
}

/* ============ Content area ============ */
.aside-content .alert-announce {
	background: linear-gradient(135deg, #eef3ff, #f7faff);
	border: 1px solid #d5e1f8;
	color: var(--primary-dark);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px 16px;
}
.announce-icon {
	display: inline-block;
	width: 42px;
	height: 42px;
	line-height: 42px;
	text-align: center;
	background: linear-gradient(135deg, var(--accent), var(--accent-dark));
	color: #fff;
	border-radius: 10px;
	font-size: 18px;
}

/* ============ Registration page ============ */
.reg-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	margin-bottom: 20px;
	overflow: hidden;
}
.reg-card-body { padding: 22px; }
.reg-form .form-group label { font-weight: 600; color: var(--dark); font-size: 13px; }
.reg-form .req { color: var(--accent-dark); }
.alert-important {
	padding: 14px 16px;
	border-radius: var(--radius);
}
.alert-important strong { color: inherit; }
.checkbox-agree {
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 12px 16px;
	margin: 8px 0 16px;
	font-size: 13px;
	line-height: 1.6;
}
.btn-submit {
	background: linear-gradient(135deg, var(--accent), var(--accent-dark));
	color: #fff;
	font-weight: 700;
	padding: 11px 34px;
	border: none;
	border-radius: 10px;
	box-shadow: 0 6px 16px rgba(255, 138, 0, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-submit:hover {
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(255, 138, 0, 0.45);
}

/* ============ Bootstrap panel restyle (child views) ============ */
.panel {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	margin-bottom: 22px;
}
.panel-default .panel-heading {
	background: #fff;
	color: var(--dark);
	border-bottom: 1px solid var(--border);
	padding: 15px 18px;
}
.panel-default .panel-heading h4 {
	font-weight: 700;
	color: var(--primary);
	margin: 0;
}
.panel-body { padding: 20px; }
.panel-title { color: var(--dark); }

/* Badge colors (theme used by monitoring view) */
.badge { font-size: 12px; padding: 5px 10px; border-radius: 20px; font-weight: 600; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-primary { background: #dbe7ff; color: var(--primary); }
.badge-danger { background: #fde3e0; color: #b42318; }
.badge-secondary { background: #e8eaf0; color: #5a6478; }

/* bs-callout used by monitoring */
.bs-callout {
	padding: 16px 20px;
	margin-bottom: 16px;
	border: 1px solid var(--border);
	border-left-width: 4px;
	border-radius: var(--radius);
	background: #fff;
}
.bs-callout-danger { border-left-color: #e35d57; }

/* Tables */
.table { background: #fff; }
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th { background-color: #f0f4ff; }
.table thead th { background: var(--bg-soft); color: var(--dark); border-bottom: 2px solid var(--border); }
.panel table thead th { background: var(--bg-soft); }
.table-bordered { border: 1px solid var(--border); }
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > th,
.table-bordered > tfoot > tr > td { border: 1px solid var(--border); }

/* Alerts */
.alert {
	border-radius: var(--radius);
}
.alert-info { background: #eef6ff; border-color: #cfe3ff; color: #2158b0; }
.alert-danger { background: #fdecea; border-color: #fbd3ce; color: #b42318; }
.alert-success { background: #eafaf0; border-color: #c9efd9; color: #22713b; }
.alert-warning { background: #fff8e6; border-color: #ffe9b3; color: #8a5f00; }

/* Labels */
.label { font-weight: 600; }
.label-success { background: #1fae54; }
.label-warning { background: var(--accent); }
.label-danger { background: #e3534c; }
.label-info { background: var(--primary); }

/* Forms */
.form-control {
	border: 1px solid #c9d4e8;
	border-radius: 8px;
	font-size: 14px;
	height: 40px;
	box-shadow: none;
	-webkit-box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus {
	border-color: var(--primary-light);
	box-shadow: 0 0 0 3px rgba(29, 63, 143, 0.12);
}
.input-group-addon {
	background: var(--bg-soft);
	border: 1px solid #c9d4e8;
	border-radius: 0 8px 8px 0;
	color: var(--primary);
}

/* Buttons */
.btn { border-radius: 8px; font-weight: 600; }
.btn-default { border: 1px solid #c9d4e8; color: var(--text); background: #fff; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-info { background: var(--primary-light); border-color: var(--primary-light); }
.btn-success { background: #1fae54; border-color: #1fae54; }
.btn-danger { background: #e3534c; border-color: #e3534c; }

/* Tabs */
.nav-tabs {
	border-bottom: 2px solid var(--border);
}
.nav-tabs > li > a {
	border: none;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	font-weight: 600;
	color: var(--muted);
	padding: 12px 16px;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
	border: none;
	border-bottom: 3px solid var(--primary);
	background: transparent;
	color: var(--primary);
}
.tab-content { padding-top: 20px; }
.tab-pane dl { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; }

/* ============ Footer ============ */
.footer-frontend {
	background: var(--dark);
	color: #b6c0d8;
	margin-top: 40px;
	padding-top: 34px;
}
.footer-row {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	padding-bottom: 26px;
	border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col { flex: 1 1 220px; }
.footer-col img { height: 42px; margin-bottom: 10px; }
.footer-col p { font-size: 12.5px; line-height: 1.6; color: #8b95ad; }
.footer-col h5 { color: #fff; font-weight: 700; font-size: 13px; margin: 0 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #b6c0d8; font-size: 12.5px; text-decoration: none; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
	text-align: center;
	padding: 14px 0;
	font-size: 12px;
	color: #8b95ad;
}

/* Maintenance banner (from partial) stays visible */
/* ===== Statistik publik ===== */
.stat-header-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.stat-updated { font-size: 12px; color: #6b7280; }
.stat-cards-row { margin-bottom: 18px; }
.stat-card {
	position: relative;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 18px 16px;
	margin-bottom: 15px;
	background: #fff;
	transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: 0 4px 14px rgba(15,23,42,.08); }
.stat-card .fa { position: absolute; top: 16px; right: 16px; font-size: 26px; opacity: .35; }
.stat-card-num { font-size: 26px; font-weight: 800; color: #111827; line-height: 1.1; }
.stat-card-label { font-size: 11px; font-weight: 700; color: #6b7280; margin-top: 4px; letter-spacing: .4px; }
.stat-card-sub { font-size: 11.5px; color: #6b7280; margin-top: 6px; }
.stat-card-primary { border-top: 3px solid #1d3f8f; }
.stat-card-info { border-top: 3px solid #17a2b8; }
.stat-card-accent { border-top: 3px solid #ff8a00; }
.stat-card-success { border-top: 3px solid #22c55e; }
.chart-box {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 14px;
	margin-bottom: 18px;
	background: #fff;
}
.chart-box h5 { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: #374151; }
.data-table-stats th { background: #f3f4f6; font-size: 12px; }
.data-table-stats td { font-size: 13px; }
.table-total th { background: #1d3f8f !important; color: #fff; }
.service-card {
	display: block;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 22px 18px;
	margin-bottom: 16px;
	background: #fff;
	color: #374151;
	text-decoration: none;
	transition: box-shadow .2s, transform .2s;
}
.service-card:hover { box-shadow: 0 6px 18px rgba(15,23,42,.10); transform: translateY(-2px); text-decoration: none; }
.service-card-icon {
	width: 52px; height: 52px; line-height: 52px;
	text-align: center; border-radius: 12px;
	background: #eef2ff; color: #1d3f8f; font-size: 22px; margin-bottom: 12px;
}
.service-card h4 { font-size: 14px; font-weight: 700; margin: 0 0 12px; color: #1d3f8f; min-height: 40px; }
.service-card-stats { display: flex; gap: 18px; margin-bottom: 14px; font-size: 12px; color: #6b7280; }
.service-card-stats .num { display: block; font-size: 20px; font-weight: 800; color: #111827; }

/* ===== Statistik area detail (expandable) ===== */
.stat-area-detail { padding: 10px 4px; }
.stat-sub-block { margin-bottom: 14px; }
.stat-sub-block h6 {
	font-size: 12px; font-weight: 700; color: #1d3f8f;
	text-transform: uppercase; letter-spacing: .3px;
	margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid #eef2ff;
}
.stat-detail-table { margin-bottom: 4px; }
.stat-detail-table th { background: #f3f4f6; font-size: 11px; }
.stat-detail-table td { font-size: 12.5px; vertical-align: middle; }
.stat-detail-table a { color: #1d3f8f; text-decoration: none; font-weight: 600; }
.stat-detail-table a:hover { text-decoration: underline; }
.wilayah-row:hover { background: #f8fafc; }
.kabkota-wrap { padding: 8px 18px; }
.kabkota-wrap table { margin: 0; }
.btn-matrix-expand { padding: 0 6px; font-size: 16px; color: #1d3f8f; }
.btn-matrix-expand:hover { color: #ff8a00; }

/* ===== Loading overlay (fullscreen, centered) ===== */
#page-loader {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, .82);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}
#page-loader.loading { display: flex; }
#page-loader .loader-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 32px 46px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 18px 50px rgba(17, 24, 39, .16);
	border: 1px solid #eef2ff;
}
#page-loader .spinner-ring {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: 4px solid #e0e7ff;
	border-top-color: #1d3f8f;
	animation: page-loader-spin .8s linear infinite;
}
#page-loader .loader-text {
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #1d3f8f;
	letter-spacing: .4px;
	text-transform: uppercase;
}
@keyframes page-loader-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
