/* ==========================================================================
   Nudge — Modern Frontend Stylesheet
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #1a1a1a;
	background-color: #f8f9fa;
}

/* ---------- Page Layout ---------- */
.page-container {
	max-width: 720px;
	margin: 0 auto;
	padding: 8px 12px;
}

/* ---------- Navigation Footer ---------- */
.nav-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	padding: 12px 0;
	margin-top: 8px;
}

/* ---------- Content Card ---------- */
.content-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	padding: 10px 14px;
	margin-bottom: 8px;
}

/* ---------- Typography ---------- */
.page-title {
	font-size: 18px;
	font-weight: 600;
	text-align: center;
	margin: 0 0 8px 0;
	color: #111;
}

.section-title {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6b7280;
	margin: 12px 0 4px 0;
}

.section-title:first-child {
	margin-top: 0;
}

.panel-header-title {
	font-size: 15px;
	font-weight: 600;
	color: #111;
}

/* ---------- Data Tables ---------- */
.data-table-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.data-table th {
	text-align: left;
	font-weight: 500;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #6b7280;
	padding: 4px 10px;
	border-bottom: 2px solid #e5e7eb;
}

.data-table td {
	padding: 5px 10px;
	border-bottom: 1px solid #f0f0f0;
	vertical-align: middle;
}

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

.data-table tr:hover td {
	background-color: #f9fafb;
}

.data-table .col-id {
	color: #9ca3af;
}

.data-table .col-name {
	font-weight: 500;
}

.data-table .col-actions {
	text-align: right;
	white-space: nowrap;
}

/* ---------- Status Table Column Widths ---------- */
.data-table-status {
	table-layout: fixed;
}

.col-w-id { width: 40px; }
.col-w-name { width: 28%; }
.col-w-detail { width: 28%; }
.col-w-status { width: 120px; }
.col-w-actions { width: 60px; }

/* ---------- Status Badges ---------- */
.badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 12px;
	line-height: 1.4;
	text-transform: capitalize;
}

.badge-online,
.badge-current {
	background-color: #dcfce7;
	color: #166534;
}

.badge-offline,
.badge-overdue {
	background-color: #fee2e2;
	color: #991b1b;
}

.badge-due {
	background-color: #fef9c3;
	color: #854d0e;
}

.badge-inactive {
	background-color: #f3f4f6;
	color: #6b7280;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-block;
	font-size: 13px;
	font-weight: 500;
	padding: 6px 16px;
	border-radius: 6px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: all 0.15s ease;
	line-height: 1.4;
	text-decoration: none;
}

.btn:hover {
	filter: brightness(0.95);
}

.btn-primary {
	background-color: #2563eb;
	color: #fff;
	border-color: #2563eb;
}

.btn-primary:hover {
	background-color: #1d4ed8;
	border-color: #1d4ed8;
}

.btn-secondary {
	background-color: #fff;
	color: #374151;
	border-color: #d1d5db;
}

.btn-secondary:hover {
	background-color: #f9fafb;
	border-color: #9ca3af;
}

.btn-danger {
	background-color: #fff;
	color: #dc2626;
	border-color: #fca5a5;
}

.btn-danger:hover {
	background-color: #fef2f2;
	border-color: #dc2626;
}

.btn-sm {
	font-size: 12px;
	padding: 3px 10px;
}

.btn-table-action {
	font-size: 12px;
	padding: 3px 10px;
	background-color: #fff;
	color: #374151;
	border-color: #e5e7eb;
	border-radius: 4px;
}

.btn-table-action:hover {
	border-color: #9ca3af;
	background-color: #f9fafb;
}

.btn-table-danger {
	font-size: 12px;
	padding: 3px 10px;
	background-color: #fff;
	color: #dc2626;
	border-color: #fecaca;
	border-radius: 4px;
}

.btn-table-danger:hover {
	border-color: #dc2626;
	background-color: #fef2f2;
}

/* ---------- Panel Layout ---------- */
.panel-container {
	display: flex;
	flex-direction: column;
}

.panel-header {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 8px;
	margin-bottom: 10px;
	border-bottom: 1px solid #e5e7eb;
	gap: 6px;
}

.panel-header-left {
	display: flex;
	align-items: center;
}

.panel-header-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.panel-body {
	flex: 1;
}

.panel-body-bordered {
	flex: 1;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 16px;
}

/* ---------- Forms ---------- */
.form-table {
	border-collapse: collapse;
}

.form-table td {
	padding: 6px 12px 6px 0;
	vertical-align: middle;
}

.form-table td:first-child {
	font-weight: 500;
	font-size: 13px;
	color: #374151;
	white-space: nowrap;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
	font-family: inherit;
	font-size: 13px;
	padding: 6px 10px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[readonly] {
	background-color: #f9fafb;
	color: #6b7280;
}

input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #2563eb;
	cursor: pointer;
}

.form-input-wide {
	width: 220px;
	max-width: 100%;
}

.form-input-narrow {
	width: 70px;
}

.form-group {
	margin-bottom: 12px;
}

.form-group-label {
	display: block;
	font-weight: 500;
	font-size: 13px;
	color: #374151;
	margin-bottom: 4px;
}

.response-field {
	width: 280px;
	max-width: 100%;
}

/* ---------- Log ---------- */
.log-container {
	display: flex;
	flex-direction: column;
	height: 500px;
}

.log-content {
	flex: 1 1 auto;
	overflow: auto;
	background-color: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 12px 16px;
	font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
	font-size: 12px;
	line-height: 1.6;
	color: #374151;
}

/* ---------- Login ---------- */
.login-container {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	background-color: #f8f9fa;
}

.login-box {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	padding: 40px;
	width: 360px;
	max-width: calc(100vw - 32px);
	text-align: center;
}

.login-title {
	font-size: 22px;
	font-weight: 600;
	margin: 0 0 24px 0;
	color: #111;
}

.login-input {
	width: 100%;
	padding: 10px 14px;
	font-size: 14px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	outline: none;
	margin-bottom: 16px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-btn {
	width: 100%;
	padding: 10px;
	font-size: 14px;
	font-weight: 500;
	background-color: #2563eb;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.login-btn:hover {
	background-color: #1d4ed8;
}

.login-response {
	display: block;
	margin-top: 12px;
	font-size: 13px;
	color: #dc2626;
}

/* ---------- Delete Confirmation ---------- */
.delete-confirmation {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	padding: 40px 20px;
	font-size: 15px;
	color: #374151;
	text-align: center;
}

.delete-confirm-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	margin-bottom: 10px;
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	font-size: 13px;
	color: #991b1b;
}

.delete-confirm-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

/* ---------- Accessibility ---------- */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 600px) {
	.page-container {
		padding: 6px 8px;
	}

	.content-card {
		padding: 8px 10px;
	}

	.data-table {
		font-size: 12px;
	}

	.data-table th {
		padding: 3px 6px;
	}

	.data-table td {
		padding: 4px 6px;
	}

	.col-w-id { width: 30px; }

	.btn {
		padding: 6px 12px;
		font-size: 12px;
	}

	.btn-table-action,
	.btn-table-danger {
		padding: 2px 8px;
		font-size: 11px;
	}

	.form-table td {
		padding: 4px 8px 4px 0;
		font-size: 12px;
	}

	.log-container {
		height: 300px;
	}

	.log-content {
		font-size: 11px;
		padding: 8px 10px;
	}
}
