/* ==========================================================================
   AwoPulse v1.0.0 — Kurumsal İnovasyon, Fikir Kutusu & Çalışan Anket Stüdyosu
   Adaptive Day/Night Theme + A4 Print Engine
   ========================================================================== */

.ap-root {
	--ap-bg: #f4f6fb;
	--ap-surface: #ffffff;
	--ap-surface-2: #f8fafc;
	--ap-border: #e2e8f0;
	--ap-text: #0f172a;
	--ap-text-muted: #64748b;
	--ap-primary: #4f46e5;
	--ap-primary-hover: #4338ca;
	--ap-primary-soft: #eef2ff;
	--ap-emerald: #059669;
	--ap-emerald-soft: #ecfdf5;
	--ap-amber: #d97706;
	--ap-amber-soft: #fffbeb;
	--ap-rose: #e11d48;
	--ap-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
	--ap-radius: 14px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--ap-text);
	background: var(--ap-bg);
	padding: 24px;
	border-radius: 16px;
	box-sizing: border-box;
	line-height: 1.5;
}

.ap-root *,
.ap-root *::before,
.ap-root *::after {
	box-sizing: border-box;
}

/* Dark Theme Explicit */
.ap-root[data-theme="dark"] {
	--ap-bg: #0b1120;
	--ap-surface: #111827;
	--ap-surface-2: #1e293b;
	--ap-border: #334155;
	--ap-text: #f8fafc;
	--ap-text-muted: #94a3b8;
	--ap-primary: #6366f1;
	--ap-primary-hover: #818cf8;
	--ap-primary-soft: rgba(99, 102, 241, 0.16);
	--ap-emerald: #10b981;
	--ap-emerald-soft: rgba(16, 185, 129, 0.15);
	--ap-amber: #f59e0b;
	--ap-amber-soft: rgba(245, 158, 11, 0.15);
	--ap-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.45);
}

/* Auto Dark Mode */
@media (prefers-color-scheme: dark) {
	.ap-root[data-theme="auto"] {
		--ap-bg: #0b1120;
		--ap-surface: #111827;
		--ap-surface-2: #1e293b;
		--ap-border: #334155;
		--ap-text: #f8fafc;
		--ap-text-muted: #94a3b8;
		--ap-primary: #6366f1;
		--ap-primary-hover: #818cf8;
		--ap-primary-soft: rgba(99, 102, 241, 0.16);
		--ap-emerald: #10b981;
		--ap-emerald-soft: rgba(16, 185, 129, 0.15);
		--ap-amber: #f59e0b;
		--ap-amber-soft: rgba(245, 158, 11, 0.15);
		--ap-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.45);
	}
}

/* Header */
.ap-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: var(--ap-surface);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius);
	padding: 18px 22px;
	box-shadow: var(--ap-shadow);
	margin-bottom: 20px;
}

.ap-brand {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ap-logo-icon {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	color: #fff;
	box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
}

.ap-title-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ap-title {
	margin: 0;
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--ap-text);
}

.ap-version {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 99px;
	background: var(--ap-surface-2);
	border: 1px solid var(--ap-border);
	color: var(--ap-text-muted);
}

.ap-plan-badge {
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 99px;
}

.ap-plan-badge.is-free {
	background: var(--ap-amber-soft);
	color: var(--ap-amber);
	border: 1px solid rgba(217, 119, 6, 0.3);
}

.ap-plan-badge.is-pro {
	background: var(--ap-emerald-soft);
	color: var(--ap-emerald);
	border: 1px solid rgba(5, 150, 105, 0.3);
}

.ap-subtitle {
	margin: 2px 0 0;
	font-size: 13px;
	color: var(--ap-text-muted);
}

.ap-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.ap-theme-group {
	display: inline-flex;
	background: var(--ap-surface-2);
	border: 1px solid var(--ap-border);
	border-radius: 10px;
	padding: 3px;
}

.ap-theme-btn {
	border: none;
	background: transparent;
	color: var(--ap-text-muted);
	padding: 5px 10px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 7px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.ap-theme-btn.active {
	background: var(--ap-surface);
	color: var(--ap-text);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.ap-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 9px 14px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.15s ease;
	text-decoration: none;
}

.ap-btn-primary {
	background: var(--ap-primary);
	color: #ffffff;
}

.ap-btn-primary:hover {
	background: var(--ap-primary-hover);
}

.ap-btn-secondary {
	background: var(--ap-surface-2);
	color: var(--ap-text);
	border-color: var(--ap-border);
}

.ap-btn-secondary:hover {
	border-color: var(--ap-primary);
}

.ap-btn-pro {
	background: linear-gradient(135deg, #f59e0b, #d97706);
	color: #ffffff;
	font-weight: 700;
	box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
}

.ap-btn-pro.is-unlocked {
	background: linear-gradient(135deg, #059669, #10b981);
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
}

.ap-btn-block {
	width: 100%;
	padding: 11px 16px;
}

.ap-btn-link {
	background: none;
	border: none;
	color: var(--ap-primary);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.ap-pro-pill {
	font-size: 10px;
	font-weight: 800;
	padding: 1px 6px;
	border-radius: 99px;
	background: rgba(245, 158, 11, 0.18);
	color: #d97706;
	border: 1px solid rgba(245, 158, 11, 0.35);
}

/* KPI Strip */
.ap-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 20px;
}

.ap-kpi-card {
	background: var(--ap-surface);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius);
	padding: 16px 18px;
	box-shadow: var(--ap-shadow);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ap-kpi-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--ap-text-muted);
}

.ap-kpi-value {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--ap-text);
}

.ap-kpi-sub {
	font-size: 12px;
	color: var(--ap-text-muted);
}

.ap-text-emerald {
	color: var(--ap-emerald);
}

.ap-text-indigo {
	color: var(--ap-primary);
}

.ap-text-amber {
	color: var(--ap-amber);
}

/* Toast */
.ap-toast {
	padding: 12px 16px;
	border-radius: 10px;
	background: var(--ap-primary-soft);
	border: 1px solid var(--ap-primary);
	color: var(--ap-text);
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 18px;
}

/* Main Grid */
.ap-main-grid {
	display: grid;
	grid-template-columns: 400px 1fr;
	gap: 20px;
	align-items: start;
}

.ap-sidebar {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.ap-content {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ap-card {
	background: var(--ap-surface);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius);
	padding: 20px;
	box-shadow: var(--ap-shadow);
}

.ap-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ap-border);
}

.ap-board-header {
	flex-wrap: wrap;
}

.ap-card-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--ap-text);
}

.ap-card-desc {
	margin: 3px 0 0;
	font-size: 12.5px;
	color: var(--ap-text-muted);
}

/* Forms */
.ap-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ap-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.ap-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ap-field label {
	font-size: 12px;
	font-weight: 600;
	color: var(--ap-text-muted);
}

.ap-field input,
.ap-field select,
.ap-field textarea {
	width: 100%;
	padding: 9px 11px;
	border-radius: 9px;
	border: 1px solid var(--ap-border);
	background: var(--ap-surface-2);
	color: var(--ap-text);
	font-size: 13px;
	font-family: inherit;
}

.ap-field input:focus,
.ap-field select:focus,
.ap-field textarea:focus {
	outline: none;
	border-color: var(--ap-primary);
}

.ap-anon-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 12px;
	border-radius: 10px;
	background: var(--ap-surface-2);
	border: 1px dashed var(--ap-border);
}

.ap-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	color: var(--ap-text);
}

/* Polls Grid */
.ap-polls-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 16px;
}

.ap-poll-card {
	border: 1px solid var(--ap-border);
	background: var(--ap-surface-2);
	border-radius: 12px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ap-poll-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.ap-poll-question {
	margin: 0;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--ap-text);
}

.ap-poll-meta {
	font-size: 11.5px;
	color: var(--ap-text-muted);
	display: flex;
	align-items: center;
	gap: 8px;
}

.ap-poll-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ap-poll-opt-btn {
	position: relative;
	overflow: hidden;
	width: 100%;
	text-align: left;
	background: var(--ap-surface);
	border: 1px solid var(--ap-border);
	border-radius: 9px;
	padding: 9px 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	font-weight: 600;
	color: var(--ap-text);
	transition: border-color 0.15s ease;
}

.ap-poll-opt-btn:hover {
	border-color: var(--ap-primary);
}

.ap-poll-opt-bar {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: var(--ap-primary-soft);
	z-index: 0;
	transition: width 0.3s ease;
}

.ap-poll-opt-label,
.ap-poll-opt-stat {
	position: relative;
	z-index: 1;
}

.ap-poll-opt-stat {
	font-size: 12px;
	color: var(--ap-primary);
	font-weight: 700;
}

/* Filters */
.ap-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ap-filter-input,
.ap-filter-select {
	padding: 7px 11px;
	border-radius: 9px;
	border: 1px solid var(--ap-border);
	background: var(--ap-surface-2);
	color: var(--ap-text);
	font-size: 12.5px;
}

/* Ideas List */
.ap-ideas-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ap-idea-card {
	display: grid;
	grid-template-columns: 74px 1fr;
	gap: 14px;
	padding: 16px;
	border-radius: 12px;
	border: 1px solid var(--ap-border);
	background: var(--ap-surface-2);
	transition: border-color 0.15s ease;
}

.ap-idea-card:hover {
	border-color: var(--ap-primary);
}

.ap-upvote-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	height: 72px;
	border-radius: 12px;
	border: 1px solid var(--ap-border);
	background: var(--ap-surface);
	color: var(--ap-text);
	cursor: pointer;
	transition: all 0.15s ease;
}

.ap-upvote-btn:hover,
.ap-upvote-btn.voted {
	border-color: var(--ap-primary);
	background: var(--ap-primary-soft);
	color: var(--ap-primary);
}

.ap-upvote-icon {
	font-size: 18px;
}

.ap-upvote-count {
	font-size: 15px;
	font-weight: 800;
}

.ap-upvote-label {
	font-size: 10px;
	font-weight: 600;
	color: var(--ap-text-muted);
}

.ap-idea-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ap-idea-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.ap-idea-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--ap-text);
}

.ap-idea-badges {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.ap-badge {
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 99px;
	background: var(--ap-primary-soft);
	color: var(--ap-primary);
}

.ap-status-badge {
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 99px;
}

.ap-status- badge-eval {
	background: var(--ap-amber-soft);
	color: var(--ap-amber);
}

.ap-status-Değerlendirmede {
	background: var(--ap-amber-soft);
	color: var(--ap-amber);
}

.ap-status-Onaylandı {
	background: var(--ap-primary-soft);
	color: var(--ap-primary);
}

.ap-status-Uygulandı,
.ap-status-Ödüllendirildi {
	background: var(--ap-emerald-soft);
	color: var(--ap-emerald);
}

.ap-idea-desc {
	margin: 0;
	font-size: 13px;
	color: var(--ap-text-muted);
}

.ap-idea-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	padding-top: 6px;
	border-top: 1px dashed var(--ap-border);
	font-size: 12px;
	color: var(--ap-text-muted);
}

.ap-idea-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ap-savings-pill {
	font-weight: 700;
	color: var(--ap-emerald);
}

.ap-idea-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ap-mini-btn {
	border: 1px solid var(--ap-border);
	background: var(--ap-surface);
	color: var(--ap-text-muted);
	padding: 4px 8px;
	border-radius: 7px;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
}

.ap-mini-btn:hover {
	color: var(--ap-text);
	border-color: var(--ap-primary);
}

/* Modal */
.ap-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 16px;
}

.ap-modal-backdrop[hidden] {
	display: none !important;
}

.ap-modal {
	background: var(--ap-surface);
	border: 1px solid var(--ap-border);
	border-radius: 16px;
	max-width: 520px;
	width: 100%;
	padding: 22px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.ap-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.ap-modal-header h3 {
	margin: 0;
	font-size: 17px;
	color: var(--ap-text);
}

.ap-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: var(--ap-text-muted);
	cursor: pointer;
}

.ap-modal-lead {
	font-size: 13.5px;
	color: var(--ap-text-muted);
	margin: 0 0 12px;
}

.ap-pro-features {
	margin: 0 0 16px;
	padding-left: 18px;
	font-size: 13px;
	color: var(--ap-text);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ap-license-box {
	background: var(--ap-surface-2);
	border: 1px solid var(--ap-border);
	border-radius: 12px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ap-license-row {
	display: flex;
	gap: 8px;
}

.ap-license-row input {
	flex: 1;
	padding: 9px 12px;
	border-radius: 8px;
	border: 1px solid var(--ap-border);
	background: var(--ap-surface);
	color: var(--ap-text);
	font-family: monospace;
	font-size: 13px;
}

.ap-license-hint {
	font-size: 11.5px;
	color: var(--ap-text-muted);
}

.ap-pro-feedback {
	font-size: 12.5px;
	font-weight: 600;
}

.ap-modal-footer {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--ap-border);
	display: flex;
	justify-content: flex-end;
}

.ap-btn-danger-outline {
	border: 1px solid var(--ap-rose);
	color: var(--ap-rose);
	background: transparent;
}

/* Print Host Default Hidden on Screen */
.ap-print-only {
	display: none;
}

/* Responsive */
@media (max-width: 1080px) {
	.ap-kpi-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.ap-main-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   @media print — A4 Executive Innovation Report & A4 QR Poster
   ========================================================================== */
@media print {
	@page {
		size: A4 portrait;
		margin: 12mm;
	}

	body * {
		visibility: hidden;
	}

	#awopulse-app,
	#ap-print-host,
	#ap-print-host * {
		visibility: visible;
	}

	.no-print {
		display: none !important;
	}

	#awopulse-app {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		background: #ffffff !important;
		color: #0f172a !important;
		padding: 0 !important;
		margin: 0 !important;
		box-shadow: none !important;
	}

	.ap-print-only {
		display: block !important;
		width: 100%;
		color: #0f172a;
		font-family: 'Inter', -apple-system, sans-serif;
	}

	.ap-report-sheet {
		border: 1px solid #cbd5e1;
		border-radius: 10px;
		padding: 18px;
	}

	.ap-report-header {
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		border-bottom: 2px solid #0f172a;
		padding-bottom: 12px;
		margin-bottom: 16px;
	}

	.ap-report-kpis {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 10px;
		margin-bottom: 18px;
	}

	.ap-report-kpi {
		border: 1px solid #cbd5e1;
		border-radius: 8px;
		padding: 10px;
		background: #f8fafc;
	}

	.ap-report-table {
		width: 100%;
		border-collapse: collapse;
		font-size: 11.5px;
		margin-bottom: 18px;
	}

	.ap-report-table th,
	.ap-report-table td {
		border: 1px solid #cbd5e1;
		padding: 7px 9px;
		text-align: left;
	}

	.ap-report-table th {
		background: #f1f5f9;
		font-weight: 700;
	}

	.ap-poster-sheet {
		border: 3px solid #4f46e5;
		border-radius: 18px;
		padding: 32px 24px;
		text-align: center;
	}
}

