/* styles.scss */
body {
	margin: 0;
	font-family: "Segoe UI", sans-serif;
	background-color: #121212;
	color: #ffffff;
	display: flex;
	flex-direction: column;
	height: 100vh;
	overflow: hidden;
}

/* ============== NAVBAR ============== */
.navbar {
	background-color: #1f2937;
	color: white;
	padding: 16px;
}
.navbar__container {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.navbar__brand {
	font-size: 24px;
	font-weight: bold;
	color: white;
	text-decoration: none;
}
.navbar__links {
	list-style: none;
	display: flex;
	gap: 24px;
}
.navbar__links li a {
	color: white;
	text-decoration: none;
	font-weight: 500;
}
.navbar__links li a:hover {
	text-decoration: underline;
}

/* ============== LOGIN PAGE ============== */
.login__main {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
}
.login__form {
	background: #1e1e1e;
	padding: 32px;
	border-radius: 12px;
	width: 320px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
}
.login__title {
	font-size: 24px;
	font-weight: 600;
	text-align: center;
}
.login__label {
	display: flex;
	flex-direction: column;
	font-size: 14px;
}
.login__input {
	margin-top: 4px;
	padding: 12px;
	border: 1px solid #333;
	border-radius: 6px;
	background: #2a2a2a;
	color: #fff;
}
.login__submit {
	margin-top: 16px;
	padding: 12px;
	border: none;
	border-radius: 6px;
	background-color: #007acc;
	color: white;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
}
.login__submit:hover {
	background-color: #005fa3;
}
.login__error {
	color: #ff6b6b;
	font-size: 14px;
}

/* ============== DASHBOARD PAGE ============== */
.dashboard__main {
	padding: 32px;
}
.dashboard__filters {
	display: flex;
	gap: 16px;
	margin-bottom: 24px;
}
.dashboard__table {
	width: 100%;
	border-collapse: collapse;
}
.dashboard__table th,
.dashboard__table td {
	padding: 16px;
	border-bottom: 1px solid #333;
}
.dashboard__table th {
	text-align: left;
	color: #ccc;
}
.dashboard__table td a {
	color: #4fa4f7;
	text-decoration: none;
}
.dashboard__table td a:hover {
	text-decoration: underline;
}

.site-table-row:hover {
	background-color: #1a1a1a;
}

.status-badge {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}
.status-badge--healthy {
	background-color: #4caf50;
	color: #fff;
}
.status-badge--warning {
	background-color: #ff9800;
	color: #fff;
}
.status-badge--critical {
	background-color: #f44336;
	color: #fff;
}

.dashboard__search {
	padding: 12px;
	border: 1px solid #444;
	border-radius: 6px;
	background: #2a2a2a;
	color: #fff;
	width: 240px;
}

.dropdown {
	position: relative;
}
.dropdown__button {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: #2a2a2a;
	color: #fff;
	padding: 12px;
	border-radius: 6px;
	border: 1px solid #444;
	min-width: 180px;
	cursor: pointer;
}
.dropdown__button svg {
	margin-left: 8px;
}
.dropdown__menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #1f1f1f;
	border: 1px solid #333;
	border-radius: 6px;
	margin-top: 4px;
	z-index: 100;
	overflow: hidden;
}
.dropdown__menu li {
	padding: 10px 12px;
	cursor: pointer;
	transition: background-color 0.2s;
}
.dropdown__menu li:hover {
	background-color: #333;
}
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	margin-top: 24px;
}
.pagination button {
	padding: 8px 16px;
	background-color: #2a2a2a;
	border: 1px solid #444;
	border-radius: 6px;
	color: white;
	cursor: pointer;
}
.pagination button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ============== SITE DETAIL PAGE ============== */
.site-detail__main {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: auto 1fr;
	gap: 32px;
	padding: 32px;
	flex: 1;
	overflow: hidden;
}
.site-detail__meta,
.site-detail__edit,
.site-detail__logs {
	background-color: #1e1e1e;
	padding: 24px;
	border-radius: 12px;
}
.site-detail__meta p,
.site-detail__edit label {
	margin-bottom: 12px;
}
.site-detail__edit input[type="text"],
.site-detail__edit select {
	display: block;
	margin-top: 4px;
	width: 100%;
	padding: 12px;
	border-radius: 6px;
	background: #2a2a2a;
	border: 1px solid #444;
	color: #fff;
}
.site-detail__edit input[type="checkbox"] {
	margin-right: 8px;
}
.site-detail .save-banner {
	background-color: #ff9800;
	color: #000;
	padding: 8px 12px;
	margin-top: 16px;
	border-radius: 6px;
	font-weight: 600;
}
.site-detail__logs {
	grid-column: 1 / span 2;
	grid-row: 2;
	align-self: stretch;
	display: flex;
    flex-direction: column;
	overflow: hidden;
}
.site-detail__logs .log-grid-header {
	display: grid;
	grid-template-columns: 160px 100px 1fr 80px;
	padding: 12px 0;
	border-bottom: 1px solid #333;
	font-weight: 600;
	color: #ccc;
}

.site-detail__logs .log-grid-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow-y: auto;
}

.site-detail__logs .log-grid-row {
	display: grid;
	grid-template-columns: 160px 100px 1fr 80px;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid #333;
}

.site-detail__logs .log-grid-row:hover {
	background-color: #1a1a1a;
}

.site-detail__logs .log-grid-row button {
	background: none;
	border: 1px solid #4fa4f7;
	color: #4fa4f7;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.2s;
}

.site-detail__logs .log-grid-row button:hover {
	background-color: #2a2a2a;
}

.site-detail__logs .log-grid-expanded {
	grid-column: 1 / span 4;
	padding: 16px;
	background: #141414;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
	.site-detail__main {
		grid-template-columns: 1fr;
	}
	.dashboard__filters {
		flex-direction: column;
	}
}

[x-cloak] {
	display: none;
}
