/* =====================================================================
   KareerKomet Ad Spend — Ad Center (employer dashboard)
   Uses PSK theme variables so the dashboard light/dark toggle works.
   Every color reads var(--psk-*, <light fallback>). PSK flips the variable
   values for dark mode; the fallback only applies if PSK hasn't loaded.
   Scoped with !important against Hello Biz global overrides.
   ===================================================================== */

.kkas-wrap {
	font-family: "Chakra Petch", sans-serif;
	color: var(--psk-text, #111827);
	max-width: 1080px;
	margin: 0 auto;
}

.kkas-wrap * { box-sizing: border-box; }

.kkas-muted { color: var(--psk-text-muted, #6b7280); font-size: 13px; }

.kkas-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-bottom: 16px;
}

@media (max-width: 900px) { .kkas-grid { grid-template-columns: 1fr; } }

.kkas-card {
	background: var(--psk-surface, #ffffff) !important;
	border: 1px solid var(--psk-border, #e5e7eb) !important;
	border-radius: var(--psk-radius, 12px);
	padding: 20px;
}

.kkas-card-title {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--psk-text-muted, #6b7280) !important;
	margin: 0 0 14px;
}

/* ---- Balance ---- */

.kkas-balance-total {
	font-size: 34px;
	font-weight: 800;
	color: var(--psk-text, #111827) !important;
	line-height: 1;
}
.kkas-balance-expiry { font-size: 12px; color: var(--psk-text-muted, #6b7280); margin: 6px 0 16px; }

.kkas-split { display: flex; gap: 24px; margin-top: 12px; }
.kkas-split-label { display: block; font-size: 11px; color: var(--psk-text-muted, #9ca3af); text-transform: uppercase; letter-spacing: .04em; }
.kkas-split-val   { display: block; font-size: 18px; font-weight: 700; color: var(--psk-text, #111827); }
.kkas-plan-note { margin-top: 14px; }

/* ---- Metrics ---- */

.kkas-metric-row { display: flex; gap: 24px; margin-bottom: 16px; }
.kkas-metric-num { display: block; font-size: 24px; font-weight: 800; color: var(--psk-text, #111827); line-height: 1; }
.kkas-metric-label { display: block; font-size: 11px; color: var(--psk-text-muted, #9ca3af); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }

.kkas-channel-bars { display: flex; flex-direction: column; gap: 10px; }
.kkas-bar-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--psk-text-muted, #6b7280); margin-bottom: 4px; }
.kkas-bar-track { height: 6px; background: var(--psk-bg, #f3f4f6); border-radius: 999px; overflow: hidden; }
.kkas-bar-fill { height: 100%; background: var(--psk-primary, #0ABFA3); border-radius: 999px; }

/* ---- Buy ---- */

.kkas-amount-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
/* Scoped under .kkas-wrap and typed as button[type=button] to outrank Hello Biz's
   global button color, which was washing the label out on the light theme. */
.kkas-wrap button.kkas-amt,
.kkas-wrap button.kkas-amt[type=button] {
	flex: 1 1 auto;
	min-width: 60px;
	padding: 10px 8px;
	border: 1.5px solid var(--psk-border, #e5e7eb) !important;
	border-radius: 8px;
	background: var(--psk-surface, #ffffff) !important;
	color: var(--psk-text, #111827) !important;
	font-family: inherit;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: border-color .12s, color .12s, background .12s;
}
.kkas-wrap button.kkas-amt:hover {
	border-color: var(--psk-primary, #0ABFA3) !important;
	color: var(--psk-primary, #0ABFA3) !important;
	background: var(--psk-surface, #ffffff) !important;
}
.kkas-wrap button.kkas-amt.is-active {
	border-color: var(--psk-primary, #0ABFA3) !important;
	color: #ffffff !important;
	background: var(--psk-primary, #0ABFA3) !important;
}

.kkas-custom-wrap { margin-bottom: 12px; }
.kkas-custom-wrap input {
	width: 100%;
	padding: 10px 12px;
	border: 1.5px solid var(--psk-border, #e5e7eb) !important;
	border-radius: 8px;
	background: var(--psk-bg, #f9fafb) !important;
	color: var(--psk-text, #111827) !important;
	font-family: inherit;
	font-size: 14px;
}

.kkas-channel-pref { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.kkas-radio { font-size: 13px; color: var(--psk-text, #374151); display: flex; align-items: center; gap: 8px; cursor: pointer; }

.kkas-ack { display: flex; gap: 8px; font-size: 12px; color: var(--psk-text-muted, #6b7280); line-height: 1.5; margin: 8px 0 14px; cursor: pointer; }
.kkas-ack input { margin-top: 2px; flex-shrink: 0; }
.kkas-ack a:link, .kkas-ack a:visited { color: var(--psk-primary, #0ABFA3) !important; text-decoration: underline; }

.kkas-buy-btn {
	width: 100%;
	padding: 12px;
	border: none !important;
	border-radius: 999px;
	background: var(--psk-primary, #0ABFA3) !important;
	color: #ffffff !important;
	font-family: inherit;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
}
.kkas-buy-btn:disabled { opacity: .45; cursor: not-allowed; }
.kkas-buy-msg { font-size: 13px; margin: 10px 0 0; }
.kkas-buy-msg.is-err { color: #dc2626; }
.kkas-buy-msg.is-ok  { color: var(--psk-primary, #0ABFA3); }

/* ---- Activity feed ---- */

.kkas-feed { list-style: none; margin: 0; padding: 0; }
.kkas-feed-item {
	display: grid;
	grid-template-columns: 10px 1fr auto auto;
	align-items: center;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--psk-border, #f0f0f0);
	font-size: 13px;
}
.kkas-feed-item:last-child { border-bottom: none; }
.kkas-feed-icon { width: 8px; height: 8px; border-radius: 999px; background: var(--psk-text-muted, #9ca3af); }
.kkas-feed-included_credit, .kkas-feed-purchased_credit { background: var(--psk-primary, #0ABFA3); }
.kkas-feed-spend { background: #6366f1; }
.kkas-feed-expiry, .kkas-feed-refund_reversal { background: #f59e0b; }
.kkas-feed-desc { color: var(--psk-text, #374151); }
.kkas-feed-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.kkas-feed-amt.is-pos { color: var(--psk-primary, #0ABFA3); }
.kkas-feed-amt.is-neg { color: var(--psk-text-muted, #6b7280); }
.kkas-feed-date { color: var(--psk-text-muted, #9ca3af); font-size: 12px; min-width: 42px; text-align: right; }

/* =====================================================================
   Admin Tools "Ad Manager" tab
   ===================================================================== */

.kkas-admin { font-family: "Chakra Petch", sans-serif; color: var(--psk-text, #111827); }
.kkas-admin-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.kkas-admin-sub { color: var(--psk-text-muted, #6b7280); font-size: 13px; margin: 0 0 16px; }

.kkas-admin-flash { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.kkas-admin-flash.is-ok  { background: rgba(10,191,163,.12); color: #0ABFA3; }
.kkas-admin-flash.is-err { background: rgba(220,38,38,.10); color: #dc2626; }

.kkas-admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kkas-admin-table th {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 2px solid var(--psk-border, #e5e7eb);
	color: var(--psk-text-muted, #6b7280);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.kkas-admin-table th.num, .kkas-admin-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.kkas-admin-table td { padding: 12px; border-bottom: 1px solid var(--psk-border, #f0f0f0); color: var(--psk-text, #1f2937); }
.kkas-strong { font-weight: 800; }
.kkas-id { color: var(--psk-text-muted, #9ca3af); font-size: 11px; margin-left: 6px; }
.kkas-empty { text-align: center; color: var(--psk-text-muted, #9ca3af); padding: 32px 0; }

.kkas-tier { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.kkas-tier-orbit  { background: rgba(99,102,241,.14); color: #6366f1; }
.kkas-tier-launch { background: rgba(10,191,163,.14); color: #0ABFA3; }
.kkas-tier-boost  { background: rgba(245,158,11,.14); color: #f59e0b; }
.kkas-tier-free   { background: var(--psk-bg, #f3f4f6); color: var(--psk-text-muted, #9ca3af); }

.kkas-actions { text-align: right; white-space: nowrap; }
.kkas-btn {
	padding: 6px 12px;
	border: 1.5px solid var(--psk-border, #e5e7eb) !important;
	border-radius: 6px;
	background: var(--psk-surface, #fff) !important;
	color: var(--psk-text, #374151) !important;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	margin-left: 6px;
}
.kkas-btn:hover { border-color: var(--psk-primary, #0ABFA3) !important; color: var(--psk-primary, #0ABFA3) !important; }
.kkas-btn.kkas-primary { background: var(--psk-primary, #0ABFA3) !important; border-color: var(--psk-primary, #0ABFA3) !important; color: #fff !important; }

/* Modals */
.kkas-modal {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(13,27,42,.55);
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
}
.kkas-modal-card {
	background: var(--psk-surface, #fff) !important;
	border-radius: 14px;
	padding: 24px;
	width: 100%;
	max-width: 420px;
	box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.kkas-modal-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--psk-text, #111827); }
.kkas-modal-note { font-size: 12px; color: var(--psk-text-muted, #6b7280); margin: 0 0 16px; line-height: 1.5; }
.kkas-modal-card label { display: block; font-size: 12px; font-weight: 600; color: var(--psk-text, #374151); margin-bottom: 12px; }
.kkas-modal-card input, .kkas-modal-card select {
	display: block; width: 100%; margin-top: 5px;
	padding: 9px 12px;
	border: 1.5px solid var(--psk-border, #e5e7eb) !important;
	border-radius: 8px;
	background: var(--psk-bg, #f9fafb) !important;
	color: var(--psk-text, #111827) !important;
	font-family: inherit; font-size: 14px;
}
.kkas-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }