@charset "UTF-8";

/* =========================================================
   CHALAZA PORTAL — common.css
   dùng chung cho tất cả màn hình (JSF/PrimeFaces)
   ========================================================= */


/* ===== Utility: Layout ===== */
.nlogin-screen-name {
	text-align: center;
}

.layout-main {
	padding-top: 0px !important;
}

.pt-0 {
	padding-top: 0px !important;
}

.content-panel {
	width: calc(100% - 14px);
	background: white;
	display: flex;
	justify-content: center;
}

.d-flex {
	display: flex;
}

.mgr-5px {
	margin-right: 5px !important;
}

.mgr-10px {
	margin-right: 10px !important;
}

.widtd-max-content {
	width: max-content !important;
}

.ui-outputpanel {
	padding-top: 17px;
}

.ui-button.detail-button {
	width: auto;
}

/* Start set column layout 契約モデル */
.contract-table {
	table-layout: fixed;
}

.section {
	margin-bottom: 20px;
}

.None-padding {
	padding: 0px !important;
}

.align-center {
	text-align: center;
}

.align-right {
	text-align: right;
}

.align-content-center {
	align-content: center;
}

/* icon loading */
.icon-loading {
	display: flex;
	justify-content: space-between;
	align-items: center;
}


/* =========================================================
   BADGE STYLES
   ========================================================= */
.ui-badge {
	width: 100px;
}

.ui-badge.ui-widget.ui-badge-success {
	background: #83f383;
	color: #000;
}

.ui-badge.ui-widget.ui-badge-warning {
	background: #ffcc31;
	color: #000;
}

.ui-badge.ui-widget.ui-badge-danger {
	background: #ff7280;
	color: #000;
}


/* =========================================================
   MESSAGE LINK (CommandLink in DataTable)
   ========================================================= */
.ui-datatable .ui-state-highlight .cp-message-link {
	color: #ffffff;
	text-decoration: none;
}

.ui-datatable .cp-message-link.ui-button-flat {
	text-decoration: none;
}


/* =========================================================
   CZ-OVERLAY PANEL
   Dùng chung cho error-overlay, unconfigured-overlay, v.v.
   ========================================================= */
.cz-overlay {
	width: 520px;
}

.cz-overlay .ui-overlaypanel-content {
	padding: 0;
}

.cz-overlay-title {
	display: block;
	padding: 8px;
	font-weight: bold;
	font-size: 1.1rem;
	color: #d32f2f;
	border-bottom: 1px solid #ddd;
}

.cz-overlay-detail-box {
	max-height: 220px;
	height: auto;
	overflow-y: auto;
	padding: 8px;
	font-size: 0.95rem;
	line-height: 1.6;
}

.cz-overlay-line {
	display: flex;
	align-items: flex-start;
	margin-bottom: 6px;
}


/* =========================================================
   SELECT ONE MENU — Max Height
   ========================================================= */
div.ui-selectonemenu-items-wrapper {
	max-height: 220px !important;
}


/* =========================================================
   DATAVIEW CARD LAYOUT  (.dv-*)
   ========================================================= */
.dv-card {
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 12px 16px;
	margin: 6px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.2s, border-color 0.2s;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.dv-card:hover {
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.13);
}

.dv-card.selected-card {
	border: 2px solid #1976d2;
	background: #f0f7ff;
}

.dv-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid #f0f0f0;
}

.dv-card-title {
	font-weight: 600;
	font-size: 1.2rem;
	color: #1a1a2e;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 70%;
}

.dv-card-body {
	font-size: 0.88rem;
	color: #444;
	flex: 1;
}

.dv-field {
	display: flex;
	align-items: baseline;
	margin-bottom: 5px;
	gap: 6px;
}

.dv-label {
	color: #777;
	font-size: 0.80rem;
	min-width: 90px;
	flex-shrink: 0;
}

.dv-value {
	color: #222;
	word-break: break-all;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 3em;
	line-height: 1.5em;
	font-size: 1.05rem;
}

.dv-card-footer {
	margin-top: 10px;
	display: flex;
	justify-content: flex-end;
}


/* =========================================================
   STAT GRID  (Activity / Error stat area)
   ========================================================= */
.stat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 4px 8px;
	margin-top: 6px;
	padding: 6px 8px;
	background: #f8f9fa;
	border-radius: 6px;
}

.stat-item {
	text-align: center;
}

.stat-item .stat-label {
	display: block;
	font-size: 0.75rem;
	color: #888;
}

.stat-item .stat-value {
	display: block;
	font-size: 1.0rem;
	font-weight: 600;
	color: #333;
}


/* =========================================================
   DATAVIEW RESPONSIVE GRID
   ========================================================= */
/* Desktop: 4 cards / row */
.ui-dataview .ui-dataview-column {
	width: 25%;
	padding: 4px;
	box-sizing: border-box;
}

/* Tablet: 2 cards / row */
@media (max-width : 992px) {
	.ui-dataview .ui-dataview-column {
		width: 50%;
	}
}

/* Mobile: 1 card / row */
@media (max-width : 576px) {
	.ui-dataview .ui-dataview-column {
		width: 100%;
	}
}

/* Activity / Error DataView: wider cards (2 per row) */
.activity-dataview .ui-dataview-column,
.error-dataview .ui-dataview-column {
	width: 50%;
}

@media (max-width : 768px) {

	.activity-dataview .ui-dataview-column,
	.error-dataview .ui-dataview-column {
		width: 100%;
	}
}

.no-header-dataview .ui-dataview-header {
	display: none !important;
}


/* =========================================================
   FLOATING CONTACT BUTTON  (.floating-contact-btn)
   ========================================================= */
.floating-contact-btn {
	position: fixed;
	right: 24px;
	bottom: 32px;
	z-index: 9999;
}

.floating-contact-btn:hover {
	background: #1d4ed8;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.floating-contact-btn .pi-envelope {
	font-size: 1.3rem;
}

@media (max-width : 576px) {
	.floating-contact-btn {
		padding: 10px 16px;
		font-size: 0.9rem;
		gap: 8px;
	}
}


/* =========================================================
   DASHBOARD GRID & STAT CARDS
   ========================================================= */
.dashboard-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin: 20px;
}

.stat-card {
	display: flex;
	align-items: center;
	padding: 18px 22px;
	border-radius: 10px;
	border: 1px solid;
	background: #ffffff;
	transition: all 0.2s ease;
}

.stat-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.icon-circle {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 14px;
	font-size: 18px;
}

.stat-title {
	font-size: 14px;
	font-weight: 600;
}

.stat-value {
	font-size: 24px;
	font-weight: 700;
	margin-top: 4px;
}


/* =========================================================
   COLOR SYSTEM  (.blue / .green / .red / .yellow)
   ========================================================= */
.blue {
	border-color: #90caf9;
	background: #e3f2fd;
}

.blue .icon-circle {
	background: #1e88e5;
	color: white;
}

.blue .stat-value {
	color: #1565c0;
}

.green {
	border-color: #a5d6a7;
	background: #e8f5e9;
}

.green .icon-circle {
	background: #43a047;
	color: white;
}

.green .stat-value {
	color: #2e7d32;
}

.red {
	border-color: #ef9a9a;
	background: #ffebee;
}

.red .icon-circle {
	background: #e53935;
	color: white;
}

.red .stat-value {
	color: #c62828;
}

.yellow {
	border-color: #ffe082;
	background: #fff8e1;
}

.yellow .icon-circle {
	background: #fbc02d;
	color: white;
}

.yellow .stat-value {
	color: #f9a825;
}


/* =========================================================
   PANEL HEADER FLEX
   ========================================================= */
.panel-header-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.panel-title {
	font-weight: 600;
	font-size: 16px;
}

.detail-button {
	white-space: nowrap;
}

.panel-header-flex .ui-button {
	width: auto !important;
	display: inline-flex !important;
}

.panel-header-flex .ui-button.ui-state-disabled {
	display: inline-flex !important;
	opacity: 0.6;
}

.layout-breadcrumb {
	width: 100%;
	position: fixed;
	top: 75px;
	z-index: 99;
}


/* =========================================================
   LOGIN & NOTIFICATION STYLES
   ========================================================= */
.stmButton {
	background: #1E88E5;
	color: #ffffff;
	border: 1px solid #1E88E5;
	margin: 0;
	outline: 0 none;
	border-radius: 8px;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s,
		box-shadow 0.15s;
	width: 150px;
	height: 45px;
	cursor: pointer;
	font-size: large;
}

.loading-icon {
	font-size: 20px;
	color: var(--primary-color);
}

.pi-spinner:before {
	font-size: 20px;
}

.layout-footer {
	height: 85px;
}

.p-password-toggle-right .p-password-toggle-mask {
	right: 0.75rem !important;
	left: auto !important;
}

/* Modern Notification Card Styles */
.clean-dataview.ui-dataview {
	border: none !important;
}

.clean-dataview .ui-dataview-content {
	border: none !important;
	background: transparent !important;
	padding: 0 !important;
}

.clean-dataview .ui-dataview-header {
	display: none !important;
}

.notification-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 16px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	transition: transform 0.2s, box-shadow 0.2s;
	cursor: pointer;
}

.notification-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-top-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.notification-date {
	color: #718096;
	font-size: 0.875rem;
	font-weight: 600;
}

.notification-tag {
	padding: 2px 12px;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 700;
	color: white;
	text-align: center;
	display: inline-block;
	border: 1px solid transparent;
}

.badge-important {
	background-color: #fee2e2;
	color: #ef4444;
	border-color: #f87171;
}

.badge-new {
	background-color: #e0f2fe;
	color: #0284c7;
	border-color: #38bdf8;
}

.badge-info {
	background-color: #ffedd5;
	color: #f97316;
	border-color: #fb923c;
}

.badge-default {
	background-color: #f3f4f6;
	color: #4b5563;
	border-color: #9ca3af;
}

.notification-title {
	font-weight: 600;
	font-size: 1.125rem;
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.notification-summary {
	color: #4a5568;
	font-size: 0.9375rem;
	line-height: 1.5;
	max-width: 30ch;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.notification-detail-dialog {
	border-radius: 16px !important;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
	border: 1px solid #e2e8f0 !important;
	padding: 0 !important;
}

.notification-detail-dialog .ui-overlaypanel-content {
	padding: 32px !important;
}

.notifications-scroll {
	max-height: 550px;
	overflow-y: auto;
	padding-right: 8px;
	padding-top: 4px;
}

.detail-header-top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.detail-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a202c;
	margin: 0;
}

.detail-info-row {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-left: 50px;
	margin-bottom: 18px;
}

.detail-date-label {
	color: #4a5568;
	font-weight: 600;
}

.detail-body {
	line-height: 1.7;
	color: #2d3748;
	white-space: pre-line;
	font-size: 1rem;
}