@CHARSET "ISO-8859-1";

/* ==============================
   RESET E BASE
   ============================== */
.topbar,
.topbar *,
.sidebar,
.sidebar *,
.sidebar-overlay {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: #f4f6f9;
	padding-top: 56px;
}

/* ==============================
   TOPBAR
   ============================== */
.topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 56px;
	background: linear-gradient(135deg, #1a73e8, #0d47a1);
	color: #fff;
	display: flex;
	align-items: center;
	padding: 0 20px;
	z-index: 1000;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.topbar-toggle {
	font-size: 22px;
	cursor: pointer;
	margin-right: 16px;
	padding: 4px 8px;
	border-radius: 4px;
	transition: background 0.2s;
	user-select: none;
}

.topbar-toggle:hover {
	background: rgba(255,255,255,0.15);
}

.topbar-title {
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0.3px;
}

.topbar-title-link {
	color: #fff !important;
	text-decoration: none !important;
	cursor: pointer;
	transition: opacity 0.2s;
	display: flex;
	align-items: center;
}

.topbar-title-link:hover {
	opacity: 0.9;
}

/* ==============================
   TOPBAR USER MENU
   ============================== */
.topbar-user-menu {
	position: relative;
	display: flex;
	align-items: center;
	cursor: pointer;
}

.topbar-user {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	background: rgba(255,255,255,0.15);
	padding: 8px 14px;
	border-radius: 20px;
	transition: background 0.2s;
	user-select: none;
}

.topbar-user:hover {
	background: rgba(255,255,255,0.25);
}

.topbar-user-name {
	font-size: 14px;
	color: #fff;
	line-height: 1;
	font-weight: 600;
}

.topbar-user-separator {
	font-size: 8px;
	color: rgba(255,255,255,0.6);
}

.topbar-user-level {
	font-size: 12px;
	color: rgba(255,255,255,0.85);
	line-height: 1;
	font-weight: 400;
}

.topbar-user-arrow {
	font-size: 10px;
	color: rgba(255,255,255,0.7);
	margin-left: 6px;
	transition: transform 0.3s;
}

.topbar-login-btn {
	display: flex !important;
	align-items: center;
	gap: 6px;
	background: rgba(255,255,255,0.2);
	color: #fff !important;
	text-decoration: none !important;
	padding: 8px 18px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.2s;
	border: 1px solid rgba(255,255,255,0.4);
}

.topbar-login-btn:hover {
	background: rgba(255,255,255,0.35);
	text-decoration: none !important;
}

.user-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	z-index: 1001;
	min-width: 160px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: all 0.3s ease;
}

.user-dropdown-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.user-dropdown-item {
	display: flex !important;
	align-items: center;
	padding: 12px 16px;
	color: #d32f2f !important;
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.2s;
	border-radius: 8px;
	margin: 4px;
}

.user-dropdown-item:hover {
	background: #fde8e8;
}

.user-dropdown-btn {
	width: 100%;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	text-align: left;
}

.topbar-right {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ==============================
   SIDEBAR
   ============================== */
.sidebar {
	position: fixed;
	top: 56px;
	left: -320px;
	width: 320px;
	height: calc(100vh - 56px);
	background: #fff;
	z-index: 999;
	overflow-y: auto;
	transition: left 0.3s ease;
	box-shadow: 2px 0 12px rgba(0,0,0,0.08);
}

.sidebar-open {
	left: 0;
}

.sidebar-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
}

.sidebar-menu li {
	margin: 0;
}

.sidebar-section {
	font-size: 12px;
	font-weight: 700;
	color: #1a73e8;
	letter-spacing: 1.5px;
	padding: 24px 20px 12px 20px;
	text-transform: uppercase;
	border-bottom: 2px solid #e8f0fe;
	margin-bottom: 8px;
}

.sidebar-link {
	display: flex !important;
	align-items: center;
	gap: 12px;
	padding: 14px 20px;
	color: #333 !important;
	text-decoration: none !important;
	font-size: 15px;
	font-weight: 500;
	transition: all 0.2s;
	border-left: 3px solid transparent;
	line-height: 1.4;
}

.sidebar-link:hover {
	background: #e8f0fe;
	color: #1a73e8 !important;
	border-left-color: #1a73e8;
}

.sidebar-link span {
	flex: 1;
}

.sidebar-icon {
	display: inline-block !important;
	width: 16px;
	height: 16px;
	opacity: 0.7;
}

.sidebar-link:hover .sidebar-icon {
	opacity: 1;
}

.sidebar-divider {
	height: 2px;
	background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
	margin: 16px 20px;
}

.sidebar-link-login {
	color: #1a73e8 !important;
	font-weight: 600;
	font-size: 15px;
	background: #e8f0fe;
	border-left-color: #1a73e8;
	padding: 16px 20px;
	margin-top: 8px;
}

.sidebar-link-login:hover {
	background: #d2e3fc;
}

.sidebar-link-logout {
	color: #d32f2f !important;
	font-weight: 600;
	font-size: 15px;
	background: #fde8e8;
	border-left-color: #d32f2f;
	padding: 16px 20px;
	margin-top: 8px;
}

.sidebar-link-logout:hover {
	background: #f8bbb8;
	border-left-color: #d32f2f;
}

/* ==============================
   SIDEBAR OVERLAY
   ============================== */
.sidebar-overlay {
	display: none;
	position: fixed;
	top: 56px;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.3);
	z-index: 998;
}

.sidebar-overlay-visible {
	display: block;
}

/* ==============================
   CONTEÚDO
   ============================== */
#conteudo {
	padding: 24px 28px;
	max-width: 1200px;
	margin: 0 auto;
}

/* ==============================
   BOTÕES
   ============================== */
.button {
	margin-top: 10px;
	margin-bottom: 10px;
}

/* ==============================
   FORMULÁRIOS ? CADASTRO
   ============================== */
.label {
	text-align: right;
	padding-right: 10px;
}

.field {
	width: 100%;
}

/* Card de cadastro */
.form-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
	overflow: hidden;
	margin-top: 20px;
}

.form-card-header {
	background: linear-gradient(135deg, #1a73e8, #0d47a1);
	padding: 18px 24px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.form-card-header h2 {
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	letter-spacing: 0.3px;
}

.form-card-body {
	padding: 28px 28px 8px;
}

.form-card-footer {
	padding: 8px 28px 24px;
	display: flex;
	gap: 12px;
}

/* Campos do formulário */
.form-row {
	display: flex;
	flex-direction: column;
	margin-bottom: 20px;
}

.form-row label {
	font-size: 13px;
	font-weight: 600;
	color: #555;
	margin-bottom: 6px;
}

.form-row .ui-inputfield,
.form-row .ui-inputtext {
	width: 100% !important;
	max-width: 460px;
	padding: 9px 12px !important;
	border: 1.5px solid #dde1e7 !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	color: #333 !important;
	background: #fafbfc !important;
	transition: border-color 0.2s, box-shadow 0.2s !important;
	box-sizing: border-box !important;
}

.form-row .ui-inputfield:focus,
.form-row .ui-inputtext:focus {
	border-color: #1a73e8 !important;
	background: #fff !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1) !important;
}

.form-row .ui-inputfield[disabled],
.form-row .ui-inputtext[disabled] {
	background: #f1f3f5 !important;
	color: #999 !important;
	cursor: not-allowed;
}

/* SelectOneMenu (combo) ? override completo do PrimeFaces */
.form-row .ui-selectonemenu {
	width: 100% !important;
	max-width: 460px !important;
	height: 38px !important;
	border: 1.5px solid #dde1e7 !important;
	border-radius: 8px !important;
	background: #fafbfc !important;
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center !important;
	transition: border-color 0.2s, box-shadow 0.2s !important;
	padding: 0 !important;
}

.form-row .ui-selectonemenu:not(.ui-state-disabled):hover,
.form-row .ui-selectonemenu.ui-state-focus {
	border-color: #1a73e8 !important;
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1) !important;
	outline: none !important;
}

.form-row .ui-selectonemenu .ui-selectonemenu-label {
	flex: 1 !important;
	padding: 0 12px !important;
	font-size: 14px !important;
	color: #333 !important;
	background: transparent !important;
	border: none !important;
	border-radius: 8px 0 0 8px !important;
	height: 100% !important;
	line-height: 36px !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	white-space: nowrap !important;
}

.form-row .ui-selectonemenu .ui-selectonemenu-trigger {
	width: 36px !important;
	min-width: 36px !important;
	height: 100% !important;
	background: transparent !important;
	border: none !important;
	border-left: 1.5px solid #dde1e7 !important;
	border-radius: 0 8px 8px 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	color: #666 !important;
}

.form-row .ui-selectonemenu .ui-selectonemenu-trigger .ui-icon {
	color: #666 !important;
}

/* Painel dropdown do combo */
.ui-selectonemenu-panel {
	border: 1.5px solid #dde1e7 !important;
	border-radius: 8px !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
	overflow: hidden !important;
}

.ui-selectonemenu-panel .ui-selectonemenu-items-wrapper {
	border-radius: 8px !important;
}

.ui-selectonemenu-panel .ui-selectonemenu-item {
	font-size: 14px !important;
	color: #333 !important;
	padding: 9px 12px !important;
	transition: background 0.15s !important;
}

/* Primeiro item (Selecione...) ? cinza e itálico */
.ui-selectonemenu-panel .ui-selectonemenu-item:first-child {
	color: #999 !important;
	font-style: italic !important;
}

.ui-selectonemenu-panel .ui-selectonemenu-item:hover {
	background: #e8f0fe !important;
	color: #1a73e8 !important;
}

.ui-selectonemenu-panel .ui-selectonemenu-item.ui-state-highlight {
	background: #e8f0fe !important;
	color: #1a73e8 !important;
}

/* Label do combo quando nenhuma opção selecionada (placeholder) */
.form-row .ui-selectonemenu .ui-selectonemenu-label.ui-inputfield.ui-placeholder,
.form-row .ui-selectonemenu .ui-selectonemenu-label[placeholder] {
	color: #999 !important;
	font-style: italic !important;
}

/* Botões do formulário */
.btn-salvar .ui-button,
.btn-salvar {
	background: linear-gradient(135deg, #1a73e8, #0d47a1) !important;
	border: none !important;
	border-radius: 8px !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	padding: 10px 28px !important;
	transition: opacity 0.2s !important;
	cursor: pointer;
}

.btn-salvar .ui-button:hover,
.btn-salvar:hover {
	opacity: 0.88 !important;
}

.btn-cancelar .ui-button,
.btn-cancelar {
	background: #fff !important;
	border: 1.5px solid #dde1e7 !important;
	border-radius: 8px !important;
	color: #555 !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	padding: 10px 28px !important;
	transition: background 0.2s, border-color 0.2s !important;
	cursor: pointer;
}

.btn-cancelar .ui-button:hover,
.btn-cancelar:hover {
	background: #f4f6f9 !important;
	border-color: #bcc1ca !important;
}

/* ==============================
   LISTAGEM ? CARD DE TABELA
   ============================== */
.list-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
	overflow: hidden;
	margin-top: 20px;
}

.list-card-header {
	background: linear-gradient(135deg, #1a73e8, #0d47a1);
	padding: 18px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.list-card-header h2 {
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	letter-spacing: 0.3px;
}

/* Botões dentro de headers azuis ? ficam brancos com texto azul */
.list-card-header .btn-salvar,
.list-card-header .btn-salvar .ui-button,
.list-card-header .btn-cancelar,
.list-card-header .btn-cancelar .ui-button,
.form-card-header .btn-salvar,
.form-card-header .btn-salvar .ui-button,
.form-card-header .btn-cancelar,
.form-card-header .btn-cancelar .ui-button {
	background: rgba(255, 255, 255, 0.15) !important;
	border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
	color: #fff !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	padding: 8px 20px !important;
	transition: background 0.2s !important;
}

.list-card-header .btn-salvar:hover,
.list-card-header .btn-salvar .ui-button:hover,
.list-card-header .btn-cancelar:hover,
.list-card-header .btn-cancelar .ui-button:hover,
.form-card-header .btn-salvar:hover,
.form-card-header .btn-salvar .ui-button:hover,
.form-card-header .btn-cancelar:hover,
.form-card-header .btn-cancelar .ui-button:hover {
	background: rgba(255, 255, 255, 0.28) !important;
	border-color: #fff !important;
}

.list-card-body {
	padding: 20px 24px;
}

/* ==============================
   GROWL ? posição abaixo da topbar
   ============================== */
.ui-growl {
	top: 66px !important;
}

/* ==============================
   CHAT (legado)
   ============================== */
.divPai {
	width: 100%;
}

.divFilha {
	width: 400px;
	min-width: 400px;
	max-width: 400px;
	height: 400px;
	min-height: 400px;
	max-height: 400px;
	float: left;
	margin: 5px;
	overflow: scroll;
}

.chat {
	max-width: 400px;
	max-height: 400px;
}

.botao_chat {
	float: right;
	width: 30%;
	height: 40px;
}

.mensagem_chat {
	float: left;
	height: 3em;
	width: 400px;
}

.scroll {
	width: 400px !important;
	height: 400px !important;
	overflow: scroll !important;
	list-style-type: none !important;
}

.ui-datalist-data {
	display: block;
	list-style-type: none;
	-webkit-margin-before: 1em;
	-webkit-margin-after: 1em;
	-webkit-margin-start: 0px;
	-webkit-margin-end: 0px;
	-webkit-padding-start: 40px;
}

.mensagem_data {
	color: red;
	padding-right: 10px;
}

.mensagem_texto {
	margin-left: 20px;
}

/* ==============================
   HOME - CARDS DE NAVEGAÇÃO
   ============================== */
.home-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 40px 20px;
}

.home-logo {
	width: 60%;
	max-width: 360px;
	margin-bottom: 40px;
}

.home-cards {
	display: flex;
	gap: 28px;
	justify-content: center;
	flex-wrap: wrap;
}

.home-card {
	display: block;
	width: 280px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.home-card-icon {
	height: 140px;
	background: linear-gradient(135deg, #1a73e8, #0d47a1);
	display: flex;
	align-items: center;
	justify-content: center;
}

.home-card-icon img {
	width: 90px;
	height: 90px;
}

.home-card-body {
	padding: 20px;
}

.home-card-title {
	font-size: 18px;
	font-weight: 600;
	color: #1a73e8;
	margin: 0 0 8px 0;
}

.home-card-desc {
	font-size: 13px;
	color: #666;
	line-height: 1.5;
	margin: 0;
}

@media (max-width: 640px) {
	.home-cards {
		flex-direction: column;
		align-items: center;
	}
	.home-card {
		flex: 0 1 100%;
		max-width: 320px;
	}
	.home-logo {
		width: 80%;
	}
}

/* ==============================
   LOGIN
   ============================== */
.login-page {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 60%, #082f70 100%);
	padding: 20px;
}

.login-card {
	width: 100%;
	max-width: 400px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

.login-card-header {
	background: #fff;
	padding: 36px 20px 24px;
	text-align: center;
}

.login-card-header img {
	width: 200px;
	max-width: 85%;
}

.login-card-header h1 {
	color: #0d47a1;
	font-size: 15px;
	font-weight: 500;
	margin: 12px 0 0 0;
	letter-spacing: 0.5px;
}

.login-card-body {
	padding: 32px 32px 28px;
}

.login-field {
	margin-bottom: 20px;
}

.login-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #444;
	margin-bottom: 6px;
}

.login-field .ui-inputtext,
.login-field .ui-inputfield {
	width: 100% !important;
	padding: 10px 14px !important;
	border: 1.5px solid #ddd !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	transition: border-color 0.2s !important;
	box-sizing: border-box !important;
}

.login-field .ui-inputtext:focus,
.login-field .ui-inputfield:focus {
	border-color: #1a73e8 !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12) !important;
}

.login-btn {
	width: 100%;
	padding: 12px !important;
	background: linear-gradient(135deg, #1a73e8, #0d47a1) !important;
	border: none !important;
	border-radius: 8px !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	cursor: pointer;
	transition: opacity 0.2s !important;
	margin-top: 8px;
}

.login-btn:hover {
	opacity: 0.9 !important;
}

.login-card-footer {
	text-align: center;
	padding: 0 32px 24px;
}

.login-card-footer a {
	font-size: 13px;
	color: #1a73e8;
	text-decoration: none;
}

.login-card-footer a:hover {
	text-decoration: underline;
}