/* Login Page Styles */
body {
	font-family: Arial, sans-serif;
	margin: 0;
	padding: 0;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Main application body override */
body.app-body {
	padding: 10px;
	background-color: #f5f5f5;
	display: block;
	align-items: initial;
	justify-content: initial;
}

.login-container {
	background: white;
	padding: 30px 20px;
	border-radius: 15px;
	box-shadow: 0 15px 35px rgba(0,0,0,0.1);
	width: 100%;
	max-width: 400px;
	text-align: center;
	margin: 20px;
}

.login-header {
	margin-bottom: 30px;
}

.login-header h1 {
	color: #333;
	margin-bottom: 10px;
	font-size: 24px;
}

.login-header p {
	color: #666;
	margin: 0;
	font-size: 14px;
}

.form-group {
	margin-bottom: 20px;
	text-align: left;
}

/* Login form specific styles */
.login-container .form-group {
	text-align: left;
}

.login-container .form-group input {
	width: 100%;
	padding: 15px 12px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 16px;
	transition: border-color 0.3s;
	box-sizing: border-box;
	-webkit-appearance: none;
}

.login-container .form-group input:focus {
	border-color: #667eea;
	outline: none;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	color: #555;
	font-weight: bold;
	font-size: 14px;
}

/* Main app form group styles */
.search-section .form-group {
	display: flex;
	flex-direction: column;
}

.search-section .form-group label {
	margin-bottom: 5px;
	font-weight: bold;
	color: #555;
	font-size: 14px;
}

.form-group input, .form-group select {
	padding: 12px 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	min-height: 44px;
	-webkit-appearance: none;
	box-sizing: border-box;
}

.login-btn {
	width: 100%;
	padding: 15px 12px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	transition: transform 0.2s;
	min-height: 48px;
}

.login-btn:hover {
	transform: translateY(-2px);
}

.error {
	background-color: #f8d7da;
	color: #721c24;
	padding: 12px;
	border-radius: 8px;
	margin-bottom: 20px;
	border: 1px solid #f5c6cb;
	font-size: 14px;
}

/* Main app error styles */
.container .error {
	color: #dc3545;
	background-color: #f8d7da;
	padding: 12px;
	border-radius: 4px;
	margin-bottom: 20px;
	border: none;
	font-size: 14px;
}

.session-expired {
	background-color: #fff3cd;
	color: #856404;
	padding: 12px;
	border-radius: 8px;
	margin-bottom: 20px;
	border: 1px solid #ffeaa7;
	font-size: 14px;
}

.users-info {
	margin-top: 30px;
	padding: 20px;
	background-color: #f8f9fa;
	border-radius: 8px;
	font-size: 12px;
	color: #666;
}

.users-info h4 {
	margin-top: 0;
	color: #333;
	font-size: 14px;
}

/* Main Application Styles */
.container {
	max-width: 1400px;
	margin: 0 auto;
	background-color: white;
	padding: 15px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid #007bff;
	flex-wrap: wrap;
	gap: 10px;
}

.header h1 {
	color: #333;
	margin: 0;
	font-size: 20px;
	flex: 1;
	min-width: 200px;
}

.user-info {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #666;
	font-size: 12px;
	flex-wrap: wrap;
}

.logout-btn {
	background-color: #dc3545;
	color: white;
	text-decoration: none;
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 12px;
	transition: background-color 0.3s;
	min-height: 40px;
	display: flex;
	align-items: center;
	white-space: nowrap;
}

.logout-btn:hover {
	background-color: #c82333;
}

.dashboard {
	display: flex;
	justify-content: space-around;
	margin-bottom: 20px;
	padding: 15px;
	background-color: #f8f9fa;
	border-radius: 5px;
	flex-wrap: wrap;
	gap: 10px;
}

.stat-box {
	text-align: center;
	padding: 15px 10px;
	flex: 1;
	min-width: 120px;
}

.stat-number {
	font-size: 20px;
	font-weight: bold;
	color: #007bff;
}

.stat-label {
	font-size: 12px;
	color: #666;
	margin-top: 5px;
}

.search-section {
	margin-bottom: 20px;
	padding: 20px;
	border: 1px solid #ddd;
	border-radius: 5px;
	background-color: #fafafa;
}

.search-section h3 {
	margin-top: 0;
	font-size: 18px;
}

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

.special-searches {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #ddd;
}

.special-searches h4 {
	font-size: 16px;
	margin-bottom: 15px;
}

.button-group {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.btn {
	padding: 12px 16px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background-color 0.3s;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	white-space: nowrap;
	flex: 1;
	min-width: 120px;
}

.btn-primary {
	background-color: #007bff;
	color: white;
}

.btn-primary:hover:not(:disabled) {
	background-color: #0056b3;
}

.btn-secondary {
	background-color: #6c757d;
	color: white;
}

.btn-secondary:hover:not(:disabled) {
	background-color: #545b62;
}

.btn-clear {
	background-color: #dc3545;
	color: white;
}

.btn-clear:hover {
	background-color: #c82333;
}

.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.loading {
	text-align: center;
	padding: 30px 20px;
	color: #007bff;
	font-weight: bold;
	font-size: 16px;
}

.results-section {
	margin-top: 20px;
}

.results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 2px solid #007bff;
	flex-wrap: wrap;
	gap: 10px;
}

.results-header h3 {
	margin: 0;
	font-size: 18px;
}

.results-count {
	font-size: 16px;
	font-weight: bold;
	color: #007bff;
}

.table-container {
	overflow-x: auto;
	border: 1px solid #ddd;
	border-radius: 5px;
	-webkit-overflow-scrolling: touch;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	min-width: 800px;
}

th {
	background-color: #007bff;
	color: white;
	padding: 12px 8px;
	text-align: left;
	font-weight: bold;
	position: sticky;
	top: 0;
	font-size: 12px;
	white-space: nowrap;
}

td {
	padding: 10px 8px;
	border-bottom: 1px solid #eee;
	font-size: 13px;
	vertical-align: middle;
}

tr:nth-child(even) {
	background-color: #f8f9fa;
}

tr:hover {
	background-color: #e3f2fd;
}

.cleanout-keep {
	background-color: #d4edda;
	color: #155724;
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: bold;
	white-space: nowrap;
}

.cleanout-delete {
	background-color: #f8d7da;
	color: #721c24;
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: bold;
	white-space: nowrap;
}

.no-results {
	text-align: center;
	padding: 40px 20px;
	color: #666;
	font-style: italic;
	font-size: 16px;
}

.success {
	color: #155724;
	background-color: #d4edda;
	padding: 12px;
	border-radius: 4px;
	margin-bottom: 20px;
	font-size: 14px;
}

.hidden {
	display: none;
}

/* Modal Styles */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0,0,0,0.5);
	padding: 20px;
	box-sizing: border-box;
	overflow-y: auto;
}

.modal-content {
	background-color: white;
	margin: 0 auto;
	padding: 20px;
	border-radius: 8px;
	width: 100%;
	max-width: 600px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	position: relative;
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #007bff;
	flex-wrap: wrap;
	gap: 10px;
}

.modal-header h2 {
	margin: 0;
	color: #333;
	font-size: 18px;
	flex: 1;
}

.close {
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	color: #aaa;
	padding: 5px;
	line-height: 1;
}

.close:hover {
	color: #000;
}

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

.action-buttons {
	text-align: center;
	margin-top: 20px;
}

.btn-edit {
	background-color: #28a745;
	color: white;
	padding: 8px 12px;
	font-size: 12px;
	margin-right: 5px;
	font-weight: bold;
	min-width: 60px;
	min-height: 36px;
}

.btn-edit:hover {
	background-color: #218838;
}

.btn-delete {
	background-color: #dc3545;
	color: white;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: bold;
	min-width: 50px;
	min-height: 36px;
}

.btn-delete:hover {
	background-color: #c82333;
}

.btn-save {
	background-color: #007bff;
	color: white;
	margin-right: 10px;
	min-width: 120px;
}

.btn-cancel {
	background-color: #6c757d;
	color: white;
	min-width: 100px;
}

/* Photo Display Styles */
.photo-thumbnail {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #ddd;
}

.photo-placeholder {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	color: #666;
	border: 2px solid #ddd;
	text-align: center;
}

.edit-photo-preview {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #007bff;
}

.edit-photo-placeholder {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	background-color: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: #666;
	border: 3px solid #ddd;
	margin: 0 auto;
}

.photo-upload-section {
	text-align: center;
	margin-bottom: 20px;
	padding: 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	background-color: #fafafa;
}

.photo-upload-section input[type="file"] {
	margin: 10px 0;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: white;
	width: 100%;
	max-width: 300px;
	font-size: 14px;
}

.photo-upload-info {
	font-size: 12px;
	color: #666;
	margin-top: 5px;
}

/* Export Button Styles */
.btn-export {
	background-color: #17a2b8;
	color: white;
	border: none;
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 12px;
	cursor: pointer;
	transition: background-color 0.3s;
	margin-left: 10px;
	min-height: 40px;
	white-space: nowrap;
}

.btn-export:hover {
	background-color: #138496;
}

.header .btn-secondary {
	background-color: #17a2b8;
	color: white;
	border: none;
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 12px;
	cursor: pointer;
	transition: background-color 0.3s;
	min-height: 40px;
	white-space: nowrap;
}

.header .btn-secondary:hover {
	background-color: #138496;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
	body.app-body {
		padding: 5px;
	}
	
	.container {
		margin: 0;
		padding: 10px;
		border-radius: 0;
	}
	
	.header {
		flex-direction: column;
		align-items: stretch;
		gap: 15px;
		text-align: center;
	}
	
	.header h1 {
		font-size: 18px;
		min-width: auto;
	}
	
	.user-info {
		justify-content: center;
		flex-wrap: wrap;
		font-size: 11px;
	}
	
	.dashboard {
		flex-direction: column;
		gap: 10px;
	}
	
	.stat-box {
		padding: 10px;
		border: 1px solid #ddd;
		border-radius: 5px;
		background-color: white;
	}
	
	.search-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	.button-group {
		flex-direction: column;
		gap: 8px;
	}
	
	.btn {
		width: 100%;
		min-width: auto;
		flex: none;
		padding: 15px 12px;
		font-size: 16px;
	}
	
	.special-searches .button-group .btn {
		padding: 12px;
		font-size: 14px;
	}
	
	.table-container {
		font-size: 11px;
		border-radius: 0;
		margin: 0 -10px;
	}
	
	table {
		min-width: 700px;
	}
	
	th, td {
		padding: 8px 4px;
		font-size: 11px;
	}
	
	th {
		font-size: 10px;
	}
	
	.btn-edit, .btn-delete {
		padding: 6px 8px;
		font-size: 10px;
		min-width: 40px;
		min-height: 32px;
	}
	
	.results-header {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}
	
	.modal {
		padding: 10px;
	}
	
	.modal-content {
		padding: 15px;
		margin-top: 20px;
	}
	
	.edit-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	.action-buttons {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}
	
	.photo-thumbnail, .photo-placeholder {
		width: 35px;
		height: 35px;
		font-size: 8px;
	}
	
	.edit-photo-preview, .edit-photo-placeholder {
		width: 80px;
		height: 80px;
		font-size: 12px;
	}
	
	.user-info span {
		display: block;
		width: 100%;
		text-align: center;
		margin: 2px 0;
	}
}

@media (max-width: 480px) {
	.login-container {
		margin: 10px;
		padding: 20px 15px;
	}
	
	.login-header h1 {
		font-size: 20px;
	}
	
	.login-header p {
		font-size: 13px;
	}
	
	.container {
		padding: 8px;
	}
	
	.header h1 {
		font-size: 16px;
	}
	
	.stat-number {
		font-size: 18px;
	}
	
	.stat-label {
		font-size: 11px;
	}
	
	.search-section {
		padding: 15px;
	}
	
	.form-group input, .form-group select {
		padding: 15px 10px;
		font-size: 16px;
	}
	
	.results-header h3 {
		font-size: 16px;
	}
	
	.results-count {
		font-size: 14px;
	}
	
	.modal-header h2 {
		font-size: 16px;
	}
	
	.no-results {
		padding: 30px 15px;
		font-size: 14px;
	}
	
	.loading {
		padding: 25px 15px;
		font-size: 14px;
	}
	
	table {
		min-width: 600px;
	}
	
	th, td {
		padding: 6px 3px;
		font-size: 10px;
	}
	
	.btn-edit {
		font-size: 9px;
		padding: 5px 6px;
	}
	
	.btn-delete {
		font-size: 9px;
		padding: 5px 6px;
	}
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
	.btn:hover {
		background-color: inherit;
	}
	
	.btn-primary:hover:not(:disabled) {
		background-color: #007bff;
	}
	
	.btn-secondary:hover:not(:disabled) {
		background-color: #6c757d;
	}
	
	.btn-clear:hover {
		background-color: #dc3545;
	}
	
	.btn-edit:hover {
		background-color: #28a745;
	}
	
	.btn-delete:hover {
		background-color: #dc3545;
	}
	
	/* Larger touch targets */
	.btn {
		min-height: 48px;
		padding: 15px 20px;
	}
	
	.form-group input, .form-group select {
		min-height: 48px;
		padding: 15px 12px;
	}
	
	.close {
		padding: 15px;
		font-size: 24px;
	}
}