/* ============================================================
   GlobalAds Network – Publisher Portal UI
   Matches the provided design system (gold + navy)
   ============================================================ */

:root {
	--gan-navy: #0B1220;
	--gan-navy-2: #111827;
	--gan-navy-3: #1a2332;
	--gan-gold: #E8A317;
	--gan-gold-hover: #d4920f;
	--gan-gold-soft: #FEF3C7;
	--gan-bg: #F4F6F9;
	--gan-card: #FFFFFF;
	--gan-text: #0F172A;
	--gan-muted: #64748B;
	--gan-border: #E8ECF1;
	--gan-green: #16A34A;
	--gan-green-soft: #DCFCE7;
	--gan-red: #DC2626;
	--gan-orange: #D97706;
	--gan-radius: 12px;
	--gan-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
	--gan-sidebar-w: 260px;
}

.gan-app, .gan-app * { box-sizing: border-box; }
.gan-app {
	display: flex;
	min-height: 100vh;
	width: 100%;
	margin: 0;
	padding: 0;
	font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--gan-text);
	background: var(--gan-bg);
	-webkit-font-smoothing: antialiased;
}

/* ---- Sidebar ---- */
.gan-sidebar {
	width: var(--gan-sidebar-w);
	min-width: var(--gan-sidebar-w);
	background: var(--gan-navy);
	color: #CBD5E1;
	display: flex;
	flex-direction: column;
	position: fixed;
	top: 0;
	left: 0;
	height: 100vh;
	overflow-y: auto;
	z-index: 50;
	transition: transform 0.25s ease;
}
.gan-sidebar .gan-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 22px 20px 20px;
	border-bottom: 1px solid rgba(255,255,255,0.06);
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}
.gan-sidebar a.gan-brand:hover .gan-brand-text strong { color: var(--gan-gold); }
.gan-sidebar .gan-brand-icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--gan-gold);
	color: #fff;
	font-weight: 800;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.gan-sidebar .gan-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.gan-sidebar .gan-brand-text strong {
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.gan-sidebar .gan-brand-text span {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: #64748B;
	text-transform: uppercase;
	margin-top: 2px;
}
.gan-sidebar nav {
	flex: 1;
	padding: 16px 12px;
}
.gan-sidebar nav a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 14px;
	color: #94A3B8;
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 500;
	border-radius: 10px;
	margin-bottom: 2px;
	transition: background 0.15s, color 0.15s;
}
.gan-sidebar nav a:hover {
	color: #F1F5F9;
	background: rgba(255,255,255,0.05);
}
.gan-sidebar nav a.active {
	color: #fff;
	background: rgba(232,163,23,0.15);
}
.gan-sidebar nav a .gan-nav-icon {
	width: 20px;
	text-align: center;
	font-size: 15px;
	opacity: 0.85;
}
.gan-sidebar-divider {
	height: 1px;
	background: rgba(255,255,255,0.06);
	margin: 12px 14px;
}
.gan-sidebar-footer {
	padding: 14px 16px 18px;
	border-top: 1px solid rgba(255,255,255,0.06);
}
.gan-user-chip {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: rgba(255,255,255,0.05);
	border-radius: 10px;
}
.gan-user-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--gan-gold);
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.gan-user-meta {
	min-width: 0;
}
.gan-user-meta strong {
	display: block;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.gan-user-meta span {
	font-size: 11px;
	color: #64748B;
}

/* ---- Mobile topbar ---- */
.gan-topbar {
	display: none;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--gan-navy);
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 60;
}
a.gan-logo-mobile, .gan-topbar .gan-logo-mobile {
	font-weight: 700;
	font-size: 15px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.gan-topbar .gan-logo-mobile::before {
	content: "G";
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: var(--gan-gold);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 800;
}
.gan-menu-toggle {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	padding: 4px 8px;
	line-height: 1;
}
.gan-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(11,18,32,0.5);
	z-index: 40;
}
.gan-overlay.open { display: block; }

/* ---- Main shell ---- */
.gan-shell {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	margin-left: var(--gan-sidebar-w);
}
.gan-top-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 28px 0;
	flex-wrap: wrap;
}
.gan-greeting .gan-eyebrow {
	font-size: 12px;
	color: var(--gan-muted);
	margin: 0 0 2px;
}
.gan-greeting h1 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--gan-text);
}
.gan-top-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}
.gan-search {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1px solid var(--gan-border);
	border-radius: 999px;
	padding: 8px 14px;
	min-width: 200px;
}
.gan-search input {
	border: none;
	outline: none;
	font-size: 13px;
	width: 100%;
	background: transparent;
	color: var(--gan-text);
}
.gan-search input::placeholder { color: #94A3B8; }
.gan-icon-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--gan-border);
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--gan-muted);
	font-size: 15px;
}
.gan-user-pill {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1px solid var(--gan-border);
	border-radius: 999px;
	padding: 5px 12px 5px 5px;
	font-size: 13px;
	font-weight: 600;
}
.gan-user-pill .gan-user-avatar {
	width: 28px;
	height: 28px;
	font-size: 11px;
}

.gan-main {
	flex: 1;
	padding: 20px 28px 40px;
	overflow-x: hidden;
}

/* ---- Stats ---- */
.gan-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-bottom: 20px;
}
.gan-stat-card {
	background: var(--gan-card);
	border: 1px solid var(--gan-border);
	border-radius: var(--gan-radius);
	padding: 18px 20px;
	box-shadow: var(--gan-shadow);
	position: relative;
	overflow: hidden;
}
.gan-stat-card::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
}
.gan-stat-card.gold::before { background: var(--gan-gold); }
.gan-stat-card.teal::before { background: #0D9488; }
.gan-stat-card.green::before { background: var(--gan-green); }
.gan-stat-card .label {
	display: block;
	font-size: 12px;
	font-weight: 500;
	color: var(--gan-muted);
	margin-bottom: 6px;
}
.gan-stat-card .value {
	font-size: 28px;
	font-weight: 700;
	color: var(--gan-text);
	letter-spacing: -0.03em;
	line-height: 1.15;
}
.gan-stat-card .sub {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 500;
	color: var(--gan-green);
}

/* ---- Cards ---- */
.gan-card {
	background: var(--gan-card);
	border: 1px solid var(--gan-border);
	border-radius: var(--gan-radius);
	padding: 20px;
	margin-bottom: 16px;
	box-shadow: var(--gan-shadow);
}
.gan-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
	gap: 12px;
}
.gan-card-header h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 650;
}
.gan-card-header a, .gan-link {
	color: #0D9488;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
}
.gan-card-header a:hover { text-decoration: underline; }
.gan-grid-2 {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 16px;
}
.gan-grid-bottom {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 16px;
}

/* ---- Buttons ---- */
.gan-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 10px 18px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
	line-height: 1.3;
	white-space: nowrap;
}
.gan-btn:active { transform: scale(0.98); }
.gan-btn-primary {
	background: var(--gan-gold);
	color: #fff;
}
.gan-btn-primary:hover {
	background: var(--gan-gold-hover);
	color: #fff;
}
.gan-btn-secondary {
	background: #fff;
	color: var(--gan-text);
	border: 1px solid var(--gan-border);
}
.gan-btn-secondary:hover { background: #F8FAFC; }
.gan-btn-green {
	background: var(--gan-green);
	color: #fff;
}
.gan-btn-green:hover { background: #15803D; color: #fff; }
.gan-btn-sm {
	padding: 6px 12px;
	font-size: 12px;
	border-radius: 8px;
}
.gan-btn-block { width: 100%; }
.gan-btn-outline {
	background: transparent;
	border: 1px solid var(--gan-border);
	color: var(--gan-text);
}

/* ---- Badges ---- */
.gan-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 99px;
	font-size: 11px;
	font-weight: 600;
	background: #F1F5F9;
	color: #475569;
}
.gan-badge-green { background: var(--gan-green-soft); color: #166534; }
.gan-badge-orange { background: #FEF3C7; color: #92400E; }
.gan-badge-red { background: #FEE2E2; color: #991B1B; }
.gan-badge-blue { background: #DBEAFE; color: #1E40AF; }
.gan-badge-gold { background: var(--gan-gold-soft); color: #92400E; }

/* ---- Activity list ---- */
.gan-activity { list-style: none; padding: 0; margin: 0; }
.gan-activity li {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid #F1F5F9;
}
.gan-activity li:last-child { border-bottom: none; }
.gan-activity .act-left {
	display: flex;
	gap: 10px;
	min-width: 0;
}
.gan-activity .act-dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	flex-shrink: 0;
	background: var(--gan-green-soft);
	color: var(--gan-green);
}
.gan-activity .act-dot.out {
	background: #FEE2E2;
	color: var(--gan-red);
}
.gan-activity .act-title {
	font-size: 13px;
	font-weight: 550;
	color: var(--gan-text);
}
.gan-activity .act-time {
	font-size: 12px;
	color: var(--gan-muted);
	margin-top: 1px;
}
.gan-activity .act-amt {
	font-size: 13px;
	font-weight: 650;
	white-space: nowrap;
}
.gan-activity .act-amt.plus { color: var(--gan-green); }
.gan-activity .act-amt.minus { color: var(--gan-red); }

/* ---- Domains mini table ---- */
.gan-mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gan-mini-table th {
	text-align: left;
	font-size: 11px;
	font-weight: 600;
	color: var(--gan-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0 0 10px;
}
.gan-mini-table td {
	padding: 10px 0;
	border-top: 1px solid #F1F5F9;
}
.gan-mini-table .manage {
	color: #0D9488;
	font-weight: 500;
	text-decoration: none;
	font-size: 13px;
}

/* ---- Quick actions ---- */
.gan-quick-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.gan-quick-actions .gan-btn {
	justify-content: flex-start;
	padding: 12px 16px;
}

/* ---- Chart placeholder ---- */
.gan-chart-wrap {
	height: 200px;
	position: relative;
}
.gan-chart-wrap canvas {
	width: 100% !important;
	height: 200px !important;
}
.gan-chart-legend {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--gan-muted);
	margin-top: 8px;
}
.gan-chart-legend i {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--gan-gold);
	display: inline-block;
}

/* ---- Tables ---- */
.gan-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.gan-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	min-width: 520px;
}
.gan-table th, .gan-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid #F1F5F9;
}
.gan-table th {
	font-weight: 600;
	color: var(--gan-muted);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: #FAFBFC;
}
.gan-table tr:last-child td { border-bottom: none; }
.gan-table tr:hover td { background: #FAFBFC; }
.gan-credit { color: var(--gan-green); font-weight: 650; }
.gan-debit { color: var(--gan-red); font-weight: 650; }

/* ---- Forms ---- */
.gan-input {
	padding: 10px 14px;
	border: 1px solid var(--gan-border);
	border-radius: 10px;
	font-size: 14px;
	width: 100%;
	max-width: 360px;
	margin-bottom: 8px;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
	color: var(--gan-text);
}
.gan-input:focus {
	outline: none;
	border-color: var(--gan-gold);
	box-shadow: 0 0 0 3px rgba(232,163,23,0.15);
}
.gan-form-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}
.gan-filters {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 18px;
	align-items: center;
}
.gan-filters select, .gan-filters .gan-input {
	max-width: none;
	margin: 0;
	width: auto;
	min-width: 140px;
}
.gan-tabs {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.gan-tab {
	padding: 7px 14px;
	border-radius: 99px;
	font-size: 13px;
	font-weight: 550;
	background: #fff;
	border: 1px solid var(--gan-border);
	color: var(--gan-muted);
	cursor: pointer;
	text-decoration: none;
}
.gan-tab.active, .gan-tab:hover {
	background: var(--gan-navy);
	color: #fff;
	border-color: var(--gan-navy);
}

/* ---- Campaign grid ---- */
.gan-campaign-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}
.gan-campaign-card {
	background: #fff;
	border: 1px solid var(--gan-border);
	border-radius: var(--gan-radius);
	overflow: hidden;
	box-shadow: var(--gan-shadow);
	transition: box-shadow 0.15s, transform 0.15s;
}
.gan-campaign-card:hover {
	box-shadow: 0 8px 24px rgba(15,23,42,0.08);
	transform: translateY(-2px);
}
.gan-camp-banner {
	height: 110px;
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 12px;
}
.gan-camp-banner .gan-badge {
	background: rgba(255,255,255,0.92);
	color: #334155;
}
.gan-camp-body { padding: 16px; }
.gan-camp-body h3 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 650;
}
.gan-desc {
	font-size: 13px;
	color: var(--gan-muted);
	margin: 0 0 12px;
	line-height: 1.4;
}
.gan-camp-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}
.gan-cpc {
	font-weight: 700;
	color: var(--gan-text);
	font-size: 14px;
}
.gan-cpc span {
	font-weight: 500;
	color: var(--gan-muted);
	font-size: 12px;
}

/* Color variants for campaign headers */
.gan-c-green { background: #16A34A; }
.gan-c-teal { background: #0F766E; }
.gan-c-red { background: #DC2626; }
.gan-c-amber { background: #D97706; }
.gan-c-cyan { background: #0E7490; }
.gan-c-indigo { background: #1E3A5F; }
.gan-c-purple { background: #7C3AED; }
.gan-c-slate { background: #475569; }

/* ---- Modal ---- */
.gan-modal {
	position: fixed;
	inset: 0;
	background: rgba(11,18,32,0.45);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.gan-modal-content {
	background: #fff;
	border-radius: 16px;
	padding: 28px;
	max-width: 520px;
	width: 100%;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 24px 48px rgba(0,0,0,0.18);
}
.gan-modal-close {
	position: absolute;
	top: 14px;
	right: 18px;
	font-size: 24px;
	cursor: pointer;
	color: #94A3B8;
	line-height: 1;
}
.gan-modal-close:hover { color: var(--gan-text); }
.gan-modal-content h3 {
	color: var(--gan-text);
	font-weight: 700;
}
.gan-modal-content p,
.gan-modal-content label {
	color: #334155 !important;
	opacity: 1 !important;
}
.gan-modal-content .gan-code-block {
	margin-top: 6px;
	color: #E2E8F0;
}

/* ---- Auth (split portal design) ---- */
.gan-auth-split {
	display: flex;
	min-height: 100vh;
	width: 100%;
	background: #F8FAFC;
}
.gan-auth-panel {
	width: 42%;
	max-width: 520px;
	background: linear-gradient(165deg, #0B1220 0%, #111827 55%, #0B1220 100%);
	color: #E2E8F0;
	padding: 36px 40px 28px;
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
}
.gan-auth-panel::after {
	content: "";
	position: absolute;
	inset: auto -20% -30% auto;
	width: 280px;
	height: 280px;
	background: radial-gradient(circle, rgba(232,163,23,0.12) 0%, transparent 70%);
	pointer-events: none;
}
.gan-auth-panel-top { flex: 0 0 auto; }
.gan-auth-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
	margin-bottom: 48px;
}
.gan-auth-brand-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--gan-gold);
	color: #fff;
	font-weight: 800;
	font-size: 17px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.gan-auth-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}
.gan-auth-brand-text strong {
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.gan-auth-brand-text span {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: #64748B;
	text-transform: uppercase;
	margin-top: 2px;
}
.gan-auth-headline {
	margin: 0 0 14px;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.03em;
	color: #fff;
}
.gan-auth-sub {
	margin: 0 0 40px;
	font-size: 14.5px;
	line-height: 1.55;
	color: #94A3B8;
	max-width: 360px;
}
.gan-auth-features {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
}
.gan-auth-features li {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 18px;
	font-size: 14px;
	color: #CBD5E1;
}
.gan-auth-feat-icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: rgba(232,163,23,0.12);
	color: var(--gan-gold);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	flex-shrink: 0;
}
.gan-auth-steps {
	list-style: none !important;
	margin: 0;
	padding: 0;
	flex: 1;
	counter-reset: none;
}
.gan-auth-steps li {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 22px;
	list-style: none !important;
	padding-left: 0;
}
.gan-auth-steps li::marker,
.gan-auth-steps li::before {
	content: none !important;
	display: none !important;
}
.gan-auth-step-num {
	width: 28px;
	height: 28px;
	min-width: 28px;
	min-height: 28px;
	border-radius: 50%;
	background: var(--gan-gold);
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	line-height: 28px;
	display: block;
	flex-shrink: 0;
	margin-top: 2px;
	box-shadow: 0 2px 6px rgba(232,163,23,0.35);
	text-align: center;
	box-sizing: border-box;
	padding: 0;
	overflow: visible;
}
.gan-auth-steps strong {
	display: block;
	color: #F1F5F9;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 2px;
}
.gan-auth-steps span {
	display: block;
	font-size: 13px;
	color: #94A3B8;
	line-height: 1.4;
}
.gan-auth-panel-foot {
	font-size: 12px;
	color: #475569;
	margin-top: auto;
	padding-top: 24px;
}
.gan-auth-main {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 24px;
	background: #F8FAFC;
}
.gan-auth-form-card {
	width: 100%;
	max-width: 420px;
}
.gan-auth-form-card h2 {
	margin: 0 0 6px;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--gan-text);
}
.gan-auth-lead {
	margin: 0 0 28px;
	font-size: 14px;
	color: var(--gan-muted);
}
.gan-auth-form-card label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	margin: 0 0 6px;
	color: #334155;
}
.gan-auth-form-card label + .gan-input-icon,
.gan-auth-form-card label + .gan-form-2col {
	margin-bottom: 16px;
}
.gan-input-icon {
	position: relative;
}
.gan-input-icon .gan-ico,
.gan-input-icon .gan-ico-svg {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	opacity: 0.45;
	pointer-events: none;
	line-height: 1;
	color: #94A3B8;
}
.gan-input-icon .gan-ico-svg {
	width: 16px;
	height: 16px;
}
.gan-input-icon .gan-input {
	width: 100%;
	padding: 12px 14px 12px 42px;
	border: 1px solid var(--gan-border);
	border-radius: 10px;
	font-size: 14px;
	background: #fff;
	color: var(--gan-text);
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
	height: 46px;
}
.gan-input-icon .gan-input:focus {
	outline: none;
	border-color: var(--gan-gold);
	box-shadow: 0 0 0 3px rgba(232,163,23,0.15);
}
.gan-input-icon .gan-input::placeholder {
	color: #94A3B8;
}
.gan-form-2col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 16px;
	min-width: 0;
}
.gan-form-2col > div {
	min-width: 0;
}
.gan-form-2col .gan-input-icon .gan-input {
	font-size: 13px;
	padding-left: 38px;
	padding-right: 10px;
}
.gan-auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 4px 0 18px;
	font-size: 13px;
}
.gan-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #475569;
	cursor: pointer;
	margin: 0;
	font-weight: 400;
}
.gan-check input {
	width: 16px;
	height: 16px;
	accent-color: var(--gan-gold);
	margin: 0;
}
.gan-check-terms {
	margin: 4px 0 18px;
	align-items: flex-start;
	line-height: 1.45;
}
.gan-check-terms a {
	color: var(--gan-gold);
	font-weight: 600;
	text-decoration: none;
}
.gan-check-terms a:hover { text-decoration: underline; }
.gan-link {
	color: #0D9488;
	font-weight: 600;
	text-decoration: none;
	font-size: 13px;
}
.gan-link:hover { text-decoration: underline; }
.gan-btn-block {
	width: 100%;
	padding: 13px 16px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	background: var(--gan-gold);
	color: #fff;
	transition: background 0.15s;
}
.gan-btn-block:hover { background: var(--gan-gold-hover); }
.gan-btn-block:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}
.gan-auth-footer {
	margin-top: 22px;
	font-size: 13px;
	color: var(--gan-muted);
	text-align: center;
}
.gan-auth-footer .gan-link { color: #0D9488; }
#gan-reg-msg { margin-top: 12px; min-height: 0; }
.gan-error { color: var(--gan-red); font-size: 13px; margin: 0; }
.gan-success { color: var(--gan-green); font-size: 13px; margin: 0; }
.gan-auth-msg { margin-top: 14px; min-height: 0; }
.gan-auth-msg.gan-msg-ok .gan-success { font-weight: 500; }
.gan-auth-form-card .gan-btn-block { margin-top: 4px; }
.gan-auth-form-card label { margin-top: 0; }
.gan-auth-form-card .gan-form-2col label { margin-top: 0; }

/* Legacy auth fallbacks */
.gan-auth-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	width: 100%;
	padding: 24px 16px;
	background: linear-gradient(160deg, #0B1220 0%, #1a2332 50%, #0B1220 100%);
}
.gan-auth-card {
	background: #fff;
	border-radius: 16px;
	padding: 36px 32px;
	max-width: 420px;
	width: 100%;
	box-shadow: 0 24px 48px rgba(0,0,0,0.3);
}
.gan-logo-lg {
	font-weight: 700;
	font-size: 18px;
	margin-bottom: 20px;
	color: var(--gan-text);
	display: flex;
	align-items: center;
	gap: 10px;
}
.gan-logo-lg::before {
	content: "G";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--gan-gold);
	color: #fff;
	font-weight: 800;
	font-size: 15px;
}

@media (max-width: 900px) {
	.gan-auth-split { flex-direction: column; }
	.gan-auth-panel {
		width: 100%;
		max-width: none;
		padding: 28px 24px 20px;
	}
	.gan-auth-headline { font-size: 26px; }
	.gan-auth-features, .gan-auth-steps { display: none; }
	.gan-auth-panel-foot { display: none; }
	.gan-auth-main { padding: 28px 16px 40px; }
	.gan-form-2col { grid-template-columns: 1fr; }
}

.gan-list { list-style: none; padding: 0; margin: 0; }
.gan-list li {
	padding: 8px 0;
	border-bottom: 1px solid #F1F5F9;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.gan-list li:last-child { border-bottom: none; }

/* Code block */
.gan-code-block {
	background: var(--gan-navy);
	color: #E2E8F0;
	padding: 14px 16px;
	border-radius: 10px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	word-break: break-all;
	line-height: 1.5;
	margin: 10px 0;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
	.gan-grid-2, .gan-grid-bottom {
		grid-template-columns: 1fr;
	}
	.gan-stats {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.gan-app { flex-direction: column; }
	.gan-topbar { display: flex; }
	.gan-shell { margin-left: 0; }
	.gan-top-header {
		padding: 16px 16px 0;
	}
	.gan-main {
		padding: 16px 16px 36px;
	}
	.gan-stats {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	.gan-stat-card .value { font-size: 24px; }
	.gan-greeting h1 { font-size: 20px; }
	.gan-search { display: none; }
	.gan-campaign-grid {
		grid-template-columns: 1fr;
	}
	.gan-form-row {
		flex-direction: column;
		align-items: stretch;
	}
	.gan-form-row .gan-input,
	.gan-form-row .gan-btn {
		max-width: 100%;
		width: 100%;
	}
	.gan-auth-card { padding: 28px 20px; }
	.gan-filters { flex-direction: column; align-items: stretch; }
	.gan-filters select, .gan-filters .gan-input {
		width: 100%;
		min-width: 0;
	}
}

@media (max-width: 380px) {
	.gan-main { padding: 14px 12px 32px; }
	.gan-stat-card { padding: 14px 16px; }
	.gan-stat-card .value { font-size: 22px; }
}


/* Auth page body clean slate */
body.gan-fullscreen {
	margin: 0 !important;
	padding: 0 !important;
	background: #F8FAFC !important;
}
body.gan-fullscreen .gan-auth-split {
	min-height: 100vh;
}


/* Cloudflare Turnstile on auth forms */
.gan-turnstile-wrap {
	margin: 4px 0 16px;
	min-height: 65px;
}
.gan-turnstile-wrap .cf-turnstile {
	margin: 0;
}


/* Ensure primary CTAs keep high-contrast text */
.gan-btn-primary,
a.gan-btn-primary,
button.gan-btn-primary {
	color: #fff !important;
}
.gan-btn-primary:hover,
a.gan-btn-primary:hover {
	color: #fff !important;
}
/* Secondary links on gold backgrounds should not inherit pale text */
a.gan-btn.gan-btn-primary {
	text-decoration: none;
}

button.gan-tab {
	background: transparent;
	border: none;
	cursor: pointer;
	font: inherit;
}


/* Advertiser / portal form grid — labels above inputs, aligned */
.gan-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 18px;
	align-items: start;
}
.gan-form-grid .gan-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.gan-form-grid .gan-field-full {
	grid-column: 1 / -1;
}
.gan-form-grid label {
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin: 0;
}
.gan-form-grid .gan-input,
.gan-form-grid input[type="text"],
.gan-form-grid input[type="url"],
.gan-form-grid input[type="number"],
.gan-form-grid input[type="file"],
.gan-form-grid select,
.gan-form-grid textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.gan-form-grid .gan-field-hint {
	font-size: 12px;
	color: #94A3B8;
}
@media (max-width: 640px) {
	.gan-form-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   Create campaign layout + stacked forms (non-stretchy)
   ============================================================ */
.gan-create-layout {
	display: grid;
	grid-template-columns: minmax(280px, 1fr) minmax(320px, 480px);
	gap: 20px;
	align-items: start;
	max-width: 1100px;
}
.gan-create-info {
	min-width: 0;
}
.gan-create-form-card {
	min-width: 0;
	max-width: 480px;
	width: 100%;
}
.gan-bullet-list {
	margin: 0;
	padding-left: 18px;
	color: #475569;
	font-size: 14px;
	line-height: 1.6;
}
.gan-bullet-list li { margin-bottom: 8px; }
.gan-meta-line {
	margin: 14px 0 0;
	font-size: 13px;
	color: #64748B;
}
.gan-inline-warn {
	margin-top: 12px;
	padding: 10px 12px;
	background: #FFFBEB;
	border: 1px solid #FDE68A;
	border-radius: 8px;
	font-size: 13px;
	color: #92400E;
}
.gan-form-stacked {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.gan-form-stacked .gan-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.gan-form-stacked .gan-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.gan-form-stacked label {
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin: 0;
}
.gan-form-stacked .gan-input,
.gan-form-stacked input[type="text"],
.gan-form-stacked input[type="url"],
.gan-form-stacked input[type="number"],
.gan-form-stacked input[type="file"],
.gan-form-stacked select,
.gan-form-stacked textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-size: 16px; /* prevents iOS focus zoom */
}
.gan-form-stacked .gan-field-hint {
	font-size: 12px;
	color: #94A3B8;
}
.gan-form-stacked .gan-field-hint-inline {
	font-weight: 400;
	color: #94A3B8;
	font-size: 12px;
}
.gan-form-stacked .gan-field-actions {
	padding-top: 4px;
}
.gan-banner-preview {
	margin-top: 8px;
}
.gan-banner-preview img {
	max-width: 100%;
	max-height: 160px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	display: block;
}
.gan-banner-preview p {
	font-size: 12px;
	margin: 6px 0 0;
	color: #64748B;
}
.gan-alert-card { margin-bottom: 12px; }

/* Global inputs: 16px min to stop iOS zoom on focus */
.gan-app input.gan-input,
.gan-app select.gan-input,
.gan-app textarea.gan-input,
.gan-app input[type="text"],
.gan-app input[type="email"],
.gan-app input[type="password"],
.gan-app input[type="url"],
.gan-app input[type="number"],
.gan-app input[type="search"],
.gan-app select,
.gan-app textarea {
	font-size: 16px;
}

/* Prevent horizontal overflow / accidental zoom feel */
.gan-app {
	overflow-x: hidden;
	width: 100%;
	max-width: 100vw;
}
.gan-shell {
	min-width: 0;
	max-width: 100%;
}
.gan-main {
	min-width: 0;
}
.gan-top-header {
	flex-wrap: wrap;
	gap: 12px;
}
.gan-top-actions {
	flex-wrap: wrap;
	gap: 8px;
}

/* Tablet */
@media (max-width: 1024px) {
	.gan-create-layout {
		grid-template-columns: 1fr;
		max-width: 640px;
	}
	.gan-create-form-card {
		max-width: 100%;
	}
	.gan-stats {
		grid-template-columns: repeat(2, 1fr);
	}
	.gan-top-header {
		padding: 18px 20px 0;
	}
	.gan-main {
		padding: 18px 20px 40px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.gan-create-layout {
		grid-template-columns: 1fr;
		max-width: 100%;
	}
	.gan-form-stacked .gan-field-row {
		grid-template-columns: 1fr;
	}
	.gan-form-grid {
		grid-template-columns: 1fr;
	}
	.gan-top-actions .gan-user-pill span {
		display: none;
	}
	.gan-mini-table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.gan-card-header {
		flex-wrap: wrap;
		gap: 8px;
	}
	.gan-greeting h1 {
		font-size: 1.35rem;
		line-height: 1.25;
	}
	.gan-overlay.open,
	.gan-app.gan-nav-open .gan-overlay {
		display: block;
	}
}

@media (max-width: 480px) {
	.gan-stats {
		grid-template-columns: 1fr;
	}
	.gan-stat-card .value {
		font-size: 22px;
	}
	.gan-btn {
		width: 100%;
		justify-content: center;
	}
	.gan-field-actions .gan-btn {
		width: 100%;
	}
}


/* Spacious advertiser create form */
.gan-form-spacious {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.gan-form-section {
	padding: 4px 0 22px;
	margin-bottom: 8px;
	border-bottom: 1px solid #F1F5F9;
}
.gan-form-section:last-of-type {
	border-bottom: none;
}
.gan-form-section-title {
	margin: 0 0 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #94A3B8;
}
.gan-form-spacious .gan-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 18px;
	min-width: 0;
}
.gan-form-spacious .gan-field:last-child {
	margin-bottom: 0;
}
.gan-form-spacious label {
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin: 0;
	line-height: 1.3;
}
.gan-form-spacious .gan-input,
.gan-form-spacious input[type="text"],
.gan-form-spacious input[type="url"],
.gan-form-spacious input[type="number"],
.gan-form-spacious input[type="file"],
.gan-form-spacious select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-size: 16px;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid #E2E8F0;
	background: #fff;
	line-height: 1.4;
}
.gan-form-spacious .gan-input-sm {
	max-width: 200px;
}
.gan-form-spacious .gan-field-hint {
	font-size: 12px;
	color: #94A3B8;
	line-height: 1.4;
}
.gan-form-spacious .gan-field-hint-inline {
	font-weight: 400;
	color: #94A3B8;
	font-size: 12px;
}
.gan-form-actions {
	padding-top: 8px;
	margin-top: 4px;
}
.gan-btn-lg {
	padding: 12px 22px;
	font-size: 15px;
	min-height: 48px;
}
.gan-create-form-card {
	max-width: 440px;
	padding: 22px 24px 28px;
}
.gan-create-layout {
	gap: 28px;
	align-items: start;
}
.gan-create-info {
	padding: 22px 24px;
}
.gan-inline-ok {
	margin-top: 12px;
	padding: 10px 12px;
	background: #ECFDF5;
	border: 1px solid #A7F3D0;
	border-radius: 8px;
	font-size: 13px;
	color: #065F46;
}
.gan-bullet-list li {
	margin-bottom: 12px;
}
@media (max-width: 1024px) {
	.gan-create-form-card { max-width: 100%; }
}



	.gan-top-header { flex-direction: column; align-items: flex-start; }
}


/* ============================================================
   Mobile layout + off-canvas sidebar (final, high priority)
   ============================================================ */
@media (max-width: 768px) {
	.gan-app {
		display: block !important;
		width: 100% !important;
		max-width: 100vw !important;
		overflow-x: hidden;
		position: relative;
	}

	.gan-topbar {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		position: sticky;
		top: 0;
		z-index: 100;
		width: 100%;
		padding: 12px 14px;
		background: var(--gan-navy, #0B1220);
		color: #fff;
	}

	.gan-menu-toggle {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
		background: transparent !important;
		border: 0 !important;
		color: #fff !important;
		font-size: 24px;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		position: relative;
		z-index: 101;
	}

	.gan-sidebar {
		position: fixed !important;
		top: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		width: 280px !important;
		max-width: 88vw !important;
		min-width: 0 !important;
		height: 100% !important;
		max-height: 100vh !important;
		margin: 0 !important;
		z-index: 10000 !important;
		-webkit-transform: translate3d(-100%, 0, 0) !important;
		transform: translate3d(-100%, 0, 0) !important;
		-webkit-transition: -webkit-transform 0.22s ease !important;
		transition: transform 0.22s ease !important;
		visibility: visible !important;
		pointer-events: auto !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch;
		box-shadow: 8px 0 32px rgba(0,0,0,0.35);
		will-change: transform;
	}
	.gan-sidebar.open {
		-webkit-transform: translate3d(0, 0, 0) !important;
		transform: translate3d(0, 0, 0) !important;
	}

	.gan-overlay {
		display: none !important;
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		width: 100% !important;
		height: 100% !important;
		background: rgba(11, 18, 32, 0.55) !important;
		z-index: 9990 !important;
		margin: 0 !important;
		border: 0 !important;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}
	.gan-overlay.open {
		display: block !important;
	}

	.gan-shell {
		margin-left: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
	}

	.gan-main {
		padding: 14px 12px 32px !important;
		min-width: 0 !important;
	}

	.gan-top-header {
		padding: 14px 12px 0 !important;
		flex-wrap: wrap;
		gap: 10px;
	}

	.gan-grid-bottom,
	.gan-grid-2 {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 14px !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	.gan-grid-bottom > .gan-card,
	.gan-grid-2 > .gan-card {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		overflow: hidden;
	}

	.gan-mini-table,
	.gan-table-wrap {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch;
	}
	.gan-mini-table table,
	table.gan-mini-table {
		width: 100%;
		min-width: 420px;
	}

	.gan-quick-actions {
		display: flex !important;
		flex-direction: column !important;
		gap: 10px !important;
		width: 100%;
	}
	.gan-quick-actions a {
		width: 100% !important;
		box-sizing: border-box;
		justify-content: flex-start !important;
	}

	.gan-stats {
		grid-template-columns: 1fr 1fr !important;
		gap: 10px !important;
	}

	body.gan-nav-open,
	html.gan-nav-open {
		overflow: hidden !important;
		touch-action: none;
	}
}

@media (max-width: 480px) {
	.gan-stats {
		grid-template-columns: 1fr !important;
	}
	.gan-stat-card .value {
		font-size: 22px;
	}
}


/* Advertiser dashboard responsive */
.gan-stats-4 {
	grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
	.gan-stats-4 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}
@media (max-width: 768px) {
	.gan-stats-4 {
		grid-template-columns: 1fr 1fr !important;
	}
	.gan-adv-dash-grid {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 14px !important;
		width: 100% !important;
	}
	.gan-adv-dash-grid > .gan-card {
		min-width: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	.gan-top-actions {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		width: 100%;
	}
	.gan-top-actions .gan-btn {
		flex: 1 1 auto;
	}
}
@media (max-width: 480px) {
	.gan-stats-4 {
		grid-template-columns: 1fr !important;
	}
}
