:root {
	--bg: #0a0c10;
	--surface: #111318;
	--surface2: #181b22;
	--border: rgba(255, 255, 255, .07);
	--border-bright: rgba(255, 255, 255, .14);
	--text: #e8eaf0;
	--text-dim: #6b7080;
	--text-muted: #3a3f4e;
	--accent: #e8c44a;
	--accent-glow: rgba(232, 196, 74, .15);
	--red: #ff4d4d;
	--green: #3ddc84;
	--blue: #4da6ff;
	--orange: #ff8c42;
	--purple: #a78bfa;
	--teal: #2dd4bf;
	--train-re: #e8c44a;
	--train-s: #3ddc84;
	--train-ic: #4da6ff;
	--bus: #ff8c42;
	--tram: #a78bfa;
	--taxi: #2dd4bf;
	--ferry: #06b6d4;
	--radius: 12px;
	--radius-sm: 8px;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: 'Syne', sans-serif;
	min-height: 100vh;
	overflow-x: hidden
}

body::before {
	content: '';
	position: fixed;
	inset: 0;
	background-image: linear-gradient(rgba(232, 196, 74, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(232, 196, 74, .03) 1px, transparent 1px);
	background-size: 40px 40px;
	pointer-events: none;
	z-index: 0
}

.linkout {
	color: var(--text-muted);
}

/* TRACKING BANNER */
#trackBanner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: rgba(10, 12, 16, .97);
	border-bottom: 2px solid var(--line-c, var(--accent));
	backdrop-filter: blur(12px);
	transform: translateY(-100%);
	transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
	box-shadow: 0 8px 40px rgba(0, 0, 0, .6)
}

#trackBanner.visible {
	transform: translateY(0)
}

.track-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap
}

.track-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--green);
	flex-shrink: 0;
	animation: pulse-dot 1.4s ease infinite
}

.track-status-dot.delayed {
	background: var(--red)
}

.track-pill {
	padding: 5px 12px;
	border-radius: 6px;
	font-weight: 800;
	font-size: 14px;
	background: var(--line-c, var(--accent));
	color: #000;
	flex-shrink: 0
}

.track-pill.light {
	color: #fff
}

.track-dir {
	font-weight: 700;
	font-size: 15px;
	flex: 1;
	min-width: 100px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis
}

.track-arriving {
	font-family: 'DM Mono', monospace;
	font-size: 12px;
	color: var(--text-dim);
	white-space: nowrap
}

.track-arriving strong {
	font-size: 15px
}

.track-open {
	background: transparent;
	border: 1px solid var(--border-bright);
	color: var(--text-dim);
	border-radius: 6px;
	padding: 4px 10px;
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	cursor: pointer;
	transition: all .2s
}

.track-open:hover {
	border-color: var(--accent);
	color: var(--accent)
}

.track-close {
	background: transparent;
	border: 1px solid var(--border-bright);
	color: var(--text-dim);
	border-radius: 6px;
	padding: 4px 10px;
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	cursor: pointer;
	transition: all .2s;
	margin-left: 4px
}

.track-close:hover {
	border-color: var(--red);
	color: var(--red)
}

/* LAYOUT */
.container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px;
	position: relative;
	z-index: 1
}

#mainContent {
	transition: padding-top .35s ease
}

#mainContent.banner-open {
	padding-top: 64px
}

/* HEADER */
.header {
	padding: 40px 0 0
}

.app-header-inner {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 8px
}

.logo-mark {
	width: 52px;
	height: 52px;
	background: var(--accent);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 20px;
	color: #000;
	flex-shrink: 0;
	box-shadow: 0 0 30px var(--accent-glow)
}

.header-text h1 {
	font-size: clamp(28px, 5vw, 46px);
	font-weight: 800;
	letter-spacing: -1px;
	line-height: 1
}

.header-text h1 span {
	color: var(--accent)
}

/* SEARCH */
.search-section {
	padding: 32px 0 0
}

.search-wrap {
	position: relative;
}

.search-icon {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-dim);
	pointer-events: none;
	font-size: 18px
}

#searchInput {
	width: 100%;
	background: var(--surface);
	border: 1.5px solid var(--border-bright);
	border-radius: var(--radius);
	padding: 16px 18px 16px 50px;
	font-family: 'Syne', sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: var(--text);
	outline: none;
	transition: border-color .2s, box-shadow .2s
}

#searchInput::placeholder {
	color: var(--text-muted)
}

#searchInput:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-glow)
}

.suggestions {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: var(--surface2);
	border: 1.5px solid var(--border-bright);
	border-radius: var(--radius);
	overflow: hidden;
	z-index: 100;
	display: none;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .6)
}

.suggestions.visible {
	display: block
}

.suggestion-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 18px;
	cursor: pointer;
	transition: background .15s;
	border-bottom: 1px solid var(--border)
}

.suggestion-item:last-child {
	border-bottom: none
}

.suggestion-item:hover {
	background: var(--surface)
}

.sug-icon {
	width: 30px;
	height: 30px;
	background: var(--accent-glow);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	flex-shrink: 0
}

.sug-name {
	font-weight: 600;
	font-size: 14px
}

.sug-type {
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-top: 1px
}

/* CONTROLS */
.controls-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
	flex-wrap: wrap
}

.filter-btn {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 8px 14px;
	border-radius: 999px;
	border: 1.5px solid var(--border-bright);
	background: transparent;
	color: var(--text-dim);
	font-family: 'DM Mono', monospace;
	font-size: 12px;
	letter-spacing: .5px;
	cursor: pointer;
	transition: all .2s;
	white-space: nowrap
}

.filter-btn .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor
}

.filter-btn.active {
	border-color: currentColor;
	background: rgba(255, 255, 255, .05);
	color: var(--text)
}

.filter-btn.f-all.active {
	color: var(--accent)
}

.filter-btn.f-re.active {
	color: var(--train-re)
}

.filter-btn.f-s.active {
	color: var(--train-s)
}

.filter-btn.f-ic.active {
	color: var(--train-ic)
}

.filter-btn.f-bus.active {
	color: var(--bus)
}

.filter-btn.f-tram.active {
	color: var(--tram)
}

.filter-btn.f-taxi.active {
	color: var(--taxi)
}

.filter-btn.f-ferry.active {
	color: var(--ferry)
}

.spacer {
	flex: 1
}

.refresh-btn {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1.5px solid var(--border-bright);
	background: transparent;
	color: var(--text-dim);
	font-family: 'DM Mono', monospace;
	font-size: 12px;
	cursor: pointer;
	transition: all .2s
}

.refresh-btn:hover {
	border-color: var(--accent);
	color: var(--accent)
}

.refresh-btn svg {
	transition: transform .4s
}

.refresh-btn.spinning svg {
	animation: spin .6s linear infinite
}

@keyframes spin {
	to {
		transform: rotate(360deg)
	}
}

/* STATS */
.stats-row {
	display: flex;
	gap: 12px;
	margin: 24px 0 0;
	flex-wrap: wrap;
	opacity: 0;
	transform: translateY(10px);
	transition: all .4s ease
}

.stats-row.visible {
	opacity: 1;
	transform: translateY(0)
}

.stat-card {
	flex: 1;
	min-width: 100px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 14px 16px;
	position: relative;
	overflow: hidden
}

.stat-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--c, var(--accent));
	opacity: .7
}

.stat-num {
	font-size: 28px;
	font-weight: 800;
	line-height: 1;
	color: var(--c, var(--accent))
}

.stat-label {
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 1.5px;
	margin-top: 4px
}

/* DEPARTURES */
.departures-section {
	margin-top: 20px;
	padding-bottom: 60px
}

.group-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 0 8px
}

.group-icon {
	font-size: 16px
}

.group-title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	font-family: 'DM Mono', monospace
}

.group-line {
	flex: 1;
	height: 1px;
	background: var(--border)
}

.group-count-badge {
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--surface2);
	border: 1px solid var(--border);
	color: var(--text-dim)
}

.departures-list {
	display: flex;
	flex-direction: column;
	gap: 8px
}

/* DEP CARD */
.dep-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 14px 16px;
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	gap: 0 12px;
	align-items: center;
	cursor: pointer;
	transition: border-color .2s, transform .2s, box-shadow .2s;
	animation: fadeSlideIn .3s ease both;
	position: relative;
	overflow: hidden
}

.dep-card::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--line-color, var(--text-muted));
	opacity: .8
}

.dep-card:hover {
	border-color: var(--border-bright);
	transform: translateX(2px);
	box-shadow: -4px 0 20px rgba(0, 0, 0, .3)
}

.dep-card.delayed::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 77, 77, .03);
	pointer-events: none
}

.dep-card.tracked {
	border-color: var(--accent) !important;
	background: rgba(232, 196, 74, .04)
}

@keyframes fadeSlideIn {
	from {
		opacity: 0;
		transform: translateY(8px)
	}

	to {
		opacity: 1;
		transform: translateY(0)
	}
}

.line-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	min-width: 52px
}

.line-pill {
	padding: 5px 10px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .5px;
	text-align: center;
	background: var(--line-color, var(--text-muted));
	color: #000;
	white-space: nowrap;
	min-width: 44px
}

.line-pill.light-text {
	color: #fff
}

.line-type-tag {
	font-family: 'DM Mono', monospace;
	font-size: 9px;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 1px
}

.dep-info {
	overflow: hidden
}

.dep-direction {
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis
}

.dep-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 5px;
	flex-wrap: wrap
}

.meta-chip {
	display: flex;
	align-items: center;
	gap: 5px;
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	color: var(--text-dim);
	background: var(--surface2);
	border: 1px solid var(--border);
	border-radius: 5px;
	padding: 2px 8px
}

.meta-chip.platform {
	color: var(--accent);
	border-color: rgba(232, 196, 74, .2);
	background: rgba(232, 196, 74, .06)
}

.dep-time {
	text-align: right;
	flex-shrink: 0
}

.time-main {
	font-size: 22px;
	font-weight: 800;
	font-family: 'DM Mono', monospace;
	line-height: 1
}

.time-main.on-time {
	color: var(--green)
}

.time-main.delayed {
	color: var(--red)
}

.time-main.no-rt {
	color: var(--text-dim)
}

.time-planned {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	color: var(--text-dim);
	text-decoration: line-through;
	text-align: right;
	margin-top: 2px
}

.delay-badge {
	display: inline-block;
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	padding: 2px 6px;
	border-radius: 4px;
	margin-top: 3px;
	background: rgba(255, 77, 77, .15);
	color: var(--red);
	border: 1px solid rgba(255, 77, 77, .25)
}

.delay-badge.early {
	background: rgba(61, 220, 132, .1);
	color: var(--green);
	border-color: rgba(61, 220, 132, .2)
}

.minutes-away {
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	color: var(--text-dim);
	margin-top: 4px;
	text-align: right
}

.card-actions {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex-shrink: 0
}

.btn-detail,
.btn-track {
	padding: 5px 10px;
	border-radius: 6px;
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	letter-spacing: .5px;
	cursor: pointer;
	transition: all .2s;
	border: 1px solid var(--border-bright);
	background: transparent;
	color: var(--text-dim);
	white-space: nowrap
}

.btn-detail:hover {
	border-color: var(--blue);
	color: var(--blue)
}

.btn-track:hover,
.btn-track.active {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--accent-glow)
}

/* TRIP PANEL */
#tripPanel {
	position: fixed;
	inset: 0;
	z-index: 500;
	background: rgba(0, 0, 0, .65);
	backdrop-filter: blur(6px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s
}

#tripPanel.visible {
	opacity: 1;
	pointer-events: all
}

.panel-sheet {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: min(580px, 100vw);
	background: var(--surface);
	border-left: 1px solid var(--border-bright);
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1)
}

#tripPanel.visible .panel-sheet {
	transform: translateX(0)
}

.panel-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	padding: 20px 24px;
	display: flex;
	align-items: center;
	gap: 14px
}

.panel-line-pill {
	padding: 6px 14px;
	border-radius: 8px;
	font-weight: 800;
	font-size: 16px;
	flex-shrink: 0;
	color: #000
}

.panel-line-pill.light {
	color: #fff
}

.panel-title {
	flex: 1;
	overflow: hidden
}

.panel-direction {
	font-size: 16px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis
}

.panel-origin {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	color: var(--text-dim);
	margin-top: 2px
}

.panel-close {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--surface2);
	border: 1px solid var(--border-bright);
	color: var(--text-dim);
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .2s;
	flex-shrink: 0
}

.panel-close:hover {
	background: rgba(255, 77, 77, .15);
	border-color: var(--red);
	color: var(--red)
}

.panel-body {
	padding: 24px
}

/* JOURNEY PROGRESS */
.journey-progress {
	background: var(--surface2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 20px;
	margin-bottom: 24px
}

.progress-label {
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 2px;
	margin-bottom: 12px
}

.progress-bar-wrap {
	position: relative;
	height: 6px;
	background: var(--surface);
	border-radius: 999px;
	overflow: visible;
	margin-bottom: 10px
}

.progress-bar-fill {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--line-c, var(--accent)), rgba(255, 255, 255, .3));
	transition: width .8s cubic-bezier(.4, 0, .2, 1);
	position: relative;
	min-width: 20px
}

.progress-train-icon {
	position: absolute;
	right: -10px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 18px;
	filter: drop-shadow(0 0 6px var(--line-c, var(--accent)));
	animation: train-pulse 2s ease infinite
}

@keyframes train-pulse {

	0%,
	100% {
		transform: translateY(-50%) scale(1)
	}

	50% {
		transform: translateY(-50%) scale(1.2)
	}
}

.progress-stops {
	display: flex;
	justify-content: space-between;
	gap: 8px
}

.progress-stop-label {
	font-family: 'DM Mono', monospace;
	font-size: 9px;
	color: var(--text-dim);
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap
}

.progress-stop-label:nth-child(2) {
	text-align: center;
	color: var(--accent)
}

.progress-stop-label:last-child {
	text-align: right
}

/* CURRENT STOP BANNER */
.current-stop-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(232, 196, 74, .07);
	border: 1px solid rgba(232, 196, 74, .2);
	border-radius: var(--radius-sm);
	padding: 12px 16px;
	margin-bottom: 20px
}

.csb-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	animation: pulse-dot 1.4s ease infinite;
	flex-shrink: 0
}

.csb-text {
	font-family: 'DM Mono', monospace;
	font-size: 12px;
	line-height: 1.6
}

.csb-text strong {
	color: var(--accent)
}

/* STOPS LIST */
.stops-list {
	display: flex;
	flex-direction: column
}

.stop-row {
	display: grid;
	grid-template-columns: 24px 1fr auto;
	gap: 0 14px;
	padding: 10px 0;
	position: relative
}

.stop-row:not(:last-child)::after {
	content: '';
	position: absolute;
	left: 6.5px;
	top: 28px;
	bottom: -4px;
	width: 2px;
	background: var(--border);
	z-index: 0
}

.stop-row.passed:not(:last-child)::after {
	background: var(--text-muted);
	opacity: .5
}

.stop-row.current:not(:last-child)::after {
	background: linear-gradient(to bottom, var(--line-c, var(--accent)) 0%, var(--border) 100%)
}

.stop-dot-wrap {
	display: flex;
	align-items: flex-start;
	padding-top: 3px;
	position: relative;
	z-index: 1
}

.stop-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid var(--text-muted);
	background: var(--bg);
	margin: 1.5px;
	flex-shrink: 0;
	transition: all .3s
}

.stop-row.passed .stop-dot {
	background: var(--text-dim);
	border-color: var(--text-dim)
}

.stop-row.current .stop-dot {
	background: var(--line-c, var(--accent));
	border-color: var(--line-c, var(--accent));
	box-shadow: 0 0 12px var(--line-c, var(--accent));
	animation: cur-pulse 1.5s ease infinite;
	width: 12px;
	height: 12px;
	margin: 0.5px
}

@keyframes cur-pulse {

	0%,
	100% {
		box-shadow: 0 0 6px var(--line-c, var(--accent))
	}

	50% {
		box-shadow: 0 0 18px var(--line-c, var(--accent)), 0 0 30px var(--line-c, var(--accent))
	}
}

.stop-row.target .stop-dot {
	background: var(--accent);
	border-color: var(--accent);
	width: 14px;
	height: 14px;
	margin: 0
}

.stop-info {
	overflow: hidden
}

.stop-name {
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis
}

.stop-row.passed .stop-name {
	color: var(--text-dim)
}

.stop-row.current .stop-name {
	color: var(--accent);
	font-weight: 800
}

.stop-row.target .stop-name {
	font-weight: 700
}

.stop-sub {
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	color: var(--text-muted);
	margin-top: 1px
}

.stop-sub.accent {
	color: var(--accent);
	opacity: .8
}

.stop-times {
	text-align: right;
	flex-shrink: 0
}

.stop-time {
	font-family: 'DM Mono', monospace;
	font-size: 12px;
	font-weight: 500
}

.stop-time.on-time {
	color: var(--green)
}

.stop-time.delayed {
	color: var(--red)
}

.stop-time.no-rt {
	color: var(--text-dim)
}

.stop-time-plan {
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	color: var(--text-muted);
	text-decoration: line-through
}

.stop-delay {
	font-family: 'DM Mono', monospace;
	font-size: 9px;
	color: var(--red)
}

.stop-platform {
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	color: var(--text-dim);
	margin-top: 1px
}

/* STATES */
.state-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 80px 20px;
	gap: 16px;
	color: var(--text-dim);
	text-align: center
}

.state-box .icon {
	font-size: 48px;
	opacity: .4
}

.state-box h3 {
	font-size: 18px;
	color: var(--text)
}

.state-box p {
	font-family: 'DM Mono', monospace;
	font-size: 12px;
	max-width: 300px;
	line-height: 1.7
}

.loader {
	width: 40px;
	height: 40px;
	border: 3px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin .8s linear infinite
}

.last-update {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	color: var(--text-muted);
	text-align: center;
	padding: 16px;
	display: none
}

.last-update.visible {
	display: block
}

.live-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--green);
	margin-right: 6px;
	animation: pulse-dot 2s ease infinite;
	vertical-align: middle
}

@keyframes pulse-dot {

	0%,
	100% {
		opacity: 1;
		transform: scale(1)
	}

	50% {
		opacity: .4;
		transform: scale(.7)
	}
}

.countdown-text strong {
	color: var(--accent)
}

/* FLASH */
@keyframes flash-upd {
	0% {
		background: rgba(232, 196, 74, .25)
	}

	100% {
		background: transparent
	}
}

.flash-update {
	animation: flash-upd .8s ease forwards;
	border-radius: 3px
}

/* API CONFIG PANEL */
#apiConfigOverlay {
	position: fixed;
	inset: 0;
	z-index: 2000;
	background: rgba(0, 0, 0, .75);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px
}

#apiConfigOverlay.hidden {
	display: none
}

.api-config-box {
	background: var(--surface);
	border: 1.5px solid var(--border-bright);
	border-radius: var(--radius);
	padding: 32px;
	width: 100%;
	max-width: 480px;
	box-shadow: 0 40px 80px rgba(0, 0, 0, .6);
	position: relative
}

.api-config-box::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--accent), rgba(232, 196, 74, .3));
	border-radius: var(--radius) var(--radius) 0 0
}

.api-config-logo {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 24px
}

.api-config-logo .logo-mark {
	width: 44px;
	height: 44px;
	font-size: 17px
}

.api-config-logo h2 {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.5px
}

.api-config-logo h2 span {
	color: var(--accent)
}

.api-config-label {
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 2px;
	margin-bottom: 8px
}

.api-config-desc {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	color: var(--text-muted);
	margin-bottom: 20px;
	line-height: 1.7
}

.api-config-desc code {
	color: var(--accent);
	background: var(--accent-glow);
	padding: 1px 5px;
	border-radius: 4px
}

.api-input-wrap {
	position: relative;
	margin-bottom: 12px
}

.api-input-wrap .api-scheme {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-family: 'DM Mono', monospace;
	font-size: 13px;
	color: var(--text-dim);
	pointer-events: none
}

#apiEndpointInput {
	width: 100%;
	background: var(--surface2);
	border: 1.5px solid var(--border-bright);
	border-radius: var(--radius-sm);
	padding: 13px 14px;
	font-family: 'DM Mono', monospace;
	font-size: 14px;
	color: var(--text);
	outline: none;
	transition: border-color .2s, box-shadow .2s
}

#apiEndpointInput:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-glow)
}

#apiEndpointInput::placeholder {
	color: var(--text-muted)
}

.api-error {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	color: var(--red);
	margin-bottom: 12px;
	display: none;
	padding: 8px 12px;
	background: rgba(255, 77, 77, .08);
	border: 1px solid rgba(255, 77, 77, .2);
	border-radius: 6px
}

.api-error.visible {
	display: block
}

.api-config-actions {
	display: flex;
	gap: 10px;
	margin-top: 6px
}

.btn-api-save {
	flex: 1;
	padding: 12px;
	border-radius: var(--radius-sm);
	background: var(--accent);
	color: #000;
	font-family: 'Syne', sans-serif;
	font-weight: 800;
	font-size: 14px;
	border: none;
	cursor: pointer;
	transition: all .2s
}

.btn-api-save:hover {
	background: #f0d060;
	box-shadow: 0 0 20px var(--accent-glow)
}

.btn-api-cancel {
	padding: 12px 18px;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text-dim);
	font-family: 'DM Mono', monospace;
	font-size: 12px;
	border: 1.5px solid var(--border-bright);
	cursor: pointer;
	transition: all .2s
}

.btn-api-cancel:hover {
	border-color: var(--border-bright);
	color: var(--text)
}

.btn-api-cancel.hidden {
	display: none
}

.api-hint {
	font-family: 'DM Mono', monospace;
	font-size: 10px;
	color: var(--text-muted);
	margin-top: 14px;
	line-height: 1.6;
	padding-top: 14px;
	border-top: 1px solid var(--border)
}

.api-hint strong {
	color: var(--text-dim)
}

/* API indicator in header */
.api-indicator {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	color: var(--text-dim);
	background: var(--surface2);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 4px 12px;
	cursor: pointer;
	transition: all .2s;
	margin-top: 10px
}

.api-indicator:hover {
	border-color: var(--accent);
	color: var(--accent)
}

.api-indicator .dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--green);
	flex-shrink: 0
}

.api-indicator .api-url-text {
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap
}

@media(max-width:600px) {
	.dep-card {
		grid-template-columns: auto 1fr auto
	}

	.card-actions {
		flex-direction: row;
		grid-column: 1/-1;
		margin-top: 8px
	}

	.panel-sheet {
		width: 100vw
	}

	.track-dir {
		display: none
	}
}