/**
 * Site Control Pro — frontend styles.
 * Mobile-first. Big touch targets. Clean separation.
 */

.scp-app {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 12px;
	color: #222;
	font-size: 16px;
	line-height: 1.5;
}

.scp-app-header {
	margin: 20px 0 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e2e2e2;
}

.scp-app-header h2 {
	margin: 0 0 4px;
	font-size: 24px;
}

.scp-muted {
	color: #666;
	font-size: 0.9em;
}

.scp-section {
	margin: 24px 0;
	padding: 18px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
}

.scp-section-highlight {
	border-color: #f0a000;
	background: #fff8e5;
}

.scp-section h3 {
	margin: 0 0 14px;
	font-size: 18px;
}

/* Tiles on dashboard */
.scp-tile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	margin: 20px 0;
}

.scp-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 20px 12px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s, box-shadow 0.15s;
	min-height: 120px;
	justify-content: center;
}

.scp-tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(0,0,0,0.08);
	text-decoration: none;
}

.scp-tile-icon {
	font-size: 36px;
	margin-bottom: 6px;
}

.scp-tile-title {
	font-weight: 600;
	font-size: 15px;
}

.scp-tile-sub {
	font-size: 12px;
	color: #666;
	margin-top: 2px;
}

/* Forms */
.scp-form label {
	display: block;
	margin-bottom: 10px;
}
.scp-form label > span {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 14px;
}
.scp-form input[type=text],
.scp-form input[type=email],
.scp-form input[type=number],
.scp-form input[type=date],
.scp-form input[type=datetime-local],
.scp-form input[type=password],
.scp-form select,
.scp-form textarea {
	width: 100%;
	padding: 10px 12px;
	font-size: 16px;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-sizing: border-box;
	background: #fff;
}

.scp-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}

.scp-form-field {
	margin: 12px 0;
}

/* Buttons */
.scp-btn {
	display: inline-block;
	padding: 10px 16px;
	font-size: 15px;
	font-weight: 600;
	background: #eee;
	color: #222;
	border: 1px solid #ccc;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	line-height: 1;
}
.scp-btn:hover { background: #e0e0e0; text-decoration: none; }
.scp-btn-sm { padding: 6px 10px; font-size: 13px; }
.scp-btn-primary { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.scp-btn-primary:hover { background: #0b5ed7; color: #fff; }
.scp-btn-danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.scp-btn-danger:hover { background: #bb2d3b; color: #fff; }

/* Tables */
.scp-table { width: 100%; border-collapse: collapse; }
.scp-table th, .scp-table td { padding: 8px 10px; border-bottom: 1px solid #eee; text-align: left; font-size: 14px; vertical-align: top; }
.scp-table th { background: #f7f7f7; font-weight: 600; }

/* Lists */
.scp-list { list-style: none; margin: 0; padding: 0; }
.scp-list-row {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
	flex-wrap: wrap;
}
.scp-primary { font-weight: 600; }

/* Pills */
.scp-pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	background: #eee;
	color: #333;
	letter-spacing: 0.5px;
}
.scp-pill-urgent, .scp-pill-major, .scp-pill-fatal, .scp-pill-rejected, .scp-pill-fail { background: #dc3545; color: #fff; }
.scp-pill-high { background: #fd7e14; color: #fff; }
.scp-pill-normal, .scp-pill-moderate { background: #0d6efd; color: #fff; }
.scp-pill-low, .scp-pill-minor { background: #6c757d; color: #fff; }
.scp-pill-approved, .scp-pill-pass { background: #198754; color: #fff; }
.scp-pill-pending { background: #ffc107; color: #222; }

/* Notices */
.scp-notice {
	padding: 10px 14px;
	border-radius: 6px;
	margin: 10px 0;
	border-left: 4px solid;
}
.scp-notice-success { background: #e8f5e9; border-color: #2e7d32; }
.scp-notice-error   { background: #ffebee; border-color: #c62828; }
.scp-notice-warning { background: #fff8e5; border-color: #f0a000; }

/* Repeater rows */
.scp-repeater-row {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr auto;
	gap: 6px;
	margin-bottom: 6px;
	align-items: center;
}
.scp-repeater-row input { margin: 0; }

/* Signature pad */
.scp-signature-pad {
	border: 1px dashed #666;
	border-radius: 6px;
	background: #fafafa;
	display: block;
	touch-action: none;
	width: 100%;
	max-width: 600px;
	height: auto;
}

/* Photo previews */
.scp-photo-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.scp-photo-previews img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid #ccc; }

/* Tabs */
.scp-tab-nav { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 12px; border-bottom: 2px solid #e2e2e2; }
.scp-tab-btn {
	padding: 10px 16px;
	font-size: 15px;
	font-weight: 600;
	background: transparent;
	border: 0;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	color: #666;
}
.scp-tab-btn.scp-active { color: #0d6efd; border-bottom-color: #0d6efd; }
.scp-tab-panel { display: none; }
.scp-tab-panel.scp-active { display: block; }

/* Mobile tweaks */
@media (max-width: 600px) {
	.scp-tile-grid { grid-template-columns: repeat(2, 1fr); }
	.scp-repeater-row { grid-template-columns: 1fr; }
	.scp-repeater-row input { width: 100%; }
	.scp-table, .scp-table thead, .scp-table tbody, .scp-table tr, .scp-table td, .scp-table th {
		display: block;
	}
	.scp-table thead { display: none; }
	.scp-table tr { border: 1px solid #eee; border-radius: 6px; padding: 8px; margin-bottom: 8px; }
	.scp-table td { border: 0; padding: 4px 0; }
}
