/**
 * TicketMan 2025 - Main Stylesheet
 * File: style.css
 * Contains all styling for the application
 */

/* =============================================================================
   GLOBAL STYLES
   ============================================================================= */

body {
	background-color: #f8f9fa;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-content {
	padding-top: 2rem;
	min-height: calc(100vh - 200px);
}

.page-header {
	background: white;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 2rem;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-header h1 {
	margin: 0;
	color: #495057;
	font-weight: 600;
}

.page-header .breadcrumb {
	margin: 0;
	background: none;
	padding: 0;
}

.card {
	border: none;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	border-radius: 8px;
}

.btn {
	border-radius: 6px;
	font-weight: 500;
}

/* =============================================================================
   NAVIGATION STYLES
   ============================================================================= */

.navbar-custom {
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	padding: 0.5rem 0;
}

.navbar-brand {
	font-weight: bold;
	font-size: 1.5rem;
	color: white !important;
}

.navbar-nav .nav-link {
	color: rgba(255,255,255,0.9) !important;
	font-weight: 500;
	padding: 0.75rem 1rem !important;
	margin: 0 0.25rem;
	border-radius: 6px;
	transition: all 0.3s ease;
	position: relative;
}

.navbar-nav .nav-link:hover {
	color: white !important;
	background: rgba(255,255,255,0.1);
	transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
	color: white !important;
	background: rgba(255,255,255,0.2);
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.navbar-nav .nav-link i {
	margin-right: 0.5rem;
	width: 16px;
	text-align: center;
}

/* Dropdown Styles */
.dropdown-menu {
	border: none;
	box-shadow: 0 8px 30px rgba(0,0,0,0.12);
	border-radius: 8px;
	padding: 0.5rem 0;
	margin-top: 0.5rem;
}

.dropdown-item {
	padding: 0.75rem 1.5rem;
	font-weight: 500;
	color: #495057;
	transition: all 0.2s ease;
}

.dropdown-item:hover {
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	color: white;
	transform: translateX(2px);
}

.dropdown-item i {
	margin-right: 0.75rem;
	width: 16px;
	text-align: center;
	opacity: 0.7;
}

/* Mobile Styles */
@media (max-width: 991.98px) {
	.navbar-nav {
		padding-top: 1rem;
	}
	
	.navbar-nav .nav-link {
		margin: 0.25rem 0;
		padding: 1rem 1.5rem !important;
	}
	
	.dropdown-menu {
		background: rgba(255,255,255,0.95);
		margin-top: 0;
		border-radius: 0;
	}
}

/* Notification Badge */
.notification-badge {
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
	background: #dc3545;
	color: white;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	font-size: 0.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}

/* User Menu */
.user-menu {
	background: rgba(255,255,255,0.1);
	border-radius: 25px;
	padding: 0.5rem 1rem;
}

.user-menu .nav-link {
	color: white !important;
	padding: 0.5rem 0 !important;
}

.user-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	margin-right: 0.5rem;
	border: 2px solid rgba(255,255,255,0.3);
}

/* =============================================================================
   CUSTOMER MANAGEMENT STYLES
   ============================================================================= */

.customer-card {
	transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.customer-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-section {
	background: #f8f9fa;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
}

.loading {
	display: none;
}

.spinner-border-sm {
	width: 1rem;
	height: 1rem;
}

.alert-fixed {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1050;
	min-width: 300px;
}

.search-highlight {
	background-color: yellow;
}

/* =============================================================================
   MODAL STYLES
   ============================================================================= */

/* Modal z-index fixes */
.modal {
	z-index: 1050;
}

.modal-backdrop {
	z-index: 1040;
}

.modal.show {
	z-index: 1055;
}

.modal.show .modal-backdrop {
	z-index: 1050;
}

/* Ensure edit modals appear above other modals */
#addNoteModal {
	z-index: 1060;
}

#addNoteModal.show {
	z-index: 1065;
}

#editNoteModal {
	z-index: 1060;
}

#editNoteModal.show {
	z-index: 1065;
}

#editDocumentModal {
	z-index: 1060;
}

#editDocumentModal.show {
	z-index: 1065;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
	.btn-group-vertical .btn {
		margin-bottom: 5px;
	}
	
	.main-content {
		padding-top: 1rem;
	}
	
	.page-header {
		padding: 1rem;
		margin-bottom: 1rem;
	}
	
	.form-section {
		padding: 15px;
		margin-bottom: 15px;
	}
	
	.card-body {
		padding: 1rem;
	}
	
	.btn-group .btn {
		font-size: 0.75rem;
		padding: 0.25rem 0.5rem;
	}
	
	.alert-fixed {
		right: 10px;
		left: 10px;
		min-width: auto;
	}
}

@media (max-width: 576px) {
	.container-fluid {
		padding-left: 1rem;
		padding-right: 1rem;
	}
	
	.btn-group .btn {
		display: block;
		width: 100%;
		margin-bottom: 0.25rem;
		border-radius: 4px;
	}
	
	.btn-group {

	}
	
	.modal-dialog {
		margin: 0.5rem;
	}
	
	.modal-xl,
	.modal-lg {
		max-width: none;
	}

}



@media only screen and (max-width: 578px) {
.mb-0{
	width: auto; /* Flexible width for larger screens */
	max-width: 60%; /* Optional: cap the width */
	
}
.me-2{
	width: auto; /* Flexible width for larger screens */
	max-width: 90%; /* Optional: cap the width */
}

}

/* =============================================================================
   FORM STYLES
   ============================================================================= */

.form-label {
	font-weight: 600;
	color: #495057;
	margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
	border-color: #2a5298;
	box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.25);
}

.btn-primary {
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	border: none;
	color: white;
}

.btn-primary:hover {
	background: linear-gradient(135deg, #1a3463 0%, #244a89 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-outline-primary {
	border-color: #2a5298;
	color: #2a5298;
}

.btn-outline-primary:hover {
	background-color: #2a5298;
	border-color: #2a5298;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.text-primary {
	color: #2a5298 !important;
}

.bg-primary {
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
}

.border-primary {
	border-color: #2a5298 !important;
}

/* Loading states */
.btn.loading {
	pointer-events: none;
	opacity: 0.7;
}

.btn .loading {
	display: none;
}

.btn.loading .loading {
	display: inline-block;
}

/* Status badges */
.badge.bg-success {
	background-color: #28a745 !important;
}

.badge.bg-secondary {
	background-color: #6c757d !important;
}

.badge.bg-warning {
	background-color: #ffc107 !important;
	color: #212529 !important;
}

.badge.bg-danger {
	background-color: #dc3545 !important;
}

.badge.bg-info {
	background-color: #17a2b8 !important;
}


.mb-0{
	width:90%;
	
}
.me-2{
	width:90%;
	padding:10px;
}

/* =============================================================================
   ANIMATION CLASSES
   ============================================================================= */

.fade-in {
	animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
	animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
	from { transform: translateX(-100%); }
	to { transform: translateX(0); }
}

.scale-in {
	animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
	from { transform: scale(0.9); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
	.navbar,
	.btn,
	.modal,
	.alert-fixed {
		display: none !important;
	}
	
	.main-content {
		padding: 0;
	}
	
	.card {
		box-shadow: none;
		border: 1px solid #ddd;
	}
	
	.page-header {
		box-shadow: none;
		border-bottom: 2px solid #000;
	}
}

/* =============================================================================
   DARK MODE SUPPORT (Optional)
   ============================================================================= */
/**
@media (prefers-color-scheme: dark) {
	body {
		background-color: #1a1a1a;
		color: #ffffff;
	}
	
	.card {
		background-color: #2d2d2d;
		color: #ffffff;
	}
	
	.page-header {
		background-color: #2d2d2d;
		color: #ffffff;
	}
	
	.form-section {
		background-color: #3a3a3a;
	}
	
	.form-control,
	.form-select {
		background-color: #3a3a3a;
		border-color: #555;
		color: #ffffff;
	}
	
	.modal-content {
		background-color: #2d2d2d;
		color: #ffffff;
	}
	
	.dropdown-menu {
		background-color: #2d2d2d;
	}
	
	.dropdown-item {
		color: #ffffff;
	}
	
	.text-muted {
		color: #aaa !important;
	}
}
**/
/* =============================================================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================================================= */

/* Focus indicators */
.btn:focus,
.form-control:focus,
.form-select:focus {
	outline: 2px solid #2a5298;
	outline-offset: 2px;
}

/* Skip navigation link */
.skip-nav {
	position: absolute;
	top: -40px;
	left: 6px;
	background: #2a5298;
	color: white;
	padding: 8px;
	text-decoration: none;
	border-radius: 4px;
	z-index: 9999;
}

.skip-nav:focus {
	top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.card {
		border: 2px solid #000;
	}
	
	.btn {
		border: 2px solid;
	}
	
	.form-control,
	.form-select {
		border: 2px solid #000;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	
	.customer-card {
		transition: none;
	}
	
	.customer-card:hover {
		transform: none;
	}
	
	.navbar-nav .nav-link {
		transition: none;
	}
	
	.btn {
		transition: none;
	}
}