/* ==========================================================================
   AwoOutdoor Media v2.2.0 — Açık Hava Reklam Envanteri ve Medya Planlama Stüdyosu
   Adaptive Day/Night Theme + A4 Client Media Plan Proposal Print Engine
   ========================================================================== */

.ao-root {
	--ao-bg: #f1f5f9;
	--ao-surface: #ffffff;
	--ao-surface-2: #f8fafc;
	--ao-border: #cbd5e1;
	--ao-text: #0f172a;
	--ao-text-muted: #64748b;
	--ao-primary: #7c3aed;
	--ao-primary-hover: #6d28d9;
	--ao-primary-soft: #f5f3ff;
	--ao-accent: #059669;
	--ao-accent-hover: #047857;
	--ao-emerald: #059669;
	--ao-emerald-soft: #ecfdf5;
	--ao-amber: #d97706;
	--ao-amber-soft: #fffbeb;
	--ao-rose: #e11d48;
	--ao-rose-soft: #fff1f2;
	--ao-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
	--ao-radius: 14px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--ao-text);
	background: var(--ao-bg);
	padding: 24px;
	border-radius: 16px;
	box-sizing: border-box;
	line-height: 1.5;
}

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

.ao-root[data-theme="dark"] {
	--ao-bg: #0b1120;
	--ao-surface: #111827;
	--ao-surface-2: #1e293b;
	--ao-border: #334155;
	--ao-text: #f8fafc;
	--ao-text-muted: #94a3b8;
	--ao-primary: #8b5cf6;
	--ao-primary-hover: #a78bfa;
	--ao-primary-soft: rgba(139, 92, 246, 0.16);
	--ao-accent: #10b981;
	--ao-accent-hover: #059669;
	--ao-emerald: #10b981;
	--ao-emerald-soft: rgba(16, 185, 129, 0.15);
	--ao-amber: #f59e0b;
	--ao-amber-soft: rgba(245, 158, 11, 0.15);
	--ao-rose: #fb7185;
	--ao-rose-soft: rgba(244, 63, 94, 0.16);
	--ao-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
	.ao-root[data-theme="auto"] {
		--ao-bg: #0b1120;
		--ao-surface: #111827;
		--ao-surface-2: #1e293b;
		--ao-border: #334155;
		--ao-text: #f8fafc;
		--ao-text-muted: #94a3b8;
		--ao-primary: #8b5cf6;
		--ao-primary-hover: #a78bfa;
		--ao-primary-soft: rgba(139, 92, 246, 0.16);
		--ao-accent: #10b981;
		--ao-accent-hover: #059669;
		--ao-emerald: #10b981;
		--ao-emerald-soft: rgba(16, 185, 129, 0.15);
		--ao-amber: #f59e0b;
		--ao-amber-soft: rgba(245, 158, 11, 0.15);
		--ao-rose: #fb7185;
		--ao-rose-soft: rgba(244, 63, 94, 0.16);
		--ao-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.45);
	}
}

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

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

.ao-logo-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: linear-gradient(135deg, #7c3aed, #2563eb);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 25px;
	color: #fff;
	box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
	flex-shrink: 0;
}

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

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

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

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

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

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

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

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

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

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

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

/* Buttons */
.ao-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;
}

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

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

.ao-btn-accent {
	background: linear-gradient(135deg, #059669, #10b981);
	color: #ffffff;
	font-weight: 700;
	box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}

.ao-btn-accent:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

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

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

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

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

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

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

.ao-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 Grid */
.ao-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 20px;
}

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

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

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

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

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

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

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

.ao-text-rose {
	color: var(--ao-rose);
}

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

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

.ao-sidebar,
.ao-content {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

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

.ao-plan-card {
	border-color: rgba(139, 92, 246, 0.45);
}

.ao-cart-card {
	border-color: rgba(16, 185, 129, 0.45);
}

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

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

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

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

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

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

.ao-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

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

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

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

.ao-calc-pill {
	padding: 11px 13px;
	border-radius: 10px;
	background: var(--ao-primary-soft);
	border: 1px solid rgba(139, 92, 246, 0.3);
	color: var(--ao-text);
	font-size: 12.5px;
	line-height: 1.55;
}

/* Photo Upload Box */
.ao-photo-box {
	border: 1px dashed var(--ao-border);
	border-radius: 10px;
	padding: 10px;
	background: var(--ao-surface-2);
}

.ao-photo-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--ao-text-muted);
	margin-bottom: 6px;
}

.ao-file-input {
	font-size: 12px;
	width: 100%;
	color: var(--ao-text-muted);
}

.ao-photo-preview-wrap {
	margin-top: 8px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--ao-border);
	max-height: 135px;
}

.ao-photo-preview {
	width: 100%;
	height: 130px;
	object-fit: cover;
	display: block;
}

/* Visual Inventory Units Grid */
.ao-units-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
	gap: 16px;
}

.ao-unit-card {
	border: 1px solid var(--ao-border);
	background: var(--ao-surface-2);
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: all 0.18s ease;
	position: relative;
}

.ao-unit-card.is-selected {
	border: 2px solid var(--ao-primary);
	box-shadow: 0 0 0 3px var(--ao-primary-soft);
}

.ao-unit-photo-wrap {
	position: relative;
	width: 100%;
	height: 158px;
	background: #0f172a;
	overflow: hidden;
}

.ao-unit-photo-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ao-unit-overlay-top {
	position: absolute;
	top: 10px;
	left: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ao-code-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: rgba(15, 23, 42, 0.88);
	color: #f8fafc;
	border: 1px solid rgba(255, 255, 255, 0.22);
	padding: 4px 10px;
	border-radius: 7px;
	font-family: 'Inter', monospace;
	font-weight: 800;
	font-size: 12px;
	backdrop-filter: blur(6px);
}

.ao-status-pill {
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 99px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.ao-status-pill.avail {
	background: rgba(16, 185, 129, 0.92);
	color: #ffffff;
}

.ao-status-pill.opt {
	background: rgba(245, 158, 11, 0.92);
	color: #ffffff;
}

.ao-status-pill.busy {
	background: rgba(225, 29, 72, 0.92);
	color: #ffffff;
}

.ao-status-pill.maint {
	background: rgba(100, 116, 139, 0.92);
	color: #ffffff;
}

.ao-unit-overlay-bottom {
	position: absolute;
	bottom: 8px;
	left: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

.ao-type-tag {
	background: rgba(124, 58, 237, 0.9);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 6px;
}

.ao-impr-tag {
	background: rgba(15, 23, 42, 0.85);
	color: #fbbf24;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 6px;
}

.ao-unit-body {
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.ao-unit-title {
	margin: 0;
	font-size: 14.5px;
	font-weight: 800;
	color: var(--ao-text);
	line-height: 1.3;
}

.ao-unit-meta {
	font-size: 12px;
	color: var(--ao-text-muted);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ao-price-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	border-radius: 9px;
	background: var(--ao-surface);
	border: 1px solid var(--ao-border);
	margin-top: 2px;
}

.ao-price-old {
	font-size: 11.5px;
	color: var(--ao-text-muted);
	text-decoration: line-through;
}

.ao-price-net {
	font-size: 15px;
	font-weight: 800;
	color: var(--ao-emerald);
}

.ao-unit-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 6px;
}

/* Selected Plan Box */
.ao-selected-plan-box {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ao-cart-items {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ao-cart-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border-radius: 99px;
	background: var(--ao-primary-soft);
	border: 1px solid rgba(139, 92, 246, 0.35);
	color: var(--ao-text);
	font-size: 12px;
	font-weight: 700;
}

.ao-cart-chip button {
	background: none;
	border: none;
	color: var(--ao-rose);
	font-weight: 900;
	cursor: pointer;
	padding: 0 2px;
	font-size: 14px;
	line-height: 1;
}

.ao-cart-summary-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 16px;
	border-radius: 12px;
	background: var(--ao-surface-2);
	border: 1px solid var(--ao-border);
}

/* Filters & Table */
.ao-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

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

.ao-table-wrap {
	overflow-x: auto;
}

.ao-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12.5px;
}

.ao-table th,
.ao-table td {
	padding: 11px 10px;
	border-bottom: 1px solid var(--ao-border);
	text-align: left;
	vertical-align: middle;
}

.ao-table th {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--ao-text-muted);
	background: var(--ao-surface-2);
}

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

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

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

/* Modal */
.ao-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;
}

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

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

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

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

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

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

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

.ao-transfer-summary {
	background: var(--ao-surface-2);
	border: 1px solid var(--ao-border);
	border-radius: 12px;
	padding: 14px;
	font-size: 12.5px;
	color: var(--ao-text);
	display: flex;
	flex-direction: column;
	gap: 6px;
}

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

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

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

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

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

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

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

.ao-print-only {
	display: none;
}

@media (max-width: 1120px) {
	.ao-kpi-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.ao-main-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   @media print — A4 Client Media Plan Proposal & Field QR Stickers
   ========================================================================== */
@media print {
	@page {
		size: A4 portrait;
		margin: 10mm;
	}

	body * {
		visibility: hidden;
	}

	#awooutdoor-app,
	#ao-print-host,
	#ao-print-host * {
		visibility: visible;
	}

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

	#awooutdoor-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;
	}

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

	.ao-print-sheet {
		border: 1px solid #cbd5e1;
		border-radius: 10px;
		padding: 16px;
		background: #ffffff;
	}

	.ao-print-table {
		width: 100%;
		border-collapse: collapse;
		font-size: 10.5px;
		margin-top: 12px;
	}

	.ao-print-table th,
	.ao-print-table td {
		border: 1px solid #cbd5e1;
		padding: 6px 8px;
		text-align: left;
		vertical-align: middle;
	}

	.ao-print-table th {
		background: #f1f5f9;
		font-weight: 700;
		color: #0f172a;
	}

	.ao-print-cards-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		margin-top: 12px;
	}

	.ao-print-unit-card {
		border: 1px solid #cbd5e1;
		border-radius: 8px;
		overflow: hidden;
		page-break-inside: avoid;
	}

	.ao-qr-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}

	.ao-qr-sticker {
		border: 2px dashed #1e293b;
		border-radius: 12px;
		padding: 16px;
		text-align: center;
		page-break-inside: avoid;
	}
}
