/* Modern Theme CSS for Tracker Application */

:root {
	/* Color Palette */
	--primary-color: #6366f1;
	--primary-dark: #4f46e5;
	--primary-light: #818cf8;
	--secondary-color: #8b5cf6;
	--secondary-dark: #7c3aed;
	--secondary-light: #a78bfa;
	--accent-color: #06b6d4;
	--accent-dark: #0891b2;
	--accent-light: #22d3ee;
	--success-color: #10b981;
	--warning-color: #f59e0b;
	--danger-color: #ef4444;
	--info-color: #3b82f6;

	/* Backgrounds */
	--bg-primary: #f8fafc;
	--bg-secondary: #f1f5f9;
	--bg-dark: #0f172a;
	--bg-card: #ffffff;
	--bg-card-dark: #1e293b;

	/* Text Colors */
	--text-primary: #0f172a;
	--text-secondary: #64748b;
	--text-light: #cbd5e1;
	--text-white: #ffffff;

	/* Gradients */
	--gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	--gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
	--gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
	--gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	--gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	--gradient-ocean: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
	--gradient-sunset: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

	/* Shadows */
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
	--shadow-glow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);

	/* Border Radius */
	--radius-sm: 0.1875rem;
	--radius-md: 0.25rem;
	--radius-lg: 0.375rem;
	--radius-xl: 0.5rem;
	--radius-2xl: 0.75rem;
	--radius-full: 9999px;

	/* Spacing */
	--spacing-xs: 0.25rem;
	--spacing-sm: 0.5rem;
	--spacing-md: 1rem;
	--spacing-lg: 1.5rem;
	--spacing-xl: 2rem;
	--spacing-2xl: 3rem;
}

/* Base Styles */
body {
	background: var(--gradient-purple);
	background-attachment: fixed;
	color: var(--text-white);
	min-height: 100vh;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Glass Morphism Effect */
.glass {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: var(--shadow-glow);
}

.glass-dark {
	background: rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: var(--shadow-glow);
}

/* Modern Card Styles */
.card-modern {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--radius-2xl);
	box-shadow: var(--shadow-glow);
	color: var(--text-white);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-modern:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.5);
}

.card-modern .card-header {
	background: rgba(255, 255, 255, 0.05);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding: 1.25rem 1.5rem;
	border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.card-modern .card-body {
	padding: 1.5rem;
}

.card-modern .card-title {
	font-weight: 700;
	font-size: 1.25rem;
	margin-bottom: 0;
	color: var(--text-white);
}

/* Modern Button Styles */
.btn-modern {
	font-weight: 600;
	padding: 0.625rem 1.5rem;
	border-radius: var(--radius-lg);
	border: none;
	transition: all 0.3s ease;
	text-transform: none;
	letter-spacing: 0.025em;
}

.btn-modern-primary {
	background: var(--gradient-primary);
	color: white;
	box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-modern-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
	color: white;
}

.btn-modern-secondary {
	background: var(--gradient-secondary);
	color: white;
	box-shadow: 0 4px 14px 0 rgba(6, 182, 212, 0.39);
}

.btn-modern-secondary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
	color: white;
}

.btn-modern-success {
	background: var(--gradient-success);
	color: white;
	box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-modern-success:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
	color: white;
}

.btn-modern-danger {
	background: var(--gradient-danger);
	color: white;
	box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
}

.btn-modern-danger:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
	color: white;
}

.btn-modern-outline {
	background: rgba(255, 255, 255, 0.1);
	border: 2px solid rgba(255, 255, 255, 0.3);
	color: white;
	backdrop-filter: blur(10px);
}

.btn-modern-outline:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.5);
	color: white;
	transform: translateY(-2px);
}

.btn-modern:active {
	transform: translateY(0);
}

/* Form Styles */
.form-modern .form-label {
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--text-white);
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.form-modern .form-control,
.form-modern .form-select,
.form-modern select {
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: var(--radius-lg);
	padding: 0.75rem 1rem;
	transition: all 0.3s ease;
	color: var(--text-primary);
}

.form-modern .form-control:focus,
.form-modern .form-select:focus,
.form-modern select:focus {
	background: white;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
	outline: none;
}

.form-modern .form-control::placeholder {
	color: var(--text-secondary);
	opacity: 0.7;
}

/* Apply form styles to standalone selects and inputs (for menu_it function and legacy forms) */
select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
textarea {
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: var(--radius-lg);
	padding: 0.75rem 1rem;
	transition: all 0.3s ease;
	color: var(--text-primary);
	width: 100%;
	font-family: inherit;
}

select:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="file"]:focus,
textarea:focus {
	background: white;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
	outline: none;
}

input::placeholder,
textarea::placeholder {
	color: var(--text-secondary);
	opacity: 0.7;
}

/* Table Styles */
.table-modern {
	color: var(--text-white);
	background-color: transparent;
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.table-modern thead {
	background: var(--gradient-secondary);
	color: white;
}

.table-modern thead th {
	border: none;
	padding: 1rem 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.05em;
	white-space: nowrap;
}

.table-modern tbody tr {
	background: rgba(255, 255, 255, 0.05);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	transition: all 0.2s ease;
}

.table-modern tbody tr:hover {
	background: rgba(255, 255, 255, 0.15);
	transform: scale(1.01);
}

.table-modern tbody td {
	padding: 0.875rem 0.75rem;
	border: none;
	vertical-align: middle;
}

.table-modern tfoot {
	background: rgba(255, 255, 255, 0.1);
	font-weight: 700;
}

.table-modern tfoot td {
	padding: 1rem 0.75rem;
	border: none;
}

/* Table Responsive */
.table-responsive {
	border-radius: var(--radius-lg);
	background: rgba(255, 255, 255, 0.05);
}

/* Navbar Styles */
.navbar-modern {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-radius: var(--radius-2xl);
	padding: 1rem 1.5rem;
	box-shadow: var(--shadow-glow);
	margin-bottom: var(--spacing-lg);
}

/* Modal Styles */
.modal-modern .modal-content {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	border: none;
	border-radius: var(--radius-2xl);
	overflow: hidden;
	box-shadow: var(--shadow-xl);
}

.modal-modern .modal-header {
	background: var(--gradient-primary);
	color: white;
	border: none;
	padding: 1.5rem;
}

.modal-modern .modal-title {
	font-weight: 700;
	font-size: 1.5rem;
}

.modal-modern .modal-body {
	color: var(--text-primary);
}

.modal-modern .btn-close {
	filter: brightness(0) invert(1);
	opacity: 1;
}

.modal-modern .btn-close:hover {
	opacity: 0.8;
}

/* Badge Styles */
.badge-modern {
	padding: 0.5rem 1rem;
	border-radius: var(--radius-full);
	font-weight: 600;
	font-size: 0.875rem;
	letter-spacing: 0.025em;
}

.badge-primary {
	background: var(--gradient-primary);
	color: white;
}

.badge-success {
	background: var(--gradient-success);
	color: white;
}

.badge-danger {
	background: var(--gradient-danger);
	color: white;
}

.badge-info {
	background: var(--gradient-secondary);
	color: white;
}

/* Alert Styles */
.alert-modern {
	border-radius: var(--radius-lg);
	border: none;
	backdrop-filter: blur(10px);
	padding: 1rem 1.5rem;
}

.alert-modern.alert-info {
	background: rgba(59, 130, 246, 0.2);
	color: #dbeafe;
	border-left: 4px solid var(--info-color);
}

.alert-modern.alert-success {
	background: rgba(16, 185, 129, 0.2);
	color: #d1fae5;
	border-left: 4px solid var(--success-color);
}

.alert-modern.alert-warning {
	background: rgba(245, 158, 11, 0.2);
	color: #fef3c7;
	border-left: 4px solid var(--warning-color);
}

.alert-modern.alert-danger {
	background: rgba(239, 68, 68, 0.2);
	color: #fee2e2;
	border-left: 4px solid var(--danger-color);
}

/* Utility Classes */
.text-gradient {
	background: var(--gradient-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.amount-cell {
	text-align: right;
	font-family: 'Courier New', Monaco, monospace;
	font-weight: 600;
}

.shadow-glow {
	box-shadow: var(--shadow-glow);
}

.shadow-hover {
	transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
	box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.5);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.3);
	border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.5);
}

/* Loading Animation */
.loading {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: white;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* Fade In Animation */
.fade-in {
	animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive Adjustments */
@media (max-width: 768px) {
	.card-modern .card-body {
		padding: 1rem;
	}

	.navbar-modern {
		border-radius: var(--radius-lg);
		padding: 0.75rem 1rem;
	}

	.btn-modern {
		padding: 0.5rem 1rem;
		font-size: 0.875rem;
	}

	.table-modern thead th,
	.table-modern tbody td {
		padding: 0.5rem 0.375rem;
		font-size: 0.875rem;
	}
}

@media (max-width: 576px) {
	.card-modern {
		border-radius: var(--radius-lg);
	}

	.form-modern .form-control,
	.form-modern .form-select {
		font-size: 16px; /* Prevents zoom on iOS */
	}
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
	.modal-modern .modal-content {
		background: rgba(30, 41, 59, 0.95);
	}

	.modal-modern .modal-body {
		color: var(--text-white);
	}
}
