/* ========================================
   Stylesheet untuk Sistem Registrasi & 
   Pencarian Kode Pos
   ======================================== */

/* ========== RESET & GLOBAL STYLES ========== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html, body {
	width: 100%;
	height: 100%;
	font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
	background-color: #f5f5f5;
	color: #333;
}

/* ========== TOPBAR & HEADER ========== */
.topbar {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 20px 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	position: sticky;
	top: 0;
	z-index: 100;
}

.header {
	color: white;
	text-align: center;
	font-size: 24px;
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1000px;
	margin: 0 auto;
	padding: 0 20px;
}

.header-content {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* ========== BUTTONS ========== */
.btn {
	padding: 12px 24px;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: none;
}

.btn-primary {
	background-color: #667eea;
	color: white;
}

.btn-primary:hover {
	background-color: #5568d3;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
	transform: translateY(-2px);
}

.btn-primary:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
	background-color: #e0e0e0;
	color: #333;
}

.btn-secondary:hover {
	background-color: #d0d0d0;
	transform: translateY(-2px);
}

.btn-logout {
	background-color: rgba(255, 255, 255, 0.2);
	color: white;
	padding: 8px 16px;
	border: 2px solid white;
	border-radius: 4px;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.btn-logout:hover {
	background-color: rgba(255, 255, 255, 0.3);
	transform: translateY(-1px);
}

/* ========== CONTAINER ========== */
.container {
	max-width: 1000px;
	margin: 0 auto;
	padding: 30px 20px;
}

/* ========== PAGE & VISIBILITY ========== */
.page {
	display: block;
}

.page.hidden {
	display: none;
}

/* ========== FORM STYLES ========== */
.form-section {
	background: white;
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
	max-width: 600px;
	margin: 0 auto;
}

.form-section h1 {
	color: #333;
	margin-bottom: 10px;
	font-size: 28px;
}

.subtitle {
	color: #777;
	margin-bottom: 30px;
	font-size: 15px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.form-field {
	display: flex;
	flex-direction: column;
	position: relative;
}

.form-field label {
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.input-field, .select-field {
	padding: 12px 15px;
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	font-size: 14px;
	transition: all 0.3s ease;
	font-family: inherit;
}

.input-field:focus, .select-field:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-field:disabled, .select-field:disabled {
	background-color: #f5f5f5;
	cursor: not-allowed;
	color: #999;
}

/* ========== AUTOCOMPLETE SUGGESTIONS ========== */
.autocomplete-suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 2px solid #667eea;
	border-top: none;
	border-radius: 0 0 6px 6px;
	max-height: 200px;
	overflow-y: auto;
	z-index: 1000;
	display: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.autocomplete-suggestions.active {
	display: block;
}

.suggestion-item {
	padding: 10px 15px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
	background-color: #f0f0f0;
}

.suggestion-item:last-child {
	border-bottom: none;
}

/* ========== ERROR MESSAGE ========== */
.error-message {
	color: #e74c3c;
	font-size: 13px;
	margin-top: 5px;
	display: none;
}

.error-message.show {
	display: block;
}

/* ========== BUTTON GROUP ========== */
.button-group {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin-top: 20px;
}

.button-group .btn {
	flex: 1;
	max-width: 250px;
}

/* ========== USER INFO ========== */
.user-info {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	padding: 20px 25px;
	border-radius: 8px;
	margin-bottom: 30px;
	border-left: 4px solid #667eea;
}

.user-info p {
	color: #333;
	font-size: 15px;
	line-height: 1.6;
}

.user-name {
	font-weight: 700;
	color: #667eea;
}

/* ========== SEARCH SECTION ========== */
.search-section {
	background: white;
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
	margin-bottom: 30px;
}

.search-section h2 {
	color: #333;
	margin-bottom: 10px;
	font-size: 24px;
}

.search-form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 20px;
}

.dropdown-field {
	position: relative;
}

/* ========== RESULT SECTION ========== */
.hidden {
	display: none !important;
}

.result-section {
	background: #f9f9f9;
	padding: 25px;
	border-radius: 8px;
	border-left: 4px solid #27ae60;
	margin-top: 30px;
}

.result-title {
	color: #27ae60;
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.result-content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
}

.result-item {
	background: white;
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	transition: all 0.3s ease;
}

.result-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.result-label {
	font-weight: 600;
	color: #667eea;
	font-size: 13px;
	text-transform: uppercase;
	margin-bottom: 5px;
}

.result-value {
	color: #333;
	font-size: 15px;
	word-break: break-word;
}

.result-large {
	grid-column: 1 / -1;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 20px;
	text-align: center;
	border-radius: 8px;
	border: none;
}

.result-large .result-label {
	color: rgba(255, 255, 255, 0.8);
	font-size: 12px;
}

.result-large .result-value {
	color: white;
	font-size: 28px;
	font-weight: 700;
}

/* ========== RESPONSIF ========== */
@media (max-width: 768px) {
	.header {
		font-size: 18px;
	}

	.header-content {
		flex-direction: column;
		gap: 15px;
	}

	.form-section {
		padding: 25px;
	}

	.search-form {
		grid-template-columns: 1fr;
	}

	.search-section {
		padding: 25px;
	}

	.button-group {
		flex-direction: column;
	}

	.button-group .btn {
		max-width: none;
	}

	.result-content {
		grid-template-columns: 1fr;
	}

	.user-info p {
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.topbar {
		padding: 15px 0;
	}

	.header {
		font-size: 16px;
		padding: 0 10px;
	}

	.container {
		padding: 20px 15px;
	}

	.form-section, .search-section {
		padding: 20px;
	}

	.form-section h1, .search-section h2 {
		font-size: 20px;
	}

	.subtitle {
		font-size: 13px;
	}

	.btn {
		padding: 10px 18px;
		font-size: 13px;
	}

	.input-field, .select-field {
		padding: 10px 12px;
		font-size: 13px;
	}

	.result-large .result-value {
		font-size: 22px;
	}
}
