/* ============================================
   ATS - Formulário de Candidatura (Modern)
   ============================================ */

:root {
	--ats-primary: #4f46e5;
	--ats-primary-light: #818cf8;
	--ats-primary-dark: #3730a3;
	--ats-primary-bg: #eef2ff;
	--ats-success: #059669;
	--ats-success-light: #d1fae5;
	--ats-gray-50: #f9fafb;
	--ats-gray-100: #f3f4f6;
	--ats-gray-200: #e5e7eb;
	--ats-gray-300: #d1d5db;
	--ats-gray-400: #9ca3af;
	--ats-gray-500: #6b7280;
	--ats-gray-600: #4b5563;
	--ats-gray-700: #374151;
	--ats-gray-800: #1f2937;
	--ats-gray-900: #111827;
	--ats-radius: 12px;
	--ats-radius-sm: 8px;
	--ats-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
	--ats-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
	--ats-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
	--ats-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
.ats-body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background-color: var(--ats-gray-50);
	color: var(--ats-gray-800);
	line-height: 1.6;
	padding: 0;
	margin: 0;
	-webkit-font-smoothing: antialiased;
}

.ats-body *,
.ats-body *::before,
.ats-body *::after {
	box-sizing: border-box;
}

/* ---- Header ---- */
.ats-header {
	background: var(--ats-gray-900);
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	height: 56px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ats-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	height: 100%;
	display: flex;
	align-items: center;
}

.ats-header-inner img {
	height: 28px;
}

/* ---- Hero ---- */
.ats-hero {
	background: linear-gradient(135deg, var(--ats-primary) 0%, var(--ats-primary-dark) 100%);
	padding: 48px 24px 40px;
	margin-top: 56px;
	text-align: center;
	color: #fff;
	position: relative;
	overflow: hidden;
}

.ats-hero::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -20%;
	width: 500px;
	height: 500px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 50%;
}

.ats-hero::after {
	content: '';
	position: absolute;
	bottom: -30%;
	left: -10%;
	width: 300px;
	height: 300px;
	background: rgba(255, 255, 255, 0.04);
	border-radius: 50%;
}

.ats-hero-content {
	position: relative;
	z-index: 1;
	max-width: 700px;
	margin: 0 auto;
}

.ats-hero-badge {
	display: inline-block;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(10px);
	padding: 6px 16px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.3px;
	margin-bottom: 16px;
}

.ats-hero-badge i {
	margin-right: 6px;
}

.ats-hero h1 {
	font-size: 28px;
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
}

/* ---- Container ---- */
.ats-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 24px 60px;
}

/* ---- Layout Grid ---- */
.ats-layout {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 32px;
	align-items: start;
}

/* ---- Progress Bar ---- */
.ats-progress-bar {
	margin-bottom: 32px;
	padding: 20px 24px;
	background: #fff;
	border-radius: var(--ats-radius);
	box-shadow: var(--ats-shadow);
	border: 1px solid var(--ats-gray-200);
}

.ats-progress-info {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.ats-progress-step-indicator {
	display: flex;
	align-items: baseline;
	gap: 2px;
	background: var(--ats-primary-bg);
	padding: 4px 12px;
	border-radius: 20px;
	flex-shrink: 0;
}

.ats-progress-current {
	font-size: 18px;
	font-weight: 700;
	color: var(--ats-primary);
	line-height: 1;
}

.ats-progress-separator {
	font-size: 14px;
	color: var(--ats-gray-400);
	margin: 0 1px;
}

.ats-progress-total {
	font-size: 14px;
	font-weight: 500;
	color: var(--ats-gray-400);
	line-height: 1;
}

.ats-progress-label {
	font-size: 15px;
	font-weight: 600;
	color: var(--ats-gray-800);
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ats-progress-percent {
	font-size: 13px;
	font-weight: 600;
	color: var(--ats-primary);
	flex-shrink: 0;
	min-width: 36px;
	text-align: right;
}

.ats-progress-track {
	height: 6px;
	background: var(--ats-gray-100);
	border-radius: 3px;
	overflow: hidden;
}

.ats-progress-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--ats-primary-light), var(--ats-primary));
	border-radius: 3px;
	transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.ats-progress-fill::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	animation: ats-shimmer 2s infinite;
}

@keyframes ats-shimmer {
	0% {
		transform: translateX(-100%);
	}

	100% {
		transform: translateX(100%);
	}
}

/* ---- Cards ---- */
.ats-card {
	background: #fff;
	border-radius: var(--ats-radius) !important;
	box-shadow: var(--ats-shadow-md) !important;
	border: 1px solid var(--ats-gray-200) !important;
	margin-bottom: 16px !important;
	overflow: hidden;
	transition: var(--ats-transition);
}

.ats-card:hover {
	box-shadow: var(--ats-shadow-lg) !important;
}

.ats-card-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 24px;
	border-bottom: 1px solid var(--ats-gray-100);
	background: var(--ats-gray-50);
}

.ats-card-header-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--ats-primary-bg);
	color: var(--ats-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	font-weight: 700;
	flex-shrink: 0;
}

.ats-card-title {
	font-size: 17px;
	font-weight: 600;
	color: var(--ats-gray-800);
	margin: 0;
	line-height: 1.3;
}

.ats-card-subtitle {
	font-size: 13px;
	color: var(--ats-gray-500);
	margin: 2px 0 0;
}

.ats-card-body {
	padding: 24px;
}

.ats-card-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 20px;
	margin-top: 8px;
	border-top: 1px solid var(--ats-gray-100);
}

/* ---- Form Grid ---- */
.ats-form-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 16px;
}

.ats-form-col-4 {
	grid-column: span 4;
}

.ats-form-col-6 {
	grid-column: span 6;
}

.ats-form-col-12 {
	grid-column: span 12;
}

/* ---- Form Elements ---- */
.ats-form-group {
	margin-bottom: 4px;
}

.ats-form-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--ats-gray-700);
	margin-bottom: 6px;
}

.ats-form-group label i {
	color: var(--ats-gray-400);
	margin-right: 4px;
	width: 16px;
	text-align: center;
}

.ats-optional {
	font-weight: 400;
	color: var(--ats-gray-400);
	font-size: 12px;
}

.ats-input {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid var(--ats-gray-300);
	border-radius: var(--ats-radius-sm);
	font-size: 14px;
	font-family: inherit;
	color: var(--ats-gray-800);
	background: #fff;
	transition: var(--ats-transition);
	outline: none;
	line-height: normal !important;
}

.ats-input:hover {
	border-color: var(--ats-gray-400);
}

.ats-input:focus {
	border-color: var(--ats-primary);
	box-shadow: 0 0 0 3px var(--ats-primary-bg);
}

.ats-input::placeholder {
	color: var(--ats-gray-400);
}

select.ats-input {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
	cursor: pointer;
}

.ats-textarea {
	resize: vertical;
	min-height: 200px;
	line-height: 1.6;
}

/* ---- File Upload ---- */
.ats-file-upload {
	position: relative;
	border: 2px dashed var(--ats-gray-300);
	border-radius: var(--ats-radius-sm);
	padding: 28px 20px;
	text-align: center;
	cursor: pointer;
	transition: var(--ats-transition);
	background: var(--ats-gray-50);
}

.ats-file-upload:hover {
	border-color: var(--ats-primary-light);
	background: var(--ats-primary-bg);
}

.ats-file-upload.dragover {
	border-color: var(--ats-primary);
	background: var(--ats-primary-bg);
}

.ats-file-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.ats-file-upload-content i {
	font-size: 32px;
	color: var(--ats-primary-light);
	margin-bottom: 8px;
	display: block;
}

.ats-file-upload-content p {
	margin: 0 0 4px;
	font-size: 14px;
	color: var(--ats-gray-600);
}

.ats-file-upload-content span {
	font-size: 12px;
	color: var(--ats-gray-400);
}

.ats-file-upload-content strong {
	color: var(--ats-primary);
}

/* ---- Question Block ---- */
.ats-question-block {
	margin-bottom: 20px;
}

.ats-question-block pre {
	background: var(--ats-gray-50);
	border: 1px solid var(--ats-gray-200);
	padding: 20px;
	border-radius: var(--ats-radius-sm);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.7;
	color: var(--ats-gray-700);
	white-space: pre-wrap;
	word-break: break-word;
	margin: 0;
	border-left: 4px solid var(--ats-primary);
}

/* ---- Buttons ---- */
.ats-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 24px;
	border-radius: var(--ats-radius-sm);
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	border: none;
	transition: var(--ats-transition);
	text-decoration: none;
	line-height: 1.5;
}

.ats-btn:focus {
	outline: none;
}

.ats-btn i {
	font-size: 13px;
}

.ats-btn-primary {
	background: var(--ats-primary);
	color: #fff;
	box-shadow: 0 1px 2px rgba(79, 70, 229, 0.3);
}

.ats-btn-primary:hover {
	background: var(--ats-primary-dark);
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
	transform: translateY(-1px);
}

.ats-btn-success {
	background: var(--ats-success);
	color: #fff;
	box-shadow: 0 1px 2px rgba(5, 150, 105, 0.3);
}

.ats-btn-success:hover {
	background: #047857;
	box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
	transform: translateY(-1px);
}

.ats-btn-outline {
	background: #fff;
	color: var(--ats-gray-600);
	border: 1.5px solid var(--ats-gray-300);
}

.ats-btn-outline:hover {
	border-color: var(--ats-gray-400);
	color: var(--ats-gray-800);
	background: var(--ats-gray-50);
}

.ats-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none !important;
}

/* ---- Sidebar ---- */
.ats-sidebar {
	position: sticky;
	top: 88px;
}

.ats-sidebar-card {
	background: #fff;
	border-radius: var(--ats-radius);
	box-shadow: var(--ats-shadow);
	border: 1px solid var(--ats-gray-200);
	margin-bottom: 16px;
	overflow: hidden;
}

.ats-sidebar-card-header {
	padding: 14px 20px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ats-gray-700);
	background: var(--ats-gray-50);
	border-bottom: 1px solid var(--ats-gray-100);
}

.ats-sidebar-card-header i {
	color: var(--ats-primary);
	margin-right: 8px;
}

.ats-sidebar-card-body {
	padding: 16px 20px;
	font-size: 14px;
	line-height: 1.7;
	color: var(--ats-gray-600);
}

.ats-sidebar-card-body ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ats-sidebar-card-body ul li {
	padding: 6px 0;
	padding-left: 20px;
	position: relative;
}

.ats-sidebar-card-body ul li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: var(--ats-success);
	font-weight: 700;
	font-size: 13px;
}

.ats-sidebar-tips .ats-sidebar-card-header {
	background: #fffbeb;
	border-bottom-color: #fde68a;
}

.ats-sidebar-tips .ats-sidebar-card-header i {
	color: #d97706;
}

.ats-sidebar-tips {
	border-color: #fde68a;
}

/* ---- Empty State ---- */
.ats-empty-state {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - 56px);
	padding: 40px;
	margin-top: 56px;
}

.ats-empty-state-card {
	background: #fff;
	border-radius: var(--ats-radius);
	box-shadow: var(--ats-shadow-lg);
	padding: 48px;
	text-align: center;
	max-width: 480px;
}

.ats-empty-icon {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #fef2f2;
	color: #ef4444;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	margin: 0 auto 20px;
}

.ats-empty-state-card h2 {
	font-size: 22px;
	font-weight: 700;
	color: var(--ats-gray-800);
	margin: 0 0 8px;
}

.ats-empty-state-card p {
	color: var(--ats-gray-500);
	margin: 0;
	font-size: 15px;
}

/* ---- Footer ---- */
.ats-footer {
	text-align: center;
	padding: 24px;
	border-top: 1px solid var(--ats-gray-200);
	background: #fff;
}

.ats-footer p {
	margin: 0;
	font-size: 13px;
	color: var(--ats-gray-400);
}

/* ---- Success State ---- */
.ats-success-state {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
	padding: 40px;
}

.ats-success-card {
	background: #fff;
	border-radius: var(--ats-radius);
	box-shadow: var(--ats-shadow-lg);
	border: 1px solid var(--ats-success-light);
	padding: 48px;
	text-align: center;
	max-width: 540px;
}

.ats-success-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--ats-success-light);
	color: var(--ats-success);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	margin: 0 auto 20px;
	animation: ats-bounce 0.6s ease;
}

/* ---- Validation Errors ---- */
.ats-error {
	display: block;
	color: #dc2626;
	font-size: 12px;
	margin-top: 4px;
	padding-left: 2px;
}

.ats-input.has-error {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ---- Animations ---- */
@keyframes ats-bounce {
	0% {
		transform: scale(0);
	}

	50% {
		transform: scale(1.15);
	}

	100% {
		transform: scale(1);
	}
}

@keyframes ats-fadeInUp {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ats-card {
	animation: ats-fadeInUp 0.4s ease;
}

/* ---- Bootstrap Overrides ---- */
.ats-body .panel-group {
	margin-bottom: 0;
}

.ats-body .panel-group .panel+.panel {
	margin-top: 0;
}

.ats-body .panel {
	border: none;
	box-shadow: none;
}

.ats-body .collapse.in {
	animation: ats-fadeInUp 0.3s ease;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
	.ats-layout {
		grid-template-columns: 1fr;
	}

	.ats-sidebar {
		position: static;
		order: -1;
	}

	.ats-hero h1 {
		font-size: 22px;
	}
}

@media (max-width: 768px) {
	.ats-form-grid {
		grid-template-columns: 1fr;
	}

	.ats-form-col-4,
	.ats-form-col-6,
	.ats-form-col-12 {
		grid-column: span 1;
	}

	.ats-progress-bar {
		padding: 16px;
	}

	.ats-progress-label {
		font-size: 14px;
	}

	.ats-container {
		padding: 20px 16px 40px;
	}

	.ats-card-body {
		padding: 20px 16px;
	}

	.ats-card-header {
		padding: 16px;
	}

	.ats-card-actions {
		flex-direction: column-reverse;
		gap: 10px;
	}

	.ats-card-actions .ats-btn {
		width: 100%;
		justify-content: center;
	}

	.ats-hero {
		padding: 32px 16px 28px;
	}
}

/* ---- Print ---- */
@media print {

	.ats-header,
	.ats-progress-bar,
	.ats-sidebar,
	.ats-footer,
	.ats-card-actions {
		display: none !important;
	}
}