/* ============================================================
   Demo Shell Layout
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
	--sidebar-w: 220px;
	--banner-h:  52px;
	--sidebar-bg:#111827;
	--sidebar-text:#9ca3af;
	--sidebar-active-bg:#4361EE;
	--sidebar-active-text:#fff;
	--sidebar-hover-bg:rgba(255,255,255,.06);
	--body-bg:#f4f6fb;
	--content-max:1140px;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var(--body-bg);
	color: #111827;
	min-height: 100vh;
}

/* ---- Demo banner ---- */
.demo-banner {
	position: fixed;
	top: 0; left: 0; right: 0;
	height: var(--banner-h);
	background: linear-gradient(90deg, #4361EE 0%, #7209B7 100%);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 1.5rem;
	z-index: 200;
	gap: 1rem;
}
.demo-banner-left {
	display: flex;
	align-items: center;
	gap: .625rem;
	color: rgba(255,255,255,.9);
	font-size: .875rem;
}
.demo-pill {
	background: rgba(255,255,255,.2);
	color: #fff;
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: .25rem .625rem;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,.25);
}
.demo-banner-cta {
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	background: #fff;
	color: #4361EE;
	font-weight: 700;
	font-size: .875rem;
	padding: .5rem 1.125rem;
	border-radius: 8px;
	text-decoration: none;
	transition: opacity .15s;
	white-space: nowrap;
}
.demo-banner-cta:hover { opacity: .9; }

/* ---- App shell ---- */
.demo-shell {
	display: flex;
	padding-top: var(--banner-h);
	min-height: 100vh;
}

/* ---- Sidebar ---- */
.demo-sidebar {
	width: var(--sidebar-w);
	background: var(--sidebar-bg);
	min-height: calc(100vh - var(--banner-h));
	display: flex;
	flex-direction: column;
	position: fixed;
	top: var(--banner-h);
	left: 0;
	bottom: 0;
	overflow-y: auto;
}
.demo-sidebar-logo {
	padding: 1.375rem 1.25rem 1rem;
	font-size: 1.125rem;
	font-weight: 800;
	color: #fff;
	letter-spacing: -.01em;
	border-bottom: 1px solid rgba(255,255,255,.07);
	margin-bottom: .5rem;
}
.demo-sidebar-logo span { opacity: .5; font-weight: 400; font-size: .75rem; display: block; margin-top: .125rem; }
.demo-nav { flex: 1; padding: .25rem 0; }
.demo-nav a {
	display: flex;
	align-items: center;
	gap: .625rem;
	padding: .625rem 1.25rem;
	color: var(--sidebar-text);
	text-decoration: none;
	font-size: .875rem;
	border-radius: 0;
	transition: background .12s, color .12s;
}
.demo-nav a:hover { background: var(--sidebar-hover-bg); color: #e5e7eb; }
.demo-nav a.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); font-weight: 600; }
.demo-nav-icon { font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }

.demo-sidebar-footer {
	padding: 1rem 1.25rem;
	border-top: 1px solid rgba(255,255,255,.07);
}
.demo-sidebar-footer a {
	display: block;
	background: #4361EE;
	color: #fff;
	text-align: center;
	padding: .625rem;
	border-radius: 8px;
	font-size: .875rem;
	font-weight: 700;
	text-decoration: none;
	transition: opacity .15s;
}
.demo-sidebar-footer a:hover { opacity: .88; }
.demo-sidebar-footer p {
	font-size: .75rem;
	color: #4b5563;
	text-align: center;
	margin-top: .5rem;
}

/* ---- Main content ---- */
.demo-main {
	margin-left: var(--sidebar-w);
	flex: 1;
	padding: 2rem;
	max-width: calc(var(--content-max) + var(--sidebar-w));
	min-width: 0;
}

/* ---- Demo action modal ---- */
.demo-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.45);
	z-index: 500;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: demo-fade-in .15s ease;
}
@keyframes demo-fade-in { from { opacity:0; } to { opacity:1; } }
.demo-modal {
	background: #fff;
	border-radius: 16px;
	padding: 2.5rem;
	max-width: 420px;
	width: calc(100% - 2rem);
	text-align: center;
	box-shadow: 0 24px 64px rgba(0,0,0,.18);
	animation: demo-modal-in .2s cubic-bezier(.22,.68,0,1.2);
}
@keyframes demo-modal-in { from { transform:scale(.9); opacity:0; } to { transform:scale(1); opacity:1; } }
.demo-modal-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.demo-modal h3 { font-size: 1.25rem; color: #111827; margin-bottom: .625rem; }
.demo-modal p { color: #6b7280; font-size: .9375rem; line-height: 1.6; margin-bottom: 1.5rem; }
.demo-modal-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.demo-modal-activate {
	background: linear-gradient(135deg, #4361EE, #7209B7);
	color: #fff;
	border: none;
	padding: .75rem 1.5rem;
	border-radius: 8px;
	font-size: .9375rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: opacity .15s;
}
.demo-modal-activate:hover { opacity: .9; }
.demo-modal-dismiss {
	background: none;
	border: 1.5px solid #e5e7eb;
	color: #6b7280;
	padding: .75rem 1.25rem;
	border-radius: 8px;
	font-size: .875rem;
	cursor: pointer;
	transition: border-color .12s;
}
.demo-modal-dismiss:hover { border-color: #9ca3af; }

/* ---- Tour button ---- */
.demo-tour-btn {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	background: linear-gradient(135deg, #4361EE, #7209B7);
	color: #fff;
	border: none;
	padding: .75rem 1.25rem;
	border-radius: 999px;
	font-size: .875rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(67,97,238,.35);
	display: flex;
	align-items: center;
	gap: .5rem;
	z-index: 100;
	transition: transform .15s, box-shadow .15s;
}
.demo-tour-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(67,97,238,.45); }

/* ---- Shepherd.js overrides ---- */
.shepherd-has-cancel-icon .shepherd-cancel-icon { color: #9ca3af; }
.shepherd-element { border-radius: 12px !important; box-shadow: 0 16px 48px rgba(0,0,0,.2) !important; }
.shepherd-header { border-radius: 12px 12px 0 0 !important; background: linear-gradient(135deg, #4361EE, #7209B7) !important; padding: 1rem 1.25rem !important; }
.shepherd-title { color: #fff !important; font-weight: 700 !important; font-size: 1rem !important; }
.shepherd-cancel-icon { color: rgba(255,255,255,.7) !important; }
.shepherd-cancel-icon:hover { color: #fff !important; }
.shepherd-text { padding: 1.25rem !important; font-size: .9375rem !important; line-height: 1.6 !important; color: #374151 !important; }
.shepherd-footer { padding: .75rem 1.25rem 1.25rem !important; gap: .625rem !important; }
.shepherd-button { border-radius: 7px !important; font-weight: 600 !important; font-size: .875rem !important; }
.shepherd-button-primary { background: #4361EE !important; }
.shepherd-button-secondary { background: #f3f4f6 !important; color: #374151 !important; }

/* ---- Breakdown bar shim (demo uses fill-child pattern) ---- */
.ree-breakdown-bar {
	height: 8px;
	background: #f3f4f6;
	border-radius: 999px;
	overflow: hidden;
}
.ree-breakdown-fill {
	height: 100%;
	border-radius: 999px;
	transition: width .6s ease;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
	:root { --sidebar-w: 0px; }
	.demo-sidebar { display: none; }
	.demo-main { margin-left: 0; padding: 1.25rem; }
	.demo-banner-left span { display: none; }
}
@media (max-width: 480px) {
	.demo-banner { padding: 0 1rem; }
	.demo-banner-cta { font-size: .8125rem; padding: .4375rem .875rem; }
}
