/* T4xi Airport — front-end styles.
 * Self-contained card that renders its own background so it stays readable on
 * any site theme. Colors are driven by CSS variables; the .t4x-dark / .t4x-light
 * classes on .t4x-wrap swap the palette (day/night toggle). */

/* ---------- Palettes ---------- */

.t4x-wrap.t4x-dark {
	--t4x-panel: #0e1620;
	--t4x-panel-grad: linear-gradient(180deg, #132030 0%, #0e1620 100%);
	--t4x-surface: #16212e;
	--t4x-text: #eaf2fb;
	--t4x-muted: #93a7bd;
	--t4x-accent: #38bdf8;
	--t4x-accent-2: #22d3ee;
	--t4x-accent-ink: #04263a;
	--t4x-border: #24384d;
	--t4x-head: #16212e;
	--t4x-row: #0f1a26;
	--t4x-row-alt: #12202e;
	--t4x-hover: #1c2e40;
	--t4x-total: #14283a;
	--t4x-zero: #4d6076;
	--t4x-shadow: 0 10px 30px rgba(0, 0, 0, .45);
	--t4x-ok-bg: #10281b;   --t4x-ok-bd: #1f6b42;   --t4x-ok-tx: #7ff0b0;
	--t4x-err-bg: #2c1414;  --t4x-err-bd: #7a2b25;  --t4x-err-tx: #ff9c93;
	--t4x-warn-bg: #2a2410; --t4x-warn-bd: #7a6420; --t4x-warn-tx: #f5d488;
}

.t4x-wrap.t4x-light {
	--t4x-panel: #ffffff;
	--t4x-panel-grad: linear-gradient(180deg, #ffffff 0%, #f3f8fe 100%);
	--t4x-surface: #f7fafd;
	--t4x-text: #0f2437;
	--t4x-muted: #5b6b7d;
	--t4x-accent: #0b74d1;
	--t4x-accent-2: #0ea5e9;
	--t4x-accent-ink: #ffffff;
	--t4x-border: #dbe6f1;
	--t4x-head: #eef5fd;
	--t4x-row: #ffffff;
	--t4x-row-alt: #f4f9fe;
	--t4x-hover: #e7f2fd;
	--t4x-total: #eaf3fc;
	--t4x-zero: #b3c1d0;
	--t4x-shadow: 0 8px 24px rgba(16, 42, 67, .12);
	--t4x-ok-bg: #e6f4ea;   --t4x-ok-bd: #b7dfc2;   --t4x-ok-tx: #1e5631;
	--t4x-err-bg: #fdecea;  --t4x-err-bd: #f5c2bd;  --t4x-err-tx: #8a1c13;
	--t4x-warn-bg: #fff7e6; --t4x-warn-bd: #f0d9a6; --t4x-warn-tx: #6b4e00;
}

/* ---------- Shell ---------- */

.t4x-wrap {
	position: relative;
	max-width: 760px;
	margin: 1.5em auto;
	padding: clamp(1.1em, 4vw, 2em);
	font-size: 16px;
	line-height: 1.5;
	color: var(--t4x-text);
	background: var(--t4x-panel-grad, var(--t4x-panel));
	border: 1px solid var(--t4x-border);
	border-radius: 16px;
	box-shadow: var(--t4x-shadow);
	-webkit-font-smoothing: antialiased;
}

.t4x-wrap * {
	box-sizing: border-box;
}

.t4x-toprow {
	display: flex;
	justify-content: flex-end;
	margin-bottom: .4em;
}

.t4x-title {
	margin: 0 0 .7em;
	font-size: clamp(1.35em, 5vw, 1.7em);
	font-weight: 800;
	letter-spacing: .01em;
	line-height: 1.15;
	background: linear-gradient(90deg, var(--t4x-accent) 0%, var(--t4x-accent-2) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--t4x-accent);
}

/* ---------- Day / night toggle ---------- */

.t4x-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--t4x-border);
	border-radius: 50%;
	background: var(--t4x-surface);
	color: var(--t4x-accent);
	cursor: pointer;
	transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.t4x-theme-toggle:hover {
	transform: translateY(-1px) rotate(-8deg);
	box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.t4x-theme-toggle svg {
	width: 20px;
	height: 20px;
	display: block;
}

.t4x-dark .t4x-theme-toggle .t4x-ico-moon,
.t4x-light .t4x-theme-toggle .t4x-ico-sun {
	display: none;
}

/* ---------- Forms ---------- */

.t4x-form label {
	display: block;
	margin: 0 0 .85em;
	font-weight: 600;
	font-size: .95em;
}

.t4x-form input[type="text"],
.t4x-form input[type="email"],
.t4x-form input[type="password"] {
	display: block;
	width: 100%;
	padding: .6em .75em;
	margin-top: .3em;
	font-weight: 400;
	font-size: 1em;
	color: var(--t4x-text);
	background: var(--t4x-surface);
	border: 1px solid var(--t4x-border);
	border-radius: 9px;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.t4x-form input:focus {
	outline: none;
	border-color: var(--t4x-accent);
	box-shadow: 0 0 0 3px rgba(56, 189, 248, .25);
}

.t4x-btn {
	display: inline-block;
	padding: .6em 1.3em;
	background: linear-gradient(90deg, var(--t4x-accent) 0%, var(--t4x-accent-2) 100%);
	color: var(--t4x-accent-ink);
	border: 0;
	border-radius: 9px;
	font-size: 1em;
	font-weight: 700;
	cursor: pointer;
	transition: filter .15s ease, transform .1s ease;
}

.t4x-btn:hover {
	filter: brightness(1.07);
}

.t4x-btn:active {
	transform: translateY(1px);
}

.t4x-link-btn {
	background: none;
	border: 0;
	color: var(--t4x-accent);
	cursor: pointer;
	padding: 0;
	font-size: .95em;
	font-weight: 600;
	text-decoration: underline;
}

.t4x-links {
	margin-top: 1em;
	font-size: .95em;
}

.t4x-links a {
	color: var(--t4x-accent);
}

.t4x-hint {
	color: var(--t4x-muted);
	font-size: .92em;
}

/* ---------- Notices ---------- */

.t4x-notice {
	padding: .75em .95em;
	border-radius: 9px;
	margin: 0 0 1em;
	font-size: .95em;
}

.t4x-ok   { background: var(--t4x-ok-bg);   border: 1px solid var(--t4x-ok-bd);   color: var(--t4x-ok-tx); }
.t4x-err  { background: var(--t4x-err-bg);  border: 1px solid var(--t4x-err-bd);  color: var(--t4x-err-tx); }
.t4x-warn { background: var(--t4x-warn-bg); border: 1px solid var(--t4x-warn-bd); color: var(--t4x-warn-tx); }

/* ---------- Dashboard ---------- */

.t4x-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .8em;
	flex-wrap: wrap;
	margin-bottom: 1em;
	padding-bottom: .7em;
	border-bottom: 1px solid var(--t4x-border);
}

.t4x-hello {
	font-size: .95em;
	color: var(--t4x-muted);
}

.t4x-logout {
	margin: 0;
}

.t4x-pick {
	margin: 0 0 1.1em;
	display: flex;
	align-items: center;
	gap: .6em;
	flex-wrap: wrap;
}

.t4x-pick label {
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: .5em;
}

.t4x-pick select {
	padding: .55em .7em;
	color: var(--t4x-text);
	background: var(--t4x-surface);
	border: 1px solid var(--t4x-border);
	border-radius: 9px;
	font-size: 1em;
}

.t4x-meta {
	font-size: .9em;
	color: var(--t4x-muted);
	margin: .2em 0 1em;
}

.t4x-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--t4x-border);
	border-radius: 12px;
	-webkit-overflow-scrolling: touch;
}

.t4x-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .95em;
	font-variant-numeric: tabular-nums;
}

.t4x-table th,
.t4x-table td {
	padding: .6em .7em;
	text-align: center;
	border-bottom: 1px solid var(--t4x-border);
	border-right: 1px solid var(--t4x-border);
	white-space: nowrap;
}

.t4x-table th:last-child,
.t4x-table td:last-child {
	border-right: 0;
}

.t4x-table thead th {
	background: var(--t4x-head);
	color: var(--t4x-text);
	font-weight: 700;
	font-size: .82em;
	text-transform: uppercase;
	letter-spacing: .03em;
	position: sticky;
	top: 0;
}

.t4x-table tbody tr:nth-child(odd)  { background: var(--t4x-row); }
.t4x-table tbody tr:nth-child(even) { background: var(--t4x-row-alt); }
.t4x-table tbody tr:hover { background: var(--t4x-hover); }

.t4x-table .t4x-time {
	text-align: left;
	font-weight: 700;
	position: sticky;
	left: 0;
	background: inherit;
	z-index: 1;
}

.t4x-table .t4x-zero {
	color: var(--t4x-zero);
}

.t4x-table .t4x-rowtot {
	font-weight: 800;
	color: var(--t4x-accent);
}

.t4x-table .t4x-totals td {
	font-weight: 800;
	background: var(--t4x-total);
	border-top: 2px solid var(--t4x-border);
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
	.t4x-wrap {
		margin: 0.8em auto;
		border-radius: 12px;
	}
	.t4x-pick {
		flex-direction: column;
		align-items: stretch;
	}
	.t4x-pick label {
		justify-content: space-between;
	}
	.t4x-pick select,
	.t4x-pick .t4x-btn {
		width: 100%;
	}
	.t4x-table th,
	.t4x-table td {
		padding: .5em .55em;
		font-size: .92em;
	}
}
