/* Event Management System Styles */
/* EventFlow Vibrant Colors: #2563eb (primary), #7c3aed (supporting) */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	line-height: 1.6;
	color: #333;
	background-color: #f8f9fa;
}

/* Header Styles */
.header {
	background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
	color: white;
	padding: 1rem 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header .container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo {
	font-size: 1.8rem;
	font-weight: bold;
	text-decoration: none;
	color: white;
}

.nav {
	display: flex;
	gap: 2rem;
	align-items: center;
}

.nav a {
	color: white;
	text-decoration: none;
	padding: 0.5rem 1rem;
	border-radius: 5px;
	transition: background-color 0.3s;
}

.nav a:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

/* Container */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Cards */
.card {
	background: white;
	border-radius: 10px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	margin: 2rem 0;
	overflow: hidden;
}

.card-header {
	background: #2563eb;
	color: white;
	padding: 1rem 1.5rem;
	font-size: 1.2rem;
	font-weight: bold;
}

.card-body {
	padding: 1.5rem;
}

/* Forms */
.form-group {
	margin-bottom: 1.5rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #555;
}

.form-control {
	width: 100%;
	padding: 0.75rem;
	border: 2px solid #ddd;
	border-radius: 5px;
	font-size: 1rem;
	transition: border-color 0.3s;
}

.form-control:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
	resize: vertical;
	min-height: 100px;
}

/* Buttons */
.btn {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 5px;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s;
}

.btn-primary {
	background-color: #2563eb;
	color: white;
}

.btn-primary:hover {
	background-color: #1d4ed8;
	transform: translateY(-2px);
}

.btn-secondary {
	background-color: #6c757d;
	color: white;
}

.btn-secondary:hover {
	background-color: #545b62;
}

.btn-success {
	background-color: #28a745;
	color: white;
}

.btn-success:hover {
	background-color: #218838;
}

.btn-danger {
	background-color: #dc3545;
	color: white;
}

.btn-danger:hover {
	background-color: #c82333;
}

.btn-sm {
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
}

/* Tables */
.table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
}

.table th,
.table td {
	padding: 0.75rem;
	text-align: left;
	border-bottom: 1px solid #ddd;
}

.table th {
	background-color: #f8f9fa;
	font-weight: 600;
	color: #555;
}

.table tbody tr:hover {
	background-color: #f8f9fa;
}

/* Status badges */
.badge {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 3px;
	text-transform: uppercase;
}

.badge-success {
	background-color: #d4edda;
	color: #155724;
}

.badge-warning {
	background-color: #fff3cd;
	color: #856404;
}

.badge-danger {
	background-color: #f8d7da;
	color: #721c24;
}

.badge-info {
	background-color: #d1ecf1;
	color: #0c5460;
}

/* Grid System */
.row {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -15px;
	gap: 1.5rem;
}

.col {
	flex: 1;
	padding: 0 15px;
}

.col-md-6 {
	flex: 0 0 48%;
	max-width: 48%;
}

.col-md-4 {
	flex: 0 0 31%;
	max-width: 31%;
}

.col-md-3 {
	flex: 0 0 23%;
	max-width: 23%;
}

/* Feature cards inside features section should not add extra margins that cause overlap */
.features .card {
	margin: 0;
}

/* Event card cover image */
.event-card-cover {
	width: 100%;
	height: 160px;
	overflow: hidden;
	background: #e9ecef;
}

.event-card-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* QR Code Styles */
.qr-code {
	text-align: center;
	padding: 2rem;
	background: white;
	border-radius: 10px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.qr-code img {
	max-width: 200px;
	height: auto;
}

/* Non-clipping card for QR blocks */
.card--no-clip {
	overflow: visible;
}

/* Ensure QR content never gets clipped and stays crisp */
.qr-code {
	overflow: visible;
	display: inline-block;
}

.qr-code canvas {
	max-width: 100%;
	height: auto;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

/* Scanner Styles */
.scanner-container {
	max-width: 500px;
	margin: 2rem auto;
	text-align: center;
}

.scanner-video {
	width: 100%;
	max-width: 400px;
	border-radius: 10px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Dashboard Stats */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin: 2rem 0;
}

.stat-card {
	background: white;
	padding: 1.5rem;
	border-radius: 10px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	text-align: center;
}

.stat-number {
	font-size: 2.5rem;
	font-weight: bold;
	color: #2563eb;
	margin-bottom: 0.5rem;
}

.stat-label {
	color: #666;
	font-size: 1rem;
}

/* Alerts */
.alert {
	padding: 1rem;
	border-radius: 5px;
	margin: 1rem 0;
	border-left: 4px solid;
}

.alert-success {
	background-color: #d4edda;
	border-color: #28a745;
	color: #155724;
}

.alert-danger {
	background-color: #f8d7da;
	border-color: #dc3545;
	color: #721c24;
}

.alert-warning {
	background-color: #fff3cd;
	border-color: #ffc107;
	color: #856404;
}

.alert-info {
	background-color: #d1ecf1;
	border-color: #17a2b8;
	color: #0c5460;
}

/* Tabs */
.tabs {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 1rem 0 2rem 0;
}

.tabs a {
	text-decoration: none;
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
	border: 1px solid #e5e7eb;
	color: #111827;
	background: #ffffff;
}

.tabs a.active {
	background: #2563eb;
	border-color: #2563eb;
	color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.col-md-6 { flex: 0 0 100%; max-width: 100%; }
	.col-md-4 { flex: 0 0 48%; max-width: 48%; }
	.col-md-3 { flex: 0 0 31%; max-width: 31%; }
}

@media (max-width: 768px) {
	.header .container {
		flex-direction: column;
		gap: 1rem;
	}
	
	.nav {
		gap: 1rem;
	}
	
	.col-md-4, .col-md-3 {
		flex: 0 0 48%;
		max-width: 48%;
	}
}

@media (max-width: 480px) {
	.stat-grid { grid-template-columns: 1fr; }
}

/* Loading Spinner */
.spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #2563eb;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin: 20px auto;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
	.header,
	.btn,
	.nav {
		display: none;
	}
	
	.card {
		box-shadow: none;
		border: 1px solid #ddd;
	}
}
