/* Reset e Base */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html, body {
	height: 100%;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	font-size: 14px;
}

body {
	background-color: #f5f5f5;
	overflow-x: hidden;
}

/* Sidebar */
.sidebar {
	position: fixed;
	left: 0;
	top: 0;
	width: 260px;
	height: 100vh;
	background: linear-gradient(180deg, #3d5467 0%, #2c3e50 100%);
	color: #ffffff;
	overflow-y: auto;
	z-index: 1000;
	transition: transform 0.3s ease;
}

/* User Profile */
.user-profile {
	height: 60px;
	padding: 0 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	display: flex;
	align-items: center;
	gap: 12px;
}

.user-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	flex-shrink: 0;
}

.user-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

.user-info {
	flex: 1;
	min-width: 0;
}

.user-name {
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
	margin-bottom: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.2;
}

.user-email {
	font-size: 11px;
	color: #b8c5d3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.2;
}

/* Sidebar Navigation */
.sidebar-nav {
	padding: 10px 0;
}

.nav-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.nav-item {
	margin-bottom: 2px;
}

.nav-link {
	display: flex;
	align-items: center;
	padding: 12px 20px;
	color: #ffffff;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	position: relative;
}

	.nav-link i:not(.arrow) {
		margin-right: 12px;
		font-size: 18px;
		width: 20px;
		text-align: center;
	}

	.nav-link:hover {
		background-color: rgba(255, 255, 255, 0.1);
		color: #ffffff;
	}

	.nav-link.active {
		background-color: rgba(92, 179, 204, 0.15);
		color: #5cb3cc;
		font-weight: 600;
	}

		.nav-link.active i {
			color: #5cb3cc;
		}

		.nav-link.active .arrow {
			transform: rotate(180deg);
		}

	.nav-link[aria-expanded="true"] .arrow {
		transform: rotate(180deg);
	}

	.nav-link .arrow {
		font-size: 12px;
		transition: transform 0.2s ease;
		margin-left: auto;
		margin-right: 0;
	}

/* Submenu */
.submenu {
	list-style: none;
	background-color: rgba(0, 0, 0, 0.2);
	padding: 0;
	margin: 0;
}

	.submenu li {
		padding: 0;
	}

	.submenu a {
		display: block;
		padding: 10px 20px 10px 56px;
		color: #b8c5d3;
		text-decoration: none;
		font-size: 13px;
		transition: all 0.2s ease;
	}

		.submenu a:hover {
			background-color: rgba(255, 255, 255, 0.05);
			color: #5cb3cc;
			padding-left: 60px;
		}

		.submenu a.active {
			background-color: rgba(92, 179, 204, 0.2);
			color: #5cb3cc;
			font-weight: 600;
			border-left: 3px solid #5cb3cc;
			padding-left: 53px;
		}

/* Main Content */
.main-content {
	margin-left: 260px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	transition: margin-left 0.3s ease;
}

/* Sidebar Hidden State */
.sidebar.hidden {
	transform: translateX(-100%);
}

	.sidebar.hidden ~ .main-content {
		margin-left: 0;
	}

/* Top Bar */
.top-bar {
	background: linear-gradient(90deg, #5cb3cc 0%, #4a9fb8 100%);
	height: 60px;
	padding: 0 25px;
	display: flex;
	align-items: center;
	gap: 15px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-toggle {
	background: none;
	border: none;
	color: #ffffff;
	font-size: 24px;
	cursor: pointer;
	padding: 5px;
	line-height: 1;
	display: block;
}

	.sidebar-toggle:hover {
		opacity: 0.8;
	}

.page-title {
	font-size: 20px;
	font-weight: 600;
	color: #ffffff;
	margin: 0;
}

/* Content Area */
.content-area {
	flex: 1;
	padding: 25px;
	background-color: #f5f5f5;
}

/* Cards */
.card {
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	border: none;
	margin-bottom: 20px;
}

.card-header {
	background-color: #f8f9fa;
	border-bottom: 1px solid #e9ecef;
	padding: 15px 20px;
	font-weight: 600;
}

.card-body {
	padding: 20px;
}

/* Buttons */
.btn {
	border-radius: 6px;
	padding: 8px 16px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.btn-primary {
	background: linear-gradient(135deg, #5cb3cc 0%, #4a9fb8 100%);
	border: none;
}

	.btn-primary:hover {
		background: linear-gradient(135deg, #4a9fb8 0%, #3d8aa3 100%);
		transform: translateY(-1px);
		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	}

/* Logout Button in Top Bar */
.logout-topbar-form {
	margin-left: auto;
}

.logout-topbar-btn {
	border-width: 1px;
	font-weight: 600;
	background-color: transparent;
	color: #dc3545;
}

.logout-topbar-btn:hover,
.logout-topbar-btn:focus {
	background-color: #dc3545;
	color: #fff;
	border-color: #dc3545;
}

/* Page Header */
.page-header {
	margin-bottom: 20px;
}

.page-section-title {
	color: #2c3e50;
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 5px;
}

.table-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
	margin-bottom: 0;
}

.filter-form {
	flex: 1;
	max-width: 500px;
}

.filter-form.filter-form-sm {
	max-width: 400px;
}

.filter-form .input-group {
	border-radius: 6px;
}

.filter-form input {
	border-left: none;
	border-radius: 0;
}

.filter-form .input-group-text {
	border-right: none;
	border-top-left-radius: 6px;
	border-bottom-left-radius: 6px;
}

.filter-form input.input-arredondada-direita {
	border-top-right-radius: 6px !important;
	border-bottom-right-radius: 6px !important;
}

.filter-form #limparFiltro {
	border-left: none;
	border-top-right-radius: 6px;
	border-bottom-right-radius: 6px;
	padding: 0.375rem 0.75rem;
	height: auto;
}

.filter-form input:focus,
.filter-form .input-group-text:focus,
.filter-form #limparFiltro:focus {
	box-shadow: none;
	outline: none;
}

.filter-form input:focus {
	border-color: #86b7fe;
	z-index: 3;
}

.filter-form .input-group:focus-within .input-group-text {
	border-color: #86b7fe;
}

.filter-form .input-group:focus-within {
	box-shadow: none;
}

.table-footer {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #e9ecef;
}

.badge {
	font-weight: 500;
	padding: 4px 10px;
	gap: 4px;
	display: inline-flex;
	align-items: center;
}

tbody tr {
	transition: background-color 0.2s ease;
}

tbody tr:hover {
	background-color: rgba(92, 179, 204, 0.05);
}

.action-icons {
	display: flex;
	gap: 12px;
	justify-content: center;
	align-items: center;
}

.action-icon {
	text-decoration: none;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}

.action-icon i {
	font-size: 20px;
	font-weight: bold;
}

.action-icon:hover {
	transform: scale(1.2);
	opacity: 0.8;
}

.modal-content {
	border-radius: 12px;
	border: none;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header .modal-title {
	font-weight: 600;
	color: #2c3e50;
}

.modal-footer {
	gap: 10px;
}

@media (max-width: 768px) {
	.sidebar {
		transform: translateX(-100%);
	}

		.sidebar.show {
			transform: translateX(0);
		}

	.main-content {
		margin-left: 0;
	}

	.table-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.filter-form,
	.filter-form.filter-form-sm {
		max-width: 100%;
	}
}

/* Scrollbar personalizado para sidebar */
.sidebar::-webkit-scrollbar {
	width: 6px;
}

.sidebar::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
}

	.sidebar::-webkit-scrollbar-thumb:hover {
		background: rgba(255, 255, 255, 0.3);
	}
