body {
	margin: 0px;
	padding: 0px;
}

input[type=text], input[type=password], textarea {
	font-size: 1em;
}

.errcls{
	margin-left: 20px;
	margin-right: 20px;
	padding: 5px;
	background-color: salmon;
}

/* admin_layout contains general administrative layout on forms*/
.admin_layout {
	display: grid;
	margin: auto;
	margin-top: 10px;
}

.frm1col {
	column-gap: 5px;
	row-gap: 5px;
}

.frm2col {
	grid-template-columns: 25% 1fr;
	grid-template-rows: 25px 25px 1fr;
	column-gap: 5px;
	row-gap: 5px;
}

.admin_layout input[type=text], .admin_layout input[type=password] {
	max-width: 300px;
}

.admin_layout label {
	align-self: center;
	justify-self: end;
	margin-right: 15px;
}

.admin_layout textarea {
	align-self: top;
	max-width: 300px;
	min-height: 150px;
}

.admin_layout label.lbl_txtArea {
	align-self: start;
	margin-top: 8px;
}

/* Begin: Modal dialog control */

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    padding: 40px 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Critical for natural height */
    overflow-y: auto;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: min-content; /* New! */
}

.modal-header,
.modal-footer {
    flex: 0 0 auto; /* Prevent shrinking/growing */
    padding: 10px 20px 0px 20px;
}

.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: calc(100vh - 170px); /* Adjust based on header/footer */
    padding-left: 20px;
    padding-right: 20px;
}


.model-error-line {
	display: none;
	color: white;
	background-color: #df4b3b;
	margin: 10px 10px 0px 15px;
	font-weight: 600;
}

/*Animation*/

.modal-overlay {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    transform: scale(0.5);
    transition: transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* End: Modal dialog control */

.toast {
	position: fixed;
	bottom: 20px;
	right: 20px;
	padding: 12px 24px;
	border-radius: 4px;
	color: white;
	box-shadow: 0 2px 10px rgba(0,0,0,0.2);
	z-index: 1000;
	transition: opacity 0.3s;
}

.toast-success { background: #4CAF50; }
.toast-error { background: #F44336; }
.toast-warning { background: #FF9800; }

.fade-out {
	opacity: 0;
}
