/* ==========================================================
   Defensive: fully suppress the WP admin toolbar on app-shell pages,
   even if something else on the site tries to re-enable it.
   ========================================================== */
#wpadminbar {
	display: none !important;
}

html {
	margin-top: 0 !important;
}

html.wp-toolbar {
	padding-top: 0 !important;
}

/* ==========================================================
   Reset for the app-shell body (no theme header/footer present)
   ========================================================== */
html, body.zynt-app-shell-body {
	height: 100%;
	margin: 0;
	padding: 0;
	background: #0d0d0f;
}

body.zynt-app-shell-body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	overflow-x: hidden;
}

/* ==========================================================
   Shared color tokens
   ========================================================== */
.zynt-app,
.zynt-login-screen {
	--zynt-bg: #0d0d0f;
	--zynt-card: #161618;
	--zynt-card-alt: #1c1c1f;
	--zynt-border: #26262a;
	--zynt-orange: #ff7a1a;
	--zynt-orange-bright: #ff9a4d;
	--zynt-orange-dim: #b8500f;
	--zynt-text-muted: #8f8f94;
}

/* ==========================================================
   App shell layout (fixed top bar + scroll area + bottom nav)
   ========================================================== */
.zynt-app {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	background: var(--zynt-bg);
	color: var(--zynt-orange);
}

.zynt-app-bar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	padding-top: max(14px, env(safe-area-inset-top));
	background: var(--zynt-card);
	border-bottom: 1px solid var(--zynt-border);
}

.zynt-app-bar-brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.zynt-app-logo {
	height: 26px;
	width: auto;
}

.zynt-app-title {
	color: #fff;
	font-weight: 600;
	font-size: 1em;
	letter-spacing: 0.01em;
}

.zynt-logout-btn {
	font-size: 0.78em;
	font-weight: 600;
	color: var(--zynt-text-muted);
	text-decoration: none;
	padding: 6px 12px;
	border-radius: 6px;
	transition: color 0.15s ease;
}

.zynt-logout-btn:hover {
	color: var(--zynt-orange-bright);
}

.zynt-disclaimer {
	flex: 0 0 auto;
	font-size: 0.7em;
	color: var(--zynt-text-muted);
	padding: 8px 18px;
	border-bottom: 1px solid var(--zynt-border);
	line-height: 1.5;
}

.zynt-app-main {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 18px 16px calc(90px + env(safe-area-inset-bottom));
	max-width: 600px;
	margin: 0 auto;
	width: 100%;
}

.zynt-app * {
	box-sizing: border-box;
}

@keyframes zynt-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Profile header */
.zynt-profile-header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 4px 0 18px;
	border-bottom: 1px solid var(--zynt-border);
	margin-bottom: 18px;
}

.zynt-profile-loading {
	color: var(--zynt-text-muted);
	font-size: 0.9em;
}

.zynt-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	flex-shrink: 0;
}

.zynt-profile-info {
	flex: 1;
	min-width: 0;
}

.zynt-profile-top-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}

.zynt-display-name {
	color: #fff;
	font-weight: 600;
	font-size: 0.98em;
}

.zynt-level-badge {
	font-size: 0.7em;
	font-weight: 600;
	color: var(--zynt-orange-bright);
	background: var(--zynt-card-alt);
	border: 1px solid var(--zynt-border);
	padding: 2px 9px;
	border-radius: 5px;
}

.zynt-flame {
	font-size: 0.8em;
	font-weight: 600;
	color: var(--zynt-orange-bright);
}

.zynt-xp-bar-track {
	width: 100%;
	height: 5px;
	background: var(--zynt-card-alt);
	border-radius: 3px;
	overflow: hidden;
}

.zynt-xp-bar-fill {
	height: 100%;
	width: 0%;
	background: var(--zynt-orange);
	border-radius: 3px;
	transition: width 0.6s ease;
}

.zynt-xp-label {
	display: block;
	font-size: 0.68em;
	color: var(--zynt-text-muted);
	margin-top: 4px;
}

/* Stats row */
.zynt-stats {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.zynt-stat {
	flex: 1;
	min-width: 105px;
	text-align: center;
	background: var(--zynt-card);
	border: 1px solid var(--zynt-border);
	border-radius: 8px;
	padding: 12px 8px;
}

.zynt-stat strong {
	display: block;
	font-size: 1.35em;
	line-height: 1.2;
	color: var(--zynt-orange-bright);
	font-weight: 600;
}

.zynt-stat span {
	font-size: 0.68em;
	color: var(--zynt-text-muted);
}

/* Quick actions (Dashboard tab) */
.zynt-quick-actions {
	display: flex;
	gap: 10px;
	margin-bottom: 24px;
}

.zynt-quick-btn {
	flex: 1;
	background: var(--zynt-orange);
	color: #0d0d0f;
	border: none;
	border-radius: 8px;
	padding: 12px 10px;
	font-weight: 600;
	font-size: 0.85em;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.zynt-quick-btn:hover {
	opacity: 0.88;
}

.zynt-quick-btn-alt {
	background: var(--zynt-card-alt);
	color: var(--zynt-orange-bright);
	border: 1px solid var(--zynt-border);
}

/* Dashboard sections */
.zynt-dashboard-section {
	margin-bottom: 24px;
}

.zynt-dashboard-section h4 {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: #fff;
	font-size: 0.82em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin: 0 0 10px;
}

.zynt-section-link {
	font-size: 0.85em;
	font-weight: 500;
	text-transform: none;
	letter-spacing: normal;
	color: var(--zynt-orange-bright);
	text-decoration: none;
}

.zynt-section-link:hover {
	text-decoration: underline;
}

.zynt-badges-preview-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}

.zynt-badge-preview-icon {
	font-size: 1.3em;
	background: var(--zynt-card);
	border: 1px solid var(--zynt-border);
	border-radius: 8px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.zynt-badges-preview-count,
.zynt-badges-preview-empty {
	font-size: 0.75em;
	color: var(--zynt-text-muted);
	margin: 0;
}

/* Panels */
.zynt-panel {
	display: none;
	animation: zynt-fade-in 0.2s ease both;
}

.zynt-panel.is-active {
	display: block;
}

/* Forms */
.zynt-panel form label {
	display: block;
	font-weight: 600;
	margin: 12px 0 4px;
	font-size: 0.8em;
	color: var(--zynt-text-muted);
}

.zynt-panel form select,
.zynt-panel form input,
.zynt-panel form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--zynt-border);
	border-radius: 6px;
	background: var(--zynt-card);
	color: #fff;
	font-size: 0.92em;
	transition: border-color 0.15s ease;
}

.zynt-panel form select:focus,
.zynt-panel form input:focus,
.zynt-panel form textarea:focus {
	outline: none;
	border-color: var(--zynt-orange);
}

.zynt-submit-btn {
	display: inline-block;
	margin-top: 18px;
	padding: 12px 22px;
	border: none;
	border-radius: 8px;
	background: var(--zynt-orange);
	color: #0d0d0f;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	transition: opacity 0.15s ease;
	width: 100%;
}

.zynt-submit-btn:hover {
	opacity: 0.88;
	color: #0d0d0f;
}

.zynt-form-message {
	margin-top: 10px;
	font-size: 0.82em;
	color: var(--zynt-orange-bright);
	min-height: 1.2em;
}

.zynt-info-card {
	background: var(--zynt-card);
	border: 1px solid var(--zynt-border);
	border-radius: 8px;
	padding: 14px 16px;
	margin-top: 20px;
}

.zynt-info-card h4 {
	margin: 0 0 6px;
	font-size: 0.82em;
	color: #fff;
	font-weight: 600;
}

.zynt-info-card p {
	margin: 0;
	font-size: 0.76em;
	color: var(--zynt-text-muted);
	line-height: 1.55;
}

.zynt-tip-card {
	margin-top: 10px;
	font-size: 0.76em;
	color: var(--zynt-text-muted);
	border-top: 1px solid var(--zynt-border);
	padding-top: 10px;
	min-height: 1em;
}

/* History */
.zynt-history-list {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.zynt-history-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 9px 0;
	border-bottom: 1px solid var(--zynt-border);
	font-size: 0.82em;
	color: #d8d8d8;
}

.zynt-delete-btn {
	background: none;
	border: none;
	color: var(--zynt-text-muted);
	cursor: pointer;
	font-size: 0.9em;
}

.zynt-delete-btn:hover {
	color: #ff6b6b;
}

/* Badges grid (full, on Badges panel) */
.zynt-badges-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 8px;
}

.zynt-badge-card {
	background: var(--zynt-card);
	border: 1px solid var(--zynt-border);
	border-radius: 8px;
	padding: 14px 8px;
	text-align: center;
}

.zynt-badge-card.is-earned {
	border-color: var(--zynt-orange-dim);
}

.zynt-badge-card.is-locked {
	opacity: 0.4;
	filter: grayscale(1);
}

.zynt-badge-icon {
	font-size: 1.5em;
	margin-bottom: 6px;
}

.zynt-badge-title {
	font-weight: 600;
	font-size: 0.78em;
	color: #fff;
	margin-bottom: 3px;
}

.zynt-badge-desc {
	font-size: 0.65em;
	color: var(--zynt-text-muted);
	line-height: 1.3;
}

.zynt-badge-lock {
	font-size: 0.6em;
	color: var(--zynt-text-muted);
	text-transform: uppercase;
	margin-top: 6px;
}

/* Orders panel */
.zynt-orders-card {
	background: var(--zynt-card);
	border: 1px solid var(--zynt-border);
	border-radius: 8px;
	padding: 20px;
	text-align: center;
}

.zynt-orders-card h3 {
	color: #fff;
	font-size: 1em;
	margin-top: 0;
}

.zynt-orders-card p {
	color: var(--zynt-text-muted);
	font-size: 0.85em;
}

.zynt-orders-link {
	width: auto;
	padding-left: 26px;
	padding-right: 26px;
}

.zynt-orders-placeholder {
	font-style: italic;
}

/* Bottom nav (mobile app tab bar) */
.zynt-bottom-nav {
	flex: 0 0 auto;
	display: flex;
	background: var(--zynt-card);
	border-top: 1px solid var(--zynt-border);
	padding-bottom: env(safe-area-inset-bottom);
	position: sticky;
	bottom: 0;
}

.zynt-tab-btn {
	flex: 1;
	background: none;
	border: none;
	padding: 10px 4px 8px;
	cursor: pointer;
	color: var(--zynt-text-muted);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
}

.zynt-tab-icon {
	font-size: 1.2em;
	line-height: 1;
	opacity: 0.55;
}

.zynt-tab-label {
	font-size: 0.6em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.zynt-tab-btn.is-active {
	color: var(--zynt-orange-bright);
}

.zynt-tab-btn.is-active .zynt-tab-icon {
	opacity: 1;
}

/* Toasts */
.zynt-toast-container {
	position: fixed;
	bottom: calc(90px + env(safe-area-inset-bottom));
	right: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 9999;
}

.zynt-toast {
	background: var(--zynt-card);
	border: 1px solid var(--zynt-border);
	color: var(--zynt-orange-bright);
	font-weight: 600;
	font-size: 0.82em;
	padding: 9px 16px;
	border-radius: 6px;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.zynt-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ==========================================================
   Login screen
   ========================================================== */
.zynt-login-screen {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--zynt-bg);
	padding: 24px;
}

.zynt-login-card {
	width: 100%;
	max-width: 360px;
	background: var(--zynt-card);
	border: 1px solid var(--zynt-border);
	border-radius: 10px;
	padding: 30px 26px;
	text-align: center;
}

.zynt-login-logo {
	height: 32px;
	width: auto;
	margin-bottom: 16px;
}

.zynt-login-title {
	color: #fff;
	font-size: 1.2em;
	font-weight: 600;
	margin: 0 0 6px;
}

.zynt-login-sub {
	color: var(--zynt-text-muted);
	font-size: 0.83em;
	margin: 0 0 20px;
}

.zynt-login-error {
	background: rgba(255, 107, 107, 0.08);
	border: 1px solid rgba(255, 107, 107, 0.3);
	color: #ff8f8f;
	font-size: 0.78em;
	padding: 8px 12px;
	border-radius: 6px;
	margin-bottom: 16px;
}

.zynt-login-form {
	text-align: left;
}

.zynt-login-form label {
	display: block;
	font-weight: 600;
	font-size: 0.76em;
	color: var(--zynt-text-muted);
	margin: 12px 0 4px;
}

.zynt-login-form input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--zynt-border);
	border-radius: 6px;
	background: var(--zynt-card-alt);
	color: #fff;
	font-size: 0.92em;
}

.zynt-login-form input:focus {
	outline: none;
	border-color: var(--zynt-orange);
}

.zynt-login-submit {
	margin-top: 20px;
}

.zynt-lost-password {
	display: inline-block;
	margin-top: 18px;
	font-size: 0.76em;
	color: var(--zynt-text-muted);
	text-decoration: none;
}

.zynt-lost-password:hover {
	color: var(--zynt-orange-bright);
}

/* Log In / Create Account toggle */
.zynt-auth-toggle {
	display: flex;
	gap: 4px;
	background: var(--zynt-card-alt);
	border: 1px solid var(--zynt-border);
	border-radius: 8px;
	padding: 4px;
	margin-bottom: 18px;
}

.zynt-auth-toggle-btn {
	flex: 1;
	border: none;
	background: transparent;
	color: var(--zynt-text-muted);
	font-size: 0.8em;
	font-weight: 600;
	padding: 9px 10px;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.zynt-auth-toggle-btn:hover {
	color: #fff;
}

.zynt-auth-toggle-btn.is-active {
	background: var(--zynt-orange);
	color: #0d0d0f;
}

.zynt-auth-panel {
	display: none;
}

.zynt-auth-panel.is-active {
	display: block;
}

/* Animated "creating your account" progress bar */
.zynt-register-progress {
	margin-top: 16px;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.25s ease, opacity 0.2s ease;
}

.zynt-register-progress.is-active {
	max-height: 50px;
	opacity: 1;
}

.zynt-register-progress-track {
	height: 6px;
	border-radius: 999px;
	background: var(--zynt-card-alt);
	border: 1px solid var(--zynt-border);
	overflow: hidden;
}

.zynt-register-progress-fill {
	height: 100%;
	width: 0%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--zynt-orange-dim), var(--zynt-orange) 50%, var(--zynt-orange-bright));
	background-size: 200% 100%;
	animation: zynt-progress-shimmer 1.1s linear infinite;
	transition: width 0.35s ease;
}

@keyframes zynt-progress-shimmer {
	0% { background-position: 0% 0; }
	100% { background-position: -200% 0; }
}

.zynt-register-progress-label {
	display: block;
	margin-top: 7px;
	font-size: 0.74em;
	color: var(--zynt-text-muted);
}

.zynt-register-error {
	background: rgba(255, 107, 107, 0.08);
	border: 1px solid rgba(255, 107, 107, 0.3);
	color: #ff8f8f;
	font-size: 0.78em;
	padding: 8px 12px;
	border-radius: 6px;
	margin-top: 14px;
}

.zynt-register-error[hidden] {
	display: none;
}

/* ==========================================================
   Small-screen tuning
   ========================================================== */
@media (max-width: 380px) {
	.zynt-app-title {
		font-size: 0.92em;
	}
	.zynt-tab-label {
		font-size: 0.56em;
	}
	.zynt-stat {
		min-width: 88px;
	}
}
