/* Authentication Styles */

/* Login Portal */
.login-portal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
}

.login-container {
	width: 100%;
	max-width: 420px;
	padding: 20px;
}

.login-card {
	background: white;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.3);
	overflow: hidden;
}

.login-header {
	background: linear-gradient(135deg, #253A89 0%, #1e2a5e 100%);
	color: white;
	padding: 40px 30px;
	text-align: center;
}

.login-logo {
	width: 80px;
	height: 80px;
	margin-bottom: 15px;
	border-radius: 50%;
	background: white;
	padding: 10px;
}

.login-header h1 {
	margin: 0 0 5px 0;
	font-size: 28px;
	font-weight: 700;
}

.login-header p {
	margin: 0;
	opacity: 0.9;
	font-size: 14px;
}

.login-form {
	padding: 30px;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
	font-size: 14px;
}

.form-group input {
	width: 100%;
	padding: 12px 15px;
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	font-size: 14px;
	transition: border-color 0.3s;
	box-sizing: border-box;
}

.form-group input:focus {
	outline: none;
	border-color: #253A89;
}

.error-message {
	background: #fee;
	color: #c33;
	padding: 12px;
	border-radius: 6px;
	margin-bottom: 15px;
	font-size: 14px;
	border-left: 4px solid #c33;
}

.btn-block {
	width: 100%;
	padding: 14px;
	font-size: 16px;
	font-weight: 600;
}

.login-footer {
	padding: 20px 30px;
	background: #f8f9fa;
	text-align: center;
	border-top: 1px solid #e0e0e0;
}

.login-footer p {
	margin: 0;
	color: #666;
	font-size: 13px;
}

/* Header User Info */
.header-actions {
	display: flex;
	align-items: center;
	gap: 15px;
}

.user-info {
	display: flex;
	align-items: center;
	gap: 10px;
	color: white;
}

.user-info #userEmail {
	font-size: 14px;
}

.role-badge {
	background: rgba(255,255,255,0.2);
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.btn-sm {
	padding: 6px 16px;
	font-size: 13px;
}

.user-info-bar {
	background: linear-gradient(135deg, #253A89 0%, #1e2a5e 100%);
	color: white;
	padding: 10px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-info-content {
	display: flex;
	align-items: center;
	gap: 15px;
}

.user-role {
	background: rgba(255,255,255,0.2);
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
}

.btn.small {
	padding: 6px 12px;
	font-size: 12px;
}

/* Modal Styles for Auth */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #000000;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
}

/* Hide main app content when modal is open */
body.modal-open #mainAppContent {
	display: none !important;
}

.modal-card {
	background: white;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.3);
	max-width: 400px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
}

.modal-header {
	padding: 20px 20px 0 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #eee;
	padding-bottom: 15px;
	margin-bottom: 20px;
}

.modal-header h3 {
	margin: 0;
	color: #333;
	font-size: 20px;
}

.close-btn {
	background: none;
	border: none;
	font-size: 24px;
	color: #999;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.close-btn:hover {
	color: #333;
}

.modal-body {
	padding: 0 20px 20px 20px;
}

.field {
	margin-bottom: 15px;
}

.field label {
	display: block;
	margin-bottom: 5px;
	color: #333;
	font-weight: 500;
}

.field input,
.field select {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

.field input:focus,
.field select:focus {
	outline: none;
	border-color: #007bff;
	box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.field button {
	width: 100%;
	padding: 12px;
	background: #007bff;
	color: white;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s;
}

.field button:hover {
	background: #0056b3;
}

.field button:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* Branded Login Portal */
.login-portal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.login-portal-content {
	text-align: center;
	color: white;
	max-width: 500px;
	padding: 40px;
}

.login-brand {
	margin-bottom: 40px;
}

.brand-title {
	font-size: 3.5rem;
	font-weight: 700;
	margin: 0 0 10px 0;
	color: white;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.brand-subtitle {
	font-size: 1.5rem;
	font-weight: 300;
	margin: 0 0 15px 0;
	color: #e3f2fd;
}

.brand-description {
	font-size: 1.1rem;
	font-weight: 400;
	margin: 0;
	color: #bbdefb;
	opacity: 0.9;
}

.login-actions {
	margin-top: 40px;
}

.btn.large {
	padding: 15px 30px;
	font-size: 1.2rem;
	font-weight: 600;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.2);
	transition: all 0.3s ease;
}

.btn.large:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.login-help {
	margin-top: 20px;
	font-size: 0.9rem;
	color: #90caf9;
	opacity: 0.8;
}

/* Hide main app content when not logged in */
body.not-logged-in #mainAppContent {
	display: none !important;
}

body.not-logged-in #loginPortal {
	display: flex !important;
}

/* Show main app content when logged in */
body.logged-in #mainAppContent {
	display: block !important;
}

body.logged-in #loginPortal {
	display: none !important;
}
