/* Design tokens mirrored from the iOS app (A341/DesignSystem) */
:root {
	--brand-l1: #d0eee3;
	--brand-n1: #12a873;
	--brand-d1: #0c6d4b;
	--brand-l3: #ffe8cc;
	--brand-n3: #ff8a00;
	--brand-d3: #a65900;
	--brand-l4: #d7e1ff;
	--brand-n4: #356bff;
	--brand-d4: #2346a6;
	--fs-background: #f7f5eb;          /* AppColors.pageBackground */
	--fs-section: #e0e3f2;             /* AppColors.sectionBackground */
	--fs-title: rgba(0, 0, 0, .90);    /* AppColors.title */
	--fs-body: rgba(0, 0, 0, .72);     /* AppColors.body */
	--fs-border: rgba(0, 0, 0, .38);   /* AppColors.border */
	--fs-border-soft: rgba(0, 0, 0, .14);
	--fs-orange: #fa9f1f;              /* AppColors.accentOrange */
	--fs-green: #26873b;               /* AppColors.success */
	--fs-approve: #2b8a38;
	--fs-reject: #db2b2b;
	--fs-confirmed: #edfaed;           /* AppColors.confirmedRideCard */
	--fs-light-blue: #e6f0ff;          /* AppColors.lightBlueCard */
	--fs-selected-segment: #78809a;    /* AppColors.selectedSegment */
	--fs-ink: var(--fs-title);
	--fs-muted: var(--fs-body);
	--fs-radius-card: 22px;            /* AppTheme.cardCornerRadius */
	--fs-radius-option: 26px;
	--fs-radius-tile: 16px;
	--fs-radius-control: 10px;         /* AppTheme.controlCornerRadius */
	--fs-control-height: 48px;         /* Spacing.controlHeight */
	--fs-glass-fill: rgba(255, 255, 255, .55);
	--fs-glass-stroke: rgba(255, 255, 255, .52);
	--fs-glass-shadow: 0 10px 30px rgba(27, 33, 30, .08), 0 1px 2px rgba(27, 33, 30, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fs-background); color: var(--fs-title); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; }
@media (max-width: 639px) {
	#app { width: 100%; max-width: 360px; min-height: 100vh; margin-inline: auto; }
}
a { color: var(--fs-title); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0; }            /* AppFonts.pageTitle */
h2 { font-size: 26px; font-weight: 500; letter-spacing: -.01em; margin: 0; }            /* AppFonts.sectionTitle */
h3 { font-size: 22px; font-weight: 700; margin: 0; }                                     /* AppFonts.cardTitle */
p { line-height: 1.5; margin: 0 0 .6rem; color: var(--fs-body); }
small, .fs-small { font-size: 12px; color: var(--fs-body); }
strong { color: var(--fs-title); }
button, input, select, textarea { font: inherit; }
button, a, input, select { touch-action: manipulation; }
:focus-visible { outline: 3px solid rgba(250, 159, 31, .55); outline-offset: 3px; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* Glass surfaces (iOS 26 glass look with translucent fallback) */
.fs-glass, .fs-card, .fs-tabbar, .fs-wizard-header, .fs-modal {
	background: var(--fs-glass-fill);
	-webkit-backdrop-filter: blur(22px) saturate(1.35);
	backdrop-filter: blur(22px) saturate(1.35);
	box-shadow: var(--fs-glass-shadow), inset 0 0 0 1px var(--fs-glass-stroke);
	border: 0;
}

/* Layout */
.fs-app { min-height: 100vh; }
.fs-brand-header { max-width: 1060px; margin: auto; padding: 22px 24px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.fs-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.fs-brand-logo { height: 44px; width: auto; display: block; }
.fs-brand-logo-hero { height: 120px; width: auto; display: block; margin: 0 auto 6px; }
.fs-tagline { color: var(--fs-body); font-size: 16px; }
.fs-main { max-width: 980px; margin: 0 auto; padding: 18px 24px 140px; }

/* Page header (iOS: title left, "?" glass circle right) */
.fs-page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.fs-page-header h1, .fs-page-header > div { flex: 1; min-width: 0; }
.fs-page-header h1 { margin-bottom: 0; }
.fs-page-header .fs-actions { margin-left: auto; }
.fs-page-header p { margin: 0; }
.fs-eyebrow { display: none; }

/* Wizard header (PublishWizardHeader) */
.fs-wizard-header { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--fs-radius-card); margin-bottom: 18px; }
.fs-wizard-header h1 { flex: 1; font-size: 30px; }
.fs-circle-button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--fs-orange); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; flex: 0 0 auto; transition: opacity .15s, transform .15s; }
.fs-circle-button:hover { transform: scale(1.04); }
.fs-circle-button:disabled { opacity: .45; }
.fs-circle-button.approve { background: var(--fs-approve); }
.fs-circle-button.reject { background: var(--fs-reject); }
.fs-circle-button.small { width: 36px; height: 36px; }

/* Cards */
.fs-card { border-radius: var(--fs-radius-card); padding: 16px; color: var(--fs-title); }
.fs-section { background: var(--fs-section); }
.fs-confirmed { background: var(--fs-confirmed); }
.fs-light-blue { background: var(--fs-light-blue); }
.fs-card.fs-section, .fs-card.fs-confirmed, .fs-card.fs-light-blue { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 0 0 1.5px var(--fs-border-soft); }
.fs-tile { border-radius: var(--fs-radius-tile); padding: 14px; background: var(--fs-section); box-shadow: inset 0 0 0 1px rgba(255,255,255,.52); color: var(--fs-title); }
.fs-tile.fs-confirmed { background: var(--fs-confirmed); }
.fs-tile-link { display: block; color: inherit; text-decoration: none; }
.fs-tile-link:hover { opacity: .9; }
.fs-stack { display: grid; gap: 14px; }
.fs-stack-lg { display: grid; gap: 24px; }
.fs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fs-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.fs-actions.fs-actions-fill > * { flex: 1 1 0; }
.fs-spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fs-divider { border: 0; border-top: 1px solid rgba(0, 0, 0, .28); margin: 6px 0 4px; }

/* Option cards (PublishWizard01Screen) */
.fs-option { display: flex; align-items: flex-start; gap: 16px; text-align: left; width: 100%; padding: 20px; border-radius: var(--fs-radius-option); transition: transform .15s, background .15s; cursor: pointer; }
.fs-option:hover { background: rgba(255, 255, 255, .75); transform: translateY(-1px); }
.fs-option .fs-feature-icon { font-size: 22px; font-weight: 600; color: var(--fs-title); width: 32px; height: 36px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.fs-option h2, .fs-option h3 { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.fs-option p { margin: 0; }
.fs-feature-icon { font-size: 22px; color: var(--fs-title); }

/* Landing (LandingScreen) */
.fs-hero { max-width: 760px; margin: 28px auto 0; text-align: center; }
.fs-hero h1 { font-size: 30px; }
.fs-hero .fs-sub { font-size: 16px; color: rgba(0, 0, 0, .70); margin: 0; }
.fs-hero .fs-actions { justify-content: center; margin-top: 14px; }
.fs-landing { max-width: 760px; margin: 0 auto; display: grid; gap: 24px; padding-top: 28px; }
.fs-steps { display: grid; gap: 16px; }
.fs-step { display: flex; align-items: flex-start; gap: 16px; }
.fs-step-number { width: 40px; height: 40px; border-radius: 14px; background: var(--fs-title); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: 0 0 auto; }
.fs-step strong { display: block; font-weight: 600; }
.fs-step span { color: rgba(0, 0, 0, .49); }
.fs-fare-card { background: var(--fs-light-blue); border-radius: var(--fs-radius-card); padding: 16px; box-shadow: inset 0 0 0 1.5px var(--fs-border); }
.fs-fare-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fs-fare { text-align: center; }
.fs-fare strong { display: block; font-size: 26px; font-weight: 500; }
.fs-fare small { color: rgba(0, 0, 0, .49); }
.fs-footer { text-align: center; color: rgba(0, 0, 0, .47); padding: 16px 0 0; }

/* Auth (SignIn / SignUp) */
.fs-auth { max-width: 480px; margin: 0 auto; display: grid; gap: 16px; }
.fs-auth > .fs-icon-button { justify-self: start; }
.fs-auth form, .fs-auth .fs-stack form { display: grid; gap: 16px; }
.fs-auth .fs-inline-end { display: flex; justify-content: flex-end; margin-top: -2px; }
.fs-auth .fs-inline-end a, .fs-auth .fs-inline-end button { color: var(--fs-border); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; }
.fs-prompt { display: flex; justify-content: center; gap: 14px; align-items: center; color: var(--fs-body); }
.fs-prompt a { font-weight: 600; }
.fs-external { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.fs-cta { width: 100%; min-height: 52px; border-radius: 20px; background: var(--fs-orange); color: #fff; border: 0; font-weight: 600; font-size: 16px; }
.fs-cta:hover { background: #e98f12; }
.fs-icon-button { background: var(--fs-glass-fill); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 0; box-shadow: inset 0 0 0 1px var(--fs-glass-stroke), 0 2px 8px rgba(0,0,0,.06); border-radius: 50%; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: rgba(0, 0, 0, .78); font-weight: 600; text-decoration: none; }
.fs-icon-button:hover { background: rgba(255, 255, 255, .8); color: var(--fs-title); }

/* Fields (AppTextField: 48px, 10px radius, 2px border) */
.fs-field input, .fs-field select, .fs-field textarea { border-radius: var(--fs-radius-control); padding: 0 24px; border: 2px solid var(--fs-border); background-color: var(--fs-background); min-height: var(--fs-control-height); color: var(--fs-title); box-shadow: none; }
.form-label, .fs-field label, .fs-field > span:first-child { font-weight: 600; margin-bottom: 6px; color: var(--fs-title); }
.fs-field { display: grid; gap: 6px; margin-bottom: 0; }
.fs-field input, .fs-field select { width: 100%; }
.fs-field-note { font-size: 12px; color: var(--fs-body); }
.fs-password-wrap { position: relative; }
.fs-password-wrap input { padding-right: 56px; }
.fs-password-wrap .fs-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: transparent; color: var(--fs-title); }

/* Badges & pills */
.fs-pill { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; background: rgba(0, 0, 0, .06); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--fs-body); }
.fs-pill.approved, .fs-pill.confirmed { background: #d2e9d1; color: #175426; }
.fs-pill.pending { background: #ffebc4; color: #734a06; }
.fs-pill.available { background: #eeeee6; color: #555d51; }
.fs-pill.cancelled { background: #f8dcda; color: #8b3028; }
.fs-meta { display: flex; align-items: center; gap: 8px; color: var(--fs-body); }
.fs-meta .fs-pill { min-width: 72px; justify-content: center; }
.fs-ride-tile { display: grid; gap: 6px; padding: 14px; border-radius: var(--fs-radius-tile); background: var(--fs-section); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.fs-ride-tile:hover, .fs-ride-tile:focus-visible { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.08); outline: none; }
.fs-ride-tile.fs-confirmed { background: var(--fs-confirmed); }
.fs-ride-tile h2 { font-size: 22px; font-weight: 700; margin: 0; }
.fs-ride-tile p { margin: 0; }
.fs-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.08); color: var(--fs-body); font-size: 12px; font-weight: 600; white-space: nowrap; }
.fs-ride-tile .fs-rider { margin-top: 4px; padding: 10px 0 0; border-top: 1px solid var(--fs-border-soft); border-bottom: 0; }
.fs-ride-tile .fs-circle-button { width: 56px; height: 56px; font-size: 20px; }
.fs-status { font-size: 16px; font-weight: 600; }
.fs-status.confirmed { color: var(--fs-green); }
.fs-status.pending { color: #b9741c; }

/* Tab bar (iOS TabView with glass) */
.fs-tabbar { position: fixed; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(4, 1fr); width: min(560px, calc(100% - 28px)); border-radius: 999px; padding: 6px; z-index: 100; }
.fs-tab { position: relative; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: rgba(0, 0, 0, .55); text-decoration: none; border-radius: 999px; font-size: 11px; font-weight: 600; transition: background .15s, color .15s; }
.fs-tab > .bi { font-size: 22px; line-height: 1; }
.fs-tab:hover { color: var(--fs-title); }
.fs-tab.active { color: var(--fs-title); background: rgba(255, 255, 255, .75); box-shadow: inset 0 0 0 1px var(--fs-glass-stroke); }
.fs-tab .atelier-notification-badge { top: 6px; right: 14px; background: var(--fs-reject); border-radius: 999px; font-size: 11px; padding: 2px 6px; }

/* Empty / loading / messages */
.fs-empty { text-align: center; padding: 40px 24px; }
.fs-empty .fs-actions { justify-content: center; }
.fs-empty h2, .fs-empty h3 { margin-top: 16px; }
.fs-empty p { max-width: 440px; margin: 10px auto; }
.fs-empty .fs-feature-icon { font-size: 40px; color: var(--fs-border); }
.fs-loading { padding: 40px; text-align: center; color: var(--fs-body); }
.fs-error { background: #fde9e6; color: #7a2a21; padding: 14px 16px; border-radius: var(--fs-radius-tile); margin: 0 0 14px; border: 0; }
.fs-success { background: #e1eed9; color: #26532b; padding: 14px 16px; border-radius: var(--fs-radius-tile); margin: 0 0 14px; border: 0; }
.fs-info { background: var(--fs-section); color: var(--fs-title); padding: 14px 16px; border-radius: var(--fs-radius-tile); margin: 0 0 14px; }
.validation-message, .invalid { color: #a62e25; font-size: 12px; }

/* Modal / popup (AppErrorPopup / InformationMessageOverlay) */
.fs-modal-backdrop { position: fixed; inset: 0; background: rgba(23, 33, 24, .40); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1100; }
.fs-modal { width: min(540px, 100%); max-height: 90vh; overflow: auto; border-radius: 24px; padding: 24px; background: rgba(247, 245, 235, .92); }
.fs-modal h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
@media (max-width: 639px) {
	.fs-tabbar { width: min(374px, calc(100% - 28px)); }
	.fs-modal { width: min(378px, 100%); }
}

/* Riders & route */
.fs-rider { padding: 14px 0; border-bottom: 1px solid var(--fs-border-soft); }
.fs-rider:last-child { border-bottom: 0; }
.fs-rider-name { border: 0; padding: 0; background: transparent; color: var(--fs-title); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.fs-route { border-left: 2px dashed var(--fs-border); padding-left: 18px; margin: 14px 6px; }
.fs-route p { margin: 0 0 14px; }
.fs-route p:last-child { margin: 0; }
.fs-map { height: 340px; border-radius: 18px; overflow: hidden; background: #e3e6d9; }

/* Wallet (WalletScreen) */
.fs-balance-card { background: var(--fs-light-blue); border-radius: 24px; padding: 24px; text-align: center; display: grid; gap: 6px; }
.fs-balance-card h2 { font-size: 26px; font-weight: 500; }
.fs-balance { font-size: 56px; font-weight: 700; line-height: 1.1; letter-spacing: -.04em; color: var(--fs-title); }
.fs-transaction { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--fs-section); border-radius: 18px; }
.fs-transaction strong { display: block; font-weight: 600; }
.fs-transaction .fs-amount { font-weight: 600; white-space: nowrap; }
.fs-amount.positive { color: var(--fs-green); }
.fs-amount.negative { color: var(--fs-reject); }
.fs-package { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: var(--fs-radius-tile); background: var(--fs-section); padding: 16px; text-align: left; color: var(--fs-title); box-shadow: inset 0 0 0 1px transparent; }
.fs-package:hover { background: #d6dae9; }
.fs-package.selected { background: rgba(0, 0, 0, .22); color: var(--fs-title); box-shadow: inset 0 0 0 1.5px var(--fs-border); }
.fs-package strong { font-weight: 600; margin-left: auto; }
.fs-package > .bi { font-size: 20px; color: var(--fs-title); }
.fs-topup-btn { width: 100%; height: 56px; border-radius: 20px !important; font-size: 18px; }
.fs-small { display: block; font-size: 13px; color: var(--fs-body); }
.fs-transaction > div { display: grid; gap: 2px; }

/* Segmented control (iOS Picker segmented) */
.fs-segmented { display: inline-flex; background: rgba(0, 0, 0, .06); border-radius: var(--fs-radius-control); padding: 3px; gap: 2px; }
.fs-segmented button { border: 0; background: transparent; border-radius: 8px; padding: 6px 14px; font-weight: 600; color: var(--fs-body); min-height: 34px; }
.fs-segmented button.active { background: var(--fs-selected-segment); color: #fff; }

/* Stepper (publish progress) */
.fs-stepper { display: flex; gap: 8px; margin: 0 0 18px; list-style: none; padding: 0; color: var(--fs-body); font-size: 12px; font-weight: 600; }
.fs-join-tile { width: 100%; text-align: left; display: grid; gap: 4px; background: var(--fs-light-blue); cursor: pointer; }
.fs-join-tile strong { font-size: 22px; color: var(--fs-title); }
.fs-join-tile span { color: var(--fs-body); }
.fs-stepper .active { color: var(--fs-title); }

/* Accessibility helpers */
.fs-skip-link { position: fixed; top: -100px; left: 16px; background: white; padding: 12px; z-index: 2000; }
.fs-skip-link:focus { top: 12px; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; background: #fde9e6; padding: 16px; width: 100%; z-index: 2100; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

@media (max-width: 640px) {
	.fs-brand-header { padding: 16px 18px 0; }
	.fs-tagline { display: none; }
	.fs-main { padding: 16px 16px 125px; }
	.fs-grid { grid-template-columns: 1fr; }
	.fs-external { grid-template-columns: 1fr; }
	.fs-map { height: 280px; }
	.fs-balance { font-size: 48px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
