/* Research Profile Manager - Frontend Styles */
/* ================================================== */

:root {
	--rpm-primary: #667eea;
	--rpm-primary-dark: #5568d3;
	--rpm-secondary: #764ba2;
	--rpm-accent: #f39c12;
	--rpm-success: #27ae60;
	--rpm-error: #e74c3c;
	--rpm-warning: #f39c12;
	--rpm-info: #667eea;
	--rpm-light: #f8f9fa;
	--rpm-dark: #333;
	--rpm-text: #4a5568;
	--rpm-border: #e2e8f0;
	--rpm-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
	--rpm-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Container */
.rpm-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 15px;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	background: transparent !important;
}

.rpm-register-container {
	max-width: 600px;
}

.rpm-login-container {
	max-width: 500px;
}

.rpm-form-wrapper {
	background: white;
	padding: 50px 45px;
	border-radius: 16px;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
	width: 100%;
}

.rpm-form-wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: linear-gradient(90deg, var(--rpm-primary) 0%, var(--rpm-secondary) 100%);
}

.rpm-form-wrapper:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.rpm-form-wrapper-narrow {
	max-width: 500px;
}

.rpm-form-wrapper h2 {
	color: var(--rpm-dark);
	margin: 0 0 15px 0;
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -1px;
	background: linear-gradient(135deg, var(--rpm-primary) 0%, var(--rpm-secondary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.rpm-form-subtitle {
	color: #777;
	font-size: 16px;
	margin-bottom: 40px;
	line-height: 1.6;
	font-weight: 400;
	letter-spacing: 0.3px;
}

/* Forms */
.rpm-form {
	margin: 20px 0;
}

.rpm-form-group {
	margin-bottom: 28px;
	animation: slideInDown 0.5s ease backwards;
}

.rpm-form-group:nth-child(2) { animation-delay: 0.1s; }
.rpm-form-group:nth-child(3) { animation-delay: 0.2s; }
.rpm-form-group:nth-child(4) { animation-delay: 0.3s; }
.rpm-form-group:nth-child(5) { animation-delay: 0.4s; }
.rpm-form-group:nth-child(6) { animation-delay: 0.5s; }
.rpm-form-group:nth-child(7) { animation-delay: 0.6s; }
.rpm-form-group:nth-child(8) { animation-delay: 0.7s; }

.rpm-form-group label {
	display: block;
	margin-bottom: 10px;
	font-weight: 700;
	color: var(--rpm-dark);
	font-size: 16px;
	letter-spacing: 0.3px;
}

.rpm-form-control {
	width: 100%;
	padding: 14px 16px;
	border: 2px solid var(--rpm-border);
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	line-height: 1.5;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-sizing: border-box;
	background: #fafbfc;
}

.rpm-form-control::placeholder {
	color: #ccc;
}

.rpm-form-control:focus {
	outline: none;
	border-color: var(--rpm-primary);
	box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.1), 0 0 0 2px var(--rpm-primary);
	background: white;
}

.rpm-form-control:disabled,
.rpm-form-control[readonly] {
	background: #f0f2f5;
	color: #999;
	cursor: not-allowed;
	border-color: var(--rpm-border);
}

.rpm-form-control:invalid {
	border-color: var(--rpm-error);
}

textarea.rpm-form-control {
	resize: vertical;
	min-height: 120px;
	line-height: 1.6;
}

.rpm-help-text {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	color: #888;
	font-style: italic;
}

/* Alerts */
.rpm-alert {
	padding: 20px 22px;
	margin-bottom: 28px;
	border-radius: 10px;
	border-left: 5px solid;
	display: none;
	animation: slideInDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	font-weight: 500;
}

@keyframes slideInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.rpm-alert strong {
	display: block;
	font-size: 16px;
	margin-bottom: 8px;
	font-weight: 700;
}

.rpm-alert-error {
	background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
	border-color: var(--rpm-error);
	color: #c53030;
}

.rpm-alert-error strong {
	color: #a71d2a;
}

.rpm-alert-success {
	background: linear-gradient(135deg, #f0fdf4 0%, #e1fce0 100%);
	border-color: var(--rpm-success);
	color: #166534;
}

.rpm-alert-success strong {
	color: #15803d;
}

.rpm-alert-info {
	background: linear-gradient(135deg, #f0f9ff 0%, #e1f5ff 100%);
	border-color: var(--rpm-info);
	color: #0c4a6e;
}

/* Buttons */
.rpm-btn {
	display: inline-block;
	padding: 14px 32px;
	border: none;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	text-decoration: none;
	text-align: center;
	letter-spacing: 0.3px;
	position: relative;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.rpm-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.1);
	transition: left 0.3s ease;
}

.rpm-btn:hover::before {
	left: 100%;
}

.rpm-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none !important;
}

.rpm-btn-primary {
	background: linear-gradient(135deg, var(--rpm-primary) 0%, var(--rpm-secondary) 100%);
	color: white;
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.rpm-btn-primary:hover:not(:disabled) {
	box-shadow: 0 10px 30px rgba(102, 126, 234, 0.45);
	transform: translateY(-3px);
}

.rpm-btn-primary:active:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.rpm-btn-secondary {
	background: linear-gradient(135deg, var(--rpm-accent) 0%, #e67e22 100%);
	color: white;
	box-shadow: 0 6px 20px rgba(243, 156, 18, 0.35);
}

.rpm-btn-secondary:hover:not(:disabled) {
	box-shadow: 0 10px 30px rgba(243, 156, 18, 0.45);
	transform: translateY(-3px);
}

.rpm-btn-block {
	width: 100%;
	display: block;
	margin-top: 5px;
}

.rpm-btn-outline {
	background: white;
	border: 2px solid var(--rpm-primary);
	color: var(--rpm-primary);
	box-shadow: none;
}

.rpm-btn-outline:hover:not(:disabled) {
	background: var(--rpm-primary);
	color: white;
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

/* Form Links */
.rpm-form-links {
	margin-top: 30px;
	padding-top: 25px;
	border-top: 2px solid var(--rpm-border);
	text-align: center;
}

.rpm-form-links p {
	margin: 12px 0;
	font-size: 15px;
	color: #666;
	font-weight: 500;
}

.rpm-form-links a {
	color: var(--rpm-primary);
	text-decoration: none;
	font-weight: 700;
	transition: all 0.3s ease;
	position: relative;
}

.rpm-form-links a::after {
	content: '';
	position: absolute;
	bottom: -3px;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--rpm-primary);
	transition: width 0.3s ease;
}

.rpm-form-links a:hover {
	color: var(--rpm-primary-dark);
}

.rpm-form-links a:hover::after {
	width: 100%;
}

.rpm-form-footer {
	margin-top: 30px;
	text-align: center;
	color: #666;
	font-size: 15px;
	padding-top: 25px;
	border-top: 2px solid var(--rpm-border);
	font-weight: 500;
}

.rpm-form-footer a {
	color: var(--rpm-primary);
	text-decoration: none;
	font-weight: 700;
	transition: all 0.3s ease;
	position: relative;
}

.rpm-form-footer a::after {
	content: '';
	position: absolute;
	bottom: -3px;
	left: 0;
	width: 0;
	height: 2px;
	background: var(--rpm-primary);
	transition: width 0.3s ease;
}

.rpm-form-footer a:hover {
	color: var(--rpm-primary-dark);
}

.rpm-form-footer a:hover::after {
	width: 100%;
}

/* Profile Container */
.rpm-profile-container {
	max-width: 1000px;
	margin: 0 auto;
	padding: 40px 15px;
	min-height: 100vh;
	background: transparent !important;
}

.rpm-profile-wrapper {
	background: white;
	padding: 50px 45px;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
}

.rpm-profile-wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: linear-gradient(90deg, var(--rpm-primary) 0%, var(--rpm-secondary) 100%);
}

.rpm-profile-wrapper h2 {
	color: var(--rpm-dark);
	margin: 0 0 35px 0;
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -1px;
	background: linear-gradient(135deg, var(--rpm-primary) 0%, var(--rpm-secondary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	padding-bottom: 20px;
	border-bottom: 2px solid var(--rpm-border);
}

/* Profile Tabs */
.rpm-profile-tabs {
	margin-top: 35px;
}

.rpm-profile-tab-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 5px;
	border-bottom: 2px solid var(--rpm-border);
	margin-bottom: 35px;
	flex-wrap: wrap;
}

.rpm-profile-tab-list li {
	margin: 0;
	padding: 0;
}

.rpm-profile-tab-link {
	display: block;
	padding: 14px 24px;
	text-decoration: none;
	color: #666;
	border-bottom: 3px solid transparent;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	font-weight: 600;
	font-size: 15px;
	position: relative;
	margin-bottom: -2px;
}

.rpm-profile-tab-link::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--rpm-primary) 0%, var(--rpm-secondary) 100%);
	transition: width 0.3s ease;
}

.rpm-profile-tab-link:hover {
	color: var(--rpm-primary);
}

.rpm-profile-tab-link.active,
.rpm-profile-tab-link:hover {
	border-bottom-color: transparent;
}

.rpm-profile-tab-link.active::after,
.rpm-profile-tab-link:hover::after {
	width: 100%;
}

.rpm-profile-tab-content {
	display: none;
	animation: fadeIn 0.4s ease;
}

.rpm-profile-tab-content.active {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.rpm-profile-picture-preview,
.rpm-profile-picture-placeholder {
	text-align: center;
	margin-bottom: 30px;
	padding: 40px 30px;
	background: transparent;
	border-radius: 12px;
	border: 2px dashed #ddd;
	transition: all 0.3s ease;
}

.rpm-profile-picture-preview:hover {
	background: #f9f9f9;
	border-color: var(--rpm-primary);
}

.rpm-profile-picture-preview img {
	max-width: 180px;
	border-radius: 50%;
	border: 5px solid var(--rpm-primary);
	box-shadow: 0 15px 35px rgba(102, 126, 234, 0.25);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rpm-profile-picture-preview img:hover {
	transform: scale(1.08);
	box-shadow: 0 20px 45px rgba(102, 126, 234, 0.35);
}

.rpm-profile-picture-placeholder {
	color: #999;
	min-height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
}

/* Account Container */
.rpm-account-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 15px;
	min-height: 100vh;
	background: transparent !important;
}

.rpm-account-wrapper {
	background: white;
	padding: 50px 45px;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.rpm-account-wrapper h2 {
	color: var(--rpm-dark);
	margin: 0 0 40px 0;
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -1px;
	background: linear-gradient(135deg, var(--rpm-primary) 0%, var(--rpm-secondary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	padding-bottom: 25px;
	border-bottom: 2px solid var(--rpm-border);
}

/* Forgot Password Container */
.rpm-forgot-password-container {
	max-width: 500px;
	margin: 0 auto;
	padding: 0 15px;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
}

/* Loading Animation */
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.rpm-loading {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: white;
	animation: spin 0.8s linear infinite;
	margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
	.rpm-container {
		margin: 0;
		min-height: auto;
		align-items: auto;
		padding: 20px 0;
	}

	.rpm-form-wrapper {
		padding: 35px 25px;
		border-radius: 12px;
		margin: 20px 0;
	}

	.rpm-form-wrapper h2 {
		font-size: 26px;
	}

	.rpm-form-subtitle {
		font-size: 15px;
		margin-bottom: 30px;
	}

	.rpm-form-group {
		margin-bottom: 22px;
	}

	.rpm-form-control {
		padding: 13px 14px;
		font-size: 16px;
	}

	.rpm-form-group label {
		font-size: 15px;
	}

	.rpm-help-text {
		font-size: 12px;
		margin-top: 6px;
	}

	.rpm-btn {
		padding: 12px 24px;
		font-size: 15px;
		width: 100%;
	}

	.rpm-alert {
		padding: 16px 18px;
		margin-bottom: 20px;
		border-radius: 8px;
	}

	.rpm-alert strong {
		font-size: 15px;
	}

	.rpm-form-links,
	.rpm-form-footer {
		margin-top: 25px;
		padding-top: 20px;
	}

	.rpm-form-links p,
	.rpm-form-footer {
		font-size: 14px;
	}

	/* Profile Page Mobile */
	.rpm-profile-container {
		padding: 30px 15px;
	}

	.rpm-profile-wrapper {
		padding: 30px 20px;
	}

	.rpm-profile-wrapper h2 {
		font-size: 26px;
		margin-bottom: 25px;
	}

	.rpm-profile-tab-list {
		gap: 0;
		margin-bottom: 25px;
	}

	.rpm-profile-tab-link {
		padding: 12px 16px;
		font-size: 13px;
		flex: 1;
		text-align: center;
	}

	.rpm-profile-picture-preview,
	.rpm-profile-picture-placeholder {
		padding: 30px 20px;
		margin-bottom: 25px;
	}

	/* Account Page Mobile */
	.rpm-account-container {
		padding: 30px 15px;
	}

	.rpm-account-wrapper {
		padding: 30px 20px;
	}

	.rpm-account-wrapper h2 {
		font-size: 26px;
		margin-bottom: 30px;
	}

	.rpm-account-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.rpm-account-card {
		border-radius: 12px;
	}

	.rpm-account-card-header {
		padding: 18px 15px;
	}

	.rpm-account-card-header h3 {
		font-size: 17px;
	}

	.rpm-account-card-body {
		padding: 20px 15px;
	}

	.rpm-account-info p {
		font-size: 14px;
		margin: 12px 0;
	}

	.rpm-btn-block {
		width: 100%;
		margin-bottom: 10px;
	}
}
